1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
8 \use_default_options false
12 \maintain_unincluded_children false
14 \language_package default
17 \font_roman "palatino" "default"
18 \font_sans "helvet" "default"
19 \font_typewriter "courier" "default"
20 \font_math "auto" "auto"
21 \font_default_family default
22 \use_non_tex_fonts false
25 \font_sf_scale 100 100
26 \font_tt_scale 100 100
28 \default_output_format pdf2
30 \bibtex_command default
31 \index_command default
35 \pdf_title "The LyX Tutorial"
36 \pdf_author "LyX Team"
37 \pdf_subject "LyX-documentation Tutorial"
38 \pdf_keywords "LyX, documentation"
40 \pdf_bookmarksnumbered true
41 \pdf_bookmarksopen true
42 \pdf_bookmarksopenlevel 1
47 \pdf_pdfusetitle false
48 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
51 \use_package amsmath 0
52 \use_package amssymb 0
55 \use_package mathdots 1
56 \use_package mathtools 0
58 \use_package stackrel 0
59 \use_package stmaryrd 0
60 \use_package undertilde 0
62 \cite_engine_type default
66 \paperorientation portrait
76 \paragraph_separation indent
77 \paragraph_indentation default
78 \quotes_language english
81 \paperpagestyle headings
82 \tracking_changes false
97 by the \SpecialChar LyX
102 \begin_layout Plain Layout
104 If you have comments on or corrections to this documentation, please send
105 them to the \SpecialChar LyX
106 Documentation mailing list:
107 \begin_inset CommandInset href
109 target "lyx-docs@lists.lyx.org"
122 \begin_layout Standard
123 \begin_inset CommandInset toc
124 LatexCommand tableofcontents
131 \begin_layout Chapter
135 \begin_layout Section
136 Welcome to \SpecialChar LyX
140 \begin_layout Standard
141 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
144 Now, do not panic – you will not need to learn \SpecialChar LaTeX
145 to use \SpecialChar LyX
147 That is, after all, the whole point of \SpecialChar LyX
148 : to provide an almost-WYSIWYG interface
149 to \SpecialChar LaTeX
151 There are some things you will need to learn, however, in order to use
156 \begin_layout Standard
157 Some of you probably found your way to this document because you tried to
158 put two spaces after a
159 \begin_inset Quotes eld
163 \begin_inset Quotes erd
166 or tried to put three blank lines between paragraphs.
167 You found out you could not and, in fact, you will find out that most of
168 the little tricks you are accustomed to use in word processors will not
169 work in \SpecialChar LyX
171 That is because most word processors you have used before allow you manually
172 to enter all spacings, font changes, and so on.
173 So you end up not only writing a document but typesetting it, too.
175 does the typesetting for you, in a consistent fashion, letting you focus
176 on the important things, like the content of your writing.
179 \begin_layout Standard
180 So read on to learn more about \SpecialChar LyX
182 Reading this tutorial is definitely worth the time.
185 \begin_layout Section
195 \begin_layout Standard
196 Before we get started with this section, you need to know that this
200 uses the notation outlined in the
205 If you came to this manual first, please read the
209 before you continue with the
216 \begin_layout Standard
217 Now that you know which fonts mean what in the documentation, we want to
218 talk a bit about what this
225 \begin_layout Subsection
226 Getting the most out of the Tutorial
229 \begin_layout Standard
230 This tutorial consists of examples and exercises.
231 To get the most out of this document, you should read through it, typing
232 all the little things we are telling you to type and trying out all of
233 the exercises to see if you get them right.
234 For convenience, you might want to print out the PDF version of this document.
237 \begin_layout Standard
238 If you are familiar with \SpecialChar LaTeX
239 , you will probably be able to read the
243 somewhat faster, since many \SpecialChar LyX
244 ideas are just \SpecialChar LaTeX
246 However, \SpecialChar LyX
247 has features you will want to learn about.
248 Even if you do not feel like reading the rest of the
252 , you should definitely check out Section
257 \begin_inset CommandInset ref
259 reference "sec:latexusers"
263 , which is specifically written for experienced \SpecialChar LaTeX
267 \begin_layout Subsection
275 \begin_layout Itemize
276 Detailed explanations of all of \SpecialChar LyX
278 \begin_inset Separator latexpar
285 \begin_layout Standard
294 \begin_layout Itemize
295 Detailed explanations of \SpecialChar LaTeX
297 \begin_inset Separator latexpar
304 \begin_layout Standard
306 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
309 can have a look at the
321 \begin_layout Standard
322 It is time to move on, time for your first document \SpecialChar ldots
326 \begin_layout Chapter
327 Getting started with \SpecialChar LyX
331 \begin_layout Section
332 Your first \SpecialChar LyX
336 \begin_layout Standard
337 OK\SpecialChar endofsentence
338 You are ready to start writing.
339 Before you do, there are a few things we need to mention, which will hopefully
340 make the Tutorial more instructive and useful.
344 \begin_layout Standard
345 Because there is information we cannot give you in the Tutorial, the
351 thing that you need to do is find the
358 Start up \SpecialChar LyX
368 You may want to load the
372 as well (if you are not reading it within \SpecialChar LyX
374 This way, you can read them while you are writing your own file.
378 \begin_layout Plain Layout
379 They can also serve as good examples of how to use the many features of
386 Note that once you have got more than one document open, you can use the
391 menu or the document tabs to switch between them.
394 \begin_layout Standard
395 In this Tutorial, we are going to assume that you have a fully working version
397 , as well as a \SpecialChar LaTeX
398 -distribution and a PDF-viewer.
399 This should be the case on all major Linux- and BSD-distributions, as well
400 as on Windows, where this is setup by the \SpecialChar LyX
404 \begin_layout Standard
405 Finally, we have written a file called
409 to let you practice your \SpecialChar LyX
411 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
414 As you learn new \SpecialChar LyX
415 functions, we will suggest that you fix those parts of
421 It also contains `subtle' hints about how to fix things.
425 \begin_layout Plain Layout
426 The hints are located in yellow
427 \begin_inset Quotes eld
431 \begin_inset Quotes erd
435 Access the text in a note by clicking on it.
440 If you want to cheat, or check what you have done, there is also a file
442 \begin_inset Newline newline
449 which contains the same text written and typeset by a \SpecialChar LyX
453 \begin_layout Standard
454 The example files can be found in the
458 directory of \SpecialChar LyX
459 's installation folder.
466 File\SpecialChar menuseparator
473 to save a copy in your own directory for you to work on.
474 As you fix parts of the raw document, check to see how those changes affect
478 \begin_layout Standard
483 directory contains lots of other examples files.
484 They will show you how to do various fancy things with \SpecialChar LyX
486 After you have read the Tutorial, or when you are confused about how to
487 do something fancy in \SpecialChar LyX
488 , take a look at these files.
491 \begin_layout Subsection
492 Typing, Viewing, and Exporting
495 \begin_layout Itemize
498 File\SpecialChar menuseparator
502 \begin_layout Itemize
503 Type a sentence like:
505 This is my first \SpecialChar LyX
509 \begin_layout Itemize
510 Save your document with
512 File\SpecialChar menuseparator
517 As\SpecialChar endofsentence
521 \begin_layout Itemize
522 Create a PDF file, with
524 Document\SpecialChar menuseparator
527 or the toolbar button
535 will open a PDF-viewer program displaying your document as it will look
539 \begin_layout Itemize
540 Export the ready to print document with
542 File\SpecialChar menuseparator
550 \begin_layout Standard
551 Congratulations! You have written your first \SpecialChar LyX
553 All of the rest is just details.
554 \begin_inset Newline newline
560 \begin_layout Standard
565 You can save time by leaving the PDF viewer running in the background.
566 Under MacOS and Linux you can use
568 Document\SpecialChar menuseparator
571 or the toolbar button
577 and just click on the PDF viewer window afterwards.
578 Under Windows still use
580 Document\SpecialChar menuseparator
592 \begin_layout Standard
597 In case you are using a high-resolution display, the LyX toolbar icons
599 To change their size, right-click into a toolbar.
602 \begin_layout Subsection
606 \begin_layout Standard
608 can of course do most of the things you are used to doing with a word processor.
609 It will word-wrap and indent paragraphs automatically.
610 Here is a quick description of how to do some simple actions.
613 \begin_layout Description
614 Undo \SpecialChar LyX
615 has multiple levels of undo, which means you can undo everything you
616 have done since your current editing session started, by selecting
618 Edit\SpecialChar menuseparator
627 ) over and over again.
628 If you undo too much, just select
630 Edit\SpecialChar menuseparator
640 \begin_inset Separator latexpar
647 \begin_layout Standard
648 Currently, undo is limited to 100 steps.
652 \begin_layout Description
655 Edit\SpecialChar menuseparator
666 Edit\SpecialChar menuseparator
677 Edit\SpecialChar menuseparator
686 ) to cut, copy, and paste.
687 Or automatically paste selected text (including selections from other programs)
695 \begin_layout Description
698 Edit\SpecialChar menuseparator
712 arg "dialog-show findreplace"
716 In the dialog, search with the
728 button to replace a word you have found.
732 \begin_layout Plain Layout
733 Close the window when you are done or leave it open if you find it more
735 Most dialog boxes in \SpecialChar LyX
736 can operate like this.
737 Just be sure you have the right window in focus when you are trying to
738 type in the main \SpecialChar LyX
739 window or a \SpecialChar LyX
745 If you like, you can specify whether to make the search case-sensitive,
746 or to search for only complete words; you can also search backwards through
750 \begin_layout Description
765 , which will by default print characters in italics), set it in
775 , usually small caps, used for people's names), or use your own formatting
778 Edit\SpecialChar menuseparator
783 Style\SpecialChar menuseparator
786 dialog (toolbar button
789 arg "dialog-show character"
795 \begin_layout Description
796 Toolbar Other buttons on the toolbar allow you to do some of the more popular
824 \begin_layout Standard
825 Of course, you have not yet written enough to make most of these functions
827 As you write more, though, try undoing, pasting, etc.
830 \begin_layout Subsection
831 WYSIWYM: Whitespace in \SpecialChar LyX
835 \begin_layout Standard
836 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
839 As many times as you hit
843 , you will only get one blank line.
844 As many times as you hit
848 , you will only get one space.
849 On a blank line, \SpecialChar LyX
850 will not let you type even one space.
855 key will not move you forward one tab stop; in fact there
859 no tab stops! There is no ruler at the top of the page to let you set tabs
863 \begin_layout Standard
864 Many word processors are based on the WYSIWYG principle:
865 \begin_inset Quotes eld
868 What You See Is What You Get.
869 \begin_inset Quotes erd
873 , on the other hand, is based on the principle that
874 \begin_inset Quotes eld
877 What You See Is What You
882 \begin_inset Quotes erd
885 You type what you mean and \SpecialChar LyX
886 will take care of typesetting it for you so
887 that the output looks nice.
892 grammatically separates paragraphs and a
896 grammatically separates words; so there is no reason to have several of
901 has no grammatical function at all – so \SpecialChar LyX
903 Using \SpecialChar LyX
904 , you will spend more of your time worrying about the
908 of your document and less time worrying about the
917 for more information on the WYSIWYM concept.
920 \begin_layout Standard
922 does have (many) ways to fine-tune the formatting of your document.
923 After all, \SpecialChar LyX
933 has information about all that.
934 It includes horizontal fills and vertical space — which are more powerful
935 and versatile than multiple spaces or blank lines — and ways to change
936 font sizes, character styles, and paragraph alignments by hand.
937 The idea, though, is that you can write your whole document, focusing on
938 content, and just worry about that fine-tuning at the end.
939 With standard word processors, you will be distracted by document formatting
940 throughout the writing process.
943 \begin_layout Section
947 \begin_layout Standard
948 Different parts of a document have different purposes; we call these parts
954 Most of a document is made up of regular text.
955 Section titles (chapter, subsection, etc.) let the reader know that a new
956 topic or subtopic will be discussed.
957 Certain types of documents have special environments.
958 A journal article will have an abstract and a title.
959 A letter will have neither of these, but will probably have an environment
960 that gives the writer's address.
963 \begin_layout Standard
964 Environments are a major part of the
965 \begin_inset Quotes eld
968 What You See Is What You Mean
969 \begin_inset Quotes erd
972 philosophy of \SpecialChar LyX
974 A given environment may require a certain font style, font size, indenting,
975 line spacing, and more.
976 This problem is aggravated, because the exact formatting for a given environmen
977 t may change: one journal may use boldface, 18 point, centered type for
978 section titles while another uses italicized, 15 point, left justified
979 type; different languages may have different standards for indenting; and
980 bibliography formats can vary widely.
982 lets you avoid learning all the different formatting styles.
985 \begin_layout Standard
990 choice box is located on the left end of the toolbar and looks like this:
992 \begin_inset Graphics
993 filename clipart/ToolbarEnvBox.png
1000 It indicates in which environment you are currently writing.
1001 While you were writing your first document, it said
1002 \begin_inset Quotes eld
1006 \begin_inset Quotes erd
1009 which is the default environment for text.
1010 Now you will put a number of environments in your new document so that
1011 you can see how they work.
1014 \begin_layout Subsection
1015 Sections and Subsections
1018 \begin_layout Standard
1023 on the first line of your new \SpecialChar LyX
1036 \begin_layout Plain Layout
1042 If nothing is selected, \SpecialChar LyX
1043 changes the paragraph you are currently in to
1044 the selected environment.
1045 Alternatively, you can change several paragraphs to a different environment
1046 by selecting them before picking an environment.
1063 , which will be covered below.
1066 \begin_inset Quotes eld
1070 \begin_inset Quotes erd
1073 and typesets the section heading (title) in a larger font.
1078 \SpecialChar endofsentence
1084 \begin_inset Quotes eld
1088 \begin_inset Quotes erd
1092 \begin_inset Quotes eld
1096 \begin_inset Quotes erd
1100 Section headings, like most environments, are assumed to end when you type
1105 \SpecialChar endofsentence
1106 Type the document introduction:
1109 \begin_layout LyX-Code
1110 This is an introduction to my first \SpecialChar LyX
1114 \begin_layout Standard
1130 \begin_inset Quotes eld
1134 \begin_inset Quotes erd
1137 and waits for you to type a title.
1139 \begin_inset Quotes eld
1145 \begin_inset space ~
1151 \begin_inset Quotes erd
1154 , and you will see that \SpecialChar LyX
1155 again sets it as a section title.
1158 \begin_layout Standard
1160 Go to the end of Section
1161 \begin_inset space ~
1165 \begin_inset Quotes eld
1168 my first \SpecialChar LyX
1170 \begin_inset Quotes erd
1186 Again, \SpecialChar LyX
1188 \begin_inset Quotes eld
1192 \begin_inset Quotes erd
1195 and waits for you to type a title.
1202 \begin_inset space ~
1206 \begin_inset Quotes eld
1210 \begin_inset Quotes erd
1214 \begin_inset space ~
1217 2, has been automatically renumbered to Section
1218 \begin_inset space ~
1221 3! In true WYSIWYM fashion, you just need to identify the text that makes
1222 up the section titles, and \SpecialChar LyX
1223 takes care of numbering the sections and typesettin
1227 \begin_layout Standard
1236 environment, and type the following five lines:
1239 \begin_layout LyX-Code
1240 Sections and subsections are described below.
1243 \begin_layout LyX-Code
1247 \begin_layout LyX-Code
1248 Sections are bigger than subsections.
1251 \begin_layout LyX-Code
1252 Subsection description
1255 \begin_layout LyX-Code
1256 Subsections are smaller than sections.
1259 \begin_layout Standard
1260 Click on the second line and select
1270 numbers the subsection
1271 \begin_inset Quotes eld
1275 \begin_inset Quotes erd
1278 , and typesets it in a font which is bigger than regular text but smaller
1279 than the section title.
1280 Change the fourth line to the
1284 environment as well.
1285 As you probably expected, \SpecialChar LyX
1286 automatically numbered the section
1287 \begin_inset Quotes eld
1291 \begin_inset Quotes erd
1295 If you put yet another section before Section
1296 \begin_inset space ~
1300 \begin_inset space ~
1303 2 will be renumbered as Section 3, and the subsections will be renumbered
1305 \begin_inset Quotes eld
1309 \begin_inset Quotes erd
1313 \begin_inset Quotes eld
1317 \begin_inset Quotes erd
1323 \begin_layout Standard
1324 Further levels of sectioning include
1337 We will let you play with these on your own.
1338 You may notice that paragraph and subparagraph headings are not numbered
1339 by default, and that subparagraphs are indented; see the
1343 for an explanation and how to change this.
1348 headings are actually the highest level of sectioning, above
1352 s, but you are only allowed to use them in certain types (text classes)
1354 documents (see Section
1355 \begin_inset space ~
1359 \begin_inset CommandInset ref
1361 reference "sec:Document-Classes"
1368 \begin_layout Standard
1369 Finally, you may want to have sections or subsections that are not numbered.
1370 There are environments for this as well.
1371 If you change one of your section headings to the
1375 environment (you may have to scroll down in the
1379 box to find it), \SpecialChar LyX
1380 will use the same font size for the heading as it uses
1381 for a regular section, but it will not number that section.
1382 There are corresponding
1383 \begin_inset Quotes eld
1387 \begin_inset Quotes erd
1390 heading environments for
1399 Try changing some of your sections or subsections to the starred environments,
1400 and note how the other section numbers are updated.
1403 \begin_layout Labeling
1404 \labelwidthstring 00.00.0000
1409 : Fix the section and subsection headings in
1410 \begin_inset Newline newline
1421 \begin_layout Subsection
1425 \begin_layout Standard
1427 has several different environments for typesetting lists.
1428 The various list environments free you from hitting
1432 a million times when writing an outline, or from renumbering a whole list
1433 when you want to add a point in the middle of the list.
1434 Different types of documents logically require different list environments:
1437 \begin_layout Itemize
1438 A slide presentation might use the
1442 environment's bulleted lists to describe different points.
1445 \begin_layout Itemize
1446 An outline would use the
1450 environment's numbered lists (and lettered sublists).
1453 \begin_layout Itemize
1454 A document describing several software packages could use the
1458 environment, where each item in the list begins with a bold-faced word.
1461 \begin_layout Itemize
1470 ) environment is a variation on the
1477 \begin_layout Standard
1478 Let us write a list of reasons why \SpecialChar LyX
1479 is better than other word processors.
1480 Somewhere in your document, type:
1483 \begin_layout Standard
1487 is better than other word processors because:
1490 \begin_layout Standard
1507 arg "layout Itemize"
1513 \begin_inset Quotes eld
1517 \begin_inset Quotes erd
1521 Type in your reasons:
1524 \begin_layout LyX-Code
1525 Typesetting is done for you.
1528 \begin_layout LyX-Code
1532 \begin_layout LyX-Code
1533 Lists are very easy to create!
1536 \begin_layout Standard
1537 List environments, unlike headings, do not end when you type
1542 Instead, \SpecialChar LyX
1543 assumes you are going on to the next item in the list.
1544 The above will therefore result in a three-item list.
1545 If you want more than one paragraph within one list
1549 , one way is to use the
1552 \begin_inset space ~
1557 , which you get by typing
1562 In order to get out of the list, you need to reselect the
1566 environment (or just use the key binding
1569 arg "layout Standard"
1575 \begin_layout Standard
1576 You now have a beautiful itemized list.
1577 You might want to run \SpecialChar LaTeX
1578 to see how the list looks when printed out.
1579 But what if you wanted to number the reasons? Well, just select the whole
1584 \begin_layout Plain Layout
1586 will not let you select the first bullet (or the actual number in a numbered
1587 section title) unless you also select the paragraph
1591 it, which you probably do not want to do.
1592 This is on purpose because the bullet or number depends on the document
1593 settings or text position, respectively.
1609 arg "layout Enumerate"
1613 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1614 will fix the numbering.
1617 \begin_layout Standard
1618 While the list is still selected, you can change to the other two list environme
1626 \begin_inset space \thinspace{}
1632 \begin_inset space \thinspace{}
1642 arg "layout Description"
1651 ), in order to see what they look like.
1652 For those two environments, each list item is made up of a term, which
1653 is the item's first word, followed by a definition, which is the rest of
1654 the paragraph (until you hit
1659 The term is either typeset in boldface (
1664 \begin_inset Quotes eld
1668 \begin_inset Quotes erd
1675 \begin_layout Plain Layout
1676 But a typesetter's tab, which will change to fit the size of the largest
1677 term, not a pathetic, rigid, unchangeable typewriter
1690 ) from the rest of the paragraph.
1691 If you want to have more than one word in the definition, then separate
1695 \begin_inset space ~
1703 \begin_layout Labeling
1704 \labelwidthstring 00.00.0000
1709 : Typeset the list in
1714 \begin_layout Standard
1715 You can nest lists within each other in all sorts of interesting ways.
1716 An obvious example would be writing outlines.
1717 Numbered and bulleted lists will have different numbering and bulleting
1718 schemes for sublists.
1723 for details on the different sorts of lists and for examples of nestings.
1726 \begin_layout Subsection
1727 Other environments: Verses, Quotations, and more
1730 \begin_layout Standard
1731 There are two environments for setting quotations apart from surrounding
1736 for short quotes and
1750 \begin_layout Plain Layout
1751 used in this Tutorial for the long typing examples
1760 font; this environment is the only place in \SpecialChar LyX
1761 where you are allowed to use
1762 multiple spaces to allow code indenting.
1763 You can even write poetry using the
1771 to separate stanzas, and
1775 to separate lines within a stanza.
1780 for more complete descriptions of all of the available \SpecialChar LyX
1784 \begin_layout Labeling
1785 \labelwidthstring 00.00.0000
1790 : Correctly typeset the
1792 Quote, \SpecialChar LyX
1800 \begin_inset Newline newline
1808 \begin_layout Chapter
1812 \begin_layout Standard
1813 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1815 It introduced you to the basic editing operations in \SpecialChar LyX
1816 , as well as the powerful
1817 method of writing with environments.
1818 Most people who use \SpecialChar LyX
1819 , though, will want to write documents: papers, articles,
1820 books, manuals, or letters.
1821 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1823 a complete document.
1824 It will introduce you to text classes, which allow you to write different
1826 It will then describe many of the additions that turn text into a document,
1827 such as titles, footnotes, cross references, bibliographies, and tables
1831 \begin_layout Section
1833 \begin_inset CommandInset label
1835 name "sec:Document-Classes"
1842 \begin_layout Standard
1843 Different sorts of documents should be typeset differently.
1844 For example, books are generally printed double-sided, while articles are
1846 In addition, many documents contain special environments: letters contain
1847 some environments — such as the sender's address and the signature — which
1848 do not make sense in a book or article.
1849 The \SpecialChar LyX
1858 \begin_layout Plain Layout
1859 for \SpecialChar LaTeX
1860 users: this is equivalent to the \SpecialChar LaTeX
1866 takes care of these large scale differences between different sorts of
1868 This Tutorial, for example, was written in the
1873 Document classes are another major part of the WYSIWYM philosophy; they
1874 tell \SpecialChar LyX
1875 how to typeset the document, so you do not need to know how.
1878 \begin_layout Standard
1879 Your document is probably being written in the
1887 \begin_layout Plain Layout
1888 That is usually the default document class
1893 Try changing to other document classes (using the
1895 Document\SpecialChar menuseparator
1898 dialog) to see how they are typeset differently.
1899 If you change your document to the
1903 document class and look at the
1907 box, you will see that most of the allowed environments are the same.
1908 However, you can now use the
1913 If you are ever unsure about which environments you can use in a given
1914 document class, just consult the
1921 \begin_layout Standard
1922 Font sizes, one- or two-column printing, and page headings are just some
1923 of the ways journals' typesettings differ from one another.
1924 As the Computer Age continues to mature, journals have begun accepting
1925 electronic submissions, creating \SpecialChar LaTeX
1927 \begin_inset Quotes eld
1931 \begin_inset Quotes erd
1934 so that authors can submit correctly typeset articles.
1936 is set up to support this as well.
1937 For example, \SpecialChar LyX
1938 supports typesetting (and extra environments) for the American
1939 Mathematics Society journals using the
1942 \begin_inset space ~
1950 \begin_layout Standard
1951 Here is a very quick reference to some of the document classes.
1954 Special Document Classes
1960 manual for many more details.
1961 \begin_inset Separator latexpar
1967 \begin_layout Standard
1969 \begin_inset Tabular
1970 <lyxtabular version="3" rows="7" columns="2">
1971 <features tabularvalignment="middle">
1972 <column alignment="center" valignment="top" width="0pt">
1973 <column alignment="center" valignment="top" width="0pt">
1975 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1978 \begin_layout Plain Layout
1984 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1987 \begin_layout Plain Layout
1995 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1998 \begin_layout Plain Layout
2004 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2007 \begin_layout Plain Layout
2008 one-sided, no chapters
2015 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2018 \begin_layout Plain Layout
2024 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2027 \begin_layout Plain Layout
2028 layout & environments for American Math Society
2035 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2038 \begin_layout Plain Layout
2044 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2047 \begin_layout Plain Layout
2048 longer than article, two-sided
2055 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2058 \begin_layout Plain Layout
2064 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2067 \begin_layout Plain Layout
2068 report + front and back matter
2075 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2078 \begin_layout Plain Layout
2084 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2087 \begin_layout Plain Layout
2095 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2098 \begin_layout Plain Layout
2104 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2107 \begin_layout Plain Layout
2108 lots of extra environments for address, signature\SpecialChar ldots
2122 \begin_layout Section
2123 Templates: Writing a Letter
2126 \begin_layout Standard
2127 One way to write a letter would be to open a new file, and choose a
2133 Document\SpecialChar menuseparator
2137 While this is the most obvious way to write a letter, it seems like extra
2139 Every time you write a business letter, you want to have your address,
2140 the address to which you are sending it, a body, a signature, etc.
2146 for letters, which contains a sample letter; once you have a template,
2147 you can just replace a couple of parts of the letter with your text each
2148 time you write a letter.
2151 \begin_layout Standard
2152 Open a new file with
2154 File\SpecialChar menuseparator
2156 \begin_inset space ~
2160 \begin_inset space ~
2171 Save and print the file to see how the various environments are typeset.
2174 \begin_layout Standard
2175 When you look at the
2179 box, you will see several environments, like the
2182 \begin_inset space ~
2187 environment, that do not exist in most other document classes.
2193 You can play around for a while to figure out how the various environments
2195 You will notice for example that the
2199 environment has the word
2200 \begin_inset Quotes eld
2204 \begin_inset Quotes erd
2207 in red before the actual text of the signature.
2208 This word does not show up in the actual letter, as you will see if you
2209 view/export the file.
2210 It is just there to let you know where the signature goes.
2211 Also, note that it does not matter where in the file the
2216 Remember, \SpecialChar LyX
2217 is WYSIWYM; you can put the
2221 environment anywhere you want, but \SpecialChar LyX
2222 knows that in the printout, the signature
2223 should be at the end.
2226 \begin_layout Standard
2227 A template is just a regular \SpecialChar LyX
2229 This means you can fill in your address and signature and save the file
2231 From now on, any time you want to write a letter, you can use the new template
2233 We do not have to suggest an actual
2234 \begin_inset Quotes eld
2238 \begin_inset Quotes erd
2241 here; just write a letter to someone!
2245 \begin_layout Plain Layout
2246 One warning, if you are writing from a template.
2247 If you erase all of the text in an environment — for example, if you erase
2251 \begin_inset space ~
2256 field so that you can replace it with your own — and then you move the
2257 cursor without writing any text, the environment may disappear.
2258 This is because most environments cannot exist without any text in them.
2259 Just reselect the environment from the
2271 \begin_layout Standard
2272 Templates can be a huge time-saver, and we urge you to use them whenever
2274 In addition, they can help a person learn how to use some of the fancier
2276 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2278 of less computer-aware users.
2279 When they are first learning \SpecialChar LyX
2280 , it will be less intimidating if they have
2281 a letter template customized for their company, for example.
2284 \begin_layout Standard
2285 \begin_inset Newpage newpage
2291 \begin_layout Section
2295 \begin_layout Standard
2297 (like \SpecialChar LaTeX
2298 ) considers the title — which may contain the actual title, the author,
2299 the date, and even an abstract of a paper — to be a separate part of the
2303 \begin_layout Standard
2304 Go back to your first \SpecialChar LyX
2305 document and make sure it is using the
2313 \begin_layout Plain Layout
2314 You should not be using the letter any more, since the
2318 document class does not allow titles.
2323 Type a title on the first line, and change the line to the
2328 On the next line, type your name and change it to the
2333 On the next line, write the date in the
2338 Type a paragraph or two summarizing your document using the
2343 Notice how the title is presented when it is printed out.
2344 If you change the document format to Book, you will get a separate title
2345 page, like the first page of this tutorial.
2348 \begin_layout Labeling
2349 \labelwidthstring 00.00.0000
2354 : Fix the title, date, and author in
2359 \begin_layout Section
2360 Labels and Cross-References
2363 \begin_layout Standard
2364 You can label section headings, list items, formulas, footnotes, and floats
2368 \begin_layout Plain Layout
2369 Floats are explained in the
2383 Once you do so, you can refer to the element in other parts of the document,
2384 using cross-references.
2385 You can refer to a section's number, to the page on which the section begins
2387 As with section numbering, \SpecialChar LyX
2388 also takes care of cross-reference numbering
2390 Automatic management of labels and cross-references is among the most significa
2391 nt advantages of \SpecialChar LyX
2392 (and \SpecialChar LaTeX
2393 ) over conventional word processors.
2396 \begin_layout Subsection
2400 \begin_layout Standard
2401 Go to our second section, whose title is
2402 \begin_inset Quotes eld
2406 \begin_inset Quotes erd
2410 Click at the end of the section title line, and select
2412 Insert\SpecialChar menuseparator
2415 or the toolbar button
2422 A dialog asks you for a label name, and gives you a suggestion.
2427 , the label name will be placed in a box next to the section title.
2430 \begin_layout Standard
2431 So far you have not done anything — the output will look exactly the same,
2432 since labels do not show up in the printed document.
2433 However, now that you have added a label, you can refer to that label with
2435 We will do that next.
2438 \begin_layout Subsection
2439 Your first cross-reference
2442 \begin_layout Standard
2443 Place the cursor somewhere in Section
2444 \begin_inset space ~
2451 \begin_layout LyX-Code
2452 If you want to know more about this document,
2453 \begin_inset Newline newline
2459 \begin_layout Standard
2460 Now, with the cursor before the final period, select
2462 Insert\SpecialChar menuseparator
2464 \begin_inset space ~
2469 or the toolbar button
2472 arg "dialog-show-new-inset ref"
2476 The Cross-reference dialog pops up.
2477 It shows a list of the possible labels you can reference.
2478 At the moment, there should be only one,
2479 \begin_inset Quotes eld
2482 sec:About-This-Document
2483 \begin_inset Quotes erd
2487 First, select the drop-down menu labeled
2488 \begin_inset Quotes eld
2492 \begin_inset Quotes erd
2496 \begin_inset Quotes eld
2499 <reference> on page <page>
2500 \begin_inset Quotes erd
2505 \begin_inset Quotes eld
2508 sec:About-This-Document
2509 \begin_inset Quotes erd
2512 (it may be selected by default), and a reference marker will appear containing
2514 \begin_inset Quotes eld
2517 Ref+Text: sec:About-This-Document
2518 \begin_inset Quotes erd
2521 (To be really correct, you should put a
2524 \begin_inset space ~
2532 arg "command-alternatives math-space ; space-insert protected"
2535 ) in between the word
2536 \begin_inset Quotes eld
2540 \begin_inset Quotes erd
2543 and the reference.) An alternative way to reference a label is to right-click
2544 the label and select
2548 in the pop-up context menu.
2549 The cross-reference to this label is now in the clipboard and can be copied
2550 to the actual cursor position via the menu
2552 Edit\SpecialChar menuseparator
2562 In the printed document, this reference marker will be replaced with the
2563 section number and then the page number.
2564 Preview your document and you will see that \SpecialChar LaTeX
2565 has been even cleverer than
2568 \begin_inset Quotes eld
2572 \begin_inset Quotes erd
2575 and depending how much text you have between the start of Section
2576 \begin_inset space ~
2579 2 and this cross-reference you may see
2580 \begin_inset Quotes eld
2584 \begin_inset Quotes erd
2588 \begin_inset Quotes eld
2591 on the previous page
2592 \begin_inset Quotes erd
2596 \begin_inset Quotes eld
2600 \begin_inset Quotes erd
2607 is the page number).
2610 \begin_layout Standard
2611 Conveniently, a cross-reference acts as a hyperlink when you are editing
2612 a document in \SpecialChar LyX
2613 ; clicking on it will pop up the
2620 \begin_inset space ~
2624 \begin_inset space ~
2629 will move the cursor to the referenced label.
2632 \begin_layout Subsection
2633 More fun with labels
2636 \begin_layout Standard
2637 We told you that \SpecialChar LyX
2638 takes care of numbering cross-references; now you can
2640 Add a new section before Section
2641 \begin_inset space ~
2645 Update the preview, and — voilà! — the section cross-reference changed
2647 \begin_inset Quotes eld
2651 \begin_inset Quotes erd
2654 ! Change the section
2655 \begin_inset Quotes eld
2659 \begin_inset Quotes erd
2662 to a subsection, and the cross-reference will reference Subsection
2663 \begin_inset space ~
2666 2.1 instead of Section
2667 \begin_inset space ~
2671 The page reference will not change unless you add a whole page of text
2672 before the label, of course.
2676 \begin_layout Standard
2677 If you want some more practice with labels, then try putting a new label
2678 where your first cross-reference was, and refer to that label from elsewhere
2680 If you will be inserting cross-references often, it may be convenient to
2688 \begin_layout Standard
2689 If you want to confirm that the cross-referencing gets the pages right even
2690 for larger documents,
2694 a couple pages of text from the
2698 to the clipboard, and
2702 them into your document.
2706 \begin_layout Plain Layout
2707 By the way, copying a chapter title may cause an error, because chapters
2708 are not allowed in the article class, see Section
2709 \begin_inset space ~
2713 \begin_inset CommandInset ref
2715 reference "sec:Document-Classes"
2720 If this happens, just delete the chapter title.
2728 \begin_layout Labeling
2729 \labelwidthstring 00.00.0000
2734 : Fix the references in
2739 \begin_layout Section
2740 Footnotes and Margin Notes
2743 \begin_layout Standard
2744 Footnotes can be added using the toolbar button
2747 arg "footnote-insert"
2752 Insert\SpecialChar menuseparator
2756 Click at the end of the word
2757 \begin_inset Quotes eld
2762 \begin_inset Quotes erd
2765 somewhere in your document and insert a footnote.
2766 A footnote box appears where you can enter the text of the footnote.
2768 should place the cursor at the beginning of the footnote box.
2772 \begin_layout LyX-Code
2774 is a typesetting word processor.
2777 \begin_layout Standard
2778 Now click on the button labeled
2779 \begin_inset Quotes eld
2783 \begin_inset Quotes erd
2787 The footnote box is closed, leaving the button showing where the footnote
2788 marker will be in the printed text; this is called
2789 \begin_inset Quotes eld
2793 \begin_inset Quotes erd
2797 You can unfold the footnote at any time and re-edit its text by clicking
2799 \begin_inset Quotes eld
2803 \begin_inset Quotes erd
2809 \begin_layout Standard
2810 A footnote can be cut and pasted like normal text.
2811 Go ahead; try it! All you need to do is select the footnote button
2815 \begin_layout Plain Layout
2816 It may be easier to select it using the keyboard.
2817 You might accidentally open the footnote if you are trying to select the
2818 marker itself with the mouse.
2832 In addition, you can change regular text to a footnote, by selecting it
2836 arg "footnote-insert"
2839 button; change a footnote to regular text by hitting the
2843 key when the cursor is in the first position of a footnote, or by hitting
2848 key when the cursor is in the very last position of the footnote.
2851 \begin_layout Standard
2852 Margin notes can be added using the menu
2854 Insert\SpecialChar menuseparator
2856 \begin_inset space ~
2861 or the toolbar button
2864 arg "marginalnote-insert"
2867 \SpecialChar endofsentence
2868 Margin notes are like footnotes, except that:
2871 \begin_layout Itemize
2872 the on-screen boxes say
2873 \begin_inset Quotes eld
2877 \begin_inset Quotes erd
2881 \begin_inset Quotes eld
2885 \begin_inset Quotes erd
2891 \begin_layout Itemize
2892 the notes will be placed in the margin, instead of below the text
2895 \begin_layout Itemize
2896 margin notes are not numbered
2899 \begin_layout Standard
2900 Change your \SpecialChar LyX
2901 footnote back to text, then select and change it to a margin
2903 Run \SpecialChar LaTeX
2904 again to see what the margin note looks like.
2907 \begin_layout Labeling
2908 \labelwidthstring 00.00.0000
2913 : Fix the footnote in
2918 \begin_layout Section
2920 \begin_inset CommandInset label
2922 name "sec:bibliographies"
2929 \begin_layout Standard
2930 Bibliographies are similar to cross-references.
2931 The bibliography contains a list of references at the end of the document,
2932 and they can be referenced from within the document.
2933 Like section titles, \SpecialChar LyX
2934 and \SpecialChar LaTeX
2935 make your job easier by automatically numbering
2936 the bibliography items and changing citations when the item numbers change.
2939 \begin_layout Standard
2940 Go to the end of the document and switch to the
2945 Now, each paragraph you type will be a reference.
2947 \begin_inset Quotes eld
2952 The Lyx Tutorial, by the \SpecialChar LyX
2956 \begin_inset Quotes erd
2959 as your first reference.
2960 Note that \SpecialChar LyX
2961 automatically puts a number in a box before each reference.
2962 Click on the boxed reference number, and the
2965 \begin_inset space ~
2975 is to refer to this reference within the \SpecialChar LyX
2985 is set (default), you will see the number of the bibliography in the output.
2991 \begin_inset Quotes eld
2995 \begin_inset Quotes erd
2998 to make it easy to remember.
3001 \begin_layout Standard
3002 Now pick somewhere in your document that you would like to insert a reference.
3005 Insert\SpecialChar menuseparator
3008 or the toolbar button
3011 arg "dialog-show-new-inset citation"
3020 The left panel in this dialog lists all the bibliography entries, and this
3021 field allows you to choose which bibliography item you want to cite.
3023 \begin_inset Quotes eld
3027 \begin_inset Quotes erd
3030 (right now, that is the only item in the bibliography), then use the
3034 button in the center to insert it.
3035 (You can have multiple citations in the same place by transferring a number
3040 \begin_layout Plain Layout
3041 If one uses label names for references that are easy to remember it is easier
3042 to find the entry in the list of references.
3052 Now preview your file and you will see that the citation appears in brackets
3053 in the text, referring to the bibliography at the end of the document.
3056 \begin_layout Standard
3060 \begin_inset space ~
3069 dialog will put a remark (such as a reference to a page or chapter within
3070 the referenced book or article) in the brackets after the reference.
3071 If you want the references to have labels instead of numbers in the printed
3072 output (for example, some journals would use
3073 \begin_inset Quotes eld
3077 \begin_inset Quotes erd
3080 to refer to a paper written by Smith in 1995), use the
3087 \begin_inset space ~
3100 \begin_layout Labeling
3101 \labelwidthstring 00.00.0000
3106 Fix the bibliography and citation in
3111 \begin_layout Section
3115 \begin_layout Standard
3116 You may want to put a table of contents at the beginning of your document.
3118 makes this easy to do.
3123 after your document title and before your first section title and select
3126 Insert\SpecialChar menuseparator
3128 \begin_inset space ~
3132 \begin_inset space ~
3135 TOC\SpecialChar menuseparator
3137 \begin_inset space ~
3141 \begin_inset space ~
3148 \begin_inset Quotes eld
3152 \begin_inset Quotes erd
3155 will appear in a button on the first line of the document.
3159 \begin_layout Standard
3160 This may not appear to be very useful.
3161 However, if you look at your preview, you will see that a table of contents
3162 has been generated, listing the various sections and subsections in your
3164 As usual, if you reorder sections or create new ones, you will see those
3165 changes in the preview when you update it.
3169 \begin_layout Standard
3170 The table of contents is not printed in the on-screen version of the document.
3171 But you can display the table of contents in a separate window by clicking
3172 on the table of contents button, or by using
3174 View\SpecialChar menuseparator
3176 \begin_inset space ~
3181 or the toolbar button
3184 arg "dialog-toggle toc"
3188 This menu will work even if you do not have a table of contents inset in
3190 This is a very useful tool for rearranging your document parts.
3191 Clicking on a (sub)section title in the
3195 window will highlight that line and move the display (in the \SpecialChar LyX
3197 to that place in the document.
3198 You can also use the arrow keys to move up and down in the table of contents.
3199 You may therefore find it convenient to leave this window open throughout
3201 You can get similar functionality from the
3205 menu, though, where the table of contents appears automatically.
3208 \begin_layout Standard
3209 To get rid of the Table of Contents, you can delete the table of contents
3210 button just like any other text.
3213 \begin_layout Labeling
3214 \labelwidthstring 00.00.0000
3219 : Fix the table of contents in
3224 \begin_layout Chapter
3228 \begin_layout Standard
3230 is used by many scientists because it outputs great looking equations,
3231 avoiding the control characters used by word processors and their equation
3233 Many of these scientists are frustrated, however, because writing equations
3234 in \SpecialChar LaTeX
3235 is more like programming than writing.
3236 Happily, \SpecialChar LyX
3237 has WYSIWYM support for equations.
3238 If you are used to \SpecialChar LaTeX
3239 , you will find that all of the usual \SpecialChar LaTeX
3241 can be typed in normally, but they will show up in a WYSIWYM fashion.
3242 If, on the other hand, you have never written in \SpecialChar LaTeX
3246 \begin_inset space ~
3251 will allow you to write professional-looking math quickly and easily.
3254 \begin_layout Section
3258 \begin_layout Standard
3259 Somewhere in your \SpecialChar LyX
3263 \begin_layout LyX-Code
3264 I like what Einstein said, E=mc^2, because it is
3265 \begin_inset Newline linebreak
3271 \begin_layout Standard
3272 Now, that equation does not look very good in \SpecialChar LyX
3273 and in the output; there
3274 is no space between the letters and the equals sign, and you would like
3275 to write an actual superscript for the
3276 \begin_inset Quotes eld
3280 \begin_inset Quotes erd
3284 That bad typesetting happened because we did not tell \SpecialChar LyX
3285 that we were writing
3286 a mathematical expression, so it typeset the equation like regular old
3290 \begin_layout Standard
3291 But we can create a formula that will be typeset properly.
3292 Highlight the equation and click the toolbar button
3300 Insert\SpecialChar menuseparator
3301 Math\SpecialChar menuseparator
3303 \begin_inset space ~
3309 If nothing is highlighted \SpecialChar LyX
3310 inserts a little blue square, which is an empty
3312 The expression appears in blue and the blue square disappears as soon as
3313 the formula is not empty.
3318 to leave the equation.
3319 The purple markers disappear, leaving the cursor to the right of the expression.
3320 Now, if you type something, it will be regular text.
3323 \begin_layout Standard
3324 Looking at the output you will notice that the expression was typeset nicely,
3325 with spaces between the letters and the equals sign, and a superscript
3327 \begin_inset Quotes eld
3331 \begin_inset Quotes erd
3335 Letters in math mode are assumed to be variables, and come out in italics.
3336 Numbers are just numbers.
3339 \begin_layout Standard
3340 This math editor is another example of the WYSIWYM philosophy.
3341 In \SpecialChar LaTeX
3342 , you write a mathematical expression using text and commands like
3348 ; this can be frustrating, because you cannot see what an expression looks
3349 like until you run the file under \SpecialChar LaTeX
3350 and you may have to spend time, for
3351 example, finding missing brackets.
3353 does not attempt to get the expression to look perfect (WYSIWYG), but
3354 it gives you an extremely good idea of what the expression will look like.
3356 then takes care of the professional typesetting.
3359 \begin_layout Section
3360 Navigating an Equation
3363 \begin_layout Standard
3365 \begin_inset Formula $E=mc^{2}$
3369 \begin_inset Formula $E=1+mc^{2}$
3373 Use the arrow keys to move the cursor into the expression.
3374 Note that when you enter the expression, the purple markers appear to let
3375 you know you are editing math.
3384 to move the cursor past the equals sign, and just type
3385 \begin_inset Quotes eld
3389 \begin_inset Quotes erd
3393 Again, you can use the arrow keys or
3397 to leave the formula\SpecialChar endofsentence
3401 \begin_layout Standard
3402 Other than the special keys described below, typing in math mode is like
3403 editing regular text.
3413 Select text either with the arrow keys or with the mouse.
3416 Edit\SpecialChar menuseparator
3419 works in math mode as well as cut and paste.
3420 One thing to be careful of: if you are left or right outside a formula
3429 respectively, you delete the whole formula.
3430 Luckily, you can just use
3437 \begin_layout Standard
3438 What if you want to change
3439 \begin_inset Formula $E=mc^{2}$
3443 \begin_inset Formula $E=mc^{2.5}+1$
3446 ? Again, you can use the mouse to click in the right place.
3447 However, you can also use the arrow keys.
3448 If the cursor is just after the
3449 \begin_inset Quotes eld
3453 \begin_inset Quotes erd
3457 \begin_inset Quotes eld
3461 \begin_inset Quotes erd
3468 and the cursor is moved to the level of the superscript, just before the
3470 \begin_inset Quotes eld
3474 \begin_inset Quotes erd
3479 \begin_inset Quotes eld
3483 \begin_inset Quotes erd
3491 will move the cursor back to the regular level.
3500 , the cursor will be placed
3504 the superscript (so that you can then type the
3505 \begin_inset Quotes eld
3509 \begin_inset Quotes erd
3515 \begin_layout Section
3516 Exponents and Indices
3519 \begin_layout Standard
3520 An exponent can be entered from the
3523 \begin_inset space ~
3528 (see below), but it is actually simpler just to type the caret key,
3529 \begin_inset Quotes eld
3533 \begin_inset Quotes erd
3538 will place another blue rectangle in the superscript, so that whatever
3539 you write next will be superscripted, and in a smaller font size.
3540 Everything you type until you hit a
3548 to exit the formula entirely) will be in the superscript.
3551 \begin_layout Standard
3552 Writing a subscript (index) is just as easy; start one by typing the underscore
3554 \begin_inset Quotes eld
3558 \begin_inset Quotes erd
3562 You can subscript and superscript both subscripts and superscripts like
3564 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3571 \begin_layout Labeling
3572 \labelwidthstring 00.00.0000
3578 \begin_inset space ~
3588 \begin_layout Section
3592 \begin_layout Standard
3596 \begin_inset space ~
3601 is a convenient way to enter symbols and/or to perform complicated formula
3603 Many of these operations can be accomplished from the keyboard or the
3605 Insert\SpecialChar menuseparator
3610 Edit\SpecialChar menuseparator
3613 menus (the latter only appears when you are in Math mode).
3614 However, we are going to concentrate on using the
3617 \begin_inset space ~
3622 , just to let you know what is out there; you can learn keyboard shortcuts
3623 and commands later from the
3630 \begin_layout Standard
3634 \begin_inset space ~
3639 is shown when the cursor is in a formula and can also be turned on manually
3642 View\SpecialChar menuseparator
3646 When you click there on
3647 \begin_inset Quotes eld
3651 \begin_inset Quotes erd
3657 arg "toolbar-toggle math"
3660 ) the toolbar will be shown permanently at the bottom; this state is visualized
3665 menu with a checkmark.
3666 When you click in this state again on
3667 \begin_inset Quotes eld
3671 \begin_inset Quotes erd
3681 \begin_inset space ~
3686 is only shown when the cursor is within a formula; this state is visualized
3687 by the renaming of the menu entry from
3688 \begin_inset Quotes eld
3692 \begin_inset Quotes erd
3696 \begin_inset Quotes eld
3700 \begin_inset space ~
3704 \begin_inset Quotes erd
3710 \begin_layout Subsection
3714 \begin_layout Standard
3718 \begin_inset space ~
3723 allows you to choose from a large array of symbols used in math: operators,
3724 arrows, relationships, delimiters, special characters, sums and integrals.
3725 Note that subscripting and superscripting allow you to put lower and upper
3726 limits on sums and integrals.
3729 \begin_layout Subsection
3730 Roots, decorations, and delimiters
3733 \begin_layout Standard
3734 To type a square root, just click on the button
3737 arg "math-insert \\sqrt"
3741 The square root appears, and the cursor is in a new insertion point inside
3743 You can type variables, numbers, other square roots, fractions, whatever
3746 will automatically resize the square root to fit what is inside.
3749 \begin_layout Standard
3751 \begin_inset Quotes eld
3755 \begin_inset Quotes erd
3759 \begin_inset Formula $\overrightarrow{a}$
3762 ) or group of characters (
3763 \begin_inset Formula $\overrightarrow{a+b}$
3766 ) is done similarly.
3767 Decorations are available from the toolbar via the button
3770 arg "math-insert \\hat"
3774 Click on a decoration, and \SpecialChar LyX
3775 will insert that decoration with an insertion
3776 point under (or over) it.
3777 Just type what you want in the insertion point.
3778 There are two sets of decorations: those that resize with the text you
3779 type, and those that have a fixed size, and are most appropriate for a
3784 \begin_layout Standard
3785 Delimiters such as parentheses, brackets, and braces work similarly, but
3786 are a bit more complicated.
3787 Hit the delimiter button
3790 arg "dialog-show mathdelimiter"
3798 Your current selection of delimiters is displayed in a box.
3799 It is a pair of parentheses by default, but you can choose a pair of braces,
3800 a brace and a parenthesis, or choose the empty square to have something
3802 \begin_inset Quotes eld
3806 \begin_inset Formula $a=\left\langle 7\right.$
3810 \begin_inset Quotes erd
3813 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3818 \begin_layout Standard
3819 If you are lazy, you can type actual parentheses in math mode, rather than
3825 However, those parentheses will be the same size as regular text, which
3826 will look bad if you have a big fraction or matrix inside the parentheses.
3827 So it is better to use one of the three delimiter buttons that insert them
3828 directly, for example
3831 arg "math-delim ( )"
3837 \begin_layout Standard
3838 You can also put delimiters or a square root sign or a decoration on already
3839 existing formula parts.
3840 Select the portion of the formula that you want to adjust, and then click
3841 on the button you want from the
3844 \begin_inset space ~
3850 Try using this to change Newton's second law from scalar to vector form
3852 \begin_inset Formula $f=ma$
3856 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3860 Once you have learned about matrices, this is how you will put parentheses
3861 or brackets around them.
3864 \begin_layout Subsection
3868 \begin_layout Standard
3869 To create a fraction, click on the fraction button
3872 arg "math-insert \\frac-square"
3878 \begin_inset space ~
3885 writes two insertion points in a fraction.
3886 As you would expect, you can use arrow keys or the mouse to move around
3888 Click on the top square and type
3889 \begin_inset Quotes eld
3893 \begin_inset Quotes erd
3902 \begin_inset Quotes eld
3906 \begin_inset Quotes erd
3910 You have made a fraction! Of course you can type anything within each of
3911 the two boxes: variables with exponents, square roots, other fractions,
3916 \begin_layout Labeling
3917 \labelwidthstring 00.00.0000
3923 \begin_inset space ~
3933 \begin_layout Subsection
3934 Functions: lim, log, sin and others
3937 \begin_layout Standard
3938 Because letters in math mode are considered to be variables, if you type
3940 \begin_inset Quotes eld
3944 \begin_inset Quotes erd
3947 in math mode, \SpecialChar LyX
3948 thinks you are typing the product of the three variables
3950 \begin_inset Formula $s$
3954 \begin_inset Formula $i$
3958 \begin_inset Formula $n$
3962 The three letters will be typeset in italics, when what you really wanted
3964 \begin_inset Quotes eld
3968 \begin_inset Quotes erd
3972 In addition, \SpecialChar LyX
3973 will not put a space between the word
3974 \begin_inset Quotes eld
3978 \begin_inset Quotes erd
3982 \begin_inset Quotes eld
3986 \begin_inset Quotes erd
3993 will exit the formula).
3995 \begin_inset Quotes eld
3999 \begin_inset Formula $\sin(x)$
4003 \begin_inset Quotes erd
4007 \begin_inset Quotes eld
4011 \begin_inset Formula $sin(x)$
4015 \begin_inset Quotes erd
4021 \begin_layout Standard
4025 \begin_inset space ~
4033 arg "math-insert \\functions"
4037 \begin_inset Quotes eld
4041 \begin_inset Quotes erd
4044 in the pop-up function list.
4046 \begin_inset Quotes eld
4050 \begin_inset Quotes erd
4053 is displayed in \SpecialChar LyX
4054 in black, and set in upright roman type.
4055 The whole word is treated as one symbol, so if you type
4059 , it will delete the whole word.
4061 \begin_inset Quotes eld
4065 \begin_inset Quotes erd
4068 , which will be written in blue italics, like you expect in a formula.
4069 In the output, the expression will be correctly typeset.
4073 \begin_layout Standard
4074 The function list includes other trigonometric functions and their inverses,
4075 hyperbolic functions, logarithms, limits, and quite a few others.
4076 These functions can take subscripts and superscripts, important for typing
4078 \begin_inset Quotes eld
4082 \begin_inset Formula $\cos^{2}\theta$
4086 \begin_inset Quotes erd
4090 \begin_inset Quotes eld
4094 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4098 \begin_inset Quotes erd
4104 \begin_layout Labeling
4105 \labelwidthstring 00.00.0000
4111 \begin_inset space ~
4121 \begin_layout Subsection
4125 \begin_layout Standard
4126 Click on the matrix button
4129 arg "dialog-show mathmatrix"
4135 \begin_inset space ~
4141 A pop-up dialog allows you to choose how many rows and columns you want
4143 Choose 2 rows and 3 columns and hit
4149 prints 6 insertion points in a
4150 \begin_inset Formula $2\times3$
4154 As usual, you can put any sort of formula expression (a square root, another
4155 matrix, etc.) in each insertion point.
4156 You can also leave some of the insertion points empty if you want.
4159 \begin_layout Standard
4164 can be used to move horizontally between the columns of a matrix.
4165 Alternatively, you can use the arrow keys to move around - hitting
4169 at the end of one box will move to the next box,
4173 will move to the next row, etc.
4176 \begin_layout Standard
4177 If you need to change the number of rows and columns, use the menu
4179 Edit\SpecialChar menuseparator
4181 \begin_inset space \thinspace{}
4185 \begin_inset space \thinspace{}
4190 or the math toolbar buttons
4193 arg "tabular-feature append-row"
4199 arg "tabular-feature delete-row"
4205 arg "tabular-feature append-column"
4211 arg "tabular-feature delete-column"
4217 \begin_layout Standard
4222 for information on how to change the horizontal alignment of each column,
4223 and how to change the vertical position of the whole matrix.
4224 Note that if you want to write a table containing text, you should use
4226 's wonderful table support, rather than trying to write text in a matrix.
4229 \begin_layout Subsection
4233 \begin_layout Standard
4234 All of the expressions we have written so far have been on the same line
4235 as the text that came before and after them, otherwise known as inline
4237 This is fine for short, simple expressions, but if you want to write larger
4238 ones, or if you want your expressions to stand out from the text, you need
4239 to write them in display mode.
4240 In addition, only displayed expressions can be labeled and numbered (see
4245 ), and multi-line equations must be in display mode.
4248 \begin_layout Standard
4249 While being in a formula, click on the display button
4260 This centers the formula and adds a blank line before and after it.
4261 Now type in an expression and compile your file to see how it looks.
4262 The display button is actually a toggle; use it now to change a couple
4263 of your expressions to display mode and back.
4267 \begin_layout Standard
4268 Display mode has a couple differences from inline mode:
4271 \begin_layout Itemize
4272 The default font is larger for a few symbols, like
4273 \begin_inset Formula $\sum$
4277 \begin_inset Formula $\int$
4283 \begin_layout Itemize
4284 Subscripts and superscripts for limits and sums (but not integrals) are
4285 written under and over rather than next to the symbols
4288 \begin_layout Itemize
4292 \begin_layout Standard
4293 Other than these differences, though, displayed expressions and inline expressio
4294 ns are very similar.
4297 \begin_layout Standard
4298 One final note about the way displayed formulas are typeset: be careful
4299 about whether you are putting your equation into a new paragraph or not.
4300 If your formula is in the middle of a sentence or paragraph, then do not
4306 Doing so will cause the text
4310 the formula to start a new paragraph.
4311 That text will be indented or follow a blank line, depending on your document
4312 paragraph settings, which is probably not what you want.
4315 \begin_layout Labeling
4316 \labelwidthstring 00.00.0000
4321 : Put the various equations in
4325 into display mode, and see how they are typeset differently.
4328 \begin_layout Labeling
4329 \labelwidthstring 00.00.0000
4334 : Using various tools you have learned in this section, you should be able
4335 to write an equation like:
4339 \begin_layout Plain Layout
4340 After you have done it the hard way, give
4342 Insert\SpecialChar menuseparator
4343 Math\SpecialChar menuseparator
4345 \begin_inset space ~
4356 \begin_inset Formula
4358 f(x)=\left\{ \begin{array}{cc}
4361 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4370 \begin_layout Section
4374 \begin_layout Standard
4375 Now you are familiar with the basics.
4377 's math editor can do a lot more.
4378 You can refer to the
4382 manual for tips on how to:
4385 \begin_layout Itemize
4386 Label and number expressions.
4389 \begin_layout Itemize
4390 Create multi-line equations.
4393 \begin_layout Itemize
4394 Change typefaces, e.
4395 \begin_inset space \thinspace{}
4399 \begin_inset space \space{}
4402 to write bold-face text in an expression.
4405 \begin_layout Itemize
4406 Fine-tune font sizes and spacing within an expression.
4407 (Do not worry about this until your final draft!)
4410 \begin_layout Itemize
4412 These are very powerful, because you just define them once at the top of
4413 the document, and then you can use them throughout the document.
4416 \begin_layout Itemize
4417 Do almost all you can do with math.
4420 \begin_layout Chapter
4424 \begin_layout Section
4425 Other major \SpecialChar LyX
4429 \begin_layout Standard
4430 We have not gone through all the possible commands in \SpecialChar LyX
4431 , and we are not planning
4440 \begin_inset space ~
4445 manual for more information.
4446 We will just mention a couple more major things \SpecialChar LyX
4450 \begin_layout Itemize
4452 has WYSIWYM support for tables.
4455 Insert\SpecialChar menuseparator
4461 arg "tabular-insert"
4465 Click on the table with the
4472 \begin_inset space ~
4477 dialog box which allows extensive table editing.
4481 arg "toolbar-toggle table"
4484 the table toolbar will appear permanently.
4487 \begin_layout Itemize
4489 also supports including pictures in any format within documents.
4492 Insert\SpecialChar menuseparator
4498 arg "dialog-show-new-inset graphics"
4502 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4503 can have captions, and \SpecialChar LyX
4504 will automatically generate lists of figures and/or
4508 \begin_layout Itemize
4510 is heavily configurable.
4511 Everything from how the \SpecialChar LyX
4512 window looks to how the output comes out can be
4513 configured in a number of ways.
4514 Much configuration is done through
4516 Tools\SpecialChar menuseparator
4520 For more information on this, check out
4522 Help\SpecialChar menuseparator
4523 Customization\SpecialChar endofsentence
4527 \begin_layout Itemize
4529 is being developed by a team of programmers on five continents.
4530 Therefore, \SpecialChar LyX
4531 has better support for non-English languages (such as Dutch,
4532 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4533 ) than many word processors.
4534 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4535 languages Chinese Japanese, and Korean are supported.
4536 You can write documents in other languages and you can also configure \SpecialChar LyX
4538 to show its menus and error messages in other languages.
4542 \begin_layout Itemize
4543 The \SpecialChar LyX
4544 menus feature keybindings.
4545 This means that you can do
4547 File\SpecialChar menuseparator
4558 or by using the binding which is shown next to it in the menu (
4565 Keybindings are also configurable.
4566 For information on this, check out
4568 Help\SpecialChar menuseparator
4569 Customization\SpecialChar endofsentence
4573 \begin_layout Itemize
4575 can read \SpecialChar LaTeX
4578 \begin_inset space ~
4582 \begin_inset CommandInset ref
4584 reference "sec:tex2lyx"
4591 \begin_layout Itemize
4592 Spell-checking, thesaurus, and word count facilities are available.
4595 \begin_layout Itemize
4596 Generation of indexes and nomenclatures/glossaries is supported.
4599 \begin_layout Section
4601 for \SpecialChar LaTeX
4603 \begin_inset CommandInset label
4605 name "sec:latexusers"
4612 \begin_layout Standard
4613 If you do not know anything about \SpecialChar LaTeX
4614 , you do not have to read this section.
4615 Actually, you might want to
4619 about \SpecialChar LaTeX
4620 , and then read this chapter.
4621 However, some of those who begin to use \SpecialChar LyX
4622 will be familiar with \SpecialChar LaTeX
4624 If you are such a person, you may be wondering if \SpecialChar LyX
4625 can really do everything
4628 The short answer is that \SpecialChar LyX
4629 can do pretty much everything \SpecialChar LaTeX
4631 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4636 \begin_layout Standard
4637 Because this is just a tutorial, we are only going to mention things that
4638 new \SpecialChar LyX
4639 users will most likely be interested in.
4640 In the interests of keeping the Tutorial short, we will give only minimal
4645 \begin_inset space ~
4653 \begin_inset space ~
4658 manuals have a great deal of information on differences between \SpecialChar LyX
4659 and \SpecialChar LaTeX
4661 and how to do various \SpecialChar LaTeX
4662 tricks in \SpecialChar LyX
4666 \begin_layout Subsection
4671 \begin_layout Standard
4672 Anything that you enter in \SpecialChar TeX
4673 mode will be passed straight to \SpecialChar LaTeX
4675 displayed in red on the screen.
4676 You can use \SpecialChar TeX
4677 commands in \SpecialChar LyX
4680 Insert\SpecialChar menuseparator
4682 \begin_inset space ~
4694 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4698 \begin_layout Standard
4699 In a math formula, \SpecialChar TeX
4700 mode is handled a bit differently.
4702 mode is entered there by typing a backslash.
4703 The backslash is not written out, but anything you type afterwards will
4705 You exit \SpecialChar TeX
4710 or some other non-alphabetic character, like a number, underscore, caret
4712 Once you exit \SpecialChar TeX
4713 mode, if \SpecialChar LyX
4714 knows the \SpecialChar TeX
4715 command you have typed in, it will
4716 convert it to WYSIWYM\SpecialChar endofsentence
4718 \begin_inset Quotes eld
4728 \begin_inset Quotes erd
4731 in a formula and then press
4737 \begin_inset Quotes eld
4741 \begin_inset Quotes erd
4745 \begin_inset Quotes eld
4749 \begin_inset Formula $\gamma$
4753 \begin_inset Quotes erd
4757 This will work for almost all, non-complicated math macros.
4758 This may be faster than using the
4761 \begin_inset space ~
4766 , and will be especially convenient for experienced \SpecialChar LaTeX
4770 \begin_layout Standard
4771 As a special case, if you type
4772 \begin_inset Quotes eld
4782 \begin_inset Quotes erd
4785 in a formula, the beginning
4789 ending braces will be inserted in red while the cursor is placed between
4791 This makes it more convenient to type those commands that take an argument.
4794 \begin_layout Standard
4796 cannot do absolutely everything that \SpecialChar LaTeX
4798 Some fancy functions are not supported at all, while some work but are
4801 mode allows users to get the full flexibility of \SpecialChar LaTeX
4802 , while having all the
4803 convenient features of \SpecialChar LyX
4804 , like WYSIWYM math, tables, and editing.
4806 could never support every \SpecialChar LaTeX
4814 in the preamble (see Section
4815 \begin_inset space ~
4819 \begin_inset CommandInset ref
4821 reference "sec:preamble"
4825 ), you can use any package you want — although you will not have WYSIWYM
4826 support for that package's features.
4829 \begin_layout Subsection
4830 Importing \SpecialChar LaTeX
4836 \begin_inset CommandInset label
4845 \begin_layout Standard
4846 You can import a \SpecialChar LaTeX
4847 file into \SpecialChar LyX
4850 File\SpecialChar menuseparator
4851 Import\SpecialChar menuseparator
4853 \begin_inset space ~
4858 menu in \SpecialChar LyX
4860 This will call the program
4864 which will create a file foo.lyx from the file foo.tex.
4866 will then open that file.
4867 If the translation does not work, you can try calling
4871 from the command line, possibly using fancier options.
4874 \begin_layout Standard
4875 Even when the translation does work,
4879 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4881 It will leave things it does not understand in \SpecialChar TeX
4882 mode; so, after translating
4887 , you can look for the red text and manually edit it to get it right.
4890 \begin_layout Standard
4895 has its own documentation (manpage), which Unix/Linux users can access
4896 via the console command
4899 \begin_inset space ~
4905 The manpage describes which \SpecialChar LaTeX
4906 commands and environments are not supported,
4907 what bugs you might run into (and how to get around them), and how to use
4908 the various options.
4911 \begin_layout Standard
4912 It is important to understand that
4916 can only translate files whose document class is
4917 \begin_inset Quotes eld
4921 \begin_inset Quotes erd
4925 , that is, for which there is a corresponding \SpecialChar LyX
4931 If there is no layout file, then you will get an error saying that the
4932 conversion could not be performed.
4933 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4938 simply will not know how to translate the \SpecialChar LaTeX
4939 that it finds there into things
4942 More about layout files and how they are created is explained in detail
4950 \begin_layout Subsection
4951 Converting \SpecialChar LyX
4952 Documents to \SpecialChar LaTeX
4956 \begin_layout Standard
4957 You might wish to convert a \SpecialChar LyX
4958 Document to a \SpecialChar LaTeX
4960 For example, a co-worker or co-author who does not have \SpecialChar LyX
4965 File\SpecialChar menuseparator
4966 Export\SpecialChar menuseparator
4970 This will create a file
4978 file you are editing.
4981 \begin_layout Subsection
4986 \begin_layout Subsubsection
4990 \begin_layout Standard
4993 Document\SpecialChar menuseparator
4996 dialog takes care of the document-wide options, such as changing the document
4997 class, default font size and paper size.
4998 Document class options and also options for \SpecialChar LaTeX
4999 packages can be entered there
5003 \begin_inset space ~
5011 \begin_layout Subsubsection
5012 Other Preamble Matter
5013 \begin_inset CommandInset label
5022 \begin_layout Standard
5023 If you have special commands to put in the preamble of a \SpecialChar LaTeX
5025 use them in a \SpecialChar LyX
5029 Document\SpecialChar menuseparator
5030 Settings\SpecialChar menuseparator
5032 \begin_inset space ~
5037 and type in the dialog window (or from the document settings dialog, depending
5039 Anything you type will (as with \SpecialChar TeX
5040 mode) be sent directly to \SpecialChar LaTeX
5044 \begin_layout Subsection
5049 \begin_layout Standard
5051 has support for Bib\SpecialChar TeX
5052 , which allows you to build databases of bibliographical
5053 references to be used in multiple documents.
5056 Insert\SpecialChar menuseparator
5058 \begin_inset space \thinspace{}
5062 \begin_inset space \thinspace{}
5065 TOC\SpecialChar menuseparator
5067 \begin_inset space ~
5082 field you load Bib\SpecialChar TeX
5087 field you can load Bib\SpecialChar TeX
5091 \begin_layout Standard
5092 After you have done this, you can use citations from any bibliographies
5093 you have included with
5095 Insert\SpecialChar menuseparator
5099 \begin_inset space ~
5103 \begin_inset CommandInset ref
5105 reference "sec:bibliographies"
5114 dialog will show a list of all the references in your
5122 \begin_layout Section
5126 \begin_layout Standard
5127 Sometimes when you try to view a document, there will be errors, things
5128 that \SpecialChar LyX
5129 or \SpecialChar LaTeX
5131 When this happens, \SpecialChar LyX
5136 \begin_inset space ~
5142 Clicking on individual errors in this dialog will take you to the place
5143 in the \SpecialChar LyX
5144 document where the error occurs and also display the detailed \SpecialChar LaTeX