1 #LyX 1.5.3 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}}
21 {\usepackage[scaled=0.92]{helvet}
23 \usepackage{courier} }
25 % link all cross references and URLs in pdf output
26 \usepackage[colorlinks=true, bookmarks, bookmarksnumbered,
27 bookmarksopen, bookmarksopenlevel=2,
28 linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,
29 pdfpagelayout=OneColumn, pdfnewwindow=true,
30 pdfstartview=XYZ, plainpages=false, pdfpagelabels,
31 pdfauthor={LyX Team}, pdftex,
32 pdftitle={The LyX Tutorial},pdfsubject={LyX-documentation Tutorial},
33 pdfkeywords={LyX, documentation}]{hyperref}
35 \else % if dvi or ps is produced
37 % link all cross references and URLs in dvi output
38 \usepackage[ps2pdf]{hyperref}
40 \fi % end if pdflatex is used
42 % the pages of the TOC are numbered roman
43 % and a pdf-bookmark for the TOC is added
45 \let\myTOC\tableofcontents
46 \renewcommand\tableofcontents{%
47 \pdfbookmark[1]{Contents}{}
50 \pagenumbering{arabic} }
52 % redefine the \LyX macro for PDF bookmarks
53 \def\LyX{\texorpdfstring{%
54 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
61 \font_typewriter default
62 \font_default_family default
76 \paperorientation portrait
79 \paragraph_separation indent
81 \quotes_language english
84 \paperpagestyle headings
85 \tracking_changes false
102 \begin_layout Standard
103 If you have comments or error corrections, please send them to the LyX Documenta
106 lyx-docs@lists.lyx.org
116 \begin_layout Standard
117 \begin_inset LatexCommand tableofcontents
124 \begin_layout Chapter
128 \begin_layout Section
132 \begin_layout Standard
133 This file is designed for all of you who have never heard of LaTeX, or don't
135 Now, don't panic - you won't need to learn LaTeX to use LyX.
136 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
138 There are some things you will need to learn, however, in order to use
142 \begin_layout Standard
143 Some of you probably found your way to this document because you tried to
144 put two spaces after a
145 \begin_inset Quotes eld
149 \begin_inset Quotes erd
152 or tried to put 3 blank lines between paragraphs.
153 You found out you couldn't and in fact, you'll find out that most of the
154 little tricks you're accustomed to use in other word processors won't work
156 That's because most word processors you've used before allow you to manually
157 enter all spacings, font changes, and so on.
158 So you end up not only writing a document but typesetting it, too.
159 LyX does the typesetting for you, in a consistent fashion, letting you
160 focus on the important things, like the content of your writing.
163 \begin_layout Standard
164 So read on to learn more about LyX.
165 Reading this tutorial is definitely worth the time.
168 \begin_layout Section
178 \begin_layout Standard
179 Before we get started with this section, we want to make a quick note of
185 uses the notation outlined in the
190 If you came to this manual first, please read the
194 before you continue with the
201 \begin_layout Standard
202 Now that you know which fonts mean what, we want to talk a bit about what
210 \begin_layout Subsection
211 Getting the most out of the Tutorial
214 \begin_layout Standard
215 This tutorial consists of examples and exercises.
216 To get the most out of this document, you should read through the document,
217 typing all the little things we're telling you to type and trying out all
218 of the exercises to see if you get them right.
219 For convenience, you might want to print out the PDF version of this document.
222 \begin_layout Standard
223 If you are familiar with LaTeX, you'll probably be able to read the
227 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
228 However, LyX have features you'll want to learn about.
229 Even if you don't feel like reading the rest of the
233 , you should definitely check out Section\InsetSpace ~
235 \begin_inset LatexCommand ref
236 reference "sec:latexusers"
240 , which is specifically written for experienced LaTeX users.
243 \begin_layout Subsection
251 \begin_layout Itemize
252 Detailed explanations of all of LyX's features.
256 \begin_layout Standard
265 \begin_layout Itemize
266 Detailed explanations of LaTeX.
270 \begin_layout Standard
272 If you want to learn some of the neat tricks you can do with LaTeX in LyX,
273 you can have a look at the
275 Embedded\InsetSpace ~
282 \begin_layout Standard
283 It's time to move onwards, time for your first document \SpecialChar \ldots{}
287 \begin_layout Chapter
288 Getting started with LyX
291 \begin_layout Section
292 Your first LyX document
293 \begin_inset LatexCommand label
294 name "sec:Your-first-LyX"
301 \begin_layout Standard
303 You're ready to start writing.
304 Before you do, there are a few things we need to mention, which will hopefully
305 make the Tutorial more instructive and useful.
309 \begin_layout Standard
310 Because there are informations we can't give you in the Tutorial, the
316 thing that you need to do is find the
323 Start up LyX, Choose the
332 You may want to load the
336 as well (if you're not reading it within LyX already).
337 This way, you can read them while you're writing your own file.
341 \begin_layout Standard
342 They can also serve as good examples of how to use the many features of
348 Note that once you've got more than one document open, you can use the
353 menu or the document tabs to switch between them.
356 \begin_layout Standard
357 In this Tutorial, we're going to assume that you have a fully working version
358 of LyX, as well as a LaTeX-distribution, a DVI-, and a PDF-viewer.
359 This should be the case on all major Linux- and BSD-distribution, as well
360 as on Windows, where this is setup by the LyX installer.
363 \begin_layout Standard
364 Finally, we've written a file to let you practice your LyX skills on, it's
370 Imagine that it was typed by someone who didn't know about any of LyX's
372 As you learn new LyX functions, we'll suggest that you fix those parts
379 \begin_inset Quotes eld
383 \begin_inset Quotes erd
386 hints about how to fix things
390 \begin_layout Standard
391 The hints are located in yellow
392 \begin_inset Quotes eld
396 \begin_inset Quotes erd
400 Access the text in a note by clicking on it.
406 If you want to cheat, or check what you've done, there's also a file called
411 which contains the same text written and typeset by a LyX master.
414 \begin_layout Standard
415 The example files can be found in the
419 directory of LyX's installation folder.
420 Open the raw document, and use
422 File\SpecialChar \menuseparator
426 to save a copy in your own directory for you to work on.
427 As you fix parts of the raw document, check to see how those changes affect
431 \begin_layout Standard
436 directory contains lots of other examples files.
437 They will show you how to do various fancy things with LyX.
438 After you read the Tutorial, or when you're confused about how to do something
439 fancy in LyX, take a look at these files.
442 \begin_layout Subsection
443 Typing, Viewing, and Exporting
446 \begin_layout Itemize
449 File\SpecialChar \menuseparator
453 \begin_layout Itemize
454 Type a sentence like:
456 This is my first LyX document!
459 \begin_layout Itemize
460 Save your document with
462 File\SpecialChar \menuseparator
468 \begin_layout Itemize
469 Run LaTeX to create a DVI file, with
471 View\SpecialChar \menuseparator
474 or the toolbar button
475 \begin_inset Graphics
476 filename ../images/buffer-view_dvi.png
482 LyX will open a DVI-viewer program displaying your document looking like
487 \begin_layout Standard
488 You can save time by leaving the DVI-viewer running in the background.
491 View\SpecialChar \menuseparator
492 Update\SpecialChar \menuseparator
495 or the toolbar button
496 \begin_inset Graphics
497 filename ../images/buffer-update_dvi.png
502 and just click on the DVI-viewer window (or unminimize it) after LaTeX
511 \begin_layout Itemize
512 Export the ready to print document with
514 File\SpecialChar \menuseparator
522 \begin_layout Standard
523 Congratulations! You've written your first LyX document.
524 All of the rest is just details, which is covered in the other manuals.
527 \begin_layout Subsection
531 \begin_layout Standard
532 LyX can of course do most of the things you're used to do with a word processor.
533 It will word-wrap and indent paragraphs automatically.
534 Here's a quick description of how to do some simple actions.
537 \begin_layout Description
538 Undo LyX has multiple levels of undo, which means you can undo everything
539 you've done since your current editing session started, by selecting
541 Edit\SpecialChar \menuseparator
545 \begin_inset Graphics
546 filename ../images/undo.png
551 ) over and over again.
552 If you undo too much, just select
554 Edit\SpecialChar \menuseparator
558 \begin_inset Graphics
559 filename ../images/redo.png
569 \begin_layout Standard
570 Currently, undo is limited to 100 steps.
571 Undo also doesn't work for
575 ; for instance, not for changes to the document layout what is really a
580 \begin_layout Description
583 Edit\SpecialChar \menuseparator
587 \begin_inset Graphics
588 filename ../images/cut.png
595 Edit\SpecialChar \menuseparator
599 \begin_inset Graphics
600 filename ../images/copy.png
607 Edit\SpecialChar \menuseparator
611 \begin_inset Graphics
612 filename ../images/paste.png
617 ) to cut, copy, and paste.
618 Or automatically paste selected text (including selections from other programs)
626 \begin_layout Description
629 Edit\SpecialChar \menuseparator
635 \begin_inset Graphics
636 filename ../images/dialog-show_findreplace.png
642 In the dialog, search with the
651 button to replace a word you've found
655 \begin_layout Standard
656 Close the window when you're done or leave it open if you find it more convenien
658 Most dialog boxes in LyX can operate like this.
659 Just be sure you have the right window focus when you're trying to type
660 in the main LyX window or a LyX dialog.
666 If you like, you can specify whether to make the search case-sensitive,
667 or to search for only complete words; you can also search backwards through
671 \begin_layout Description
672 Character\InsetSpace ~
677 text (which will by default print characters in italics), set it in
685 (usually small caps, used for people's names) from the toggle buttons in
688 Edit\SpecialChar \menuseparator
692 dialog (toolbar button
693 \begin_inset Graphics
694 filename ../images/dialog-show_character.png
702 \begin_layout Description
703 Toolbar There are buttons on the toolbar (just below the menus) which allow
704 you to do some of the more popular functions, such as
715 \begin_layout Standard
716 Of course, you haven't yet written enough to make most of these functions
718 As you write more, though, try undoing, pasting, etc.
721 \begin_layout Subsection
722 WYSIWYM: Whitespace in LyX
723 \begin_inset LatexCommand label
724 name "sec:whitespace"
731 \begin_layout Standard
732 One of the hardest things for new users to get used to is the way that LyX
734 As many times as you hit
738 , you'll only get one blank line.
739 As many times as you hit
743 , you'll only get one space.
744 On a blank line, LyX won't let you type even one space.
749 key won't move you forward one tab stop; in fact there
753 no tab stops! There's no ruler at the top of the page to let you set tabs
757 \begin_layout Standard
758 Many commercial word processors are based on the WYSIWYG principle:
759 \begin_inset Quotes eld
762 What You See Is What You Get.
763 \begin_inset Quotes erd
766 LyX, on the other hand, is based on the principle that
767 \begin_inset Quotes eld
770 What You See Is What You
775 \begin_inset Quotes erd
778 You type what you mean, and LyX will take care of typesetting it for you,
779 so that the output looks nice.
784 grammatically separates paragraphs, and a
788 grammatically separates words, so there is no reason to have several of
793 has no grammatical function at all, so LyX does not support it.
794 Using LyX, you'll spend more of your time worrying about the
798 of your document, and less time worrying about the
807 for more information on the WYSIWYM concept.
810 \begin_layout Standard
811 LyX does have (many) ways to fine-tune the formatting of your document.
812 After all, LyX might not typeset
821 has information about all that.
826 s and vertical space --- which are more powerful and versatile than multiple
827 spaces or blank lines --- and ways to change font sizes, character styles,
828 and paragraph alignments by hand.
829 The idea, though, is that you can write your whole document, focusing on
830 content, and just worry about that fine-tuning at the end.
831 With standard word processors, you'll be distracted by document formatting
832 throughout the writing process.
835 \begin_layout Section
839 \begin_layout Standard
840 Different parts of a document have different purposes; we call these parts
846 Most of a document is made up of regular text.
847 Section titles (chapter, subsection, etc.) let the reader know that a new
848 topic or subtopic will be discussed.
849 Certain types of documents have special environments.
850 A journal article will have an abstract and a title.
851 A letter will have neither of these, but will probably have an environment
852 that gives the writer's address.
855 \begin_layout Standard
856 Environments are a major part of the
857 \begin_inset Quotes eld
860 What You See Is What You Mean
861 \begin_inset Quotes erd
865 A given environment may require a certain font style, font size, indenting,
866 line spacing, and more.
867 This problem is aggravated, because the exact formatting for a given environmen
868 t may change: one journal may use boldface, 18 point, centered type for
869 section titles while another uses italicized, 15 point, left justified
870 type; different languages may have different standards for indenting; and
871 bibliography formats can vary widely.
872 LyX lets you avoid learning all the different formatting styles.
875 \begin_layout Standard
880 choice box is located on the left end of the toolbar and looks like this:
882 \begin_inset Graphics
883 filename clipart/ToolbarEnvBox.png
890 It indicates which environment you're currently writing in.
891 While you were writing your first document, it said
892 \begin_inset Quotes eld
896 \begin_inset Quotes erd
899 which is the default environment for text.
900 Now you will put a number of environments in your new document so that
901 you can see how they work.
904 \begin_layout Subsection
905 Sections and Subsections
908 \begin_layout Standard
913 on the first line of your LyX file, and select
925 \begin_layout Standard
931 If nothing is selected, LyX changes the paragraph you are currently in
932 to the selected environment.
933 Alternatively, you can change several paragraphs to a different environment
934 by selecting them before picking an environment.
951 , which will be covered below.
952 LyX numbers the section
953 \begin_inset Quotes eld
957 \begin_inset Quotes erd
960 and typesets the section heading (title) in a larger font.
971 \begin_inset Quotes eld
975 \begin_inset Quotes erd
979 \begin_inset Quotes eld
983 \begin_inset Quotes erd
987 Section headings, like most environments, are assumed to end when you type
993 Type the document introduction:
996 \begin_layout LyX-Code
997 This is an introduction to my first LyX document.
1000 \begin_layout Standard
1015 \begin_inset Quotes eld
1019 \begin_inset Quotes erd
1022 and waits for you to type a title.
1024 \begin_inset Quotes eld
1033 \begin_inset Quotes erd
1036 , and you'll see that LyX again sets it as a section title.
1039 \begin_layout Standard
1041 Go to the end of Section\InsetSpace ~
1043 \begin_inset Quotes eld
1046 my first LyX document
1047 \begin_inset Quotes erd
1064 \begin_inset Quotes eld
1068 \begin_inset Quotes erd
1071 and waits for you to type a title.
1077 Section\InsetSpace ~
1079 \begin_inset Quotes eld
1083 \begin_inset Quotes erd
1086 , which used to be Section\InsetSpace ~
1087 2, has been automatically renumbered to Section\InsetSpace ~
1089 In true WYSIWYM fashion, you just need to identify the text that makes
1090 up the section titles, and LyX takes care of numbering the sections and
1094 \begin_layout Standard
1103 environment, and type the following five lines:
1106 \begin_layout LyX-Code
1107 Sections and subsections are described below.
1110 \begin_layout LyX-Code
1114 \begin_layout LyX-Code
1115 Sections are bigger than subsections.
1118 \begin_layout LyX-Code
1119 Subsection description
1122 \begin_layout LyX-Code
1123 Subsections are smaller than sections.
1126 \begin_layout Standard
1127 Click on the second line and select
1136 LyX numbers the subsection
1137 \begin_inset Quotes eld
1141 \begin_inset Quotes erd
1144 , and typesets it in a font which is bigger than regular text but smaller
1145 than the section title.
1146 Change the fourth line
1150 environment as well.
1151 As you probably expected, LyX automatically numbered the section
1152 \begin_inset Quotes eld
1156 \begin_inset Quotes erd
1160 If you put yet another section before Section\InsetSpace ~
1161 2, Section\InsetSpace ~
1162 2 will be renumbered
1163 as Section 3, and the subsections will be renumbered to
1164 \begin_inset Quotes eld
1168 \begin_inset Quotes erd
1172 \begin_inset Quotes eld
1176 \begin_inset Quotes erd
1183 \begin_layout Standard
1184 Further levels of sectioning include
1197 We'll let you play with these on your own.
1198 You may notice that paragraph and subparagraph headings are not numbered
1199 by default, and that subparagraphs are indented; see the
1203 for an explanation and how to change this.
1208 headings are actually the highest level of sectioning, above
1212 s, but you're only allowed to use them in certain types (text classes) of
1213 LyX documents (see Section\InsetSpace ~
1215 \begin_inset LatexCommand ref
1216 reference "sec:Document-Classes"
1224 \begin_layout Standard
1225 Finally, you may want to have sections or subsections that are not numbered.
1226 There are environments for this as well.
1227 If you change one of your section headings to the
1231 environment (you may have to scroll down in the
1235 box to find it), LyX will use the same font size for the heading as it
1236 uses for a regular section, but it won't number that section.
1237 There are corresponding
1238 \begin_inset Quotes eld
1242 \begin_inset Quotes erd
1245 heading environments for
1254 Try changing some of your sections or subsections to the starred environments,
1255 and note how the other sections' numbers are updated.
1258 \begin_layout Standard
1263 : Fix the section and subsection headings in
1271 \begin_layout Subsection
1275 \begin_layout Standard
1276 LyX has several different environments for typesetting lists.
1277 The various list environments free you from hitting
1281 a million times when writing an outline, or from renumbering a whole list
1282 when you want to add a point in the middle of the list.
1283 Different types of documents logically require different list environments:
1286 \begin_layout Itemize
1287 A slide presentation might use the
1291 environment's bulleted lists to describe different points.
1295 \begin_layout Itemize
1296 An outline would use the
1300 environment's numbered lists (and lettered sublists).
1304 \begin_layout Itemize
1305 A document describing several software packages could use the
1309 environment, where each item in the list begins with a bold-faced word.
1313 \begin_layout Itemize
1318 environment --- not found in LaTeX --- is a slightly different form of
1326 \begin_layout Standard
1327 Let's write a list of reasons why LyX is better than other word processors.
1328 Somewhere in your document, type:
1331 \begin_layout Standard
1334 LyX is better than other word processors because:
1337 \begin_layout Standard
1353 \begin_inset Quotes eld
1357 \begin_inset Quotes erd
1361 Type in your reasons:
1364 \begin_layout LyX-Code
1365 Typesetting is done for you.
1368 \begin_layout LyX-Code
1372 \begin_layout LyX-Code
1373 Lists are very easy to create!
1376 \begin_layout Standard
1377 List environments, unlike headings, do not end when you type
1382 Instead, LyX assumes you're going on to the next item in the list.
1383 The above will therefore result in a three-item list.
1384 If you want more than one paragraph within one list
1388 , one way is to use the
1390 Protected\InsetSpace ~
1393 , which you get by typing
1398 In order to get out of the list, you need to reselect the
1402 environment (or just use the keybinding,
1410 \begin_layout Standard
1411 You've got a beautiful itemized list.
1412 You might want to run LaTeX to see how the list looks when printed out.
1413 But what if you wanted to number the reasons? Well, just select the whole
1418 \begin_layout Standard
1419 LyX won't let you select the first bullet unless you also select the paragraph
1424 the list, which you probably don't want to do.
1425 Similarly, you can't select the actual number in a numbered section title.
1426 This is on purpose because the bullet or number depends on the document
1427 settings or text position, respectively.
1441 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1445 \begin_layout Standard
1446 While the list is still selected, you can change to the other two list environme
1455 , in order to see what they look like.
1456 For those two environments, each list item is made up of a term, which
1457 is the item's first word, followed by a definition, which is the rest of
1458 the paragraph (until you hit
1462 .) The term is either typeset in boldface (
1467 \begin_inset Quotes eld
1471 \begin_inset Quotes erd
1478 \begin_layout Standard
1479 But a typesetter's tab, which will change to fit the size of the largest
1480 term, not a pathetic, rigid, unchangeable typewriter
1493 ) from the rest of the paragraph.
1494 If you want to have more than one word in the definition, then separate
1497 Protected\InsetSpace ~
1503 \begin_layout Standard
1508 : Typeset the list in
1513 \begin_layout Standard
1514 You can nest lists within each other in all sorts of interesting ways.
1515 An obvious example would be writing outlines.
1516 Numbered and bulleted lists will have different numbering and bulleting
1517 schemes for sublists.
1522 for details on the different sorts of lists and for examples of nestings.
1525 \begin_layout Subsection
1526 Other environments: Verses, Quotations, and more
1529 \begin_layout Standard
1530 There are two environments for setting quotations apart from surrounding
1535 for short quotes and
1548 \begin_layout Standard
1549 used in this Tutorial for the long typing examples
1558 font; this environment is the only place in LyX where you're allowed to
1559 use multiple spaces to allow code indenting.
1560 You can even write poetry using the
1568 to separate stanzas, and
1572 to separate lines within a stanza.
1577 for more complete descriptions of all of the available LyX environments.
1580 \begin_layout Standard
1585 : Correctly typeset the
1600 \begin_layout Chapter
1604 \begin_layout Standard
1605 The previous chapter hopefully allowed you to get used to writing in LyX.
1606 It introduced you to the basic editing operations in LyX, as well as the
1607 powerful method of writing with environments.
1608 Most people who use LyX, though, will want to write documents: papers,
1609 articles, books, manuals, or letters.
1610 This chapter is meant to take you from simply writing text with LyX to
1611 writing a complete document.
1612 It will introduce you to text classes, which allow you to write different
1614 It will then describe many of the additions that turn text into a document,
1615 such as titles, footnotes, cross references, bibliographies, and tables
1619 \begin_layout Section
1621 \begin_inset LatexCommand label
1622 name "sec:Document-Classes"
1629 \begin_layout Standard
1630 Different sorts of documents should be typeset differently.
1631 For example, books are generally printed double-sided, while articles are
1633 In addition, many documents contain special environments: letters contain
1634 some environments --- such as the sender's address and the signature ---
1635 which do not make sense in a book or article.
1644 \begin_layout Standard
1645 for LaTeX users: this is equivalent to the LaTeX document class
1650 takes care of these large scale differences between different sorts of
1652 This Tutorial, for example, was written in the
1657 Document classes are another major part of the WYSIWYM philosophy; they
1658 tell LyX how to typeset the document, so you don't need to know how.
1661 \begin_layout Standard
1662 Your document is probably being written in the
1670 \begin_layout Standard
1671 That's usually the default document class
1676 Try changing to other document classes (using the
1678 Document\SpecialChar \menuseparator
1681 dialog) to see how they are typeset differently.
1682 If you change your document to the
1686 document class and look at the
1690 box, you'll see that most of the allowed environments are the same.
1691 However, you can now use the
1696 If you are ever unsure about which environments you can use in a given
1697 document class, just consult the
1704 \begin_layout Standard
1705 Font sizes, one- or two-column printing, and page headings are just some
1706 of the ways journals' typesettings differ from one another.
1707 As the Computer Age continues to mature, journals have begun accepting
1708 electronic submissions, creating LaTeX
1709 \begin_inset Quotes eld
1713 \begin_inset Quotes erd
1716 so that authors can submit correctly typeset articles.
1717 LyX is set up to support this as well.
1718 For example, LyX supports typesetting (and extra environments) for the
1719 American Mathematics Society journals using the
1721 Article\InsetSpace ~
1727 \begin_layout Standard
1728 Here is a very quick reference to some of the document classes.
1731 Special Document Classes
1737 manual for many more details.
1740 \begin_layout Standard
1742 \begin_inset Tabular
1743 <lyxtabular version="3" rows="7" columns="2">
1745 <column alignment="center" valignment="top" leftline="true" width="0pt">
1746 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
1747 <row topline="true" bottomline="true">
1748 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1751 \begin_layout Standard
1757 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1760 \begin_layout Standard
1767 <row topline="true">
1768 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1771 \begin_layout Standard
1777 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1780 \begin_layout Standard
1781 one-sided, no chapters
1787 <row topline="true">
1788 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1791 \begin_layout Standard
1797 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1800 \begin_layout Standard
1801 layout & environments for American Math Society
1807 <row topline="true">
1808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1811 \begin_layout Standard
1817 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1820 \begin_layout Standard
1821 longer than article, two-sided
1827 <row topline="true" bottomline="true">
1828 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1831 \begin_layout Standard
1837 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1840 \begin_layout Standard
1841 report + front and back matter
1847 <row bottomline="true">
1848 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1851 \begin_layout Standard
1857 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1860 \begin_layout Standard
1867 <row bottomline="true">
1868 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1871 \begin_layout Standard
1877 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1880 \begin_layout Standard
1881 lots of extra environments for address, signature\SpecialChar \ldots{}
1895 \begin_layout Section
1896 Templates: Writing a Letter
1899 \begin_layout Standard
1900 One way to write a letter would be to open a new file, and choose a
1906 Document\SpecialChar \menuseparator
1910 While this is the most obvious way to write a letter, it seems like extra
1912 Every time you write a business letter, you want to have your address,
1913 the address you're sending to, a body, a signature, etc.
1918 for letters, which contains a sample letter; once you have a template,
1919 you can just replace a couple parts of the letter with your text each time
1923 \begin_layout Standard
1924 Open a new file with
1926 File\SpecialChar \menuseparator
1937 Save and print the file to see how the various environments are typeset.
1940 \begin_layout Standard
1941 When you look at the
1945 box, you'll see several environments, like the
1950 environment, which don't even exist in most other document classes.
1960 You can play around for a while to figure out how the various environments
1962 You'll notice for example that the
1966 environment has the word
1967 \begin_inset Quotes eld
1971 \begin_inset Quotes eld
1974 in red before the actual text of the signature.
1975 This word doesn't show up in the actual letter, as you'll see if you view/expor
1977 It's just there to let you know where the signature goes.
1978 Also, note that it doesn't matter where in the file the
1983 Remember, LyX is WYSIWYM; you can put the
1987 environment anywhere you want, but LyX knows that in the printout, the
1988 signature should be at the end.
1991 \begin_layout Standard
1992 A template is just a regular LyX file.
1993 This means you can fill in your address and signature and save the file
1995 From now on, any time you want to write a letter, you can use the new template
1997 We don't have to suggest an actual
1998 \begin_inset Quotes eld
2002 \begin_inset Quotes erd
2005 here; just write a letter to someone!
2009 \begin_layout Standard
2010 One warning, if you're writing from a template.
2011 If you erase all of the text in an environment --- for example, if you
2017 field so that you can replace it with your own --- and then you move the
2018 cursor without writing any text, the environment may disappear.
2019 This is because most environments cannot exist without any text in them.
2020 Just reselect the environment from the
2032 \begin_layout Standard
2033 Templates can be a huge time-saver, and we urge you to use them whenever
2035 In addition, they can help a person learn how to use some of the fancier
2037 Finally, they may be useful for a person who is configuring LyX for a bunch
2038 of less computer-aware users.
2039 When they're first learning LyX, it will be much less intimidating if they
2040 have a letter template customized for their company, for example.
2043 \begin_layout Section
2047 \begin_layout Standard
2048 LyX (like LaTeX) considers the title --- which may contain the actual title,
2049 the author, the date, and even an abstract of a paper --- to be a separate
2050 part of the document.
2053 \begin_layout Standard
2054 Go back to your LyX document and make sure it's using the
2062 \begin_layout Standard
2063 You should not be using the letter any more, since the
2067 document class doesn't allow titles.
2072 Type a title on the first line, and change the line to the
2077 On the next line, type your name and change it to the
2082 On the next line, write the date in the
2087 Type a paragraph or two summarizing your document using the
2092 Notice how the title is presented when it's printed out.
2093 If you changed the document format to Book, you'll get a separate title
2094 page, like the first page of this tutorial.
2097 \begin_layout Standard
2102 : Fix the title, date, and author in
2107 \begin_layout Section
2108 Labels and Cross-References
2109 \begin_inset LatexCommand label
2117 \begin_layout Standard
2118 You can label section headings, list items, formulas, footnotes, and floats
2122 \begin_layout Standard
2123 Floats are explained in the
2137 Once you do so, you can refer to this section in other parts of the document,
2138 using cross-references.
2139 You can refer either to the section's number, or to the page that the section
2141 As with section numbering, LyX also takes care about cross-reference numbering
2143 Automatic labels and cross-references are one of the best advantages of
2144 LyX (and LaTeX) over conventional word processors.
2147 \begin_layout Subsection*
2151 \begin_layout Standard
2152 Go to our second section, whose title is
2153 \begin_inset Quotes eld
2157 \begin_inset Quotes erd
2161 Click at the end of the section title line, and select
2163 Insert\SpecialChar \menuseparator
2166 or the toolbar button
2167 \begin_inset Graphics
2168 filename ../images/label-insert.png
2175 A dialog asks you for a label name, and gives you a suggestion.
2180 , the label name will be placed in a box next to the section title.
2183 \begin_layout Standard
2184 By the way, you could have put the label right anywhere within the section
2185 as well; section references will refer to the last section or subsection
2186 whose heading comes before the label.
2187 However, putting it on the same line as the section title (or, perhaps,
2188 on the first line of the section's text) ensures that page references will
2189 reference the beginning of the section.
2192 \begin_layout Standard
2193 So far you haven't done anything --- the DVI output will look exactly the
2194 same, since labels don't show up in the printed document.
2195 However, now that you have added a label, you can refer to that label with
2200 \begin_layout Subsection*
2201 Your first cross-reference
2204 \begin_layout Standard
2205 Place the cursor somewhere in Section\InsetSpace ~
2210 \begin_layout LyX-Code
2211 If you want to know more about this document, then see
2217 \begin_layout Standard
2218 Now --- with the cursor after the word
2219 \begin_inset Quotes eld
2223 \begin_inset Quotes erd
2228 Insert\SpecialChar \menuseparator
2232 or the toolbar button
2233 \begin_inset Graphics
2234 filename ../images/dialog-show-new-inset_ref.png
2246 It shows a list of the possible labels you can reference.
2247 At the moment, there should be only one,
2248 \begin_inset Quotes eld
2251 sec:About-This-Document
2252 \begin_inset Quotes erd
2256 Select it (it may be selected by default), and click
2261 Now put the cursor after the word
2262 \begin_inset Quotes eld
2266 \begin_inset Quotes erd
2269 , and change the reference format to use the page number then click
2274 (To be really correct, you should put a
2276 Protected\InsetSpace ~
2280 \begin_inset Quotes eld
2284 \begin_inset Quotes erd
2288 Same for the page reference.)
2291 \begin_layout Standard
2292 LyX puts the references in a box right where the cursor was.
2293 In the printed document, this reference marker will be replaced with either
2294 the page or section number (depending on what you selected in the
2299 View your document as DVI, and you'll see that on the last page we refer
2301 \begin_inset Quotes eld
2304 Section\InsetSpace ~
2306 \begin_inset Quotes erd
2310 \begin_inset Quotes eld
2315 \begin_inset Quotes erd
2318 (or whatever page Section\InsetSpace ~
2322 \begin_layout Standard
2323 Conveniently, a cross-reference acts as a hyperlink when you are editing
2324 a document in LyX; clicking on it will pop up the
2334 will move the cursor to the referenced label.
2337 \begin_layout Subsection*
2338 More fun with labels
2341 \begin_layout Standard
2342 We told you that LyX takes care about numbering cross-references; now you
2344 Add a new section before Section\InsetSpace ~
2346 Update the DVI view, and --- voilà ! --- the section cross reference changed
2348 \begin_inset Quotes eld
2352 \begin_inset Quotes erd
2355 ! Change the section
2356 \begin_inset Quotes eld
2360 \begin_inset Quotes erd
2363 to a subsection, and the cross-reference will reference Subsection\InsetSpace ~
2365 of Section\InsetSpace ~
2367 The page reference won't change unless you add a whole page of text before
2368 the label, of course.
2372 \begin_layout Standard
2373 If you want some more practice with labels, then try putting a new label
2374 where your first cross-reference was, and refer to that label from elsewhere
2376 If you'll be inserting cross-references often, it may be convenient to
2384 \begin_layout Standard
2385 If you want to make sure that the cross-referencing gets the pages right
2386 even for larger documents,
2390 a couple pages of text from the
2394 to the clipboard, and
2398 the stolen text into your document.
2402 \begin_layout Standard
2403 By the way, copying a chapter title may cause an error, because chapters
2404 aren't allowed in the article class, see section\InsetSpace ~
2406 \begin_inset LatexCommand ref
2407 reference "sec:Document-Classes"
2412 If this happens, just delete the chapter title.
2420 \begin_layout Standard
2425 : Fix the references in
2430 \begin_layout Section
2431 Footnotes and Margin Notes
2434 \begin_layout Standard
2435 Footnotes can be added using the toolbar button
2436 \begin_inset Graphics
2437 filename ../images/footnote-insert.png
2445 Insert\SpecialChar \menuseparator
2449 Click at the end of the word
2450 \begin_inset Quotes eld
2454 \begin_inset Quotes erd
2457 somewhere in your document and click the
2458 \begin_inset Graphics
2459 filename ../images/footnote-insert.png
2466 A footnote box appears where you can enter the text of the footnote.
2467 LyX should place the cursor at the beginning of the footnote box.
2471 \begin_layout LyX-Code
2472 LyX is a typesetting word processor.
2475 \begin_layout Standard
2476 Now click on the button labelled
2477 \begin_inset Quotes eld
2481 \begin_inset Quotes erd
2485 The footnote box is closed, leaving the button showing where the footnote
2486 marker will be in the printed text; this is called
2487 \begin_inset Quotes eld
2491 \begin_inset Quotes erd
2495 You can unfold the footnote at any time --- and re-edit its text, if you
2496 want --- by clicking again on the
2497 \begin_inset Quotes eld
2501 \begin_inset Quotes erd
2507 \begin_layout Standard
2508 You may wonder why the footnote button is a word instead of a number.
2509 The answer is that LyX takes care about the footnote numbering for you
2510 in the printed text.
2511 You can see this yourself by looking at the DVI file (or printout).
2512 If you add other footnotes, LyX will renumber the footnotes.
2513 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2514 there's really no need to put the numbers in the LyX file.
2517 \begin_layout Standard
2518 A footnote can be cut and pasted like normal text.
2519 Go ahead; try it! All you need to do is select the footnote button
2523 \begin_layout Standard
2524 It may be easier to select it using the keyboard.
2525 You might accidentally open the footnote if you're trying to select the
2526 marker itself with the mouse.
2540 In addition, you can change regular text to a footnote, by selecting it
2542 \begin_inset Graphics
2543 filename ../images/footnote-insert.png
2549 button; change a footnote to regular text by hitting the
2553 key when the cursor is in the first position of a footnote, or by hitting
2558 key when the cursor is in the very last position of the footnote, respectively.
2561 \begin_layout Standard
2562 Margin notes can be added using the menu
2564 Insert\SpecialChar \menuseparator
2565 Marginal\InsetSpace ~
2568 or the toolbar button
2569 \begin_inset Graphics
2570 filename ../images/marginalnote-insert.png
2577 Margin notes are like footnotes, except that:
2580 \begin_layout Itemize
2581 the on-screen boxes say
2582 \begin_inset Quotes eld
2586 \begin_inset Quotes erd
2590 \begin_inset Quotes eld
2594 \begin_inset Quotes erd
2600 \begin_layout Itemize
2601 the notes will be placed in the margin, instead of below the text
2604 \begin_layout Itemize
2605 margin notes are not numbered
2608 \begin_layout Standard
2609 Change your LyX footnote back to text, then select and change it to a margin
2611 Run LaTeX again to see what the margin note looks like.
2614 \begin_layout Standard
2619 : Fix the footnote in
2624 \begin_layout Section
2626 \begin_inset LatexCommand label
2627 name "sec:bibliographies"
2634 \begin_layout Standard
2635 Bibliographies (at least in the exact sciences) are similar to cross references.
2636 The bibliography contains a list of references at the end of the document,
2637 and they can be referenced from within the document.
2638 Like section titles, LyX and LaTeX make your job easier by automatically
2639 numbering the bibliography items and changing citations when the item numbers
2643 \begin_layout Standard
2644 Go to the end of the document and switch to the
2649 Now, each paragraph you type will be a reference.
2651 \begin_inset Quotes eld
2656 The Lyx Tutorial, by the LyX Documentation Team
2659 \begin_inset Quotes erd
2662 as your first reference.
2663 Note that LyX automatically puts a number in a box before each reference.
2664 Click on the boxed reference number, and the
2666 Bibliography\InsetSpace ~
2674 is to refer to this reference within the LyX document, the
2683 is set (default), you will see the number of the bibliography in the output.
2689 \begin_inset Quotes eld
2693 \begin_inset Quotes erd
2696 to make it easy to remember.
2699 \begin_layout Standard
2700 Now pick somewhere in your document that you would like to insert a reference.
2703 Insert\SpecialChar \menuseparator
2706 or the toolbar button
2707 \begin_inset Graphics
2708 filename ../images/dialog-show-new-inset_citation.png
2720 The right panel in this dialog lists all the bibliography entries, and
2721 this field allows you to choose which bibliography item you want to cite.
2723 \begin_inset Quotes eld
2727 \begin_inset Quotes erd
2730 (right now, that's the only item in the bibliography), then use the
2734 button in the center to insert it.
2735 (You can have multiple citations in the same place by transferring a number
2736 of keys this way.) Now view your file as DVI, and you'll see that the citation
2737 appears in brackets in the text, referring to the bibliography at the end
2741 \begin_layout Standard
2751 dialog will put a remark (such as a reference to a page or chapter within
2752 the referenced book or article) in the brackets after the reference.
2753 If you want the references to have labels instead of numbers in the printed
2754 output (for example, some journals would use
2755 \begin_inset Quotes eld
2759 \begin_inset Quotes erd
2762 to refer to a paper written by Smith in 1995), use the
2768 Bibliography\InsetSpace ~
2779 \begin_layout Standard
2784 Fix the bibliography and citation in
2789 \begin_layout Section
2793 \begin_layout Standard
2794 You may want to put a table of contents at the beginning of your document.
2795 LyX makes this very easy to do.
2800 after your document title and before your first section title and choose
2803 Insert\SpecialChar \menuseparator
2806 TOC\SpecialChar \menuseparator
2813 \begin_inset Quotes eld
2817 \begin_inset Quotes erd
2820 will appear in a button on the first line of the document.
2824 \begin_layout Standard
2825 This may not appear to be very useful.
2826 However, if you look at your DVI file, you will see that a table of contents
2827 has been generated, listing the various sections and subsections in your
2829 As usual, if you reorder sections or create new ones, you will see those
2830 changes in the DVI file when you update it.
2834 \begin_layout Standard
2835 The table of contents is not printed in the on-screen version of the document
2836 to keep the overview in your file.
2837 But you can display the table of contents in a separate window by clicking
2838 on the table of contents button, or by using
2840 Document\SpecialChar \menuseparator
2843 or the toolbar button
2844 \begin_inset Graphics
2845 filename ../images/dialog-toggle_toc.png
2852 This menu will work even if you don't have a table of contents inset in
2854 This is a very useful tool where you can move around your document parts.
2855 Clicking on a (sub)section title in the
2859 window will highlight that line and move the display (in the LyX editing
2860 window) to that place in the document.
2861 You can also use the arrow keys to move up and down in the table of contents.
2862 You may therefore find it convenient to leave this window open throughout
2864 You can get similar functionality from the
2868 menu, though, where the table of contents appears automatically.
2871 \begin_layout Standard
2872 To get rid of the Table of Contents, you can delete the table of contents
2873 button just like any other text.
2876 \begin_layout Standard
2881 : Fix the table of contents in
2886 \begin_layout Chapter
2890 \begin_layout Standard
2891 LaTeX is used by many scientists because it outputs great looking equations,
2892 avoiding the control characters used by word processors and their equation
2894 Many of these scientists are frustrated, however, because writing equations
2895 in LaTeX is more like programming than writing.
2896 Happily, LyX has WYSIWYM support for equations.
2897 If you are used to LaTeX, you'll find that all of the usual LaTeX math
2898 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
2899 If, on the other hand, you've never written in LaTeX, then the
2904 will allow you to write professional-looking math quickly and easily.
2907 \begin_layout Section
2911 \begin_layout Standard
2912 Somewhere in your LyX document, type:
2915 \begin_layout LyX-Code
2916 I like what Einstein said, E=mc^2, because it's so simple.
2920 \begin_layout Standard
2921 Now, that equation doesn't look very good in LyX and in the output; there's
2922 no space between the letters and the equals sign, and you'd like to write
2923 an actual superscript for the
2924 \begin_inset Quotes eld
2928 \begin_inset Quotes erd
2932 That bad typesetting happened because we didn't tell LyX that we were writing
2933 a mathematical expression, so it typeset the equation like regular old
2937 \begin_layout Standard
2938 Instead, we create a formula that will get typeset properly.
2939 In order to create a formula, just click the toolbar button
2940 \begin_inset Graphics
2941 filename ../images/math-mode.png
2949 Insert\SpecialChar \menuseparator
2950 Math\SpecialChar \menuseparator
2955 LyX will insert a little blue square, which is an empty math formula.
2961 The expression is typed in blue, and the blue square disappears as soon
2962 as the formula is not empty.
2967 to leave the equation The purple markers disappear, leaving the cursor
2968 to the right of the expression, and now if you type something, it will
2972 \begin_layout Standard
2973 Run LaTeX and look at the output.
2974 Notice that the expression was typeset nicely, with spaces between the
2975 letters and the equals sign, and a superscript
2976 \begin_inset Quotes eld
2980 \begin_inset Quotes erd
2984 Letters in math mode are assumed to be variables, and come out in italics.
2985 Numbers are just numbers.
2988 \begin_layout Standard
2989 This math editor is another example of the WYSIWYM philosophy.
2990 In LaTeX, you write a mathematical expression using text and commands like
2997 ; this can be frustrating, because you can't see what an expression looks
2998 like until you LaTeX the file, and may have to spend time to find e.\InsetSpace \thinspace{}
3002 LyX doesn't attempt to get the expression to look perfect (WYSIWYG), but
3003 it gives you an extremely good idea of what the expression will look like.
3004 LaTeX then takes care of the professional typesetting.
3007 \begin_layout Section
3008 Navigating an Equation
3011 \begin_layout Standard
3013 \begin_inset Formula $E=mc^{2}$
3017 \begin_inset Formula $E=1+mc^{2}$
3021 Use the arrow keys to move the cursor into the expression.
3022 Note that when you enter the expression, the purple markers appear to let
3023 you know you're editing math.
3032 to move the cursor past the equals sign, and just type
3033 \begin_inset Quotes eld
3037 \begin_inset Quotes erd
3041 Again, you can use the arrow keys or
3045 to leave the formula\SpecialChar \@.
3049 \begin_layout Standard
3050 Other than the special keys described below, typing in math mode is like
3051 editing regular text.
3061 Select text either with the arrow keys or with the mouse.
3064 Edit\SpecialChar \menuseparator
3067 works in math mode as well as cut and paste.
3068 One thing to be careful of: If you are left or right outside a formula
3077 , respectively, you delete the whole formula.
3078 Luckily, you can just use
3085 \begin_layout Standard
3086 What if you want to change
3087 \begin_inset Formula $E=mc^{2}$
3091 \begin_inset Formula $E=mc^{2.5}+1$
3094 ? Again, you can use the mouse to click in the right place.
3095 However, you can also use the arrow keys.
3096 If the cursor is just after the
3097 \begin_inset Quotes eld
3101 \begin_inset Quotes erd
3105 \begin_inset Quotes eld
3109 \begin_inset Quotes erd
3116 and the cursor is moved to the level of the superscript, just before the
3118 \begin_inset Quotes eld
3122 \begin_inset Quotes erd
3127 \begin_inset Quotes eld
3131 \begin_inset Quotes erd
3139 will move the cursor back to the regular level.
3148 , the cursor will be placed
3152 the superscript (so that you can then type the
3153 \begin_inset Quotes eld
3157 \begin_inset Quotes erd
3163 \begin_layout Section
3164 Exponents and Indices
3167 \begin_layout Standard
3168 An exponent can be entered from the
3173 (see below), but it's actually simpler just to type the caret key,
3174 \begin_inset Quotes eld
3178 \begin_inset Quotes erd
3182 LyX will place another blue rectangle in the superscript, so that whatever
3183 you write next will be superscripted, and in a smaller font size.
3184 Everything you type until you hit a
3192 to exit the formula entirely) will be in the superscript.
3195 \begin_layout Standard
3196 Writing a subscript (index) is just as easy --- start one by typing the
3198 \begin_inset Quotes eld
3202 \begin_inset Quotes eld
3206 You can subscript and superscript both subscripts and superscripts like
3208 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3215 \begin_layout Standard
3227 \begin_layout Section
3231 \begin_layout Standard
3237 is a convenient way to enter symbols or to perform complicated formula
3239 Many of these operations can be accomplished from the keyboard or the
3241 Edit\SpecialChar \menuseparator
3246 Insert\SpecialChar \menuseparator
3250 However, we're going to concentrate on using the
3255 , just to let you know what's out there; you can learn keyboard shortcuts
3256 later, from other manuals.
3259 \begin_layout Standard
3264 is shown when the cursor is in a formula and can also be turned on manually
3267 View\SpecialChar \menuseparator
3271 When you click there on
3272 \begin_inset Quotes eld
3276 \begin_inset Quotes erd
3279 the toolbar will be shown permanently at the bottom; this state is visualized
3284 menu with a checkmark.
3285 When you click in this state again on
3286 \begin_inset Quotes eld
3290 \begin_inset Quotes erd
3301 is only shown when the cursor is within a formula; this state is visualized
3302 by the renaming of the menu entry from
3303 \begin_inset Quotes eld
3307 \begin_inset Quotes erd
3311 \begin_inset Quotes eld
3316 \begin_inset Quotes erd
3322 \begin_layout Subsection
3326 \begin_layout Standard
3332 which allow you to choose from a large array of symbols used in math: various
3333 arrows, relations, operators, and sums and integrals.
3334 Note that subscripting and superscripting allow you to put lower and upper
3335 limits on sums and integrals.
3339 \begin_layout Standard
3340 \begin_inset Quotes eld
3343 Nothing you can do that can't be done\SpecialChar \ldots{}
3345 \begin_inset Formula $\heartsuit$
3349 \begin_inset Quotes erd
3355 \begin_layout Subsection
3356 Square roots, accents, and delimiters
3359 \begin_layout Standard
3360 To type a square root, just click on the button
3361 \begin_inset Graphics
3362 filename ../images/math/sqrt.png
3369 The square root appears, and the cursor is in a new insertion point inside
3371 You can type variables, numbers, other square roots, fractions, whatever
3373 LyX will automatically resize the square root to fit what's inside.
3376 \begin_layout Standard
3377 Accenting a character (
3378 \begin_inset Formula $\overrightarrow{v}$
3381 ) or group of characters (
3382 \begin_inset Formula $\overrightarrow{a+b}$
3385 ) is done the same way.
3386 Decorations are available from the toolbar via the button
3387 \begin_inset Graphics
3388 filename ../images/math/hat.png
3395 Click on a decoration, and LyX will insert that decoration with an insertion
3396 point under (or over) it.
3397 Just type what you want in the insertion point.
3398 There are two sets of decorations: those that resize with the text you
3399 type, and those that have fixed size, and are most appropriate for a single
3404 \begin_layout Standard
3405 Delimiters such as parentheses, brackets, and braces work similarly, but
3406 are a bit more complicated.
3407 Hit the delimiter button
3408 \begin_inset Graphics
3409 filename ../images/dialog-show_mathdelimiter.png
3420 Your current selection of delimiters is displayed in a box.
3421 It's a pair of parentheses by default, but you can choose a pair of braces,
3422 a brace and a parenthesis, or choose the empty square to have something
3424 \begin_inset Quotes eld
3428 \begin_inset Formula $a=\left\langle 7\right.$
3432 \begin_inset Quotes erd
3435 (the empty delimiter is displayed as a broken line in LyX, but won't show
3439 \begin_layout Standard
3440 If you're lazy, you can type actual parentheses in math mode, rather than
3446 However, those parentheses will be the same size as regular text, which
3447 will look bad if you have a big fraction or matrix inside the parentheses.
3448 So better use in this case one of the three delimiter buttons that insert
3449 directly e.\InsetSpace \thinspace{}
3451 a (\InsetSpace \thinspace{}
3455 \begin_layout Standard
3456 You can also put delimiters or a square root sign or a decoration on already
3457 existing formula parts.
3458 Select the portion of the formula that you want to adjust, and then click
3459 on the button you want from the
3465 Try using this to change Newton's second law from scalar to vector form
3467 \begin_inset Formula $f=ma$
3471 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3475 Once you've learned about matrices, this is how you'll put parentheses
3476 or brackets around them.
3479 \begin_layout Subsection
3483 \begin_layout Standard
3484 To create a fraction, click on the fraction button
3485 \begin_inset Graphics
3486 filename ../images/math/frac.png
3499 LyX writes two insertion points in a fraction.
3500 As you would expect, you can use arrow keys or the mouse to move around
3502 Click on the top square and type
3503 \begin_inset Quotes eld
3507 \begin_inset Quotes erd
3516 \begin_inset Quotes eld
3520 \begin_inset Quotes erd
3524 You've made a fraction! Of course you can type anything within each of
3525 the two boxes: variables with exponents, square roots, other fractions,
3530 \begin_layout Standard
3542 \begin_layout Subsection
3543 TeX mode: Limits, log, sin and others
3546 \begin_layout Standard
3547 Because letters in math mode are considered to be variables, if you type
3549 \begin_inset Quotes eld
3553 \begin_inset Quotes erd
3556 in math mode, LyX thinks you are typing the product of the three variables
3558 \begin_inset Formula $s$
3562 \begin_inset Formula $i$
3566 \begin_inset Formula $n$
3570 The three letters will be typeset in italics, when what you really wanted
3572 \begin_inset Quotes eld
3576 \begin_inset Quotes erd
3580 In addition, LyX won't put a space between the word
3581 \begin_inset Quotes eld
3585 \begin_inset Quotes erd
3589 \begin_inset Quotes eld
3593 \begin_inset Quotes erd
3600 will exit the formula).
3602 \begin_inset Quotes eld
3606 \begin_inset Formula $\sin(x)$
3610 \begin_inset Quotes erd
3614 \begin_inset Quotes eld
3618 \begin_inset Formula $sin(x)$
3622 \begin_inset Quotes erd
3628 \begin_layout Standard
3635 \begin_inset Graphics
3636 filename ../images/math/functions.png
3643 \begin_inset Quotes eld
3647 \begin_inset Quotes erd
3650 in the appearing function list.
3652 \begin_inset Quotes eld
3656 \begin_inset Quotes erd
3659 is displayed in LyX in black, and set in upright roman type.
3660 The whole word is treated as one symbol, so if you type
3664 , it will delete the whole word.
3666 \begin_inset Quotes eld
3670 \begin_inset Quotes erd
3673 , which will be written in blue italics, like you expect in a formula.
3674 In the output, the expression will be correctly typeset.
3678 \begin_layout Standard
3679 The function list include other trigonometric functions and their inverses,
3680 hyperbolic functions, logarithms, limits, and quite a few others.
3681 These functions can take subscripts and superscripts, important for typing
3683 \begin_inset Quotes eld
3687 \begin_inset Formula $\cos^{2}\theta$
3691 \begin_inset Quotes erd
3695 \begin_inset Quotes eld
3699 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3703 \begin_inset Quotes erd
3709 \begin_layout Standard
3721 \begin_layout Subsection
3723 \begin_inset LatexCommand label
3731 \begin_layout Standard
3732 Click on the matrix button
3733 \begin_inset Graphics
3734 filename ../images/dialog-show_mathmatrix.png
3746 The appearing dialog allows you to choose how many rows and columns you
3747 want in your matrix.
3748 Choose 2 rows and 3 columns and hit
3753 LyX prints 6 insertion points in a
3754 \begin_inset Formula $2\times3$
3758 As usual, you can put any sort of formula expression (a square root, another
3759 matrix, etc.) in each insertion point.
3760 You can also leave some of the insertion points empty if you want.
3763 \begin_layout Standard
3768 can be used to move horizontally between the columns of a matrix.
3769 Alternatively, you can use the arrow keys to move around - hitting
3773 at the end of one box will move to the next box,
3777 will move to the next row, etc.
3780 \begin_layout Standard
3781 If you need to change the number of rows and columns, use the menu
3783 Edit\SpecialChar \menuseparator
3784 Math\SpecialChar \menuseparator
3785 Rows\InsetSpace \thinspace{}
3786 &\InsetSpace \thinspace{}
3789 or the math toolbar buttons
3790 \begin_inset Graphics
3791 filename ../images/tabular-feature_append-row.png
3798 \begin_inset Graphics
3799 filename ../images/tabular-feature_delete-row.png
3806 \begin_inset Graphics
3807 filename ../images/tabular-feature_append-column.png
3814 \begin_inset Graphics
3815 filename ../images/tabular-feature_delete-column.png
3824 \begin_layout Standard
3829 for information on how to change the horizontal alignment of each column,
3830 and how to change the vertical position of the whole matrix.
3831 Note that if you want to write a table containing text, you should use
3832 LyX's wonderful table support, rather than trying to write text in a matrix.
3835 \begin_layout Subsection
3839 \begin_layout Standard
3840 All of the expressions we have written so far have been on the same line
3841 as the text that came before and after them, otherwise known as inline
3843 This is fine for short, simple expressions, but if you want to write larger
3844 ones, or if you want your expressions to stand out from the text, you need
3845 to write them in display mode.
3846 In addition, only displayed expressions can be labeled and numbered (see
3851 ), and multi-line equations must be in display mode.
3854 \begin_layout Standard
3855 Click on the display button
3856 \begin_inset Graphics
3857 filename ../images/math-display.png
3868 , which represents a couple lines of text before and after a centered blue
3870 LyX inserts a formula, but the insertion point is on a new line, and it's
3871 centered within that line.
3872 Now type an expression and run LaTeX to see how it looks.
3873 The display button is actually a toggle; use it now to change a couple
3874 of your expressions to display mode and back.
3878 \begin_layout Standard
3879 Display mode has a couple differences from inline mode:
3882 \begin_layout Itemize
3883 The default font is larger for a few symbols, like
3884 \begin_inset Formula $\sum$
3888 \begin_inset Formula $\int$
3894 \begin_layout Itemize
3895 Subscripts and superscripts for limits and sums (but not integrals) are
3896 written under rather than next to the symbols
3899 \begin_layout Itemize
3903 \begin_layout Standard
3904 Other than these differences, though, displayed expressions and inline expressio
3905 ns are very similar.
3908 \begin_layout Standard
3909 One final note about the way displayed formulas are typeset: Be careful
3910 about whether you're putting your equation into a new paragraph or not.
3911 If your formula is in the middle of a sentence or paragraph, then don't
3917 Doing so will cause the text
3921 the formula to start a new paragraph.
3922 That text will therefore eventually be indented, depending on your document
3923 paragraph settings, which is probably not what you want.
3926 \begin_layout Standard
3931 : Put the various equations in
3935 into display mode, and see how they're typeset differently.
3938 \begin_layout Standard
3943 : Using various tools you've learned in this section, you should be able
3944 to write an equation like
3948 \begin_layout Standard
3949 After you've done it the hard way, give
3951 Insert\SpecialChar \menuseparator
3952 Math\SpecialChar \menuseparator
3962 \begin_inset Formula \[
3963 f(x)=\left\{ \begin{array}{cc}
3966 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
3973 \begin_layout Section
3977 \begin_layout Standard
3978 LyX's math editor can do plenty more.
3979 By now, you're familiar with the basics, so we refer to the
3986 \begin_layout Itemize
3987 Labeling and numbering expressions
3990 \begin_layout Itemize
3991 Multi-line equations
3994 \begin_layout Itemize
3995 Change typefaces, e.g., to write bold-face text in an expression.
3998 \begin_layout Itemize
3999 Fine-tune font sizes and spacing within an expression.
4000 (Don't worry about this until your final draft!)
4003 \begin_layout Itemize
4005 These are very powerful, because you just define them once at the top of
4006 the document, and then you can use them throughout the document.
4009 \begin_layout Itemize
4010 Do lots of other things that can't be mentioned in this Tutorial.
4013 \begin_layout Chapter
4017 \begin_layout Section
4018 Other major LyX Features
4021 \begin_layout Standard
4022 We haven't gone through all the possible commands in LyX, and we aren't
4030 Embedded\InsetSpace ~
4033 manual for more information.
4034 We'll just mention a couple more major things LyX can do:
4037 \begin_layout Itemize
4038 LyX has WYSIWYM support for tables.
4041 Insert\SpecialChar \menuseparator
4045 \begin_inset Graphics
4046 filename ../images/tabular-insert.png
4053 Click on the table with the
4062 dialog box which allows extensive table editing.
4065 \begin_layout Itemize
4066 LyX also supports including pictures in any format within documents.
4069 Insert\SpecialChar \menuseparator
4073 \begin_inset Graphics
4074 filename ../images/dialog-show-new-inset_graphics.png
4081 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4082 can have captions, and LyX will automatically generate lists of figures
4086 \begin_layout Itemize
4087 LyX is heavily configurable.
4088 Everything from how the LyX window looks to how the output comes out can
4089 be configured in a number of ways.
4090 Much configuration is done through
4092 Tools\SpecialChar \menuseparator
4096 For more information on this, check out
4098 Help\SpecialChar \menuseparator
4099 Customization\SpecialChar \@.
4103 \begin_layout Itemize
4104 LyX is being developed by a team of programmers on five continents.
4105 Therefore, LyX has better support for non-English languages (such as Dutch,
4106 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4107 ) than many word processors.
4108 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4109 languages Chinese Japanese, and Korean are supported.
4110 You can write documents in other languages and you can also configure LyX
4111 to show its menus and error messages in other languages.
4115 \begin_layout Itemize
4116 The LyX menus feature keybindings.
4117 This means that you can do
4119 File\SpecialChar \menuseparator
4130 or by using the binding which is shown next to it in the menu (C-O by default).
4131 Keybindings are also configurable.
4132 For information on this, check out
4134 Help\SpecialChar \menuseparator
4135 Customization\SpecialChar \@.
4139 \begin_layout Itemize
4140 LyX can read LaTeX documents.
4141 See section\InsetSpace ~
4143 \begin_inset LatexCommand ref
4144 reference "sec:tex2lyx"
4151 \begin_layout Itemize
4152 Spellchecking, thesaurus, and word count facilities are available.
4155 \begin_layout Itemize
4156 Generation of indexes and nomenclatures/glossaries is supported.
4159 \begin_layout Section
4161 \begin_inset LatexCommand label
4162 name "sec:latexusers"
4169 \begin_layout Standard
4170 If you don't know anything about LaTeX, you don't have to read this section.
4171 Actually, you might want to
4175 about LaTeX, and then read this chapter.
4176 However, some who begin to use LyX will be familiar with LaTeX.
4177 If you are such a person, you may be wondering if LyX can really do everything
4179 The short answer is that LyX can do pretty much everything LaTeX can do
4180 in one form or another, and it definitely simplifies most parts of writing
4184 \begin_layout Standard
4185 Because this is just a tutorial, we are only going to mention things that
4186 new LyX users will most likely be interested in.
4187 In the interests of keeping the Tutorial short, we will give only minimal
4191 Extended\InsetSpace ~
4196 Embedded\InsetSpace ~
4199 manual have a great deal of information on differences between LyX and
4200 LaTeX, and how to do various LaTeX tricks in LyX.
4203 \begin_layout Subsection
4207 \begin_layout Standard
4208 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4209 will be displayed in red on the screen.
4210 You can use TeX commands in LyX by choosing
4212 Insert\SpecialChar \menuseparator
4217 \begin_inset Graphics
4218 filename ../images/ert-insert.png
4225 This creates a box where everything within it is passed straight to LaTeX.
4228 \begin_layout Standard
4229 In a math formula, TeX mode is handled a bit differently.
4230 TeX mode is there entered by typing a backslash.
4231 The backslash is not written out, but anything you type afterwards will
4233 You exit TeX mode by typing
4237 or some other non-alphabetic character, like a number, underscore, caret,
4239 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4240 will convert it to WYSIWYM\SpecialChar \@.
4242 \begin_inset Quotes eld
4252 \begin_inset Quotes erd
4255 in a formula and then press
4259 , LyX will change the red
4260 \begin_inset Quotes eld
4264 \begin_inset Quotes erd
4268 \begin_inset Quotes eld
4272 \begin_inset Formula $\gamma$
4276 \begin_inset Quotes erd
4280 This will work for almost all, non-complicated math macros.
4281 This may be faster than using the
4286 , and will be especially convenient for experienced LaTeX users.
4289 \begin_layout Standard
4290 As a special case, if you type a brace in TeX mode, then the beginning
4294 ending braces will be inserted in red, then take you
4298 of TeX mode and place the cursor between the braces.
4299 This makes it more convenient to type commands that LyX doesn't know which
4303 \begin_layout Standard
4304 LyX can't do absolutely everything that LaTeX can do.
4305 Some fancy functions are not supported at all, while some work but aren't
4307 TeX mode allows users to get the full flexibility of LaTeX, while having
4308 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4309 LyX could never support every LaTeX package.
4316 in the preamble (see section\InsetSpace ~
4318 \begin_inset LatexCommand ref
4319 reference "sec:preamble"
4323 ), you can use any package you want --- although you won't have WYSIWYM
4324 support for that package's features.
4327 \begin_layout Subsection
4328 Importing LaTeX Documents ---
4333 \begin_inset LatexCommand label
4341 \begin_layout Standard
4342 You can import a LaTeX file into LyX by using the
4344 File\SpecialChar \menuseparator
4345 Import\SpecialChar \menuseparator
4350 This will call the program
4354 which will create a file
4362 and then open that file.
4363 If the translation doesn't work, you can try calling
4367 from the command line, possibly using fancier options.
4370 \begin_layout Standard
4375 will translate most legal LaTeX, but not everything.
4376 It will leave things it doesn't understand in TeX mode, so after translating
4381 , you can look for red text and hand-edit it to look right.
4384 \begin_layout Standard
4389 has its own manpage.
4390 Read it to find out about which LaTeX commands and environments aren't
4391 supported, bugs (and how to get around them), and how to use the various
4395 \begin_layout Subsection
4396 Converting LyX Documents to LaTeX
4399 \begin_layout Standard
4400 You might wish to convert a LyX Document to a LaTeX file.
4401 For example, a co-worker or co-author who doesn't have LyX might want to
4405 File\SpecialChar \menuseparator
4406 Export\SpecialChar \menuseparator
4410 This will create a file
4418 file you are editing.
4419 LyX always creates temporary LaTeX files when viewing or printing files.
4422 \begin_layout Subsection
4426 \begin_layout Subsubsection
4430 \begin_layout Standard
4433 Document\SpecialChar \menuseparator
4436 dialog takes care of many of the options that you would input in a
4443 Change the class, default font size and paper size here.
4444 Put any extra options to the
4462 \begin_layout Subsubsection
4463 Other Preamble Matter
4464 \begin_inset LatexCommand label
4472 \begin_layout Standard
4473 If you have special commands to put in the preamble of a LaTeX file, you
4474 can use them in a LyX document as well.
4477 Document\SpecialChar \menuseparator
4478 Settings\SpecialChar \menuseparator
4482 and type in the dialog window (or from the document settings dialog, depending
4484 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4487 \begin_layout Subsection
4491 \begin_layout Standard
4492 LyX has support for BibTeX, which allows you to build databases of bibliographic
4493 al references to be used in multiple documents.
4499 nsert\SpecialChar \menuseparator
4506 C\SpecialChar \menuseparator
4523 field you load BibTeX files, in the
4527 field you can load BibTeX style files.
4530 \begin_layout Standard
4531 After you've done this, you can use citations from any bibliographies you're
4534 Insert\SpecialChar \menuseparator
4537 (see section\InsetSpace ~
4539 \begin_inset LatexCommand ref
4540 reference "sec:bibliographies"
4545 LyX will take care of running BibTeX.
4550 dialog will show a list of all the references in your
4557 \begin_layout Section
4561 \begin_layout Standard
4562 Sometimes when you LaTeX a document, there will be errors, things that LyX
4563 or LaTeX can't understand.
4564 When this happens, LyX will open a
4570 Clicking on individual errors in this dialog will take you to the place
4571 in the LyX document where the error occurs and also display the detailed
4572 LaTeX error message.