1 #LyX 1.5.4svn created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 %This preamble is designed to ensure that the document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
22 % link all cross references and URLs in pdf output
23 \usepackage[colorlinks=true, bookmarks, bookmarksnumbered,
24 bookmarksopen, bookmarksopenlevel=2,
25 linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,
26 pdfpagelayout=OneColumn, pdfnewwindow=true,
27 pdfstartview=XYZ, plainpages=false, pdfpagelabels,
28 pdfauthor={LyX Team}, pdftex,
29 pdftitle={The LyX Tutorial},pdfsubject={LyX-documentation Tutorial},
30 pdfkeywords={LyX, documentation}]{hyperref}
32 \else % if dvi or ps is produced
34 % link all cross references and URLs in dvi output
35 \usepackage[ps2pdf]{hyperref}
37 \fi % end if pdflatex is used
39 % the pages of the TOC are numbered roman
40 % and a pdf-bookmark for the TOC is added
42 \let\myTOC\tableofcontents
43 \renewcommand\tableofcontents{%
44 \pdfbookmark[1]{Contents}{}
47 \pagenumbering{arabic} }
49 % redefine the \LyX macro for PDF bookmarks
50 \def\LyX{\texorpdfstring{%
51 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
58 \font_typewriter default
59 \font_default_family default
73 \paperorientation portrait
76 \paragraph_separation indent
78 \quotes_language english
81 \paperpagestyle headings
82 \tracking_changes false
99 \begin_layout Standard
100 If you have comments or error corrections, please send them to the LyX Documenta
103 lyx-docs@lists.lyx.org
113 \begin_layout Standard
114 \begin_inset LatexCommand tableofcontents
121 \begin_layout Standard
122 \begin_inset Note Note
125 \begin_layout Standard
126 The latest PDF-version of this document can be found here:
130 http://wiki.lyx.org/LyX/DocumentationDevelopment#Tutorial
138 \begin_layout Chapter
142 \begin_layout Section
146 \begin_layout Standard
147 This file is designed for all of you who have never heard of LaTeX, or don't
149 Now, don't panic - you won't need to learn LaTeX to use LyX.
150 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
152 There are some things you will need to learn, however, in order to use
156 \begin_layout Standard
157 Some of you probably found your way to this document because you tried to
158 put two spaces after a
159 \begin_inset Quotes eld
163 \begin_inset Quotes erd
166 or tried to put 3 blank lines between paragraphs.
167 You found out you couldn't and in fact, you'll find out that most of the
168 little tricks you're accustomed to use in other word processors won't work
170 That's because most word processors you've used before allow you to manually
171 enter all spacings, font changes, and so on.
172 So you end up not only writing a document but typesetting it, too.
173 LyX does the typesetting for you, in a consistent fashion, letting you
174 focus on the important things, like the content of your writing.
177 \begin_layout Standard
178 So read on to learn more about LyX.
179 Reading this tutorial is definitely worth the time.
182 \begin_layout Section
192 \begin_layout Standard
193 Before we get started with this section, we want to make a quick note of
199 uses the notation outlined in the
204 If you came to this manual first, please read the
208 before you continue with the
215 \begin_layout Standard
216 Now that you know which fonts mean what, we want to talk a bit about what
224 \begin_layout Subsection
225 Getting the most out of the Tutorial
228 \begin_layout Standard
229 This tutorial consists of examples and exercises.
230 To get the most out of this document, you should read through the document,
231 typing all the little things we're telling you to type and trying out all
232 of the exercises to see if you get them right.
233 For convenience, you might want to print out the PDF version of this document.
236 \begin_layout Standard
237 If you are familiar with LaTeX, you'll probably be able to read the
241 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
242 However, LyX have features you'll want to learn about.
243 Even if you don't feel like reading the rest of the
247 , you should definitely check out Section\InsetSpace ~
249 \begin_inset LatexCommand ref
250 reference "sec:latexusers"
254 , which is specifically written for experienced LaTeX users.
257 \begin_layout Subsection
265 \begin_layout Itemize
266 Detailed explanations of all of LyX's features.
270 \begin_layout Standard
279 \begin_layout Itemize
280 Detailed explanations of LaTeX.
284 \begin_layout Standard
286 If you want to learn some of the neat tricks you can do with LaTeX in LyX,
287 you can have a look at the
289 Embedded\InsetSpace ~
296 \begin_layout Standard
297 It's time to move onwards, time for your first document \SpecialChar \ldots{}
301 \begin_layout Chapter
302 Getting started with LyX
305 \begin_layout Section
306 Your first LyX document
307 \begin_inset LatexCommand label
308 name "sec:Your-first-LyX"
315 \begin_layout Standard
317 You're ready to start writing.
318 Before you do, there are a few things we need to mention, which will hopefully
319 make the Tutorial more instructive and useful.
323 \begin_layout Standard
324 Because there are informations we can't give you in the Tutorial, the
330 thing that you need to do is find the
337 Start up LyX, Choose the
346 You may want to load the
350 as well (if you're not reading it within LyX already).
351 This way, you can read them while you're writing your own file.
355 \begin_layout Standard
356 They can also serve as good examples of how to use the many features of
362 Note that once you've got more than one document open, you can use the
367 menu or the document tabs to switch between them.
370 \begin_layout Standard
371 In this Tutorial, we're going to assume that you have a fully working version
372 of LyX, as well as a LaTeX-distribution, a DVI-, and a PDF-viewer.
373 This should be the case on all major Linux- and BSD-distribution, as well
374 as on Windows, where this is setup by the LyX installer.
377 \begin_layout Standard
378 Finally, we've written a file to let you practice your LyX skills on, it's
384 Imagine that it was typed by someone who didn't know about any of LyX's
386 As you learn new LyX functions, we'll suggest that you fix those parts
393 \begin_inset Quotes eld
397 \begin_inset Quotes erd
400 hints about how to fix things
404 \begin_layout Standard
405 The hints are located in yellow
406 \begin_inset Quotes eld
410 \begin_inset Quotes erd
414 Access the text in a note by clicking on it.
420 If you want to cheat, or check what you've done, there's also a file called
425 which contains the same text written and typeset by a LyX master.
428 \begin_layout Standard
429 The example files can be found in the
433 directory of LyX's installation folder.
434 Open the raw document, and use
436 File\SpecialChar \menuseparator
440 to save a copy in your own directory for you to work on.
441 As you fix parts of the raw document, check to see how those changes affect
445 \begin_layout Standard
450 directory contains lots of other examples files.
451 They will show you how to do various fancy things with LyX.
452 After you read the Tutorial, or when you're confused about how to do something
453 fancy in LyX, take a look at these files.
456 \begin_layout Subsection
457 Typing, Viewing, and Exporting
460 \begin_layout Itemize
463 File\SpecialChar \menuseparator
467 \begin_layout Itemize
468 Type a sentence like:
470 This is my first LyX document!
473 \begin_layout Itemize
474 Save your document with
476 File\SpecialChar \menuseparator
482 \begin_layout Itemize
483 Run LaTeX to create a DVI file, with
485 View\SpecialChar \menuseparator
488 or the toolbar button
489 \begin_inset Graphics
490 filename ../images/buffer-view_dvi.png
496 LyX will open a DVI-viewer program displaying your document looking like
501 \begin_layout Standard
502 You can save time by leaving the DVI-viewer running in the background.
505 View\SpecialChar \menuseparator
506 Update\SpecialChar \menuseparator
509 or the toolbar button
510 \begin_inset Graphics
511 filename ../images/buffer-update_dvi.png
516 and just click on the DVI-viewer window (or unminimize it) after LaTeX
525 \begin_layout Itemize
526 Export the ready to print document with
528 File\SpecialChar \menuseparator
536 \begin_layout Standard
537 Congratulations! You've written your first LyX document.
538 All of the rest is just details, which is covered in the other manuals.
541 \begin_layout Subsection
545 \begin_layout Standard
546 LyX can of course do most of the things you're used to do with a word processor.
547 It will word-wrap and indent paragraphs automatically.
548 Here's a quick description of how to do some simple actions.
551 \begin_layout Description
552 Undo LyX has multiple levels of undo, which means you can undo everything
553 you've done since your current editing session started, by selecting
555 Edit\SpecialChar \menuseparator
559 \begin_inset Graphics
560 filename ../images/undo.png
565 ) over and over again.
566 If you undo too much, just select
568 Edit\SpecialChar \menuseparator
572 \begin_inset Graphics
573 filename ../images/redo.png
583 \begin_layout Standard
584 Currently, undo is limited to 100 steps.
585 Undo also doesn't work for
589 ; for instance, not for changes to the document layout what is really a
594 \begin_layout Description
597 Edit\SpecialChar \menuseparator
601 \begin_inset Graphics
602 filename ../images/cut.png
609 Edit\SpecialChar \menuseparator
613 \begin_inset Graphics
614 filename ../images/copy.png
621 Edit\SpecialChar \menuseparator
625 \begin_inset Graphics
626 filename ../images/paste.png
631 ) to cut, copy, and paste.
632 Or automatically paste selected text (including selections from other programs)
640 \begin_layout Description
643 Edit\SpecialChar \menuseparator
649 \begin_inset Graphics
650 filename ../images/dialog-show_findreplace.png
656 In the dialog, search with the
665 button to replace a word you've found
669 \begin_layout Standard
670 Close the window when you're done or leave it open if you find it more convenien
672 Most dialog boxes in LyX can operate like this.
673 Just be sure you have the right window focus when you're trying to type
674 in the main LyX window or a LyX dialog.
680 If you like, you can specify whether to make the search case-sensitive,
681 or to search for only complete words; you can also search backwards through
685 \begin_layout Description
686 Character\InsetSpace ~
691 text (which will by default print characters in italics), set it in
699 (usually small caps, used for people's names) from the toggle buttons in
702 Edit\SpecialChar \menuseparator
706 dialog (toolbar button
707 \begin_inset Graphics
708 filename ../images/dialog-show_character.png
716 \begin_layout Description
717 Toolbar There are buttons on the toolbar (just below the menus) which allow
718 you to do some of the more popular functions, such as
729 \begin_layout Standard
730 Of course, you haven't yet written enough to make most of these functions
732 As you write more, though, try undoing, pasting, etc.
735 \begin_layout Subsection
736 WYSIWYM: Whitespace in LyX
737 \begin_inset LatexCommand label
738 name "sec:whitespace"
745 \begin_layout Standard
746 One of the hardest things for new users to get used to is the way that LyX
748 As many times as you hit
752 , you'll only get one blank line.
753 As many times as you hit
757 , you'll only get one space.
758 On a blank line, LyX won't let you type even one space.
763 key won't move you forward one tab stop; in fact there
767 no tab stops! There's no ruler at the top of the page to let you set tabs
771 \begin_layout Standard
772 Many commercial word processors are based on the WYSIWYG principle:
773 \begin_inset Quotes eld
776 What You See Is What You Get.
777 \begin_inset Quotes erd
780 LyX, on the other hand, is based on the principle that
781 \begin_inset Quotes eld
784 What You See Is What You
789 \begin_inset Quotes erd
792 You type what you mean, and LyX will take care of typesetting it for you,
793 so that the output looks nice.
798 grammatically separates paragraphs, and a
802 grammatically separates words, so there is no reason to have several of
807 has no grammatical function at all, so LyX does not support it.
808 Using LyX, you'll spend more of your time worrying about the
812 of your document, and less time worrying about the
821 for more information on the WYSIWYM concept.
824 \begin_layout Standard
825 LyX does have (many) ways to fine-tune the formatting of your document.
826 After all, LyX might not typeset
835 has information about all that.
840 s and vertical space --- which are more powerful and versatile than multiple
841 spaces or blank lines --- and ways to change font sizes, character styles,
842 and paragraph alignments by hand.
843 The idea, though, is that you can write your whole document, focusing on
844 content, and just worry about that fine-tuning at the end.
845 With standard word processors, you'll be distracted by document formatting
846 throughout the writing process.
849 \begin_layout Section
853 \begin_layout Standard
854 Different parts of a document have different purposes; we call these parts
860 Most of a document is made up of regular text.
861 Section titles (chapter, subsection, etc.) let the reader know that a new
862 topic or subtopic will be discussed.
863 Certain types of documents have special environments.
864 A journal article will have an abstract and a title.
865 A letter will have neither of these, but will probably have an environment
866 that gives the writer's address.
869 \begin_layout Standard
870 Environments are a major part of the
871 \begin_inset Quotes eld
874 What You See Is What You Mean
875 \begin_inset Quotes erd
879 A given environment may require a certain font style, font size, indenting,
880 line spacing, and more.
881 This problem is aggravated, because the exact formatting for a given environmen
882 t may change: one journal may use boldface, 18 point, centered type for
883 section titles while another uses italicized, 15 point, left justified
884 type; different languages may have different standards for indenting; and
885 bibliography formats can vary widely.
886 LyX lets you avoid learning all the different formatting styles.
889 \begin_layout Standard
894 choice box is located on the left end of the toolbar and looks like this:
896 \begin_inset Graphics
897 filename clipart/ToolbarEnvBox.png
904 It indicates which environment you're currently writing in.
905 While you were writing your first document, it said
906 \begin_inset Quotes eld
910 \begin_inset Quotes erd
913 which is the default environment for text.
914 Now you will put a number of environments in your new document so that
915 you can see how they work.
918 \begin_layout Subsection
919 Sections and Subsections
922 \begin_layout Standard
927 on the first line of your LyX file, and select
939 \begin_layout Standard
945 If nothing is selected, LyX changes the paragraph you are currently in
946 to the selected environment.
947 Alternatively, you can change several paragraphs to a different environment
948 by selecting them before picking an environment.
965 , which will be covered below.
966 LyX numbers the section
967 \begin_inset Quotes eld
971 \begin_inset Quotes erd
974 and typesets the section heading (title) in a larger font.
985 \begin_inset Quotes eld
989 \begin_inset Quotes erd
993 \begin_inset Quotes eld
997 \begin_inset Quotes erd
1001 Section headings, like most environments, are assumed to end when you type
1007 Type the document introduction:
1010 \begin_layout LyX-Code
1011 This is an introduction to my first LyX document.
1014 \begin_layout Standard
1029 \begin_inset Quotes eld
1033 \begin_inset Quotes erd
1036 and waits for you to type a title.
1038 \begin_inset Quotes eld
1047 \begin_inset Quotes erd
1050 , and you'll see that LyX again sets it as a section title.
1053 \begin_layout Standard
1055 Go to the end of Section\InsetSpace ~
1057 \begin_inset Quotes eld
1060 my first LyX document
1061 \begin_inset Quotes erd
1078 \begin_inset Quotes eld
1082 \begin_inset Quotes erd
1085 and waits for you to type a title.
1091 Section\InsetSpace ~
1093 \begin_inset Quotes eld
1097 \begin_inset Quotes erd
1100 , which used to be Section\InsetSpace ~
1101 2, has been automatically renumbered to Section\InsetSpace ~
1103 In true WYSIWYM fashion, you just need to identify the text that makes
1104 up the section titles, and LyX takes care of numbering the sections and
1108 \begin_layout Standard
1117 environment, and type the following five lines:
1120 \begin_layout LyX-Code
1121 Sections and subsections are described below.
1124 \begin_layout LyX-Code
1128 \begin_layout LyX-Code
1129 Sections are bigger than subsections.
1132 \begin_layout LyX-Code
1133 Subsection description
1136 \begin_layout LyX-Code
1137 Subsections are smaller than sections.
1140 \begin_layout Standard
1141 Click on the second line and select
1150 LyX numbers the subsection
1151 \begin_inset Quotes eld
1155 \begin_inset Quotes erd
1158 , and typesets it in a font which is bigger than regular text but smaller
1159 than the section title.
1160 Change the fourth line
1164 environment as well.
1165 As you probably expected, LyX automatically numbered the section
1166 \begin_inset Quotes eld
1170 \begin_inset Quotes erd
1174 If you put yet another section before Section\InsetSpace ~
1175 2, Section\InsetSpace ~
1176 2 will be renumbered
1177 as Section 3, and the subsections will be renumbered to
1178 \begin_inset Quotes eld
1182 \begin_inset Quotes erd
1186 \begin_inset Quotes eld
1190 \begin_inset Quotes erd
1197 \begin_layout Standard
1198 Further levels of sectioning include
1211 We'll let you play with these on your own.
1212 You may notice that paragraph and subparagraph headings are not numbered
1213 by default, and that subparagraphs are indented; see the
1217 for an explanation and how to change this.
1222 headings are actually the highest level of sectioning, above
1226 s, but you're only allowed to use them in certain types (text classes) of
1227 LyX documents (see Section\InsetSpace ~
1229 \begin_inset LatexCommand ref
1230 reference "sec:Document-Classes"
1238 \begin_layout Standard
1239 Finally, you may want to have sections or subsections that are not numbered.
1240 There are environments for this as well.
1241 If you change one of your section headings to the
1245 environment (you may have to scroll down in the
1249 box to find it), LyX will use the same font size for the heading as it
1250 uses for a regular section, but it won't number that section.
1251 There are corresponding
1252 \begin_inset Quotes eld
1256 \begin_inset Quotes erd
1259 heading environments for
1268 Try changing some of your sections or subsections to the starred environments,
1269 and note how the other sections' numbers are updated.
1272 \begin_layout Standard
1277 : Fix the section and subsection headings in
1285 \begin_layout Subsection
1289 \begin_layout Standard
1290 LyX has several different environments for typesetting lists.
1291 The various list environments free you from hitting
1295 a million times when writing an outline, or from renumbering a whole list
1296 when you want to add a point in the middle of the list.
1297 Different types of documents logically require different list environments:
1300 \begin_layout Itemize
1301 A slide presentation might use the
1305 environment's bulleted lists to describe different points.
1309 \begin_layout Itemize
1310 An outline would use the
1314 environment's numbered lists (and lettered sublists).
1318 \begin_layout Itemize
1319 A document describing several software packages could use the
1323 environment, where each item in the list begins with a bold-faced word.
1327 \begin_layout Itemize
1332 environment --- not found in LaTeX --- is a slightly different form of
1340 \begin_layout Standard
1341 Let's write a list of reasons why LyX is better than other word processors.
1342 Somewhere in your document, type:
1345 \begin_layout Standard
1348 LyX is better than other word processors because:
1351 \begin_layout Standard
1367 \begin_inset Quotes eld
1371 \begin_inset Quotes erd
1375 Type in your reasons:
1378 \begin_layout LyX-Code
1379 Typesetting is done for you.
1382 \begin_layout LyX-Code
1386 \begin_layout LyX-Code
1387 Lists are very easy to create!
1390 \begin_layout Standard
1391 List environments, unlike headings, do not end when you type
1396 Instead, LyX assumes you're going on to the next item in the list.
1397 The above will therefore result in a three-item list.
1398 If you want more than one paragraph within one list
1402 , one way is to use the
1404 Protected\InsetSpace ~
1407 , which you get by typing
1412 In order to get out of the list, you need to reselect the
1416 environment (or just use the keybinding,
1424 \begin_layout Standard
1425 You've got a beautiful itemized list.
1426 You might want to run LaTeX to see how the list looks when printed out.
1427 But what if you wanted to number the reasons? Well, just select the whole
1432 \begin_layout Standard
1433 LyX won't let you select the first bullet unless you also select the paragraph
1438 the list, which you probably don't want to do.
1439 Similarly, you can't select the actual number in a numbered section title.
1440 This is on purpose because the bullet or number depends on the document
1441 settings or text position, respectively.
1455 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1459 \begin_layout Standard
1460 While the list is still selected, you can change to the other two list environme
1469 , in order to see what they look like.
1470 For those two environments, each list item is made up of a term, which
1471 is the item's first word, followed by a definition, which is the rest of
1472 the paragraph (until you hit
1476 .) The term is either typeset in boldface (
1481 \begin_inset Quotes eld
1485 \begin_inset Quotes erd
1492 \begin_layout Standard
1493 But a typesetter's tab, which will change to fit the size of the largest
1494 term, not a pathetic, rigid, unchangeable typewriter
1507 ) from the rest of the paragraph.
1508 If you want to have more than one word in the definition, then separate
1511 Protected\InsetSpace ~
1517 \begin_layout Standard
1522 : Typeset the list in
1527 \begin_layout Standard
1528 You can nest lists within each other in all sorts of interesting ways.
1529 An obvious example would be writing outlines.
1530 Numbered and bulleted lists will have different numbering and bulleting
1531 schemes for sublists.
1536 for details on the different sorts of lists and for examples of nestings.
1539 \begin_layout Subsection
1540 Other environments: Verses, Quotations, and more
1543 \begin_layout Standard
1544 There are two environments for setting quotations apart from surrounding
1549 for short quotes and
1562 \begin_layout Standard
1563 used in this Tutorial for the long typing examples
1572 font; this environment is the only place in LyX where you're allowed to
1573 use multiple spaces to allow code indenting.
1574 You can even write poetry using the
1582 to separate stanzas, and
1586 to separate lines within a stanza.
1591 for more complete descriptions of all of the available LyX environments.
1594 \begin_layout Standard
1599 : Correctly typeset the
1614 \begin_layout Chapter
1618 \begin_layout Standard
1619 The previous chapter hopefully allowed you to get used to writing in LyX.
1620 It introduced you to the basic editing operations in LyX, as well as the
1621 powerful method of writing with environments.
1622 Most people who use LyX, though, will want to write documents: papers,
1623 articles, books, manuals, or letters.
1624 This chapter is meant to take you from simply writing text with LyX to
1625 writing a complete document.
1626 It will introduce you to text classes, which allow you to write different
1628 It will then describe many of the additions that turn text into a document,
1629 such as titles, footnotes, cross references, bibliographies, and tables
1633 \begin_layout Section
1635 \begin_inset LatexCommand label
1636 name "sec:Document-Classes"
1643 \begin_layout Standard
1644 Different sorts of documents should be typeset differently.
1645 For example, books are generally printed double-sided, while articles are
1647 In addition, many documents contain special environments: letters contain
1648 some environments --- such as the sender's address and the signature ---
1649 which do not make sense in a book or article.
1658 \begin_layout Standard
1659 for LaTeX users: this is equivalent to the LaTeX document class
1664 takes care of these large scale differences between different sorts of
1666 This Tutorial, for example, was written in the
1671 Document classes are another major part of the WYSIWYM philosophy; they
1672 tell LyX how to typeset the document, so you don't need to know how.
1675 \begin_layout Standard
1676 Your document is probably being written in the
1684 \begin_layout Standard
1685 That's usually the default document class
1690 Try changing to other document classes (using the
1692 Document\SpecialChar \menuseparator
1695 dialog) to see how they are typeset differently.
1696 If you change your document to the
1700 document class and look at the
1704 box, you'll see that most of the allowed environments are the same.
1705 However, you can now use the
1710 If you are ever unsure about which environments you can use in a given
1711 document class, just consult the
1718 \begin_layout Standard
1719 Font sizes, one- or two-column printing, and page headings are just some
1720 of the ways journals' typesettings differ from one another.
1721 As the Computer Age continues to mature, journals have begun accepting
1722 electronic submissions, creating LaTeX
1723 \begin_inset Quotes eld
1727 \begin_inset Quotes erd
1730 so that authors can submit correctly typeset articles.
1731 LyX is set up to support this as well.
1732 For example, LyX supports typesetting (and extra environments) for the
1733 American Mathematics Society journals using the
1735 Article\InsetSpace ~
1741 \begin_layout Standard
1742 Here is a very quick reference to some of the document classes.
1745 Special Document Classes
1751 manual for many more details.
1754 \begin_layout Standard
1756 \begin_inset Tabular
1757 <lyxtabular version="3" rows="7" columns="2">
1759 <column alignment="center" valignment="top" leftline="true" width="0pt">
1760 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
1761 <row topline="true" bottomline="true">
1762 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1765 \begin_layout Standard
1771 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1774 \begin_layout Standard
1781 <row topline="true">
1782 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1785 \begin_layout Standard
1791 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1794 \begin_layout Standard
1795 one-sided, no chapters
1801 <row topline="true">
1802 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1805 \begin_layout Standard
1811 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1814 \begin_layout Standard
1815 layout & environments for American Math Society
1821 <row topline="true">
1822 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1825 \begin_layout Standard
1831 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1834 \begin_layout Standard
1835 longer than article, two-sided
1841 <row topline="true" bottomline="true">
1842 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1845 \begin_layout Standard
1851 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1854 \begin_layout Standard
1855 report + front and back matter
1861 <row bottomline="true">
1862 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1865 \begin_layout Standard
1871 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1874 \begin_layout Standard
1881 <row bottomline="true">
1882 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1885 \begin_layout Standard
1891 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1894 \begin_layout Standard
1895 lots of extra environments for address, signature\SpecialChar \ldots{}
1909 \begin_layout Section
1910 Templates: Writing a Letter
1913 \begin_layout Standard
1914 One way to write a letter would be to open a new file, and choose a
1920 Document\SpecialChar \menuseparator
1924 While this is the most obvious way to write a letter, it seems like extra
1926 Every time you write a business letter, you want to have your address,
1927 the address you're sending to, a body, a signature, etc.
1932 for letters, which contains a sample letter; once you have a template,
1933 you can just replace a couple parts of the letter with your text each time
1937 \begin_layout Standard
1938 Open a new file with
1940 File\SpecialChar \menuseparator
1951 Save and print the file to see how the various environments are typeset.
1954 \begin_layout Standard
1955 When you look at the
1959 box, you'll see several environments, like the
1964 environment, which don't even exist in most other document classes.
1974 You can play around for a while to figure out how the various environments
1976 You'll notice for example that the
1980 environment has the word
1981 \begin_inset Quotes eld
1985 \begin_inset Quotes eld
1988 in red before the actual text of the signature.
1989 This word doesn't show up in the actual letter, as you'll see if you view/expor
1991 It's just there to let you know where the signature goes.
1992 Also, note that it doesn't matter where in the file the
1997 Remember, LyX is WYSIWYM; you can put the
2001 environment anywhere you want, but LyX knows that in the printout, the
2002 signature should be at the end.
2005 \begin_layout Standard
2006 A template is just a regular LyX file.
2007 This means you can fill in your address and signature and save the file
2009 From now on, any time you want to write a letter, you can use the new template
2011 We don't have to suggest an actual
2012 \begin_inset Quotes eld
2016 \begin_inset Quotes erd
2019 here; just write a letter to someone!
2023 \begin_layout Standard
2024 One warning, if you're writing from a template.
2025 If you erase all of the text in an environment --- for example, if you
2031 field so that you can replace it with your own --- and then you move the
2032 cursor without writing any text, the environment may disappear.
2033 This is because most environments cannot exist without any text in them.
2034 Just reselect the environment from the
2046 \begin_layout Standard
2047 Templates can be a huge time-saver, and we urge you to use them whenever
2049 In addition, they can help a person learn how to use some of the fancier
2051 Finally, they may be useful for a person who is configuring LyX for a bunch
2052 of less computer-aware users.
2053 When they're first learning LyX, it will be much less intimidating if they
2054 have a letter template customized for their company, for example.
2057 \begin_layout Section
2061 \begin_layout Standard
2062 LyX (like LaTeX) considers the title --- which may contain the actual title,
2063 the author, the date, and even an abstract of a paper --- to be a separate
2064 part of the document.
2067 \begin_layout Standard
2068 Go back to your LyX document and make sure it's using the
2076 \begin_layout Standard
2077 You should not be using the letter any more, since the
2081 document class doesn't allow titles.
2086 Type a title on the first line, and change the line to the
2091 On the next line, type your name and change it to the
2096 On the next line, write the date in the
2101 Type a paragraph or two summarizing your document using the
2106 Notice how the title is presented when it's printed out.
2107 If you changed the document format to Book, you'll get a separate title
2108 page, like the first page of this tutorial.
2111 \begin_layout Standard
2116 : Fix the title, date, and author in
2121 \begin_layout Section
2122 Labels and Cross-References
2123 \begin_inset LatexCommand label
2131 \begin_layout Standard
2132 You can label section headings, list items, formulas, footnotes, and floats
2136 \begin_layout Standard
2137 Floats are explained in the
2151 Once you do so, you can refer to this section in other parts of the document,
2152 using cross-references.
2153 You can refer either to the section's number, or to the page that the section
2155 As with section numbering, LyX also takes care about cross-reference numbering
2157 Automatic labels and cross-references are one of the best advantages of
2158 LyX (and LaTeX) over conventional word processors.
2161 \begin_layout Subsection*
2165 \begin_layout Standard
2166 Go to our second section, whose title is
2167 \begin_inset Quotes eld
2171 \begin_inset Quotes erd
2175 Click at the end of the section title line, and select
2177 Insert\SpecialChar \menuseparator
2180 or the toolbar button
2181 \begin_inset Graphics
2182 filename ../images/label-insert.png
2189 A dialog asks you for a label name, and gives you a suggestion.
2194 , the label name will be placed in a box next to the section title.
2197 \begin_layout Standard
2198 By the way, you could have put the label right anywhere within the section
2199 as well; section references will refer to the last section or subsection
2200 whose heading comes before the label.
2201 However, putting it on the same line as the section title (or, perhaps,
2202 on the first line of the section's text) ensures that page references will
2203 reference the beginning of the section.
2206 \begin_layout Standard
2207 So far you haven't done anything --- the DVI output will look exactly the
2208 same, since labels don't show up in the printed document.
2209 However, now that you have added a label, you can refer to that label with
2214 \begin_layout Subsection*
2215 Your first cross-reference
2218 \begin_layout Standard
2219 Place the cursor somewhere in Section\InsetSpace ~
2224 \begin_layout LyX-Code
2225 If you want to know more about this document, then see
2231 \begin_layout Standard
2232 Now --- with the cursor after the word
2233 \begin_inset Quotes eld
2237 \begin_inset Quotes erd
2242 Insert\SpecialChar \menuseparator
2246 or the toolbar button
2247 \begin_inset Graphics
2248 filename ../images/dialog-show-new-inset_ref.png
2260 It shows a list of the possible labels you can reference.
2261 At the moment, there should be only one,
2262 \begin_inset Quotes eld
2265 sec:About-This-Document
2266 \begin_inset Quotes erd
2270 Select it (it may be selected by default), and click
2275 Now put the cursor after the word
2276 \begin_inset Quotes eld
2280 \begin_inset Quotes erd
2283 , and change the reference format to use the page number then click
2288 (To be really correct, you should put a
2290 Protected\InsetSpace ~
2294 \begin_inset Quotes eld
2298 \begin_inset Quotes erd
2302 Same for the page reference.)
2305 \begin_layout Standard
2306 LyX puts the references in a box right where the cursor was.
2307 In the printed document, this reference marker will be replaced with either
2308 the page or section number (depending on what you selected in the
2313 View your document as DVI, and you'll see that on the last page we refer
2315 \begin_inset Quotes eld
2318 Section\InsetSpace ~
2320 \begin_inset Quotes erd
2324 \begin_inset Quotes eld
2329 \begin_inset Quotes erd
2332 (or whatever page Section\InsetSpace ~
2336 \begin_layout Standard
2337 Conveniently, a cross-reference acts as a hyperlink when you are editing
2338 a document in LyX; clicking on it will pop up the
2348 will move the cursor to the referenced label.
2351 \begin_layout Subsection*
2352 More fun with labels
2355 \begin_layout Standard
2356 We told you that LyX takes care about numbering cross-references; now you
2358 Add a new section before Section\InsetSpace ~
2360 Update the DVI view, and --- voilà ! --- the section cross reference changed
2362 \begin_inset Quotes eld
2366 \begin_inset Quotes erd
2369 ! Change the section
2370 \begin_inset Quotes eld
2374 \begin_inset Quotes erd
2377 to a subsection, and the cross-reference will reference Subsection\InsetSpace ~
2379 of Section\InsetSpace ~
2381 The page reference won't change unless you add a whole page of text before
2382 the label, of course.
2386 \begin_layout Standard
2387 If you want some more practice with labels, then try putting a new label
2388 where your first cross-reference was, and refer to that label from elsewhere
2390 If you'll be inserting cross-references often, it may be convenient to
2398 \begin_layout Standard
2399 If you want to make sure that the cross-referencing gets the pages right
2400 even for larger documents,
2404 a couple pages of text from the
2408 to the clipboard, and
2412 the stolen text into your document.
2416 \begin_layout Standard
2417 By the way, copying a chapter title may cause an error, because chapters
2418 aren't allowed in the article class, see section\InsetSpace ~
2420 \begin_inset LatexCommand ref
2421 reference "sec:Document-Classes"
2426 If this happens, just delete the chapter title.
2434 \begin_layout Standard
2439 : Fix the references in
2444 \begin_layout Section
2445 Footnotes and Margin Notes
2448 \begin_layout Standard
2449 Footnotes can be added using the toolbar button
2450 \begin_inset Graphics
2451 filename ../images/footnote-insert.png
2459 Insert\SpecialChar \menuseparator
2463 Click at the end of the word
2464 \begin_inset Quotes eld
2468 \begin_inset Quotes erd
2471 somewhere in your document and click the
2472 \begin_inset Graphics
2473 filename ../images/footnote-insert.png
2480 A footnote box appears where you can enter the text of the footnote.
2481 LyX should place the cursor at the beginning of the footnote box.
2485 \begin_layout LyX-Code
2486 LyX is a typesetting word processor.
2489 \begin_layout Standard
2490 Now click on the button labelled
2491 \begin_inset Quotes eld
2495 \begin_inset Quotes erd
2499 The footnote box is closed, leaving the button showing where the footnote
2500 marker will be in the printed text; this is called
2501 \begin_inset Quotes eld
2505 \begin_inset Quotes erd
2509 You can unfold the footnote at any time --- and re-edit its text, if you
2510 want --- by clicking again on the
2511 \begin_inset Quotes eld
2515 \begin_inset Quotes erd
2521 \begin_layout Standard
2522 You may wonder why the footnote button is a word instead of a number.
2523 The answer is that LyX takes care about the footnote numbering for you
2524 in the printed text.
2525 You can see this yourself by looking at the DVI file (or printout).
2526 If you add other footnotes, LyX will renumber the footnotes.
2527 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2528 there's really no need to put the numbers in the LyX file.
2531 \begin_layout Standard
2532 A footnote can be cut and pasted like normal text.
2533 Go ahead; try it! All you need to do is select the footnote button
2537 \begin_layout Standard
2538 It may be easier to select it using the keyboard.
2539 You might accidentally open the footnote if you're trying to select the
2540 marker itself with the mouse.
2554 In addition, you can change regular text to a footnote, by selecting it
2556 \begin_inset Graphics
2557 filename ../images/footnote-insert.png
2563 button; change a footnote to regular text by hitting the
2567 key when the cursor is in the first position of a footnote, or by hitting
2572 key when the cursor is in the very last position of the footnote, respectively.
2575 \begin_layout Standard
2576 Margin notes can be added using the menu
2578 Insert\SpecialChar \menuseparator
2579 Marginal\InsetSpace ~
2582 or the toolbar button
2583 \begin_inset Graphics
2584 filename ../images/marginalnote-insert.png
2591 Margin notes are like footnotes, except that:
2594 \begin_layout Itemize
2595 the on-screen boxes say
2596 \begin_inset Quotes eld
2600 \begin_inset Quotes erd
2604 \begin_inset Quotes eld
2608 \begin_inset Quotes erd
2614 \begin_layout Itemize
2615 the notes will be placed in the margin, instead of below the text
2618 \begin_layout Itemize
2619 margin notes are not numbered
2622 \begin_layout Standard
2623 Change your LyX footnote back to text, then select and change it to a margin
2625 Run LaTeX again to see what the margin note looks like.
2628 \begin_layout Standard
2633 : Fix the footnote in
2638 \begin_layout Section
2640 \begin_inset LatexCommand label
2641 name "sec:bibliographies"
2648 \begin_layout Standard
2649 Bibliographies (at least in the exact sciences) are similar to cross references.
2650 The bibliography contains a list of references at the end of the document,
2651 and they can be referenced from within the document.
2652 Like section titles, LyX and LaTeX make your job easier by automatically
2653 numbering the bibliography items and changing citations when the item numbers
2657 \begin_layout Standard
2658 Go to the end of the document and switch to the
2663 Now, each paragraph you type will be a reference.
2665 \begin_inset Quotes eld
2670 The Lyx Tutorial, by the LyX Documentation Team
2673 \begin_inset Quotes erd
2676 as your first reference.
2677 Note that LyX automatically puts a number in a box before each reference.
2678 Click on the boxed reference number, and the
2680 Bibliography\InsetSpace ~
2688 is to refer to this reference within the LyX document, the
2697 is set (default), you will see the number of the bibliography in the output.
2703 \begin_inset Quotes eld
2707 \begin_inset Quotes erd
2710 to make it easy to remember.
2713 \begin_layout Standard
2714 Now pick somewhere in your document that you would like to insert a reference.
2717 Insert\SpecialChar \menuseparator
2720 or the toolbar button
2721 \begin_inset Graphics
2722 filename ../images/dialog-show-new-inset_citation.png
2734 The right panel in this dialog lists all the bibliography entries, and
2735 this field allows you to choose which bibliography item you want to cite.
2737 \begin_inset Quotes eld
2741 \begin_inset Quotes erd
2744 (right now, that's the only item in the bibliography), then use the
2748 button in the center to insert it.
2749 (You can have multiple citations in the same place by transferring a number
2750 of keys this way.) Now view your file as DVI, and you'll see that the citation
2751 appears in brackets in the text, referring to the bibliography at the end
2755 \begin_layout Standard
2765 dialog will put a remark (such as a reference to a page or chapter within
2766 the referenced book or article) in the brackets after the reference.
2767 If you want the references to have labels instead of numbers in the printed
2768 output (for example, some journals would use
2769 \begin_inset Quotes eld
2773 \begin_inset Quotes erd
2776 to refer to a paper written by Smith in 1995), use the
2782 Bibliography\InsetSpace ~
2793 \begin_layout Standard
2798 Fix the bibliography and citation in
2803 \begin_layout Section
2807 \begin_layout Standard
2808 You may want to put a table of contents at the beginning of your document.
2809 LyX makes this very easy to do.
2814 after your document title and before your first section title and choose
2817 Insert\SpecialChar \menuseparator
2820 TOC\SpecialChar \menuseparator
2827 \begin_inset Quotes eld
2831 \begin_inset Quotes erd
2834 will appear in a button on the first line of the document.
2838 \begin_layout Standard
2839 This may not appear to be very useful.
2840 However, if you look at your DVI file, you will see that a table of contents
2841 has been generated, listing the various sections and subsections in your
2843 As usual, if you reorder sections or create new ones, you will see those
2844 changes in the DVI file when you update it.
2848 \begin_layout Standard
2849 The table of contents is not printed in the on-screen version of the document
2850 to keep the overview in your file.
2851 But you can display the table of contents in a separate window by clicking
2852 on the table of contents button, or by using
2854 Document\SpecialChar \menuseparator
2857 or the toolbar button
2858 \begin_inset Graphics
2859 filename ../images/dialog-toggle_toc.png
2866 This menu will work even if you don't have a table of contents inset in
2868 This is a very useful tool where you can move around your document parts.
2869 Clicking on a (sub)section title in the
2873 window will highlight that line and move the display (in the LyX editing
2874 window) to that place in the document.
2875 You can also use the arrow keys to move up and down in the table of contents.
2876 You may therefore find it convenient to leave this window open throughout
2878 You can get similar functionality from the
2882 menu, though, where the table of contents appears automatically.
2885 \begin_layout Standard
2886 To get rid of the Table of Contents, you can delete the table of contents
2887 button just like any other text.
2890 \begin_layout Standard
2895 : Fix the table of contents in
2900 \begin_layout Chapter
2904 \begin_layout Standard
2905 LaTeX is used by many scientists because it outputs great looking equations,
2906 avoiding the control characters used by word processors and their equation
2908 Many of these scientists are frustrated, however, because writing equations
2909 in LaTeX is more like programming than writing.
2910 Happily, LyX has WYSIWYM support for equations.
2911 If you are used to LaTeX, you'll find that all of the usual LaTeX math
2912 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
2913 If, on the other hand, you've never written in LaTeX, then the
2918 will allow you to write professional-looking math quickly and easily.
2921 \begin_layout Section
2925 \begin_layout Standard
2926 Somewhere in your LyX document, type:
2929 \begin_layout LyX-Code
2930 I like what Einstein said, E=mc^2, because it's so simple.
2934 \begin_layout Standard
2935 Now, that equation doesn't look very good in LyX and in the output; there's
2936 no space between the letters and the equals sign, and you'd like to write
2937 an actual superscript for the
2938 \begin_inset Quotes eld
2942 \begin_inset Quotes erd
2946 That bad typesetting happened because we didn't tell LyX that we were writing
2947 a mathematical expression, so it typeset the equation like regular old
2951 \begin_layout Standard
2952 Instead, we create a formula that will get typeset properly.
2953 In order to create a formula, just click the toolbar button
2954 \begin_inset Graphics
2955 filename ../images/math-mode.png
2963 Insert\SpecialChar \menuseparator
2964 Math\SpecialChar \menuseparator
2969 LyX will insert a little blue square, which is an empty math formula.
2975 The expression is typed in blue, and the blue square disappears as soon
2976 as the formula is not empty.
2981 to leave the equation The purple markers disappear, leaving the cursor
2982 to the right of the expression, and now if you type something, it will
2986 \begin_layout Standard
2987 Run LaTeX and look at the output.
2988 Notice that the expression was typeset nicely, with spaces between the
2989 letters and the equals sign, and a superscript
2990 \begin_inset Quotes eld
2994 \begin_inset Quotes erd
2998 Letters in math mode are assumed to be variables, and come out in italics.
2999 Numbers are just numbers.
3002 \begin_layout Standard
3003 This math editor is another example of the WYSIWYM philosophy.
3004 In LaTeX, you write a mathematical expression using text and commands like
3011 ; this can be frustrating, because you can't see what an expression looks
3012 like until you LaTeX the file, and may have to spend time to find e.\InsetSpace \thinspace{}
3016 LyX doesn't attempt to get the expression to look perfect (WYSIWYG), but
3017 it gives you an extremely good idea of what the expression will look like.
3018 LaTeX then takes care of the professional typesetting.
3021 \begin_layout Section
3022 Navigating an Equation
3025 \begin_layout Standard
3027 \begin_inset Formula $E=mc^{2}$
3031 \begin_inset Formula $E=1+mc^{2}$
3035 Use the arrow keys to move the cursor into the expression.
3036 Note that when you enter the expression, the purple markers appear to let
3037 you know you're editing math.
3046 to move the cursor past the equals sign, and just type
3047 \begin_inset Quotes eld
3051 \begin_inset Quotes erd
3055 Again, you can use the arrow keys or
3059 to leave the formula\SpecialChar \@.
3063 \begin_layout Standard
3064 Other than the special keys described below, typing in math mode is like
3065 editing regular text.
3075 Select text either with the arrow keys or with the mouse.
3078 Edit\SpecialChar \menuseparator
3081 works in math mode as well as cut and paste.
3082 One thing to be careful of: If you are left or right outside a formula
3091 , respectively, you delete the whole formula.
3092 Luckily, you can just use
3099 \begin_layout Standard
3100 What if you want to change
3101 \begin_inset Formula $E=mc^{2}$
3105 \begin_inset Formula $E=mc^{2.5}+1$
3108 ? Again, you can use the mouse to click in the right place.
3109 However, you can also use the arrow keys.
3110 If the cursor is just after the
3111 \begin_inset Quotes eld
3115 \begin_inset Quotes erd
3119 \begin_inset Quotes eld
3123 \begin_inset Quotes erd
3130 and the cursor is moved to the level of the superscript, just before the
3132 \begin_inset Quotes eld
3136 \begin_inset Quotes erd
3141 \begin_inset Quotes eld
3145 \begin_inset Quotes erd
3153 will move the cursor back to the regular level.
3162 , the cursor will be placed
3166 the superscript (so that you can then type the
3167 \begin_inset Quotes eld
3171 \begin_inset Quotes erd
3177 \begin_layout Section
3178 Exponents and Indices
3181 \begin_layout Standard
3182 An exponent can be entered from the
3187 (see below), but it's actually simpler just to type the caret key,
3188 \begin_inset Quotes eld
3192 \begin_inset Quotes erd
3196 LyX will place another blue rectangle in the superscript, so that whatever
3197 you write next will be superscripted, and in a smaller font size.
3198 Everything you type until you hit a
3206 to exit the formula entirely) will be in the superscript.
3209 \begin_layout Standard
3210 Writing a subscript (index) is just as easy --- start one by typing the
3212 \begin_inset Quotes eld
3216 \begin_inset Quotes eld
3220 You can subscript and superscript both subscripts and superscripts like
3222 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3229 \begin_layout Standard
3241 \begin_layout Section
3245 \begin_layout Standard
3251 is a convenient way to enter symbols or to perform complicated formula
3253 Many of these operations can be accomplished from the keyboard or the
3255 Edit\SpecialChar \menuseparator
3260 Insert\SpecialChar \menuseparator
3264 However, we're going to concentrate on using the
3269 , just to let you know what's out there; you can learn keyboard shortcuts
3270 later, from other manuals.
3273 \begin_layout Standard
3278 is shown when the cursor is in a formula and can also be turned on manually
3281 View\SpecialChar \menuseparator
3285 When you click there on
3286 \begin_inset Quotes eld
3290 \begin_inset Quotes erd
3293 the toolbar will be shown permanently at the bottom; this state is visualized
3298 menu with a checkmark.
3299 When you click in this state again on
3300 \begin_inset Quotes eld
3304 \begin_inset Quotes erd
3315 is only shown when the cursor is within a formula; this state is visualized
3316 by the renaming of the menu entry from
3317 \begin_inset Quotes eld
3321 \begin_inset Quotes erd
3325 \begin_inset Quotes eld
3330 \begin_inset Quotes erd
3336 \begin_layout Subsection
3340 \begin_layout Standard
3346 which allow you to choose from a large array of symbols used in math: various
3347 arrows, relations, operators, and sums and integrals.
3348 Note that subscripting and superscripting allow you to put lower and upper
3349 limits on sums and integrals.
3353 \begin_layout Standard
3354 \begin_inset Quotes eld
3357 Nothing you can do that can't be done\SpecialChar \ldots{}
3359 \begin_inset Formula $\heartsuit$
3363 \begin_inset Quotes erd
3369 \begin_layout Subsection
3370 Square roots, accents, and delimiters
3373 \begin_layout Standard
3374 To type a square root, just click on the button
3375 \begin_inset Graphics
3376 filename ../images/math/sqrt.png
3383 The square root appears, and the cursor is in a new insertion point inside
3385 You can type variables, numbers, other square roots, fractions, whatever
3387 LyX will automatically resize the square root to fit what's inside.
3390 \begin_layout Standard
3391 Accenting a character (
3392 \begin_inset Formula $\overrightarrow{v}$
3395 ) or group of characters (
3396 \begin_inset Formula $\overrightarrow{a+b}$
3399 ) is done the same way.
3400 Decorations are available from the toolbar via the button
3401 \begin_inset Graphics
3402 filename ../images/math/hat.png
3409 Click on a decoration, and LyX will insert that decoration with an insertion
3410 point under (or over) it.
3411 Just type what you want in the insertion point.
3412 There are two sets of decorations: those that resize with the text you
3413 type, and those that have fixed size, and are most appropriate for a single
3418 \begin_layout Standard
3419 Delimiters such as parentheses, brackets, and braces work similarly, but
3420 are a bit more complicated.
3421 Hit the delimiter button
3422 \begin_inset Graphics
3423 filename ../images/dialog-show_mathdelimiter.png
3434 Your current selection of delimiters is displayed in a box.
3435 It's a pair of parentheses by default, but you can choose a pair of braces,
3436 a brace and a parenthesis, or choose the empty square to have something
3438 \begin_inset Quotes eld
3442 \begin_inset Formula $a=\left\langle 7\right.$
3446 \begin_inset Quotes erd
3449 (the empty delimiter is displayed as a broken line in LyX, but won't show
3453 \begin_layout Standard
3454 If you're lazy, you can type actual parentheses in math mode, rather than
3460 However, those parentheses will be the same size as regular text, which
3461 will look bad if you have a big fraction or matrix inside the parentheses.
3462 So better use in this case one of the three delimiter buttons that insert
3463 directly e.\InsetSpace \thinspace{}
3465 a (\InsetSpace \thinspace{}
3469 \begin_layout Standard
3470 You can also put delimiters or a square root sign or a decoration on already
3471 existing formula parts.
3472 Select the portion of the formula that you want to adjust, and then click
3473 on the button you want from the
3479 Try using this to change Newton's second law from scalar to vector form
3481 \begin_inset Formula $f=ma$
3485 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3489 Once you've learned about matrices, this is how you'll put parentheses
3490 or brackets around them.
3493 \begin_layout Subsection
3497 \begin_layout Standard
3498 To create a fraction, click on the fraction button
3499 \begin_inset Graphics
3500 filename ../images/math/frac.png
3513 LyX writes two insertion points in a fraction.
3514 As you would expect, you can use arrow keys or the mouse to move around
3516 Click on the top square and type
3517 \begin_inset Quotes eld
3521 \begin_inset Quotes erd
3530 \begin_inset Quotes eld
3534 \begin_inset Quotes erd
3538 You've made a fraction! Of course you can type anything within each of
3539 the two boxes: variables with exponents, square roots, other fractions,
3544 \begin_layout Standard
3556 \begin_layout Subsection
3557 TeX mode: Limits, log, sin and others
3560 \begin_layout Standard
3561 Because letters in math mode are considered to be variables, if you type
3563 \begin_inset Quotes eld
3567 \begin_inset Quotes erd
3570 in math mode, LyX thinks you are typing the product of the three variables
3572 \begin_inset Formula $s$
3576 \begin_inset Formula $i$
3580 \begin_inset Formula $n$
3584 The three letters will be typeset in italics, when what you really wanted
3586 \begin_inset Quotes eld
3590 \begin_inset Quotes erd
3594 In addition, LyX won't put a space between the word
3595 \begin_inset Quotes eld
3599 \begin_inset Quotes erd
3603 \begin_inset Quotes eld
3607 \begin_inset Quotes erd
3614 will exit the formula).
3616 \begin_inset Quotes eld
3620 \begin_inset Formula $\sin(x)$
3624 \begin_inset Quotes erd
3628 \begin_inset Quotes eld
3632 \begin_inset Formula $sin(x)$
3636 \begin_inset Quotes erd
3642 \begin_layout Standard
3649 \begin_inset Graphics
3650 filename ../images/math/functions.png
3657 \begin_inset Quotes eld
3661 \begin_inset Quotes erd
3664 in the appearing function list.
3666 \begin_inset Quotes eld
3670 \begin_inset Quotes erd
3673 is displayed in LyX in black, and set in upright roman type.
3674 The whole word is treated as one symbol, so if you type
3678 , it will delete the whole word.
3680 \begin_inset Quotes eld
3684 \begin_inset Quotes erd
3687 , which will be written in blue italics, like you expect in a formula.
3688 In the output, the expression will be correctly typeset.
3692 \begin_layout Standard
3693 The function list include other trigonometric functions and their inverses,
3694 hyperbolic functions, logarithms, limits, and quite a few others.
3695 These functions can take subscripts and superscripts, important for typing
3697 \begin_inset Quotes eld
3701 \begin_inset Formula $\cos^{2}\theta$
3705 \begin_inset Quotes erd
3709 \begin_inset Quotes eld
3713 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3717 \begin_inset Quotes erd
3723 \begin_layout Standard
3735 \begin_layout Subsection
3737 \begin_inset LatexCommand label
3745 \begin_layout Standard
3746 Click on the matrix button
3747 \begin_inset Graphics
3748 filename ../images/dialog-show_mathmatrix.png
3760 The appearing dialog allows you to choose how many rows and columns you
3761 want in your matrix.
3762 Choose 2 rows and 3 columns and hit
3767 LyX prints 6 insertion points in a
3768 \begin_inset Formula $2\times3$
3772 As usual, you can put any sort of formula expression (a square root, another
3773 matrix, etc.) in each insertion point.
3774 You can also leave some of the insertion points empty if you want.
3777 \begin_layout Standard
3782 can be used to move horizontally between the columns of a matrix.
3783 Alternatively, you can use the arrow keys to move around - hitting
3787 at the end of one box will move to the next box,
3791 will move to the next row, etc.
3794 \begin_layout Standard
3795 If you need to change the number of rows and columns, use the menu
3797 Edit\SpecialChar \menuseparator
3798 Math\SpecialChar \menuseparator
3799 Rows\InsetSpace \thinspace{}
3800 &\InsetSpace \thinspace{}
3803 or the math toolbar buttons
3804 \begin_inset Graphics
3805 filename ../images/tabular-feature_append-row.png
3812 \begin_inset Graphics
3813 filename ../images/tabular-feature_delete-row.png
3820 \begin_inset Graphics
3821 filename ../images/tabular-feature_append-column.png
3828 \begin_inset Graphics
3829 filename ../images/tabular-feature_delete-column.png
3838 \begin_layout Standard
3843 for information on how to change the horizontal alignment of each column,
3844 and how to change the vertical position of the whole matrix.
3845 Note that if you want to write a table containing text, you should use
3846 LyX's wonderful table support, rather than trying to write text in a matrix.
3849 \begin_layout Subsection
3853 \begin_layout Standard
3854 All of the expressions we have written so far have been on the same line
3855 as the text that came before and after them, otherwise known as inline
3857 This is fine for short, simple expressions, but if you want to write larger
3858 ones, or if you want your expressions to stand out from the text, you need
3859 to write them in display mode.
3860 In addition, only displayed expressions can be labeled and numbered (see
3865 ), and multi-line equations must be in display mode.
3868 \begin_layout Standard
3869 Click on the display button
3870 \begin_inset Graphics
3871 filename ../images/math-display.png
3882 , which represents a couple lines of text before and after a centered blue
3884 LyX inserts a formula, but the insertion point is on a new line, and it's
3885 centered within that line.
3886 Now type an expression and run LaTeX to see how it looks.
3887 The display button is actually a toggle; use it now to change a couple
3888 of your expressions to display mode and back.
3892 \begin_layout Standard
3893 Display mode has a couple differences from inline mode:
3896 \begin_layout Itemize
3897 The default font is larger for a few symbols, like
3898 \begin_inset Formula $\sum$
3902 \begin_inset Formula $\int$
3908 \begin_layout Itemize
3909 Subscripts and superscripts for limits and sums (but not integrals) are
3910 written under rather than next to the symbols
3913 \begin_layout Itemize
3917 \begin_layout Standard
3918 Other than these differences, though, displayed expressions and inline expressio
3919 ns are very similar.
3922 \begin_layout Standard
3923 One final note about the way displayed formulas are typeset: Be careful
3924 about whether you're putting your equation into a new paragraph or not.
3925 If your formula is in the middle of a sentence or paragraph, then don't
3931 Doing so will cause the text
3935 the formula to start a new paragraph.
3936 That text will therefore eventually be indented, depending on your document
3937 paragraph settings, which is probably not what you want.
3940 \begin_layout Standard
3945 : Put the various equations in
3949 into display mode, and see how they're typeset differently.
3952 \begin_layout Standard
3957 : Using various tools you've learned in this section, you should be able
3958 to write an equation like
3962 \begin_layout Standard
3963 After you've done it the hard way, give
3965 Insert\SpecialChar \menuseparator
3966 Math\SpecialChar \menuseparator
3976 \begin_inset Formula \[
3977 f(x)=\left\{ \begin{array}{cc}
3980 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
3987 \begin_layout Section
3991 \begin_layout Standard
3992 LyX's math editor can do plenty more.
3993 By now, you're familiar with the basics, so we refer to the
4000 \begin_layout Itemize
4001 Labeling and numbering expressions
4004 \begin_layout Itemize
4005 Multi-line equations
4008 \begin_layout Itemize
4009 Change typefaces, e.g., to write bold-face text in an expression.
4012 \begin_layout Itemize
4013 Fine-tune font sizes and spacing within an expression.
4014 (Don't worry about this until your final draft!)
4017 \begin_layout Itemize
4019 These are very powerful, because you just define them once at the top of
4020 the document, and then you can use them throughout the document.
4023 \begin_layout Itemize
4024 Do lots of other things that can't be mentioned in this Tutorial.
4027 \begin_layout Chapter
4031 \begin_layout Section
4032 Other major LyX Features
4035 \begin_layout Standard
4036 We haven't gone through all the possible commands in LyX, and we aren't
4044 Embedded\InsetSpace ~
4047 manual for more information.
4048 We'll just mention a couple more major things LyX can do:
4051 \begin_layout Itemize
4052 LyX has WYSIWYM support for tables.
4055 Insert\SpecialChar \menuseparator
4059 \begin_inset Graphics
4060 filename ../images/tabular-insert.png
4067 Click on the table with the
4076 dialog box which allows extensive table editing.
4079 \begin_layout Itemize
4080 LyX also supports including pictures in any format within documents.
4083 Insert\SpecialChar \menuseparator
4087 \begin_inset Graphics
4088 filename ../images/dialog-show-new-inset_graphics.png
4095 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4096 can have captions, and LyX will automatically generate lists of figures
4100 \begin_layout Itemize
4101 LyX is heavily configurable.
4102 Everything from how the LyX window looks to how the output comes out can
4103 be configured in a number of ways.
4104 Much configuration is done through
4106 Tools\SpecialChar \menuseparator
4110 For more information on this, check out
4112 Help\SpecialChar \menuseparator
4113 Customization\SpecialChar \@.
4117 \begin_layout Itemize
4118 LyX is being developed by a team of programmers on five continents.
4119 Therefore, LyX has better support for non-English languages (such as Dutch,
4120 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4121 ) than many word processors.
4122 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4123 languages Chinese Japanese, and Korean are supported.
4124 You can write documents in other languages and you can also configure LyX
4125 to show its menus and error messages in other languages.
4129 \begin_layout Itemize
4130 The LyX menus feature keybindings.
4131 This means that you can do
4133 File\SpecialChar \menuseparator
4144 or by using the binding which is shown next to it in the menu (C-O by default).
4145 Keybindings are also configurable.
4146 For information on this, check out
4148 Help\SpecialChar \menuseparator
4149 Customization\SpecialChar \@.
4153 \begin_layout Itemize
4154 LyX can read LaTeX documents.
4155 See section\InsetSpace ~
4157 \begin_inset LatexCommand ref
4158 reference "sec:tex2lyx"
4165 \begin_layout Itemize
4166 Spellchecking, thesaurus, and word count facilities are available.
4169 \begin_layout Itemize
4170 Generation of indexes and nomenclatures/glossaries is supported.
4173 \begin_layout Section
4175 \begin_inset LatexCommand label
4176 name "sec:latexusers"
4183 \begin_layout Standard
4184 If you don't know anything about LaTeX, you don't have to read this section.
4185 Actually, you might want to
4189 about LaTeX, and then read this chapter.
4190 However, some who begin to use LyX will be familiar with LaTeX.
4191 If you are such a person, you may be wondering if LyX can really do everything
4193 The short answer is that LyX can do pretty much everything LaTeX can do
4194 in one form or another, and it definitely simplifies most parts of writing
4198 \begin_layout Standard
4199 Because this is just a tutorial, we are only going to mention things that
4200 new LyX users will most likely be interested in.
4201 In the interests of keeping the Tutorial short, we will give only minimal
4205 Extended\InsetSpace ~
4210 Embedded\InsetSpace ~
4213 manual have a great deal of information on differences between LyX and
4214 LaTeX, and how to do various LaTeX tricks in LyX.
4217 \begin_layout Subsection
4221 \begin_layout Standard
4222 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4223 will be displayed in red on the screen.
4224 You can use TeX commands in LyX by choosing
4226 Insert\SpecialChar \menuseparator
4231 \begin_inset Graphics
4232 filename ../images/ert-insert.png
4239 This creates a box where everything within it is passed straight to LaTeX.
4242 \begin_layout Standard
4243 In a math formula, TeX mode is handled a bit differently.
4244 TeX mode is there entered by typing a backslash.
4245 The backslash is not written out, but anything you type afterwards will
4247 You exit TeX mode by typing
4251 or some other non-alphabetic character, like a number, underscore, caret,
4253 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4254 will convert it to WYSIWYM\SpecialChar \@.
4256 \begin_inset Quotes eld
4266 \begin_inset Quotes erd
4269 in a formula and then press
4273 , LyX will change the red
4274 \begin_inset Quotes eld
4278 \begin_inset Quotes erd
4282 \begin_inset Quotes eld
4286 \begin_inset Formula $\gamma$
4290 \begin_inset Quotes erd
4294 This will work for almost all, non-complicated math macros.
4295 This may be faster than using the
4300 , and will be especially convenient for experienced LaTeX users.
4303 \begin_layout Standard
4304 As a special case, if you type a brace in TeX mode, then the beginning
4308 ending braces will be inserted in red, then take you
4312 of TeX mode and place the cursor between the braces.
4313 This makes it more convenient to type commands that LyX doesn't know which
4317 \begin_layout Standard
4318 LyX can't do absolutely everything that LaTeX can do.
4319 Some fancy functions are not supported at all, while some work but aren't
4321 TeX mode allows users to get the full flexibility of LaTeX, while having
4322 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4323 LyX could never support every LaTeX package.
4330 in the preamble (see section\InsetSpace ~
4332 \begin_inset LatexCommand ref
4333 reference "sec:preamble"
4337 ), you can use any package you want --- although you won't have WYSIWYM
4338 support for that package's features.
4341 \begin_layout Subsection
4342 Importing LaTeX Documents ---
4347 \begin_inset LatexCommand label
4355 \begin_layout Standard
4356 You can import a LaTeX file into LyX by using the
4358 File\SpecialChar \menuseparator
4359 Import\SpecialChar \menuseparator
4364 This will call the program
4368 which will create a file
4376 and then open that file.
4377 If the translation doesn't work, you can try calling
4381 from the command line, possibly using fancier options.
4384 \begin_layout Standard
4389 will translate most legal LaTeX, but not everything.
4390 It will leave things it doesn't understand in TeX mode, so after translating
4395 , you can look for red text and hand-edit it to look right.
4398 \begin_layout Standard
4403 has its own manpage.
4404 Read it to find out about which LaTeX commands and environments aren't
4405 supported, bugs (and how to get around them), and how to use the various
4409 \begin_layout Subsection
4410 Converting LyX Documents to LaTeX
4413 \begin_layout Standard
4414 You might wish to convert a LyX Document to a LaTeX file.
4415 For example, a co-worker or co-author who doesn't have LyX might want to
4419 File\SpecialChar \menuseparator
4420 Export\SpecialChar \menuseparator
4424 This will create a file
4432 file you are editing.
4433 LyX always creates temporary LaTeX files when viewing or printing files.
4436 \begin_layout Subsection
4440 \begin_layout Subsubsection
4444 \begin_layout Standard
4447 Document\SpecialChar \menuseparator
4450 dialog takes care of many of the options that you would input in a
4457 Change the class, default font size and paper size here.
4458 Put any extra options to the
4476 \begin_layout Subsubsection
4477 Other Preamble Matter
4478 \begin_inset LatexCommand label
4486 \begin_layout Standard
4487 If you have special commands to put in the preamble of a LaTeX file, you
4488 can use them in a LyX document as well.
4491 Document\SpecialChar \menuseparator
4492 Settings\SpecialChar \menuseparator
4496 and type in the dialog window (or from the document settings dialog, depending
4498 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4501 \begin_layout Subsection
4505 \begin_layout Standard
4506 LyX has support for BibTeX, which allows you to build databases of bibliographic
4507 al references to be used in multiple documents.
4513 nsert\SpecialChar \menuseparator
4520 C\SpecialChar \menuseparator
4537 field you load BibTeX files, in the
4541 field you can load BibTeX style files.
4544 \begin_layout Standard
4545 After you've done this, you can use citations from any bibliographies you're
4548 Insert\SpecialChar \menuseparator
4551 (see section\InsetSpace ~
4553 \begin_inset LatexCommand ref
4554 reference "sec:bibliographies"
4559 LyX will take care of running BibTeX.
4564 dialog will show a list of all the references in your
4571 \begin_layout Section
4575 \begin_layout Standard
4576 Sometimes when you LaTeX a document, there will be errors, things that LyX
4577 or LaTeX can't understand.
4578 When this happens, LyX will open a
4584 Clicking on individual errors in this dialog will take you to the place
4585 in the LyX document where the error occurs and also display the detailed
4586 LaTeX error message.