1 #LyX 1.6.3svn 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 \fi % end if pdflatex is used
24 % the pages of the TOC is numbered roman
25 % and a pdf-bookmark for the TOC is added
26 \let\myTOC\tableofcontents
27 \renewcommand\tableofcontents{%
29 \pdfbookmark[1]{\contentsname}{}
33 % redefine the \LyX macro for PDF bookmarks
34 \def\LyX{\texorpdfstring{%
35 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
38 \use_default_options false
43 \font_typewriter default
44 \font_default_family default
54 \pdf_title "The LyX Tutorial"
55 \pdf_author "LyX Team"
56 \pdf_subject "LyX-documentation Tutorial"
57 \pdf_keywords "LyX, documentation"
59 \pdf_bookmarksnumbered true
60 \pdf_bookmarksopen true
61 \pdf_bookmarksopenlevel 1
66 \pdf_pdfusetitle false
67 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true,pdfstartview=XYZ, plainpages=false, pdfpagelabels"
74 \paperorientation portrait
77 \paragraph_separation indent
79 \quotes_language english
82 \paperpagestyle headings
83 \tracking_changes false
100 \begin_layout Plain Layout
101 If you have comments or error corrections, please send them to the LyX Documenta
105 \begin_inset CommandInset href
107 target "lyx-docs@lists.lyx.org"
122 \begin_layout Standard
123 \begin_inset CommandInset toc
124 LatexCommand tableofcontents
131 \begin_layout Chapter
135 \begin_layout Section
139 \begin_layout Standard
140 This file is designed for all of you who have never heard of LaTeX, or don't
142 Now, don't panic - you won't need to learn LaTeX to use LyX.
143 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
145 There are some things you will need to learn, however, in order to use
149 \begin_layout Standard
150 Some of you probably found your way to this document because you tried to
151 put two spaces after a
152 \begin_inset Quotes eld
156 \begin_inset Quotes erd
159 or tried to put 3 blank lines between paragraphs.
160 You found out you couldn't and in fact, you'll find out that most of the
161 little tricks you're accustomed to use in other word processors won't work
163 That's because most word processors you've used before allow you to manually
164 enter all spacings, font changes, and so on.
165 So you end up not only writing a document but typesetting it, too.
166 LyX does the typesetting for you, in a consistent fashion, letting you
167 focus on the important things, like the content of your writing.
170 \begin_layout Standard
171 So read on to learn more about LyX.
172 Reading this tutorial is definitely worth the time.
175 \begin_layout Section
185 \begin_layout Standard
186 Before we get started with this section, we want to make a quick note of
192 uses the notation outlined in the
197 If you came to this manual first, please read the
201 before you continue with the
208 \begin_layout Standard
209 Now that you know which fonts mean what, we want to talk a bit about what
217 \begin_layout Subsection
218 Getting the most out of the Tutorial
221 \begin_layout Standard
222 This tutorial consists of examples and exercises.
223 To get the most out of this document, you should read through the document,
224 typing all the little things we're telling you to type and trying out all
225 of the exercises to see if you get them right.
226 For convenience, you might want to print out the PDF version of this document.
229 \begin_layout Standard
230 If you are familiar with LaTeX, you'll probably be able to read the
234 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
235 However, LyX have features you'll want to learn about.
236 Even if you don't feel like reading the rest of the
240 , you should definitely check out Section
245 \begin_inset CommandInset ref
247 reference "sec:latexusers"
251 , which is specifically written for experienced LaTeX users.
254 \begin_layout Subsection
262 \begin_layout Itemize
263 Detailed explanations of all of LyX's features.
267 \begin_layout Standard
276 \begin_layout Itemize
277 Detailed explanations of LaTeX.
281 \begin_layout Standard
283 If you want to learn some of the neat tricks you can do with LaTeX in LyX,
284 you can have a look at the
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
309 \begin_layout Standard
311 You're ready to start writing.
312 Before you do, there are a few things we need to mention, which will hopefully
313 make the Tutorial more instructive and useful.
317 \begin_layout Standard
318 Because there is information we can't give you in the Tutorial, the
324 thing that you need to do is find the
331 Start up LyX, Choose the
340 You may want to load the
344 as well (if you're not reading it within LyX already).
345 This way, you can read them while you're writing your own file.
349 \begin_layout Plain Layout
350 They can also serve as good examples of how to use the many features of
356 Note that once you've got more than one document open, you can use the
361 menu or the document tabs to switch between them.
364 \begin_layout Standard
365 In this Tutorial, we're going to assume that you have a fully working version
366 of LyX, as well as a LaTeX-distribution, a DVI-, and a PDF-viewer.
367 This should be the case on all major Linux- and BSD-distribution, as well
368 as on Windows, where this is setup by the LyX installer.
371 \begin_layout Standard
372 Finally, we've written a file to let you practice your LyX skills on, it's
378 Imagine that it was typed by someone who didn't know about any of LyX's
380 As you learn new LyX functions, we'll suggest that you fix those parts
387 \begin_inset Quotes eld
391 \begin_inset Quotes erd
394 hints about how to fix things.
398 \begin_layout Plain Layout
399 The hints are located in yellow
400 \begin_inset Quotes eld
404 \begin_inset Quotes erd
408 Access the text in a note by clicking on it.
413 If you want to cheat, or check what you've done, there's also a file called
418 which contains the same text written and typeset by a LyX master.
421 \begin_layout Standard
422 The example files can be found in the
426 directory of LyX's installation folder.
427 Open the raw document, and use
429 File\SpecialChar \menuseparator
436 to save a copy in your own directory for you to work on.
437 As you fix parts of the raw document, check to see how those changes affect
441 \begin_layout Standard
446 directory contains lots of other examples files.
447 They will show you how to do various fancy things with LyX.
448 After you read the Tutorial, or when you're confused about how to do something
449 fancy in LyX, take a look at these files.
452 \begin_layout Subsection
453 Typing, Viewing, and Exporting
456 \begin_layout Itemize
459 File\SpecialChar \menuseparator
463 \begin_layout Itemize
464 Type a sentence like:
466 This is my first LyX document!
469 \begin_layout Itemize
470 Save your document with
472 File\SpecialChar \menuseparator
481 \begin_layout Itemize
482 Run LaTeX to create a DVI file, with
484 View\SpecialChar \menuseparator
487 or the toolbar button
488 \begin_inset Graphics
489 filename ../images/buffer-view_dvi.png
495 LyX will open a DVI-viewer program displaying your document looking like
500 \begin_layout Plain Layout
501 You can save time by leaving the DVI-viewer running in the background.
504 View\SpecialChar \menuseparator
505 Update\SpecialChar \menuseparator
508 or the toolbar button
509 \begin_inset Graphics
510 filename ../images/buffer-update_dvi.png
515 and just click on the DVI-viewer window (or unminimize it) after LaTeX
524 \begin_layout Itemize
525 Export the ready to print document with
527 File\SpecialChar \menuseparator
535 \begin_layout Standard
536 Congratulations! You've written your first LyX document.
537 All of the rest is just details, which is covered in the other manuals.
540 \begin_layout Subsection
544 \begin_layout Standard
545 LyX can of course do most of the things you're used to do with a word processor.
546 It will word-wrap and indent paragraphs automatically.
547 Here's a quick description of how to do some simple actions.
550 \begin_layout Description
551 Undo LyX has multiple levels of undo, which means you can undo everything
552 you've done since your current editing session started, by selecting
554 Edit\SpecialChar \menuseparator
558 \begin_inset Graphics
559 filename ../images/undo.png
564 ) over and over again.
565 If you undo too much, just select
567 Edit\SpecialChar \menuseparator
571 \begin_inset Graphics
572 filename ../images/redo.png
582 \begin_layout Standard
583 Currently, undo is limited to 100 steps.
584 Undo also doesn't work for
588 ; for instance, not for changes to the document layout what is really a
593 \begin_layout Description
596 Edit\SpecialChar \menuseparator
600 \begin_inset Graphics
601 filename ../images/cut.png
608 Edit\SpecialChar \menuseparator
612 \begin_inset Graphics
613 filename ../images/copy.png
620 Edit\SpecialChar \menuseparator
624 \begin_inset Graphics
625 filename ../images/paste.png
630 ) to cut, copy, and paste.
631 Or automatically paste selected text (including selections from other programs)
639 \begin_layout Description
642 Edit\SpecialChar \menuseparator
654 \begin_inset Graphics
655 filename ../images/dialog-show_findreplace.png
661 In the dialog, search with the
673 button to replace a word you've found.
677 \begin_layout Plain Layout
678 Close the window when you're done or leave it open if you find it more convenien
680 Most dialog boxes in LyX can operate like this.
681 Just be sure you have the right window focus when you're trying to type
682 in the main LyX window or a LyX dialog.
687 If you like, you can specify whether to make the search case-sensitive,
688 or to search for only complete words; you can also search backwards through
692 \begin_layout Description
701 text (which will by default print characters in italics), set it in
709 (usually small caps, used for people's names) from the toggle buttons in
712 Edit\SpecialChar \menuseparator
719 dialog (toolbar button
720 \begin_inset Graphics
721 filename ../images/dialog-show_character.png
729 \begin_layout Description
730 Toolbar There are buttons on the toolbar (just below the menus) which allow
731 you to do some of the more popular functions, such as
742 \begin_layout Standard
743 Of course, you haven't yet written enough to make most of these functions
745 As you write more, though, try undoing, pasting, etc.
748 \begin_layout Subsection
749 WYSIWYM: Whitespace in LyX
752 \begin_layout Standard
753 One of the hardest things for new users to get used to is the way that LyX
755 As many times as you hit
759 , you'll only get one blank line.
760 As many times as you hit
764 , you'll only get one space.
765 On a blank line, LyX won't let you type even one space.
770 key won't move you forward one tab stop; in fact there
774 no tab stops! There's no ruler at the top of the page to let you set tabs
778 \begin_layout Standard
779 Many word processors are based on the WYSIWYG principle:
780 \begin_inset Quotes eld
783 What You See Is What You Get.
784 \begin_inset Quotes erd
787 LyX, on the other hand, is based on the principle that
788 \begin_inset Quotes eld
791 What You See Is What You
796 \begin_inset Quotes erd
799 You type what you mean, and LyX will take care of typesetting it for you,
800 so that the output looks nice.
805 grammatically separates paragraphs, and a
809 grammatically separates words, so there is no reason to have several of
814 has no grammatical function at all, so LyX does not support it.
815 Using LyX, you'll spend more of your time worrying about the
819 of your document, and less time worrying about the
828 for more information on the WYSIWYM concept.
831 \begin_layout Standard
832 LyX does have (many) ways to fine-tune the formatting of your document.
833 After all, LyX might not typeset
842 has information about all that.
847 s and vertical space — which are more powerful and versatile than multiple
848 spaces or blank lines — and ways to change font sizes, character styles,
849 and paragraph alignments by hand.
850 The idea, though, is that you can write your whole document, focusing on
851 content, and just worry about that fine-tuning at the end.
852 With standard word processors, you'll be distracted by document formatting
853 throughout the writing process.
856 \begin_layout Section
860 \begin_layout Standard
861 Different parts of a document have different purposes; we call these parts
867 Most of a document is made up of regular text.
868 Section titles (chapter, subsection, etc.) let the reader know that a new
869 topic or subtopic will be discussed.
870 Certain types of documents have special environments.
871 A journal article will have an abstract and a title.
872 A letter will have neither of these, but will probably have an environment
873 that gives the writer's address.
876 \begin_layout Standard
877 Environments are a major part of the
878 \begin_inset Quotes eld
881 What You See Is What You Mean
882 \begin_inset Quotes erd
886 A given environment may require a certain font style, font size, indenting,
887 line spacing, and more.
888 This problem is aggravated, because the exact formatting for a given environmen
889 t may change: one journal may use boldface, 18 point, centered type for
890 section titles while another uses italicized, 15 point, left justified
891 type; different languages may have different standards for indenting; and
892 bibliography formats can vary widely.
893 LyX lets you avoid learning all the different formatting styles.
896 \begin_layout Standard
901 choice box is located on the left end of the toolbar and looks like this:
903 \begin_inset Graphics
904 filename clipart/ToolbarEnvBox.png
911 It indicates which environment you're currently writing in.
912 While you were writing your first document, it said
913 \begin_inset Quotes eld
917 \begin_inset Quotes erd
920 which is the default environment for text.
921 Now you will put a number of environments in your new document so that
922 you can see how they work.
925 \begin_layout Subsection
926 Sections and Subsections
929 \begin_layout Standard
934 on the first line of your LyX file, and select
946 \begin_layout Plain Layout
952 If nothing is selected, LyX changes the paragraph you are currently in
953 to the selected environment.
954 Alternatively, you can change several paragraphs to a different environment
955 by selecting them before picking an environment.
972 , which will be covered below.
973 LyX numbers the section
974 \begin_inset Quotes eld
978 \begin_inset Quotes erd
981 and typesets the section heading (title) in a larger font.
992 \begin_inset Quotes eld
996 \begin_inset Quotes erd
1000 \begin_inset Quotes eld
1004 \begin_inset Quotes erd
1008 Section headings, like most environments, are assumed to end when you type
1014 Type the document introduction:
1017 \begin_layout LyX-Code
1018 This is an introduction to my first LyX document.
1021 \begin_layout Standard
1036 \begin_inset Quotes eld
1040 \begin_inset Quotes erd
1043 and waits for you to type a title.
1045 \begin_inset Quotes eld
1051 \begin_inset space ~
1057 \begin_inset Quotes erd
1060 , and you'll see that LyX again sets it as a section title.
1063 \begin_layout Standard
1065 Go to the end of Section
1066 \begin_inset space ~
1070 \begin_inset Quotes eld
1073 my first LyX document
1074 \begin_inset Quotes erd
1091 \begin_inset Quotes eld
1095 \begin_inset Quotes erd
1098 and waits for you to type a title.
1105 \begin_inset space ~
1109 \begin_inset Quotes eld
1113 \begin_inset Quotes erd
1116 , which used to be Section
1117 \begin_inset space ~
1120 2, has been automatically renumbered to Section
1121 \begin_inset space ~
1124 3! In true WYSIWYM fashion, you just need to identify the text that makes
1125 up the section titles, and LyX takes care of numbering the sections and
1129 \begin_layout Standard
1138 environment, and type the following five lines:
1141 \begin_layout LyX-Code
1142 Sections and subsections are described below.
1145 \begin_layout LyX-Code
1149 \begin_layout LyX-Code
1150 Sections are bigger than subsections.
1153 \begin_layout LyX-Code
1154 Subsection description
1157 \begin_layout LyX-Code
1158 Subsections are smaller than sections.
1161 \begin_layout Standard
1162 Click on the second line and select
1171 LyX numbers the subsection
1172 \begin_inset Quotes eld
1176 \begin_inset Quotes erd
1179 , and typesets it in a font which is bigger than regular text but smaller
1180 than the section title.
1181 Change the fourth line
1185 environment as well.
1186 As you probably expected, LyX automatically numbered the section
1187 \begin_inset Quotes eld
1191 \begin_inset Quotes erd
1195 If you put yet another section before Section
1196 \begin_inset space ~
1200 \begin_inset space ~
1203 2 will be renumbered as Section 3, and the subsections will be renumbered
1205 \begin_inset Quotes eld
1209 \begin_inset Quotes erd
1213 \begin_inset Quotes eld
1217 \begin_inset Quotes erd
1224 \begin_layout Standard
1225 Further levels of sectioning include
1238 We'll let you play with these on your own.
1239 You may notice that paragraph and subparagraph headings are not numbered
1240 by default, and that subparagraphs are indented; see the
1244 for an explanation and how to change this.
1249 headings are actually the highest level of sectioning, above
1253 s, but you're only allowed to use them in certain types (text classes) of
1254 LyX documents (see Section
1255 \begin_inset space ~
1259 \begin_inset CommandInset ref
1261 reference "sec:Document-Classes"
1269 \begin_layout Standard
1270 Finally, you may want to have sections or subsections that are not numbered.
1271 There are environments for this as well.
1272 If you change one of your section headings to the
1276 environment (you may have to scroll down in the
1280 box to find it), LyX will use the same font size for the heading as it
1281 uses for a regular section, but it won't number that section.
1282 There are corresponding
1283 \begin_inset Quotes eld
1287 \begin_inset Quotes erd
1290 heading environments for
1299 Try changing some of your sections or subsections to the starred environments,
1300 and note how the other sections' numbers are updated.
1303 \begin_layout Standard
1308 : Fix the section and subsection headings in
1316 \begin_layout Subsection
1320 \begin_layout Standard
1321 LyX has several different environments for typesetting lists.
1322 The various list environments free you from hitting
1326 a million times when writing an outline, or from renumbering a whole list
1327 when you want to add a point in the middle of the list.
1328 Different types of documents logically require different list environments:
1331 \begin_layout Itemize
1332 A slide presentation might use the
1336 environment's bulleted lists to describe different points.
1340 \begin_layout Itemize
1341 An outline would use the
1345 environment's numbered lists (and lettered sublists).
1349 \begin_layout Itemize
1350 A document describing several software packages could use the
1354 environment, where each item in the list begins with a bold-faced word.
1358 \begin_layout Itemize
1363 environment is a slightly different form of the
1370 \begin_layout Standard
1371 Let's write a list of reasons why LyX is better than other word processors.
1372 Somewhere in your document, type:
1375 \begin_layout Standard
1378 LyX is better than other word processors because:
1381 \begin_layout Standard
1397 \begin_inset Quotes eld
1401 \begin_inset Quotes erd
1405 Type in your reasons:
1408 \begin_layout LyX-Code
1409 Typesetting is done for you.
1412 \begin_layout LyX-Code
1416 \begin_layout LyX-Code
1417 Lists are very easy to create!
1420 \begin_layout Standard
1421 List environments, unlike headings, do not end when you type
1426 Instead, LyX assumes you're going on to the next item in the list.
1427 The above will therefore result in a three-item list.
1428 If you want more than one paragraph within one list
1432 , one way is to use the
1435 \begin_inset space ~
1440 , which you get by typing
1445 In order to get out of the list, you need to reselect the
1449 environment (or just use the keybinding,
1452 \begin_inset space ~
1460 \begin_layout Standard
1461 You've got a beautiful itemized list.
1462 You might want to run LaTeX to see how the list looks when printed out.
1463 But what if you wanted to number the reasons? Well, just select the whole
1468 \begin_layout Plain Layout
1469 LyX won't let you select the first bullet unless you also select the paragraph
1474 the list, which you probably don't want to do.
1475 Similarly, you can't select the actual number in a numbered section title.
1476 This is on purpose because the bullet or number depends on the document
1477 settings or text position, respectively.
1491 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1495 \begin_layout Standard
1496 While the list is still selected, you can change to the other two list environme
1505 , in order to see what they look like.
1506 For those two environments, each list item is made up of a term, which
1507 is the item's first word, followed by a definition, which is the rest of
1508 the paragraph (until you hit
1512 .) The term is either typeset in boldface (
1517 \begin_inset Quotes eld
1521 \begin_inset Quotes erd
1528 \begin_layout Plain Layout
1529 But a typesetter's tab, which will change to fit the size of the largest
1530 term, not a pathetic, rigid, unchangeable typewriter
1543 ) from the rest of the paragraph.
1544 If you want to have more than one word in the definition, then separate
1548 \begin_inset space ~
1556 \begin_layout Standard
1561 : Typeset the list in
1566 \begin_layout Standard
1567 You can nest lists within each other in all sorts of interesting ways.
1568 An obvious example would be writing outlines.
1569 Numbered and bulleted lists will have different numbering and bulleting
1570 schemes for sublists.
1575 for details on the different sorts of lists and for examples of nestings.
1578 \begin_layout Subsection
1579 Other environments: Verses, Quotations, and more
1582 \begin_layout Standard
1583 There are two environments for setting quotations apart from surrounding
1588 for short quotes and
1601 \begin_layout Plain Layout
1602 used in this Tutorial for the long typing examples
1611 font; this environment is the only place in LyX where you're allowed to
1612 use multiple spaces to allow code indenting.
1613 You can even write poetry using the
1621 to separate stanzas, and
1625 to separate lines within a stanza.
1630 for more complete descriptions of all of the available LyX environments.
1633 \begin_layout Standard
1638 : Correctly typeset the
1647 \begin_inset Newline newline
1655 \begin_layout Chapter
1659 \begin_layout Standard
1660 The previous chapter hopefully allowed you to get used to writing in LyX.
1661 It introduced you to the basic editing operations in LyX, as well as the
1662 powerful method of writing with environments.
1663 Most people who use LyX, though, will want to write documents: papers,
1664 articles, books, manuals, or letters.
1665 This chapter is meant to take you from simply writing text with LyX to
1666 writing a complete document.
1667 It will introduce you to text classes, which allow you to write different
1669 It will then describe many of the additions that turn text into a document,
1670 such as titles, footnotes, cross references, bibliographies, and tables
1674 \begin_layout Section
1676 \begin_inset CommandInset label
1678 name "sec:Document-Classes"
1685 \begin_layout Standard
1686 Different sorts of documents should be typeset differently.
1687 For example, books are generally printed double-sided, while articles are
1689 In addition, many documents contain special environments: letters contain
1690 some environments — such as the sender's address and the signature — which
1691 do not make sense in a book or article.
1700 \begin_layout Plain Layout
1701 for LaTeX users: this is equivalent to the LaTeX document class
1706 takes care of these large scale differences between different sorts of
1708 This Tutorial, for example, was written in the
1713 Document classes are another major part of the WYSIWYM philosophy; they
1714 tell LyX how to typeset the document, so you don't need to know how.
1717 \begin_layout Standard
1718 Your document is probably being written in the
1726 \begin_layout Plain Layout
1727 That's usually the default document class
1732 Try changing to other document classes (using the
1734 Document\SpecialChar \menuseparator
1737 dialog) to see how they are typeset differently.
1738 If you change your document to the
1742 document class and look at the
1746 box, you'll see that most of the allowed environments are the same.
1747 However, you can now use the
1752 If you are ever unsure about which environments you can use in a given
1753 document class, just consult the
1760 \begin_layout Standard
1761 Font sizes, one- or two-column printing, and page headings are just some
1762 of the ways journals' typesettings differ from one another.
1763 As the Computer Age continues to mature, journals have begun accepting
1764 electronic submissions, creating LaTeX
1765 \begin_inset Quotes eld
1769 \begin_inset Quotes erd
1772 so that authors can submit correctly typeset articles.
1773 LyX is set up to support this as well.
1774 For example, LyX supports typesetting (and extra environments) for the
1775 American Mathematics Society journals using the
1778 \begin_inset space ~
1786 \begin_layout Standard
1787 Here is a very quick reference to some of the document classes.
1790 Special Document Classes
1796 manual for many more details.
1799 \begin_layout Standard
1801 \begin_inset Tabular
1802 <lyxtabular version="3" rows="7" columns="2">
1804 <column alignment="center" valignment="top" width="0pt">
1805 <column alignment="center" valignment="top" width="0pt">
1807 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1810 \begin_layout Plain Layout
1816 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1819 \begin_layout Plain Layout
1827 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1830 \begin_layout Plain Layout
1836 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1839 \begin_layout Plain Layout
1840 one-sided, no chapters
1847 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1850 \begin_layout Plain Layout
1856 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1859 \begin_layout Plain Layout
1860 layout & environments for American Math Society
1867 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1870 \begin_layout Plain Layout
1876 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1879 \begin_layout Plain Layout
1880 longer than article, two-sided
1887 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1890 \begin_layout Plain Layout
1896 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1899 \begin_layout Plain Layout
1900 report + front and back matter
1907 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1910 \begin_layout Plain Layout
1916 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1919 \begin_layout Plain Layout
1927 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1930 \begin_layout Plain Layout
1936 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1939 \begin_layout Plain Layout
1940 lots of extra environments for address, signature\SpecialChar \ldots{}
1954 \begin_layout Section
1955 Templates: Writing a Letter
1958 \begin_layout Standard
1959 One way to write a letter would be to open a new file, and choose a
1965 Document\SpecialChar \menuseparator
1969 While this is the most obvious way to write a letter, it seems like extra
1971 Every time you write a business letter, you want to have your address,
1972 the address you're sending to, a body, a signature, etc.
1977 for letters, which contains a sample letter; once you have a template,
1978 you can just replace a couple parts of the letter with your text each time
1982 \begin_layout Standard
1983 Open a new file with
1985 File\SpecialChar \menuseparator
1987 \begin_inset space ~
1991 \begin_inset space ~
2002 Save and print the file to see how the various environments are typeset.
2005 \begin_layout Standard
2006 When you look at the
2010 box, you'll see several environments, like the
2013 \begin_inset space ~
2018 environment, which don't even exist in most other document classes.
2028 You can play around for a while to figure out how the various environments
2030 You'll notice for example that the
2034 environment has the word
2035 \begin_inset Quotes eld
2039 \begin_inset Quotes eld
2042 in red before the actual text of the signature.
2043 This word doesn't show up in the actual letter, as you'll see if you view/expor
2045 It's just there to let you know where the signature goes.
2046 Also, note that it doesn't matter where in the file the
2051 Remember, LyX is WYSIWYM; you can put the
2055 environment anywhere you want, but LyX knows that in the printout, the
2056 signature should be at the end.
2059 \begin_layout Standard
2060 A template is just a regular LyX file.
2061 This means you can fill in your address and signature and save the file
2063 From now on, any time you want to write a letter, you can use the new template
2065 We don't have to suggest an actual
2066 \begin_inset Quotes eld
2070 \begin_inset Quotes erd
2073 here; just write a letter to someone!
2077 \begin_layout Plain Layout
2078 One warning, if you're writing from a template.
2079 If you erase all of the text in an environment — for example, if you erase
2083 \begin_inset space ~
2088 field so that you can replace it with your own — and then you move the
2089 cursor without writing any text, the environment may disappear.
2090 This is because most environments cannot exist without any text in them.
2091 Just reselect the environment from the
2103 \begin_layout Standard
2104 Templates can be a huge time-saver, and we urge you to use them whenever
2106 In addition, they can help a person learn how to use some of the fancier
2108 Finally, they may be useful for a person who is configuring LyX for a bunch
2109 of less computer-aware users.
2110 When they're first learning LyX, it will be much less intimidating if they
2111 have a letter template customized for their company, for example.
2114 \begin_layout Section
2118 \begin_layout Standard
2119 LyX (like LaTeX) considers the title — which may contain the actual title,
2120 the author, the date, and even an abstract of a paper — to be a separate
2121 part of the document.
2124 \begin_layout Standard
2125 Go back to your LyX document and make sure it's using the
2133 \begin_layout Plain Layout
2134 You should not be using the letter any more, since the
2138 document class doesn't allow titles.
2143 Type a title on the first line, and change the line to the
2148 On the next line, type your name and change it to the
2153 On the next line, write the date in the
2158 Type a paragraph or two summarizing your document using the
2163 Notice how the title is presented when it's printed out.
2164 If you changed the document format to Book, you'll get a separate title
2165 page, like the first page of this tutorial.
2168 \begin_layout Standard
2173 : Fix the title, date, and author in
2178 \begin_layout Section
2179 Labels and Cross-References
2182 \begin_layout Standard
2183 You can label section headings, list items, formulas, footnotes, and floats
2187 \begin_layout Plain Layout
2188 Floats are explained in the
2202 Once you do so, you can refer to this section in other parts of the document,
2203 using cross-references.
2204 You can refer either to the section's number, or to the page that the section
2206 As with section numbering, LyX also takes care about cross-reference numbering
2208 Automatic labels and cross-references are one of the best advantages of
2209 LyX (and LaTeX) over conventional word processors.
2212 \begin_layout Subsection
2216 \begin_layout Standard
2217 Go to our second section, whose title is
2218 \begin_inset Quotes eld
2222 \begin_inset Quotes erd
2226 Click at the end of the section title line, and select
2228 Insert\SpecialChar \menuseparator
2231 or the toolbar button
2232 \begin_inset Graphics
2233 filename ../images/label-insert.png
2240 A dialog asks you for a label name, and gives you a suggestion.
2245 , the label name will be placed in a box next to the section title.
2248 \begin_layout Standard
2249 By the way, you could have put the label right anywhere within the section
2250 as well; section references will refer to the last section or subsection
2251 whose heading comes before the label.
2252 However, putting it on the same line as the section title (or, perhaps,
2253 on the first line of the section's text) ensures that page references will
2254 reference the beginning of the section.
2257 \begin_layout Standard
2258 So far you haven't done anything — the DVI output will look exactly the
2259 same, since labels don't show up in the printed document.
2260 However, now that you have added a label, you can refer to that label with
2265 \begin_layout Subsection
2266 Your first cross-reference
2269 \begin_layout Standard
2270 Place the cursor somewhere in section
2271 \begin_inset space ~
2278 \begin_layout LyX-Code
2279 If you want to know more about this document, then see
2280 \begin_inset Newline newline
2283 section, which can be found on page.
2286 \begin_layout Standard
2287 Now set the cursor after the word
2288 \begin_inset Quotes eld
2292 \begin_inset Quotes erd
2297 Insert\SpecialChar \menuseparator
2299 \begin_inset space ~
2304 or the toolbar button
2305 \begin_inset Graphics
2306 filename ../images/dialog-show-new-inset_ref.png
2318 It shows a list of the possible labels you can reference.
2319 At the moment, there should be only one,
2320 \begin_inset Quotes eld
2323 sec:About-This-Document
2324 \begin_inset Quotes erd
2328 Select it (it may be selected by default), and click
2333 Now put the cursor after the word
2334 \begin_inset Quotes eld
2338 \begin_inset Quotes erd
2341 , and change the reference format to use the page number then click
2346 (To be really correct, you should put a
2349 \begin_inset space ~
2355 \begin_inset Quotes eld
2359 \begin_inset Quotes erd
2363 Same for the page reference.)
2366 \begin_layout Standard
2367 Alternatively to that method, you can right-click on a label and use in
2368 the appearing context menu
2373 The cross-reference to this label is now in the clipboard and can be copied
2374 to the actual cursor position via the menu
2376 Edit\SpecialChar \menuseparator
2386 \begin_layout Standard
2387 LyX puts the references in a box right where the cursor was.
2388 In the printed document, this reference marker will be replaced with either
2389 the page or section number (depending on what you selected in the
2394 View your document as DVI, and you'll see that on the last page we refer
2396 \begin_inset Quotes eld
2400 \begin_inset space ~
2404 \begin_inset Quotes erd
2408 \begin_inset Quotes eld
2412 \begin_inset space ~
2416 \begin_inset Quotes erd
2419 (or whatever page Section
2420 \begin_inset space ~
2426 \begin_layout Standard
2427 Conveniently, a cross-reference acts as a hyperlink when you are editing
2428 a document in LyX; clicking on it will pop up the
2435 \begin_inset space ~
2439 \begin_inset space ~
2444 will move the cursor to the referenced label.
2447 \begin_layout Subsection
2448 More fun with labels
2451 \begin_layout Standard
2452 We told you that LyX takes care about numbering cross-references; now you
2454 Add a new section before Section
2455 \begin_inset space ~
2459 Update the DVI view, and — voilà! — the section cross reference changed
2461 \begin_inset Quotes eld
2465 \begin_inset Quotes erd
2468 ! Change the section
2469 \begin_inset Quotes eld
2473 \begin_inset Quotes erd
2476 to a subsection, and the cross-reference will reference Subsection
2477 \begin_inset space ~
2480 2.1 instead of Section
2481 \begin_inset space ~
2485 The page reference won't change unless you add a whole page of text before
2486 the label, of course.
2490 \begin_layout Standard
2491 If you want some more practice with labels, then try putting a new label
2492 where your first cross-reference was, and refer to that label from elsewhere
2494 If you'll be inserting cross-references often, it may be convenient to
2502 \begin_layout Standard
2503 If you want to make sure that the cross-referencing gets the pages right
2504 even for larger documents,
2508 a couple pages of text from the
2512 to the clipboard, and
2516 the stolen text into your document.
2520 \begin_layout Plain Layout
2521 By the way, copying a chapter title may cause an error, because chapters
2522 aren't allowed in the article class, see section
2523 \begin_inset space ~
2527 \begin_inset CommandInset ref
2529 reference "sec:Document-Classes"
2534 If this happens, just delete the chapter title.
2542 \begin_layout Standard
2547 : Fix the references in
2552 \begin_layout Section
2553 Footnotes and Margin Notes
2556 \begin_layout Standard
2557 Footnotes can be added using the toolbar button
2558 \begin_inset Graphics
2559 filename ../images/footnote-insert.png
2567 Insert\SpecialChar \menuseparator
2571 Click at the end of the word
2572 \begin_inset Quotes eld
2576 \begin_inset Quotes erd
2579 somewhere in your document and click the
2580 \begin_inset Graphics
2581 filename ../images/footnote-insert.png
2588 A footnote box appears where you can enter the text of the footnote.
2589 LyX should place the cursor at the beginning of the footnote box.
2593 \begin_layout LyX-Code
2594 LyX is a typesetting word processor.
2597 \begin_layout Standard
2598 Now click on the button labelled
2599 \begin_inset Quotes eld
2603 \begin_inset Quotes erd
2607 The footnote box is closed, leaving the button showing where the footnote
2608 marker will be in the printed text; this is called
2609 \begin_inset Quotes eld
2613 \begin_inset Quotes erd
2617 You can unfold the footnote at any time and re-edit its text by clicking
2619 \begin_inset Quotes eld
2623 \begin_inset Quotes erd
2629 \begin_layout Standard
2630 You may wonder why the footnote button is a word instead of a number.
2631 The answer is that LyX takes care about the footnote numbering for you
2632 in the printed text.
2633 You can see this yourself by looking at the DVI file (or printout).
2634 If you add other footnotes, LyX will renumber the footnotes.
2635 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2636 there's really no need to put the numbers in the LyX file.
2639 \begin_layout Standard
2640 A footnote can be cut and pasted like normal text.
2641 Go ahead; try it! All you need to do is select the footnote button
2645 \begin_layout Plain Layout
2646 It may be easier to select it using the keyboard.
2647 You might accidentally open the footnote if you're trying to select the
2648 marker itself with the mouse.
2662 In addition, you can change regular text to a footnote, by selecting it
2664 \begin_inset Graphics
2665 filename ../images/footnote-insert.png
2671 button; change a footnote to regular text by hitting the
2675 key when the cursor is in the first position of a footnote, or by hitting
2680 key when the cursor is in the very last position of the footnote, respectively.
2683 \begin_layout Standard
2684 Margin notes can be added using the menu
2686 Insert\SpecialChar \menuseparator
2688 \begin_inset space ~
2693 or the toolbar button
2694 \begin_inset Graphics
2695 filename ../images/marginalnote-insert.png
2702 Margin notes are like footnotes, except that:
2705 \begin_layout Itemize
2706 the on-screen boxes say
2707 \begin_inset Quotes eld
2711 \begin_inset Quotes erd
2715 \begin_inset Quotes eld
2719 \begin_inset Quotes erd
2725 \begin_layout Itemize
2726 the notes will be placed in the margin, instead of below the text
2729 \begin_layout Itemize
2730 margin notes are not numbered
2733 \begin_layout Standard
2734 Change your LyX footnote back to text, then select and change it to a margin
2736 Run LaTeX again to see what the margin note looks like.
2739 \begin_layout Standard
2744 : Fix the footnote in
2749 \begin_layout Section
2751 \begin_inset CommandInset label
2753 name "sec:bibliographies"
2760 \begin_layout Standard
2761 Bibliographies (at least in the exact sciences) are similar to cross references.
2762 The bibliography contains a list of references at the end of the document,
2763 and they can be referenced from within the document.
2764 Like section titles, LyX and LaTeX make your job easier by automatically
2765 numbering the bibliography items and changing citations when the item numbers
2769 \begin_layout Standard
2770 Go to the end of the document and switch to the
2775 Now, each paragraph you type will be a reference.
2777 \begin_inset Quotes eld
2782 The Lyx Tutorial, by the LyX Documentation Team
2785 \begin_inset Quotes erd
2788 as your first reference.
2789 Note that LyX automatically puts a number in a box before each reference.
2790 Click on the boxed reference number, and the
2793 \begin_inset space ~
2803 is to refer to this reference within the LyX document, the
2812 is set (default), you will see the number of the bibliography in the output.
2818 \begin_inset Quotes eld
2822 \begin_inset Quotes erd
2825 to make it easy to remember.
2828 \begin_layout Standard
2829 Now pick somewhere in your document that you would like to insert a reference.
2832 Insert\SpecialChar \menuseparator
2835 or the toolbar button
2836 \begin_inset Graphics
2837 filename ../images/dialog-show-new-inset_citation.png
2849 The right panel in this dialog lists all the bibliography entries, and
2850 this field allows you to choose which bibliography item you want to cite.
2852 \begin_inset Quotes eld
2856 \begin_inset Quotes erd
2859 (right now, that's the only item in the bibliography), then use the
2863 button in the center to insert it.
2864 (You can have multiple citations in the same place by transferring a number
2865 of keys this way.) Now view your file as DVI, and you'll see that the citation
2866 appears in brackets in the text, referring to the bibliography at the end
2870 \begin_layout Standard
2874 \begin_inset space ~
2883 dialog will put a remark (such as a reference to a page or chapter within
2884 the referenced book or article) in the brackets after the reference.
2885 If you want the references to have labels instead of numbers in the printed
2886 output (for example, some journals would use
2887 \begin_inset Quotes eld
2891 \begin_inset Quotes erd
2894 to refer to a paper written by Smith in 1995), use the
2901 \begin_inset space ~
2914 \begin_layout Standard
2919 Fix the bibliography and citation in
2924 \begin_layout Section
2928 \begin_layout Standard
2929 You may want to put a table of contents at the beginning of your document.
2930 LyX makes this very easy to do.
2935 after your document title and before your first section title and choose
2938 Insert\SpecialChar \menuseparator
2940 \begin_inset space ~
2944 \begin_inset space ~
2947 TOC\SpecialChar \menuseparator
2949 \begin_inset space ~
2953 \begin_inset space ~
2960 \begin_inset Quotes eld
2964 \begin_inset Quotes erd
2967 will appear in a button on the first line of the document.
2971 \begin_layout Standard
2972 This may not appear to be very useful.
2973 However, if you look at your DVI file, you will see that a table of contents
2974 has been generated, listing the various sections and subsections in your
2976 As usual, if you reorder sections or create new ones, you will see those
2977 changes in the DVI file when you update it.
2981 \begin_layout Standard
2982 The table of contents is not printed in the on-screen version of the document
2983 to keep the overview in your file.
2984 But you can display the table of contents in a separate window by clicking
2985 on the table of contents button, or by using
2987 Document\SpecialChar \menuseparator
2990 or the toolbar button
2991 \begin_inset Graphics
2992 filename ../images/dialog-toggle_toc.png
2999 This menu will work even if you don't have a table of contents inset in
3001 This is a very useful tool where you can move around your document parts.
3002 Clicking on a (sub)section title in the
3006 window will highlight that line and move the display (in the LyX editing
3007 window) to that place in the document.
3008 You can also use the arrow keys to move up and down in the table of contents.
3009 You may therefore find it convenient to leave this window open throughout
3011 You can get similar functionality from the
3015 menu, though, where the table of contents appears automatically.
3018 \begin_layout Standard
3019 To get rid of the Table of Contents, you can delete the table of contents
3020 button just like any other text.
3023 \begin_layout Standard
3028 : Fix the table of contents in
3033 \begin_layout Chapter
3037 \begin_layout Standard
3038 LaTeX is used by many scientists because it outputs great looking equations,
3039 avoiding the control characters used by word processors and their equation
3041 Many of these scientists are frustrated, however, because writing equations
3042 in LaTeX is more like programming than writing.
3043 Happily, LyX has WYSIWYM support for equations.
3044 If you are used to LaTeX, you'll find that all of the usual LaTeX math
3045 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3046 If, on the other hand, you've never written in LaTeX, then the
3049 \begin_inset space ~
3054 will allow you to write professional-looking math quickly and easily.
3057 \begin_layout Section
3061 \begin_layout Standard
3062 Somewhere in your LyX document, type:
3065 \begin_layout LyX-Code
3066 I like what Einstein said, E=mc^2, because it's so simple.
3070 \begin_layout Standard
3071 Now, that equation doesn't look very good in LyX and in the output; there's
3072 no space between the letters and the equals sign, and you'd like to write
3073 an actual superscript for the
3074 \begin_inset Quotes eld
3078 \begin_inset Quotes erd
3082 That bad typesetting happened because we didn't tell LyX that we were writing
3083 a mathematical expression, so it typeset the equation like regular old
3087 \begin_layout Standard
3088 Instead, we create a formula that will get typeset properly.
3089 In order to create a formula, just click the toolbar button
3090 \begin_inset Graphics
3091 filename ../images/math-mode.png
3099 Insert\SpecialChar \menuseparator
3100 Math\SpecialChar \menuseparator
3102 \begin_inset space ~
3108 LyX will insert a little blue square, which is an empty math formula.
3114 The expression is typed in blue, and the blue square disappears as soon
3115 as the formula is not empty.
3120 to leave the equation The purple markers disappear, leaving the cursor
3121 to the right of the expression, and now if you type something, it will
3125 \begin_layout Standard
3126 Run LaTeX and look at the output.
3127 Notice that the expression was typeset nicely, with spaces between the
3128 letters and the equals sign, and a superscript
3129 \begin_inset Quotes eld
3133 \begin_inset Quotes erd
3137 Letters in math mode are assumed to be variables, and come out in italics.
3138 Numbers are just numbers.
3141 \begin_layout Standard
3142 This math editor is another example of the WYSIWYM philosophy.
3143 In LaTeX, you write a mathematical expression using text and commands like
3150 ; this can be frustrating, because you can't see what an expression looks
3151 like until you LaTeX the file, and may have to spend time to find e.
3152 \begin_inset space \thinspace{}
3156 \begin_inset space \space{}
3160 LyX doesn't attempt to get the expression to look perfect (WYSIWYG), but
3161 it gives you an extremely good idea of what the expression will look like.
3162 LaTeX then takes care of the professional typesetting.
3165 \begin_layout Section
3166 Navigating an Equation
3169 \begin_layout Standard
3171 \begin_inset Formula $E=mc^{2}$
3175 \begin_inset Formula $E=1+mc^{2}$
3179 Use the arrow keys to move the cursor into the expression.
3180 Note that when you enter the expression, the purple markers appear to let
3181 you know you're editing math.
3190 to move the cursor past the equals sign, and just type
3191 \begin_inset Quotes eld
3195 \begin_inset Quotes erd
3199 Again, you can use the arrow keys or
3203 to leave the formula\SpecialChar \@.
3207 \begin_layout Standard
3208 Other than the special keys described below, typing in math mode is like
3209 editing regular text.
3219 Select text either with the arrow keys or with the mouse.
3222 Edit\SpecialChar \menuseparator
3225 works in math mode as well as cut and paste.
3226 One thing to be careful of: If you are left or right outside a formula
3235 , respectively, you delete the whole formula.
3236 Luckily, you can just use
3243 \begin_layout Standard
3244 What if you want to change
3245 \begin_inset Formula $E=mc^{2}$
3249 \begin_inset Formula $E=mc^{2.5}+1$
3252 ? Again, you can use the mouse to click in the right place.
3253 However, you can also use the arrow keys.
3254 If the cursor is just after the
3255 \begin_inset Quotes eld
3259 \begin_inset Quotes erd
3263 \begin_inset Quotes eld
3267 \begin_inset Quotes erd
3274 and the cursor is moved to the level of the superscript, just before the
3276 \begin_inset Quotes eld
3280 \begin_inset Quotes erd
3285 \begin_inset Quotes eld
3289 \begin_inset Quotes erd
3297 will move the cursor back to the regular level.
3306 , the cursor will be placed
3310 the superscript (so that you can then type the
3311 \begin_inset Quotes eld
3315 \begin_inset Quotes erd
3321 \begin_layout Section
3322 Exponents and Indices
3325 \begin_layout Standard
3326 An exponent can be entered from the
3329 \begin_inset space ~
3334 (see below), but it's actually simpler just to type the caret key,
3335 \begin_inset Quotes eld
3339 \begin_inset Quotes erd
3343 LyX will place another blue rectangle in the superscript, so that whatever
3344 you write next will be superscripted, and in a smaller font size.
3345 Everything you type until you hit a
3353 to exit the formula entirely) will be in the superscript.
3356 \begin_layout Standard
3357 Writing a subscript (index) is just as easy — start one by typing the underscore
3359 \begin_inset Quotes eld
3363 \begin_inset Quotes eld
3367 You can subscript and superscript both subscripts and superscripts like
3369 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3376 \begin_layout Standard
3388 \begin_layout Section
3392 \begin_layout Standard
3396 \begin_inset space ~
3401 is a convenient way to enter symbols or to perform complicated formula
3403 Many of these operations can be accomplished from the keyboard or the
3405 Edit\SpecialChar \menuseparator
3410 Insert\SpecialChar \menuseparator
3414 However, we're going to concentrate on using the
3417 \begin_inset space ~
3422 , just to let you know what's out there; you can learn keyboard shortcuts
3423 later, from other manuals.
3426 \begin_layout Standard
3431 is shown when the cursor is in a formula and can also be turned on manually
3434 View\SpecialChar \menuseparator
3438 When you click there on
3439 \begin_inset Quotes eld
3443 \begin_inset Quotes erd
3446 the toolbar will be shown permanently at the bottom; this state is visualized
3451 menu with a checkmark.
3452 When you click in this state again on
3453 \begin_inset Quotes eld
3457 \begin_inset Quotes erd
3468 is only shown when the cursor is within a formula; this state is visualized
3469 by the renaming of the menu entry from
3470 \begin_inset Quotes eld
3474 \begin_inset Quotes erd
3478 \begin_inset Quotes eld
3482 \begin_inset space ~
3486 \begin_inset Quotes erd
3492 \begin_layout Subsection
3496 \begin_layout Standard
3500 \begin_inset space ~
3505 which allow you to choose from a large array of symbols used in math: various
3506 arrows, relations, operators, and sums and integrals.
3507 Note that subscripting and superscripting allow you to put lower and upper
3508 limits on sums and integrals.
3512 \begin_layout Standard
3513 \begin_inset Quotes eld
3516 Nothing you can do that can't be done\SpecialChar \ldots{}
3518 \begin_inset Formula $\heartsuit$
3522 \begin_inset Quotes erd
3528 \begin_layout Subsection
3529 Square roots, accents, and delimiters
3532 \begin_layout Standard
3533 To type a square root, just click on the button
3534 \begin_inset Graphics
3535 filename ../images/math/sqrt.png
3542 The square root appears, and the cursor is in a new insertion point inside
3544 You can type variables, numbers, other square roots, fractions, whatever
3546 LyX will automatically resize the square root to fit what's inside.
3549 \begin_layout Standard
3550 Accenting a character (
3551 \begin_inset Formula $\overrightarrow{v}$
3554 ) or group of characters (
3555 \begin_inset Formula $\overrightarrow{a+b}$
3558 ) is done the same way.
3559 Decorations are available from the toolbar via the button
3560 \begin_inset Graphics
3561 filename ../images/math/hat.png
3568 Click on a decoration, and LyX will insert that decoration with an insertion
3569 point under (or over) it.
3570 Just type what you want in the insertion point.
3571 There are two sets of decorations: those that resize with the text you
3572 type, and those that have fixed size, and are most appropriate for a single
3577 \begin_layout Standard
3578 Delimiters such as parentheses, brackets, and braces work similarly, but
3579 are a bit more complicated.
3580 Hit the delimiter button
3581 \begin_inset Graphics
3582 filename ../images/dialog-show_mathdelimiter.png
3593 Your current selection of delimiters is displayed in a box.
3594 It's a pair of parentheses by default, but you can choose a pair of braces,
3595 a brace and a parenthesis, or choose the empty square to have something
3597 \begin_inset Quotes eld
3601 \begin_inset Formula $a=\left\langle 7\right.$
3605 \begin_inset Quotes erd
3608 (the empty delimiter is displayed as a broken line in LyX, but won't show
3612 \begin_layout Standard
3613 If you're lazy, you can type actual parentheses in math mode, rather than
3619 However, those parentheses will be the same size as regular text, which
3620 will look bad if you have a big fraction or matrix inside the parentheses.
3621 So better use in this case one of the three delimiter buttons that insert
3623 \begin_inset space \thinspace{}
3627 \begin_inset space \space{}
3631 \begin_inset space \thinspace{}
3637 \begin_layout Standard
3638 You can also put delimiters or a square root sign or a decoration on already
3639 existing formula parts.
3640 Select the portion of the formula that you want to adjust, and then click
3641 on the button you want from the
3644 \begin_inset space ~
3650 Try using this to change Newton's second law from scalar to vector form
3652 \begin_inset Formula $f=ma$
3656 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3660 Once you've learned about matrices, this is how you'll put parentheses
3661 or brackets around them.
3664 \begin_layout Subsection
3668 \begin_layout Standard
3669 To create a fraction, click on the fraction button
3670 \begin_inset Graphics
3671 filename ../images/math/frac.png
3681 \begin_inset space ~
3687 LyX writes two insertion points in a fraction.
3688 As you would expect, you can use arrow keys or the mouse to move around
3690 Click on the top square and type
3691 \begin_inset Quotes eld
3695 \begin_inset Quotes erd
3704 \begin_inset Quotes eld
3708 \begin_inset Quotes erd
3712 You've made a fraction! Of course you can type anything within each of
3713 the two boxes: variables with exponents, square roots, other fractions,
3718 \begin_layout Standard
3730 \begin_layout Subsection
3731 TeX mode: Limits, log, sin and others
3734 \begin_layout Standard
3735 Because letters in math mode are considered to be variables, if you type
3737 \begin_inset Quotes eld
3741 \begin_inset Quotes erd
3744 in math mode, LyX thinks you are typing the product of the three variables
3746 \begin_inset Formula $s$
3750 \begin_inset Formula $i$
3754 \begin_inset Formula $n$
3758 The three letters will be typeset in italics, when what you really wanted
3760 \begin_inset Quotes eld
3764 \begin_inset Quotes erd
3768 In addition, LyX won't put a space between the word
3769 \begin_inset Quotes eld
3773 \begin_inset Quotes erd
3777 \begin_inset Quotes eld
3781 \begin_inset Quotes erd
3788 will exit the formula).
3790 \begin_inset Quotes eld
3794 \begin_inset Formula $\sin(x)$
3798 \begin_inset Quotes erd
3802 \begin_inset Quotes eld
3806 \begin_inset Formula $sin(x)$
3810 \begin_inset Quotes erd
3816 \begin_layout Standard
3820 \begin_inset space ~
3826 \begin_inset Graphics
3827 filename ../images/math/functions.png
3834 \begin_inset Quotes eld
3838 \begin_inset Quotes erd
3841 in the appearing function list.
3843 \begin_inset Quotes eld
3847 \begin_inset Quotes erd
3850 is displayed in LyX in black, and set in upright roman type.
3851 The whole word is treated as one symbol, so if you type
3855 , it will delete the whole word.
3857 \begin_inset Quotes eld
3861 \begin_inset Quotes erd
3864 , which will be written in blue italics, like you expect in a formula.
3865 In the output, the expression will be correctly typeset.
3869 \begin_layout Standard
3870 The function list include other trigonometric functions and their inverses,
3871 hyperbolic functions, logarithms, limits, and quite a few others.
3872 These functions can take subscripts and superscripts, important for typing
3874 \begin_inset Quotes eld
3878 \begin_inset Formula $\cos^{2}\theta$
3882 \begin_inset Quotes erd
3886 \begin_inset Quotes eld
3890 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3894 \begin_inset Quotes erd
3900 \begin_layout Standard
3912 \begin_layout Subsection
3916 \begin_layout Standard
3917 Click on the matrix button
3918 \begin_inset Graphics
3919 filename ../images/dialog-show_mathmatrix.png
3928 \begin_inset space ~
3934 The appearing dialog allows you to choose how many rows and columns you
3935 want in your matrix.
3936 Choose 2 rows and 3 columns and hit
3941 LyX prints 6 insertion points in a
3942 \begin_inset Formula $2\times3$
3946 As usual, you can put any sort of formula expression (a square root, another
3947 matrix, etc.) in each insertion point.
3948 You can also leave some of the insertion points empty if you want.
3951 \begin_layout Standard
3956 can be used to move horizontally between the columns of a matrix.
3957 Alternatively, you can use the arrow keys to move around - hitting
3961 at the end of one box will move to the next box,
3965 will move to the next row, etc.
3968 \begin_layout Standard
3969 If you need to change the number of rows and columns, use the menu
3971 Edit\SpecialChar \menuseparator
3973 \begin_inset space \thinspace{}
3977 \begin_inset space \thinspace{}
3982 or the math toolbar buttons
3983 \begin_inset Graphics
3984 filename ../images/tabular-feature_append-row.png
3991 \begin_inset Graphics
3992 filename ../images/tabular-feature_delete-row.png
3999 \begin_inset Graphics
4000 filename ../images/tabular-feature_append-column.png
4007 \begin_inset Graphics
4008 filename ../images/tabular-feature_delete-column.png
4017 \begin_layout Standard
4022 for information on how to change the horizontal alignment of each column,
4023 and how to change the vertical position of the whole matrix.
4024 Note that if you want to write a table containing text, you should use
4025 LyX's wonderful table support, rather than trying to write text in a matrix.
4028 \begin_layout Subsection
4032 \begin_layout Standard
4033 All of the expressions we have written so far have been on the same line
4034 as the text that came before and after them, otherwise known as inline
4036 This is fine for short, simple expressions, but if you want to write larger
4037 ones, or if you want your expressions to stand out from the text, you need
4038 to write them in display mode.
4039 In addition, only displayed expressions can be labeled and numbered (see
4044 ), and multi-line equations must be in display mode.
4047 \begin_layout Standard
4048 Click on the display button
4049 \begin_inset Graphics
4050 filename ../images/math-display.png
4059 \begin_inset space ~
4064 , which represents a couple lines of text before and after a centered blue
4066 LyX inserts a formula, but the insertion point is on a new line, and it's
4067 centered within that line.
4068 Now type an expression and run LaTeX to see how it looks.
4069 The display button is actually a toggle; use it now to change a couple
4070 of your expressions to display mode and back.
4074 \begin_layout Standard
4075 Display mode has a couple differences from inline mode:
4078 \begin_layout Itemize
4079 The default font is larger for a few symbols, like
4080 \begin_inset Formula $\sum$
4084 \begin_inset Formula $\int$
4090 \begin_layout Itemize
4091 Subscripts and superscripts for limits and sums (but not integrals) are
4092 written under rather than next to the symbols
4095 \begin_layout Itemize
4099 \begin_layout Standard
4100 Other than these differences, though, displayed expressions and inline expressio
4101 ns are very similar.
4104 \begin_layout Standard
4105 One final note about the way displayed formulas are typeset: Be careful
4106 about whether you're putting your equation into a new paragraph or not.
4107 If your formula is in the middle of a sentence or paragraph, then don't
4113 Doing so will cause the text
4117 the formula to start a new paragraph.
4118 That text will therefore eventually be indented, depending on your document
4119 paragraph settings, which is probably not what you want.
4122 \begin_layout Standard
4127 : Put the various equations in
4131 into display mode, and see how they're typeset differently.
4134 \begin_layout Standard
4139 : Using various tools you've learned in this section, you should be able
4140 to write an equation like
4144 \begin_layout Plain Layout
4145 After you've done it the hard way, give
4147 Insert\SpecialChar \menuseparator
4148 Math\SpecialChar \menuseparator
4150 \begin_inset space ~
4161 \begin_inset Formula \[
4162 f(x)=\left\{ \begin{array}{cc}
4165 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4172 \begin_layout Section
4176 \begin_layout Standard
4177 LyX's math editor can do plenty more.
4178 By now, you're familiar with the basics, so we refer to the
4185 \begin_layout Itemize
4186 Labeling and numbering expressions
4189 \begin_layout Itemize
4190 Multi-line equations
4193 \begin_layout Itemize
4194 Change typefaces, e.
4195 \begin_inset space \thinspace{}
4199 \begin_inset space \space{}
4202 to write bold-face text in an expression.
4205 \begin_layout Itemize
4206 Fine-tune font sizes and spacing within an expression.
4207 (Don't worry about this until your final draft!)
4210 \begin_layout Itemize
4212 These are very powerful, because you just define them once at the top of
4213 the document, and then you can use them throughout the document.
4216 \begin_layout Itemize
4217 Do lots of other things that can't be mentioned in this Tutorial.
4220 \begin_layout Chapter
4224 \begin_layout Section
4225 Other major LyX Features
4228 \begin_layout Standard
4229 We haven't gone through all the possible commands in LyX, and we aren't
4238 \begin_inset space ~
4243 manual for more information.
4244 We'll just mention a couple more major things LyX can do:
4247 \begin_layout Itemize
4248 LyX has WYSIWYM support for tables.
4251 Insert\SpecialChar \menuseparator
4255 \begin_inset Graphics
4256 filename ../images/tabular-insert.png
4263 Click on the table with the
4270 \begin_inset space ~
4275 dialog box which allows extensive table editing.
4278 \begin_layout Itemize
4279 LyX also supports including pictures in any format within documents.
4282 Insert\SpecialChar \menuseparator
4286 \begin_inset Graphics
4287 filename ../images/dialog-show-new-inset_graphics.png
4294 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4295 can have captions, and LyX will automatically generate lists of figures
4299 \begin_layout Itemize
4300 LyX is heavily configurable.
4301 Everything from how the LyX window looks to how the output comes out can
4302 be configured in a number of ways.
4303 Much configuration is done through
4305 Tools\SpecialChar \menuseparator
4309 For more information on this, check out
4311 Help\SpecialChar \menuseparator
4312 Customization\SpecialChar \@.
4316 \begin_layout Itemize
4317 LyX is being developed by a team of programmers on five continents.
4318 Therefore, LyX has better support for non-English languages (such as Dutch,
4319 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4320 ) than many word processors.
4321 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4322 languages Chinese Japanese, and Korean are supported.
4323 You can write documents in other languages and you can also configure LyX
4324 to show its menus and error messages in other languages.
4328 \begin_layout Itemize
4329 The LyX menus feature keybindings.
4330 This means that you can do
4332 File\SpecialChar \menuseparator
4343 or by using the binding which is shown next to it in the menu (Ctrl+O by
4345 Keybindings are also configurable.
4346 For information on this, check out
4348 Help\SpecialChar \menuseparator
4349 Customization\SpecialChar \@.
4353 \begin_layout Itemize
4354 LyX can read LaTeX documents.
4356 \begin_inset space ~
4360 \begin_inset CommandInset ref
4362 reference "sec:tex2lyx"
4369 \begin_layout Itemize
4370 Spellchecking, thesaurus, and word count facilities are available.
4373 \begin_layout Itemize
4374 Generation of indexes and nomenclatures/glossaries is supported.
4377 \begin_layout Section
4379 \begin_inset CommandInset label
4381 name "sec:latexusers"
4388 \begin_layout Standard
4389 If you don't know anything about LaTeX, you don't have to read this section.
4390 Actually, you might want to
4394 about LaTeX, and then read this chapter.
4395 However, some who begin to use LyX will be familiar with LaTeX.
4396 If you are such a person, you may be wondering if LyX can really do everything
4398 The short answer is that LyX can do pretty much everything LaTeX can do
4399 in one form or another, and it definitely simplifies most parts of writing
4403 \begin_layout Standard
4404 Because this is just a tutorial, we are only going to mention things that
4405 new LyX users will most likely be interested in.
4406 In the interests of keeping the Tutorial short, we will give only minimal
4411 \begin_inset space ~
4419 \begin_inset space ~
4424 manual have a great deal of information on differences between LyX and
4425 LaTeX, and how to do various LaTeX tricks in LyX.
4428 \begin_layout Subsection
4432 \begin_layout Standard
4433 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4434 will be displayed in red on the screen.
4435 You can use TeX commands in LyX by choosing
4437 Insert\SpecialChar \menuseparator
4439 \begin_inset space ~
4445 \begin_inset Graphics
4446 filename ../images/ert-insert.png
4453 This creates a box where everything within it is passed straight to LaTeX.
4456 \begin_layout Standard
4457 In a math formula, TeX mode is handled a bit differently.
4458 TeX mode is there entered by typing a backslash.
4459 The backslash is not written out, but anything you type afterwards will
4461 You exit TeX mode by typing
4465 or some other non-alphabetic character, like a number, underscore, caret,
4467 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4468 will convert it to WYSIWYM\SpecialChar \@.
4470 \begin_inset Quotes eld
4480 \begin_inset Quotes erd
4483 in a formula and then press
4487 , LyX will change the red
4488 \begin_inset Quotes eld
4492 \begin_inset Quotes erd
4496 \begin_inset Quotes eld
4500 \begin_inset Formula $\gamma$
4504 \begin_inset Quotes erd
4508 This will work for almost all, non-complicated math macros.
4509 This may be faster than using the
4512 \begin_inset space ~
4517 , and will be especially convenient for experienced LaTeX users.
4520 \begin_layout Standard
4521 As a special case, if you type a brace in TeX mode, then the beginning
4525 ending braces will be inserted in red, then take you
4529 of TeX mode and place the cursor between the braces.
4530 This makes it more convenient to type commands that LyX doesn't know which
4534 \begin_layout Standard
4535 LyX can't do absolutely everything that LaTeX can do.
4536 Some fancy functions are not supported at all, while some work but aren't
4538 TeX mode allows users to get the full flexibility of LaTeX, while having
4539 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4540 LyX could never support every LaTeX package.
4547 in the preamble (see section
4548 \begin_inset space ~
4552 \begin_inset CommandInset ref
4554 reference "sec:preamble"
4558 ), you can use any package you want — although you won't have WYSIWYM support
4559 for that package's features.
4562 \begin_layout Subsection
4563 Importing LaTeX Documents —
4568 \begin_inset CommandInset label
4577 \begin_layout Standard
4578 You can import a LaTeX file into LyX by using the
4580 File\SpecialChar \menuseparator
4581 Import\SpecialChar \menuseparator
4583 \begin_inset space ~
4589 This will call the program
4593 which will create a file
4601 and then open that file.
4602 If the translation doesn't work, you can try calling
4606 from the command line, possibly using fancier options.
4609 \begin_layout Standard
4614 will translate most legal LaTeX, but not everything.
4615 It will leave things it doesn't understand in TeX mode, so after translating
4620 , you can look for red text and hand-edit it to look right.
4623 \begin_layout Standard
4628 has its own manpage.
4629 Read it to find out about which LaTeX commands and environments aren't
4630 supported, bugs (and how to get around them), and how to use the various
4634 \begin_layout Subsection
4635 Converting LyX Documents to LaTeX
4638 \begin_layout Standard
4639 You might wish to convert a LyX Document to a LaTeX file.
4640 For example, a co-worker or co-author who doesn't have LyX might want to
4644 File\SpecialChar \menuseparator
4645 Export\SpecialChar \menuseparator
4649 This will create a file
4657 file you are editing.
4658 LyX always creates temporary LaTeX files when viewing or printing files.
4661 \begin_layout Subsection
4665 \begin_layout Subsubsection
4669 \begin_layout Standard
4672 Document\SpecialChar \menuseparator
4675 dialog takes care of many of the options that you would input in a
4682 Change the class, default font size and paper size here.
4683 Put any extra options to the
4696 \begin_inset space ~
4704 \begin_layout Subsubsection
4705 Other Preamble Matter
4706 \begin_inset CommandInset label
4715 \begin_layout Standard
4716 If you have special commands to put in the preamble of a LaTeX file, you
4717 can use them in a LyX document as well.
4720 Document\SpecialChar \menuseparator
4721 Settings\SpecialChar \menuseparator
4723 \begin_inset space ~
4728 and type in the dialog window (or from the document settings dialog, depending
4730 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4733 \begin_layout Subsection
4737 \begin_layout Standard
4738 LyX has support for BibTeX, which allows you to build databases of bibliographic
4739 al references to be used in multiple documents.
4742 Insert\SpecialChar \menuseparator
4744 \begin_inset space ~
4748 \begin_inset space ~
4751 TOC\SpecialChar \menuseparator
4753 \begin_inset space ~
4767 field you load BibTeX files, in the
4771 field you can load BibTeX style files.
4774 \begin_layout Standard
4775 After you've done this, you can use citations from any bibliographies you're
4778 Insert\SpecialChar \menuseparator
4782 \begin_inset space ~
4786 \begin_inset CommandInset ref
4788 reference "sec:bibliographies"
4793 LyX will take care of running BibTeX.
4798 dialog will show a list of all the references in your
4805 \begin_layout Section
4809 \begin_layout Standard
4810 Sometimes when you LaTeX a document, there will be errors, things that LyX
4811 or LaTeX can't understand.
4812 When this happens, LyX will open a
4815 \begin_inset space ~
4821 Clicking on individual errors in this dialog will take you to the place
4822 in the LyX document where the error occurs and also display the detailed
4823 LaTeX error message.