1 #LyX 1.6.5svn 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 do
141 not know it very well.
142 Now, do not panic - you will not 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 three blank lines between paragraphs.
160 You found out you could not and in fact, you will find out that most of
161 the little tricks you are accustomed to use in other word processors will
163 That is because most word processors you have used before allow you to
164 manually 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 are telling you to type and trying out
225 all 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 will probably be able to read the
234 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
235 However, LyX has features you will want to learn about.
236 Even if you do not 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 is 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 are 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 cannot 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 are not reading it within LyX already).
345 This way, you can read them while you are 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 have 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 are 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-distributions, as well
368 as on Windows, where this is setup by the LyX installers.
371 \begin_layout Standard
372 Finally, we have written a file called
376 to let you practice your LyX skills.
377 Imagine that it was typed by someone who did not know about any of LyX's
379 As you learn new LyX functions, we will suggest that you fix those parts
385 It also contains `subtle' hints about how to fix things.
389 \begin_layout Plain Layout
390 The hints are located in yellow
391 \begin_inset Quotes eld
395 \begin_inset Quotes erd
399 Access the text in a note by clicking on it.
404 If you want to cheat, or check what you have done, there is also a file
409 which contains the same text written and typeset by a LyX master.
412 \begin_layout Standard
413 The example files can be found in the
417 directory of LyX's installation folder.
418 Open the raw document, and use
420 File\SpecialChar \menuseparator
427 to save a copy in your own directory for you to work on.
428 As you fix parts of the raw document, check to see how those changes affect
432 \begin_layout Standard
437 directory contains lots of other examples files.
438 They will show you how to do various fancy things with LyX.
439 After you have read the Tutorial, or when you are confused about how to
440 do something fancy in LyX, take a look at these files.
443 \begin_layout Subsection
444 Typing, Viewing, and Exporting
447 \begin_layout Itemize
450 File\SpecialChar \menuseparator
454 \begin_layout Itemize
455 Type a sentence like:
457 This is my first LyX document!
460 \begin_layout Itemize
461 Save your document with
463 File\SpecialChar \menuseparator
472 \begin_layout Itemize
473 Run LaTeX to create a DVI file, with
475 View\SpecialChar \menuseparator
478 or the toolbar button
479 \begin_inset Graphics
480 filename ../images/buffer-view_dvi.png
486 LyX will open a DVI-viewer program displaying your document as it will
491 \begin_layout Plain Layout
492 You can save time by leaving the DVI-viewer running in the background.
495 View\SpecialChar \menuseparator
496 Update\SpecialChar \menuseparator
499 or the toolbar button
500 \begin_inset Graphics
501 filename ../images/buffer-update_dvi.png
506 and just click on the DVI-viewer window (or unminimize it) after LaTeX
515 \begin_layout Itemize
516 Export the ready to print document with
518 File\SpecialChar \menuseparator
526 \begin_layout Standard
527 Congratulations! You have written your first LyX document.
528 All of the rest is just details, which are covered in the other manuals.
531 \begin_layout Subsection
535 \begin_layout Standard
536 LyX can of course do most of the things you are used to do with a word processor.
537 It will word-wrap and indent paragraphs automatically.
538 Here is a quick description of how to do some simple actions.
541 \begin_layout Description
542 Undo LyX has multiple levels of undo, which means you can undo everything
543 you have done since your current editing session started, by selecting
546 Edit\SpecialChar \menuseparator
550 \begin_inset Graphics
551 filename ../images/undo.png
556 ) over and over again.
557 If you undo too much, just select
559 Edit\SpecialChar \menuseparator
563 \begin_inset Graphics
564 filename ../images/redo.png
574 \begin_layout Standard
575 Currently, undo is limited to 100 steps.
579 \begin_layout Description
582 Edit\SpecialChar \menuseparator
586 \begin_inset Graphics
587 filename ../images/cut.png
594 Edit\SpecialChar \menuseparator
598 \begin_inset Graphics
599 filename ../images/copy.png
606 Edit\SpecialChar \menuseparator
610 \begin_inset Graphics
611 filename ../images/paste.png
616 ) to cut, copy, and paste.
617 Or automatically paste selected text (including selections from other programs)
625 \begin_layout Description
628 Edit\SpecialChar \menuseparator
640 \begin_inset Graphics
641 filename ../images/dialog-show_findreplace.png
647 In the dialog, search with the
659 button to replace a word you have found.
663 \begin_layout Plain Layout
664 Close the window when you are done or leave it open if you find it more
666 Most dialog boxes in LyX can operate like this.
667 Just be sure you have the right window focus when you are trying to type
668 in the main LyX window or a LyX dialog.
673 If you like, you can specify whether to make the search case-sensitive,
674 or to search for only complete words; you can also search backwards through
678 \begin_layout Description
687 text (which will by default print characters in italics), set it in
695 (usually small caps, used for people's names), or use your own formatting
698 Edit\SpecialChar \menuseparator
705 dialog (toolbar button
706 \begin_inset Graphics
707 filename ../images/dialog-show_character.png
715 \begin_layout Description
716 Toolbar There are buttons on the toolbar (just below the menus) which allow
717 you to do some of the more popular functions, such as
728 \begin_layout Standard
729 Of course, you have not yet written enough to make most of these functions
731 As you write more, though, try undoing, pasting, etc.
734 \begin_layout Subsection
735 WYSIWYM: Whitespace in LyX
738 \begin_layout Standard
739 One of the hardest things for new users to get used to is the way that LyX
741 As many times as you hit
745 , you will only get one blank line.
746 As many times as you hit
750 , you will only get one space.
751 On a blank line, LyX will not let you type even one space.
756 key will not move you forward one tab stop; in fact there
760 no tab stops! There is no ruler at the top of the page to let you set tabs
764 \begin_layout Standard
765 Many word processors are based on the WYSIWYG principle:
766 \begin_inset Quotes eld
769 What You See Is What You Get.
770 \begin_inset Quotes erd
773 LyX, on the other hand, is based on the principle that
774 \begin_inset Quotes eld
777 What You See Is What You
782 \begin_inset Quotes erd
785 You type what you mean, and LyX will take care of typesetting it for you,
786 so that the output looks nice.
791 grammatically separates paragraphs, and a
795 grammatically separates words, so there is no reason to have several of
800 has no grammatical function at all, so LyX does not support it.
801 Using LyX, you will spend more of your time worrying about the
805 of your document, and less time worrying about the
814 for more information on the WYSIWYM concept.
817 \begin_layout Standard
818 LyX does have (many) ways to fine-tune the formatting of your document.
819 After all, LyX might not typeset
828 has information about all that.
829 It includes horizontal fills and vertical space — which are more powerful
830 and versatile than multiple spaces or blank lines — and ways to change
831 font sizes, character styles, and paragraph alignments by hand.
832 The idea, though, is that you can write your whole document, focusing on
833 content, and just worry about that fine-tuning at the end.
834 With standard word processors, you will be distracted by document formatting
835 throughout the writing process.
838 \begin_layout Section
842 \begin_layout Standard
843 Different parts of a document have different purposes; we call these parts
849 Most of a document is made up of regular text.
850 Section titles (chapter, subsection, etc.) let the reader know that a new
851 topic or subtopic will be discussed.
852 Certain types of documents have special environments.
853 A journal article will have an abstract and a title.
854 A letter will have neither of these, but will probably have an environment
855 that gives the writer's address.
858 \begin_layout Standard
859 Environments are a major part of the
860 \begin_inset Quotes eld
863 What You See Is What You Mean
864 \begin_inset Quotes erd
868 A given environment may require a certain font style, font size, indenting,
869 line spacing, and more.
870 This problem is aggravated, because the exact formatting for a given environmen
871 t may change: one journal may use boldface, 18 point, centered type for
872 section titles while another uses italicized, 15 point, left justified
873 type; different languages may have different standards for indenting; and
874 bibliography formats can vary widely.
875 LyX lets you avoid learning all the different formatting styles.
878 \begin_layout Standard
883 choice box is located on the left end of the toolbar and looks like this:
885 \begin_inset Graphics
886 filename clipart/ToolbarEnvBox.png
893 It indicates in which environment you are currently writing.
894 While you were writing your first document, it said
895 \begin_inset Quotes eld
899 \begin_inset Quotes erd
902 which is the default environment for text.
903 Now you will put a number of environments in your new document so that
904 you can see how they work.
907 \begin_layout Subsection
908 Sections and Subsections
911 \begin_layout Standard
916 on the first line of your LyX file, and select
928 \begin_layout Plain Layout
934 If nothing is selected, LyX changes the paragraph you are currently in
935 to the selected environment.
936 Alternatively, you can change several paragraphs to a different environment
937 by selecting them before picking an environment.
954 , which will be covered below.
955 LyX numbers the section
956 \begin_inset Quotes eld
960 \begin_inset Quotes erd
963 and typesets the section heading (title) in a larger font.
974 \begin_inset Quotes eld
978 \begin_inset Quotes erd
982 \begin_inset Quotes eld
986 \begin_inset Quotes erd
990 Section headings, like most environments, are assumed to end when you type
996 Type the document introduction:
999 \begin_layout LyX-Code
1000 This is an introduction to my first LyX document.
1003 \begin_layout Standard
1018 \begin_inset Quotes eld
1022 \begin_inset Quotes erd
1025 and waits for you to type a title.
1027 \begin_inset Quotes eld
1033 \begin_inset space ~
1039 \begin_inset Quotes erd
1042 , and you will see that LyX again sets it as a section title.
1045 \begin_layout Standard
1047 Go to the end of Section
1048 \begin_inset space ~
1052 \begin_inset Quotes eld
1055 my first LyX document
1056 \begin_inset Quotes erd
1073 \begin_inset Quotes eld
1077 \begin_inset Quotes erd
1080 and waits for you to type a title.
1087 \begin_inset space ~
1091 \begin_inset Quotes eld
1095 \begin_inset Quotes erd
1099 \begin_inset space ~
1102 2, has been automatically renumbered to Section
1103 \begin_inset space ~
1106 3! In true WYSIWYM fashion, you just need to identify the text that makes
1107 up the section titles, and LyX takes care of numbering the sections and
1111 \begin_layout Standard
1120 environment, and type the following five lines:
1123 \begin_layout LyX-Code
1124 Sections and subsections are described below.
1127 \begin_layout LyX-Code
1131 \begin_layout LyX-Code
1132 Sections are bigger than subsections.
1135 \begin_layout LyX-Code
1136 Subsection description
1139 \begin_layout LyX-Code
1140 Subsections are smaller than sections.
1143 \begin_layout Standard
1144 Click on the second line and select
1153 LyX numbers the subsection
1154 \begin_inset Quotes eld
1158 \begin_inset Quotes erd
1161 , and typesets it in a font which is bigger than regular text but smaller
1162 than the section title.
1163 Change the fourth line
1167 environment as well.
1168 As you probably expected, LyX automatically numbered the section
1169 \begin_inset Quotes eld
1173 \begin_inset Quotes erd
1177 If you put yet another section before Section
1178 \begin_inset space ~
1182 \begin_inset space ~
1185 2 will be renumbered as Section 3, and the subsections will be renumbered
1187 \begin_inset Quotes eld
1191 \begin_inset Quotes erd
1195 \begin_inset Quotes eld
1199 \begin_inset Quotes erd
1206 \begin_layout Standard
1207 Further levels of sectioning include
1220 We will let you play with these on your own.
1221 You may notice that paragraph and subparagraph headings are not numbered
1222 by default, and that subparagraphs are indented; see the
1226 for an explanation and how to change this.
1231 headings are actually the highest level of sectioning, above
1235 s, but you are only allowed to use them in certain types (text classes)
1236 of LyX documents (see Section
1237 \begin_inset space ~
1241 \begin_inset CommandInset ref
1243 reference "sec:Document-Classes"
1251 \begin_layout Standard
1252 Finally, you may want to have sections or subsections that are not numbered.
1253 There are environments for this as well.
1254 If you change one of your section headings to the
1258 environment (you may have to scroll down in the
1262 box to find it), LyX will use the same font size for the heading as it
1263 uses for a regular section, but it will not number that section.
1264 There are corresponding
1265 \begin_inset Quotes eld
1269 \begin_inset Quotes erd
1272 heading environments for
1281 Try changing some of your sections or subsections to the starred environments,
1282 and note how the other section numbers are updated.
1285 \begin_layout Standard
1290 : Fix the section and subsection headings in
1298 \begin_layout Subsection
1302 \begin_layout Standard
1303 LyX has several different environments for typesetting lists.
1304 The various list environments free you from hitting
1308 a million times when writing an outline, or from renumbering a whole list
1309 when you want to add a point in the middle of the list.
1310 Different types of documents logically require different list environments:
1313 \begin_layout Itemize
1314 A slide presentation might use the
1318 environment's bulleted lists to describe different points.
1322 \begin_layout Itemize
1323 An outline would use the
1327 environment's numbered lists (and lettered sublists).
1331 \begin_layout Itemize
1332 A document describing several software packages could use the
1336 environment, where each item in the list begins with a bold-faced word.
1340 \begin_layout Itemize
1345 environment is a variation on the
1352 \begin_layout Standard
1353 Let us write a list of reasons why LyX is better than other word processors.
1354 Somewhere in your document, type:
1357 \begin_layout Standard
1360 LyX is better than other word processors because:
1363 \begin_layout Standard
1379 \begin_inset Quotes eld
1383 \begin_inset Quotes erd
1387 Type in your reasons:
1390 \begin_layout LyX-Code
1391 Typesetting is done for you.
1394 \begin_layout LyX-Code
1398 \begin_layout LyX-Code
1399 Lists are very easy to create!
1402 \begin_layout Standard
1403 List environments, unlike headings, do not end when you type
1408 Instead, LyX assumes you are going on to the next item in the list.
1409 The above will therefore result in a three-item list.
1410 If you want more than one paragraph within one list
1414 , one way is to use the
1417 \begin_inset space ~
1422 , which you get by typing
1427 In order to get out of the list, you need to reselect the
1431 environment (or just use the key binding,
1434 \begin_inset space ~
1442 \begin_layout Standard
1443 You have got a beautiful itemized list.
1444 You might want to run LaTeX to see how the list looks when printed out.
1445 But what if you wanted to number the reasons? Well, just select the whole
1450 \begin_layout Plain Layout
1451 LyX will not let you select the first bullet unless you also select the
1456 the list, which you probably do not want to do.
1457 Similarly, you cannot select the actual number in a numbered section title.
1458 This is on purpose because the bullet or number depends on the document
1459 settings or text position, respectively.
1473 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1477 \begin_layout Standard
1478 While the list is still selected, you can change to the other two list environme
1487 , in order to see what they look like.
1488 For those two environments, each list item is made up of a term, which
1489 is the item's first word, followed by a definition, which is the rest of
1490 the paragraph (until you hit
1494 .) The term is either typeset in boldface (
1499 \begin_inset Quotes eld
1503 \begin_inset Quotes erd
1510 \begin_layout Plain Layout
1511 But a typesetter's tab, which will change to fit the size of the largest
1512 term, not a pathetic, rigid, unchangeable typewriter
1525 ) from the rest of the paragraph.
1526 If you want to have more than one word in the definition, then separate
1530 \begin_inset space ~
1538 \begin_layout Standard
1543 : Typeset the list in
1548 \begin_layout Standard
1549 You can nest lists within each other in all sorts of interesting ways.
1550 An obvious example would be writing outlines.
1551 Numbered and bulleted lists will have different numbering and bulleting
1552 schemes for sublists.
1557 for details on the different sorts of lists and for examples of nestings.
1560 \begin_layout Subsection
1561 Other environments: Verses, Quotations, and more
1564 \begin_layout Standard
1565 There are two environments for setting quotations apart from surrounding
1570 for short quotes and
1583 \begin_layout Plain Layout
1584 used in this Tutorial for the long typing examples
1593 font; this environment is the only place in LyX where you are allowed to
1594 use multiple spaces to allow code indenting.
1595 You can even write poetry using the
1603 to separate stanzas, and
1607 to separate lines within a stanza.
1612 for more complete descriptions of all of the available LyX environments.
1615 \begin_layout Standard
1620 : Correctly typeset the
1629 \begin_inset Newline newline
1637 \begin_layout Chapter
1641 \begin_layout Standard
1642 The previous chapter hopefully allowed you to get used to writing in LyX.
1643 It introduced you to the basic editing operations in LyX, as well as the
1644 powerful method of writing with environments.
1645 Most people who use LyX, though, will want to write documents: papers,
1646 articles, books, manuals, or letters.
1647 This chapter is meant to take you from simply writing text with LyX to
1648 writing a complete document.
1649 It will introduce you to text classes, which allow you to write different
1651 It will then describe many of the additions that turn text into a document,
1652 such as titles, footnotes, cross references, bibliographies, and tables
1656 \begin_layout Section
1658 \begin_inset CommandInset label
1660 name "sec:Document-Classes"
1667 \begin_layout Standard
1668 Different sorts of documents should be typeset differently.
1669 For example, books are generally printed double-sided, while articles are
1671 In addition, many documents contain special environments: letters contain
1672 some environments — such as the sender's address and the signature — which
1673 do not make sense in a book or article.
1682 \begin_layout Plain Layout
1683 for LaTeX users: this is equivalent to the LaTeX document class
1688 takes care of these large scale differences between different sorts of
1690 This Tutorial, for example, was written in the
1695 Document classes are another major part of the WYSIWYM philosophy; they
1696 tell LyX how to typeset the document, so you do not need to know how.
1699 \begin_layout Standard
1700 Your document is probably being written in the
1708 \begin_layout Plain Layout
1709 That is usually the default document class
1714 Try changing to other document classes (using the
1716 Document\SpecialChar \menuseparator
1719 dialog) to see how they are typeset differently.
1720 If you change your document to the
1724 document class and look at the
1728 box, you will see that most of the allowed environments are the same.
1729 However, you can now use the
1734 If you are ever unsure about which environments you can use in a given
1735 document class, just consult the
1742 \begin_layout Standard
1743 Font sizes, one- or two-column printing, and page headings are just some
1744 of the ways journals typesettings differ from one another.
1745 As the Computer Age continues to mature, journals have begun accepting
1746 electronic submissions, creating LaTeX
1747 \begin_inset Quotes eld
1751 \begin_inset Quotes erd
1754 so that authors can submit correctly typeset articles.
1755 LyX is set up to support this as well.
1756 For example, LyX supports typesetting (and extra environments) for the
1757 American Mathematics Society journals using the
1760 \begin_inset space ~
1768 \begin_layout Standard
1769 Here is a very quick reference to some of the document classes.
1772 Special Document Classes
1778 manual for many more details.
1781 \begin_layout Standard
1783 \begin_inset Tabular
1784 <lyxtabular version="3" rows="7" columns="2">
1786 <column alignment="center" valignment="top" width="0pt">
1787 <column alignment="center" valignment="top" width="0pt">
1789 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1792 \begin_layout Plain Layout
1798 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1801 \begin_layout Plain Layout
1809 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1812 \begin_layout Plain Layout
1818 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1821 \begin_layout Plain Layout
1822 one-sided, no chapters
1829 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1832 \begin_layout Plain Layout
1838 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1841 \begin_layout Plain Layout
1842 layout & environments for American Math Society
1849 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1852 \begin_layout Plain Layout
1858 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1861 \begin_layout Plain Layout
1862 longer than article, two-sided
1869 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1872 \begin_layout Plain Layout
1878 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1881 \begin_layout Plain Layout
1882 report + front and back matter
1889 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1892 \begin_layout Plain Layout
1898 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1901 \begin_layout Plain Layout
1909 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1912 \begin_layout Plain Layout
1918 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1921 \begin_layout Plain Layout
1922 lots of extra environments for address, signature\SpecialChar \ldots{}
1936 \begin_layout Section
1937 Templates: Writing a Letter
1940 \begin_layout Standard
1941 One way to write a letter would be to open a new file, and choose a
1947 Document\SpecialChar \menuseparator
1951 While this is the most obvious way to write a letter, it seems like extra
1953 Every time you write a business letter, you want to have your address,
1954 the address to which you are sending it, a body, a signature, etc.
1959 for letters, which contains a sample letter; once you have a template,
1960 you can just replace a couple of parts of the letter with your text each
1961 time you write a letter.
1964 \begin_layout Standard
1965 Open a new file with
1967 File\SpecialChar \menuseparator
1969 \begin_inset space ~
1973 \begin_inset space ~
1984 Save and print the file to see how the various environments are typeset.
1987 \begin_layout Standard
1988 When you look at the
1992 box, you will see several environments, like the
1995 \begin_inset space ~
2000 environment, which do not even exist in most other document classes.
2010 You can play around for a while to figure out how the various environments
2012 You will notice for example that the
2016 environment has the word
2017 \begin_inset Quotes eld
2021 \begin_inset Quotes eld
2024 in red before the actual text of the signature.
2025 This word does not show up in the actual letter, as you will see if you
2026 view/export the file.
2027 It is just there to let you know where the signature goes.
2028 Also, note that it does not matter where in the file the
2033 Remember, LyX is WYSIWYM; you can put the
2037 environment anywhere you want, but LyX knows that in the printout, the
2038 signature should be at the end.
2041 \begin_layout Standard
2042 A template is just a regular LyX file.
2043 This means you can fill in your address and signature and save the file
2045 From now on, any time you want to write a letter, you can use the new template
2047 We do not have to suggest an actual
2048 \begin_inset Quotes eld
2052 \begin_inset Quotes erd
2055 here; just write a letter to someone!
2059 \begin_layout Plain Layout
2060 One warning, if you are writing from a template.
2061 If you erase all of the text in an environment — for example, if you erase
2065 \begin_inset space ~
2070 field so that you can replace it with your own — and then you move the
2071 cursor without writing any text, the environment may disappear.
2072 This is because most environments cannot exist without any text in them.
2073 Just reselect the environment from the
2085 \begin_layout Standard
2086 Templates can be a huge time-saver, and we urge you to use them whenever
2088 In addition, they can help a person learn how to use some of the fancier
2090 Finally, they may be useful for a person who is configuring LyX for a bunch
2091 of less computer-aware users.
2092 When they are first learning LyX, it will be much less intimidating if
2093 they have a letter template customized for their company, for example.
2096 \begin_layout Section
2100 \begin_layout Standard
2101 LyX (like LaTeX) considers the title — which may contain the actual title,
2102 the author, the date, and even an abstract of a paper — to be a separate
2103 part of the document.
2106 \begin_layout Standard
2107 Go back to your LyX document and make sure it is using the
2115 \begin_layout Plain Layout
2116 You should not be using the letter any more, since the
2120 document class does not allow titles.
2125 Type a title on the first line, and change the line to the
2130 On the next line, type your name and change it to the
2135 On the next line, write the date in the
2140 Type a paragraph or two summarizing your document using the
2145 Notice how the title is presented when it is printed out.
2146 If you change the document format to Book, you will get a separate title
2147 page, like the first page of this tutorial.
2150 \begin_layout Standard
2155 : Fix the title, date, and author in
2160 \begin_layout Section
2161 Labels and Cross-References
2164 \begin_layout Standard
2165 You can label section headings, list items, formulas, footnotes, and floats
2169 \begin_layout Plain Layout
2170 Floats are explained in the
2184 Once you do so, you can refer to this section in other parts of the document,
2185 using cross-references.
2186 You can refer either to the section's number, or to the page that the section
2188 As with section numbering, LyX also takes care about cross-reference numbering
2190 Automatic labels and cross-references are among the most significant advantages
2191 of LyX (and LaTeX) over conventional word processors.
2195 \begin_layout Subsection
2199 \begin_layout Standard
2200 Go to our second section, whose title is
2201 \begin_inset Quotes eld
2205 \begin_inset Quotes erd
2209 Click at the end of the section title line, and select
2211 Insert\SpecialChar \menuseparator
2214 or the toolbar button
2215 \begin_inset Graphics
2216 filename ../images/label-insert.png
2223 A dialog asks you for a label name, and gives you a suggestion.
2228 , the label name will be placed in a box next to the section title.
2231 \begin_layout Standard
2232 So far you have not done anything — the DVI output will look exactly the
2233 same, since labels do not show up in the printed document.
2234 However, now that you have added a label, you can refer to that label with
2236 We will do that next.
2239 \begin_layout Subsection
2240 Your first cross-reference
2243 \begin_layout Standard
2244 Place the cursor somewhere in section
2245 \begin_inset space ~
2252 \begin_layout LyX-Code
2253 If you want to know more about this document, then see
2254 \begin_inset Newline newline
2257 section, which can be found on page.
2260 \begin_layout Standard
2261 Now — with the cursor after the word `Section' — choose
2263 Insert\SpecialChar \menuseparator
2265 \begin_inset space ~
2270 or the toolbar button
2271 \begin_inset Graphics
2272 filename ../images/dialog-show-new-inset_ref.png
2279 The Cross-reference dialog pops up.
2280 It shows a list of the possible labels you can reference.
2281 At the moment, there should be only one, `sec:About-This-Document'.
2282 First, select the drop-down menu labeled Format and select '<reference>
2283 on page <page>.' Then select `sec:About-This-Document' (it may be selected
2284 by default), and a reference marker will appear containing `Ref+Text: sec:About
2285 -This-Document' (To be really correct, you should put a
2288 \begin_inset space ~
2293 in between the word `Section' and the reference).
2294 Alternatively to that method, you can right-click on a label and use in
2295 the appearing context menu
2300 The cross-reference to this label is now in the clipboard and can be copied
2301 to the actual cursor position via the menu
2303 Edit\SpecialChar \menuseparator
2311 In the printed document, this reference marker will be replaced with the
2312 section number and then the page number.
2313 View your document as DVI, and you will see that LaTeX has been even cleverer
2315 It refers to `Section 2' and depending how much text you have between the
2316 start of Section 2 and this cross-reference you may see `on this page,'
2317 'on the previous page' or `on page n' (whereas
2321 is the page number).
2324 \begin_layout Standard
2325 Conveniently, a cross-reference acts as a hyperlink when you are editing
2326 a document in LyX; clicking on it will pop up the
2333 \begin_inset space ~
2337 \begin_inset space ~
2342 will move the cursor to the referenced label.
2345 \begin_layout Subsection
2346 More fun with labels
2349 \begin_layout Standard
2350 We told you that LyX takes care about numbering cross-references; now you
2352 Add a new section before Section
2353 \begin_inset space ~
2357 Update the DVI view, and — voilà! — the section cross reference changed
2359 \begin_inset Quotes eld
2363 \begin_inset Quotes erd
2366 ! Change the section
2367 \begin_inset Quotes eld
2371 \begin_inset Quotes erd
2374 to a subsection, and the cross-reference will reference Subsection
2375 \begin_inset space ~
2378 2.1 instead of Section
2379 \begin_inset space ~
2383 The page reference will not change unless you add a whole page of text
2384 before the label, of course.
2388 \begin_layout Standard
2389 If you want some more practice with labels, then try putting a new label
2390 where your first cross-reference was, and refer to that label from elsewhere
2392 If you will be inserting cross-references often, it may be convenient to
2400 \begin_layout Standard
2401 If you want to make sure that the cross-referencing gets the pages right
2402 even for larger documents,
2406 a couple pages of text from the
2410 to the clipboard, and
2414 the stolen text into your document.
2418 \begin_layout Plain Layout
2419 By the way, copying a chapter title may cause an error, because chapters
2420 are not allowed in the article class, see section
2421 \begin_inset space ~
2425 \begin_inset CommandInset ref
2427 reference "sec:Document-Classes"
2432 If this happens, just delete the chapter title.
2440 \begin_layout Standard
2445 : Fix the references in
2450 \begin_layout Section
2451 Footnotes and Margin Notes
2454 \begin_layout Standard
2455 Footnotes can be added using the toolbar button
2456 \begin_inset Graphics
2457 filename ../images/footnote-insert.png
2465 Insert\SpecialChar \menuseparator
2469 Click at the end of the word
2470 \begin_inset Quotes eld
2474 \begin_inset Quotes erd
2477 somewhere in your document and click the
2478 \begin_inset Graphics
2479 filename ../images/footnote-insert.png
2486 A footnote box appears where you can enter the text of the footnote.
2487 LyX should place the cursor at the beginning of the footnote box.
2491 \begin_layout LyX-Code
2492 LyX is a typesetting word processor.
2495 \begin_layout Standard
2496 Now click on the button labeled
2497 \begin_inset Quotes eld
2501 \begin_inset Quotes erd
2505 The footnote box is closed, leaving the button showing where the footnote
2506 marker will be in the printed text; this is called
2507 \begin_inset Quotes eld
2511 \begin_inset Quotes erd
2515 You can unfold the footnote at any time and re-edit its text by clicking
2517 \begin_inset Quotes eld
2521 \begin_inset Quotes erd
2527 \begin_layout Standard
2528 A footnote can be cut and pasted like normal text.
2529 Go ahead; try it! All you need to do is select the footnote button
2533 \begin_layout Plain Layout
2534 It may be easier to select it using the keyboard.
2535 You might accidentally open the footnote if you are trying to select the
2536 marker itself with the mouse.
2550 In addition, you can change regular text to a footnote, by selecting it
2552 \begin_inset Graphics
2553 filename ../images/footnote-insert.png
2559 button; change a footnote to regular text by hitting the
2563 key when the cursor is in the first position of a footnote, or by hitting
2568 key when the cursor is in the very last position of the footnote, respectively.
2571 \begin_layout Standard
2572 Margin notes can be added using the menu
2574 Insert\SpecialChar \menuseparator
2576 \begin_inset space ~
2581 or the toolbar button
2582 \begin_inset Graphics
2583 filename ../images/marginalnote-insert.png
2590 Margin notes are like footnotes, except that:
2593 \begin_layout Itemize
2594 the on-screen boxes say
2595 \begin_inset Quotes eld
2599 \begin_inset Quotes erd
2603 \begin_inset Quotes eld
2607 \begin_inset Quotes erd
2613 \begin_layout Itemize
2614 the notes will be placed in the margin, instead of below the text
2617 \begin_layout Itemize
2618 margin notes are not numbered
2621 \begin_layout Standard
2622 Change your LyX footnote back to text, then select and change it to a margin
2624 Run LaTeX again to see what the margin note looks like.
2627 \begin_layout Standard
2632 : Fix the footnote in
2637 \begin_layout Section
2639 \begin_inset CommandInset label
2641 name "sec:bibliographies"
2648 \begin_layout Standard
2649 Bibliographies (at least in the exact sciences) are similar to cross references.
2650 The bibliography contains a list of references at the end of the document,
2651 and they can be referenced from within the document.
2652 Like section titles, LyX and LaTeX make your job easier by automatically
2653 numbering the bibliography items and changing citations when the item numbers
2657 \begin_layout Standard
2658 Go to the end of the document and switch to the
2663 Now, each paragraph you type will be a reference.
2665 \begin_inset Quotes eld
2670 The Lyx Tutorial, by the LyX Documentation Team
2673 \begin_inset Quotes erd
2676 as your first reference.
2677 Note that LyX automatically puts a number in a box before each reference.
2678 Click on the boxed reference number, and the
2681 \begin_inset space ~
2691 is to refer to this reference within the LyX document, the
2700 is set (default), you will see the number of the bibliography in the output.
2706 \begin_inset Quotes eld
2710 \begin_inset Quotes erd
2713 to make it easy to remember.
2716 \begin_layout Standard
2717 Now pick somewhere in your document that you would like to insert a reference.
2720 Insert\SpecialChar \menuseparator
2723 or the toolbar button
2724 \begin_inset Graphics
2725 filename ../images/dialog-show-new-inset_citation.png
2737 The right panel in this dialog lists all the bibliography entries, and
2738 this field allows you to choose which bibliography item you want to cite.
2740 \begin_inset Quotes eld
2744 \begin_inset Quotes erd
2747 (right now, that is the only item in the bibliography), then use the
2751 button in the center to insert it.
2752 (You can have multiple citations in the same place by transferring a number
2753 of keys this way.) Now view your file as DVI, and you will see that the
2754 citation appears in brackets in the text, referring to the bibliography
2755 at the end of the document.
2758 \begin_layout Standard
2762 \begin_inset space ~
2771 dialog will put a remark (such as a reference to a page or chapter within
2772 the referenced book or article) in the brackets after the reference.
2773 If you want the references to have labels instead of numbers in the printed
2774 output (for example, some journals would use
2775 \begin_inset Quotes eld
2779 \begin_inset Quotes erd
2782 to refer to a paper written by Smith in 1995), use the
2789 \begin_inset space ~
2802 \begin_layout Standard
2807 Fix the bibliography and citation in
2812 \begin_layout Section
2816 \begin_layout Standard
2817 You may want to put a table of contents at the beginning of your document.
2818 LyX makes this very easy to do.
2823 after your document title and before your first section title and choose
2826 Insert\SpecialChar \menuseparator
2828 \begin_inset space ~
2832 \begin_inset space ~
2835 TOC\SpecialChar \menuseparator
2837 \begin_inset space ~
2841 \begin_inset space ~
2848 \begin_inset Quotes eld
2852 \begin_inset Quotes erd
2855 will appear in a button on the first line of the document.
2859 \begin_layout Standard
2860 This may not appear to be very useful.
2861 However, if you look at your DVI file, you will see that a table of contents
2862 has been generated, listing the various sections and subsections in your
2864 As usual, if you reorder sections or create new ones, you will see those
2865 changes in the DVI file when you update it.
2869 \begin_layout Standard
2870 The table of contents is not printed in the on-screen version of the document.
2871 But you can display the table of contents in a separate window by clicking
2872 on the table of contents button, or by using
2874 Document\SpecialChar \menuseparator
2877 or the toolbar button
2878 \begin_inset Graphics
2879 filename ../images/dialog-toggle_toc.png
2886 This menu will work even if you do not have a table of contents inset in
2888 This is a very useful tool for moving around your document parts.
2889 Clicking on a (sub)section title in the
2893 window will highlight that line and move the display (in the LyX editing
2894 window) to that place in the document.
2895 You can also use the arrow keys to move up and down in the table of contents.
2896 You may therefore find it convenient to leave this window open throughout
2898 You can get similar functionality from the
2902 menu, though, where the table of contents appears automatically.
2905 \begin_layout Standard
2906 To get rid of the Table of Contents, you can delete the table of contents
2907 button just like any other text.
2910 \begin_layout Standard
2915 : Fix the table of contents in
2920 \begin_layout Chapter
2924 \begin_layout Standard
2925 LaTeX is used by many scientists because it outputs great looking equations,
2926 avoiding the control characters used by word processors and their equation
2928 Many of these scientists are frustrated, however, because writing equations
2929 in LaTeX is more like programming than writing.
2930 Happily, LyX has WYSIWYM support for equations.
2931 If you are used to LaTeX, you will find that all of the usual LaTeX math
2932 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
2933 If, on the other hand, you have never written in LaTeX, then the
2936 \begin_inset space ~
2941 will allow you to write professional-looking math quickly and easily.
2944 \begin_layout Section
2948 \begin_layout Standard
2949 Somewhere in your LyX document, type:
2952 \begin_layout LyX-Code
2953 I like what Einstein said, E=mc^2, because it is so simple.
2957 \begin_layout Standard
2958 Now, that equation does not look very good in LyX and in the output; there
2959 is no space between the letters and the equals sign, and you would like
2960 to write an actual superscript for the
2961 \begin_inset Quotes eld
2965 \begin_inset Quotes erd
2969 That bad typesetting happened because we did not tell LyX that we were
2970 writing a mathematical expression, so it typeset the equation like regular
2974 \begin_layout Standard
2975 Instead, we create a formula that will get typeset properly.
2976 In order to create a formula, just click the toolbar button
2977 \begin_inset Graphics
2978 filename ../images/math-mode.png
2986 Insert\SpecialChar \menuseparator
2987 Math\SpecialChar \menuseparator
2989 \begin_inset space ~
2995 LyX will insert a little blue square, which is an empty math formula.
3001 The expression is typed in blue, and the blue square disappears as soon
3002 as the formula is not empty.
3007 to leave the equation The purple markers disappear, leaving the cursor
3008 to the right of the expression, and now if you type something, it will
3012 \begin_layout Standard
3013 Looking at the output you will notice that the expression was typeset nicely,
3014 with spaces between the letters and the equals sign, and a superscript
3016 \begin_inset Quotes eld
3020 \begin_inset Quotes erd
3024 Letters in math mode are assumed to be variables, and come out in italics.
3025 Numbers are just numbers.
3028 \begin_layout Standard
3029 This math editor is another example of the WYSIWYM philosophy.
3030 In LaTeX, you write a mathematical expression using text and commands like
3037 ; this can be frustrating, because you cannot see what an expression looks
3038 like until you run the file under LaTeX and you may have to spend time
3040 \begin_inset space \thinspace{}
3044 \begin_inset space \space{}
3048 LyX does not attempt to get the expression to look perfect (WYSIWYG), but
3049 it gives you an extremely good idea of what the expression will look like.
3050 LaTeX then takes care of the professional typesetting.
3053 \begin_layout Section
3054 Navigating an Equation
3057 \begin_layout Standard
3059 \begin_inset Formula $E=mc^{2}$
3063 \begin_inset Formula $E=1+mc^{2}$
3067 Use the arrow keys to move the cursor into the expression.
3068 Note that when you enter the expression, the purple markers appear to let
3069 you know you are editing math.
3078 to move the cursor past the equals sign, and just type
3079 \begin_inset Quotes eld
3083 \begin_inset Quotes erd
3087 Again, you can use the arrow keys or
3091 to leave the formula\SpecialChar \@.
3095 \begin_layout Standard
3096 Other than the special keys described below, typing in math mode is like
3097 editing regular text.
3107 Select text either with the arrow keys or with the mouse.
3110 Edit\SpecialChar \menuseparator
3113 works in math mode as well as cut and paste.
3114 One thing to be careful of: if you are left or right outside a formula
3123 respectively, you delete the whole formula.
3124 Luckily, you can just use
3131 \begin_layout Standard
3132 What if you want to change
3133 \begin_inset Formula $E=mc^{2}$
3137 \begin_inset Formula $E=mc^{2.5}+1$
3140 ? Again, you can use the mouse to click in the right place.
3141 However, you can also use the arrow keys.
3142 If the cursor is just after the
3143 \begin_inset Quotes eld
3147 \begin_inset Quotes erd
3151 \begin_inset Quotes eld
3155 \begin_inset Quotes erd
3162 and the cursor is moved to the level of the superscript, just before the
3164 \begin_inset Quotes eld
3168 \begin_inset Quotes erd
3173 \begin_inset Quotes eld
3177 \begin_inset Quotes erd
3185 will move the cursor back to the regular level.
3194 , the cursor will be placed
3198 the superscript (so that you can then type the
3199 \begin_inset Quotes eld
3203 \begin_inset Quotes erd
3209 \begin_layout Section
3210 Exponents and Indices
3213 \begin_layout Standard
3214 An exponent can be entered from the
3217 \begin_inset space ~
3222 (see below), but it is actually simpler just to type the caret key,
3223 \begin_inset Quotes eld
3227 \begin_inset Quotes erd
3231 LyX will place another blue rectangle in the superscript, so that whatever
3232 you write next will be superscripted, and in a smaller font size.
3233 Everything you type until you hit a
3241 to exit the formula entirely) will be in the superscript.
3244 \begin_layout Standard
3245 Writing a subscript (index) is just easy; start one by typing the underscore
3247 \begin_inset Quotes eld
3251 \begin_inset Quotes erd
3255 You can subscript and superscript both subscripts and superscripts like
3257 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3264 \begin_layout Standard
3276 \begin_layout Section
3280 \begin_layout Standard
3284 \begin_inset space ~
3289 is a convenient way to enter symbols or to perform complicated formula
3291 Many of these operations can be accomplished from the keyboard or the
3293 Edit\SpecialChar \menuseparator
3298 Insert\SpecialChar \menuseparator
3302 However, we are going to concentrate on using the
3305 \begin_inset space ~
3310 , just to let you know what is out there; you can learn keyboard shortcuts
3311 and commands later from the
3318 \begin_layout Standard
3322 \begin_inset space ~
3327 is shown when the cursor is in a formula and can also be turned on manually
3330 View\SpecialChar \menuseparator
3334 When you click there on
3335 \begin_inset Quotes eld
3339 \begin_inset Quotes erd
3342 the toolbar will be shown permanently at the bottom; this state is visualized
3347 menu with a checkmark.
3348 When you click in this state again on
3349 \begin_inset Quotes eld
3353 \begin_inset Quotes erd
3364 is only shown when the cursor is within a formula; this state is visualized
3365 by the renaming of the menu entry from
3366 \begin_inset Quotes eld
3370 \begin_inset Quotes erd
3374 \begin_inset Quotes eld
3378 \begin_inset space ~
3382 \begin_inset Quotes erd
3388 \begin_layout Subsection
3392 \begin_layout Standard
3396 \begin_inset space ~
3401 allows you to choose from a large array of symbols used in math: operators,
3402 arrows, relationships, delimiters, special characters, sums and integrals.
3403 Note that subscripting and superscripting allow you to put lower and upper
3404 limits on sums and integrals.
3408 \begin_layout Subsection
3409 Square roots, accents, and delimiters
3412 \begin_layout Standard
3413 To type a square root, just click on the button
3414 \begin_inset Graphics
3415 filename ../images/math/sqrt.png
3422 The square root appears, and the cursor is in a new insertion point inside
3424 You can type variables, numbers, other square roots, fractions, whatever
3426 LyX will automatically resize the square root to fit what is inside.
3429 \begin_layout Standard
3430 Accenting a character (
3431 \begin_inset Formula $\overrightarrow{v}$
3434 ) or group of characters (
3435 \begin_inset Formula $\overrightarrow{a+b}$
3438 ) is done the same way.
3439 Decorations are available from the toolbar via the button
3440 \begin_inset Graphics
3441 filename ../images/math/hat.png
3448 Click on a decoration, and LyX will insert that decoration with an insertion
3449 point under (or over) it.
3450 Just type what you want in the insertion point.
3451 There are two sets of decorations: those that resize with the text you
3452 type, and those that have a fixed size, and are most appropriate for a
3457 \begin_layout Standard
3458 Delimiters such as parentheses, brackets, and braces work similarly, but
3459 are a bit more complicated.
3460 Hit the delimiter button
3461 \begin_inset Graphics
3462 filename ../images/dialog-show_mathdelimiter.png
3473 Your current selection of delimiters is displayed in a box.
3474 It is a pair of parentheses by default, but you can choose a pair of braces,
3475 a brace and a parenthesis, or choose the empty square to have something
3477 \begin_inset Quotes eld
3481 \begin_inset Formula $a=\left\langle 7\right.$
3485 \begin_inset Quotes erd
3488 (the empty delimiter is displayed as a broken line in LyX, but will not
3489 show up in the output).
3492 \begin_layout Standard
3493 If you are lazy, you can type actual parentheses in math mode, rather than
3499 However, those parentheses will be the same size as regular text, which
3500 will look bad if you have a big fraction or matrix inside the parentheses.
3501 So it is better in this case to use one of the three delimiter buttons
3502 that insert directly e.
3503 \begin_inset space \thinspace{}
3507 \begin_inset space \space{}
3511 \begin_inset space \thinspace{}
3517 \begin_layout Standard
3518 You can also put delimiters or a square root sign or a decoration on already
3519 existing formula parts.
3520 Select the portion of the formula that you want to adjust, and then click
3521 on the button you want from the
3524 \begin_inset space ~
3530 Try using this to change Newton's second law from scalar to vector form
3532 \begin_inset Formula $f=ma$
3536 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3540 Once you have learned about matrices, this is how you will put parentheses
3541 or brackets around them.
3544 \begin_layout Subsection
3548 \begin_layout Standard
3549 To create a fraction, click on the fraction button
3550 \begin_inset Graphics
3551 filename ../images/math/frac.png
3561 \begin_inset space ~
3567 LyX writes two insertion points in a fraction.
3568 As you would expect, you can use arrow keys or the mouse to move around
3570 Click on the top square and type
3571 \begin_inset Quotes eld
3575 \begin_inset Quotes erd
3584 \begin_inset Quotes eld
3588 \begin_inset Quotes erd
3592 You have made a fraction! Of course you can type anything within each of
3593 the two boxes: variables with exponents, square roots, other fractions,
3598 \begin_layout Standard
3610 \begin_layout Subsection
3611 Functions: lim, log, sin and others
3614 \begin_layout Standard
3615 Because letters in math mode are considered to be variables, if you type
3617 \begin_inset Quotes eld
3621 \begin_inset Quotes erd
3624 in math mode, LyX thinks you are typing the product of the three variables
3626 \begin_inset Formula $s$
3630 \begin_inset Formula $i$
3634 \begin_inset Formula $n$
3638 The three letters will be typeset in italics, when what you really wanted
3640 \begin_inset Quotes eld
3644 \begin_inset Quotes erd
3648 In addition, LyX will not put a space between the word
3649 \begin_inset Quotes eld
3653 \begin_inset Quotes erd
3657 \begin_inset Quotes eld
3661 \begin_inset Quotes erd
3668 will exit the formula).
3670 \begin_inset Quotes eld
3674 \begin_inset Formula $\sin(x)$
3678 \begin_inset Quotes erd
3682 \begin_inset Quotes eld
3686 \begin_inset Formula $sin(x)$
3690 \begin_inset Quotes erd
3696 \begin_layout Standard
3700 \begin_inset space ~
3706 \begin_inset Graphics
3707 filename ../images/math/functions.png
3714 \begin_inset Quotes eld
3718 \begin_inset Quotes erd
3721 in the appearing function list.
3723 \begin_inset Quotes eld
3727 \begin_inset Quotes erd
3730 is displayed in LyX in black, and set in upright roman type.
3731 The whole word is treated as one symbol, so if you type
3735 , it will delete the whole word.
3737 \begin_inset Quotes eld
3741 \begin_inset Quotes erd
3744 , which will be written in blue italics, like you expect in a formula.
3745 In the output, the expression will be correctly typeset.
3749 \begin_layout Standard
3750 The function list includes other trigonometric functions and their inverses,
3751 hyperbolic functions, logarithms, limits, and quite a few others.
3752 These functions can take subscripts and superscripts, important for typing
3754 \begin_inset Quotes eld
3758 \begin_inset Formula $\cos^{2}\theta$
3762 \begin_inset Quotes erd
3766 \begin_inset Quotes eld
3770 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3774 \begin_inset Quotes erd
3780 \begin_layout Standard
3792 \begin_layout Subsection
3796 \begin_layout Standard
3797 Click on the matrix button
3798 \begin_inset Graphics
3799 filename ../images/dialog-show_mathmatrix.png
3808 \begin_inset space ~
3814 The appearing dialog allows you to choose how many rows and columns you
3815 want in your matrix.
3816 Choose 2 rows and 3 columns and hit
3821 LyX prints 6 insertion points in a
3822 \begin_inset Formula $2\times3$
3826 As usual, you can put any sort of formula expression (a square root, another
3827 matrix, etc.) in each insertion point.
3828 You can also leave some of the insertion points empty if you want.
3831 \begin_layout Standard
3836 can be used to move horizontally between the columns of a matrix.
3837 Alternatively, you can use the arrow keys to move around - hitting
3841 at the end of one box will move to the next box,
3845 will move to the next row, etc.
3848 \begin_layout Standard
3849 If you need to change the number of rows and columns, use the menu
3851 Edit\SpecialChar \menuseparator
3853 \begin_inset space \thinspace{}
3857 \begin_inset space \thinspace{}
3862 or the math toolbar buttons
3863 \begin_inset Graphics
3864 filename ../images/tabular-feature_append-row.png
3871 \begin_inset Graphics
3872 filename ../images/tabular-feature_delete-row.png
3879 \begin_inset Graphics
3880 filename ../images/tabular-feature_append-column.png
3887 \begin_inset Graphics
3888 filename ../images/tabular-feature_delete-column.png
3897 \begin_layout Standard
3902 for information on how to change the horizontal alignment of each column,
3903 and how to change the vertical position of the whole matrix.
3904 Note that if you want to write a table containing text, you should use
3905 LyX's wonderful table support, rather than trying to write text in a matrix.
3908 \begin_layout Subsection
3912 \begin_layout Standard
3913 All of the expressions we have written so far have been on the same line
3914 as the text that came before and after them, otherwise known as inline
3916 This is fine for short, simple expressions, but if you want to write larger
3917 ones, or if you want your expressions to stand out from the text, you need
3918 to write them in display mode.
3919 In addition, only displayed expressions can be labeled and numbered (see
3924 ), and multi-line equations must be in display mode.
3927 \begin_layout Standard
3928 While being in a formula, click on the display button
3929 \begin_inset Graphics
3930 filename ../images/math-display.png
3939 \begin_inset space ~
3945 This centers the formula and adds a blank line before and after it.
3946 Now type in an expression and compile your file to see how it looks.
3947 The display button is actually a toggle; use it now to change a couple
3948 of your expressions to display mode and back.
3952 \begin_layout Standard
3953 Display mode has a couple differences from inline mode:
3956 \begin_layout Itemize
3957 The default font is larger for a few symbols, like
3958 \begin_inset Formula $\sum$
3962 \begin_inset Formula $\int$
3968 \begin_layout Itemize
3969 Subscripts and superscripts for limits and sums (but not integrals) are
3970 written under and over rather than next to the symbols
3973 \begin_layout Itemize
3977 \begin_layout Standard
3978 Other than these differences, though, displayed expressions and inline expressio
3979 ns are very similar.
3982 \begin_layout Standard
3983 One final note about the way displayed formulas are typeset: Be careful
3984 about whether you are putting your equation into a new paragraph or not.
3985 If your formula is in the middle of a sentence or paragraph, then do not
3991 Doing so will cause the text
3995 the formula to start a new paragraph.
3996 That text will be indented or follow a blank line, depending on your document
3997 paragraph settings, which is probably not what you want.
4000 \begin_layout Standard
4005 : Put the various equations in
4009 into display mode, and see how they are typeset differently.
4012 \begin_layout Standard
4017 : Using various tools you have learned in this section, you should be able
4018 to write an equation like:
4022 \begin_layout Plain Layout
4023 After you have done it the hard way, give
4025 Insert\SpecialChar \menuseparator
4026 Math\SpecialChar \menuseparator
4028 \begin_inset space ~
4039 \begin_inset Formula \[
4040 f(x)=\left\{ \begin{array}{cc}
4043 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4050 \begin_layout Section
4054 \begin_layout Standard
4055 LyX's math editor can do a lot more.
4056 Now you are familiar with the basics, you can refer to the
4063 \begin_layout Itemize
4064 Label and number expressions
4067 \begin_layout Itemize
4068 Create multi-line equations
4071 \begin_layout Itemize
4072 Change typefaces, e.
4073 \begin_inset space \thinspace{}
4077 \begin_inset space \space{}
4080 to write bold-face text in an expression.
4083 \begin_layout Itemize
4084 Fine-tune font sizes and spacing within an expression.
4085 (Do not worry about this until your final draft!)
4088 \begin_layout Itemize
4090 These are very powerful, because you just define them once at the top of
4091 the document, and then you can use them throughout the document.
4094 \begin_layout Itemize
4095 Do lots of other things that we have no space for in this Tutorial.
4098 \begin_layout Chapter
4102 \begin_layout Section
4103 Other major LyX Features
4106 \begin_layout Standard
4107 We have not gone through all the possible commands in LyX, and we are not
4116 \begin_inset space ~
4121 manual for more information.
4122 We will just mention a couple more major things LyX can do:
4125 \begin_layout Itemize
4126 LyX has WYSIWYM support for tables.
4129 Insert\SpecialChar \menuseparator
4133 \begin_inset Graphics
4134 filename ../images/tabular-insert.png
4141 Click on the table with the
4148 \begin_inset space ~
4153 dialog box which allows extensive table editing.
4156 \begin_layout Itemize
4157 LyX also supports including pictures in any format within documents.
4160 Insert\SpecialChar \menuseparator
4164 \begin_inset Graphics
4165 filename ../images/dialog-show-new-inset_graphics.png
4172 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4173 can have captions, and LyX will automatically generate lists of figures
4177 \begin_layout Itemize
4178 LyX is heavily configurable.
4179 Everything from how the LyX window looks to how the output comes out can
4180 be configured in a number of ways.
4181 Much configuration is done through
4183 Tools\SpecialChar \menuseparator
4187 For more information on this, check out
4189 Help\SpecialChar \menuseparator
4190 Customization\SpecialChar \@.
4194 \begin_layout Itemize
4195 LyX is being developed by a team of programmers on five continents.
4196 Therefore, LyX has better support for non-English languages (such as Dutch,
4197 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4198 ) than many word processors.
4199 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4200 languages Chinese Japanese, and Korean are supported.
4201 You can write documents in other languages and you can also configure LyX
4202 to show its menus and error messages in other languages.
4206 \begin_layout Itemize
4207 The LyX menus feature keybindings.
4208 This means that you can do
4210 File\SpecialChar \menuseparator
4221 or by using the binding which is shown next to it in the menu (Ctrl+O by
4223 Keybindings are also configurable.
4224 For information on this, check out
4226 Help\SpecialChar \menuseparator
4227 Customization\SpecialChar \@.
4231 \begin_layout Itemize
4232 LyX can read LaTeX documents.
4234 \begin_inset space ~
4238 \begin_inset CommandInset ref
4240 reference "sec:tex2lyx"
4247 \begin_layout Itemize
4248 Spell-checking, thesaurus, and word count facilities are available.
4251 \begin_layout Itemize
4252 Generation of indexes and nomenclatures/glossaries is supported.
4255 \begin_layout Section
4257 \begin_inset CommandInset label
4259 name "sec:latexusers"
4266 \begin_layout Standard
4267 If you do not know anything about LaTeX, you do not have to read this section.
4268 Actually, you might want to
4272 about LaTeX, and then read this chapter.
4273 However, some who begin to use LyX will be familiar with LaTeX.
4274 If you are such a person, you may be wondering if LyX can really do everything
4276 The short answer is that LyX can do pretty much everything LaTeX can do
4277 in one form or another, and it definitely simplifies most parts of writing
4281 \begin_layout Standard
4282 Because this is just a tutorial, we are only going to mention things that
4283 new LyX users will most likely be interested in.
4284 In the interests of keeping the Tutorial short, we will give only minimal
4289 \begin_inset space ~
4297 \begin_inset space ~
4302 manual have a great deal of information on differences between LyX and
4303 LaTeX, and how to do various LaTeX tricks in LyX.
4306 \begin_layout Subsection
4310 \begin_layout Standard
4311 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4312 will be displayed in red on the screen.
4313 You can use TeX commands in LyX by choosing
4315 Insert\SpecialChar \menuseparator
4317 \begin_inset space ~
4323 \begin_inset Graphics
4324 filename ../images/ert-insert.png
4331 This creates a box where everything within it is passed straight to LaTeX.
4334 \begin_layout Standard
4335 In a math formula, TeX mode is handled a bit differently.
4336 TeX mode is there entered by typing a backslash.
4337 The backslash is not written out, but anything you type afterwards will
4339 You exit TeX mode by typing
4343 or some other non-alphabetic character, like a number, underscore, caret,
4345 Once you exit TeX mode, if LyX knows the TeX command you have typed in,
4346 it will convert it to WYSIWYM\SpecialChar \@.
4348 \begin_inset Quotes eld
4358 \begin_inset Quotes erd
4361 in a formula and then press
4365 , LyX will change the red
4366 \begin_inset Quotes eld
4370 \begin_inset Quotes erd
4374 \begin_inset Quotes eld
4378 \begin_inset Formula $\gamma$
4382 \begin_inset Quotes erd
4386 This will work for almost all, non-complicated math macros.
4387 This may be faster than using the
4390 \begin_inset space ~
4395 , and will be especially convenient for experienced LaTeX users.
4398 \begin_layout Standard
4399 As a special case, if you type
4400 \begin_inset Quotes eld
4410 \begin_inset Quotes erd
4413 in a formula, the beginning
4417 ending braces will be inserted in red while the cursor is placed between
4419 This makes it more convenient to type those commands which take an argument.
4422 \begin_layout Standard
4423 LyX cannot do absolutely everything that LaTeX can do.
4424 Some fancy functions are not supported at all, while some work but are
4426 TeX mode allows users to get the full flexibility of LaTeX, while having
4427 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4428 LyX could never support every LaTeX package.
4435 in the preamble (see section
4436 \begin_inset space ~
4440 \begin_inset CommandInset ref
4442 reference "sec:preamble"
4446 ), you can use any package you want — although you will not have WYSIWYM
4447 support for that package's features.
4450 \begin_layout Subsection
4451 Importing LaTeX Documents —
4456 \begin_inset CommandInset label
4465 \begin_layout Standard
4466 You can import a LaTeX file into LyX by using the
4468 File\SpecialChar \menuseparator
4469 Import\SpecialChar \menuseparator
4471 \begin_inset space ~
4477 This will call the program
4481 which will create a file
4489 and then open that file.
4490 If the translation does not work, you can try calling
4494 from the command line, possibly using fancier options.
4497 \begin_layout Standard
4502 will translate most legal LaTeX, but not everything.
4503 It will leave things it does not understand in TeX mode; so, after translating
4508 , you can look for the red text and manually edit it to get it right.
4511 \begin_layout Standard
4516 has its own manpage.
4517 Read it to find out which LaTeX commands and environments are not supported,
4518 bugs (and how to get around them), and how to use the various options.
4521 \begin_layout Subsection
4522 Converting LyX Documents to LaTeX
4525 \begin_layout Standard
4526 You might wish to convert a LyX Document to a LaTeX file.
4527 For example, a co-worker or co-author who does not have LyX might want
4531 File\SpecialChar \menuseparator
4532 Export\SpecialChar \menuseparator
4536 This will create a file
4544 file you are editing.
4545 LyX always creates temporary LaTeX files when viewing or printing files.
4548 \begin_layout Subsection
4552 \begin_layout Subsubsection
4556 \begin_layout Standard
4559 Document\SpecialChar \menuseparator
4562 dialog takes care of the document-wide options.
4563 You can change there the document class, default font size and paper size.
4564 Document class options but also options for LaTeX packages can be entered
4568 \begin_inset space ~
4576 \begin_layout Subsubsection
4577 Other Preamble Matter
4578 \begin_inset CommandInset label
4587 \begin_layout Standard
4588 If you have special commands to put in the preamble of a LaTeX file, you
4589 can use them in a LyX document as well.
4592 Document\SpecialChar \menuseparator
4593 Settings\SpecialChar \menuseparator
4595 \begin_inset space ~
4600 and type in the dialog window (or from the document settings dialog, depending
4602 Anything you type will (as with TeX mode) be sent directly to LaTeX.
4605 \begin_layout Subsection
4609 \begin_layout Standard
4610 LyX has support for BibTeX, which allows you to build databases of bibliographic
4611 al references to be used in multiple documents.
4614 Insert\SpecialChar \menuseparator
4616 \begin_inset space \thinspace{}
4620 \begin_inset space \thinspace{}
4623 TOC\SpecialChar \menuseparator
4625 \begin_inset space ~
4639 field you load BibTeX files, in the
4643 field you can load BibTeX style files.
4646 \begin_layout Standard
4647 After you have done this, you can use citations from any bibliographies
4648 you are including with
4650 Insert\SpecialChar \menuseparator
4654 \begin_inset space ~
4658 \begin_inset CommandInset ref
4660 reference "sec:bibliographies"
4665 LyX will take care of running BibTeX.
4670 dialog will show a list of all the references in your
4677 \begin_layout Section
4681 \begin_layout Standard
4682 Sometimes when you try to view a document, there will be errors, things
4683 that LyX or LaTeX cannot understand.
4684 When this happens, LyX will open a
4687 \begin_inset space ~
4693 Clicking on individual errors in this dialog will take you to the place
4694 in the LyX document where the error occurs and also display the detailed
4695 LaTeX error message.