1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
8 \use_default_options false
12 \maintain_unincluded_children false
14 \language_package default
17 \font_roman "palatino" "default"
18 \font_sans "helvet" "default"
19 \font_typewriter "courier" "default"
20 \font_math "auto" "auto"
21 \font_default_family default
22 \use_non_tex_fonts false
25 \font_sf_scale 100 100
26 \font_tt_scale 100 100
28 \default_output_format pdf2
30 \bibtex_command default
31 \index_command default
35 \pdf_title "The LyX Tutorial"
36 \pdf_author "LyX Team"
37 \pdf_subject "LyX-documentation Tutorial"
38 \pdf_keywords "LyX, documentation"
40 \pdf_bookmarksnumbered true
41 \pdf_bookmarksopen true
42 \pdf_bookmarksopenlevel 1
47 \pdf_pdfusetitle false
48 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
51 \use_package amsmath 0
52 \use_package amssymb 0
55 \use_package mathdots 1
56 \use_package mathtools 0
58 \use_package stackrel 0
59 \use_package stmaryrd 0
60 \use_package undertilde 0
62 \cite_engine_type default
66 \paperorientation portrait
76 \paragraph_separation indent
77 \paragraph_indentation default
78 \quotes_language english
81 \paperpagestyle headings
82 \tracking_changes false
97 by the \SpecialChar LyX
102 \begin_layout Plain Layout
104 If you have comments on or corrections to this documentation, please send
105 them to the \SpecialChar LyX
106 Documentation mailing list:
107 \begin_inset CommandInset href
109 target "lyx-docs@lists.lyx.org"
122 \begin_layout Standard
123 \begin_inset CommandInset toc
124 LatexCommand tableofcontents
131 \begin_layout Chapter
135 \begin_layout Section
136 Welcome to \SpecialChar LyX
140 \begin_layout Standard
141 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
144 Now, do not panic – you will not need to learn \SpecialChar LaTeX
145 to use \SpecialChar LyX
147 That is, after all, the whole point of \SpecialChar LyX
148 : to provide an almost-WYSIWYG interface
149 to \SpecialChar LaTeX
151 There are some things you will need to learn, however, in order to use
156 \begin_layout Standard
157 Some of you probably found your way to this document because you tried to
158 put two spaces after a
159 \begin_inset Quotes eld
163 \begin_inset Quotes erd
166 or tried to put three blank lines between paragraphs.
167 You found out you could not and, in fact, you will find out that most of
168 the little tricks you are accustomed to use in word processors will not
169 work in \SpecialChar LyX
171 That is because most word processors you have used before allow you manually
172 to enter all spacings, font changes, and so on.
173 So you end up not only writing a document but typesetting it, too.
175 does the typesetting for you, in a consistent fashion, letting you focus
176 on the important things, like the content of your writing.
179 \begin_layout Standard
180 So read on to learn more about \SpecialChar LyX
182 Reading this tutorial is definitely worth the time.
185 \begin_layout Section
195 \begin_layout Standard
196 Before we get started with this section, you need to know that this
200 uses the notation outlined in the
205 If you came to this manual first, please read the
209 before you continue with the
216 \begin_layout Standard
217 Now that you know which fonts mean what in the documentation, we want to
218 talk a bit about what this
225 \begin_layout Subsection
226 Getting the most out of the Tutorial
229 \begin_layout Standard
230 This tutorial consists of examples and exercises.
231 To get the most out of this document, you should read through it, typing
232 all the little things we are telling you to type and trying out all of
233 the exercises to see if you get them right.
234 For convenience, you might want to print out the PDF version of this document.
237 \begin_layout Standard
238 If you are familiar with \SpecialChar LaTeX
239 , you will probably be able to read the
243 somewhat faster, since many \SpecialChar LyX
244 ideas are just \SpecialChar LaTeX
246 However, \SpecialChar LyX
247 has features you will want to learn about.
248 Even if you do not feel like reading the rest of the
252 , you should definitely check out Section
257 \begin_inset CommandInset ref
259 reference "sec:latexusers"
263 , which is specifically written for experienced \SpecialChar LaTeX
267 \begin_layout Subsection
275 \begin_layout Itemize
276 Detailed explanations of all of \SpecialChar LyX
281 \begin_layout Standard
290 \begin_layout Itemize
291 Detailed explanations of \SpecialChar LaTeX
296 \begin_layout Standard
298 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
301 can have a look at the
313 \begin_layout Standard
314 It is time to move on, time for your first document \SpecialChar ldots
318 \begin_layout Chapter
319 Getting started with \SpecialChar LyX
323 \begin_layout Section
324 Your first \SpecialChar LyX
328 \begin_layout Standard
329 OK\SpecialChar endofsentence
330 You are ready to start writing.
331 Before you do, there are a few things we need to mention, which will hopefully
332 make the Tutorial more instructive and useful.
336 \begin_layout Standard
337 Because there is information we cannot give you in the Tutorial, the
343 thing that you need to do is find the
350 Start up \SpecialChar LyX
360 You may want to load the
364 as well (if you are not reading it within \SpecialChar LyX
366 This way, you can read them while you are writing your own file.
370 \begin_layout Plain Layout
371 They can also serve as good examples of how to use the many features of
378 Note that once you have got more than one document open, you can use the
383 menu or the document tabs to switch between them.
386 \begin_layout Standard
387 In this Tutorial, we are going to assume that you have a fully working version
389 , as well as a \SpecialChar LaTeX
390 -distribution and a PDF-viewer.
391 This should be the case on all major Linux- and BSD-distributions, as well
392 as on Windows, where this is setup by the \SpecialChar LyX
396 \begin_layout Standard
397 Finally, we have written a file called
401 to let you practice your \SpecialChar LyX
403 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
406 As you learn new \SpecialChar LyX
407 functions, we will suggest that you fix those parts of
413 It also contains `subtle' hints about how to fix things.
417 \begin_layout Plain Layout
418 The hints are located in yellow
419 \begin_inset Quotes eld
423 \begin_inset Quotes erd
427 Access the text in a note by clicking on it.
432 If you want to cheat, or check what you have done, there is also a file
434 \begin_inset Newline newline
441 which contains the same text written and typeset by a \SpecialChar LyX
445 \begin_layout Standard
446 The example files can be found in the
450 directory of \SpecialChar LyX
451 's installation folder.
458 File\SpecialChar menuseparator
465 to save a copy in your own directory for you to work on.
466 As you fix parts of the raw document, check to see how those changes affect
470 \begin_layout Standard
475 directory contains lots of other examples files.
476 They will show you how to do various fancy things with \SpecialChar LyX
478 After you have read the Tutorial, or when you are confused about how to
479 do something fancy in \SpecialChar LyX
480 , take a look at these files.
483 \begin_layout Subsection
484 Typing, Viewing, and Exporting
487 \begin_layout Itemize
490 File\SpecialChar menuseparator
494 \begin_layout Itemize
495 Type a sentence like:
497 This is my first \SpecialChar LyX
501 \begin_layout Itemize
502 Save your document with
504 File\SpecialChar menuseparator
509 As\SpecialChar endofsentence
513 \begin_layout Itemize
514 Create a PDF file, with
516 Document\SpecialChar menuseparator
519 or the toolbar button
527 will open a PDF-viewer program displaying your document as it will look
531 \begin_layout Itemize
532 Export the ready to print document with
534 File\SpecialChar menuseparator
542 \begin_layout Standard
543 Congratulations! You have written your first \SpecialChar LyX
545 All of the rest is just details.
546 \begin_inset Newline newline
552 \begin_layout Standard
557 You can save time by leaving the PDF viewer running in the background.
558 Under MacOS and Linux you can use
560 Document\SpecialChar menuseparator
563 or the toolbar button
569 and just click on the PDF viewer window afterwards.
570 Under Windows still use
572 Document\SpecialChar menuseparator
584 \begin_layout Standard
589 In case you are using a high-resolution display, the LyX toolbar icons
591 To change their size, right-click into a toolbar.
594 \begin_layout Subsection
598 \begin_layout Standard
600 can of course do most of the things you are used to doing with a word processor.
601 It will word-wrap and indent paragraphs automatically.
602 Here is a quick description of how to do some simple actions.
605 \begin_layout Description
606 Undo \SpecialChar LyX
607 has multiple levels of undo, which means you can undo everything you
608 have done since your current editing session started, by selecting
610 Edit\SpecialChar menuseparator
619 ) over and over again.
620 If you undo too much, just select
622 Edit\SpecialChar menuseparator
635 \begin_layout Standard
636 Currently, undo is limited to 100 steps.
640 \begin_layout Description
643 Edit\SpecialChar menuseparator
654 Edit\SpecialChar menuseparator
665 Edit\SpecialChar menuseparator
674 ) to cut, copy, and paste.
675 Or automatically paste selected text (including selections from other programs)
683 \begin_layout Description
686 Edit\SpecialChar menuseparator
700 arg "dialog-show findreplace"
704 In the dialog, search with the
716 button to replace a word you have found.
720 \begin_layout Plain Layout
721 Close the window when you are done or leave it open if you find it more
723 Most dialog boxes in \SpecialChar LyX
724 can operate like this.
725 Just be sure you have the right window in focus when you are trying to
726 type in the main \SpecialChar LyX
727 window or a \SpecialChar LyX
733 If you like, you can specify whether to make the search case-sensitive,
734 or to search for only complete words; you can also search backwards through
738 \begin_layout Description
753 , which will by default print characters in italics), set it in
763 , usually small caps, used for people's names), or use your own formatting
766 Edit\SpecialChar menuseparator
771 Style\SpecialChar menuseparator
774 dialog (toolbar button
777 arg "dialog-show character"
783 \begin_layout Description
784 Toolbar Other buttons on the toolbar allow you to do some of the more popular
812 \begin_layout Standard
813 Of course, you have not yet written enough to make most of these functions
815 As you write more, though, try undoing, pasting, etc.
818 \begin_layout Subsection
819 WYSIWYM: Whitespace in \SpecialChar LyX
823 \begin_layout Standard
824 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
827 As many times as you hit
831 , you will only get one blank line.
832 As many times as you hit
836 , you will only get one space.
837 On a blank line, \SpecialChar LyX
838 will not let you type even one space.
843 key will not move you forward one tab stop; in fact there
847 no tab stops! There is no ruler at the top of the page to let you set tabs
851 \begin_layout Standard
852 Many word processors are based on the WYSIWYG principle:
853 \begin_inset Quotes eld
856 What You See Is What You Get.
857 \begin_inset Quotes erd
861 , on the other hand, is based on the principle that
862 \begin_inset Quotes eld
865 What You See Is What You
870 \begin_inset Quotes erd
873 You type what you mean and \SpecialChar LyX
874 will take care of typesetting it for you so
875 that the output looks nice.
880 grammatically separates paragraphs and a
884 grammatically separates words; so there is no reason to have several of
889 has no grammatical function at all – so \SpecialChar LyX
891 Using \SpecialChar LyX
892 , you will spend more of your time worrying about the
896 of your document and less time worrying about the
905 for more information on the WYSIWYM concept.
908 \begin_layout Standard
910 does have (many) ways to fine-tune the formatting of your document.
911 After all, \SpecialChar LyX
921 has information about all that.
922 It includes horizontal fills and vertical space — which are more powerful
923 and versatile than multiple spaces or blank lines — and ways to change
924 font sizes, character styles, and paragraph alignments by hand.
925 The idea, though, is that you can write your whole document, focusing on
926 content, and just worry about that fine-tuning at the end.
927 With standard word processors, you will be distracted by document formatting
928 throughout the writing process.
931 \begin_layout Section
935 \begin_layout Standard
936 Different parts of a document have different purposes; we call these parts
942 Most of a document is made up of regular text.
943 Section titles (chapter, subsection, etc.) let the reader know that a new
944 topic or subtopic will be discussed.
945 Certain types of documents have special environments.
946 A journal article will have an abstract and a title.
947 A letter will have neither of these, but will probably have an environment
948 that gives the writer's address.
951 \begin_layout Standard
952 Environments are a major part of the
953 \begin_inset Quotes eld
956 What You See Is What You Mean
957 \begin_inset Quotes erd
960 philosophy of \SpecialChar LyX
962 A given environment may require a certain font style, font size, indenting,
963 line spacing, and more.
964 This problem is aggravated, because the exact formatting for a given environmen
965 t may change: one journal may use boldface, 18 point, centered type for
966 section titles while another uses italicized, 15 point, left justified
967 type; different languages may have different standards for indenting; and
968 bibliography formats can vary widely.
970 lets you avoid learning all the different formatting styles.
973 \begin_layout Standard
978 choice box is located on the left end of the toolbar and looks like this:
980 \begin_inset Graphics
981 filename clipart/ToolbarEnvBox.png
988 It indicates in which environment you are currently writing.
989 While you were writing your first document, it said
990 \begin_inset Quotes eld
994 \begin_inset Quotes erd
997 which is the default environment for text.
998 Now you will put a number of environments in your new document so that
999 you can see how they work.
1002 \begin_layout Subsection
1003 Sections and Subsections
1006 \begin_layout Standard
1011 on the first line of your new \SpecialChar LyX
1024 \begin_layout Plain Layout
1030 If nothing is selected, \SpecialChar LyX
1031 changes the paragraph you are currently in to
1032 the selected environment.
1033 Alternatively, you can change several paragraphs to a different environment
1034 by selecting them before picking an environment.
1051 , which will be covered below.
1054 \begin_inset Quotes eld
1058 \begin_inset Quotes erd
1061 and typesets the section heading (title) in a larger font.
1066 \SpecialChar endofsentence
1072 \begin_inset Quotes eld
1076 \begin_inset Quotes erd
1080 \begin_inset Quotes eld
1084 \begin_inset Quotes erd
1088 Section headings, like most environments, are assumed to end when you type
1093 \SpecialChar endofsentence
1094 Type the document introduction:
1097 \begin_layout LyX-Code
1098 This is an introduction to my first \SpecialChar LyX
1102 \begin_layout Standard
1118 \begin_inset Quotes eld
1122 \begin_inset Quotes erd
1125 and waits for you to type a title.
1127 \begin_inset Quotes eld
1133 \begin_inset space ~
1139 \begin_inset Quotes erd
1142 , and you will see that \SpecialChar LyX
1143 again sets it as a section title.
1146 \begin_layout Standard
1148 Go to the end of Section
1149 \begin_inset space ~
1153 \begin_inset Quotes eld
1156 my first \SpecialChar LyX
1158 \begin_inset Quotes erd
1174 Again, \SpecialChar LyX
1176 \begin_inset Quotes eld
1180 \begin_inset Quotes erd
1183 and waits for you to type a title.
1190 \begin_inset space ~
1194 \begin_inset Quotes eld
1198 \begin_inset Quotes erd
1202 \begin_inset space ~
1205 2, has been automatically renumbered to Section
1206 \begin_inset space ~
1209 3! In true WYSIWYM fashion, you just need to identify the text that makes
1210 up the section titles, and \SpecialChar LyX
1211 takes care of numbering the sections and typesettin
1215 \begin_layout Standard
1224 environment, and type the following five lines:
1227 \begin_layout LyX-Code
1228 Sections and subsections are described below.
1231 \begin_layout LyX-Code
1235 \begin_layout LyX-Code
1236 Sections are bigger than subsections.
1239 \begin_layout LyX-Code
1240 Subsection description
1243 \begin_layout LyX-Code
1244 Subsections are smaller than sections.
1247 \begin_layout Standard
1248 Click on the second line and select
1258 numbers the subsection
1259 \begin_inset Quotes eld
1263 \begin_inset Quotes erd
1266 , and typesets it in a font which is bigger than regular text but smaller
1267 than the section title.
1268 Change the fourth line to the
1272 environment as well.
1273 As you probably expected, \SpecialChar LyX
1274 automatically numbered the section
1275 \begin_inset Quotes eld
1279 \begin_inset Quotes erd
1283 If you put yet another section before Section
1284 \begin_inset space ~
1288 \begin_inset space ~
1291 2 will be renumbered as Section 3, and the subsections will be renumbered
1293 \begin_inset Quotes eld
1297 \begin_inset Quotes erd
1301 \begin_inset Quotes eld
1305 \begin_inset Quotes erd
1311 \begin_layout Standard
1312 Further levels of sectioning include
1325 We will let you play with these on your own.
1326 You may notice that paragraph and subparagraph headings are not numbered
1327 by default, and that subparagraphs are indented; see the
1331 for an explanation and how to change this.
1336 headings are actually the highest level of sectioning, above
1340 s, but you are only allowed to use them in certain types (text classes)
1342 documents (see Section
1343 \begin_inset space ~
1347 \begin_inset CommandInset ref
1349 reference "sec:Document-Classes"
1356 \begin_layout Standard
1357 Finally, you may want to have sections or subsections that are not numbered.
1358 There are environments for this as well.
1359 If you change one of your section headings to the
1363 environment (you may have to scroll down in the
1367 box to find it), \SpecialChar LyX
1368 will use the same font size for the heading as it uses
1369 for a regular section, but it will not number that section.
1370 There are corresponding
1371 \begin_inset Quotes eld
1375 \begin_inset Quotes erd
1378 heading environments for
1387 Try changing some of your sections or subsections to the starred environments,
1388 and note how the other section numbers are updated.
1391 \begin_layout Labeling
1392 \labelwidthstring 00.00.0000
1397 : Fix the section and subsection headings in
1398 \begin_inset Newline newline
1409 \begin_layout Subsection
1413 \begin_layout Standard
1415 has several different environments for typesetting lists.
1416 The various list environments free you from hitting
1420 a million times when writing an outline, or from renumbering a whole list
1421 when you want to add a point in the middle of the list.
1422 Different types of documents logically require different list environments:
1425 \begin_layout Itemize
1426 A slide presentation might use the
1430 environment's bulleted lists to describe different points.
1433 \begin_layout Itemize
1434 An outline would use the
1438 environment's numbered lists (and lettered sublists).
1441 \begin_layout Itemize
1442 A document describing several software packages could use the
1446 environment, where each item in the list begins with a bold-faced word.
1449 \begin_layout Itemize
1458 ) environment is a variation on the
1465 \begin_layout Standard
1466 Let us write a list of reasons why \SpecialChar LyX
1467 is better than other word processors.
1468 Somewhere in your document, type:
1471 \begin_layout Standard
1475 is better than other word processors because:
1478 \begin_layout Standard
1495 arg "layout Itemize"
1501 \begin_inset Quotes eld
1505 \begin_inset Quotes erd
1509 Type in your reasons:
1512 \begin_layout LyX-Code
1513 Typesetting is done for you.
1516 \begin_layout LyX-Code
1520 \begin_layout LyX-Code
1521 Lists are very easy to create!
1524 \begin_layout Standard
1525 List environments, unlike headings, do not end when you type
1530 Instead, \SpecialChar LyX
1531 assumes you are going on to the next item in the list.
1532 The above will therefore result in a three-item list.
1533 If you want more than one paragraph within one list
1537 , one way is to use the
1540 \begin_inset space ~
1545 , which you get by typing
1550 In order to get out of the list, you need to reselect the
1554 environment (or just use the key binding
1557 arg "layout Standard"
1563 \begin_layout Standard
1564 You now have a beautiful itemized list.
1565 You might want to run \SpecialChar LaTeX
1566 to see how the list looks when printed out.
1567 But what if you wanted to number the reasons? Well, just select the whole
1572 \begin_layout Plain Layout
1574 will not let you select the first bullet (or the actual number in a numbered
1575 section title) unless you also select the paragraph
1579 it, which you probably do not want to do.
1580 This is on purpose because the bullet or number depends on the document
1581 settings or text position, respectively.
1597 arg "layout Enumerate"
1601 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1602 will fix the numbering.
1605 \begin_layout Standard
1606 While the list is still selected, you can change to the other two list environme
1614 \begin_inset space \thinspace{}
1620 \begin_inset space \thinspace{}
1630 arg "layout Description"
1639 ), in order to see what they look like.
1640 For those two environments, each list item is made up of a term, which
1641 is the item's first word, followed by a definition, which is the rest of
1642 the paragraph (until you hit
1647 The term is either typeset in boldface (
1652 \begin_inset Quotes eld
1656 \begin_inset Quotes erd
1663 \begin_layout Plain Layout
1664 But a typesetter's tab, which will change to fit the size of the largest
1665 term, not a pathetic, rigid, unchangeable typewriter
1678 ) from the rest of the paragraph.
1679 If you want to have more than one word in the definition, then separate
1683 \begin_inset space ~
1691 \begin_layout Labeling
1692 \labelwidthstring 00.00.0000
1697 : Typeset the list in
1702 \begin_layout Standard
1703 You can nest lists within each other in all sorts of interesting ways.
1704 An obvious example would be writing outlines.
1705 Numbered and bulleted lists will have different numbering and bulleting
1706 schemes for sublists.
1711 for details on the different sorts of lists and for examples of nestings.
1714 \begin_layout Subsection
1715 Other environments: Verses, Quotations, and more
1718 \begin_layout Standard
1719 There are two environments for setting quotations apart from surrounding
1724 for short quotes and
1738 \begin_layout Plain Layout
1739 used in this Tutorial for the long typing examples
1748 font; this environment is the only place in \SpecialChar LyX
1749 where you are allowed to use
1750 multiple spaces to allow code indenting.
1751 You can even write poetry using the
1759 to separate stanzas, and
1763 to separate lines within a stanza.
1768 for more complete descriptions of all of the available \SpecialChar LyX
1772 \begin_layout Labeling
1773 \labelwidthstring 00.00.0000
1778 : Correctly typeset the
1780 Quote, \SpecialChar LyX
1788 \begin_inset Newline newline
1796 \begin_layout Chapter
1800 \begin_layout Standard
1801 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1803 It introduced you to the basic editing operations in \SpecialChar LyX
1804 , as well as the powerful
1805 method of writing with environments.
1806 Most people who use \SpecialChar LyX
1807 , though, will want to write documents: papers, articles,
1808 books, manuals, or letters.
1809 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1811 a complete document.
1812 It will introduce you to text classes, which allow you to write different
1814 It will then describe many of the additions that turn text into a document,
1815 such as titles, footnotes, cross references, bibliographies, and tables
1819 \begin_layout Section
1821 \begin_inset CommandInset label
1823 name "sec:Document-Classes"
1830 \begin_layout Standard
1831 Different sorts of documents should be typeset differently.
1832 For example, books are generally printed double-sided, while articles are
1834 In addition, many documents contain special environments: letters contain
1835 some environments — such as the sender's address and the signature — which
1836 do not make sense in a book or article.
1837 The \SpecialChar LyX
1846 \begin_layout Plain Layout
1847 for \SpecialChar LaTeX
1848 users: this is equivalent to the \SpecialChar LaTeX
1854 takes care of these large scale differences between different sorts of
1856 This Tutorial, for example, was written in the
1861 Document classes are another major part of the WYSIWYM philosophy; they
1862 tell \SpecialChar LyX
1863 how to typeset the document, so you do not need to know how.
1866 \begin_layout Standard
1867 Your document is probably being written in the
1875 \begin_layout Plain Layout
1876 That is usually the default document class
1881 Try changing to other document classes (using the
1883 Document\SpecialChar menuseparator
1886 dialog) to see how they are typeset differently.
1887 If you change your document to the
1891 document class and look at the
1895 box, you will see that most of the allowed environments are the same.
1896 However, you can now use the
1901 If you are ever unsure about which environments you can use in a given
1902 document class, just consult the
1909 \begin_layout Standard
1910 Font sizes, one- or two-column printing, and page headings are just some
1911 of the ways journals' typesettings differ from one another.
1912 As the Computer Age continues to mature, journals have begun accepting
1913 electronic submissions, creating \SpecialChar LaTeX
1915 \begin_inset Quotes eld
1919 \begin_inset Quotes erd
1922 so that authors can submit correctly typeset articles.
1924 is set up to support this as well.
1925 For example, \SpecialChar LyX
1926 supports typesetting (and extra environments) for the American
1927 Mathematics Society journals using the
1930 \begin_inset space ~
1938 \begin_layout Standard
1939 Here is a very quick reference to some of the document classes.
1942 Special Document Classes
1948 manual for many more details.
1951 \begin_layout Standard
1953 \begin_inset Tabular
1954 <lyxtabular version="3" rows="7" columns="2">
1955 <features tabularvalignment="middle">
1956 <column alignment="center" valignment="top" width="0pt">
1957 <column alignment="center" valignment="top" width="0pt">
1959 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1962 \begin_layout Plain Layout
1968 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1971 \begin_layout Plain Layout
1979 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1982 \begin_layout Plain Layout
1988 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1991 \begin_layout Plain Layout
1992 one-sided, no chapters
1999 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2002 \begin_layout Plain Layout
2008 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2011 \begin_layout Plain Layout
2012 layout & environments for American Math Society
2019 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2022 \begin_layout Plain Layout
2028 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2031 \begin_layout Plain Layout
2032 longer than article, two-sided
2039 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2042 \begin_layout Plain Layout
2048 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2051 \begin_layout Plain Layout
2052 report + front and back matter
2059 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2062 \begin_layout Plain Layout
2068 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2071 \begin_layout Plain Layout
2079 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2082 \begin_layout Plain Layout
2088 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2091 \begin_layout Plain Layout
2092 lots of extra environments for address, signature\SpecialChar ldots
2106 \begin_layout Section
2107 Templates: Writing a Letter
2110 \begin_layout Standard
2111 One way to write a letter would be to open a new file, and choose a
2117 Document\SpecialChar menuseparator
2121 While this is the most obvious way to write a letter, it seems like extra
2123 Every time you write a business letter, you want to have your address,
2124 the address to which you are sending it, a body, a signature, etc.
2130 for letters, which contains a sample letter; once you have a template,
2131 you can just replace a couple of parts of the letter with your text each
2132 time you write a letter.
2135 \begin_layout Standard
2136 Open a new file with
2138 File\SpecialChar menuseparator
2140 \begin_inset space ~
2144 \begin_inset space ~
2155 Save and print the file to see how the various environments are typeset.
2158 \begin_layout Standard
2159 When you look at the
2163 box, you will see several environments, like the
2166 \begin_inset space ~
2171 environment, that do not exist in most other document classes.
2177 You can play around for a while to figure out how the various environments
2179 You will notice for example that the
2183 environment has the word
2184 \begin_inset Quotes eld
2188 \begin_inset Quotes erd
2191 in red before the actual text of the signature.
2192 This word does not show up in the actual letter, as you will see if you
2193 view/export the file.
2194 It is just there to let you know where the signature goes.
2195 Also, note that it does not matter where in the file the
2200 Remember, \SpecialChar LyX
2201 is WYSIWYM; you can put the
2205 environment anywhere you want, but \SpecialChar LyX
2206 knows that in the printout, the signature
2207 should be at the end.
2210 \begin_layout Standard
2211 A template is just a regular \SpecialChar LyX
2213 This means you can fill in your address and signature and save the file
2215 From now on, any time you want to write a letter, you can use the new template
2217 We do not have to suggest an actual
2218 \begin_inset Quotes eld
2222 \begin_inset Quotes erd
2225 here; just write a letter to someone!
2229 \begin_layout Plain Layout
2230 One warning, if you are writing from a template.
2231 If you erase all of the text in an environment — for example, if you erase
2235 \begin_inset space ~
2240 field so that you can replace it with your own — and then you move the
2241 cursor without writing any text, the environment may disappear.
2242 This is because most environments cannot exist without any text in them.
2243 Just reselect the environment from the
2255 \begin_layout Standard
2256 Templates can be a huge time-saver, and we urge you to use them whenever
2258 In addition, they can help a person learn how to use some of the fancier
2260 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2262 of less computer-aware users.
2263 When they are first learning \SpecialChar LyX
2264 , it will be less intimidating if they have
2265 a letter template customized for their company, for example.
2268 \begin_layout Standard
2269 \begin_inset Newpage newpage
2275 \begin_layout Section
2279 \begin_layout Standard
2281 (like \SpecialChar LaTeX
2282 ) considers the title — which may contain the actual title, the author,
2283 the date, and even an abstract of a paper — to be a separate part of the
2287 \begin_layout Standard
2288 Go back to your first \SpecialChar LyX
2289 document and make sure it is using the
2297 \begin_layout Plain Layout
2298 You should not be using the letter any more, since the
2302 document class does not allow titles.
2307 Type a title on the first line, and change the line to the
2312 On the next line, type your name and change it to the
2317 On the next line, write the date in the
2322 Type a paragraph or two summarizing your document using the
2327 Notice how the title is presented when it is printed out.
2328 If you change the document format to Book, you will get a separate title
2329 page, like the first page of this tutorial.
2332 \begin_layout Labeling
2333 \labelwidthstring 00.00.0000
2338 : Fix the title, date, and author in
2343 \begin_layout Section
2344 Labels and Cross-References
2347 \begin_layout Standard
2348 You can label section headings, list items, formulas, footnotes, and floats
2352 \begin_layout Plain Layout
2353 Floats are explained in the
2367 Once you do so, you can refer to the element in other parts of the document,
2368 using cross-references.
2369 You can refer to a section's number, to the page on which the section begins
2371 As with section numbering, \SpecialChar LyX
2372 also takes care of cross-reference numbering
2374 Automatic management of labels and cross-references is among the most significa
2375 nt advantages of \SpecialChar LyX
2376 (and \SpecialChar LaTeX
2377 ) over conventional word processors.
2380 \begin_layout Subsection
2384 \begin_layout Standard
2385 Go to our second section, whose title is
2386 \begin_inset Quotes eld
2390 \begin_inset Quotes erd
2394 Click at the end of the section title line, and select
2396 Insert\SpecialChar menuseparator
2399 or the toolbar button
2406 A dialog asks you for a label name, and gives you a suggestion.
2411 , the label name will be placed in a box next to the section title.
2414 \begin_layout Standard
2415 So far you have not done anything — the output will look exactly the same,
2416 since labels do not show up in the printed document.
2417 However, now that you have added a label, you can refer to that label with
2419 We will do that next.
2422 \begin_layout Subsection
2423 Your first cross-reference
2426 \begin_layout Standard
2427 Place the cursor somewhere in Section
2428 \begin_inset space ~
2435 \begin_layout LyX-Code
2436 If you want to know more about this document,
2437 \begin_inset Newline newline
2443 \begin_layout Standard
2444 Now, with the cursor before the final period, select
2446 Insert\SpecialChar menuseparator
2448 \begin_inset space ~
2453 or the toolbar button
2456 arg "dialog-show-new-inset ref"
2460 The Cross-reference dialog pops up.
2461 It shows a list of the possible labels you can reference.
2462 At the moment, there should be only one,
2463 \begin_inset Quotes eld
2466 sec:About-This-Document
2467 \begin_inset Quotes erd
2471 First, select the drop-down menu labeled
2472 \begin_inset Quotes eld
2476 \begin_inset Quotes erd
2480 \begin_inset Quotes eld
2484 \begin_inset Quotes erd
2489 \begin_inset Quotes eld
2492 sec:About-This-Document
2493 \begin_inset Quotes erd
2496 (it may be selected by default), and a reference marker will appear containing
2498 \begin_inset Quotes eld
2501 Ref: sec:About-This-Document
2502 \begin_inset Quotes erd
2505 (To be really correct, you should put a
2508 \begin_inset space ~
2516 arg "command-alternatives math-space ; space-insert protected"
2519 ) in between the word
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2527 and the reference.) An alternative way to reference a label is to right-click
2528 the label and select
2532 in the pop-up context menu.
2533 The cross-reference to this label is now in the clipboard and can be copied
2534 to the actual cursor position via the menu
2536 Edit\SpecialChar menuseparator
2546 In the printed document, this reference marker will be replaced with the
2548 Preview your document and you will see that \SpecialChar LaTeX
2549 has been even cleverer than
2552 \begin_inset Quotes eld
2556 \begin_inset Quotes erd
2562 \begin_layout Standard
2563 Conveniently, a cross-reference acts as a hyperlink when you are editing
2564 a document in \SpecialChar LyX
2565 ; clicking on it will pop up the
2572 \begin_inset space ~
2576 \begin_inset space ~
2581 will move the cursor to the referenced label.
2584 \begin_layout Subsection
2585 More fun with labels
2588 \begin_layout Standard
2589 We told you that \SpecialChar LyX
2590 takes care of numbering cross-references; now you can
2592 Add a new section before Section
2593 \begin_inset space ~
2597 Update the preview, and — voilà! — the section cross-reference changed
2599 \begin_inset Quotes eld
2603 \begin_inset Quotes erd
2606 ! Change the section
2607 \begin_inset Quotes eld
2611 \begin_inset Quotes erd
2614 to a subsection, and the cross-reference will reference Subsection
2615 \begin_inset space ~
2618 2.1 instead of Section
2619 \begin_inset space ~
2623 The page reference will not change unless you add a whole page of text
2624 before the label, of course.
2628 \begin_layout Standard
2629 If you want some more practice with labels, then try putting a new label
2630 where your first cross-reference was, and refer to that label from elsewhere
2632 If you will be inserting cross-references often, it may be convenient to
2640 \begin_layout Standard
2641 If you want to confirm that the cross-referencing gets the pages right even
2642 for larger documents,
2646 a couple pages of text from the
2650 to the clipboard, and
2654 them into your document.
2658 \begin_layout Plain Layout
2659 By the way, copying a chapter title may cause an error, because chapters
2660 are not allowed in the article class, see Section
2661 \begin_inset space ~
2665 \begin_inset CommandInset ref
2667 reference "sec:Document-Classes"
2672 If this happens, just delete the chapter title.
2680 \begin_layout Labeling
2681 \labelwidthstring 00.00.0000
2686 : Fix the references in
2691 \begin_layout Section
2692 Footnotes and Margin Notes
2695 \begin_layout Standard
2696 Footnotes can be added using the toolbar button
2699 arg "footnote-insert"
2704 Insert\SpecialChar menuseparator
2708 Click at the end of the word
2709 \begin_inset Quotes eld
2714 \begin_inset Quotes erd
2717 somewhere in your document and insert a footnote.
2718 A footnote box appears where you can enter the text of the footnote.
2720 should place the cursor at the beginning of the footnote box.
2724 \begin_layout LyX-Code
2726 is a typesetting word processor.
2729 \begin_layout Standard
2730 Now click on the button labeled
2731 \begin_inset Quotes eld
2735 \begin_inset Quotes erd
2739 The footnote box is closed, leaving the button showing where the footnote
2740 marker will be in the printed text; this is called
2741 \begin_inset Quotes eld
2745 \begin_inset Quotes erd
2749 You can unfold the footnote at any time and re-edit its text by clicking
2751 \begin_inset Quotes eld
2755 \begin_inset Quotes erd
2761 \begin_layout Standard
2762 A footnote can be cut and pasted like normal text.
2763 Go ahead; try it! All you need to do is select the footnote button
2767 \begin_layout Plain Layout
2768 It may be easier to select it using the keyboard.
2769 You might accidentally open the footnote if you are trying to select the
2770 marker itself with the mouse.
2784 In addition, you can change regular text to a footnote, by selecting it
2788 arg "footnote-insert"
2791 button; change a footnote to regular text by hitting the
2795 key when the cursor is in the first position of a footnote, or by hitting
2800 key when the cursor is in the very last position of the footnote.
2803 \begin_layout Standard
2804 Margin notes can be added using the menu
2806 Insert\SpecialChar menuseparator
2808 \begin_inset space ~
2813 or the toolbar button
2816 arg "marginalnote-insert"
2819 \SpecialChar endofsentence
2820 Margin notes are like footnotes, except that:
2823 \begin_layout Itemize
2824 the on-screen boxes say
2825 \begin_inset Quotes eld
2829 \begin_inset Quotes erd
2833 \begin_inset Quotes eld
2837 \begin_inset Quotes erd
2843 \begin_layout Itemize
2844 the notes will be placed in the margin, instead of below the text
2847 \begin_layout Itemize
2848 margin notes are not numbered
2851 \begin_layout Standard
2852 Change your \SpecialChar LyX
2853 footnote back to text, then select and change it to a margin
2855 Run \SpecialChar LaTeX
2856 again to see what the margin note looks like.
2859 \begin_layout Labeling
2860 \labelwidthstring 00.00.0000
2865 : Fix the footnote in
2870 \begin_layout Section
2872 \begin_inset CommandInset label
2874 name "sec:bibliographies"
2881 \begin_layout Standard
2882 Bibliographies are similar to cross-references.
2883 The bibliography contains a list of references at the end of the document,
2884 and they can be referenced from within the document.
2885 Like section titles, \SpecialChar LyX
2886 and \SpecialChar LaTeX
2887 make your job easier by automatically numbering
2888 the bibliography items and changing citations when the item numbers change.
2891 \begin_layout Standard
2892 Go to the end of the document and switch to the
2897 Now, each paragraph you type will be a reference.
2899 \begin_inset Quotes eld
2904 The Lyx Tutorial, by the \SpecialChar LyX
2908 \begin_inset Quotes erd
2911 as your first reference.
2912 Note that \SpecialChar LyX
2913 automatically puts a number in a box before each reference.
2914 Click on the boxed reference number, and the
2917 \begin_inset space ~
2927 is to refer to this reference within the \SpecialChar LyX
2937 is set (default), you will see the number of the bibliography in the output.
2943 \begin_inset Quotes eld
2947 \begin_inset Quotes erd
2950 to make it easy to remember.
2953 \begin_layout Standard
2954 Now pick somewhere in your document that you would like to insert a reference.
2957 Insert\SpecialChar menuseparator
2960 or the toolbar button
2963 arg "dialog-show-new-inset citation"
2972 The left panel in this dialog lists all the bibliography entries, and this
2973 field allows you to choose which bibliography item you want to cite.
2975 \begin_inset Quotes eld
2979 \begin_inset Quotes erd
2982 (right now, that is the only item in the bibliography), then use the
2986 button in the center to insert it.
2987 (You can have multiple citations in the same place by transferring a number
2992 \begin_layout Plain Layout
2993 If one uses label names for references that are easy to remember it is easier
2994 to find the entry in the list of references.
3004 Now preview your file and you will see that the citation appears in brackets
3005 in the text, referring to the bibliography at the end of the document.
3008 \begin_layout Standard
3012 \begin_inset space ~
3021 dialog will put a remark (such as a reference to a page or chapter within
3022 the referenced book or article) in the brackets after the reference.
3023 If you want the references to have labels instead of numbers in the printed
3024 output (for example, some journals would use
3025 \begin_inset Quotes eld
3029 \begin_inset Quotes erd
3032 to refer to a paper written by Smith in 1995), use the
3039 \begin_inset space ~
3052 \begin_layout Labeling
3053 \labelwidthstring 00.00.0000
3058 Fix the bibliography and citation in
3063 \begin_layout Section
3067 \begin_layout Standard
3068 You may want to put a table of contents at the beginning of your document.
3070 makes this easy to do.
3075 after your document title and before your first section title and select
3078 Insert\SpecialChar menuseparator
3080 \begin_inset space ~
3084 \begin_inset space ~
3087 TOC\SpecialChar menuseparator
3089 \begin_inset space ~
3093 \begin_inset space ~
3100 \begin_inset Quotes eld
3104 \begin_inset Quotes erd
3107 will appear in a button on the first line of the document.
3111 \begin_layout Standard
3112 This may not appear to be very useful.
3113 However, if you look at your preview, you will see that a table of contents
3114 has been generated, listing the various sections and subsections in your
3116 As usual, if you reorder sections or create new ones, you will see those
3117 changes in the preview when you update it.
3121 \begin_layout Standard
3122 The table of contents is not printed in the on-screen version of the document.
3123 But you can display the table of contents in a separate window by clicking
3124 on the table of contents button, or by using
3126 View\SpecialChar menuseparator
3128 \begin_inset space ~
3133 or the toolbar button
3136 arg "dialog-toggle toc"
3140 This menu will work even if you do not have a table of contents inset in
3142 This is a very useful tool for rearranging your document parts.
3143 Clicking on a (sub)section title in the
3147 window will highlight that line and move the display (in the \SpecialChar LyX
3149 to that place in the document.
3150 You can also use the arrow keys to move up and down in the table of contents.
3151 You may therefore find it convenient to leave this window open throughout
3153 You can get similar functionality from the
3157 menu, though, where the table of contents appears automatically.
3160 \begin_layout Standard
3161 To get rid of the Table of Contents, you can delete the table of contents
3162 button just like any other text.
3165 \begin_layout Labeling
3166 \labelwidthstring 00.00.0000
3171 : Fix the table of contents in
3176 \begin_layout Chapter
3180 \begin_layout Standard
3182 is used by many scientists because it outputs great looking equations,
3183 avoiding the control characters used by word processors and their equation
3185 Many of these scientists are frustrated, however, because writing equations
3186 in \SpecialChar LaTeX
3187 is more like programming than writing.
3188 Happily, \SpecialChar LyX
3189 has WYSIWYM support for equations.
3190 If you are used to \SpecialChar LaTeX
3191 , you will find that all of the usual \SpecialChar LaTeX
3193 can be typed in normally, but they will show up in a WYSIWYM fashion.
3194 If, on the other hand, you have never written in \SpecialChar LaTeX
3198 \begin_inset space ~
3203 will allow you to write professional-looking math quickly and easily.
3206 \begin_layout Section
3210 \begin_layout Standard
3211 Somewhere in your \SpecialChar LyX
3215 \begin_layout LyX-Code
3216 I like what Einstein said, E=mc^2, because it is
3217 \begin_inset Newline linebreak
3223 \begin_layout Standard
3224 Now, that equation does not look very good in \SpecialChar LyX
3225 and in the output; there
3226 is no space between the letters and the equals sign, and you would like
3227 to write an actual superscript for the
3228 \begin_inset Quotes eld
3232 \begin_inset Quotes erd
3236 That bad typesetting happened because we did not tell \SpecialChar LyX
3237 that we were writing
3238 a mathematical expression, so it typeset the equation like regular old
3242 \begin_layout Standard
3243 But we can create a formula that will be typeset properly.
3244 Highlight the equation and click the toolbar button
3252 Insert\SpecialChar menuseparator
3253 Math\SpecialChar menuseparator
3255 \begin_inset space ~
3261 If nothing is highlighted \SpecialChar LyX
3262 inserts a little blue square, which is an empty
3264 The expression appears in blue and the blue square disappears as soon as
3265 the formula is not empty.
3270 to leave the equation.
3271 The purple markers disappear, leaving the cursor to the right of the expression.
3272 Now, if you type something, it will be regular text.
3275 \begin_layout Standard
3276 Looking at the output you will notice that the expression was typeset nicely,
3277 with spaces between the letters and the equals sign, and a superscript
3279 \begin_inset Quotes eld
3283 \begin_inset Quotes erd
3287 Letters in math mode are assumed to be variables, and come out in italics.
3288 Numbers are just numbers.
3291 \begin_layout Standard
3292 This math editor is another example of the WYSIWYM philosophy.
3293 In \SpecialChar LaTeX
3294 , you write a mathematical expression using text and commands like
3300 ; this can be frustrating, because you cannot see what an expression looks
3301 like until you run the file under \SpecialChar LaTeX
3302 and you may have to spend time, for
3303 example, finding missing brackets.
3305 does not attempt to get the expression to look perfect (WYSIWYG), but
3306 it gives you an extremely good idea of what the expression will look like.
3308 then takes care of the professional typesetting.
3311 \begin_layout Section
3312 Navigating an Equation
3315 \begin_layout Standard
3317 \begin_inset Formula $E=mc^{2}$
3321 \begin_inset Formula $E=1+mc^{2}$
3325 Use the arrow keys to move the cursor into the expression.
3326 Note that when you enter the expression, the purple markers appear to let
3327 you know you are editing math.
3336 to move the cursor past the equals sign, and just type
3337 \begin_inset Quotes eld
3341 \begin_inset Quotes erd
3345 Again, you can use the arrow keys or
3349 to leave the formula\SpecialChar endofsentence
3353 \begin_layout Standard
3354 Other than the special keys described below, typing in math mode is like
3355 editing regular text.
3365 Select text either with the arrow keys or with the mouse.
3368 Edit\SpecialChar menuseparator
3371 works in math mode as well as cut and paste.
3372 One thing to be careful of: if you are left or right outside a formula
3381 respectively, you delete the whole formula.
3382 Luckily, you can just use
3389 \begin_layout Standard
3390 What if you want to change
3391 \begin_inset Formula $E=mc^{2}$
3395 \begin_inset Formula $E=mc^{2.5}+1$
3398 ? Again, you can use the mouse to click in the right place.
3399 However, you can also use the arrow keys.
3400 If the cursor is just after the
3401 \begin_inset Quotes eld
3405 \begin_inset Quotes erd
3409 \begin_inset Quotes eld
3413 \begin_inset Quotes erd
3420 and the cursor is moved to the level of the superscript, just before the
3422 \begin_inset Quotes eld
3426 \begin_inset Quotes erd
3431 \begin_inset Quotes eld
3435 \begin_inset Quotes erd
3443 will move the cursor back to the regular level.
3452 , the cursor will be placed
3456 the superscript (so that you can then type the
3457 \begin_inset Quotes eld
3461 \begin_inset Quotes erd
3467 \begin_layout Section
3468 Exponents and Indices
3471 \begin_layout Standard
3472 An exponent can be entered from the
3475 \begin_inset space ~
3480 (see below), but it is actually simpler just to type the caret key,
3481 \begin_inset Quotes eld
3485 \begin_inset Quotes erd
3490 will place another blue rectangle in the superscript, so that whatever
3491 you write next will be superscripted, and in a smaller font size.
3492 Everything you type until you hit a
3500 to exit the formula entirely) will be in the superscript.
3503 \begin_layout Standard
3504 Writing a subscript (index) is just as easy; start one by typing the underscore
3506 \begin_inset Quotes eld
3510 \begin_inset Quotes erd
3514 You can subscript and superscript both subscripts and superscripts like
3516 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3523 \begin_layout Labeling
3524 \labelwidthstring 00.00.0000
3530 \begin_inset space ~
3540 \begin_layout Section
3544 \begin_layout Standard
3548 \begin_inset space ~
3553 is a convenient way to enter symbols and/or to perform complicated formula
3555 Many of these operations can be accomplished from the keyboard or the
3557 Insert\SpecialChar menuseparator
3562 Edit\SpecialChar menuseparator
3565 menus (the latter only appears when you are in Math mode).
3566 However, we are going to concentrate on using the
3569 \begin_inset space ~
3574 , just to let you know what is out there; you can learn keyboard shortcuts
3575 and commands later from the
3582 \begin_layout Standard
3586 \begin_inset space ~
3591 is shown when the cursor is in a formula and can also be turned on manually
3594 View\SpecialChar menuseparator
3598 When you click there on
3599 \begin_inset Quotes eld
3603 \begin_inset Quotes erd
3609 arg "toolbar-toggle math"
3612 ) the toolbar will be shown permanently at the bottom; this state is visualized
3617 menu with a checkmark.
3618 When you click in this state again on
3619 \begin_inset Quotes eld
3623 \begin_inset Quotes erd
3633 \begin_inset space ~
3638 is only shown when the cursor is within a formula; this state is visualized
3639 by the renaming of the menu entry from
3640 \begin_inset Quotes eld
3644 \begin_inset Quotes erd
3648 \begin_inset Quotes eld
3652 \begin_inset space ~
3656 \begin_inset Quotes erd
3662 \begin_layout Subsection
3666 \begin_layout Standard
3670 \begin_inset space ~
3675 allows you to choose from a large array of symbols used in math: operators,
3676 arrows, relationships, delimiters, special characters, sums and integrals.
3677 Note that subscripting and superscripting allow you to put lower and upper
3678 limits on sums and integrals.
3681 \begin_layout Subsection
3682 Roots, decorations, and delimiters
3685 \begin_layout Standard
3686 To type a square root, just click on the button
3689 arg "math-insert \\sqrt"
3693 The square root appears, and the cursor is in a new insertion point inside
3695 You can type variables, numbers, other square roots, fractions, whatever
3698 will automatically resize the square root to fit what is inside.
3701 \begin_layout Standard
3703 \begin_inset Quotes eld
3707 \begin_inset Quotes erd
3711 \begin_inset Formula $\overrightarrow{a}$
3714 ) or group of characters (
3715 \begin_inset Formula $\overrightarrow{a+b}$
3718 ) is done similarly.
3719 Decorations are available from the toolbar via the button
3722 arg "math-insert \\hat"
3726 Click on a decoration, and \SpecialChar LyX
3727 will insert that decoration with an insertion
3728 point under (or over) it.
3729 Just type what you want in the insertion point.
3730 There are two sets of decorations: those that resize with the text you
3731 type, and those that have a fixed size, and are most appropriate for a
3736 \begin_layout Standard
3737 Delimiters such as parentheses, brackets, and braces work similarly, but
3738 are a bit more complicated.
3739 Hit the delimiter button
3742 arg "dialog-show mathdelimiter"
3750 Your current selection of delimiters is displayed in a box.
3751 It is a pair of parentheses by default, but you can choose a pair of braces,
3752 a brace and a parenthesis, or choose the empty square to have something
3754 \begin_inset Quotes eld
3758 \begin_inset Formula $a=\left\langle 7\right.$
3762 \begin_inset Quotes erd
3765 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3770 \begin_layout Standard
3771 If you are lazy, you can type actual parentheses in math mode, rather than
3777 However, those parentheses will be the same size as regular text, which
3778 will look bad if you have a big fraction or matrix inside the parentheses.
3779 So it is better to use one of the three delimiter buttons that insert them
3780 directly, for example
3783 arg "math-delim ( )"
3789 \begin_layout Standard
3790 You can also put delimiters or a square root sign or a decoration on already
3791 existing formula parts.
3792 Select the portion of the formula that you want to adjust, and then click
3793 on the button you want from the
3796 \begin_inset space ~
3802 Try using this to change Newton's second law from scalar to vector form
3804 \begin_inset Formula $f=ma$
3808 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3812 Once you have learned about matrices, this is how you will put parentheses
3813 or brackets around them.
3816 \begin_layout Subsection
3820 \begin_layout Standard
3821 To create a fraction, click on the fraction button
3824 arg "math-insert \\frac-square"
3830 \begin_inset space ~
3837 writes two insertion points in a fraction.
3838 As you would expect, you can use arrow keys or the mouse to move around
3840 Click on the top square and type
3841 \begin_inset Quotes eld
3845 \begin_inset Quotes erd
3854 \begin_inset Quotes eld
3858 \begin_inset Quotes erd
3862 You have made a fraction! Of course you can type anything within each of
3863 the two boxes: variables with exponents, square roots, other fractions,
3868 \begin_layout Labeling
3869 \labelwidthstring 00.00.0000
3875 \begin_inset space ~
3885 \begin_layout Subsection
3886 Functions: lim, log, sin and others
3889 \begin_layout Standard
3890 Because letters in math mode are considered to be variables, if you type
3892 \begin_inset Quotes eld
3896 \begin_inset Quotes erd
3899 in math mode, \SpecialChar LyX
3900 thinks you are typing the product of the three variables
3902 \begin_inset Formula $s$
3906 \begin_inset Formula $i$
3910 \begin_inset Formula $n$
3914 The three letters will be typeset in italics, when what you really wanted
3916 \begin_inset Quotes eld
3920 \begin_inset Quotes erd
3924 In addition, \SpecialChar LyX
3925 will not put a space between the word
3926 \begin_inset Quotes eld
3930 \begin_inset Quotes erd
3934 \begin_inset Quotes eld
3938 \begin_inset Quotes erd
3945 will exit the formula).
3947 \begin_inset Quotes eld
3951 \begin_inset Formula $\sin(x)$
3955 \begin_inset Quotes erd
3959 \begin_inset Quotes eld
3963 \begin_inset Formula $sin(x)$
3967 \begin_inset Quotes erd
3973 \begin_layout Standard
3977 \begin_inset space ~
3985 arg "math-insert \\functions"
3989 \begin_inset Quotes eld
3993 \begin_inset Quotes erd
3996 in the pop-up function list.
3998 \begin_inset Quotes eld
4002 \begin_inset Quotes erd
4005 is displayed in \SpecialChar LyX
4006 in black, and set in upright roman type.
4007 The whole word is treated as one symbol, so if you type
4011 , it will delete the whole word.
4013 \begin_inset Quotes eld
4017 \begin_inset Quotes erd
4020 , which will be written in blue italics, like you expect in a formula.
4021 In the output, the expression will be correctly typeset.
4025 \begin_layout Standard
4026 The function list includes other trigonometric functions and their inverses,
4027 hyperbolic functions, logarithms, limits, and quite a few others.
4028 These functions can take subscripts and superscripts, important for typing
4030 \begin_inset Quotes eld
4034 \begin_inset Formula $\cos^{2}\theta$
4038 \begin_inset Quotes erd
4042 \begin_inset Quotes eld
4046 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4050 \begin_inset Quotes erd
4056 \begin_layout Labeling
4057 \labelwidthstring 00.00.0000
4063 \begin_inset space ~
4073 \begin_layout Subsection
4077 \begin_layout Standard
4078 Click on the matrix button
4081 arg "dialog-show mathmatrix"
4087 \begin_inset space ~
4093 A pop-up dialog allows you to choose how many rows and columns you want
4095 Choose 2 rows and 3 columns and hit
4101 prints 6 insertion points in a
4102 \begin_inset Formula $2\times3$
4106 As usual, you can put any sort of formula expression (a square root, another
4107 matrix, etc.) in each insertion point.
4108 You can also leave some of the insertion points empty if you want.
4111 \begin_layout Standard
4116 can be used to move horizontally between the columns of a matrix.
4117 Alternatively, you can use the arrow keys to move around - hitting
4121 at the end of one box will move to the next box,
4125 will move to the next row, etc.
4128 \begin_layout Standard
4129 If you need to change the number of rows and columns, use the menu
4131 Edit\SpecialChar menuseparator
4133 \begin_inset space \thinspace{}
4137 \begin_inset space \thinspace{}
4142 or the math toolbar buttons
4145 arg "tabular-feature append-row"
4151 arg "tabular-feature delete-row"
4157 arg "tabular-feature append-column"
4163 arg "tabular-feature delete-column"
4169 \begin_layout Standard
4174 for information on how to change the horizontal alignment of each column,
4175 and how to change the vertical position of the whole matrix.
4176 Note that if you want to write a table containing text, you should use
4178 's wonderful table support, rather than trying to write text in a matrix.
4181 \begin_layout Subsection
4185 \begin_layout Standard
4186 All of the expressions we have written so far have been on the same line
4187 as the text that came before and after them, otherwise known as inline
4189 This is fine for short, simple expressions, but if you want to write larger
4190 ones, or if you want your expressions to stand out from the text, you need
4191 to write them in display mode.
4192 In addition, only displayed expressions can be labeled and numbered (see
4197 ), and multi-line equations must be in display mode.
4200 \begin_layout Standard
4201 While being in a formula, click on the display button
4212 This centers the formula and adds a blank line before and after it.
4213 Now type in an expression and compile your file to see how it looks.
4214 The display button is actually a toggle; use it now to change a couple
4215 of your expressions to display mode and back.
4219 \begin_layout Standard
4220 Display mode has a couple differences from inline mode:
4223 \begin_layout Itemize
4224 The default font is larger for a few symbols, like
4225 \begin_inset Formula $\sum$
4229 \begin_inset Formula $\int$
4235 \begin_layout Itemize
4236 Subscripts and superscripts for limits and sums (but not integrals) are
4237 written under and over rather than next to the symbols
4240 \begin_layout Itemize
4244 \begin_layout Standard
4245 Other than these differences, though, displayed expressions and inline expressio
4246 ns are very similar.
4249 \begin_layout Standard
4250 One final note about the way displayed formulas are typeset: be careful
4251 about whether you are putting your equation into a new paragraph or not.
4252 If your formula is in the middle of a sentence or paragraph, then do not
4258 Doing so will cause the text
4262 the formula to start a new paragraph.
4263 That text will be indented or follow a blank line, depending on your document
4264 paragraph settings, which is probably not what you want.
4267 \begin_layout Labeling
4268 \labelwidthstring 00.00.0000
4273 : Put the various equations in
4277 into display mode, and see how they are typeset differently.
4280 \begin_layout Labeling
4281 \labelwidthstring 00.00.0000
4286 : Using various tools you have learned in this section, you should be able
4287 to write an equation like:
4291 \begin_layout Plain Layout
4292 After you have done it the hard way, give
4294 Insert\SpecialChar menuseparator
4295 Math\SpecialChar menuseparator
4297 \begin_inset space ~
4308 \begin_inset Formula
4310 f(x)=\left\{ \begin{array}{cc}
4313 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4322 \begin_layout Section
4326 \begin_layout Standard
4327 Now you are familiar with the basics.
4329 's math editor can do a lot more.
4330 You can refer to the
4334 manual for tips on how to:
4337 \begin_layout Itemize
4338 Label and number expressions.
4341 \begin_layout Itemize
4342 Create multi-line equations.
4345 \begin_layout Itemize
4346 Change typefaces, e.
4347 \begin_inset space \thinspace{}
4351 \begin_inset space \space{}
4354 to write bold-face text in an expression.
4357 \begin_layout Itemize
4358 Fine-tune font sizes and spacing within an expression.
4359 (Do not worry about this until your final draft!)
4362 \begin_layout Itemize
4364 These are very powerful, because you just define them once at the top of
4365 the document, and then you can use them throughout the document.
4368 \begin_layout Itemize
4369 Do almost all you can do with math.
4372 \begin_layout Chapter
4376 \begin_layout Section
4377 Other major \SpecialChar LyX
4381 \begin_layout Standard
4382 We have not gone through all the possible commands in \SpecialChar LyX
4383 , and we are not planning
4392 \begin_inset space ~
4397 manual for more information.
4398 We will just mention a couple more major things \SpecialChar LyX
4402 \begin_layout Itemize
4404 has WYSIWYM support for tables.
4407 Insert\SpecialChar menuseparator
4413 arg "tabular-insert"
4417 Click on the table with the
4424 \begin_inset space ~
4429 dialog box which allows extensive table editing.
4433 arg "toolbar-toggle table"
4436 the table toolbar will appear permanently.
4439 \begin_layout Itemize
4441 also supports including pictures in any format within documents.
4444 Insert\SpecialChar menuseparator
4450 arg "dialog-show-new-inset graphics"
4454 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4455 can have captions, and \SpecialChar LyX
4456 will automatically generate lists of figures and/or
4460 \begin_layout Itemize
4462 is heavily configurable.
4463 Everything from how the \SpecialChar LyX
4464 window looks to how the output comes out can be
4465 configured in a number of ways.
4466 Much configuration is done through
4468 Tools\SpecialChar menuseparator
4472 For more information on this, check out
4474 Help\SpecialChar menuseparator
4475 Customization\SpecialChar endofsentence
4479 \begin_layout Itemize
4481 is being developed by a team of programmers on five continents.
4482 Therefore, \SpecialChar LyX
4483 has better support for non-English languages (such as Dutch,
4484 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4485 ) than many word processors.
4486 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4487 languages Chinese Japanese, and Korean are supported.
4488 You can write documents in other languages and you can also configure \SpecialChar LyX
4490 to show its menus and error messages in other languages.
4494 \begin_layout Itemize
4495 The \SpecialChar LyX
4496 menus feature keybindings.
4497 This means that you can do
4499 File\SpecialChar menuseparator
4510 or by using the binding which is shown next to it in the menu (
4517 Keybindings are also configurable.
4518 For information on this, check out
4520 Help\SpecialChar menuseparator
4521 Customization\SpecialChar endofsentence
4525 \begin_layout Itemize
4527 can read \SpecialChar LaTeX
4530 \begin_inset space ~
4534 \begin_inset CommandInset ref
4536 reference "sec:tex2lyx"
4543 \begin_layout Itemize
4544 Spell-checking, thesaurus, and word count facilities are available.
4547 \begin_layout Itemize
4548 Generation of indexes and nomenclatures/glossaries is supported.
4551 \begin_layout Section
4553 for \SpecialChar LaTeX
4555 \begin_inset CommandInset label
4557 name "sec:latexusers"
4564 \begin_layout Standard
4565 If you do not know anything about \SpecialChar LaTeX
4566 , you do not have to read this section.
4567 Actually, you might want to
4571 about \SpecialChar LaTeX
4572 , and then read this chapter.
4573 However, some of those who begin to use \SpecialChar LyX
4574 will be familiar with \SpecialChar LaTeX
4576 If you are such a person, you may be wondering if \SpecialChar LyX
4577 can really do everything
4580 The short answer is that \SpecialChar LyX
4581 can do pretty much everything \SpecialChar LaTeX
4583 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4588 \begin_layout Standard
4589 Because this is just a tutorial, we are only going to mention things that
4590 new \SpecialChar LyX
4591 users will most likely be interested in.
4592 In the interests of keeping the Tutorial short, we will give only minimal
4597 \begin_inset space ~
4605 \begin_inset space ~
4610 manuals have a great deal of information on differences between \SpecialChar LyX
4611 and \SpecialChar LaTeX
4613 and how to do various \SpecialChar LaTeX
4614 tricks in \SpecialChar LyX
4618 \begin_layout Subsection
4623 \begin_layout Standard
4624 Anything that you enter in \SpecialChar TeX
4625 mode will be passed straight to \SpecialChar LaTeX
4627 displayed in red on the screen.
4628 You can use \SpecialChar TeX
4629 commands in \SpecialChar LyX
4632 Insert\SpecialChar menuseparator
4634 \begin_inset space ~
4646 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4650 \begin_layout Standard
4651 In a math formula, \SpecialChar TeX
4652 mode is handled a bit differently.
4654 mode is entered there by typing a backslash.
4655 The backslash is not written out, but anything you type afterwards will
4657 You exit \SpecialChar TeX
4662 or some other non-alphabetic character, like a number, underscore, caret
4664 Once you exit \SpecialChar TeX
4665 mode, if \SpecialChar LyX
4666 knows the \SpecialChar TeX
4667 command you have typed in, it will
4668 convert it to WYSIWYM\SpecialChar endofsentence
4670 \begin_inset Quotes eld
4680 \begin_inset Quotes erd
4683 in a formula and then press
4689 \begin_inset Quotes eld
4693 \begin_inset Quotes erd
4697 \begin_inset Quotes eld
4701 \begin_inset Formula $\gamma$
4705 \begin_inset Quotes erd
4709 This will work for almost all, non-complicated math macros.
4710 This may be faster than using the
4713 \begin_inset space ~
4718 , and will be especially convenient for experienced \SpecialChar LaTeX
4722 \begin_layout Standard
4723 As a special case, if you type
4724 \begin_inset Quotes eld
4734 \begin_inset Quotes erd
4737 in a formula, the beginning
4741 ending braces will be inserted in red while the cursor is placed between
4743 This makes it more convenient to type those commands that take an argument.
4746 \begin_layout Standard
4748 cannot do absolutely everything that \SpecialChar LaTeX
4750 Some fancy functions are not supported at all, while some work but are
4753 mode allows users to get the full flexibility of \SpecialChar LaTeX
4754 , while having all the
4755 convenient features of \SpecialChar LyX
4756 , like WYSIWYM math, tables, and editing.
4758 could never support every \SpecialChar LaTeX
4766 in the preamble (see Section
4767 \begin_inset space ~
4771 \begin_inset CommandInset ref
4773 reference "sec:preamble"
4777 ), you can use any package you want — although you will not have WYSIWYM
4778 support for that package's features.
4781 \begin_layout Subsection
4782 Importing \SpecialChar LaTeX
4788 \begin_inset CommandInset label
4797 \begin_layout Standard
4798 You can import a \SpecialChar LaTeX
4799 file into \SpecialChar LyX
4802 File\SpecialChar menuseparator
4803 Import\SpecialChar menuseparator
4805 \begin_inset space ~
4810 menu in \SpecialChar LyX
4812 This will call the program
4816 which will create a file foo.lyx from the file foo.tex.
4818 will then open that file.
4819 If the translation does not work, you can try calling
4823 from the command line, possibly using fancier options.
4826 \begin_layout Standard
4827 Even when the translation does work,
4831 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4833 It will leave things it does not understand in \SpecialChar TeX
4834 mode; so, after translating
4839 , you can look for the red text and manually edit it to get it right.
4842 \begin_layout Standard
4847 has its own documentation (manpage), which Unix/Linux users can access
4848 via the console command
4851 \begin_inset space ~
4857 The manpage describes which \SpecialChar LaTeX
4858 commands and environments are not supported,
4859 what bugs you might run into (and how to get around them), and how to use
4860 the various options.
4863 \begin_layout Standard
4864 It is important to understand that
4868 can only translate files whose document class is
4869 \begin_inset Quotes eld
4873 \begin_inset Quotes erd
4877 , that is, for which there is a corresponding \SpecialChar LyX
4883 If there is no layout file, then you will get an error saying that the
4884 conversion could not be performed.
4885 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4890 simply will not know how to translate the \SpecialChar LaTeX
4891 that it finds there into things
4894 More about layout files and how they are created is explained in detail
4902 \begin_layout Subsection
4903 Converting \SpecialChar LyX
4904 Documents to \SpecialChar LaTeX
4908 \begin_layout Standard
4909 You might wish to convert a \SpecialChar LyX
4910 Document to a \SpecialChar LaTeX
4912 For example, a co-worker or co-author who does not have \SpecialChar LyX
4917 File\SpecialChar menuseparator
4918 Export\SpecialChar menuseparator
4922 This will create a file
4930 file you are editing.
4933 \begin_layout Subsection
4938 \begin_layout Subsubsection
4942 \begin_layout Standard
4945 Document\SpecialChar menuseparator
4948 dialog takes care of the document-wide options, such as changing the document
4949 class, default font size and paper size.
4950 Document class options and also options for \SpecialChar LaTeX
4951 packages can be entered there
4955 \begin_inset space ~
4963 \begin_layout Subsubsection
4964 Other Preamble Matter
4965 \begin_inset CommandInset label
4974 \begin_layout Standard
4975 If you have special commands to put in the preamble of a \SpecialChar LaTeX
4977 use them in a \SpecialChar LyX
4981 Document\SpecialChar menuseparator
4982 Settings\SpecialChar menuseparator
4984 \begin_inset space ~
4989 and type in the dialog window (or from the document settings dialog, depending
4991 Anything you type will (as with \SpecialChar TeX
4992 mode) be sent directly to \SpecialChar LaTeX
4996 \begin_layout Subsection
5001 \begin_layout Standard
5003 has support for Bib\SpecialChar TeX
5004 , which allows you to build databases of bibliographical
5005 references to be used in multiple documents.
5008 Insert\SpecialChar menuseparator
5010 \begin_inset space \thinspace{}
5014 \begin_inset space \thinspace{}
5017 TOC\SpecialChar menuseparator
5019 \begin_inset space ~
5034 field you load Bib\SpecialChar TeX
5039 field you can load Bib\SpecialChar TeX
5043 \begin_layout Standard
5044 After you have done this, you can use citations from any bibliographies
5045 you have included with
5047 Insert\SpecialChar menuseparator
5051 \begin_inset space ~
5055 \begin_inset CommandInset ref
5057 reference "sec:bibliographies"
5066 dialog will show a list of all the references in your
5074 \begin_layout Section
5078 \begin_layout Standard
5079 Sometimes when you try to view a document, there will be errors, things
5080 that \SpecialChar LyX
5081 or \SpecialChar LaTeX
5083 When this happens, \SpecialChar LyX
5088 \begin_inset space ~
5094 Clicking on individual errors in this dialog will take you to the place
5095 in the \SpecialChar LyX
5096 document where the error occurs and also display the detailed \SpecialChar LaTeX