X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fdoc%2FTutorial.lyx;h=10ffa1c1aa1e4678633c173cb55e47fb78c9b942;hb=e2f2e1319180ae66e97633d8a141a7ef8e61a6e2;hp=3734eea5ff2a4e2752a76edff220cf04991ecefe;hpb=c1c924ec5fc88ca36ecad973a778b1d68d243d3d;p=lyx.git diff --git a/lib/doc/Tutorial.lyx b/lib/doc/Tutorial.lyx index 3734eea5ff..10ffa1c1aa 100644 --- a/lib/doc/Tutorial.lyx +++ b/lib/doc/Tutorial.lyx @@ -1,5 +1,5 @@ -#LyX 1.6.4 created this file. For more info see http://www.lyx.org/ -\lyxformat 345 +#LyX 2.0 created this file. For more info see http://www.lyx.org/ +\lyxformat 413 \begin_document \begin_header \textclass book @@ -29,25 +29,31 @@ \pdfbookmark[1]{\contentsname}{} \myTOC \mainmatter } - -% redefine the \LyX macro for PDF bookmarks -\def\LyX{\texorpdfstring{% - L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@} - {LyX}} \end_preamble \use_default_options false +\begin_modules +logicalmkup +\end_modules +\maintain_unincluded_children false \language english +\language_package default \inputencoding auto +\fontencoding global \font_roman default \font_sans default \font_typewriter default \font_default_family default +\use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default \paperfontsize 12 \spacing single \use_hyperref true @@ -64,26 +70,36 @@ \pdf_colorlinks true \pdf_backref false \pdf_pdfusetitle false -\pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true,pdfstartview=XYZ, plainpages=false, pdfpagelabels" +\pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false" \papersize default \use_geometry false \use_amsmath 0 \use_esint 0 +\use_mhchem 1 +\use_mathdots 1 \cite_engine basic \use_bibtopic false +\use_indices false \paperorientation portrait +\suppress_date false +\use_refstyle 0 +\index Index +\shortcut idx +\color #008000 +\end_index \secnumdepth 3 \tocdepth 2 \paragraph_separation indent -\defskip medskip +\paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 2 \paperpagestyle headings \tracking_changes false \output_changes false -\author "" -\author "" +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false \end_header \begin_body @@ -363,7 +379,7 @@ View \begin_layout Standard In this Tutorial, we are going to assume that you have a fully working version - of LyX, as well as a LaTeX-distribution, a DVI-, and a PDF-viewer. + of LyX, as well as a LaTeX-distribution and a PDF-viewer. This should be the case on all major Linux- and BSD-distributions, as well as on Windows, where this is setup by the LyX installers. \end_layout @@ -826,13 +842,9 @@ exactly User's Guide \emph default has information about all that. - It includes -\family sans -HFill -\family default -s and vertical space — which are more powerful and versatile than multiple - spaces or blank lines — and ways to change font sizes, character styles, - and paragraph alignments by hand. + It includes horizontal fills and vertical space — which are more powerful + and versatile than multiple spaces or blank lines — and ways to change + font sizes, character styles, and paragraph alignments by hand. The idea, though, is that you can write your whole document, focusing on content, and just worry about that fine-tuning at the end. With standard word processors, you will be distracted by document formatting @@ -1164,7 +1176,7 @@ Environment , and typesets it in a font which is bigger than regular text but smaller than the section title. - Change the fourth line + Change the fourth line to the \family sans Subsection \family default @@ -1346,11 +1358,7 @@ The \family sans List \family default -, or -\family sans -Labelling -\family default -, environment is a variation on the + environment is a variation on the \family sans Description \family default @@ -1436,7 +1444,7 @@ Ctrl+Return \family sans Standard \family default - environment (or just use the keybinding, + environment (or just use the key binding, \family sans Alt+P \begin_inset space ~ @@ -1790,7 +1798,7 @@ Additional Features \align center \begin_inset Tabular - + @@ -2008,10 +2016,6 @@ Address environment, which do not even exist in most other document classes. Others, like \family sans -Quote -\family default - and -\family sans Description \family default , are familiar. @@ -2195,8 +2199,9 @@ Embedded Objects appears on. As with section numbering, LyX also takes care about cross-reference numbering for you. - Automatic labels and cross-references are one of the best advantages of - LyX (and LaTeX) over conventional word processors. + Automatic labels and cross-references are among the most significant advantages + of LyX (and LaTeX) over conventional word processors. + \end_layout \begin_layout Subsection @@ -2265,7 +2270,15 @@ Section, which can be found on page. \end_layout \begin_layout Standard -Now — with the cursor after the word `Section' — choose +Now — with the cursor after the word +\begin_inset Quotes eld +\end_inset + +Section +\begin_inset Quotes erd +\end_inset + + — choose \family sans Insert\SpecialChar \menuseparator Cross @@ -2285,11 +2298,42 @@ Reference . The Cross-reference dialog pops up. It shows a list of the possible labels you can reference. - At the moment, there should be only one, `sec:About-This-Document'. - First, select the drop-down menu labelled Format and select ' - on page .' Then select `sec:About-This-Document' (it may be selected - by default), and a reference marker will appear containing `Ref+Text: sec:About --This-Document' (To be really correct, you should put a + At the moment, there should be only one, +\begin_inset Quotes eld +\end_inset + +sec:About-This-Document +\begin_inset Quotes erd +\end_inset + +. + First, select the drop-down menu labeled Format and select +\begin_inset Quotes eld +\end_inset + + on page +\begin_inset Quotes erd +\end_inset + +. + Then select +\begin_inset Quotes eld +\end_inset + +sec:About-This-Document +\begin_inset Quotes erd +\end_inset + + (it may be selected by default), and a reference marker will appear containing + +\begin_inset Quotes eld +\end_inset + +Ref+Text: sec:About-This-Document +\begin_inset Quotes erd +\end_inset + + (To be really correct, you should put a \family sans Protected \begin_inset space ~ @@ -2297,7 +2341,15 @@ Protected Space \family default - in between the word `Section' and the reference). + in between the word +\begin_inset Quotes eld +\end_inset + +Section +\begin_inset Quotes erd +\end_inset + + and the reference). Alternatively to that method, you can right-click on a label and use in the appearing context menu \family sans @@ -2319,9 +2371,47 @@ Ctrl+V section number and then the page number. View your document as DVI, and you will see that LaTeX has been even cleverer than that. - It refers to `Section 2' and depending how much text you have between the - start of Section 2 and this cross-reference you may see `on this page,' - 'on the previous page' or `on page n' (whereas n is the page number). + It refers to +\begin_inset Quotes eld +\end_inset + +Section 2 +\begin_inset Quotes erd +\end_inset + + and depending how much text you have between the start of Section +\begin_inset space ~ +\end_inset + +2 and this cross-reference you may see +\begin_inset Quotes eld +\end_inset + +on this page +\begin_inset Quotes erd +\end_inset + +, +\begin_inset Quotes eld +\end_inset + +on the previous page +\begin_inset Quotes erd +\end_inset + + or +\begin_inset Quotes eld +\end_inset + +on page n +\begin_inset Quotes erd +\end_inset + + (whereas +\emph on +n +\emph default + is the page number). \end_layout \begin_layout Standard @@ -2420,7 +2510,7 @@ status collapsed \begin_layout Plain Layout By the way, copying a chapter title may cause an error, because chapters - are not allowed in the article class, see section + are not allowed in the article class, see Section \begin_inset space ~ \end_inset @@ -2496,7 +2586,7 @@ LyX is a typesetting word processor. \end_layout \begin_layout Standard -Now click on the button labelled +Now click on the button labeled \begin_inset Quotes eld \end_inset @@ -3013,9 +3103,9 @@ Esc \end_layout \begin_layout Standard -Run LaTeX and look at the output. - Notice that the expression was typeset nicely, with spaces between the - letters and the equals sign, and a superscript +Looking at the output you will notice that the expression was typeset nicely, + with spaces between the letters and the equals sign, and a superscript + \begin_inset Quotes eld \end_inset @@ -3038,7 +3128,8 @@ This math editor is another example of the WYSIWYM philosophy. sqrt \family default ; this can be frustrating, because you cannot see what an expression looks - like until you LaTeX the file, and may have to spend time to find e. + like until you run the file under LaTeX and you may have to spend time + finding e. \begin_inset space \thinspace{} \end_inset @@ -3113,7 +3204,7 @@ Edit\SpecialChar \menuseparator Undo \family default works in math mode as well as cut and paste. - One thing to be careful of: If you are left or right outside a formula + One thing to be careful of: if you are left or right outside a formula and you press \family sans Delete @@ -3122,7 +3213,7 @@ Delete \family sans Backspace \family default -, respectively, you delete the whole formula. + respectively, you delete the whole formula. Luckily, you can just use \family sans Undo @@ -3185,7 +3276,7 @@ Up Down \family default will move the cursor back to the regular level. - When you hit + If you hit \family sans Space \family default @@ -3244,16 +3335,16 @@ Esc \end_layout \begin_layout Standard -Writing a subscript (index) is just as easy — start one by typing the underscore - key, +Writing a subscript (index) is just easy; start one by typing the underscore + key \begin_inset Quotes eld \end_inset _ -\begin_inset Quotes eld +\begin_inset Quotes erd \end_inset -. + . You can subscript and superscript both subscripts and superscripts like this: \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$ @@ -3276,7 +3367,7 @@ example_raw.lyx \end_layout \begin_layout Section -The Math Toolbar +The Math toolbar \end_layout \begin_layout Standard @@ -3286,7 +3377,7 @@ Math \begin_inset space ~ \end_inset -Toolbar +toolbar \family default is a convenient way to enter symbols or to perform complicated formula operations. @@ -3307,16 +3398,24 @@ Math \begin_inset space ~ \end_inset -Toolbars +toolbar \family default , just to let you know what is out there; you can learn keyboard shortcuts - later, from other manuals. + and commands later from the +\emph on +Math +\emph default + manual. \end_layout \begin_layout Standard The \family sans -math toolbar +Math +\begin_inset space ~ +\end_inset + +toolbar \family default is shown when the cursor is in a formula and can also be turned on manually in the menu @@ -3390,29 +3489,13 @@ Math \begin_inset space ~ \end_inset -Toolbar +toolbar \family default - which allow you to choose from a large array of symbols used in math: various - arrows, relations, operators, and sums and integrals. + allows you to choose from a large array of symbols used in math: operators, + arrows, relationships, delimiters, special characters, sums and integrals. Note that subscripting and superscripting allow you to put lower and upper limits on sums and integrals. -\end_layout - -\begin_layout Standard -\begin_inset Quotes eld -\end_inset - -Nothing you can do that can not be done\SpecialChar \ldots{} - All you need is -\begin_inset Formula $\heartsuit$ -\end_inset - -. -\begin_inset Quotes erd -\end_inset - - \end_layout \begin_layout Subsection @@ -3459,8 +3542,8 @@ Accenting a character ( point under (or over) it. Just type what you want in the insertion point. There are two sets of decorations: those that resize with the text you - type, and those that have fixed size, and are most appropriate for a single - letter. + type, and those that have a fixed size, and are most appropriate for a + single letter. \end_layout @@ -3508,8 +3591,8 @@ Delimiter dialog. However, those parentheses will be the same size as regular text, which will look bad if you have a big fraction or matrix inside the parentheses. - So better use in this case one of the three delimiter buttons that insert - directly e. + So it is better in this case to use one of the three delimiter buttons + that insert directly e. \begin_inset space \thinspace{} \end_inset @@ -3618,7 +3701,7 @@ example_raw.lyx \end_layout \begin_layout Subsection -TeX mode: Limits, log, sin and others +Functions: lim, log, sin and others \end_layout \begin_layout Standard @@ -3757,7 +3840,7 @@ Backspace \end_layout \begin_layout Standard -The function list include other trigonometric functions and their inverses, +The function list includes other trigonometric functions and their inverses, hyperbolic functions, logarithms, limits, and quite a few others. These functions can take subscripts and superscripts, important for typing @@ -3935,7 +4018,7 @@ User's Guide \end_layout \begin_layout Standard -Click on the display button +While being in a formula, click on the display button \begin_inset Graphics filename ../images/math-display.png scale 75 @@ -3951,11 +4034,9 @@ Math Toolbar \family default -, which represents a couple lines of text before and after a centered blue - box. - LyX inserts a formula, but the insertion point is on a new line, and it - is centered within that line. - Now type an expression and run LaTeX to see how it looks. +. + This centers the formula and adds a blank line before and after it. + Now type in an expression and compile your file to see how it looks. The display button is actually a toggle; use it now to change a couple of your expressions to display mode and back. @@ -3979,7 +4060,7 @@ The default font is larger for a few symbols, like \begin_layout Itemize Subscripts and superscripts for limits and sums (but not integrals) are - written under rather than next to the symbols + written under and over rather than next to the symbols \end_layout \begin_layout Itemize @@ -4005,7 +4086,7 @@ Return after \emph default the formula to start a new paragraph. - That text will therefore eventually be indented, depending on your document + That text will be indented or follow a blank line, depending on your document paragraph settings, which is probably not what you want. \end_layout @@ -4027,7 +4108,7 @@ example_raw.lyx Exercise \series default : Using various tools you have learned in this section, you should be able - to write an equation like + to write an equation like: \begin_inset Foot status collapsed @@ -4047,12 +4128,15 @@ Environment \end_inset -: -\begin_inset Formula \[ + +\begin_inset Formula +\[ f(x)=\left\{ \begin{array}{cc} \log_{8}x & x>0\\ 0 & x=0\\ -\sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\] +\sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0 +\end{array}\right. +\] \end_inset @@ -4064,8 +4148,8 @@ More Math Stuff \end_layout \begin_layout Standard -LyX's math editor can do plenty more. - By now, you are familiar with the basics, so we refer to the +LyX's math editor can do a lot more. + Now you are familiar with the basics, you can refer to the \emph on User's Guide \emph default @@ -4073,11 +4157,11 @@ User's Guide \end_layout \begin_layout Itemize -Labeling and numbering expressions +Label and number expressions \end_layout \begin_layout Itemize -Multi-line equations +Create multi-line equations \end_layout \begin_layout Itemize @@ -4104,7 +4188,7 @@ Write macros. \end_layout \begin_layout Itemize -Do lots of other things that cannot be mentioned in this Tutorial. +Do lots of other things that we have no space for in this Tutorial. \end_layout \begin_layout Chapter @@ -4257,7 +4341,7 @@ reference "sec:tex2lyx" \end_layout \begin_layout Itemize -Spellchecking, thesaurus, and word count facilities are available. +Spell-checking, thesaurus, and word count facilities are available. \end_layout \begin_layout Itemize @@ -4408,17 +4492,27 @@ Toolbar \end_layout \begin_layout Standard -As a special case, if you type a brace in TeX mode, then the beginning +As a special case, if you type +\begin_inset Quotes eld +\end_inset + + +\family typewriter + +\backslash +{ +\family default + +\begin_inset Quotes erd +\end_inset + + in a formula, the beginning \emph on and \emph default - ending braces will be inserted in red, then take you -\emph on -out -\emph default - of TeX mode and place the cursor between the braces. - This makes it more convenient to type commands that LyX does not know which - take an argument. + ending braces will be inserted in red while the cursor is placed between + the braces. + This makes it more convenient to type those commands which take an argument. \end_layout \begin_layout Standard @@ -4434,7 +4528,7 @@ LyX cannot do absolutely everything that LaTeX can do. \backslash usepackage{foo} \family default - in the preamble (see section + in the preamble (see Section \begin_inset space ~ \end_inset @@ -4480,20 +4574,27 @@ LaTeX \family typewriter tex2lyx \family default - which will create a file + which will create a file foo.lyx from the file foo.tex. + LyX will then open that file. + If the translation does not work, you can try calling \family typewriter -foo.lyx +tex2lyx \family default - from the file + from the command line, possibly using fancier options. +\end_layout + +\begin_layout Standard +Even when the translation does work, \family typewriter -foo.tex +tex2lyx \family default - and then open that file. - If the translation does not work, you can try calling + may not translate everything, though it does handle most legal LaTeX. + It will leave things it does not understand in TeX mode; so, after translating + a file with \family typewriter tex2lyx \family default - from the command line, possibly using fancier options. +, you can look for the red text and manually edit it to get it right. \end_layout \begin_layout Standard @@ -4501,24 +4602,54 @@ tex2lyx \family typewriter tex2lyx \family default - will translate most legal LaTeX, but not everything. - It will leave things it does not understand in TeX mode, so after translating - a file with + has its own documentation (manpage), which Unix/Linux users can access + via the console command \family typewriter +man +\begin_inset space ~ +\end_inset + tex2lyx \family default -, you can look for red text and hand-edit it to look right. +. + The manpage describes which LaTeX commands and environments are not supported, + what bugs you might run into (and how to get around them), and how to use + the various options. \end_layout \begin_layout Standard +It is important to understand that +\family typewriter +tex2lyx +\family default + can only translate files whose document class is +\begin_inset Quotes eld +\end_inset + +known +\begin_inset Quotes erd +\end_inset + to LyX, that is, for which there is a corresponding LyX +\family sans +layout file +\family default +. + If there is no layout file, then you will get an error saying that the + conversion could not be performed. + So, unless you have a layout for the document class of your LaTeX file, + \family typewriter tex2lyx \family default - has its own manpage. - Read it to find out about which LaTeX commands and environments are not - supported, bugs (and how to get around them), and how to use the various - options. + simply will not know how to translate the LaTeX that it finds there into + things LyX understands. + More about layout files and how they are created is explained in detail + in Chapter 5 of the +\emph on +Customization +\emph default + manual. \end_layout \begin_layout Subsection @@ -4562,31 +4693,16 @@ The Document\SpecialChar \menuseparator Settings \family default - dialog takes care of many of the options that you would input in a -\family typewriter - -\backslash -documentclass -\family default - command. - Change the class, default font size and paper size here. - Put any extra options to the -\family typewriter - -\backslash -documentclass -\family default - command in the + dialog takes care of the document-wide options. + You can change there the document class, default font size and paper size. + Document class options but also options for LaTeX packages can be entered + there in the \family sans -E -\bar under -x -\bar default -tra +Class \begin_inset space ~ \end_inset -Options +options \family default area. \end_layout @@ -4617,7 +4733,7 @@ Preamble \family default and type in the dialog window (or from the document settings dialog, depending on the frontend). - Anything you type will (like with TeX mode) be sent directly to LaTeX. + Anything you type will (as with TeX mode) be sent directly to LaTeX. \end_layout \begin_layout Subsection @@ -4631,11 +4747,11 @@ al references to be used in multiple documents. \family sans Insert\SpecialChar \menuseparator List -\begin_inset space ~ +\begin_inset space \thinspace{} \end_inset / -\begin_inset space ~ +\begin_inset space \thinspace{} \end_inset TOC\SpecialChar \menuseparator @@ -4662,13 +4778,13 @@ Style \end_layout \begin_layout Standard -After you have done this, you can use citations from any bibliographies +After you have done this, you can use citations from any bibliographies you are including with \family sans Insert\SpecialChar \menuseparator Citation \family default - (see section + (see Section \begin_inset space ~ \end_inset @@ -4697,8 +4813,8 @@ Errors! \end_layout \begin_layout Standard -Sometimes when you LaTeX a document, there will be errors, things that LyX - or LaTeX cannot understand. +Sometimes when you try to view a document, there will be errors, things + that LyX or LaTeX cannot understand. When this happens, LyX will open a \family sans LaTeX