1 #LyX 2.3 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 \use_dash_ligatures false
30 \default_output_format pdf2
32 \bibtex_command default
33 \index_command default
37 \pdf_title "The LyX Tutorial"
38 \pdf_author "LyX Team"
39 \pdf_subject "LyX-documentation Tutorial"
40 \pdf_keywords "LyX, documentation"
42 \pdf_bookmarksnumbered true
43 \pdf_bookmarksopen true
44 \pdf_bookmarksopenlevel 1
49 \pdf_pdfusetitle false
50 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
53 \use_package amsmath 0
54 \use_package amssymb 0
57 \use_package mathdots 1
58 \use_package mathtools 0
60 \use_package stackrel 0
61 \use_package stmaryrd 0
62 \use_package undertilde 0
64 \cite_engine_type default
68 \paperorientation portrait
78 \paragraph_separation indent
79 \paragraph_indentation default
84 \paperpagestyle headings
85 \tracking_changes false
100 by the \SpecialChar LyX
105 \begin_layout Plain Layout
107 If you have comments on or corrections to this documentation, please send
108 them to the \SpecialChar LyX
109 Documentation mailing list:
110 \begin_inset CommandInset href
112 target "lyx-docs@lists.lyx.org"
126 \begin_layout Standard
127 \begin_inset CommandInset toc
128 LatexCommand tableofcontents
135 \begin_layout Chapter
139 \begin_layout Section
140 Welcome to \SpecialChar LyX
144 \begin_layout Standard
145 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
148 Now, do not panic – you will not need to learn \SpecialChar LaTeX
149 to use \SpecialChar LyX
151 That is, after all, the whole point of \SpecialChar LyX
152 : to provide an almost-WYSIWYG interface
153 to \SpecialChar LaTeX
155 There are some things you will need to learn, however, in order to use
160 \begin_layout Standard
161 Some of you probably found your way to this document because you tried to
162 put two spaces after a
163 \begin_inset Quotes eld
167 \begin_inset Quotes erd
170 or tried to put three blank lines between paragraphs.
171 You found out you could not and, in fact, you will find out that most of
172 the little tricks you are accustomed to use in word processors will not
173 work in \SpecialChar LyX
175 That is because most word processors you have used before allow you manually
176 to enter all spacings, font changes, and so on.
177 So you end up not only writing a document but typesetting it, too.
179 does the typesetting for you, in a consistent fashion, letting you focus
180 on the important things, like the content of your writing.
183 \begin_layout Standard
184 So read on to learn more about \SpecialChar LyX
186 Reading this tutorial is definitely worth the time.
189 \begin_layout Section
199 \begin_layout Standard
200 Before we get started with this section, you need to know that this
204 uses the notation outlined in the
209 If you came to this manual first, please read the
213 before you continue with the
220 \begin_layout Standard
221 Now that you know which fonts mean what in the documentation, we want to
222 talk a bit about what this
229 \begin_layout Subsection
230 Getting the most out of the Tutorial
233 \begin_layout Standard
234 This tutorial consists of examples and exercises.
235 To get the most out of this document, you should read through it, typing
236 all the little things we are telling you to type and trying out all of
237 the exercises to see if you get them right.
238 For convenience, you might want to print out the PDF version of this document.
241 \begin_layout Standard
242 If you are familiar with \SpecialChar LaTeX
243 , you will probably be able to read the
247 somewhat faster, since many \SpecialChar LyX
248 ideas are just \SpecialChar LaTeX
250 However, \SpecialChar LyX
251 has features you will want to learn about.
252 Even if you do not feel like reading the rest of the
256 , you should definitely check out Section
261 \begin_inset CommandInset ref
263 reference "sec:latexusers"
267 , which is specifically written for experienced \SpecialChar LaTeX
271 \begin_layout Subsection
279 \begin_layout Itemize
280 Detailed explanations of all of \SpecialChar LyX
285 \begin_layout Standard
294 \begin_layout Itemize
295 Detailed explanations of \SpecialChar LaTeX
300 \begin_layout Standard
302 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
305 can have a look at the
317 \begin_layout Standard
318 It is time to move on, time for your first document \SpecialChar ldots
322 \begin_layout Chapter
323 Getting started with \SpecialChar LyX
327 \begin_layout Section
328 Your first \SpecialChar LyX
332 \begin_layout Standard
333 OK\SpecialChar endofsentence
334 You are ready to start writing.
335 Before you do, there are a few things we need to mention, which will hopefully
336 make the Tutorial more instructive and useful.
340 \begin_layout Standard
341 Because there is information we cannot give you in the Tutorial, the
347 thing that you need to do is find the
354 Start up \SpecialChar LyX
364 You may want to load the
368 as well (if you are not reading it within \SpecialChar LyX
370 This way, you can read them while you are writing your own file.
374 \begin_layout Plain Layout
375 They can also serve as good examples of how to use the many features of
382 Note that once you have got more than one document open, you can use the
387 menu or the document tabs to switch between them.
390 \begin_layout Standard
391 In this Tutorial, we are going to assume that you have a fully working version
393 , as well as a \SpecialChar LaTeX
394 -distribution and a PDF-viewer.
395 This should be the case on all major Linux- and BSD-distributions, as well
396 as on Windows, where this is setup by the \SpecialChar LyX
400 \begin_layout Standard
401 Finally, we have written a file called
405 to let you practice your \SpecialChar LyX
407 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
410 As you learn new \SpecialChar LyX
411 functions, we will suggest that you fix those parts of
417 It also contains `subtle' hints about how to fix things.
421 \begin_layout Plain Layout
422 The hints are located in yellow
423 \begin_inset Quotes eld
427 \begin_inset Quotes erd
431 Access the text in a note by clicking on it.
436 If you want to cheat, or check what you have done, there is also a file
438 \begin_inset Newline newline
445 which contains the same text written and typeset by a \SpecialChar LyX
449 \begin_layout Standard
450 The example files can be found in the
454 directory of \SpecialChar LyX
455 's installation folder.
462 File\SpecialChar menuseparator
469 to save a copy in your own directory for you to work on.
470 As you fix parts of the raw document, check to see how those changes affect
474 \begin_layout Standard
479 directory contains lots of other examples files.
480 They will show you how to do various fancy things with \SpecialChar LyX
482 After you have read the Tutorial, or when you are confused about how to
483 do something fancy in \SpecialChar LyX
484 , take a look at these files.
487 \begin_layout Subsection
488 Typing, Viewing, and Exporting
491 \begin_layout Itemize
494 File\SpecialChar menuseparator
498 \begin_layout Itemize
499 Type a sentence like:
501 This is my first \SpecialChar LyX
505 \begin_layout Itemize
506 Save your document with
508 File\SpecialChar menuseparator
513 As\SpecialChar endofsentence
517 \begin_layout Itemize
518 Create a PDF file, with
520 Document\SpecialChar menuseparator
523 or the toolbar button
531 will open a PDF-viewer program displaying your document as it will look
535 \begin_layout Itemize
536 Export the ready to print document with
538 File\SpecialChar menuseparator
546 \begin_layout Standard
547 Congratulations! You have written your first \SpecialChar LyX
549 All of the rest is just details.
550 \begin_inset Newline newline
556 \begin_layout Standard
561 You can save time by leaving the PDF viewer running in the background.
562 Under MacOS and Linux you can use
564 Document\SpecialChar menuseparator
567 or the toolbar button
573 and just click on the PDF viewer window afterwards.
574 Under Windows still use
576 Document\SpecialChar menuseparator
588 \begin_layout Standard
593 In case you are using a high-resolution display, the LyX toolbar icons
595 To change their size, right-click into a toolbar.
598 \begin_layout Subsection
602 \begin_layout Standard
604 can of course do most of the things you are used to doing with a word processor.
605 It will word-wrap and indent paragraphs automatically.
606 Here is a quick description of how to do some simple actions.
609 \begin_layout Description
610 Undo \SpecialChar LyX
611 has multiple levels of undo, which means you can undo everything you
612 have done since your current editing session started, by selecting
614 Edit\SpecialChar menuseparator
623 ) over and over again.
624 If you undo too much, just select
626 Edit\SpecialChar menuseparator
639 \begin_layout Standard
640 Currently, undo is limited to 100 steps.
644 \begin_layout Description
647 Edit\SpecialChar menuseparator
658 Edit\SpecialChar menuseparator
669 Edit\SpecialChar menuseparator
678 ) to cut, copy, and paste.
679 Or automatically paste selected text (including selections from other programs)
687 \begin_layout Description
690 Edit\SpecialChar menuseparator
704 arg "dialog-show findreplace"
708 In the dialog, search with the
720 button to replace a word you have found.
724 \begin_layout Plain Layout
725 Close the window when you are done or leave it open if you find it more
727 Most dialog boxes in \SpecialChar LyX
728 can operate like this.
729 Just be sure you have the right window in focus when you are trying to
730 type in the main \SpecialChar LyX
731 window or a \SpecialChar LyX
737 If you like, you can specify whether to make the search case-sensitive,
738 or to search for only complete words; you can also search backwards through
742 \begin_layout Description
757 , which will by default print characters in italics), set it in
767 , usually small caps, used for people's names), or use your own formatting
770 Edit\SpecialChar menuseparator
775 Style\SpecialChar menuseparator
778 dialog (toolbar button
781 arg "dialog-show character"
787 \begin_layout Description
788 Toolbar Other buttons on the toolbar allow you to do some of the more popular
816 \begin_layout Standard
817 Of course, you have not yet written enough to make most of these functions
819 As you write more, though, try undoing, pasting, etc.
822 \begin_layout Subsection
823 WYSIWYM: Whitespace in \SpecialChar LyX
827 \begin_layout Standard
828 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
831 As many times as you hit
835 , you will only get one blank line.
836 As many times as you hit
840 , you will only get one space.
841 On a blank line, \SpecialChar LyX
842 will not let you type even one space.
847 key will not move you forward one tab stop; in fact there
851 no tab stops! There is no ruler at the top of the page to let you set tabs
855 \begin_layout Standard
856 Many word processors are based on the WYSIWYG principle:
857 \begin_inset Quotes eld
860 What You See Is What You Get.
861 \begin_inset Quotes erd
865 , on the other hand, is based on the principle that
866 \begin_inset Quotes eld
869 What You See Is What You
874 \begin_inset Quotes erd
877 You type what you mean and \SpecialChar LyX
878 will take care of typesetting it for you so
879 that the output looks nice.
884 grammatically separates paragraphs and a
888 grammatically separates words; so there is no reason to have several of
893 has no grammatical function at all – so \SpecialChar LyX
895 Using \SpecialChar LyX
896 , you will spend more of your time worrying about the
900 of your document and less time worrying about the
909 for more information on the WYSIWYM concept.
912 \begin_layout Standard
914 does have (many) ways to fine-tune the formatting of your document.
915 After all, \SpecialChar LyX
925 has information about all that.
926 It includes horizontal fills and vertical space — which are more powerful
927 and versatile than multiple spaces or blank lines — and ways to change
928 font sizes, character styles, and paragraph alignments by hand.
929 The idea, though, is that you can write your whole document, focusing on
930 content, and just worry about that fine-tuning at the end.
931 With standard word processors, you will be distracted by document formatting
932 throughout the writing process.
935 \begin_layout Section
939 \begin_layout Standard
940 Different parts of a document have different purposes; we call these parts
946 Most of a document is made up of regular text.
947 Section titles (chapter, subsection, etc.) let the reader know that a new
948 topic or subtopic will be discussed.
949 Certain types of documents have special environments.
950 A journal article will have an abstract and a title.
951 A letter will have neither of these, but will probably have an environment
952 that gives the writer's address.
955 \begin_layout Standard
956 Environments are a major part of the
957 \begin_inset Quotes eld
960 What You See Is What You Mean
961 \begin_inset Quotes erd
964 philosophy of \SpecialChar LyX
966 A given environment may require a certain font style, font size, indenting,
967 line spacing, and more.
968 This problem is aggravated, because the exact formatting for a given environmen
969 t may change: one journal may use boldface, 18 point, centered type for
970 section titles while another uses italicized, 15 point, left justified
971 type; different languages may have different standards for indenting; and
972 bibliography formats can vary widely.
974 lets you avoid learning all the different formatting styles.
977 \begin_layout Standard
982 choice box is located on the left end of the toolbar and looks like this:
984 \begin_inset Graphics
985 filename clipart/ToolbarEnvBox.png
992 It indicates in which environment you are currently writing.
993 While you were writing your first document, it said
994 \begin_inset Quotes eld
998 \begin_inset Quotes erd
1001 which is the default environment for text.
1002 Now you will put a number of environments in your new document so that
1003 you can see how they work.
1006 \begin_layout Subsection
1007 Sections and Subsections
1010 \begin_layout Standard
1015 on the first line of your new \SpecialChar LyX
1028 \begin_layout Plain Layout
1034 If nothing is selected, \SpecialChar LyX
1035 changes the paragraph you are currently in to
1036 the selected environment.
1037 Alternatively, you can change several paragraphs to a different environment
1038 by selecting them before picking an environment.
1055 , which will be covered below.
1058 \begin_inset Quotes eld
1062 \begin_inset Quotes erd
1065 and typesets the section heading (title) in a larger font.
1070 \SpecialChar endofsentence
1076 \begin_inset Quotes eld
1080 \begin_inset Quotes erd
1084 \begin_inset Quotes eld
1088 \begin_inset Quotes erd
1092 Section headings, like most environments, are assumed to end when you type
1097 \SpecialChar endofsentence
1098 Type the document introduction:
1101 \begin_layout LyX-Code
1102 This is an introduction to my first \SpecialChar LyX
1106 \begin_layout Standard
1122 \begin_inset Quotes eld
1126 \begin_inset Quotes erd
1129 and waits for you to type a title.
1131 \begin_inset Quotes eld
1137 \begin_inset space ~
1143 \begin_inset Quotes erd
1146 , and you will see that \SpecialChar LyX
1147 again sets it as a section title.
1150 \begin_layout Standard
1152 Go to the end of Section
1153 \begin_inset space ~
1157 \begin_inset Quotes eld
1160 my first \SpecialChar LyX
1162 \begin_inset Quotes erd
1178 Again, \SpecialChar LyX
1180 \begin_inset Quotes eld
1184 \begin_inset Quotes erd
1187 and waits for you to type a title.
1194 \begin_inset space ~
1198 \begin_inset Quotes eld
1202 \begin_inset Quotes erd
1206 \begin_inset space ~
1209 2, has been automatically renumbered to Section
1210 \begin_inset space ~
1213 3! In true WYSIWYM fashion, you just need to identify the text that makes
1214 up the section titles, and \SpecialChar LyX
1215 takes care of numbering the sections and typesettin
1219 \begin_layout Standard
1228 environment, and type the following five lines:
1231 \begin_layout LyX-Code
1232 Sections and subsections are described below.
1235 \begin_layout LyX-Code
1239 \begin_layout LyX-Code
1240 Sections are bigger than subsections.
1243 \begin_layout LyX-Code
1244 Subsection description
1247 \begin_layout LyX-Code
1248 Subsections are smaller than sections.
1251 \begin_layout Standard
1252 Click on the second line and select
1262 numbers the subsection
1263 \begin_inset Quotes eld
1267 \begin_inset Quotes erd
1270 , and typesets it in a font which is bigger than regular text but smaller
1271 than the section title.
1272 Change the fourth line to the
1276 environment as well.
1277 As you probably expected, \SpecialChar LyX
1278 automatically numbered the section
1279 \begin_inset Quotes eld
1283 \begin_inset Quotes erd
1287 If you put yet another section before Section
1288 \begin_inset space ~
1292 \begin_inset space ~
1295 2 will be renumbered as Section 3, and the subsections will be renumbered
1297 \begin_inset Quotes eld
1301 \begin_inset Quotes erd
1305 \begin_inset Quotes eld
1309 \begin_inset Quotes erd
1315 \begin_layout Standard
1316 Further levels of sectioning include
1329 We will let you play with these on your own.
1330 You may notice that paragraph and subparagraph headings are not numbered
1331 by default, and that subparagraphs are indented; see the
1335 for an explanation and how to change this.
1340 headings are actually the highest level of sectioning, above
1344 s, but you are only allowed to use them in certain types (text classes)
1346 documents (see Section
1347 \begin_inset space ~
1351 \begin_inset CommandInset ref
1353 reference "sec:Document-Classes"
1360 \begin_layout Standard
1361 Finally, you may want to have sections or subsections that are not numbered.
1362 There are environments for this as well.
1363 If you change one of your section headings to the
1367 environment (you may have to scroll down in the
1371 box to find it), \SpecialChar LyX
1372 will use the same font size for the heading as it uses
1373 for a regular section, but it will not number that section.
1374 There are corresponding
1375 \begin_inset Quotes eld
1379 \begin_inset Quotes erd
1382 heading environments for
1391 Try changing some of your sections or subsections to the starred environments,
1392 and note how the other section numbers are updated.
1395 \begin_layout Labeling
1396 \labelwidthstring 00.00.0000
1401 : Fix the section and subsection headings in
1402 \begin_inset Newline newline
1413 \begin_layout Subsection
1417 \begin_layout Standard
1419 has several different environments for typesetting lists.
1420 The various list environments free you from hitting
1424 a million times when writing an outline, or from renumbering a whole list
1425 when you want to add a point in the middle of the list.
1426 Different types of documents logically require different list environments:
1429 \begin_layout Itemize
1430 A slide presentation might use the
1434 environment's bulleted lists to describe different points.
1437 \begin_layout Itemize
1438 An outline would use the
1442 environment's numbered lists (and lettered sublists).
1445 \begin_layout Itemize
1446 A document describing several software packages could use the
1450 environment, where each item in the list begins with a bold-faced word.
1453 \begin_layout Itemize
1462 ) environment is a variation on the
1469 \begin_layout Standard
1470 Let us write a list of reasons why \SpecialChar LyX
1471 is better than other word processors.
1472 Somewhere in your document, type:
1475 \begin_layout Standard
1479 is better than other word processors because:
1482 \begin_layout Standard
1499 arg "layout Itemize"
1505 \begin_inset Quotes eld
1509 \begin_inset Quotes erd
1513 Type in your reasons:
1516 \begin_layout LyX-Code
1517 Typesetting is done for you.
1520 \begin_layout LyX-Code
1524 \begin_layout LyX-Code
1525 Lists are very easy to create!
1528 \begin_layout Standard
1529 List environments, unlike headings, do not end when you type
1534 Instead, \SpecialChar LyX
1535 assumes you are going on to the next item in the list.
1536 The above will therefore result in a three-item list.
1537 If you want more than one paragraph within one list
1541 , one way is to use the
1544 \begin_inset space ~
1549 , which you get by typing
1554 In order to get out of the list, you need to reselect the
1558 environment (or just use the key binding
1561 arg "layout Standard"
1567 \begin_layout Standard
1568 You now have a beautiful itemized list.
1569 You might want to run \SpecialChar LaTeX
1570 to see how the list looks when printed out.
1571 But what if you wanted to number the reasons? Well, just select the whole
1576 \begin_layout Plain Layout
1578 will not let you select the first bullet (or the actual number in a numbered
1579 section title) unless you also select the paragraph
1583 it, which you probably do not want to do.
1584 This is on purpose because the bullet or number depends on the document
1585 settings or text position, respectively.
1601 arg "layout Enumerate"
1605 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1606 will fix the numbering.
1609 \begin_layout Standard
1610 While the list is still selected, you can change to the other two list environme
1618 \begin_inset space \thinspace{}
1624 \begin_inset space \thinspace{}
1634 arg "layout Description"
1643 ), in order to see what they look like.
1644 For those two environments, each list item is made up of a term, which
1645 is the item's first word, followed by a definition, which is the rest of
1646 the paragraph (until you hit
1651 The term is either typeset in boldface (
1656 \begin_inset Quotes eld
1660 \begin_inset Quotes erd
1667 \begin_layout Plain Layout
1668 But a typesetter's tab, which will change to fit the size of the largest
1669 term, not a pathetic, rigid, unchangeable typewriter
1682 ) from the rest of the paragraph.
1683 If you want to have more than one word in the definition, then separate
1687 \begin_inset space ~
1695 \begin_layout Labeling
1696 \labelwidthstring 00.00.0000
1701 : Typeset the list in
1706 \begin_layout Standard
1707 You can nest lists within each other in all sorts of interesting ways.
1708 An obvious example would be writing outlines.
1709 Numbered and bulleted lists will have different numbering and bulleting
1710 schemes for sublists.
1715 for details on the different sorts of lists and for examples of nestings.
1718 \begin_layout Subsection
1719 Other environments: Verses, Quotations, and more
1722 \begin_layout Standard
1723 There are two environments for setting quotations apart from surrounding
1728 for short quotes and
1742 \begin_layout Plain Layout
1743 used in this Tutorial for the long typing examples
1752 font; this environment is the only place in \SpecialChar LyX
1753 where you are allowed to use
1754 multiple spaces to allow code indenting.
1755 You can even write poetry using the
1763 to separate stanzas, and
1767 to separate lines within a stanza.
1772 for more complete descriptions of all of the available \SpecialChar LyX
1776 \begin_layout Labeling
1777 \labelwidthstring 00.00.0000
1782 : Correctly typeset the
1784 Quote, \SpecialChar LyX
1792 \begin_inset Newline newline
1800 \begin_layout Chapter
1804 \begin_layout Standard
1805 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1807 It introduced you to the basic editing operations in \SpecialChar LyX
1808 , as well as the powerful
1809 method of writing with environments.
1810 Most people who use \SpecialChar LyX
1811 , though, will want to write documents: papers, articles,
1812 books, manuals, or letters.
1813 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1815 a complete document.
1816 It will introduce you to text classes, which allow you to write different
1818 It will then describe many of the additions that turn text into a document,
1819 such as titles, footnotes, cross references, bibliographies, and tables
1823 \begin_layout Section
1825 \begin_inset CommandInset label
1827 name "sec:Document-Classes"
1834 \begin_layout Standard
1835 Different sorts of documents should be typeset differently.
1836 For example, books are generally printed double-sided, while articles are
1838 In addition, many documents contain special environments: letters contain
1839 some environments — such as the sender's address and the signature — which
1840 do not make sense in a book or article.
1841 The \SpecialChar LyX
1850 \begin_layout Plain Layout
1851 for \SpecialChar LaTeX
1852 users: this is equivalent to the \SpecialChar LaTeX
1858 takes care of these large scale differences between different sorts of
1860 This Tutorial, for example, was written in the
1865 Document classes are another major part of the WYSIWYM philosophy; they
1866 tell \SpecialChar LyX
1867 how to typeset the document, so you do not need to know how.
1870 \begin_layout Standard
1871 Your document is probably being written in the
1879 \begin_layout Plain Layout
1880 That is usually the default document class
1885 Try changing to other document classes (using the
1887 Document\SpecialChar menuseparator
1890 dialog) to see how they are typeset differently.
1891 If you change your document to the
1895 document class and look at the
1899 box, you will see that most of the allowed environments are the same.
1900 However, you can now use the
1905 If you are ever unsure about which environments you can use in a given
1906 document class, just consult the
1913 \begin_layout Standard
1914 Font sizes, one- or two-column printing, and page headings are just some
1915 of the ways journals' typesettings differ from one another.
1916 As the Computer Age continues to mature, journals have begun accepting
1917 electronic submissions, creating \SpecialChar LaTeX
1919 \begin_inset Quotes eld
1923 \begin_inset Quotes erd
1926 so that authors can submit correctly typeset articles.
1928 is set up to support this as well.
1929 For example, \SpecialChar LyX
1930 supports typesetting (and extra environments) for the American
1931 Mathematics Society journals using the
1934 \begin_inset space ~
1942 \begin_layout Standard
1943 Here is a very quick reference to some of the document classes.
1946 Special Document Classes
1952 manual for many more details.
1955 \begin_layout Standard
1957 \begin_inset Tabular
1958 <lyxtabular version="3" rows="7" columns="2">
1959 <features tabularvalignment="middle">
1960 <column alignment="center" valignment="top" width="0pt">
1961 <column alignment="center" valignment="top" width="0pt">
1963 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1966 \begin_layout Plain Layout
1972 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1975 \begin_layout Plain Layout
1983 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1986 \begin_layout Plain Layout
1992 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1995 \begin_layout Plain Layout
1996 one-sided, no chapters
2003 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2006 \begin_layout Plain Layout
2012 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2015 \begin_layout Plain Layout
2016 layout & environments for American Math Society
2023 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2026 \begin_layout Plain Layout
2032 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2035 \begin_layout Plain Layout
2036 longer than article, two-sided
2043 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2046 \begin_layout Plain Layout
2052 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2055 \begin_layout Plain Layout
2056 report + front and back matter
2063 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2066 \begin_layout Plain Layout
2072 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2075 \begin_layout Plain Layout
2083 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2086 \begin_layout Plain Layout
2092 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2095 \begin_layout Plain Layout
2096 lots of extra environments for address, signature\SpecialChar ldots
2110 \begin_layout Section
2111 Templates: Writing a Letter
2114 \begin_layout Standard
2115 One way to write a letter would be to open a new file, and choose a
2121 Document\SpecialChar menuseparator
2125 While this is the most obvious way to write a letter, it seems like extra
2127 Every time you write a business letter, you want to have your address,
2128 the address to which you are sending it, a body, a signature, etc.
2134 for letters, which contains a sample letter; once you have a template,
2135 you can just replace a couple of parts of the letter with your text each
2136 time you write a letter.
2139 \begin_layout Standard
2140 Open a new file with
2142 File\SpecialChar menuseparator
2144 \begin_inset space ~
2148 \begin_inset space ~
2159 Save and print the file to see how the various environments are typeset.
2162 \begin_layout Standard
2163 When you look at the
2167 box, you will see several environments, like the
2170 \begin_inset space ~
2175 environment, that do not exist in most other document classes.
2181 You can play around for a while to figure out how the various environments
2183 You will notice for example that the
2187 environment has the word
2188 \begin_inset Quotes eld
2192 \begin_inset Quotes erd
2195 in red before the actual text of the signature.
2196 This word does not show up in the actual letter, as you will see if you
2197 view/export the file.
2198 It is just there to let you know where the signature goes.
2199 Also, note that it does not matter where in the file the
2204 Remember, \SpecialChar LyX
2205 is WYSIWYM; you can put the
2209 environment anywhere you want, but \SpecialChar LyX
2210 knows that in the printout, the signature
2211 should be at the end.
2214 \begin_layout Standard
2215 A template is just a regular \SpecialChar LyX
2217 This means you can fill in your address and signature and save the file
2219 From now on, any time you want to write a letter, you can use the new template
2221 We do not have to suggest an actual
2222 \begin_inset Quotes eld
2226 \begin_inset Quotes erd
2229 here; just write a letter to someone!
2233 \begin_layout Plain Layout
2234 One warning, if you are writing from a template.
2235 If you erase all of the text in an environment — for example, if you erase
2239 \begin_inset space ~
2244 field so that you can replace it with your own — and then you move the
2245 cursor without writing any text, the environment may disappear.
2246 This is because most environments cannot exist without any text in them.
2247 Just reselect the environment from the
2259 \begin_layout Standard
2260 Templates can be a huge time-saver, and we urge you to use them whenever
2262 In addition, they can help a person learn how to use some of the fancier
2264 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2266 of less computer-aware users.
2267 When they are first learning \SpecialChar LyX
2268 , it will be less intimidating if they have
2269 a letter template customized for their company, for example.
2272 \begin_layout Standard
2273 \begin_inset Newpage newpage
2279 \begin_layout Section
2283 \begin_layout Standard
2285 (like \SpecialChar LaTeX
2286 ) considers the title — which may contain the actual title, the author,
2287 the date, and even an abstract of a paper — to be a separate part of the
2291 \begin_layout Standard
2292 Go back to your first \SpecialChar LyX
2293 document and make sure it is using the
2301 \begin_layout Plain Layout
2302 You should not be using the letter any more, since the
2306 document class does not allow titles.
2311 Type a title on the first line, and change the line to the
2316 On the next line, type your name and change it to the
2321 On the next line, write the date in the
2326 Type a paragraph or two summarizing your document using the
2331 Notice how the title is presented when it is printed out.
2332 If you change the document format to Book, you will get a separate title
2333 page, like the first page of this tutorial.
2336 \begin_layout Labeling
2337 \labelwidthstring 00.00.0000
2342 : Fix the title, date, and author in
2347 \begin_layout Section
2348 Labels and Cross-References
2351 \begin_layout Standard
2352 You can label section headings, list items, formulas, footnotes, and floats
2356 \begin_layout Plain Layout
2357 Floats are explained in the
2371 Once you do so, you can refer to the element in other parts of the document,
2372 using cross-references.
2373 You can refer to a section's number, to the page on which the section begins
2375 As with section numbering, \SpecialChar LyX
2376 also takes care of cross-reference numbering
2378 Automatic management of labels and cross-references is among the most significa
2379 nt advantages of \SpecialChar LyX
2380 (and \SpecialChar LaTeX
2381 ) over conventional word processors.
2384 \begin_layout Subsection
2388 \begin_layout Standard
2389 Go to our second section, whose title is
2390 \begin_inset Quotes eld
2394 \begin_inset Quotes erd
2398 Click at the end of the section title line, and select
2400 Insert\SpecialChar menuseparator
2403 or the toolbar button
2410 A dialog asks you for a label name, and gives you a suggestion.
2415 , the label name will be placed in a box next to the section title.
2418 \begin_layout Standard
2419 So far you have not done anything — the output will look exactly the same,
2420 since labels do not show up in the printed document.
2421 However, now that you have added a label, you can refer to that label with
2423 We will do that next.
2426 \begin_layout Subsection
2427 Your first cross-reference
2430 \begin_layout Standard
2431 Place the cursor somewhere in Section
2432 \begin_inset space ~
2439 \begin_layout LyX-Code
2440 If you want to know more about this document,
2441 \begin_inset Newline newline
2447 \begin_layout Standard
2448 Now, with the cursor before the final period, select
2450 Insert\SpecialChar menuseparator
2452 \begin_inset space ~
2457 or the toolbar button
2460 arg "dialog-show-new-inset ref"
2464 The Cross-reference dialog pops up.
2465 It shows a list of the possible labels you can reference.
2466 At the moment, there should be only one,
2467 \begin_inset Quotes eld
2470 sec:About-This-Document
2471 \begin_inset Quotes erd
2475 First, select the drop-down menu labeled
2476 \begin_inset Quotes eld
2480 \begin_inset Quotes erd
2484 \begin_inset Quotes eld
2488 \begin_inset Quotes erd
2493 \begin_inset Quotes eld
2496 sec:About-This-Document
2497 \begin_inset Quotes erd
2500 (it may be selected by default), and a reference marker will appear containing
2502 \begin_inset Quotes eld
2505 Ref: sec:About-This-Document
2506 \begin_inset Quotes erd
2509 (To be really correct, you should put a
2512 \begin_inset space ~
2520 arg "command-alternatives math-space ; space-insert protected"
2523 ) in between the word
2524 \begin_inset Quotes eld
2528 \begin_inset Quotes erd
2531 and the reference.) An alternative way to reference a label is to right-click
2532 the label and select
2536 in the pop-up context menu.
2537 The cross-reference to this label is now in the clipboard and can be copied
2538 to the actual cursor position via the menu
2540 Edit\SpecialChar menuseparator
2550 In the printed document, this reference marker will be replaced with the
2552 Preview your document and you will see that \SpecialChar LaTeX
2553 has been even cleverer than
2556 \begin_inset Quotes eld
2560 \begin_inset Quotes erd
2566 \begin_layout Standard
2567 Conveniently, a cross-reference acts as a hyperlink when you are editing
2568 a document in \SpecialChar LyX
2569 ; clicking on it will pop up the
2576 \begin_inset space ~
2580 \begin_inset space ~
2585 will move the cursor to the referenced label.
2588 \begin_layout Subsection
2589 More fun with labels
2592 \begin_layout Standard
2593 We told you that \SpecialChar LyX
2594 takes care of numbering cross-references; now you can
2596 Add a new section before Section
2597 \begin_inset space ~
2601 Update the preview, and — voilà! — the section cross-reference changed
2603 \begin_inset Quotes eld
2607 \begin_inset Quotes erd
2610 ! Change the section
2611 \begin_inset Quotes eld
2615 \begin_inset Quotes erd
2618 to a subsection, and the cross-reference will reference Subsection
2619 \begin_inset space ~
2622 2.1 instead of Section
2623 \begin_inset space ~
2627 The page reference will not change unless you add a whole page of text
2628 before the label, of course.
2632 \begin_layout Standard
2633 If you want some more practice with labels, then try putting a new label
2634 where your first cross-reference was, and refer to that label from elsewhere
2636 If you will be inserting cross-references often, it may be convenient to
2644 \begin_layout Standard
2645 If you want to confirm that the cross-referencing gets the pages right even
2646 for larger documents,
2650 a couple pages of text from the
2654 to the clipboard, and
2658 them into your document.
2662 \begin_layout Plain Layout
2663 By the way, copying a chapter title may cause an error, because chapters
2664 are not allowed in the article class, see Section
2665 \begin_inset space ~
2669 \begin_inset CommandInset ref
2671 reference "sec:Document-Classes"
2676 If this happens, just delete the chapter title.
2684 \begin_layout Labeling
2685 \labelwidthstring 00.00.0000
2690 : Fix the references in
2695 \begin_layout Section
2696 Footnotes and Margin Notes
2699 \begin_layout Standard
2700 Footnotes can be added using the toolbar button
2703 arg "footnote-insert"
2708 Insert\SpecialChar menuseparator
2712 Click at the end of the word
2713 \begin_inset Quotes eld
2718 \begin_inset Quotes erd
2721 somewhere in your document and insert a footnote.
2722 A footnote box appears where you can enter the text of the footnote.
2724 should place the cursor at the beginning of the footnote box.
2728 \begin_layout LyX-Code
2730 is a typesetting word processor.
2733 \begin_layout Standard
2734 Now click on the button labeled
2735 \begin_inset Quotes eld
2739 \begin_inset Quotes erd
2743 The footnote box is closed, leaving the button showing where the footnote
2744 marker will be in the printed text; this is called
2745 \begin_inset Quotes eld
2749 \begin_inset Quotes erd
2753 You can unfold the footnote at any time and re-edit its text by clicking
2755 \begin_inset Quotes eld
2759 \begin_inset Quotes erd
2765 \begin_layout Standard
2766 A footnote can be cut and pasted like normal text.
2767 Go ahead; try it! All you need to do is select the footnote button
2771 \begin_layout Plain Layout
2772 It may be easier to select it using the keyboard.
2773 You might accidentally open the footnote if you are trying to select the
2774 marker itself with the mouse.
2788 In addition, you can change regular text to a footnote, by selecting it
2792 arg "footnote-insert"
2795 button; change a footnote to regular text by hitting the
2799 key when the cursor is in the first position of a footnote, or by hitting
2804 key when the cursor is in the very last position of the footnote.
2807 \begin_layout Standard
2808 Margin notes can be added using the menu
2810 Insert\SpecialChar menuseparator
2812 \begin_inset space ~
2817 or the toolbar button
2820 arg "marginalnote-insert"
2823 \SpecialChar endofsentence
2824 Margin notes are like footnotes, except that:
2827 \begin_layout Itemize
2828 the on-screen boxes say
2829 \begin_inset Quotes eld
2833 \begin_inset Quotes erd
2837 \begin_inset Quotes eld
2841 \begin_inset Quotes erd
2847 \begin_layout Itemize
2848 the notes will be placed in the margin, instead of below the text
2851 \begin_layout Itemize
2852 margin notes are not numbered
2855 \begin_layout Standard
2856 Change your \SpecialChar LyX
2857 footnote back to text, then select and change it to a margin
2859 Run \SpecialChar LaTeX
2860 again to see what the margin note looks like.
2863 \begin_layout Labeling
2864 \labelwidthstring 00.00.0000
2869 : Fix the footnote in
2874 \begin_layout Section
2876 \begin_inset CommandInset label
2878 name "sec:bibliographies"
2885 \begin_layout Standard
2886 Bibliographies are similar to cross-references.
2887 The bibliography contains a list of references at the end of the document,
2888 and they can be referenced from within the document.
2889 Like section titles, \SpecialChar LyX
2890 and \SpecialChar LaTeX
2891 make your job easier by automatically numbering
2892 the bibliography items and changing citations when the item numbers change.
2895 \begin_layout Standard
2896 Go to the end of the document and switch to the
2901 Now, each paragraph you type will be a reference.
2903 \begin_inset Quotes eld
2908 The Lyx Tutorial, by the \SpecialChar LyX
2912 \begin_inset Quotes erd
2915 as your first reference.
2916 Note that \SpecialChar LyX
2917 automatically puts a number in a box before each reference.
2918 Click on the boxed reference number, and the
2921 \begin_inset space ~
2931 is to refer to this reference within the \SpecialChar LyX
2941 is set (default), you will see the number of the bibliography in the output.
2947 \begin_inset Quotes eld
2951 \begin_inset Quotes erd
2954 to make it easy to remember.
2957 \begin_layout Standard
2958 Now pick somewhere in your document that you would like to insert a reference.
2961 Insert\SpecialChar menuseparator
2964 or the toolbar button
2967 arg "dialog-show-new-inset citation"
2976 The left panel in this dialog lists all the bibliography entries, and this
2977 field allows you to choose which bibliography item you want to cite.
2979 \begin_inset Quotes eld
2983 \begin_inset Quotes erd
2986 (right now, that is the only item in the bibliography), then use the
2990 button in the center to insert it.
2991 (You can have multiple citations in the same place by transferring a number
2996 \begin_layout Plain Layout
2997 If one uses label names for references that are easy to remember it is easier
2998 to find the entry in the list of references.
3008 Now preview your file and you will see that the citation appears in brackets
3009 in the text, referring to the bibliography at the end of the document.
3012 \begin_layout Standard
3016 \begin_inset space ~
3025 dialog will put a remark (such as a reference to a page or chapter within
3026 the referenced book or article) in the brackets after the reference.
3027 If you want the references to have labels instead of numbers in the printed
3028 output (for example, some journals would use
3029 \begin_inset Quotes eld
3033 \begin_inset Quotes erd
3036 to refer to a paper written by Smith in 1995), use the
3043 \begin_inset space ~
3056 \begin_layout Labeling
3057 \labelwidthstring 00.00.0000
3062 Fix the bibliography and citation in
3067 \begin_layout Section
3071 \begin_layout Standard
3072 You may want to put a table of contents at the beginning of your document.
3074 makes this easy to do.
3079 after your document title and before your first section title and select
3082 Insert\SpecialChar menuseparator
3084 \begin_inset space ~
3088 \begin_inset space ~
3091 TOC\SpecialChar menuseparator
3093 \begin_inset space ~
3097 \begin_inset space ~
3104 \begin_inset Quotes eld
3108 \begin_inset Quotes erd
3111 will appear in a button on the first line of the document.
3115 \begin_layout Standard
3116 This may not appear to be very useful.
3117 However, if you look at your preview, you will see that a table of contents
3118 has been generated, listing the various sections and subsections in your
3120 As usual, if you reorder sections or create new ones, you will see those
3121 changes in the preview when you update it.
3125 \begin_layout Standard
3126 The table of contents is not printed in the on-screen version of the document.
3127 But you can display the table of contents in a separate window by clicking
3128 on the table of contents button, or by using
3130 View\SpecialChar menuseparator
3132 \begin_inset space ~
3137 or the toolbar button
3140 arg "dialog-toggle toc"
3144 This menu will work even if you do not have a table of contents inset in
3146 This is a very useful tool for rearranging your document parts.
3147 Clicking on a (sub)section title in the
3151 window will highlight that line and move the display (in the \SpecialChar LyX
3153 to that place in the document.
3154 You can also use the arrow keys to move up and down in the table of contents.
3155 You may therefore find it convenient to leave this window open throughout
3157 You can get similar functionality from the
3161 menu, though, where the table of contents appears automatically.
3164 \begin_layout Standard
3165 To get rid of the Table of Contents, you can delete the table of contents
3166 button just like any other text.
3169 \begin_layout Labeling
3170 \labelwidthstring 00.00.0000
3175 : Fix the table of contents in
3180 \begin_layout Chapter
3184 \begin_layout Standard
3186 is used by many scientists because it outputs great looking equations,
3187 avoiding the control characters used by word processors and their equation
3189 Many of these scientists are frustrated, however, because writing equations
3190 in \SpecialChar LaTeX
3191 is more like programming than writing.
3192 Happily, \SpecialChar LyX
3193 has WYSIWYM support for equations.
3194 If you are used to \SpecialChar LaTeX
3195 , you will find that all of the usual \SpecialChar LaTeX
3197 can be typed in normally, but they will show up in a WYSIWYM fashion.
3198 If, on the other hand, you have never written in \SpecialChar LaTeX
3202 \begin_inset space ~
3207 will allow you to write professional-looking math quickly and easily.
3210 \begin_layout Section
3214 \begin_layout Standard
3215 Somewhere in your \SpecialChar LyX
3219 \begin_layout LyX-Code
3220 I like what Einstein said, E=mc^2, because it is
3221 \begin_inset Newline linebreak
3227 \begin_layout Standard
3228 Now, that equation does not look very good in \SpecialChar LyX
3229 and in the output; there
3230 is no space between the letters and the equals sign, and you would like
3231 to write an actual superscript for the
3232 \begin_inset Quotes eld
3236 \begin_inset Quotes erd
3240 That bad typesetting happened because we did not tell \SpecialChar LyX
3241 that we were writing
3242 a mathematical expression, so it typeset the equation like regular old
3246 \begin_layout Standard
3247 But we can create a formula that will be typeset properly.
3248 Highlight the equation and click the toolbar button
3256 Insert\SpecialChar menuseparator
3257 Math\SpecialChar menuseparator
3259 \begin_inset space ~
3265 If nothing is highlighted \SpecialChar LyX
3266 inserts a little blue square, which is an empty
3268 The expression appears in blue and the blue square disappears as soon as
3269 the formula is not empty.
3274 to leave the equation.
3275 The purple markers disappear, leaving the cursor to the right of the expression.
3276 Now, if you type something, it will be regular text.
3279 \begin_layout Standard
3280 Looking at the output you will notice that the expression was typeset nicely,
3281 with spaces between the letters and the equals sign, and a superscript
3283 \begin_inset Quotes eld
3287 \begin_inset Quotes erd
3291 Letters in math mode are assumed to be variables, and come out in italics.
3292 Numbers are just numbers.
3295 \begin_layout Standard
3296 This math editor is another example of the WYSIWYM philosophy.
3297 In \SpecialChar LaTeX
3298 , you write a mathematical expression using text and commands like
3304 ; this can be frustrating, because you cannot see what an expression looks
3305 like until you run the file under \SpecialChar LaTeX
3306 and you may have to spend time, for
3307 example, finding missing brackets.
3309 does not attempt to get the expression to look perfect (WYSIWYG), but
3310 it gives you an extremely good idea of what the expression will look like.
3312 then takes care of the professional typesetting.
3315 \begin_layout Section
3316 Navigating an Equation
3319 \begin_layout Standard
3321 \begin_inset Formula $E=mc^{2}$
3325 \begin_inset Formula $E=1+mc^{2}$
3329 Use the arrow keys to move the cursor into the expression.
3330 Note that when you enter the expression, the purple markers appear to let
3331 you know you are editing math.
3340 to move the cursor past the equals sign, and just type
3341 \begin_inset Quotes eld
3345 \begin_inset Quotes erd
3349 Again, you can use the arrow keys or
3353 to leave the formula\SpecialChar endofsentence
3357 \begin_layout Standard
3358 Other than the special keys described below, typing in math mode is like
3359 editing regular text.
3369 Select text either with the arrow keys or with the mouse.
3372 Edit\SpecialChar menuseparator
3375 works in math mode as well as cut and paste.
3376 One thing to be careful of: if you are left or right outside a formula
3385 respectively, you delete the whole formula.
3386 Luckily, you can just use
3393 \begin_layout Standard
3394 What if you want to change
3395 \begin_inset Formula $E=mc^{2}$
3399 \begin_inset Formula $E=mc^{2.5}+1$
3402 ? Again, you can use the mouse to click in the right place.
3403 However, you can also use the arrow keys.
3404 If the cursor is just after the
3405 \begin_inset Quotes eld
3409 \begin_inset Quotes erd
3413 \begin_inset Quotes eld
3417 \begin_inset Quotes erd
3424 and the cursor is moved to the level of the superscript, just before the
3426 \begin_inset Quotes eld
3430 \begin_inset Quotes erd
3435 \begin_inset Quotes eld
3439 \begin_inset Quotes erd
3447 will move the cursor back to the regular level.
3456 , the cursor will be placed
3460 the superscript (so that you can then type the
3461 \begin_inset Quotes eld
3465 \begin_inset Quotes erd
3471 \begin_layout Section
3472 Exponents and Indices
3475 \begin_layout Standard
3476 An exponent can be entered from the
3479 \begin_inset space ~
3484 (see below), but it is actually simpler just to type the caret key,
3485 \begin_inset Quotes eld
3489 \begin_inset Quotes erd
3494 will place another blue rectangle in the superscript, so that whatever
3495 you write next will be superscripted, and in a smaller font size.
3496 Everything you type until you hit a
3504 to exit the formula entirely) will be in the superscript.
3507 \begin_layout Standard
3508 Writing a subscript (index) is just as easy; start one by typing the underscore
3510 \begin_inset Quotes eld
3514 \begin_inset Quotes erd
3518 You can subscript and superscript both subscripts and superscripts like
3520 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3527 \begin_layout Labeling
3528 \labelwidthstring 00.00.0000
3534 \begin_inset space ~
3544 \begin_layout Section
3548 \begin_layout Standard
3552 \begin_inset space ~
3557 is a convenient way to enter symbols and/or to perform complicated formula
3559 Many of these operations can be accomplished from the keyboard or the
3561 Insert\SpecialChar menuseparator
3566 Edit\SpecialChar menuseparator
3569 menus (the latter only appears when you are in Math mode).
3570 However, we are going to concentrate on using the
3573 \begin_inset space ~
3578 , just to let you know what is out there; you can learn keyboard shortcuts
3579 and commands later from the
3586 \begin_layout Standard
3590 \begin_inset space ~
3595 is shown when the cursor is in a formula and can also be turned on manually
3598 View\SpecialChar menuseparator
3602 When you click there on
3603 \begin_inset Quotes eld
3607 \begin_inset Quotes erd
3613 arg "toolbar-toggle math"
3616 ) the toolbar will be shown permanently at the bottom; this state is visualized
3621 menu with a checkmark.
3622 When you click in this state again on
3623 \begin_inset Quotes eld
3627 \begin_inset Quotes erd
3637 \begin_inset space ~
3642 is only shown when the cursor is within a formula; this state is visualized
3643 by the renaming of the menu entry from
3644 \begin_inset Quotes eld
3648 \begin_inset Quotes erd
3652 \begin_inset Quotes eld
3656 \begin_inset space ~
3660 \begin_inset Quotes erd
3666 \begin_layout Subsection
3670 \begin_layout Standard
3674 \begin_inset space ~
3679 allows you to choose from a large array of symbols used in math: operators,
3680 arrows, relationships, delimiters, special characters, sums and integrals.
3681 Note that subscripting and superscripting allow you to put lower and upper
3682 limits on sums and integrals.
3685 \begin_layout Subsection
3686 Roots, decorations, and delimiters
3689 \begin_layout Standard
3690 To type a square root, just click on the button
3693 arg "math-insert \\sqrt"
3697 The square root appears, and the cursor is in a new insertion point inside
3699 You can type variables, numbers, other square roots, fractions, whatever
3702 will automatically resize the square root to fit what is inside.
3705 \begin_layout Standard
3707 \begin_inset Quotes eld
3711 \begin_inset Quotes erd
3715 \begin_inset Formula $\overrightarrow{a}$
3718 ) or group of characters (
3719 \begin_inset Formula $\overrightarrow{a+b}$
3722 ) is done similarly.
3723 Decorations are available from the toolbar via the button
3726 arg "math-insert \\hat"
3730 Click on a decoration, and \SpecialChar LyX
3731 will insert that decoration with an insertion
3732 point under (or over) it.
3733 Just type what you want in the insertion point.
3734 There are two sets of decorations: those that resize with the text you
3735 type, and those that have a fixed size, and are most appropriate for a
3740 \begin_layout Standard
3741 Delimiters such as parentheses, brackets, and braces work similarly, but
3742 are a bit more complicated.
3743 Hit the delimiter button
3746 arg "dialog-show mathdelimiter"
3754 Your current selection of delimiters is displayed in a box.
3755 It is a pair of parentheses by default, but you can choose a pair of braces,
3756 a brace and a parenthesis, or choose the empty square to have something
3758 \begin_inset Quotes eld
3762 \begin_inset Formula $a=\left\langle 7\right.$
3766 \begin_inset Quotes erd
3769 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3774 \begin_layout Standard
3775 If you are lazy, you can type actual parentheses in math mode, rather than
3781 However, those parentheses will be the same size as regular text, which
3782 will look bad if you have a big fraction or matrix inside the parentheses.
3783 So it is better to use one of the three delimiter buttons that insert them
3784 directly, for example
3787 arg "math-delim ( )"
3793 \begin_layout Standard
3794 You can also put delimiters or a square root sign or a decoration on already
3795 existing formula parts.
3796 Select the portion of the formula that you want to adjust, and then click
3797 on the button you want from the
3800 \begin_inset space ~
3806 Try using this to change Newton's second law from scalar to vector form
3808 \begin_inset Formula $f=ma$
3812 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3816 Once you have learned about matrices, this is how you will put parentheses
3817 or brackets around them.
3820 \begin_layout Subsection
3824 \begin_layout Standard
3825 To create a fraction, click on the fraction button
3828 arg "math-insert \\frac-square"
3834 \begin_inset space ~
3841 writes two insertion points in a fraction.
3842 As you would expect, you can use arrow keys or the mouse to move around
3844 Click on the top square and type
3845 \begin_inset Quotes eld
3849 \begin_inset Quotes erd
3858 \begin_inset Quotes eld
3862 \begin_inset Quotes erd
3866 You have made a fraction! Of course you can type anything within each of
3867 the two boxes: variables with exponents, square roots, other fractions,
3872 \begin_layout Labeling
3873 \labelwidthstring 00.00.0000
3879 \begin_inset space ~
3889 \begin_layout Subsection
3890 Functions: lim, log, sin and others
3893 \begin_layout Standard
3894 Because letters in math mode are considered to be variables, if you type
3896 \begin_inset Quotes eld
3900 \begin_inset Quotes erd
3903 in math mode, \SpecialChar LyX
3904 thinks you are typing the product of the three variables
3906 \begin_inset Formula $s$
3910 \begin_inset Formula $i$
3914 \begin_inset Formula $n$
3918 The three letters will be typeset in italics, when what you really wanted
3920 \begin_inset Quotes eld
3924 \begin_inset Quotes erd
3928 In addition, \SpecialChar LyX
3929 will not put a space between the word
3930 \begin_inset Quotes eld
3934 \begin_inset Quotes erd
3938 \begin_inset Quotes eld
3942 \begin_inset Quotes erd
3949 will exit the formula).
3951 \begin_inset Quotes eld
3955 \begin_inset Formula $\sin(x)$
3959 \begin_inset Quotes erd
3963 \begin_inset Quotes eld
3967 \begin_inset Formula $sin(x)$
3971 \begin_inset Quotes erd
3977 \begin_layout Standard
3981 \begin_inset space ~
3989 arg "math-insert \\functions"
3993 \begin_inset Quotes eld
3997 \begin_inset Quotes erd
4000 in the pop-up function list.
4002 \begin_inset Quotes eld
4006 \begin_inset Quotes erd
4009 is displayed in \SpecialChar LyX
4010 in black, and set in upright roman type.
4011 The whole word is treated as one symbol, so if you type
4015 , it will delete the whole word.
4017 \begin_inset Quotes eld
4021 \begin_inset Quotes erd
4024 , which will be written in blue italics, like you expect in a formula.
4025 In the output, the expression will be correctly typeset.
4029 \begin_layout Standard
4030 The function list includes other trigonometric functions and their inverses,
4031 hyperbolic functions, logarithms, limits, and quite a few others.
4032 These functions can take subscripts and superscripts, important for typing
4034 \begin_inset Quotes eld
4038 \begin_inset Formula $\cos^{2}\theta$
4042 \begin_inset Quotes erd
4046 \begin_inset Quotes eld
4050 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4054 \begin_inset Quotes erd
4060 \begin_layout Labeling
4061 \labelwidthstring 00.00.0000
4067 \begin_inset space ~
4077 \begin_layout Subsection
4081 \begin_layout Standard
4082 Click on the matrix button
4085 arg "dialog-show mathmatrix"
4091 \begin_inset space ~
4097 A pop-up dialog allows you to choose how many rows and columns you want
4099 Choose 2 rows and 3 columns and hit
4105 prints 6 insertion points in a
4106 \begin_inset Formula $2\times3$
4110 As usual, you can put any sort of formula expression (a square root, another
4111 matrix, etc.) in each insertion point.
4112 You can also leave some of the insertion points empty if you want.
4115 \begin_layout Standard
4120 can be used to move horizontally between the columns of a matrix.
4121 Alternatively, you can use the arrow keys to move around - hitting
4125 at the end of one box will move to the next box,
4129 will move to the next row, etc.
4132 \begin_layout Standard
4133 If you need to change the number of rows and columns, use the menu
4135 Edit\SpecialChar menuseparator
4137 \begin_inset space \thinspace{}
4141 \begin_inset space \thinspace{}
4146 or the math toolbar buttons
4149 arg "tabular-feature append-row"
4155 arg "tabular-feature delete-row"
4161 arg "tabular-feature append-column"
4167 arg "tabular-feature delete-column"
4173 \begin_layout Standard
4178 for information on how to change the horizontal alignment of each column,
4179 and how to change the vertical position of the whole matrix.
4180 Note that if you want to write a table containing text, you should use
4182 's wonderful table support, rather than trying to write text in a matrix.
4185 \begin_layout Subsection
4189 \begin_layout Standard
4190 All of the expressions we have written so far have been on the same line
4191 as the text that came before and after them, otherwise known as inline
4193 This is fine for short, simple expressions, but if you want to write larger
4194 ones, or if you want your expressions to stand out from the text, you need
4195 to write them in display mode.
4196 In addition, only displayed expressions can be labeled and numbered (see
4201 ), and multi-line equations must be in display mode.
4204 \begin_layout Standard
4205 While being in a formula, click on the display button
4216 This centers the formula and adds a blank line before and after it.
4217 Now type in an expression and compile your file to see how it looks.
4218 The display button is actually a toggle; use it now to change a couple
4219 of your expressions to display mode and back.
4223 \begin_layout Standard
4224 Display mode has a couple differences from inline mode:
4227 \begin_layout Itemize
4228 The default font is larger for a few symbols, like
4229 \begin_inset Formula $\sum$
4233 \begin_inset Formula $\int$
4239 \begin_layout Itemize
4240 Subscripts and superscripts for limits and sums (but not integrals) are
4241 written under and over rather than next to the symbols
4244 \begin_layout Itemize
4248 \begin_layout Standard
4249 Other than these differences, though, displayed expressions and inline expressio
4250 ns are very similar.
4253 \begin_layout Standard
4254 One final note about the way displayed formulas are typeset: be careful
4255 about whether you are putting your equation into a new paragraph or not.
4256 If your formula is in the middle of a sentence or paragraph, then do not
4262 Doing so will cause the text
4266 the formula to start a new paragraph.
4267 That text will be indented or follow a blank line, depending on your document
4268 paragraph settings, which is probably not what you want.
4271 \begin_layout Labeling
4272 \labelwidthstring 00.00.0000
4277 : Put the various equations in
4281 into display mode, and see how they are typeset differently.
4284 \begin_layout Labeling
4285 \labelwidthstring 00.00.0000
4290 : Using various tools you have learned in this section, you should be able
4291 to write an equation like:
4295 \begin_layout Plain Layout
4296 After you have done it the hard way, give
4298 Insert\SpecialChar menuseparator
4299 Math\SpecialChar menuseparator
4301 \begin_inset space ~
4312 \begin_inset Formula
4314 f(x)=\left\{ \begin{array}{cc}
4317 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4326 \begin_layout Section
4330 \begin_layout Standard
4331 Now you are familiar with the basics.
4333 's math editor can do a lot more.
4334 You can refer to the
4338 manual for tips on how to:
4341 \begin_layout Itemize
4342 Label and number expressions.
4345 \begin_layout Itemize
4346 Create multi-line equations.
4349 \begin_layout Itemize
4350 Change typefaces, e.
4351 \begin_inset space \thinspace{}
4355 \begin_inset space \space{}
4358 to write bold-face text in an expression.
4361 \begin_layout Itemize
4362 Fine-tune font sizes and spacing within an expression.
4363 (Do not worry about this until your final draft!)
4366 \begin_layout Itemize
4368 These are very powerful, because you just define them once at the top of
4369 the document, and then you can use them throughout the document.
4372 \begin_layout Itemize
4373 Do almost all you can do with math.
4376 \begin_layout Chapter
4380 \begin_layout Section
4381 Other major \SpecialChar LyX
4385 \begin_layout Standard
4386 We have not gone through all the possible commands in \SpecialChar LyX
4387 , and we are not planning
4396 \begin_inset space ~
4401 manual for more information.
4402 We will just mention a couple more major things \SpecialChar LyX
4406 \begin_layout Itemize
4408 has WYSIWYM support for tables.
4411 Insert\SpecialChar menuseparator
4417 arg "tabular-insert"
4421 Click on the table with the
4428 \begin_inset space ~
4433 dialog box which allows extensive table editing.
4437 arg "toolbar-toggle table"
4440 the table toolbar will appear permanently.
4443 \begin_layout Itemize
4445 also supports including pictures in any format within documents.
4448 Insert\SpecialChar menuseparator
4454 arg "dialog-show-new-inset graphics"
4458 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4459 can have captions, and \SpecialChar LyX
4460 will automatically generate lists of figures and/or
4464 \begin_layout Itemize
4466 is heavily configurable.
4467 Everything from how the \SpecialChar LyX
4468 window looks to how the output comes out can be
4469 configured in a number of ways.
4470 Much configuration is done through
4472 Tools\SpecialChar menuseparator
4476 For more information on this, check out
4478 Help\SpecialChar menuseparator
4479 Customization\SpecialChar endofsentence
4483 \begin_layout Itemize
4485 is being developed by a team of programmers on five continents.
4486 Therefore, \SpecialChar LyX
4487 has better support for non-English languages (such as Dutch,
4488 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4489 ) than many word processors.
4490 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4491 languages Chinese Japanese, and Korean are supported.
4492 You can write documents in other languages and you can also configure \SpecialChar LyX
4494 to show its menus and error messages in other languages.
4498 \begin_layout Itemize
4499 The \SpecialChar LyX
4500 menus feature keybindings.
4501 This means that you can do
4503 File\SpecialChar menuseparator
4514 or by using the binding which is shown next to it in the menu (
4521 Keybindings are also configurable.
4522 For information on this, check out
4524 Help\SpecialChar menuseparator
4525 Customization\SpecialChar endofsentence
4529 \begin_layout Itemize
4531 can read \SpecialChar LaTeX
4534 \begin_inset space ~
4538 \begin_inset CommandInset ref
4540 reference "sec:tex2lyx"
4547 \begin_layout Itemize
4548 Spell-checking, thesaurus, and word count facilities are available.
4551 \begin_layout Itemize
4552 Generation of indexes and nomenclatures/glossaries is supported.
4555 \begin_layout Section
4557 for \SpecialChar LaTeX
4559 \begin_inset CommandInset label
4561 name "sec:latexusers"
4568 \begin_layout Standard
4569 If you do not know anything about \SpecialChar LaTeX
4570 , you do not have to read this section.
4571 Actually, you might want to
4575 about \SpecialChar LaTeX
4576 , and then read this chapter.
4577 However, some of those who begin to use \SpecialChar LyX
4578 will be familiar with \SpecialChar LaTeX
4580 If you are such a person, you may be wondering if \SpecialChar LyX
4581 can really do everything
4584 The short answer is that \SpecialChar LyX
4585 can do pretty much everything \SpecialChar LaTeX
4587 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4592 \begin_layout Standard
4593 Because this is just a tutorial, we are only going to mention things that
4594 new \SpecialChar LyX
4595 users will most likely be interested in.
4596 In the interests of keeping the Tutorial short, we will give only minimal
4601 \begin_inset space ~
4609 \begin_inset space ~
4614 manuals have a great deal of information on differences between \SpecialChar LyX
4615 and \SpecialChar LaTeX
4617 and how to do various \SpecialChar LaTeX
4618 tricks in \SpecialChar LyX
4622 \begin_layout Subsection
4627 \begin_layout Standard
4628 Anything that you enter in \SpecialChar TeX
4629 mode will be passed straight to \SpecialChar LaTeX
4631 displayed in red on the screen.
4632 You can use \SpecialChar TeX
4633 commands in \SpecialChar LyX
4636 Insert\SpecialChar menuseparator
4638 \begin_inset space ~
4650 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4654 \begin_layout Standard
4655 In a math formula, \SpecialChar TeX
4656 mode is handled a bit differently.
4658 mode is entered there by typing a backslash.
4659 The backslash is not written out, but anything you type afterwards will
4661 You exit \SpecialChar TeX
4666 or some other non-alphabetic character, like a number, underscore, caret
4668 Once you exit \SpecialChar TeX
4669 mode, if \SpecialChar LyX
4670 knows the \SpecialChar TeX
4671 command you have typed in, it will
4672 convert it to WYSIWYM\SpecialChar endofsentence
4674 \begin_inset Quotes eld
4684 \begin_inset Quotes erd
4687 in a formula and then press
4693 \begin_inset Quotes eld
4697 \begin_inset Quotes erd
4701 \begin_inset Quotes eld
4705 \begin_inset Formula $\gamma$
4709 \begin_inset Quotes erd
4713 This will work for almost all, non-complicated math macros.
4714 This may be faster than using the
4717 \begin_inset space ~
4722 , and will be especially convenient for experienced \SpecialChar LaTeX
4726 \begin_layout Standard
4727 As a special case, if you type
4728 \begin_inset Quotes eld
4738 \begin_inset Quotes erd
4741 in a formula, the beginning
4745 ending braces will be inserted in red while the cursor is placed between
4747 This makes it more convenient to type those commands that take an argument.
4750 \begin_layout Standard
4752 cannot do absolutely everything that \SpecialChar LaTeX
4754 Some fancy functions are not supported at all, while some work but are
4757 mode allows users to get the full flexibility of \SpecialChar LaTeX
4758 , while having all the
4759 convenient features of \SpecialChar LyX
4760 , like WYSIWYM math, tables, and editing.
4762 could never support every \SpecialChar LaTeX
4770 in the preamble (see Section
4771 \begin_inset space ~
4775 \begin_inset CommandInset ref
4777 reference "sec:preamble"
4781 ), you can use any package you want — although you will not have WYSIWYM
4782 support for that package's features.
4785 \begin_layout Subsection
4786 Importing \SpecialChar LaTeX
4792 \begin_inset CommandInset label
4801 \begin_layout Standard
4802 You can import a \SpecialChar LaTeX
4803 file into \SpecialChar LyX
4806 File\SpecialChar menuseparator
4807 Import\SpecialChar menuseparator
4809 \begin_inset space ~
4814 menu in \SpecialChar LyX
4816 This will call the program
4820 which will create a file foo.lyx from the file foo.tex.
4822 will then open that file.
4823 If the translation does not work, you can try calling
4827 from the command line, possibly using fancier options.
4830 \begin_layout Standard
4831 Even when the translation does work,
4835 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4837 It will leave things it does not understand in \SpecialChar TeX
4838 mode; so, after translating
4843 , you can look for the red text and manually edit it to get it right.
4846 \begin_layout Standard
4851 has its own documentation (manpage), which Unix/Linux users can access
4852 via the console command
4855 \begin_inset space ~
4861 The manpage describes which \SpecialChar LaTeX
4862 commands and environments are not supported,
4863 what bugs you might run into (and how to get around them), and how to use
4864 the various options.
4867 \begin_layout Standard
4868 It is important to understand that
4872 can only translate files whose document class is
4873 \begin_inset Quotes eld
4877 \begin_inset Quotes erd
4881 , that is, for which there is a corresponding \SpecialChar LyX
4887 If there is no layout file, then you will get an error saying that the
4888 conversion could not be performed.
4889 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4894 simply will not know how to translate the \SpecialChar LaTeX
4895 that it finds there into things
4898 More about layout files and how they are created is explained in detail
4906 \begin_layout Subsection
4907 Converting \SpecialChar LyX
4908 Documents to \SpecialChar LaTeX
4912 \begin_layout Standard
4913 You might wish to convert a \SpecialChar LyX
4914 Document to a \SpecialChar LaTeX
4916 For example, a co-worker or co-author who does not have \SpecialChar LyX
4921 File\SpecialChar menuseparator
4922 Export\SpecialChar menuseparator
4926 This will create a file
4934 file you are editing.
4937 \begin_layout Subsection
4942 \begin_layout Subsubsection
4946 \begin_layout Standard
4949 Document\SpecialChar menuseparator
4952 dialog takes care of the document-wide options, such as changing the document
4953 class, default font size and paper size.
4954 Document class options and also options for \SpecialChar LaTeX
4955 packages can be entered there
4959 \begin_inset space ~
4967 \begin_layout Subsubsection
4968 Other Preamble Matter
4969 \begin_inset CommandInset label
4978 \begin_layout Standard
4979 If you have special commands to put in the preamble of a \SpecialChar LaTeX
4981 use them in a \SpecialChar LyX
4985 Document\SpecialChar menuseparator
4986 Settings\SpecialChar menuseparator
4988 \begin_inset space ~
4993 and type in the dialog window (or from the document settings dialog, depending
4995 Anything you type will (as with \SpecialChar TeX
4996 mode) be sent directly to \SpecialChar LaTeX
5000 \begin_layout Subsection
5005 \begin_layout Standard
5007 has support for Bib\SpecialChar TeX
5008 , which allows you to build databases of bibliographical
5009 references to be used in multiple documents.
5012 Insert\SpecialChar menuseparator
5014 \begin_inset space \thinspace{}
5018 \begin_inset space \thinspace{}
5021 TOC\SpecialChar menuseparator
5023 \begin_inset space ~
5038 field you load Bib\SpecialChar TeX
5043 field you can load Bib\SpecialChar TeX
5047 \begin_layout Standard
5048 After you have done this, you can use citations from any bibliographies
5049 you have included with
5051 Insert\SpecialChar menuseparator
5055 \begin_inset space ~
5059 \begin_inset CommandInset ref
5061 reference "sec:bibliographies"
5070 dialog will show a list of all the references in your
5078 \begin_layout Section
5082 \begin_layout Standard
5083 Sometimes when you try to view a document, there will be errors, things
5084 that \SpecialChar LyX
5085 or \SpecialChar LaTeX
5087 When this happens, \SpecialChar LyX
5092 \begin_inset space ~
5098 Clicking on individual errors in this dialog will take you to the place
5099 in the \SpecialChar LyX
5100 document where the error occurs and also display the detailed \SpecialChar LaTeX