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
281 \begin_layout Standard
290 \begin_layout Itemize
291 Detailed explanations of \SpecialChar LaTeX
296 \begin_layout Standard
298 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
301 can have a look at the
313 \begin_layout Standard
314 It is time to move on, time for your first document \SpecialChar ldots
318 \begin_layout Chapter
319 Getting started with \SpecialChar LyX
323 \begin_layout Section
324 Your first \SpecialChar LyX
328 \begin_layout Standard
329 OK\SpecialChar endofsentence
330 You are ready to start writing.
331 Before you do, there are a few things we need to mention, which will hopefully
332 make the Tutorial more instructive and useful.
336 \begin_layout Standard
337 Because there is information we cannot give you in the Tutorial, the
343 thing that you need to do is find the
350 Start up \SpecialChar LyX
360 You may want to load the
364 as well (if you are not reading it within \SpecialChar LyX
366 This way, you can read them while you are writing your own file.
370 \begin_layout Plain Layout
371 They can also serve as good examples of how to use the many features of
378 Note that once you have got more than one document open, you can use the
383 menu or the document tabs to switch between them.
386 \begin_layout Standard
387 In this Tutorial, we are going to assume that you have a fully working version
389 , as well as a \SpecialChar LaTeX
390 -distribution and a PDF-viewer.
391 This should be the case on all major Linux- and BSD-distributions, as well
392 as on Windows, where this is setup by the \SpecialChar LyX
396 \begin_layout Standard
397 Finally, we have written a file called
401 to let you practice your \SpecialChar LyX
403 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
406 As you learn new \SpecialChar LyX
407 functions, we will suggest that you fix those parts of
413 It also contains `subtle' hints about how to fix things.
417 \begin_layout Plain Layout
418 The hints are located in yellow
419 \begin_inset Quotes eld
423 \begin_inset Quotes erd
427 Access the text in a note by clicking on it.
432 If you want to cheat, or check what you have done, there is also a file
434 \begin_inset Newline newline
441 which contains the same text written and typeset by a \SpecialChar LyX
445 \begin_layout Standard
446 The example files can be found in the
450 directory of \SpecialChar LyX
451 's installation folder.
458 File\SpecialChar menuseparator
465 to save a copy in your own directory for you to work on.
466 As you fix parts of the raw document, check to see how those changes affect
470 \begin_layout Standard
475 directory contains lots of other examples files.
476 They will show you how to do various fancy things with \SpecialChar LyX
478 After you have read the Tutorial, or when you are confused about how to
479 do something fancy in \SpecialChar LyX
480 , take a look at these files.
483 \begin_layout Subsection
484 Typing, Viewing, and Exporting
487 \begin_layout Itemize
490 File\SpecialChar menuseparator
494 \begin_layout Itemize
495 Type a sentence like:
497 This is my first \SpecialChar LyX
501 \begin_layout Itemize
502 Save your document with
504 File\SpecialChar menuseparator
509 As\SpecialChar endofsentence
513 \begin_layout Itemize
514 Create a PDF file, with
516 Document\SpecialChar menuseparator
519 or the toolbar button
527 will open a PDF-viewer program displaying your document as it will look
531 \begin_layout Itemize
532 Export the ready to print document with
534 File\SpecialChar menuseparator
542 \begin_layout Standard
543 Congratulations! You have written your first \SpecialChar LyX
545 All of the rest is just details.
546 \begin_inset Newline newline
552 \begin_layout Standard
557 You can save time by leaving the PDF viewer running in the background.
558 Under MacOS and Linux you can use
560 Document\SpecialChar menuseparator
563 or the toolbar button
569 and just click on the PDF viewer window afterwards.
570 Under Windows still use
572 Document\SpecialChar menuseparator
584 \begin_layout Standard
589 In case you are using a high-resolution display, the LyX toolbar icons
591 To change their size, right-click into a toolbar.
594 \begin_layout Subsection
598 \begin_layout Standard
600 can of course do most of the things you are used to doing with a word processor.
601 It will word-wrap and indent paragraphs automatically.
602 Here is a quick description of how to do some simple actions.
605 \begin_layout Description
606 Undo \SpecialChar LyX
607 has multiple levels of undo, which means you can undo everything you
608 have done since your current editing session started, by selecting
610 Edit\SpecialChar menuseparator
619 ) over and over again.
620 If you undo too much, just select
622 Edit\SpecialChar menuseparator
635 \begin_layout Standard
636 Currently, undo is limited to 100 steps.
640 \begin_layout Description
643 Edit\SpecialChar menuseparator
654 Edit\SpecialChar menuseparator
665 Edit\SpecialChar menuseparator
674 ) to cut, copy, and paste.
675 Or automatically paste selected text (including selections from other programs)
683 \begin_layout Description
686 Edit\SpecialChar menuseparator
700 arg "dialog-show findreplace"
704 In the dialog, search with the
716 button to replace a word you have found.
720 \begin_layout Plain Layout
721 Close the window when you are done or leave it open if you find it more
723 Most dialog boxes in \SpecialChar LyX
724 can operate like this.
725 Just be sure you have the right window in focus when you are trying to
726 type in the main \SpecialChar LyX
727 window or a \SpecialChar LyX
733 If you like, you can specify whether to make the search case-sensitive,
734 or to search for only complete words; you can also search backwards through
738 \begin_layout Description
753 , which will by default print characters in italics), set it in
763 , usually small caps, used for people's names), or use your own formatting
766 Edit\SpecialChar menuseparator
771 Style\SpecialChar menuseparator
774 dialog (toolbar button
777 arg "dialog-show character"
783 \begin_layout Description
784 Toolbar Other buttons on the toolbar allow you to do some of the more popular
812 \begin_layout Standard
813 Of course, you have not yet written enough to make most of these functions
815 As you write more, though, try undoing, pasting, etc.
818 \begin_layout Subsection
819 WYSIWYM: Whitespace in \SpecialChar LyX
823 \begin_layout Standard
824 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
827 As many times as you hit
831 , you will only get one blank line.
832 As many times as you hit
836 , you will only get one space.
837 On a blank line, \SpecialChar LyX
838 will not let you type even one space.
843 key will not move you forward one tab stop; in fact there
847 no tab stops! There is no ruler at the top of the page to let you set tabs
851 \begin_layout Standard
852 Many word processors are based on the WYSIWYG principle:
853 \begin_inset Quotes eld
856 What You See Is What You Get.
857 \begin_inset Quotes erd
861 , on the other hand, is based on the principle that
862 \begin_inset Quotes eld
865 What You See Is What You
870 \begin_inset Quotes erd
873 You type what you mean and \SpecialChar LyX
874 will take care of typesetting it for you so
875 that the output looks nice.
880 grammatically separates paragraphs and a
884 grammatically separates words; so there is no reason to have several of
889 has no grammatical function at all – so \SpecialChar LyX
891 Using \SpecialChar LyX
892 , you will spend more of your time worrying about the
896 of your document and less time worrying about the
905 for more information on the WYSIWYM concept.
908 \begin_layout Standard
910 does have (many) ways to fine-tune the formatting of your document.
911 After all, \SpecialChar LyX
921 has information about all that.
922 It includes horizontal fills and vertical space — which are more powerful
923 and versatile than multiple spaces or blank lines — and ways to change
924 font sizes, character styles, and paragraph alignments by hand.
925 The idea, though, is that you can write your whole document, focusing on
926 content, and just worry about that fine-tuning at the end.
927 With standard word processors, you will be distracted by document formatting
928 throughout the writing process.
931 \begin_layout Section
935 \begin_layout Standard
936 Different parts of a document have different purposes; we call these parts
942 Most of a document is made up of regular text.
943 Section titles (chapter, subsection, etc.) let the reader know that a new
944 topic or subtopic will be discussed.
945 Certain types of documents have special environments.
946 A journal article will have an abstract and a title.
947 A letter will have neither of these, but will probably have an environment
948 that gives the writer's address.
951 \begin_layout Standard
952 Environments are a major part of the
953 \begin_inset Quotes eld
956 What You See Is What You Mean
957 \begin_inset Quotes erd
960 philosophy of \SpecialChar LyX
962 A given environment may require a certain font style, font size, indenting,
963 line spacing, and more.
964 This problem is aggravated, because the exact formatting for a given environmen
965 t may change: one journal may use boldface, 18 point, centered type for
966 section titles while another uses italicized, 15 point, left justified
967 type; different languages may have different standards for indenting; and
968 bibliography formats can vary widely.
970 lets you avoid learning all the different formatting styles.
973 \begin_layout Standard
978 choice box is located on the left end of the toolbar and looks like this:
980 \begin_inset Graphics
981 filename clipart/ToolbarEnvBox.png
988 It indicates in which environment you are currently writing.
989 While you were writing your first document, it said
990 \begin_inset Quotes eld
994 \begin_inset Quotes erd
997 which is the default environment for text.
998 Now you will put a number of environments in your new document so that
999 you can see how they work.
1002 \begin_layout Subsection
1003 Sections and Subsections
1006 \begin_layout Standard
1011 on the first line of your new \SpecialChar LyX
1024 \begin_layout Plain Layout
1030 If nothing is selected, \SpecialChar LyX
1031 changes the paragraph you are currently in to
1032 the selected environment.
1033 Alternatively, you can change several paragraphs to a different environment
1034 by selecting them before picking an environment.
1051 , which will be covered below.
1054 \begin_inset Quotes eld
1058 \begin_inset Quotes erd
1061 and typesets the section heading (title) in a larger font.
1066 \SpecialChar endofsentence
1072 \begin_inset Quotes eld
1076 \begin_inset Quotes erd
1080 \begin_inset Quotes eld
1084 \begin_inset Quotes erd
1088 Section headings, like most environments, are assumed to end when you type
1093 \SpecialChar endofsentence
1094 Type the document introduction:
1097 \begin_layout LyX-Code
1098 This is an introduction to my first \SpecialChar LyX
1102 \begin_layout Standard
1118 \begin_inset Quotes eld
1122 \begin_inset Quotes erd
1125 and waits for you to type a title.
1127 \begin_inset Quotes eld
1133 \begin_inset space ~
1139 \begin_inset Quotes erd
1142 , and you will see that \SpecialChar LyX
1143 again sets it as a section title.
1146 \begin_layout Standard
1148 Go to the end of Section
1149 \begin_inset space ~
1153 \begin_inset Quotes eld
1156 my first \SpecialChar LyX
1158 \begin_inset Quotes erd
1174 Again, \SpecialChar LyX
1176 \begin_inset Quotes eld
1180 \begin_inset Quotes erd
1183 and waits for you to type a title.
1190 \begin_inset space ~
1194 \begin_inset Quotes eld
1198 \begin_inset Quotes erd
1202 \begin_inset space ~
1205 2, has been automatically renumbered to Section
1206 \begin_inset space ~
1209 3! In true WYSIWYM fashion, you just need to identify the text that makes
1210 up the section titles, and \SpecialChar LyX
1211 takes care of numbering the sections and typesettin
1215 \begin_layout Standard
1224 environment, and type the following five lines:
1227 \begin_layout LyX-Code
1228 Sections and subsections are described below.
1231 \begin_layout LyX-Code
1235 \begin_layout LyX-Code
1236 Sections are bigger than subsections.
1239 \begin_layout LyX-Code
1240 Subsection description
1243 \begin_layout LyX-Code
1244 Subsections are smaller than sections.
1247 \begin_layout Standard
1248 Click on the second line and select
1258 numbers the subsection
1259 \begin_inset Quotes eld
1263 \begin_inset Quotes erd
1266 , and typesets it in a font which is bigger than regular text but smaller
1267 than the section title.
1268 Change the fourth line to the
1272 environment as well.
1273 As you probably expected, \SpecialChar LyX
1274 automatically numbered the section
1275 \begin_inset Quotes eld
1279 \begin_inset Quotes erd
1283 If you put yet another section before Section
1284 \begin_inset space ~
1288 \begin_inset space ~
1291 2 will be renumbered as Section 3, and the subsections will be renumbered
1293 \begin_inset Quotes eld
1297 \begin_inset Quotes erd
1301 \begin_inset Quotes eld
1305 \begin_inset Quotes erd
1311 \begin_layout Standard
1312 Further levels of sectioning include
1325 We will let you play with these on your own.
1326 You may notice that paragraph and subparagraph headings are not numbered
1327 by default, and that subparagraphs are indented; see the
1331 for an explanation and how to change this.
1336 headings are actually the highest level of sectioning, above
1340 s, but you are only allowed to use them in certain types (text classes)
1342 documents (see Section
1343 \begin_inset space ~
1347 \begin_inset CommandInset ref
1349 reference "sec:Document-Classes"
1356 \begin_layout Standard
1357 Finally, you may want to have sections or subsections that are not numbered.
1358 There are environments for this as well.
1359 If you change one of your section headings to the
1363 environment (you may have to scroll down in the
1367 box to find it), \SpecialChar LyX
1368 will use the same font size for the heading as it uses
1369 for a regular section, but it will not number that section.
1370 There are corresponding
1371 \begin_inset Quotes eld
1375 \begin_inset Quotes erd
1378 heading environments for
1387 Try changing some of your sections or subsections to the starred environments,
1388 and note how the other section numbers are updated.
1391 \begin_layout Labeling
1392 \labelwidthstring 00.00.0000
1397 : Fix the section and subsection headings in
1398 \begin_inset Newline newline
1409 \begin_layout Subsection
1413 \begin_layout Standard
1415 has several different environments for typesetting lists.
1416 The various list environments free you from hitting
1420 a million times when writing an outline, or from renumbering a whole list
1421 when you want to add a point in the middle of the list.
1422 Different types of documents logically require different list environments:
1425 \begin_layout Itemize
1426 A slide presentation might use the
1430 environment's bulleted lists to describe different points.
1433 \begin_layout Itemize
1434 An outline would use the
1438 environment's numbered lists (and lettered sublists).
1441 \begin_layout Itemize
1442 A document describing several software packages could use the
1446 environment, where each item in the list begins with a bold-faced word.
1449 \begin_layout Itemize
1458 ) environment is a variation on the
1465 \begin_layout Standard
1466 Let us write a list of reasons why \SpecialChar LyX
1467 is better than other word processors.
1468 Somewhere in your document, type:
1471 \begin_layout Standard
1475 is better than other word processors because:
1478 \begin_layout Standard
1495 arg "layout Itemize"
1501 \begin_inset Quotes eld
1505 \begin_inset Quotes erd
1509 Type in your reasons:
1512 \begin_layout LyX-Code
1513 Typesetting is done for you.
1516 \begin_layout LyX-Code
1520 \begin_layout LyX-Code
1521 Lists are very easy to create!
1524 \begin_layout Standard
1525 List environments, unlike headings, do not end when you type
1530 Instead, \SpecialChar LyX
1531 assumes you are going on to the next item in the list.
1532 The above will therefore result in a three-item list.
1533 If you want more than one paragraph within one list
1537 , one way is to use the
1540 \begin_inset space ~
1545 , which you get by typing
1550 In order to get out of the list, you need to reselect the
1554 environment (or just use the key binding
1557 arg "layout Standard"
1563 \begin_layout Standard
1564 You now have a beautiful itemized list.
1565 You might want to run \SpecialChar LaTeX
1566 to see how the list looks when printed out.
1567 But what if you wanted to number the reasons? Well, just select the whole
1572 \begin_layout Plain Layout
1574 will not let you select the first bullet (or the actual number in a numbered
1575 section title) unless you also select the paragraph
1579 it, which you probably do not want to do.
1580 This is on purpose because the bullet or number depends on the document
1581 settings or text position, respectively.
1597 arg "layout Enumerate"
1601 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1602 will fix the numbering.
1605 \begin_layout Standard
1606 While the list is still selected, you can change to the other two list environme
1614 \begin_inset space \thinspace{}
1620 \begin_inset space \thinspace{}
1630 arg "layout Description"
1639 ), in order to see what they look like.
1640 For those two environments, each list item is made up of a term, which
1641 is the item's first word, followed by a definition, which is the rest of
1642 the paragraph (until you hit
1647 The term is either typeset in boldface (
1652 \begin_inset Quotes eld
1656 \begin_inset Quotes erd
1663 \begin_layout Plain Layout
1664 But a typesetter's tab, which will change to fit the size of the largest
1665 term, not a pathetic, rigid, unchangeable typewriter
1678 ) from the rest of the paragraph.
1679 If you want to have more than one word in the definition, then separate
1683 \begin_inset space ~
1691 \begin_layout Labeling
1692 \labelwidthstring 00.00.0000
1697 : Typeset the list in
1702 \begin_layout Standard
1703 You can nest lists within each other in all sorts of interesting ways.
1704 An obvious example would be writing outlines.
1705 Numbered and bulleted lists will have different numbering and bulleting
1706 schemes for sublists.
1711 for details on the different sorts of lists and for examples of nestings.
1714 \begin_layout Subsection
1715 Other environments: Verses, Quotations, and more
1718 \begin_layout Standard
1719 There are two environments for setting quotations apart from surrounding
1724 for short quotes and
1738 \begin_layout Plain Layout
1739 used in this Tutorial for the long typing examples
1748 font; this environment is the only place in \SpecialChar LyX
1749 where you are allowed to use
1750 multiple spaces to allow code indenting.
1751 You can even write poetry using the
1759 to separate stanzas, and
1763 to separate lines within a stanza.
1768 for more complete descriptions of all of the available \SpecialChar LyX
1772 \begin_layout Labeling
1773 \labelwidthstring 00.00.0000
1778 : Correctly typeset the
1780 Quote, \SpecialChar LyX
1788 \begin_inset Newline newline
1796 \begin_layout Chapter
1800 \begin_layout Standard
1801 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1803 It introduced you to the basic editing operations in \SpecialChar LyX
1804 , as well as the powerful
1805 method of writing with environments.
1806 Most people who use \SpecialChar LyX
1807 , though, will want to write documents: papers, articles,
1808 books, manuals, or letters.
1809 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1811 a complete document.
1812 It will introduce you to text classes, which allow you to write different
1814 It will then describe many of the additions that turn text into a document,
1815 such as titles, footnotes, cross references, bibliographies, and tables
1819 \begin_layout Section
1821 \begin_inset CommandInset label
1823 name "sec:Document-Classes"
1830 \begin_layout Standard
1831 Different sorts of documents should be typeset differently.
1832 For example, books are generally printed double-sided, while articles are
1834 In addition, many documents contain special environments: letters contain
1835 some environments — such as the sender's address and the signature — which
1836 do not make sense in a book or article.
1837 The \SpecialChar LyX
1846 \begin_layout Plain Layout
1847 for \SpecialChar LaTeX
1848 users: this is equivalent to the \SpecialChar LaTeX
1854 takes care of these large scale differences between different sorts of
1856 This Tutorial, for example, was written in the
1861 Document classes are another major part of the WYSIWYM philosophy; they
1862 tell \SpecialChar LyX
1863 how to typeset the document, so you do not need to know how.
1866 \begin_layout Standard
1867 Your document is probably being written in the
1875 \begin_layout Plain Layout
1876 That is usually the default document class
1881 Try changing to other document classes (using the
1883 Document\SpecialChar menuseparator
1886 dialog) to see how they are typeset differently.
1887 If you change your document to the
1891 document class and look at the
1895 box, you will see that most of the allowed environments are the same.
1896 However, you can now use the
1901 If you are ever unsure about which environments you can use in a given
1902 document class, just consult the
1909 \begin_layout Standard
1910 Font sizes, one- or two-column printing, and page headings are just some
1911 of the ways journals' typesettings differ from one another.
1912 As the Computer Age continues to mature, journals have begun accepting
1913 electronic submissions, creating \SpecialChar LaTeX
1915 \begin_inset Quotes eld
1919 \begin_inset Quotes erd
1922 so that authors can submit correctly typeset articles.
1924 is set up to support this as well.
1925 For example, \SpecialChar LyX
1926 supports typesetting (and extra environments) for the American
1927 Mathematics Society journals using the
1930 \begin_inset space ~
1938 \begin_layout Standard
1939 Here is a very quick reference to some of the document classes.
1942 Special Document Classes
1948 manual for many more details.
1951 \begin_layout Standard
1953 \begin_inset Tabular
1954 <lyxtabular version="3" rows="7" columns="2">
1955 <features tabularvalignment="middle">
1956 <column alignment="center" valignment="top" width="0pt">
1957 <column alignment="center" valignment="top" width="0pt">
1959 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1962 \begin_layout Plain Layout
1968 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1971 \begin_layout Plain Layout
1979 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1982 \begin_layout Plain Layout
1988 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1991 \begin_layout Plain Layout
1992 one-sided, no chapters
1999 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2002 \begin_layout Plain Layout
2008 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2011 \begin_layout Plain Layout
2012 layout & environments for American Math Society
2019 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2022 \begin_layout Plain Layout
2028 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2031 \begin_layout Plain Layout
2032 longer than article, two-sided
2039 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2042 \begin_layout Plain Layout
2048 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2051 \begin_layout Plain Layout
2052 report + front and back matter
2059 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2062 \begin_layout Plain Layout
2068 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2071 \begin_layout Plain Layout
2079 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2082 \begin_layout Plain Layout
2088 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2091 \begin_layout Plain Layout
2092 lots of extra environments for address, signature\SpecialChar ldots
2106 \begin_layout Section
2107 Templates: Writing a Letter
2110 \begin_layout Standard
2111 One way to write a letter would be to open a new file, and choose a
2117 Document\SpecialChar menuseparator
2121 While this is the most obvious way to write a letter, it seems like extra
2123 Every time you write a business letter, you want to have your address,
2124 the address to which you are sending it, a body, a signature, etc.
2130 for letters, which contains a sample letter; once you have a template,
2131 you can just replace a couple of parts of the letter with your text each
2132 time you write a letter.
2135 \begin_layout Standard
2136 Open a new file with
2138 File\SpecialChar menuseparator
2140 \begin_inset space ~
2144 \begin_inset space ~
2155 Save and print the file to see how the various environments are typeset.
2158 \begin_layout Standard
2159 When you look at the
2163 box, you will see several environments, like the
2166 \begin_inset space ~
2171 environment, that do not exist in most other document classes.
2177 You can play around for a while to figure out how the various environments
2179 You will notice for example that the
2183 environment has the word
2184 \begin_inset Quotes eld
2188 \begin_inset Quotes erd
2191 in red before the actual text of the signature.
2192 This word does not show up in the actual letter, as you will see if you
2193 view/export the file.
2194 It is just there to let you know where the signature goes.
2195 Also, note that it does not matter where in the file the
2200 Remember, \SpecialChar LyX
2201 is WYSIWYM; you can put the
2205 environment anywhere you want, but \SpecialChar LyX
2206 knows that in the printout, the signature
2207 should be at the end.
2210 \begin_layout Standard
2211 A template is just a regular \SpecialChar LyX
2213 This means you can fill in your address and signature and save the file
2215 From now on, any time you want to write a letter, you can use the new template
2217 We do not have to suggest an actual
2218 \begin_inset Quotes eld
2222 \begin_inset Quotes erd
2225 here; just write a letter to someone!
2229 \begin_layout Plain Layout
2230 One warning, if you are writing from a template.
2231 If you erase all of the text in an environment — for example, if you erase
2235 \begin_inset space ~
2240 field so that you can replace it with your own — and then you move the
2241 cursor without writing any text, the environment may disappear.
2242 This is because most environments cannot exist without any text in them.
2243 Just reselect the environment from the
2255 \begin_layout Standard
2256 Templates can be a huge time-saver, and we urge you to use them whenever
2258 In addition, they can help a person learn how to use some of the fancier
2260 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2262 of less computer-aware users.
2263 When they are first learning \SpecialChar LyX
2264 , it will be less intimidating if they have
2265 a letter template customized for their company, for example.
2268 \begin_layout Standard
2269 \begin_inset Newpage newpage
2275 \begin_layout Section
2279 \begin_layout Standard
2281 (like \SpecialChar LaTeX
2282 ) considers the title — which may contain the actual title, the author,
2283 the date, and even an abstract of a paper — to be a separate part of the
2287 \begin_layout Standard
2288 Go back to your first \SpecialChar LyX
2289 document and make sure it is using the
2297 \begin_layout Plain Layout
2298 You should not be using the letter any more, since the
2302 document class does not allow titles.
2307 Type a title on the first line, and change the line to the
2312 On the next line, type your name and change it to the
2317 On the next line, write the date in the
2322 Type a paragraph or two summarizing your document using the
2327 Notice how the title is presented when it is printed out.
2328 If you change the document format to Book, you will get a separate title
2329 page, like the first page of this tutorial.
2332 \begin_layout Labeling
2333 \labelwidthstring 00.00.0000
2338 : Fix the title, date, and author in
2343 \begin_layout Section
2344 Labels and Cross-References
2347 \begin_layout Standard
2348 You can label section headings, list items, formulas, footnotes, and floats
2352 \begin_layout Plain Layout
2353 Floats are explained in the
2367 Once you do so, you can refer to the element in other parts of the document,
2368 using cross-references.
2369 You can refer to a section's number, to the page on which the section begins
2371 As with section numbering, \SpecialChar LyX
2372 also takes care of cross-reference numbering
2374 Automatic management of labels and cross-references is among the most significa
2375 nt advantages of \SpecialChar LyX
2376 (and \SpecialChar LaTeX
2377 ) over conventional word processors.
2380 \begin_layout Subsection
2384 \begin_layout Standard
2385 Go to our second section, whose title is
2386 \begin_inset Quotes eld
2390 \begin_inset Quotes erd
2394 Click at the end of the section title line, and select
2396 Insert\SpecialChar menuseparator
2399 or the toolbar button
2406 A dialog asks you for a label name, and gives you a suggestion.
2411 , the label name will be placed in a box next to the section title.
2414 \begin_layout Standard
2415 So far you have not done anything — the output will look exactly the same,
2416 since labels do not show up in the printed document.
2417 However, now that you have added a label, you can refer to that label with
2419 We will do that next.
2422 \begin_layout Subsection
2423 Your first cross-reference
2426 \begin_layout Standard
2427 Place the cursor somewhere in Section
2428 \begin_inset space ~
2435 \begin_layout LyX-Code
2436 If you want to know more about this document,
2437 \begin_inset Newline newline
2443 \begin_layout Standard
2444 Now, with the cursor before the final period, select
2446 Insert\SpecialChar menuseparator
2448 \begin_inset space ~
2453 or the toolbar button
2456 arg "dialog-show-new-inset ref"
2460 The Cross-reference dialog pops up.
2461 It shows a list of the possible labels you can reference.
2462 At the moment, there should be only one,
2463 \begin_inset Quotes eld
2466 sec:About-This-Document
2467 \begin_inset Quotes erd
2471 First, select the drop-down menu labeled
2472 \begin_inset Quotes eld
2476 \begin_inset Quotes erd
2480 \begin_inset Quotes eld
2483 <reference> on page <page>
2484 \begin_inset Quotes erd
2489 \begin_inset Quotes eld
2492 sec:About-This-Document
2493 \begin_inset Quotes erd
2496 (it may be selected by default), and a reference marker will appear containing
2498 \begin_inset Quotes eld
2501 Ref+Text: sec:About-This-Document
2502 \begin_inset Quotes erd
2505 (To be really correct, you should put a
2508 \begin_inset space ~
2516 arg "command-alternatives math-space ; space-insert protected"
2519 ) in between the word
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2527 and the reference.) An alternative way to reference a label is to right-click
2528 the label and select
2532 in the pop-up context menu.
2533 The cross-reference to this label is now in the clipboard and can be copied
2534 to the actual cursor position via the menu
2536 Edit\SpecialChar menuseparator
2546 In the printed document, this reference marker will be replaced with the
2547 section number and then the page number.
2548 Preview your document and you will see that \SpecialChar LaTeX
2549 has been even cleverer than
2552 \begin_inset Quotes eld
2556 \begin_inset Quotes erd
2559 and depending how much text you have between the start of Section
2560 \begin_inset space ~
2563 2 and this cross-reference you may see
2564 \begin_inset Quotes eld
2568 \begin_inset Quotes erd
2572 \begin_inset Quotes eld
2575 on the previous page
2576 \begin_inset Quotes erd
2580 \begin_inset Quotes eld
2584 \begin_inset Quotes erd
2591 is the page number).
2594 \begin_layout Standard
2595 Conveniently, a cross-reference acts as a hyperlink when you are editing
2596 a document in \SpecialChar LyX
2597 ; clicking on it will pop up the
2604 \begin_inset space ~
2608 \begin_inset space ~
2613 will move the cursor to the referenced label.
2616 \begin_layout Subsection
2617 More fun with labels
2620 \begin_layout Standard
2621 We told you that \SpecialChar LyX
2622 takes care of numbering cross-references; now you can
2624 Add a new section before Section
2625 \begin_inset space ~
2629 Update the preview, and — voilà! — the section cross-reference changed
2631 \begin_inset Quotes eld
2635 \begin_inset Quotes erd
2638 ! Change the section
2639 \begin_inset Quotes eld
2643 \begin_inset Quotes erd
2646 to a subsection, and the cross-reference will reference Subsection
2647 \begin_inset space ~
2650 2.1 instead of Section
2651 \begin_inset space ~
2655 The page reference will not change unless you add a whole page of text
2656 before the label, of course.
2660 \begin_layout Standard
2661 If you want some more practice with labels, then try putting a new label
2662 where your first cross-reference was, and refer to that label from elsewhere
2664 If you will be inserting cross-references often, it may be convenient to
2672 \begin_layout Standard
2673 If you want to confirm that the cross-referencing gets the pages right even
2674 for larger documents,
2678 a couple pages of text from the
2682 to the clipboard, and
2686 them into your document.
2690 \begin_layout Plain Layout
2691 By the way, copying a chapter title may cause an error, because chapters
2692 are not allowed in the article class, see Section
2693 \begin_inset space ~
2697 \begin_inset CommandInset ref
2699 reference "sec:Document-Classes"
2704 If this happens, just delete the chapter title.
2712 \begin_layout Labeling
2713 \labelwidthstring 00.00.0000
2718 : Fix the references in
2723 \begin_layout Section
2724 Footnotes and Margin Notes
2727 \begin_layout Standard
2728 Footnotes can be added using the toolbar button
2731 arg "footnote-insert"
2736 Insert\SpecialChar menuseparator
2740 Click at the end of the word
2741 \begin_inset Quotes eld
2746 \begin_inset Quotes erd
2749 somewhere in your document and insert a footnote.
2750 A footnote box appears where you can enter the text of the footnote.
2752 should place the cursor at the beginning of the footnote box.
2756 \begin_layout LyX-Code
2758 is a typesetting word processor.
2761 \begin_layout Standard
2762 Now click on the button labeled
2763 \begin_inset Quotes eld
2767 \begin_inset Quotes erd
2771 The footnote box is closed, leaving the button showing where the footnote
2772 marker will be in the printed text; this is called
2773 \begin_inset Quotes eld
2777 \begin_inset Quotes erd
2781 You can unfold the footnote at any time and re-edit its text by clicking
2783 \begin_inset Quotes eld
2787 \begin_inset Quotes erd
2793 \begin_layout Standard
2794 A footnote can be cut and pasted like normal text.
2795 Go ahead; try it! All you need to do is select the footnote button
2799 \begin_layout Plain Layout
2800 It may be easier to select it using the keyboard.
2801 You might accidentally open the footnote if you are trying to select the
2802 marker itself with the mouse.
2816 In addition, you can change regular text to a footnote, by selecting it
2820 arg "footnote-insert"
2823 button; change a footnote to regular text by hitting the
2827 key when the cursor is in the first position of a footnote, or by hitting
2832 key when the cursor is in the very last position of the footnote.
2835 \begin_layout Standard
2836 Margin notes can be added using the menu
2838 Insert\SpecialChar menuseparator
2840 \begin_inset space ~
2845 or the toolbar button
2848 arg "marginalnote-insert"
2851 \SpecialChar endofsentence
2852 Margin notes are like footnotes, except that:
2855 \begin_layout Itemize
2856 the on-screen boxes say
2857 \begin_inset Quotes eld
2861 \begin_inset Quotes erd
2865 \begin_inset Quotes eld
2869 \begin_inset Quotes erd
2875 \begin_layout Itemize
2876 the notes will be placed in the margin, instead of below the text
2879 \begin_layout Itemize
2880 margin notes are not numbered
2883 \begin_layout Standard
2884 Change your \SpecialChar LyX
2885 footnote back to text, then select and change it to a margin
2887 Run \SpecialChar LaTeX
2888 again to see what the margin note looks like.
2891 \begin_layout Labeling
2892 \labelwidthstring 00.00.0000
2897 : Fix the footnote in
2902 \begin_layout Section
2904 \begin_inset CommandInset label
2906 name "sec:bibliographies"
2913 \begin_layout Standard
2914 Bibliographies are similar to cross-references.
2915 The bibliography contains a list of references at the end of the document,
2916 and they can be referenced from within the document.
2917 Like section titles, \SpecialChar LyX
2918 and \SpecialChar LaTeX
2919 make your job easier by automatically numbering
2920 the bibliography items and changing citations when the item numbers change.
2923 \begin_layout Standard
2924 Go to the end of the document and switch to the
2929 Now, each paragraph you type will be a reference.
2931 \begin_inset Quotes eld
2936 The Lyx Tutorial, by the \SpecialChar LyX
2940 \begin_inset Quotes erd
2943 as your first reference.
2944 Note that \SpecialChar LyX
2945 automatically puts a number in a box before each reference.
2946 Click on the boxed reference number, and the
2949 \begin_inset space ~
2959 is to refer to this reference within the \SpecialChar LyX
2969 is set (default), you will see the number of the bibliography in the output.
2975 \begin_inset Quotes eld
2979 \begin_inset Quotes erd
2982 to make it easy to remember.
2985 \begin_layout Standard
2986 Now pick somewhere in your document that you would like to insert a reference.
2989 Insert\SpecialChar menuseparator
2992 or the toolbar button
2995 arg "dialog-show-new-inset citation"
3004 The left panel in this dialog lists all the bibliography entries, and this
3005 field allows you to choose which bibliography item you want to cite.
3007 \begin_inset Quotes eld
3011 \begin_inset Quotes erd
3014 (right now, that is the only item in the bibliography), then use the
3018 button in the center to insert it.
3019 (You can have multiple citations in the same place by transferring a number
3024 \begin_layout Plain Layout
3025 If one uses label names for references that are easy to remember it is easier
3026 to find the entry in the list of references.
3036 Now preview your file and you will see that the citation appears in brackets
3037 in the text, referring to the bibliography at the end of the document.
3040 \begin_layout Standard
3044 \begin_inset space ~
3053 dialog will put a remark (such as a reference to a page or chapter within
3054 the referenced book or article) in the brackets after the reference.
3055 If you want the references to have labels instead of numbers in the printed
3056 output (for example, some journals would use
3057 \begin_inset Quotes eld
3061 \begin_inset Quotes erd
3064 to refer to a paper written by Smith in 1995), use the
3071 \begin_inset space ~
3084 \begin_layout Labeling
3085 \labelwidthstring 00.00.0000
3090 Fix the bibliography and citation in
3095 \begin_layout Section
3099 \begin_layout Standard
3100 You may want to put a table of contents at the beginning of your document.
3102 makes this easy to do.
3107 after your document title and before your first section title and select
3110 Insert\SpecialChar menuseparator
3112 \begin_inset space ~
3116 \begin_inset space ~
3119 TOC\SpecialChar menuseparator
3121 \begin_inset space ~
3125 \begin_inset space ~
3132 \begin_inset Quotes eld
3136 \begin_inset Quotes erd
3139 will appear in a button on the first line of the document.
3143 \begin_layout Standard
3144 This may not appear to be very useful.
3145 However, if you look at your preview, you will see that a table of contents
3146 has been generated, listing the various sections and subsections in your
3148 As usual, if you reorder sections or create new ones, you will see those
3149 changes in the preview when you update it.
3153 \begin_layout Standard
3154 The table of contents is not printed in the on-screen version of the document.
3155 But you can display the table of contents in a separate window by clicking
3156 on the table of contents button, or by using
3158 View\SpecialChar menuseparator
3160 \begin_inset space ~
3165 or the toolbar button
3168 arg "dialog-toggle toc"
3172 This menu will work even if you do not have a table of contents inset in
3174 This is a very useful tool for rearranging your document parts.
3175 Clicking on a (sub)section title in the
3179 window will highlight that line and move the display (in the \SpecialChar LyX
3181 to that place in the document.
3182 You can also use the arrow keys to move up and down in the table of contents.
3183 You may therefore find it convenient to leave this window open throughout
3185 You can get similar functionality from the
3189 menu, though, where the table of contents appears automatically.
3192 \begin_layout Standard
3193 To get rid of the Table of Contents, you can delete the table of contents
3194 button just like any other text.
3197 \begin_layout Labeling
3198 \labelwidthstring 00.00.0000
3203 : Fix the table of contents in
3208 \begin_layout Chapter
3212 \begin_layout Standard
3214 is used by many scientists because it outputs great looking equations,
3215 avoiding the control characters used by word processors and their equation
3217 Many of these scientists are frustrated, however, because writing equations
3218 in \SpecialChar LaTeX
3219 is more like programming than writing.
3220 Happily, \SpecialChar LyX
3221 has WYSIWYM support for equations.
3222 If you are used to \SpecialChar LaTeX
3223 , you will find that all of the usual \SpecialChar LaTeX
3225 can be typed in normally, but they will show up in a WYSIWYM fashion.
3226 If, on the other hand, you have never written in \SpecialChar LaTeX
3230 \begin_inset space ~
3235 will allow you to write professional-looking math quickly and easily.
3238 \begin_layout Section
3242 \begin_layout Standard
3243 Somewhere in your \SpecialChar LyX
3247 \begin_layout LyX-Code
3248 I like what Einstein said, E=mc^2, because it is
3249 \begin_inset Newline linebreak
3255 \begin_layout Standard
3256 Now, that equation does not look very good in \SpecialChar LyX
3257 and in the output; there
3258 is no space between the letters and the equals sign, and you would like
3259 to write an actual superscript for the
3260 \begin_inset Quotes eld
3264 \begin_inset Quotes erd
3268 That bad typesetting happened because we did not tell \SpecialChar LyX
3269 that we were writing
3270 a mathematical expression, so it typeset the equation like regular old
3274 \begin_layout Standard
3275 But we can create a formula that will be typeset properly.
3276 Highlight the equation and click the toolbar button
3284 Insert\SpecialChar menuseparator
3285 Math\SpecialChar menuseparator
3287 \begin_inset space ~
3293 If nothing is highlighted \SpecialChar LyX
3294 inserts a little blue square, which is an empty
3296 The expression appears in blue and the blue square disappears as soon as
3297 the formula is not empty.
3302 to leave the equation.
3303 The purple markers disappear, leaving the cursor to the right of the expression.
3304 Now, if you type something, it will be regular text.
3307 \begin_layout Standard
3308 Looking at the output you will notice that the expression was typeset nicely,
3309 with spaces between the letters and the equals sign, and a superscript
3311 \begin_inset Quotes eld
3315 \begin_inset Quotes erd
3319 Letters in math mode are assumed to be variables, and come out in italics.
3320 Numbers are just numbers.
3323 \begin_layout Standard
3324 This math editor is another example of the WYSIWYM philosophy.
3325 In \SpecialChar LaTeX
3326 , you write a mathematical expression using text and commands like
3332 ; this can be frustrating, because you cannot see what an expression looks
3333 like until you run the file under \SpecialChar LaTeX
3334 and you may have to spend time, for
3335 example, finding missing brackets.
3337 does not attempt to get the expression to look perfect (WYSIWYG), but
3338 it gives you an extremely good idea of what the expression will look like.
3340 then takes care of the professional typesetting.
3343 \begin_layout Section
3344 Navigating an Equation
3347 \begin_layout Standard
3349 \begin_inset Formula $E=mc^{2}$
3353 \begin_inset Formula $E=1+mc^{2}$
3357 Use the arrow keys to move the cursor into the expression.
3358 Note that when you enter the expression, the purple markers appear to let
3359 you know you are editing math.
3368 to move the cursor past the equals sign, and just type
3369 \begin_inset Quotes eld
3373 \begin_inset Quotes erd
3377 Again, you can use the arrow keys or
3381 to leave the formula\SpecialChar endofsentence
3385 \begin_layout Standard
3386 Other than the special keys described below, typing in math mode is like
3387 editing regular text.
3397 Select text either with the arrow keys or with the mouse.
3400 Edit\SpecialChar menuseparator
3403 works in math mode as well as cut and paste.
3404 One thing to be careful of: if you are left or right outside a formula
3413 respectively, you delete the whole formula.
3414 Luckily, you can just use
3421 \begin_layout Standard
3422 What if you want to change
3423 \begin_inset Formula $E=mc^{2}$
3427 \begin_inset Formula $E=mc^{2.5}+1$
3430 ? Again, you can use the mouse to click in the right place.
3431 However, you can also use the arrow keys.
3432 If the cursor is just after the
3433 \begin_inset Quotes eld
3437 \begin_inset Quotes erd
3441 \begin_inset Quotes eld
3445 \begin_inset Quotes erd
3452 and the cursor is moved to the level of the superscript, just before the
3454 \begin_inset Quotes eld
3458 \begin_inset Quotes erd
3463 \begin_inset Quotes eld
3467 \begin_inset Quotes erd
3475 will move the cursor back to the regular level.
3484 , the cursor will be placed
3488 the superscript (so that you can then type the
3489 \begin_inset Quotes eld
3493 \begin_inset Quotes erd
3499 \begin_layout Section
3500 Exponents and Indices
3503 \begin_layout Standard
3504 An exponent can be entered from the
3507 \begin_inset space ~
3512 (see below), but it is actually simpler just to type the caret key,
3513 \begin_inset Quotes eld
3517 \begin_inset Quotes erd
3522 will place another blue rectangle in the superscript, so that whatever
3523 you write next will be superscripted, and in a smaller font size.
3524 Everything you type until you hit a
3532 to exit the formula entirely) will be in the superscript.
3535 \begin_layout Standard
3536 Writing a subscript (index) is just as easy; start one by typing the underscore
3538 \begin_inset Quotes eld
3542 \begin_inset Quotes erd
3546 You can subscript and superscript both subscripts and superscripts like
3548 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3555 \begin_layout Labeling
3556 \labelwidthstring 00.00.0000
3562 \begin_inset space ~
3572 \begin_layout Section
3576 \begin_layout Standard
3580 \begin_inset space ~
3585 is a convenient way to enter symbols and/or to perform complicated formula
3587 Many of these operations can be accomplished from the keyboard or the
3589 Insert\SpecialChar menuseparator
3594 Edit\SpecialChar menuseparator
3597 menus (the latter only appears when you are in Math mode).
3598 However, we are going to concentrate on using the
3601 \begin_inset space ~
3606 , just to let you know what is out there; you can learn keyboard shortcuts
3607 and commands later from the
3614 \begin_layout Standard
3618 \begin_inset space ~
3623 is shown when the cursor is in a formula and can also be turned on manually
3626 View\SpecialChar menuseparator
3630 When you click there on
3631 \begin_inset Quotes eld
3635 \begin_inset Quotes erd
3641 arg "toolbar-toggle math"
3644 ) the toolbar will be shown permanently at the bottom; this state is visualized
3649 menu with a checkmark.
3650 When you click in this state again on
3651 \begin_inset Quotes eld
3655 \begin_inset Quotes erd
3665 \begin_inset space ~
3670 is only shown when the cursor is within a formula; this state is visualized
3671 by the renaming of the menu entry from
3672 \begin_inset Quotes eld
3676 \begin_inset Quotes erd
3680 \begin_inset Quotes eld
3684 \begin_inset space ~
3688 \begin_inset Quotes erd
3694 \begin_layout Subsection
3698 \begin_layout Standard
3702 \begin_inset space ~
3707 allows you to choose from a large array of symbols used in math: operators,
3708 arrows, relationships, delimiters, special characters, sums and integrals.
3709 Note that subscripting and superscripting allow you to put lower and upper
3710 limits on sums and integrals.
3713 \begin_layout Subsection
3714 Roots, decorations, and delimiters
3717 \begin_layout Standard
3718 To type a square root, just click on the button
3721 arg "math-insert \\sqrt"
3725 The square root appears, and the cursor is in a new insertion point inside
3727 You can type variables, numbers, other square roots, fractions, whatever
3730 will automatically resize the square root to fit what is inside.
3733 \begin_layout Standard
3735 \begin_inset Quotes eld
3739 \begin_inset Quotes erd
3743 \begin_inset Formula $\overrightarrow{a}$
3746 ) or group of characters (
3747 \begin_inset Formula $\overrightarrow{a+b}$
3750 ) is done similarly.
3751 Decorations are available from the toolbar via the button
3754 arg "math-insert \\hat"
3758 Click on a decoration, and \SpecialChar LyX
3759 will insert that decoration with an insertion
3760 point under (or over) it.
3761 Just type what you want in the insertion point.
3762 There are two sets of decorations: those that resize with the text you
3763 type, and those that have a fixed size, and are most appropriate for a
3768 \begin_layout Standard
3769 Delimiters such as parentheses, brackets, and braces work similarly, but
3770 are a bit more complicated.
3771 Hit the delimiter button
3774 arg "dialog-show mathdelimiter"
3782 Your current selection of delimiters is displayed in a box.
3783 It is a pair of parentheses by default, but you can choose a pair of braces,
3784 a brace and a parenthesis, or choose the empty square to have something
3786 \begin_inset Quotes eld
3790 \begin_inset Formula $a=\left\langle 7\right.$
3794 \begin_inset Quotes erd
3797 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3802 \begin_layout Standard
3803 If you are lazy, you can type actual parentheses in math mode, rather than
3809 However, those parentheses will be the same size as regular text, which
3810 will look bad if you have a big fraction or matrix inside the parentheses.
3811 So it is better to use one of the three delimiter buttons that insert them
3812 directly, for example
3815 arg "math-delim ( )"
3821 \begin_layout Standard
3822 You can also put delimiters or a square root sign or a decoration on already
3823 existing formula parts.
3824 Select the portion of the formula that you want to adjust, and then click
3825 on the button you want from the
3828 \begin_inset space ~
3834 Try using this to change Newton's second law from scalar to vector form
3836 \begin_inset Formula $f=ma$
3840 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3844 Once you have learned about matrices, this is how you will put parentheses
3845 or brackets around them.
3848 \begin_layout Subsection
3852 \begin_layout Standard
3853 To create a fraction, click on the fraction button
3856 arg "math-insert \\frac-square"
3862 \begin_inset space ~
3869 writes two insertion points in a fraction.
3870 As you would expect, you can use arrow keys or the mouse to move around
3872 Click on the top square and type
3873 \begin_inset Quotes eld
3877 \begin_inset Quotes erd
3886 \begin_inset Quotes eld
3890 \begin_inset Quotes erd
3894 You have made a fraction! Of course you can type anything within each of
3895 the two boxes: variables with exponents, square roots, other fractions,
3900 \begin_layout Labeling
3901 \labelwidthstring 00.00.0000
3907 \begin_inset space ~
3917 \begin_layout Subsection
3918 Functions: lim, log, sin and others
3921 \begin_layout Standard
3922 Because letters in math mode are considered to be variables, if you type
3924 \begin_inset Quotes eld
3928 \begin_inset Quotes erd
3931 in math mode, \SpecialChar LyX
3932 thinks you are typing the product of the three variables
3934 \begin_inset Formula $s$
3938 \begin_inset Formula $i$
3942 \begin_inset Formula $n$
3946 The three letters will be typeset in italics, when what you really wanted
3948 \begin_inset Quotes eld
3952 \begin_inset Quotes erd
3956 In addition, \SpecialChar LyX
3957 will not put a space between the word
3958 \begin_inset Quotes eld
3962 \begin_inset Quotes erd
3966 \begin_inset Quotes eld
3970 \begin_inset Quotes erd
3977 will exit the formula).
3979 \begin_inset Quotes eld
3983 \begin_inset Formula $\sin(x)$
3987 \begin_inset Quotes erd
3991 \begin_inset Quotes eld
3995 \begin_inset Formula $sin(x)$
3999 \begin_inset Quotes erd
4005 \begin_layout Standard
4009 \begin_inset space ~
4017 arg "math-insert \\functions"
4021 \begin_inset Quotes eld
4025 \begin_inset Quotes erd
4028 in the pop-up function list.
4030 \begin_inset Quotes eld
4034 \begin_inset Quotes erd
4037 is displayed in \SpecialChar LyX
4038 in black, and set in upright roman type.
4039 The whole word is treated as one symbol, so if you type
4043 , it will delete the whole word.
4045 \begin_inset Quotes eld
4049 \begin_inset Quotes erd
4052 , which will be written in blue italics, like you expect in a formula.
4053 In the output, the expression will be correctly typeset.
4057 \begin_layout Standard
4058 The function list includes other trigonometric functions and their inverses,
4059 hyperbolic functions, logarithms, limits, and quite a few others.
4060 These functions can take subscripts and superscripts, important for typing
4062 \begin_inset Quotes eld
4066 \begin_inset Formula $\cos^{2}\theta$
4070 \begin_inset Quotes erd
4074 \begin_inset Quotes eld
4078 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4082 \begin_inset Quotes erd
4088 \begin_layout Labeling
4089 \labelwidthstring 00.00.0000
4095 \begin_inset space ~
4105 \begin_layout Subsection
4109 \begin_layout Standard
4110 Click on the matrix button
4113 arg "dialog-show mathmatrix"
4119 \begin_inset space ~
4125 A pop-up dialog allows you to choose how many rows and columns you want
4127 Choose 2 rows and 3 columns and hit
4133 prints 6 insertion points in a
4134 \begin_inset Formula $2\times3$
4138 As usual, you can put any sort of formula expression (a square root, another
4139 matrix, etc.) in each insertion point.
4140 You can also leave some of the insertion points empty if you want.
4143 \begin_layout Standard
4148 can be used to move horizontally between the columns of a matrix.
4149 Alternatively, you can use the arrow keys to move around - hitting
4153 at the end of one box will move to the next box,
4157 will move to the next row, etc.
4160 \begin_layout Standard
4161 If you need to change the number of rows and columns, use the menu
4163 Edit\SpecialChar menuseparator
4165 \begin_inset space \thinspace{}
4169 \begin_inset space \thinspace{}
4174 or the math toolbar buttons
4177 arg "tabular-feature append-row"
4183 arg "tabular-feature delete-row"
4189 arg "tabular-feature append-column"
4195 arg "tabular-feature delete-column"
4201 \begin_layout Standard
4206 for information on how to change the horizontal alignment of each column,
4207 and how to change the vertical position of the whole matrix.
4208 Note that if you want to write a table containing text, you should use
4210 's wonderful table support, rather than trying to write text in a matrix.
4213 \begin_layout Subsection
4217 \begin_layout Standard
4218 All of the expressions we have written so far have been on the same line
4219 as the text that came before and after them, otherwise known as inline
4221 This is fine for short, simple expressions, but if you want to write larger
4222 ones, or if you want your expressions to stand out from the text, you need
4223 to write them in display mode.
4224 In addition, only displayed expressions can be labeled and numbered (see
4229 ), and multi-line equations must be in display mode.
4232 \begin_layout Standard
4233 While being in a formula, click on the display button
4244 This centers the formula and adds a blank line before and after it.
4245 Now type in an expression and compile your file to see how it looks.
4246 The display button is actually a toggle; use it now to change a couple
4247 of your expressions to display mode and back.
4251 \begin_layout Standard
4252 Display mode has a couple differences from inline mode:
4255 \begin_layout Itemize
4256 The default font is larger for a few symbols, like
4257 \begin_inset Formula $\sum$
4261 \begin_inset Formula $\int$
4267 \begin_layout Itemize
4268 Subscripts and superscripts for limits and sums (but not integrals) are
4269 written under and over rather than next to the symbols
4272 \begin_layout Itemize
4276 \begin_layout Standard
4277 Other than these differences, though, displayed expressions and inline expressio
4278 ns are very similar.
4281 \begin_layout Standard
4282 One final note about the way displayed formulas are typeset: be careful
4283 about whether you are putting your equation into a new paragraph or not.
4284 If your formula is in the middle of a sentence or paragraph, then do not
4290 Doing so will cause the text
4294 the formula to start a new paragraph.
4295 That text will be indented or follow a blank line, depending on your document
4296 paragraph settings, which is probably not what you want.
4299 \begin_layout Labeling
4300 \labelwidthstring 00.00.0000
4305 : Put the various equations in
4309 into display mode, and see how they are typeset differently.
4312 \begin_layout Labeling
4313 \labelwidthstring 00.00.0000
4318 : Using various tools you have learned in this section, you should be able
4319 to write an equation like:
4323 \begin_layout Plain Layout
4324 After you have done it the hard way, give
4326 Insert\SpecialChar menuseparator
4327 Math\SpecialChar menuseparator
4329 \begin_inset space ~
4340 \begin_inset Formula
4342 f(x)=\left\{ \begin{array}{cc}
4345 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4354 \begin_layout Section
4358 \begin_layout Standard
4359 Now you are familiar with the basics.
4361 's math editor can do a lot more.
4362 You can refer to the
4366 manual for tips on how to:
4369 \begin_layout Itemize
4370 Label and number expressions.
4373 \begin_layout Itemize
4374 Create multi-line equations.
4377 \begin_layout Itemize
4378 Change typefaces, e.
4379 \begin_inset space \thinspace{}
4383 \begin_inset space \space{}
4386 to write bold-face text in an expression.
4389 \begin_layout Itemize
4390 Fine-tune font sizes and spacing within an expression.
4391 (Do not worry about this until your final draft!)
4394 \begin_layout Itemize
4396 These are very powerful, because you just define them once at the top of
4397 the document, and then you can use them throughout the document.
4400 \begin_layout Itemize
4401 Do almost all you can do with math.
4404 \begin_layout Chapter
4408 \begin_layout Section
4409 Other major \SpecialChar LyX
4413 \begin_layout Standard
4414 We have not gone through all the possible commands in \SpecialChar LyX
4415 , and we are not planning
4424 \begin_inset space ~
4429 manual for more information.
4430 We will just mention a couple more major things \SpecialChar LyX
4434 \begin_layout Itemize
4436 has WYSIWYM support for tables.
4439 Insert\SpecialChar menuseparator
4445 arg "tabular-insert"
4449 Click on the table with the
4456 \begin_inset space ~
4461 dialog box which allows extensive table editing.
4465 arg "toolbar-toggle table"
4468 the table toolbar will appear permanently.
4471 \begin_layout Itemize
4473 also supports including pictures in any format within documents.
4476 Insert\SpecialChar menuseparator
4482 arg "dialog-show-new-inset graphics"
4486 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4487 can have captions, and \SpecialChar LyX
4488 will automatically generate lists of figures and/or
4492 \begin_layout Itemize
4494 is heavily configurable.
4495 Everything from how the \SpecialChar LyX
4496 window looks to how the output comes out can be
4497 configured in a number of ways.
4498 Much configuration is done through
4500 Tools\SpecialChar menuseparator
4504 For more information on this, check out
4506 Help\SpecialChar menuseparator
4507 Customization\SpecialChar endofsentence
4511 \begin_layout Itemize
4513 is being developed by a team of programmers on five continents.
4514 Therefore, \SpecialChar LyX
4515 has better support for non-English languages (such as Dutch,
4516 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4517 ) than many word processors.
4518 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4519 languages Chinese Japanese, and Korean are supported.
4520 You can write documents in other languages and you can also configure \SpecialChar LyX
4522 to show its menus and error messages in other languages.
4526 \begin_layout Itemize
4527 The \SpecialChar LyX
4528 menus feature keybindings.
4529 This means that you can do
4531 File\SpecialChar menuseparator
4542 or by using the binding which is shown next to it in the menu (
4549 Keybindings are also configurable.
4550 For information on this, check out
4552 Help\SpecialChar menuseparator
4553 Customization\SpecialChar endofsentence
4557 \begin_layout Itemize
4559 can read \SpecialChar LaTeX
4562 \begin_inset space ~
4566 \begin_inset CommandInset ref
4568 reference "sec:tex2lyx"
4575 \begin_layout Itemize
4576 Spell-checking, thesaurus, and word count facilities are available.
4579 \begin_layout Itemize
4580 Generation of indexes and nomenclatures/glossaries is supported.
4583 \begin_layout Section
4585 for \SpecialChar LaTeX
4587 \begin_inset CommandInset label
4589 name "sec:latexusers"
4596 \begin_layout Standard
4597 If you do not know anything about \SpecialChar LaTeX
4598 , you do not have to read this section.
4599 Actually, you might want to
4603 about \SpecialChar LaTeX
4604 , and then read this chapter.
4605 However, some of those who begin to use \SpecialChar LyX
4606 will be familiar with \SpecialChar LaTeX
4608 If you are such a person, you may be wondering if \SpecialChar LyX
4609 can really do everything
4612 The short answer is that \SpecialChar LyX
4613 can do pretty much everything \SpecialChar LaTeX
4615 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4620 \begin_layout Standard
4621 Because this is just a tutorial, we are only going to mention things that
4622 new \SpecialChar LyX
4623 users will most likely be interested in.
4624 In the interests of keeping the Tutorial short, we will give only minimal
4629 \begin_inset space ~
4637 \begin_inset space ~
4642 manuals have a great deal of information on differences between \SpecialChar LyX
4643 and \SpecialChar LaTeX
4645 and how to do various \SpecialChar LaTeX
4646 tricks in \SpecialChar LyX
4650 \begin_layout Subsection
4655 \begin_layout Standard
4656 Anything that you enter in \SpecialChar TeX
4657 mode will be passed straight to \SpecialChar LaTeX
4659 displayed in red on the screen.
4660 You can use \SpecialChar TeX
4661 commands in \SpecialChar LyX
4664 Insert\SpecialChar menuseparator
4666 \begin_inset space ~
4678 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4682 \begin_layout Standard
4683 In a math formula, \SpecialChar TeX
4684 mode is handled a bit differently.
4686 mode is entered there by typing a backslash.
4687 The backslash is not written out, but anything you type afterwards will
4689 You exit \SpecialChar TeX
4694 or some other non-alphabetic character, like a number, underscore, caret
4696 Once you exit \SpecialChar TeX
4697 mode, if \SpecialChar LyX
4698 knows the \SpecialChar TeX
4699 command you have typed in, it will
4700 convert it to WYSIWYM\SpecialChar endofsentence
4702 \begin_inset Quotes eld
4712 \begin_inset Quotes erd
4715 in a formula and then press
4721 \begin_inset Quotes eld
4725 \begin_inset Quotes erd
4729 \begin_inset Quotes eld
4733 \begin_inset Formula $\gamma$
4737 \begin_inset Quotes erd
4741 This will work for almost all, non-complicated math macros.
4742 This may be faster than using the
4745 \begin_inset space ~
4750 , and will be especially convenient for experienced \SpecialChar LaTeX
4754 \begin_layout Standard
4755 As a special case, if you type
4756 \begin_inset Quotes eld
4766 \begin_inset Quotes erd
4769 in a formula, the beginning
4773 ending braces will be inserted in red while the cursor is placed between
4775 This makes it more convenient to type those commands that take an argument.
4778 \begin_layout Standard
4780 cannot do absolutely everything that \SpecialChar LaTeX
4782 Some fancy functions are not supported at all, while some work but are
4785 mode allows users to get the full flexibility of \SpecialChar LaTeX
4786 , while having all the
4787 convenient features of \SpecialChar LyX
4788 , like WYSIWYM math, tables, and editing.
4790 could never support every \SpecialChar LaTeX
4798 in the preamble (see Section
4799 \begin_inset space ~
4803 \begin_inset CommandInset ref
4805 reference "sec:preamble"
4809 ), you can use any package you want — although you will not have WYSIWYM
4810 support for that package's features.
4813 \begin_layout Subsection
4814 Importing \SpecialChar LaTeX
4820 \begin_inset CommandInset label
4829 \begin_layout Standard
4830 You can import a \SpecialChar LaTeX
4831 file into \SpecialChar LyX
4834 File\SpecialChar menuseparator
4835 Import\SpecialChar menuseparator
4837 \begin_inset space ~
4842 menu in \SpecialChar LyX
4844 This will call the program
4848 which will create a file foo.lyx from the file foo.tex.
4850 will then open that file.
4851 If the translation does not work, you can try calling
4855 from the command line, possibly using fancier options.
4858 \begin_layout Standard
4859 Even when the translation does work,
4863 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4865 It will leave things it does not understand in \SpecialChar TeX
4866 mode; so, after translating
4871 , you can look for the red text and manually edit it to get it right.
4874 \begin_layout Standard
4879 has its own documentation (manpage), which Unix/Linux users can access
4880 via the console command
4883 \begin_inset space ~
4889 The manpage describes which \SpecialChar LaTeX
4890 commands and environments are not supported,
4891 what bugs you might run into (and how to get around them), and how to use
4892 the various options.
4895 \begin_layout Standard
4896 It is important to understand that
4900 can only translate files whose document class is
4901 \begin_inset Quotes eld
4905 \begin_inset Quotes erd
4909 , that is, for which there is a corresponding \SpecialChar LyX
4915 If there is no layout file, then you will get an error saying that the
4916 conversion could not be performed.
4917 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4922 simply will not know how to translate the \SpecialChar LaTeX
4923 that it finds there into things
4926 More about layout files and how they are created is explained in detail
4934 \begin_layout Subsection
4935 Converting \SpecialChar LyX
4936 Documents to \SpecialChar LaTeX
4940 \begin_layout Standard
4941 You might wish to convert a \SpecialChar LyX
4942 Document to a \SpecialChar LaTeX
4944 For example, a co-worker or co-author who does not have \SpecialChar LyX
4949 File\SpecialChar menuseparator
4950 Export\SpecialChar menuseparator
4954 This will create a file
4962 file you are editing.
4965 \begin_layout Subsection
4970 \begin_layout Subsubsection
4974 \begin_layout Standard
4977 Document\SpecialChar menuseparator
4980 dialog takes care of the document-wide options, such as changing the document
4981 class, default font size and paper size.
4982 Document class options and also options for \SpecialChar LaTeX
4983 packages can be entered there
4987 \begin_inset space ~
4995 \begin_layout Subsubsection
4996 Other Preamble Matter
4997 \begin_inset CommandInset label
5006 \begin_layout Standard
5007 If you have special commands to put in the preamble of a \SpecialChar LaTeX
5009 use them in a \SpecialChar LyX
5013 Document\SpecialChar menuseparator
5014 Settings\SpecialChar menuseparator
5016 \begin_inset space ~
5021 and type in the dialog window (or from the document settings dialog, depending
5023 Anything you type will (as with \SpecialChar TeX
5024 mode) be sent directly to \SpecialChar LaTeX
5028 \begin_layout Subsection
5033 \begin_layout Standard
5035 has support for Bib\SpecialChar TeX
5036 , which allows you to build databases of bibliographical
5037 references to be used in multiple documents.
5040 Insert\SpecialChar menuseparator
5042 \begin_inset space \thinspace{}
5046 \begin_inset space \thinspace{}
5049 TOC\SpecialChar menuseparator
5051 \begin_inset space ~
5066 field you load Bib\SpecialChar TeX
5071 field you can load Bib\SpecialChar TeX
5075 \begin_layout Standard
5076 After you have done this, you can use citations from any bibliographies
5077 you have included with
5079 Insert\SpecialChar menuseparator
5083 \begin_inset space ~
5087 \begin_inset CommandInset ref
5089 reference "sec:bibliographies"
5098 dialog will show a list of all the references in your
5106 \begin_layout Section
5110 \begin_layout Standard
5111 Sometimes when you try to view a document, there will be errors, things
5112 that \SpecialChar LyX
5113 or \SpecialChar LaTeX
5115 When this happens, \SpecialChar LyX
5120 \begin_inset space ~
5126 Clicking on individual errors in this dialog will take you to the place
5127 in the \SpecialChar LyX
5128 document where the error occurs and also display the detailed \SpecialChar LaTeX