1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
8 \use_default_options false
12 \maintain_unincluded_children false
14 \language_package default
17 \font_roman "palatino" "default"
18 \font_sans "helvet" "default"
19 \font_typewriter "courier" "default"
20 \font_math "auto" "auto"
21 \font_default_family default
22 \use_non_tex_fonts false
25 \font_sf_scale 100 100
26 \font_tt_scale 100 100
28 \default_output_format pdf2
30 \bibtex_command default
31 \index_command default
35 \pdf_title "The LyX Tutorial"
36 \pdf_author "LyX Team"
37 \pdf_subject "LyX-documentation Tutorial"
38 \pdf_keywords "LyX, documentation"
40 \pdf_bookmarksnumbered true
41 \pdf_bookmarksopen true
42 \pdf_bookmarksopenlevel 1
47 \pdf_pdfusetitle false
48 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
51 \use_package amsmath 0
52 \use_package amssymb 0
55 \use_package mathdots 1
56 \use_package mathtools 0
58 \use_package stackrel 0
59 \use_package stmaryrd 0
60 \use_package undertilde 0
62 \cite_engine_type default
66 \paperorientation portrait
76 \paragraph_separation indent
77 \paragraph_indentation default
78 \quotes_language english
81 \paperpagestyle headings
82 \tracking_changes false
97 by the \SpecialChar LyX
102 \begin_layout Plain Layout
104 If you have comments on or corrections to this documentation, please send
105 them to the \SpecialChar LyX
106 Documentation mailing list:
107 \begin_inset CommandInset href
109 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
136 Welcome to \SpecialChar LyX
140 \begin_layout Standard
141 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
144 Now, do not panic – you will not need to learn \SpecialChar LaTeX
145 to use \SpecialChar LyX
147 That is, after all, the whole point of \SpecialChar LyX
148 : to provide an almost-WYSIWYG interface
149 to \SpecialChar LaTeX
151 There are some things you will need to learn, however, in order to use
156 \begin_layout Standard
157 Some of you probably found your way to this document because you tried to
158 put two spaces after a
159 \begin_inset Quotes eld
163 \begin_inset Quotes erd
166 or tried to put three blank lines between paragraphs.
167 You found out you could not and, in fact, you will find out that most of
168 the little tricks you are accustomed to use in word processors will not
169 work in \SpecialChar LyX
171 That is because most word processors you have used before allow you manually
172 to enter all spacings, font changes, and so on.
173 So you end up not only writing a document but typesetting it, too.
175 does the typesetting for you, in a consistent fashion, letting you focus
176 on the important things, like the content of your writing.
179 \begin_layout Standard
180 So read on to learn more about \SpecialChar LyX
182 Reading this tutorial is definitely worth the time.
185 \begin_layout Section
195 \begin_layout Standard
196 Before we get started with this section, you need to know that this
200 uses the notation outlined in the
205 If you came to this manual first, please read the
209 before you continue with the
216 \begin_layout Standard
217 Now that you know which fonts mean what in the documentation, we want to
218 talk a bit about what this
225 \begin_layout Subsection
226 Getting the most out of the Tutorial
229 \begin_layout Standard
230 This tutorial consists of examples and exercises.
231 To get the most out of this document, you should read through it, typing
232 all the little things we are telling you to type and trying out all of
233 the exercises to see if you get them right.
234 For convenience, you might want to print out the PDF version of this document.
237 \begin_layout Standard
238 If you are familiar with \SpecialChar LaTeX
239 , you will probably be able to read the
243 somewhat faster, since many \SpecialChar LyX
244 ideas are just \SpecialChar LaTeX
246 However, \SpecialChar LyX
247 has features you will want to learn about.
248 Even if you do not feel like reading the rest of the
252 , you should definitely check out Section
257 \begin_inset CommandInset ref
259 reference "sec:latexusers"
263 , which is specifically written for experienced \SpecialChar LaTeX
267 \begin_layout Subsection
275 \begin_layout Itemize
276 Detailed explanations of all of \SpecialChar LyX
278 \begin_inset Separator latexpar
285 \begin_layout Standard
294 \begin_layout Itemize
295 Detailed explanations of \SpecialChar LaTeX
297 \begin_inset Separator latexpar
304 \begin_layout Standard
306 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
309 can have a look at the
321 \begin_layout Standard
322 It is time to move on, time for your first document \SpecialChar ldots
326 \begin_layout Chapter
327 Getting started with \SpecialChar LyX
331 \begin_layout Section
332 Your first \SpecialChar LyX
336 \begin_layout Standard
337 OK\SpecialChar endofsentence
338 You are ready to start writing.
339 Before you do, there are a few things we need to mention, which will hopefully
340 make the Tutorial more instructive and useful.
344 \begin_layout Standard
345 Because there is information we cannot give you in the Tutorial, the
351 thing that you need to do is find the
358 Start up \SpecialChar LyX
368 You may want to load the
372 as well (if you are not reading it within \SpecialChar LyX
374 This way, you can read them while you are writing your own file.
378 \begin_layout Plain Layout
379 They can also serve as good examples of how to use the many features of
386 Note that once you have got more than one document open, you can use the
391 menu or the document tabs to switch between them.
394 \begin_layout Standard
395 In this Tutorial, we are going to assume that you have a fully working version
397 , as well as a \SpecialChar LaTeX
398 -distribution and a PDF-viewer.
399 This should be the case on all major Linux- and BSD-distributions, as well
400 as on Windows, where this is setup by the \SpecialChar LyX
404 \begin_layout Standard
405 Finally, we have written a file called
409 to let you practice your \SpecialChar LyX
411 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
414 As you learn new \SpecialChar LyX
415 functions, we will suggest that you fix those parts of
421 It also contains `subtle' hints about how to fix things.
425 \begin_layout Plain Layout
426 The hints are located in yellow
427 \begin_inset Quotes eld
431 \begin_inset Quotes erd
435 Access the text in a note by clicking on it.
440 If you want to cheat, or check what you have done, there is also a file
442 \begin_inset Newline newline
449 which contains the same text written and typeset by a \SpecialChar LyX
453 \begin_layout Standard
454 The example files can be found in the
458 directory of \SpecialChar LyX
459 's installation folder.
466 File\SpecialChar menuseparator
473 to save a copy in your own directory for you to work on.
474 As you fix parts of the raw document, check to see how those changes affect
478 \begin_layout Standard
483 directory contains lots of other examples files.
484 They will show you how to do various fancy things with \SpecialChar LyX
486 After you have read the Tutorial, or when you are confused about how to
487 do something fancy in \SpecialChar LyX
488 , take a look at these files.
491 \begin_layout Subsection
492 Typing, Viewing, and Exporting
495 \begin_layout Itemize
498 File\SpecialChar menuseparator
502 \begin_layout Itemize
503 Type a sentence like:
505 This is my first \SpecialChar LyX
509 \begin_layout Itemize
510 Save your document with
512 File\SpecialChar menuseparator
517 As\SpecialChar endofsentence
521 \begin_layout Itemize
522 Create a PDF file, with
524 Document\SpecialChar menuseparator
527 or the toolbar button
535 will open a PDF-viewer program displaying your document as it will look
539 \begin_layout Itemize
540 Export the ready to print document with
542 File\SpecialChar menuseparator
550 \begin_layout Standard
551 Congratulations! You have written your first \SpecialChar LyX
553 All of the rest is just details.
554 \begin_inset Newline newline
560 \begin_layout Standard
565 You can save time by leaving the PDF viewer running in the background.
566 Under MacOS and Linux you can use
568 Document\SpecialChar menuseparator
571 or the toolbar button
577 and just click on the PDF viewer window afterwards.
578 Under Windows still use
580 Document\SpecialChar menuseparator
592 \begin_layout Subsection
596 \begin_layout Standard
598 can of course do most of the things you are used to doing with a word processor.
599 It will word-wrap and indent paragraphs automatically.
600 Here is a quick description of how to do some simple actions.
603 \begin_layout Description
604 Undo \SpecialChar LyX
605 has multiple levels of undo, which means you can undo everything you
606 have done since your current editing session started, by selecting
608 Edit\SpecialChar menuseparator
617 ) over and over again.
618 If you undo too much, just select
620 Edit\SpecialChar menuseparator
630 \begin_inset Separator latexpar
637 \begin_layout Standard
638 Currently, undo is limited to 100 steps.
642 \begin_layout Description
645 Edit\SpecialChar menuseparator
656 Edit\SpecialChar menuseparator
667 Edit\SpecialChar menuseparator
676 ) to cut, copy, and paste.
677 Or automatically paste selected text (including selections from other programs)
685 \begin_layout Description
688 Edit\SpecialChar menuseparator
702 arg "dialog-show findreplace"
706 In the dialog, search with the
718 button to replace a word you have found.
722 \begin_layout Plain Layout
723 Close the window when you are done or leave it open if you find it more
725 Most dialog boxes in \SpecialChar LyX
726 can operate like this.
727 Just be sure you have the right window in focus when you are trying to
728 type in the main \SpecialChar LyX
729 window or a \SpecialChar LyX
735 If you like, you can specify whether to make the search case-sensitive,
736 or to search for only complete words; you can also search backwards through
740 \begin_layout Description
755 , which will by default print characters in italics), set it in
765 , usually small caps, used for people's names), or use your own formatting
768 Edit\SpecialChar menuseparator
773 Style\SpecialChar menuseparator
776 dialog (toolbar button
779 arg "dialog-show character"
785 \begin_layout Description
786 Toolbar Other buttons on the toolbar allow you to do some of the more popular
814 \begin_layout Standard
815 Of course, you have not yet written enough to make most of these functions
817 As you write more, though, try undoing, pasting, etc.
820 \begin_layout Subsection
821 WYSIWYM: Whitespace in \SpecialChar LyX
825 \begin_layout Standard
826 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
829 As many times as you hit
833 , you will only get one blank line.
834 As many times as you hit
838 , you will only get one space.
839 On a blank line, \SpecialChar LyX
840 will not let you type even one space.
845 key will not move you forward one tab stop; in fact there
849 no tab stops! There is no ruler at the top of the page to let you set tabs
853 \begin_layout Standard
854 Many word processors are based on the WYSIWYG principle:
855 \begin_inset Quotes eld
858 What You See Is What You Get.
859 \begin_inset Quotes erd
863 , on the other hand, is based on the principle that
864 \begin_inset Quotes eld
867 What You See Is What You
872 \begin_inset Quotes erd
875 You type what you mean and \SpecialChar LyX
876 will take care of typesetting it for you so
877 that the output looks nice.
882 grammatically separates paragraphs and a
886 grammatically separates words; so there is no reason to have several of
891 has no grammatical function at all – so \SpecialChar LyX
893 Using \SpecialChar LyX
894 , you will spend more of your time worrying about the
898 of your document and less time worrying about the
907 for more information on the WYSIWYM concept.
910 \begin_layout Standard
912 does have (many) ways to fine-tune the formatting of your document.
913 After all, \SpecialChar LyX
923 has information about all that.
924 It includes horizontal fills and vertical space — which are more powerful
925 and versatile than multiple spaces or blank lines — and ways to change
926 font sizes, character styles, and paragraph alignments by hand.
927 The idea, though, is that you can write your whole document, focusing on
928 content, and just worry about that fine-tuning at the end.
929 With standard word processors, you will be distracted by document formatting
930 throughout the writing process.
933 \begin_layout Section
937 \begin_layout Standard
938 Different parts of a document have different purposes; we call these parts
944 Most of a document is made up of regular text.
945 Section titles (chapter, subsection, etc.) let the reader know that a new
946 topic or subtopic will be discussed.
947 Certain types of documents have special environments.
948 A journal article will have an abstract and a title.
949 A letter will have neither of these, but will probably have an environment
950 that gives the writer's address.
953 \begin_layout Standard
954 Environments are a major part of the
955 \begin_inset Quotes eld
958 What You See Is What You Mean
959 \begin_inset Quotes erd
962 philosophy of \SpecialChar LyX
964 A given environment may require a certain font style, font size, indenting,
965 line spacing, and more.
966 This problem is aggravated, because the exact formatting for a given environmen
967 t may change: one journal may use boldface, 18 point, centered type for
968 section titles while another uses italicized, 15 point, left justified
969 type; different languages may have different standards for indenting; and
970 bibliography formats can vary widely.
972 lets you avoid learning all the different formatting styles.
975 \begin_layout Standard
980 choice box is located on the left end of the toolbar and looks like this:
982 \begin_inset Graphics
983 filename clipart/ToolbarEnvBox.png
990 It indicates in which environment you are currently writing.
991 While you were writing your first document, it said
992 \begin_inset Quotes eld
996 \begin_inset Quotes erd
999 which is the default environment for text.
1000 Now you will put a number of environments in your new document so that
1001 you can see how they work.
1004 \begin_layout Subsection
1005 Sections and Subsections
1008 \begin_layout Standard
1013 on the first line of your new \SpecialChar LyX
1026 \begin_layout Plain Layout
1032 If nothing is selected, \SpecialChar LyX
1033 changes the paragraph you are currently in to
1034 the selected environment.
1035 Alternatively, you can change several paragraphs to a different environment
1036 by selecting them before picking an environment.
1053 , which will be covered below.
1056 \begin_inset Quotes eld
1060 \begin_inset Quotes erd
1063 and typesets the section heading (title) in a larger font.
1068 \SpecialChar endofsentence
1074 \begin_inset Quotes eld
1078 \begin_inset Quotes erd
1082 \begin_inset Quotes eld
1086 \begin_inset Quotes erd
1090 Section headings, like most environments, are assumed to end when you type
1095 \SpecialChar endofsentence
1096 Type the document introduction:
1099 \begin_layout LyX-Code
1100 This is an introduction to my first \SpecialChar LyX
1104 \begin_layout Standard
1120 \begin_inset Quotes eld
1124 \begin_inset Quotes erd
1127 and waits for you to type a title.
1129 \begin_inset Quotes eld
1135 \begin_inset space ~
1141 \begin_inset Quotes erd
1144 , and you will see that \SpecialChar LyX
1145 again sets it as a section title.
1148 \begin_layout Standard
1150 Go to the end of Section
1151 \begin_inset space ~
1155 \begin_inset Quotes eld
1158 my first \SpecialChar LyX
1160 \begin_inset Quotes erd
1176 Again, \SpecialChar LyX
1178 \begin_inset Quotes eld
1182 \begin_inset Quotes erd
1185 and waits for you to type a title.
1192 \begin_inset space ~
1196 \begin_inset Quotes eld
1200 \begin_inset Quotes erd
1204 \begin_inset space ~
1207 2, has been automatically renumbered to Section
1208 \begin_inset space ~
1211 3! In true WYSIWYM fashion, you just need to identify the text that makes
1212 up the section titles, and \SpecialChar LyX
1213 takes care of numbering the sections and typesettin
1217 \begin_layout Standard
1226 environment, and type the following five lines:
1229 \begin_layout LyX-Code
1230 Sections and subsections are described below.
1233 \begin_layout LyX-Code
1237 \begin_layout LyX-Code
1238 Sections are bigger than subsections.
1241 \begin_layout LyX-Code
1242 Subsection description
1245 \begin_layout LyX-Code
1246 Subsections are smaller than sections.
1249 \begin_layout Standard
1250 Click on the second line and select
1260 numbers the subsection
1261 \begin_inset Quotes eld
1265 \begin_inset Quotes erd
1268 , and typesets it in a font which is bigger than regular text but smaller
1269 than the section title.
1270 Change the fourth line to the
1274 environment as well.
1275 As you probably expected, \SpecialChar LyX
1276 automatically numbered the section
1277 \begin_inset Quotes eld
1281 \begin_inset Quotes erd
1285 If you put yet another section before Section
1286 \begin_inset space ~
1290 \begin_inset space ~
1293 2 will be renumbered as Section 3, and the subsections will be renumbered
1295 \begin_inset Quotes eld
1299 \begin_inset Quotes erd
1303 \begin_inset Quotes eld
1307 \begin_inset Quotes erd
1313 \begin_layout Standard
1314 Further levels of sectioning include
1327 We will let you play with these on your own.
1328 You may notice that paragraph and subparagraph headings are not numbered
1329 by default, and that subparagraphs are indented; see the
1333 for an explanation and how to change this.
1338 headings are actually the highest level of sectioning, above
1342 s, but you are only allowed to use them in certain types (text classes)
1344 documents (see Section
1345 \begin_inset space ~
1349 \begin_inset CommandInset ref
1351 reference "sec:Document-Classes"
1358 \begin_layout Standard
1359 Finally, you may want to have sections or subsections that are not numbered.
1360 There are environments for this as well.
1361 If you change one of your section headings to the
1365 environment (you may have to scroll down in the
1369 box to find it), \SpecialChar LyX
1370 will use the same font size for the heading as it uses
1371 for a regular section, but it will not number that section.
1372 There are corresponding
1373 \begin_inset Quotes eld
1377 \begin_inset Quotes erd
1380 heading environments for
1389 Try changing some of your sections or subsections to the starred environments,
1390 and note how the other section numbers are updated.
1393 \begin_layout Labeling
1394 \labelwidthstring 00.00.0000
1399 : Fix the section and subsection headings in
1400 \begin_inset Newline newline
1411 \begin_layout Subsection
1415 \begin_layout Standard
1417 has several different environments for typesetting lists.
1418 The various list environments free you from hitting
1422 a million times when writing an outline, or from renumbering a whole list
1423 when you want to add a point in the middle of the list.
1424 Different types of documents logically require different list environments:
1427 \begin_layout Itemize
1428 A slide presentation might use the
1432 environment's bulleted lists to describe different points.
1435 \begin_layout Itemize
1436 An outline would use the
1440 environment's numbered lists (and lettered sublists).
1443 \begin_layout Itemize
1444 A document describing several software packages could use the
1448 environment, where each item in the list begins with a bold-faced word.
1451 \begin_layout Itemize
1460 ) environment is a variation on the
1467 \begin_layout Standard
1468 Let us write a list of reasons why \SpecialChar LyX
1469 is better than other word processors.
1470 Somewhere in your document, type:
1473 \begin_layout Standard
1477 is better than other word processors because:
1480 \begin_layout Standard
1497 arg "layout Itemize"
1503 \begin_inset Quotes eld
1507 \begin_inset Quotes erd
1511 Type in your reasons:
1514 \begin_layout LyX-Code
1515 Typesetting is done for you.
1518 \begin_layout LyX-Code
1522 \begin_layout LyX-Code
1523 Lists are very easy to create!
1526 \begin_layout Standard
1527 List environments, unlike headings, do not end when you type
1532 Instead, \SpecialChar LyX
1533 assumes you are going on to the next item in the list.
1534 The above will therefore result in a three-item list.
1535 If you want more than one paragraph within one list
1539 , one way is to use the
1542 \begin_inset space ~
1547 , which you get by typing
1552 In order to get out of the list, you need to reselect the
1556 environment (or just use the key binding
1559 arg "layout Standard"
1565 \begin_layout Standard
1566 You now have a beautiful itemized list.
1567 You might want to run \SpecialChar LaTeX
1568 to see how the list looks when printed out.
1569 But what if you wanted to number the reasons? Well, just select the whole
1574 \begin_layout Plain Layout
1576 will not let you select the first bullet (or the actual number in a numbered
1577 section title) unless you also select the paragraph
1581 it, which you probably do not want to do.
1582 This is on purpose because the bullet or number depends on the document
1583 settings or text position, respectively.
1599 arg "layout Enumerate"
1603 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1604 will fix the numbering.
1607 \begin_layout Standard
1608 While the list is still selected, you can change to the other two list environme
1616 \begin_inset space \thinspace{}
1622 \begin_inset space \thinspace{}
1632 arg "layout Description"
1641 ), in order to see what they look like.
1642 For those two environments, each list item is made up of a term, which
1643 is the item's first word, followed by a definition, which is the rest of
1644 the paragraph (until you hit
1649 The term is either typeset in boldface (
1654 \begin_inset Quotes eld
1658 \begin_inset Quotes erd
1665 \begin_layout Plain Layout
1666 But a typesetter's tab, which will change to fit the size of the largest
1667 term, not a pathetic, rigid, unchangeable typewriter
1680 ) from the rest of the paragraph.
1681 If you want to have more than one word in the definition, then separate
1685 \begin_inset space ~
1693 \begin_layout Labeling
1694 \labelwidthstring 00.00.0000
1699 : Typeset the list in
1704 \begin_layout Standard
1705 You can nest lists within each other in all sorts of interesting ways.
1706 An obvious example would be writing outlines.
1707 Numbered and bulleted lists will have different numbering and bulleting
1708 schemes for sublists.
1713 for details on the different sorts of lists and for examples of nestings.
1716 \begin_layout Subsection
1717 Other environments: Verses, Quotations, and more
1720 \begin_layout Standard
1721 There are two environments for setting quotations apart from surrounding
1726 for short quotes and
1740 \begin_layout Plain Layout
1741 used in this Tutorial for the long typing examples
1750 font; this environment is the only place in \SpecialChar LyX
1751 where you are allowed to use
1752 multiple spaces to allow code indenting.
1753 You can even write poetry using the
1761 to separate stanzas, and
1765 to separate lines within a stanza.
1770 for more complete descriptions of all of the available \SpecialChar LyX
1774 \begin_layout Labeling
1775 \labelwidthstring 00.00.0000
1780 : Correctly typeset the
1782 Quote, \SpecialChar LyX
1790 \begin_inset Newline newline
1798 \begin_layout Chapter
1802 \begin_layout Standard
1803 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1805 It introduced you to the basic editing operations in \SpecialChar LyX
1806 , as well as the powerful
1807 method of writing with environments.
1808 Most people who use \SpecialChar LyX
1809 , though, will want to write documents: papers, articles,
1810 books, manuals, or letters.
1811 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1813 a complete document.
1814 It will introduce you to text classes, which allow you to write different
1816 It will then describe many of the additions that turn text into a document,
1817 such as titles, footnotes, cross references, bibliographies, and tables
1821 \begin_layout Section
1823 \begin_inset CommandInset label
1825 name "sec:Document-Classes"
1832 \begin_layout Standard
1833 Different sorts of documents should be typeset differently.
1834 For example, books are generally printed double-sided, while articles are
1836 In addition, many documents contain special environments: letters contain
1837 some environments — such as the sender's address and the signature — which
1838 do not make sense in a book or article.
1839 The \SpecialChar LyX
1848 \begin_layout Plain Layout
1849 for \SpecialChar LaTeX
1850 users: this is equivalent to the \SpecialChar LaTeX
1856 takes care of these large scale differences between different sorts of
1858 This Tutorial, for example, was written in the
1863 Document classes are another major part of the WYSIWYM philosophy; they
1864 tell \SpecialChar LyX
1865 how to typeset the document, so you do not need to know how.
1868 \begin_layout Standard
1869 Your document is probably being written in the
1877 \begin_layout Plain Layout
1878 That is usually the default document class
1883 Try changing to other document classes (using the
1885 Document\SpecialChar menuseparator
1888 dialog) to see how they are typeset differently.
1889 If you change your document to the
1893 document class and look at the
1897 box, you will see that most of the allowed environments are the same.
1898 However, you can now use the
1903 If you are ever unsure about which environments you can use in a given
1904 document class, just consult the
1911 \begin_layout Standard
1912 Font sizes, one- or two-column printing, and page headings are just some
1913 of the ways journals' typesettings differ from one another.
1914 As the Computer Age continues to mature, journals have begun accepting
1915 electronic submissions, creating \SpecialChar LaTeX
1917 \begin_inset Quotes eld
1921 \begin_inset Quotes erd
1924 so that authors can submit correctly typeset articles.
1926 is set up to support this as well.
1927 For example, \SpecialChar LyX
1928 supports typesetting (and extra environments) for the American
1929 Mathematics Society journals using the
1932 \begin_inset space ~
1940 \begin_layout Standard
1941 Here is a very quick reference to some of the document classes.
1944 Special Document Classes
1950 manual for many more details.
1951 \begin_inset Separator latexpar
1957 \begin_layout Standard
1959 \begin_inset Tabular
1960 <lyxtabular version="3" rows="7" columns="2">
1961 <features tabularvalignment="middle">
1962 <column alignment="center" valignment="top" width="0pt">
1963 <column alignment="center" valignment="top" width="0pt">
1965 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1968 \begin_layout Plain Layout
1974 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1977 \begin_layout Plain Layout
1985 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1988 \begin_layout Plain Layout
1994 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1997 \begin_layout Plain Layout
1998 one-sided, no chapters
2005 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2008 \begin_layout Plain Layout
2014 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2017 \begin_layout Plain Layout
2018 layout & environments for American Math Society
2025 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2028 \begin_layout Plain Layout
2034 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2037 \begin_layout Plain Layout
2038 longer than article, two-sided
2045 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2048 \begin_layout Plain Layout
2054 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2057 \begin_layout Plain Layout
2058 report + front and back matter
2065 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2068 \begin_layout Plain Layout
2074 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2077 \begin_layout Plain Layout
2085 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2088 \begin_layout Plain Layout
2094 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2097 \begin_layout Plain Layout
2098 lots of extra environments for address, signature\SpecialChar ldots
2112 \begin_layout Section
2113 Templates: Writing a Letter
2116 \begin_layout Standard
2117 One way to write a letter would be to open a new file, and choose a
2123 Document\SpecialChar menuseparator
2127 While this is the most obvious way to write a letter, it seems like extra
2129 Every time you write a business letter, you want to have your address,
2130 the address to which you are sending it, a body, a signature, etc.
2136 for letters, which contains a sample letter; once you have a template,
2137 you can just replace a couple of parts of the letter with your text each
2138 time you write a letter.
2141 \begin_layout Standard
2142 Open a new file with
2144 File\SpecialChar menuseparator
2146 \begin_inset space ~
2150 \begin_inset space ~
2161 Save and print the file to see how the various environments are typeset.
2164 \begin_layout Standard
2165 When you look at the
2169 box, you will see several environments, like the
2172 \begin_inset space ~
2177 environment, that do not exist in most other document classes.
2183 You can play around for a while to figure out how the various environments
2185 You will notice for example that the
2189 environment has the word
2190 \begin_inset Quotes eld
2194 \begin_inset Quotes erd
2197 in red before the actual text of the signature.
2198 This word does not show up in the actual letter, as you will see if you
2199 view/export the file.
2200 It is just there to let you know where the signature goes.
2201 Also, note that it does not matter where in the file the
2206 Remember, \SpecialChar LyX
2207 is WYSIWYM; you can put the
2211 environment anywhere you want, but \SpecialChar LyX
2212 knows that in the printout, the signature
2213 should be at the end.
2216 \begin_layout Standard
2217 A template is just a regular \SpecialChar LyX
2219 This means you can fill in your address and signature and save the file
2221 From now on, any time you want to write a letter, you can use the new template
2223 We do not have to suggest an actual
2224 \begin_inset Quotes eld
2228 \begin_inset Quotes erd
2231 here; just write a letter to someone!
2235 \begin_layout Plain Layout
2236 One warning, if you are writing from a template.
2237 If you erase all of the text in an environment — for example, if you erase
2241 \begin_inset space ~
2246 field so that you can replace it with your own — and then you move the
2247 cursor without writing any text, the environment may disappear.
2248 This is because most environments cannot exist without any text in them.
2249 Just reselect the environment from the
2261 \begin_layout Standard
2262 Templates can be a huge time-saver, and we urge you to use them whenever
2264 In addition, they can help a person learn how to use some of the fancier
2266 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2268 of less computer-aware users.
2269 When they are first learning \SpecialChar LyX
2270 , it will be less intimidating if they have
2271 a letter template customized for their company, for example.
2274 \begin_layout Standard
2275 \begin_inset Newpage newpage
2281 \begin_layout Section
2285 \begin_layout Standard
2287 (like \SpecialChar LaTeX
2288 ) considers the title — which may contain the actual title, the author,
2289 the date, and even an abstract of a paper — to be a separate part of the
2293 \begin_layout Standard
2294 Go back to your first \SpecialChar LyX
2295 document and make sure it is using the
2303 \begin_layout Plain Layout
2304 You should not be using the letter any more, since the
2308 document class does not allow titles.
2313 Type a title on the first line, and change the line to the
2318 On the next line, type your name and change it to the
2323 On the next line, write the date in the
2328 Type a paragraph or two summarizing your document using the
2333 Notice how the title is presented when it is printed out.
2334 If you change the document format to Book, you will get a separate title
2335 page, like the first page of this tutorial.
2338 \begin_layout Labeling
2339 \labelwidthstring 00.00.0000
2344 : Fix the title, date, and author in
2349 \begin_layout Section
2350 Labels and Cross-References
2353 \begin_layout Standard
2354 You can label section headings, list items, formulas, footnotes, and floats
2358 \begin_layout Plain Layout
2359 Floats are explained in the
2373 Once you do so, you can refer to the element in other parts of the document,
2374 using cross-references.
2375 You can refer to a section's number, to the page on which the section begins
2377 As with section numbering, \SpecialChar LyX
2378 also takes care of cross-reference numbering
2380 Automatic management of labels and cross-references is among the most significa
2381 nt advantages of \SpecialChar LyX
2382 (and \SpecialChar LaTeX
2383 ) over conventional word processors.
2386 \begin_layout Subsection
2390 \begin_layout Standard
2391 Go to our second section, whose title is
2392 \begin_inset Quotes eld
2396 \begin_inset Quotes erd
2400 Click at the end of the section title line, and select
2402 Insert\SpecialChar menuseparator
2405 or the toolbar button
2412 A dialog asks you for a label name, and gives you a suggestion.
2417 , the label name will be placed in a box next to the section title.
2420 \begin_layout Standard
2421 So far you have not done anything — the output will look exactly the same,
2422 since labels do not show up in the printed document.
2423 However, now that you have added a label, you can refer to that label with
2425 We will do that next.
2428 \begin_layout Subsection
2429 Your first cross-reference
2432 \begin_layout Standard
2433 Place the cursor somewhere in Section
2434 \begin_inset space ~
2441 \begin_layout LyX-Code
2442 If you want to know more about this document,
2443 \begin_inset Newline newline
2449 \begin_layout Standard
2450 Now, with the cursor before the final period, select
2452 Insert\SpecialChar menuseparator
2454 \begin_inset space ~
2459 or the toolbar button
2462 arg "dialog-show-new-inset ref"
2466 The Cross-reference dialog pops up.
2467 It shows a list of the possible labels you can reference.
2468 At the moment, there should be only one,
2469 \begin_inset Quotes eld
2472 sec:About-This-Document
2473 \begin_inset Quotes erd
2477 First, select the drop-down menu labeled
2478 \begin_inset Quotes eld
2482 \begin_inset Quotes erd
2486 \begin_inset Quotes eld
2489 <reference> on page <page>
2490 \begin_inset Quotes erd
2495 \begin_inset Quotes eld
2498 sec:About-This-Document
2499 \begin_inset Quotes erd
2502 (it may be selected by default), and a reference marker will appear containing
2504 \begin_inset Quotes eld
2507 Ref+Text: sec:About-This-Document
2508 \begin_inset Quotes erd
2511 (To be really correct, you should put a
2514 \begin_inset space ~
2522 arg "command-alternatives space-insert protected ; math-space"
2525 ) in between the word
2526 \begin_inset Quotes eld
2530 \begin_inset Quotes erd
2533 and the reference.) An alternative way to reference a label is to right-click
2534 the label and select
2538 in the pop-up context menu.
2539 The cross-reference to this label is now in the clipboard and can be copied
2540 to the actual cursor position via the menu
2542 Edit\SpecialChar menuseparator
2552 In the printed document, this reference marker will be replaced with the
2553 section number and then the page number.
2554 Preview your document and you will see that \SpecialChar LaTeX
2555 has been even cleverer than
2558 \begin_inset Quotes eld
2562 \begin_inset Quotes erd
2565 and depending how much text you have between the start of Section
2566 \begin_inset space ~
2569 2 and this cross-reference you may see
2570 \begin_inset Quotes eld
2574 \begin_inset Quotes erd
2578 \begin_inset Quotes eld
2581 on the previous page
2582 \begin_inset Quotes erd
2586 \begin_inset Quotes eld
2590 \begin_inset Quotes erd
2597 is the page number).
2600 \begin_layout Standard
2601 Conveniently, a cross-reference acts as a hyperlink when you are editing
2602 a document in \SpecialChar LyX
2603 ; clicking on it will pop up the
2610 \begin_inset space ~
2614 \begin_inset space ~
2619 will move the cursor to the referenced label.
2622 \begin_layout Subsection
2623 More fun with labels
2626 \begin_layout Standard
2627 We told you that \SpecialChar LyX
2628 takes care of numbering cross-references; now you can
2630 Add a new section before Section
2631 \begin_inset space ~
2635 Update the preview, and — voilà! — the section cross-reference changed
2637 \begin_inset Quotes eld
2641 \begin_inset Quotes erd
2644 ! Change the section
2645 \begin_inset Quotes eld
2649 \begin_inset Quotes erd
2652 to a subsection, and the cross-reference will reference Subsection
2653 \begin_inset space ~
2656 2.1 instead of Section
2657 \begin_inset space ~
2661 The page reference will not change unless you add a whole page of text
2662 before the label, of course.
2666 \begin_layout Standard
2667 If you want some more practice with labels, then try putting a new label
2668 where your first cross-reference was, and refer to that label from elsewhere
2670 If you will be inserting cross-references often, it may be convenient to
2678 \begin_layout Standard
2679 If you want to confirm that the cross-referencing gets the pages right even
2680 for larger documents,
2684 a couple pages of text from the
2688 to the clipboard, and
2692 them into your document.
2696 \begin_layout Plain Layout
2697 By the way, copying a chapter title may cause an error, because chapters
2698 are not allowed in the article class, see Section
2699 \begin_inset space ~
2703 \begin_inset CommandInset ref
2705 reference "sec:Document-Classes"
2710 If this happens, just delete the chapter title.
2718 \begin_layout Labeling
2719 \labelwidthstring 00.00.0000
2724 : Fix the references in
2729 \begin_layout Section
2730 Footnotes and Margin Notes
2733 \begin_layout Standard
2734 Footnotes can be added using the toolbar button
2737 arg "footnote-insert"
2742 Insert\SpecialChar menuseparator
2746 Click at the end of the word
2747 \begin_inset Quotes eld
2752 \begin_inset Quotes erd
2755 somewhere in your document and insert a footnote.
2756 A footnote box appears where you can enter the text of the footnote.
2758 should place the cursor at the beginning of the footnote box.
2762 \begin_layout LyX-Code
2764 is a typesetting word processor.
2767 \begin_layout Standard
2768 Now click on the button labeled
2769 \begin_inset Quotes eld
2773 \begin_inset Quotes erd
2777 The footnote box is closed, leaving the button showing where the footnote
2778 marker will be in the printed text; this is called
2779 \begin_inset Quotes eld
2783 \begin_inset Quotes erd
2787 You can unfold the footnote at any time and re-edit its text by clicking
2789 \begin_inset Quotes eld
2793 \begin_inset Quotes erd
2799 \begin_layout Standard
2800 A footnote can be cut and pasted like normal text.
2801 Go ahead; try it! All you need to do is select the footnote button
2805 \begin_layout Plain Layout
2806 It may be easier to select it using the keyboard.
2807 You might accidentally open the footnote if you are trying to select the
2808 marker itself with the mouse.
2822 In addition, you can change regular text to a footnote, by selecting it
2826 arg "footnote-insert"
2829 button; change a footnote to regular text by hitting the
2833 key when the cursor is in the first position of a footnote, or by hitting
2838 key when the cursor is in the very last position of the footnote.
2841 \begin_layout Standard
2842 Margin notes can be added using the menu
2844 Insert\SpecialChar menuseparator
2846 \begin_inset space ~
2851 or the toolbar button
2854 arg "marginalnote-insert"
2857 \SpecialChar endofsentence
2858 Margin notes are like footnotes, except that:
2861 \begin_layout Itemize
2862 the on-screen boxes say
2863 \begin_inset Quotes eld
2867 \begin_inset Quotes erd
2871 \begin_inset Quotes eld
2875 \begin_inset Quotes erd
2881 \begin_layout Itemize
2882 the notes will be placed in the margin, instead of below the text
2885 \begin_layout Itemize
2886 margin notes are not numbered
2889 \begin_layout Standard
2890 Change your \SpecialChar LyX
2891 footnote back to text, then select and change it to a margin
2893 Run \SpecialChar LaTeX
2894 again to see what the margin note looks like.
2897 \begin_layout Labeling
2898 \labelwidthstring 00.00.0000
2903 : Fix the footnote in
2908 \begin_layout Section
2910 \begin_inset CommandInset label
2912 name "sec:bibliographies"
2919 \begin_layout Standard
2920 Bibliographies are similar to cross-references.
2921 The bibliography contains a list of references at the end of the document,
2922 and they can be referenced from within the document.
2923 Like section titles, \SpecialChar LyX
2924 and \SpecialChar LaTeX
2925 make your job easier by automatically numbering
2926 the bibliography items and changing citations when the item numbers change.
2929 \begin_layout Standard
2930 Go to the end of the document and switch to the
2935 Now, each paragraph you type will be a reference.
2937 \begin_inset Quotes eld
2942 The Lyx Tutorial, by the \SpecialChar LyX
2946 \begin_inset Quotes erd
2949 as your first reference.
2950 Note that \SpecialChar LyX
2951 automatically puts a number in a box before each reference.
2952 Click on the boxed reference number, and the
2955 \begin_inset space ~
2965 is to refer to this reference within the \SpecialChar LyX
2975 is set (default), you will see the number of the bibliography in the output.
2981 \begin_inset Quotes eld
2985 \begin_inset Quotes erd
2988 to make it easy to remember.
2991 \begin_layout Standard
2992 Now pick somewhere in your document that you would like to insert a reference.
2995 Insert\SpecialChar menuseparator
2998 or the toolbar button
3001 arg "dialog-show-new-inset citation"
3010 The left panel in this dialog lists all the bibliography entries, and this
3011 field allows you to choose which bibliography item you want to cite.
3013 \begin_inset Quotes eld
3017 \begin_inset Quotes erd
3020 (right now, that is the only item in the bibliography), then use the
3024 button in the center to insert it.
3025 (You can have multiple citations in the same place by transferring a number
3030 \begin_layout Plain Layout
3031 If one uses label names for references that are easy to remember it is easier
3032 to find the entry in the list of references.
3042 Now preview your file and you will see that the citation appears in brackets
3043 in the text, referring to the bibliography at the end of the document.
3046 \begin_layout Standard
3050 \begin_inset space ~
3059 dialog will put a remark (such as a reference to a page or chapter within
3060 the referenced book or article) in the brackets after the reference.
3061 If you want the references to have labels instead of numbers in the printed
3062 output (for example, some journals would use
3063 \begin_inset Quotes eld
3067 \begin_inset Quotes erd
3070 to refer to a paper written by Smith in 1995), use the
3077 \begin_inset space ~
3090 \begin_layout Labeling
3091 \labelwidthstring 00.00.0000
3096 Fix the bibliography and citation in
3101 \begin_layout Section
3105 \begin_layout Standard
3106 You may want to put a table of contents at the beginning of your document.
3108 makes this easy to do.
3113 after your document title and before your first section title and select
3116 Insert\SpecialChar menuseparator
3118 \begin_inset space ~
3122 \begin_inset space ~
3125 TOC\SpecialChar menuseparator
3127 \begin_inset space ~
3131 \begin_inset space ~
3138 \begin_inset Quotes eld
3142 \begin_inset Quotes erd
3145 will appear in a button on the first line of the document.
3149 \begin_layout Standard
3150 This may not appear to be very useful.
3151 However, if you look at your preview, you will see that a table of contents
3152 has been generated, listing the various sections and subsections in your
3154 As usual, if you reorder sections or create new ones, you will see those
3155 changes in the preview when you update it.
3159 \begin_layout Standard
3160 The table of contents is not printed in the on-screen version of the document.
3161 But you can display the table of contents in a separate window by clicking
3162 on the table of contents button, or by using
3164 View\SpecialChar menuseparator
3166 \begin_inset space ~
3171 or the toolbar button
3174 arg "dialog-toggle toc"
3178 This menu will work even if you do not have a table of contents inset in
3180 This is a very useful tool for rearranging your document parts.
3181 Clicking on a (sub)section title in the
3185 window will highlight that line and move the display (in the \SpecialChar LyX
3187 to that place in the document.
3188 You can also use the arrow keys to move up and down in the table of contents.
3189 You may therefore find it convenient to leave this window open throughout
3191 You can get similar functionality from the
3195 menu, though, where the table of contents appears automatically.
3198 \begin_layout Standard
3199 To get rid of the Table of Contents, you can delete the table of contents
3200 button just like any other text.
3203 \begin_layout Labeling
3204 \labelwidthstring 00.00.0000
3209 : Fix the table of contents in
3214 \begin_layout Chapter
3218 \begin_layout Standard
3220 is used by many scientists because it outputs great looking equations,
3221 avoiding the control characters used by word processors and their equation
3223 Many of these scientists are frustrated, however, because writing equations
3224 in \SpecialChar LaTeX
3225 is more like programming than writing.
3226 Happily, \SpecialChar LyX
3227 has WYSIWYM support for equations.
3228 If you are used to \SpecialChar LaTeX
3229 , you will find that all of the usual \SpecialChar LaTeX
3231 can be typed in normally, but they will show up in a WYSIWYM fashion.
3232 If, on the other hand, you have never written in \SpecialChar LaTeX
3236 \begin_inset space ~
3241 will allow you to write professional-looking math quickly and easily.
3244 \begin_layout Section
3248 \begin_layout Standard
3249 Somewhere in your \SpecialChar LyX
3253 \begin_layout LyX-Code
3254 I like what Einstein said, E=mc^2, because it is
3255 \begin_inset Newline linebreak
3261 \begin_layout Standard
3262 Now, that equation does not look very good in \SpecialChar LyX
3263 and in the output; there
3264 is no space between the letters and the equals sign, and you would like
3265 to write an actual superscript for the
3266 \begin_inset Quotes eld
3270 \begin_inset Quotes erd
3274 That bad typesetting happened because we did not tell \SpecialChar LyX
3275 that we were writing
3276 a mathematical expression, so it typeset the equation like regular old
3280 \begin_layout Standard
3281 But we can create a formula that will be typeset properly.
3282 Highlight the equation and click the toolbar button
3290 Insert\SpecialChar menuseparator
3291 Math\SpecialChar menuseparator
3293 \begin_inset space ~
3299 If nothing is highlighted \SpecialChar LyX
3300 inserts a little blue square, which is an empty
3302 The expression appears in blue and the blue square disappears as soon as
3303 the formula is not empty.
3308 to leave the equation.
3309 The purple markers disappear, leaving the cursor to the right of the expression.
3310 Now, if you type something, it will be regular text.
3313 \begin_layout Standard
3314 Looking at the output you will notice that the expression was typeset nicely,
3315 with spaces between the letters and the equals sign, and a superscript
3317 \begin_inset Quotes eld
3321 \begin_inset Quotes erd
3325 Letters in math mode are assumed to be variables, and come out in italics.
3326 Numbers are just numbers.
3329 \begin_layout Standard
3330 This math editor is another example of the WYSIWYM philosophy.
3331 In \SpecialChar LaTeX
3332 , you write a mathematical expression using text and commands like
3338 ; this can be frustrating, because you cannot see what an expression looks
3339 like until you run the file under \SpecialChar LaTeX
3340 and you may have to spend time, for
3341 example, finding missing brackets.
3343 does not attempt to get the expression to look perfect (WYSIWYG), but
3344 it gives you an extremely good idea of what the expression will look like.
3346 then takes care of the professional typesetting.
3349 \begin_layout Section
3350 Navigating an Equation
3353 \begin_layout Standard
3355 \begin_inset Formula $E=mc^{2}$
3359 \begin_inset Formula $E=1+mc^{2}$
3363 Use the arrow keys to move the cursor into the expression.
3364 Note that when you enter the expression, the purple markers appear to let
3365 you know you are editing math.
3374 to move the cursor past the equals sign, and just type
3375 \begin_inset Quotes eld
3379 \begin_inset Quotes erd
3383 Again, you can use the arrow keys or
3387 to leave the formula\SpecialChar endofsentence
3391 \begin_layout Standard
3392 Other than the special keys described below, typing in math mode is like
3393 editing regular text.
3403 Select text either with the arrow keys or with the mouse.
3406 Edit\SpecialChar menuseparator
3409 works in math mode as well as cut and paste.
3410 One thing to be careful of: if you are left or right outside a formula
3419 respectively, you delete the whole formula.
3420 Luckily, you can just use
3427 \begin_layout Standard
3428 What if you want to change
3429 \begin_inset Formula $E=mc^{2}$
3433 \begin_inset Formula $E=mc^{2.5}+1$
3436 ? Again, you can use the mouse to click in the right place.
3437 However, you can also use the arrow keys.
3438 If the cursor is just after the
3439 \begin_inset Quotes eld
3443 \begin_inset Quotes erd
3447 \begin_inset Quotes eld
3451 \begin_inset Quotes erd
3458 and the cursor is moved to the level of the superscript, just before the
3460 \begin_inset Quotes eld
3464 \begin_inset Quotes erd
3469 \begin_inset Quotes eld
3473 \begin_inset Quotes erd
3481 will move the cursor back to the regular level.
3490 , the cursor will be placed
3494 the superscript (so that you can then type the
3495 \begin_inset Quotes eld
3499 \begin_inset Quotes erd
3505 \begin_layout Section
3506 Exponents and Indices
3509 \begin_layout Standard
3510 An exponent can be entered from the
3513 \begin_inset space ~
3518 (see below), but it is actually simpler just to type the caret key,
3519 \begin_inset Quotes eld
3523 \begin_inset Quotes erd
3528 will place another blue rectangle in the superscript, so that whatever
3529 you write next will be superscripted, and in a smaller font size.
3530 Everything you type until you hit a
3538 to exit the formula entirely) will be in the superscript.
3541 \begin_layout Standard
3542 Writing a subscript (index) is just as easy; start one by typing the underscore
3544 \begin_inset Quotes eld
3548 \begin_inset Quotes erd
3552 You can subscript and superscript both subscripts and superscripts like
3554 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3561 \begin_layout Labeling
3562 \labelwidthstring 00.00.0000
3568 \begin_inset space ~
3578 \begin_layout Section
3582 \begin_layout Standard
3586 \begin_inset space ~
3591 is a convenient way to enter symbols and/or to perform complicated formula
3593 Many of these operations can be accomplished from the keyboard or the
3595 Insert\SpecialChar menuseparator
3600 Edit\SpecialChar menuseparator
3603 menus (the latter only appears when you are in Math mode).
3604 However, we are going to concentrate on using the
3607 \begin_inset space ~
3612 , just to let you know what is out there; you can learn keyboard shortcuts
3613 and commands later from the
3620 \begin_layout Standard
3624 \begin_inset space ~
3629 is shown when the cursor is in a formula and can also be turned on manually
3632 View\SpecialChar menuseparator
3636 When you click there on
3637 \begin_inset Quotes eld
3641 \begin_inset Quotes erd
3647 arg "toolbar-toggle math"
3650 ) the toolbar will be shown permanently at the bottom; this state is visualized
3655 menu with a checkmark.
3656 When you click in this state again on
3657 \begin_inset Quotes eld
3661 \begin_inset Quotes erd
3671 \begin_inset space ~
3676 is only shown when the cursor is within a formula; this state is visualized
3677 by the renaming of the menu entry from
3678 \begin_inset Quotes eld
3682 \begin_inset Quotes erd
3686 \begin_inset Quotes eld
3690 \begin_inset space ~
3694 \begin_inset Quotes erd
3700 \begin_layout Subsection
3704 \begin_layout Standard
3708 \begin_inset space ~
3713 allows you to choose from a large array of symbols used in math: operators,
3714 arrows, relationships, delimiters, special characters, sums and integrals.
3715 Note that subscripting and superscripting allow you to put lower and upper
3716 limits on sums and integrals.
3719 \begin_layout Subsection
3720 Roots, decorations, and delimiters
3723 \begin_layout Standard
3724 To type a square root, just click on the button
3727 arg "math-insert \\sqrt"
3731 The square root appears, and the cursor is in a new insertion point inside
3733 You can type variables, numbers, other square roots, fractions, whatever
3736 will automatically resize the square root to fit what is inside.
3739 \begin_layout Standard
3741 \begin_inset Quotes eld
3745 \begin_inset Quotes erd
3749 \begin_inset Formula $\overrightarrow{a}$
3752 ) or group of characters (
3753 \begin_inset Formula $\overrightarrow{a+b}$
3756 ) is done similarly.
3757 Decorations are available from the toolbar via the button
3760 arg "math-insert \\hat"
3764 Click on a decoration, and \SpecialChar LyX
3765 will insert that decoration with an insertion
3766 point under (or over) it.
3767 Just type what you want in the insertion point.
3768 There are two sets of decorations: those that resize with the text you
3769 type, and those that have a fixed size, and are most appropriate for a
3774 \begin_layout Standard
3775 Delimiters such as parentheses, brackets, and braces work similarly, but
3776 are a bit more complicated.
3777 Hit the delimiter button
3780 arg "dialog-show mathdelimiter"
3788 Your current selection of delimiters is displayed in a box.
3789 It is a pair of parentheses by default, but you can choose a pair of braces,
3790 a brace and a parenthesis, or choose the empty square to have something
3792 \begin_inset Quotes eld
3796 \begin_inset Formula $a=\left\langle 7\right.$
3800 \begin_inset Quotes erd
3803 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3808 \begin_layout Standard
3809 If you are lazy, you can type actual parentheses in math mode, rather than
3815 However, those parentheses will be the same size as regular text, which
3816 will look bad if you have a big fraction or matrix inside the parentheses.
3817 So it is better to use one of the three delimiter buttons that insert them
3818 directly, for example
3821 arg "math-delim ( )"
3827 \begin_layout Standard
3828 You can also put delimiters or a square root sign or a decoration on already
3829 existing formula parts.
3830 Select the portion of the formula that you want to adjust, and then click
3831 on the button you want from the
3834 \begin_inset space ~
3840 Try using this to change Newton's second law from scalar to vector form
3842 \begin_inset Formula $f=ma$
3846 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3850 Once you have learned about matrices, this is how you will put parentheses
3851 or brackets around them.
3854 \begin_layout Subsection
3858 \begin_layout Standard
3859 To create a fraction, click on the fraction button
3862 arg "math-insert \\frac-square"
3868 \begin_inset space ~
3875 writes two insertion points in a fraction.
3876 As you would expect, you can use arrow keys or the mouse to move around
3878 Click on the top square and type
3879 \begin_inset Quotes eld
3883 \begin_inset Quotes erd
3892 \begin_inset Quotes eld
3896 \begin_inset Quotes erd
3900 You have made a fraction! Of course you can type anything within each of
3901 the two boxes: variables with exponents, square roots, other fractions,
3906 \begin_layout Labeling
3907 \labelwidthstring 00.00.0000
3913 \begin_inset space ~
3923 \begin_layout Subsection
3924 Functions: lim, log, sin and others
3927 \begin_layout Standard
3928 Because letters in math mode are considered to be variables, if you type
3930 \begin_inset Quotes eld
3934 \begin_inset Quotes erd
3937 in math mode, \SpecialChar LyX
3938 thinks you are typing the product of the three variables
3940 \begin_inset Formula $s$
3944 \begin_inset Formula $i$
3948 \begin_inset Formula $n$
3952 The three letters will be typeset in italics, when what you really wanted
3954 \begin_inset Quotes eld
3958 \begin_inset Quotes erd
3962 In addition, \SpecialChar LyX
3963 will not put a space between the word
3964 \begin_inset Quotes eld
3968 \begin_inset Quotes erd
3972 \begin_inset Quotes eld
3976 \begin_inset Quotes erd
3983 will exit the formula).
3985 \begin_inset Quotes eld
3989 \begin_inset Formula $\sin(x)$
3993 \begin_inset Quotes erd
3997 \begin_inset Quotes eld
4001 \begin_inset Formula $sin(x)$
4005 \begin_inset Quotes erd
4011 \begin_layout Standard
4015 \begin_inset space ~
4023 arg "math-insert \\functions"
4027 \begin_inset Quotes eld
4031 \begin_inset Quotes erd
4034 in the pop-up function list.
4036 \begin_inset Quotes eld
4040 \begin_inset Quotes erd
4043 is displayed in \SpecialChar LyX
4044 in black, and set in upright roman type.
4045 The whole word is treated as one symbol, so if you type
4049 , it will delete the whole word.
4051 \begin_inset Quotes eld
4055 \begin_inset Quotes erd
4058 , which will be written in blue italics, like you expect in a formula.
4059 In the output, the expression will be correctly typeset.
4063 \begin_layout Standard
4064 The function list includes other trigonometric functions and their inverses,
4065 hyperbolic functions, logarithms, limits, and quite a few others.
4066 These functions can take subscripts and superscripts, important for typing
4068 \begin_inset Quotes eld
4072 \begin_inset Formula $\cos^{2}\theta$
4076 \begin_inset Quotes erd
4080 \begin_inset Quotes eld
4084 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4088 \begin_inset Quotes erd
4094 \begin_layout Labeling
4095 \labelwidthstring 00.00.0000
4101 \begin_inset space ~
4111 \begin_layout Subsection
4115 \begin_layout Standard
4116 Click on the matrix button
4119 arg "dialog-show mathmatrix"
4125 \begin_inset space ~
4131 A pop-up dialog allows you to choose how many rows and columns you want
4133 Choose 2 rows and 3 columns and hit
4139 prints 6 insertion points in a
4140 \begin_inset Formula $2\times3$
4144 As usual, you can put any sort of formula expression (a square root, another
4145 matrix, etc.) in each insertion point.
4146 You can also leave some of the insertion points empty if you want.
4149 \begin_layout Standard
4154 can be used to move horizontally between the columns of a matrix.
4155 Alternatively, you can use the arrow keys to move around - hitting
4159 at the end of one box will move to the next box,
4163 will move to the next row, etc.
4166 \begin_layout Standard
4167 If you need to change the number of rows and columns, use the menu
4169 Edit\SpecialChar menuseparator
4171 \begin_inset space \thinspace{}
4175 \begin_inset space \thinspace{}
4180 or the math toolbar buttons
4183 arg "tabular-feature append-row"
4189 arg "tabular-feature delete-row"
4195 arg "tabular-feature append-column"
4201 arg "tabular-feature delete-column"
4207 \begin_layout Standard
4212 for information on how to change the horizontal alignment of each column,
4213 and how to change the vertical position of the whole matrix.
4214 Note that if you want to write a table containing text, you should use
4216 's wonderful table support, rather than trying to write text in a matrix.
4219 \begin_layout Subsection
4223 \begin_layout Standard
4224 All of the expressions we have written so far have been on the same line
4225 as the text that came before and after them, otherwise known as inline
4227 This is fine for short, simple expressions, but if you want to write larger
4228 ones, or if you want your expressions to stand out from the text, you need
4229 to write them in display mode.
4230 In addition, only displayed expressions can be labeled and numbered (see
4235 ), and multi-line equations must be in display mode.
4238 \begin_layout Standard
4239 While being in a formula, click on the display button
4250 This centers the formula and adds a blank line before and after it.
4251 Now type in an expression and compile your file to see how it looks.
4252 The display button is actually a toggle; use it now to change a couple
4253 of your expressions to display mode and back.
4257 \begin_layout Standard
4258 Display mode has a couple differences from inline mode:
4261 \begin_layout Itemize
4262 The default font is larger for a few symbols, like
4263 \begin_inset Formula $\sum$
4267 \begin_inset Formula $\int$
4273 \begin_layout Itemize
4274 Subscripts and superscripts for limits and sums (but not integrals) are
4275 written under and over rather than next to the symbols
4278 \begin_layout Itemize
4282 \begin_layout Standard
4283 Other than these differences, though, displayed expressions and inline expressio
4284 ns are very similar.
4287 \begin_layout Standard
4288 One final note about the way displayed formulas are typeset: be careful
4289 about whether you are putting your equation into a new paragraph or not.
4290 If your formula is in the middle of a sentence or paragraph, then do not
4296 Doing so will cause the text
4300 the formula to start a new paragraph.
4301 That text will be indented or follow a blank line, depending on your document
4302 paragraph settings, which is probably not what you want.
4305 \begin_layout Labeling
4306 \labelwidthstring 00.00.0000
4311 : Put the various equations in
4315 into display mode, and see how they are typeset differently.
4318 \begin_layout Labeling
4319 \labelwidthstring 00.00.0000
4324 : Using various tools you have learned in this section, you should be able
4325 to write an equation like:
4329 \begin_layout Plain Layout
4330 After you have done it the hard way, give
4332 Insert\SpecialChar menuseparator
4333 Math\SpecialChar menuseparator
4335 \begin_inset space ~
4346 \begin_inset Formula
4348 f(x)=\left\{ \begin{array}{cc}
4351 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4360 \begin_layout Section
4364 \begin_layout Standard
4365 Now you are familiar with the basics.
4367 's math editor can do a lot more.
4368 You can refer to the
4372 manual for tips on how to:
4375 \begin_layout Itemize
4376 Label and number expressions.
4379 \begin_layout Itemize
4380 Create multi-line equations.
4383 \begin_layout Itemize
4384 Change typefaces, e.
4385 \begin_inset space \thinspace{}
4389 \begin_inset space \space{}
4392 to write bold-face text in an expression.
4395 \begin_layout Itemize
4396 Fine-tune font sizes and spacing within an expression.
4397 (Do not worry about this until your final draft!)
4400 \begin_layout Itemize
4402 These are very powerful, because you just define them once at the top of
4403 the document, and then you can use them throughout the document.
4406 \begin_layout Itemize
4407 Do almost all you can do with math.
4410 \begin_layout Chapter
4414 \begin_layout Section
4415 Other major \SpecialChar LyX
4419 \begin_layout Standard
4420 We have not gone through all the possible commands in \SpecialChar LyX
4421 , and we are not planning
4430 \begin_inset space ~
4435 manual for more information.
4436 We will just mention a couple more major things \SpecialChar LyX
4440 \begin_layout Itemize
4442 has WYSIWYM support for tables.
4445 Insert\SpecialChar menuseparator
4451 arg "tabular-insert"
4455 Click on the table with the
4462 \begin_inset space ~
4467 dialog box which allows extensive table editing.
4471 arg "toolbar-toggle table"
4474 the table toolbar will appear permanently.
4477 \begin_layout Itemize
4479 also supports including pictures in any format within documents.
4482 Insert\SpecialChar menuseparator
4488 arg "dialog-show-new-inset graphics"
4492 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4493 can have captions, and \SpecialChar LyX
4494 will automatically generate lists of figures and/or
4498 \begin_layout Itemize
4500 is heavily configurable.
4501 Everything from how the \SpecialChar LyX
4502 window looks to how the output comes out can be
4503 configured in a number of ways.
4504 Much configuration is done through
4506 Tools\SpecialChar menuseparator
4510 For more information on this, check out
4512 Help\SpecialChar menuseparator
4513 Customization\SpecialChar endofsentence
4517 \begin_layout Itemize
4519 is being developed by a team of programmers on five continents.
4520 Therefore, \SpecialChar LyX
4521 has better support for non-English languages (such as Dutch,
4522 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4523 ) than many word processors.
4524 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4525 languages Chinese Japanese, and Korean are supported.
4526 You can write documents in other languages and you can also configure \SpecialChar LyX
4528 to show its menus and error messages in other languages.
4532 \begin_layout Itemize
4533 The \SpecialChar LyX
4534 menus feature keybindings.
4535 This means that you can do
4537 File\SpecialChar menuseparator
4548 or by using the binding which is shown next to it in the menu (
4555 Keybindings are also configurable.
4556 For information on this, check out
4558 Help\SpecialChar menuseparator
4559 Customization\SpecialChar endofsentence
4563 \begin_layout Itemize
4565 can read \SpecialChar LaTeX
4568 \begin_inset space ~
4572 \begin_inset CommandInset ref
4574 reference "sec:tex2lyx"
4581 \begin_layout Itemize
4582 Spell-checking, thesaurus, and word count facilities are available.
4585 \begin_layout Itemize
4586 Generation of indexes and nomenclatures/glossaries is supported.
4589 \begin_layout Section
4591 for \SpecialChar LaTeX
4593 \begin_inset CommandInset label
4595 name "sec:latexusers"
4602 \begin_layout Standard
4603 If you do not know anything about \SpecialChar LaTeX
4604 , you do not have to read this section.
4605 Actually, you might want to
4609 about \SpecialChar LaTeX
4610 , and then read this chapter.
4611 However, some of those who begin to use \SpecialChar LyX
4612 will be familiar with \SpecialChar LaTeX
4614 If you are such a person, you may be wondering if \SpecialChar LyX
4615 can really do everything
4618 The short answer is that \SpecialChar LyX
4619 can do pretty much everything \SpecialChar LaTeX
4621 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4626 \begin_layout Standard
4627 Because this is just a tutorial, we are only going to mention things that
4628 new \SpecialChar LyX
4629 users will most likely be interested in.
4630 In the interests of keeping the Tutorial short, we will give only minimal
4635 \begin_inset space ~
4643 \begin_inset space ~
4648 manuals have a great deal of information on differences between \SpecialChar LyX
4649 and \SpecialChar LaTeX
4651 and how to do various \SpecialChar LaTeX
4652 tricks in \SpecialChar LyX
4656 \begin_layout Subsection
4661 \begin_layout Standard
4662 Anything that you enter in \SpecialChar TeX
4663 mode will be passed straight to \SpecialChar LaTeX
4665 displayed in red on the screen.
4666 You can use \SpecialChar TeX
4667 commands in \SpecialChar LyX
4670 Insert\SpecialChar menuseparator
4672 \begin_inset space ~
4684 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4688 \begin_layout Standard
4689 In a math formula, \SpecialChar TeX
4690 mode is handled a bit differently.
4692 mode is entered there by typing a backslash.
4693 The backslash is not written out, but anything you type afterwards will
4695 You exit \SpecialChar TeX
4700 or some other non-alphabetic character, like a number, underscore, caret
4702 Once you exit \SpecialChar TeX
4703 mode, if \SpecialChar LyX
4704 knows the \SpecialChar TeX
4705 command you have typed in, it will
4706 convert it to WYSIWYM\SpecialChar endofsentence
4708 \begin_inset Quotes eld
4718 \begin_inset Quotes erd
4721 in a formula and then press
4727 \begin_inset Quotes eld
4731 \begin_inset Quotes erd
4735 \begin_inset Quotes eld
4739 \begin_inset Formula $\gamma$
4743 \begin_inset Quotes erd
4747 This will work for almost all, non-complicated math macros.
4748 This may be faster than using the
4751 \begin_inset space ~
4756 , and will be especially convenient for experienced \SpecialChar LaTeX
4760 \begin_layout Standard
4761 As a special case, if you type
4762 \begin_inset Quotes eld
4772 \begin_inset Quotes erd
4775 in a formula, the beginning
4779 ending braces will be inserted in red while the cursor is placed between
4781 This makes it more convenient to type those commands that take an argument.
4784 \begin_layout Standard
4786 cannot do absolutely everything that \SpecialChar LaTeX
4788 Some fancy functions are not supported at all, while some work but are
4791 mode allows users to get the full flexibility of \SpecialChar LaTeX
4792 , while having all the
4793 convenient features of \SpecialChar LyX
4794 , like WYSIWYM math, tables, and editing.
4796 could never support every \SpecialChar LaTeX
4804 in the preamble (see Section
4805 \begin_inset space ~
4809 \begin_inset CommandInset ref
4811 reference "sec:preamble"
4815 ), you can use any package you want — although you will not have WYSIWYM
4816 support for that package's features.
4819 \begin_layout Subsection
4820 Importing \SpecialChar LaTeX
4826 \begin_inset CommandInset label
4835 \begin_layout Standard
4836 You can import a \SpecialChar LaTeX
4837 file into \SpecialChar LyX
4840 File\SpecialChar menuseparator
4841 Import\SpecialChar menuseparator
4843 \begin_inset space ~
4848 menu in \SpecialChar LyX
4850 This will call the program
4854 which will create a file foo.lyx from the file foo.tex.
4856 will then open that file.
4857 If the translation does not work, you can try calling
4861 from the command line, possibly using fancier options.
4864 \begin_layout Standard
4865 Even when the translation does work,
4869 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4871 It will leave things it does not understand in \SpecialChar TeX
4872 mode; so, after translating
4877 , you can look for the red text and manually edit it to get it right.
4880 \begin_layout Standard
4885 has its own documentation (manpage), which Unix/Linux users can access
4886 via the console command
4889 \begin_inset space ~
4895 The manpage describes which \SpecialChar LaTeX
4896 commands and environments are not supported,
4897 what bugs you might run into (and how to get around them), and how to use
4898 the various options.
4901 \begin_layout Standard
4902 It is important to understand that
4906 can only translate files whose document class is
4907 \begin_inset Quotes eld
4911 \begin_inset Quotes erd
4915 , that is, for which there is a corresponding \SpecialChar LyX
4921 If there is no layout file, then you will get an error saying that the
4922 conversion could not be performed.
4923 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4928 simply will not know how to translate the \SpecialChar LaTeX
4929 that it finds there into things
4932 More about layout files and how they are created is explained in detail
4940 \begin_layout Subsection
4941 Converting \SpecialChar LyX
4942 Documents to \SpecialChar LaTeX
4946 \begin_layout Standard
4947 You might wish to convert a \SpecialChar LyX
4948 Document to a \SpecialChar LaTeX
4950 For example, a co-worker or co-author who does not have \SpecialChar LyX
4955 File\SpecialChar menuseparator
4956 Export\SpecialChar menuseparator
4960 This will create a file
4968 file you are editing.
4971 \begin_layout Subsection
4976 \begin_layout Subsubsection
4980 \begin_layout Standard
4983 Document\SpecialChar menuseparator
4986 dialog takes care of the document-wide options, such as changing the document
4987 class, default font size and paper size.
4988 Document class options and also options for \SpecialChar LaTeX
4989 packages can be entered there
4993 \begin_inset space ~
5001 \begin_layout Subsubsection
5002 Other Preamble Matter
5003 \begin_inset CommandInset label
5012 \begin_layout Standard
5013 If you have special commands to put in the preamble of a \SpecialChar LaTeX
5015 use them in a \SpecialChar LyX
5019 Document\SpecialChar menuseparator
5020 Settings\SpecialChar menuseparator
5022 \begin_inset space ~
5027 and type in the dialog window (or from the document settings dialog, depending
5029 Anything you type will (as with \SpecialChar TeX
5030 mode) be sent directly to \SpecialChar LaTeX
5034 \begin_layout Subsection
5039 \begin_layout Standard
5041 has support for Bib\SpecialChar TeX
5042 , which allows you to build databases of bibliographical
5043 references to be used in multiple documents.
5046 Insert\SpecialChar menuseparator
5048 \begin_inset space \thinspace{}
5052 \begin_inset space \thinspace{}
5055 TOC\SpecialChar menuseparator
5057 \begin_inset space ~
5072 field you load Bib\SpecialChar TeX
5077 field you can load Bib\SpecialChar TeX
5081 \begin_layout Standard
5082 After you have done this, you can use citations from any bibliographies
5083 you have included with
5085 Insert\SpecialChar menuseparator
5089 \begin_inset space ~
5093 \begin_inset CommandInset ref
5095 reference "sec:bibliographies"
5104 dialog will show a list of all the references in your
5112 \begin_layout Section
5116 \begin_layout Standard
5117 Sometimes when you try to view a document, there will be errors, things
5118 that \SpecialChar LyX
5119 or \SpecialChar LaTeX
5121 When this happens, \SpecialChar LyX
5126 \begin_inset space ~
5132 Clicking on individual errors in this dialog will take you to the place
5133 in the \SpecialChar LyX
5134 document where the error occurs and also display the detailed \SpecialChar LaTeX