1 #LyX 2.3 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
8 \use_default_options false
12 \maintain_unincluded_children false
14 \language_package default
17 \font_roman "palatino" "default"
18 \font_sans "helvet" "default"
19 \font_typewriter "courier" "default"
20 \font_math "auto" "auto"
21 \font_default_family default
22 \use_non_tex_fonts false
25 \font_sf_scale 100 100
26 \font_tt_scale 100 100
28 \use_dash_ligatures false
30 \default_output_format pdf2
32 \bibtex_command default
33 \index_command default
37 \pdf_title "The LyX Tutorial"
38 \pdf_author "LyX Team"
39 \pdf_subject "LyX-documentation Tutorial"
40 \pdf_keywords "LyX, documentation"
42 \pdf_bookmarksnumbered true
43 \pdf_bookmarksopen true
44 \pdf_bookmarksopenlevel 1
49 \pdf_pdfusetitle false
50 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
53 \use_package amsmath 1
54 \use_package amssymb 1
57 \use_package mathdots 1
58 \use_package mathtools 1
60 \use_package stackrel 1
61 \use_package stmaryrd 1
62 \use_package undertilde 1
64 \cite_engine_type default
68 \paperorientation portrait
79 \paragraph_separation indent
80 \paragraph_indentation default
82 \math_numbering_side default
87 \paperpagestyle headings
88 \tracking_changes false
103 by the \SpecialChar LyX
108 \begin_layout Plain Layout
110 If you have comments on or corrections to this documentation, please send
111 them to the \SpecialChar LyX
112 Documentation mailing list:
113 \begin_inset CommandInset href
115 target "lyx-docs@lists.lyx.org"
129 \begin_layout Standard
130 \begin_inset CommandInset toc
131 LatexCommand tableofcontents
138 \begin_layout Chapter
142 \begin_layout Section
143 Welcome to \SpecialChar LyX
147 \begin_layout Standard
148 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
151 Now, do not panic – you will not need to learn \SpecialChar LaTeX
152 to use \SpecialChar LyX
154 That is, after all, the whole point of \SpecialChar LyX
155 : to provide an almost-WYSIWYG interface
156 to \SpecialChar LaTeX
158 There are some things you will need to learn, however, in order to use
163 \begin_layout Standard
164 Some of you probably found your way to this document because you tried to
165 put two spaces after a
166 \begin_inset Quotes eld
170 \begin_inset Quotes erd
173 or tried to put three blank lines between paragraphs.
174 You found out you could not and, in fact, you will find out that most of
175 the little tricks you are accustomed to use in word processors will not
176 work in \SpecialChar LyX
178 That is because most word processors you have used before allow you manually
179 to enter all spacings, font changes, and so on.
180 So you end up not only writing a document but typesetting it, too.
182 does the typesetting for you, in a consistent fashion, letting you focus
183 on the important things, like the content of your writing.
186 \begin_layout Standard
187 So read on to learn more about \SpecialChar LyX
189 Reading this tutorial is definitely worth the time.
192 \begin_layout Section
202 \begin_layout Standard
203 Before we get started with this section, you need to know that this
207 uses the notation outlined in the
212 If you came to this manual first, please read the
216 before you continue with the
223 \begin_layout Standard
224 Now that you know which fonts mean what in the documentation, we want to
225 talk a bit about what this
232 \begin_layout Subsection
233 Getting the most out of the Tutorial
236 \begin_layout Standard
237 This tutorial consists of examples and exercises.
238 To get the most out of this document, you should read through it, typing
239 all the little things we are telling you to type and trying out all of
240 the exercises to see if you get them right.
241 For convenience, you might want to print out the PDF version of this document.
244 \begin_layout Standard
245 If you are familiar with \SpecialChar LaTeX
246 , you will probably be able to read the
250 somewhat faster, since many \SpecialChar LyX
251 ideas are just \SpecialChar LaTeX
253 However, \SpecialChar LyX
254 has features you will want to learn about.
255 Even if you do not feel like reading the rest of the
259 , you should definitely check out Section
264 \begin_inset CommandInset ref
266 reference "sec:latexusers"
270 , which is specifically written for experienced \SpecialChar LaTeX
274 \begin_layout Subsection
282 \begin_layout Itemize
283 Detailed explanations of all of \SpecialChar LyX
288 \begin_layout Standard
297 \begin_layout Itemize
298 Detailed explanations of \SpecialChar LaTeX
303 \begin_layout Standard
305 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
308 can have a look at the
320 \begin_layout Standard
321 It is time to move on, time for your first document \SpecialChar ldots
325 \begin_layout Chapter
326 Getting started with \SpecialChar LyX
330 \begin_layout Section
331 Your first \SpecialChar LyX
335 \begin_layout Standard
336 OK\SpecialChar endofsentence
337 You are ready to start writing.
338 Before you do, there are a few things we need to mention, which will hopefully
339 make the Tutorial more instructive and useful.
343 \begin_layout Standard
344 Because there is information we cannot give you in the Tutorial, the
350 thing that you need to do is find the
357 Start up \SpecialChar LyX
367 You may want to load the
371 as well (if you are not reading it within \SpecialChar LyX
373 This way, you can read them while you are writing your own file.
377 \begin_layout Plain Layout
378 They can also serve as good examples of how to use the many features of
385 Note that once you have got more than one document open, you can use the
390 menu or the document tabs to switch between them.
393 \begin_layout Standard
394 In this Tutorial, we are going to assume that you have a fully working version
396 , as well as a \SpecialChar LaTeX
397 -distribution and a PDF-viewer.
398 This should be the case on all major Linux- and BSD-distributions, as well
399 as on Windows, where this is setup by the \SpecialChar LyX
403 \begin_layout Standard
404 Finally, we have written a file called
408 to let you practice your \SpecialChar LyX
410 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
413 As you learn new \SpecialChar LyX
414 functions, we will suggest that you fix those parts of
420 It also contains `subtle' hints about how to fix things.
424 \begin_layout Plain Layout
425 The hints are located in yellow
426 \begin_inset Quotes eld
430 \begin_inset Quotes erd
434 Access the text in a note by clicking on it.
439 If you want to cheat, or check what you have done, there is also a file
441 \begin_inset Newline newline
448 which contains the same text written and typeset by a \SpecialChar LyX
452 \begin_layout Standard
453 The example files can be found in the
457 directory of \SpecialChar LyX
458 's installation folder.
465 File\SpecialChar menuseparator
472 to save a copy in your own directory for you to work on.
473 As you fix parts of the raw document, check to see how those changes affect
477 \begin_layout Standard
482 directory contains lots of other examples files.
483 They will show you how to do various fancy things with \SpecialChar LyX
485 After you have read the Tutorial, or when you are confused about how to
486 do something fancy in \SpecialChar LyX
487 , take a look at these files.
490 \begin_layout Subsection
491 Typing, Viewing, and Exporting
494 \begin_layout Itemize
497 File\SpecialChar menuseparator
501 \begin_layout Itemize
502 Type a sentence like:
504 This is my first \SpecialChar LyX
508 \begin_layout Itemize
509 Save your document with
511 File\SpecialChar menuseparator
516 As\SpecialChar endofsentence
520 \begin_layout Itemize
521 Create a PDF file, with
523 Document\SpecialChar menuseparator
526 or the toolbar button
534 will open a PDF-viewer program displaying your document as it will look
538 \begin_layout Itemize
539 Export the ready to print document with
541 File\SpecialChar menuseparator
549 \begin_layout Standard
550 Congratulations! You have written your first \SpecialChar LyX
552 All of the rest is just details.
553 \begin_inset Newline newline
559 \begin_layout Standard
564 You can save time by leaving the PDF viewer running in the background.
565 Under MacOS and Linux you can use
567 Document\SpecialChar menuseparator
570 or the toolbar button
576 and just click on the PDF viewer window afterwards.
577 Under Windows still use
579 Document\SpecialChar menuseparator
591 \begin_layout Standard
596 In case you are using a high-resolution display, the LyX toolbar icons
598 To change their size, right-click into a toolbar.
601 \begin_layout Subsection
605 \begin_layout Standard
607 can of course do most of the things you are used to doing with a word processor.
608 It will word-wrap and indent paragraphs automatically.
609 Here is a quick description of how to do some simple actions.
612 \begin_layout Description
613 Undo \SpecialChar LyX
614 has multiple levels of undo, which means you can undo everything you
615 have done since your current editing session started, by selecting
617 Edit\SpecialChar menuseparator
626 ) over and over again.
627 If you undo too much, just select
629 Edit\SpecialChar menuseparator
642 \begin_layout Standard
643 Currently, undo is limited to 100 steps.
647 \begin_layout Description
650 Edit\SpecialChar menuseparator
661 Edit\SpecialChar menuseparator
672 Edit\SpecialChar menuseparator
681 ) to cut, copy, and paste.
682 Or automatically paste selected text (including selections from other programs)
690 \begin_layout Description
693 Edit\SpecialChar menuseparator
707 arg "dialog-show findreplace"
711 In the dialog, search with the
723 button to replace a word you have found.
727 \begin_layout Plain Layout
728 Close the window when you are done or leave it open if you find it more
730 Most dialog boxes in \SpecialChar LyX
731 can operate like this.
732 Just be sure you have the right window in focus when you are trying to
733 type in the main \SpecialChar LyX
734 window or a \SpecialChar LyX
740 If you like, you can specify whether to make the search case-sensitive,
741 or to search for only complete words; you can also search backwards through
745 \begin_layout Description
760 , which will by default print characters in italics), set it in
770 , usually small caps, used for people's names), or use your own formatting
773 Edit\SpecialChar menuseparator
778 Style\SpecialChar menuseparator
781 dialog (toolbar button
784 arg "dialog-show character"
790 \begin_layout Description
791 Toolbar Other buttons on the toolbar allow you to do some of the more popular
819 \begin_layout Standard
820 Of course, you have not yet written enough to make most of these functions
822 As you write more, though, try undoing, pasting, etc.
825 \begin_layout Subsection
826 WYSIWYM: Whitespace in \SpecialChar LyX
830 \begin_layout Standard
831 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
834 As many times as you hit
838 , you will only get one blank line.
839 As many times as you hit
843 , you will only get one space.
844 On a blank line, \SpecialChar LyX
845 will not let you type even one space.
850 key will not move you forward one tab stop; in fact there
854 no tab stops! There is no ruler at the top of the page to let you set tabs
858 \begin_layout Standard
859 Many word processors are based on the WYSIWYG principle:
860 \begin_inset Quotes eld
863 What You See Is What You Get.
864 \begin_inset Quotes erd
868 , on the other hand, is based on the principle that
869 \begin_inset Quotes eld
872 What You See Is What You
877 \begin_inset Quotes erd
880 You type what you mean and \SpecialChar LyX
881 will take care of typesetting it for you so
882 that the output looks nice.
887 grammatically separates paragraphs and a
891 grammatically separates words; so there is no reason to have several of
896 has no grammatical function at all – so \SpecialChar LyX
898 Using \SpecialChar LyX
899 , you will spend more of your time worrying about the
903 of your document and less time worrying about the
912 for more information on the WYSIWYM concept.
915 \begin_layout Standard
917 does have (many) ways to fine-tune the formatting of your document.
918 After all, \SpecialChar LyX
928 has information about all that.
929 It includes horizontal fills and vertical space — which are more powerful
930 and versatile than multiple spaces or blank lines — and ways to change
931 font sizes, character styles, and paragraph alignments by hand.
932 The idea, though, is that you can write your whole document, focusing on
933 content, and just worry about that fine-tuning at the end.
934 With standard word processors, you will be distracted by document formatting
935 throughout the writing process.
938 \begin_layout Section
942 \begin_layout Standard
943 Different parts of a document have different purposes; we call these parts
949 Most of a document is made up of regular text.
950 Section titles (chapter, subsection, etc.) let the reader know that a new
951 topic or subtopic will be discussed.
952 Certain types of documents have special environments.
953 A journal article will have an abstract and a title.
954 A letter will have neither of these, but will probably have an environment
955 that gives the writer's address.
958 \begin_layout Standard
959 Environments are a major part of the
960 \begin_inset Quotes eld
963 What You See Is What You Mean
964 \begin_inset Quotes erd
967 philosophy of \SpecialChar LyX
969 A given environment may require a certain font style, font size, indenting,
970 line spacing, and more.
971 This problem is aggravated, because the exact formatting for a given environmen
972 t may change: one journal may use boldface, 18 point, centered type for
973 section titles while another uses italicized, 15 point, left justified
974 type; different languages may have different standards for indenting; and
975 bibliography formats can vary widely.
977 lets you avoid learning all the different formatting styles.
980 \begin_layout Standard
985 choice box is located on the left end of the toolbar and looks like this:
987 \begin_inset Graphics
988 filename clipart/ToolbarEnvBox.png
995 It indicates in which environment you are currently writing.
996 While you were writing your first document, it said
997 \begin_inset Quotes eld
1001 \begin_inset Quotes erd
1004 which is the default environment for text.
1005 Now you will put a number of environments in your new document so that
1006 you can see how they work.
1009 \begin_layout Subsection
1010 Sections and Subsections
1013 \begin_layout Standard
1018 on the first line of your new \SpecialChar LyX
1031 \begin_layout Plain Layout
1037 If nothing is selected, \SpecialChar LyX
1038 changes the paragraph you are currently in to
1039 the selected environment.
1040 Alternatively, you can change several paragraphs to a different environment
1041 by selecting them before picking an environment.
1058 , which will be covered below.
1061 \begin_inset Quotes eld
1065 \begin_inset Quotes erd
1068 and typesets the section heading (title) in a larger font.
1073 \SpecialChar endofsentence
1079 \begin_inset Quotes eld
1083 \begin_inset Quotes erd
1087 \begin_inset Quotes eld
1091 \begin_inset Quotes erd
1095 Section headings, like most environments, are assumed to end when you type
1100 \SpecialChar endofsentence
1101 Type the document introduction:
1104 \begin_layout LyX-Code
1105 This is an introduction to my first \SpecialChar LyX
1109 \begin_layout Standard
1125 \begin_inset Quotes eld
1129 \begin_inset Quotes erd
1132 and waits for you to type a title.
1134 \begin_inset Quotes eld
1140 \begin_inset space ~
1146 \begin_inset Quotes erd
1149 , and you will see that \SpecialChar LyX
1150 again sets it as a section title.
1153 \begin_layout Standard
1155 Go to the end of Section
1156 \begin_inset space ~
1160 \begin_inset Quotes eld
1163 my first \SpecialChar LyX
1165 \begin_inset Quotes erd
1181 Again, \SpecialChar LyX
1183 \begin_inset Quotes eld
1187 \begin_inset Quotes erd
1190 and waits for you to type a title.
1197 \begin_inset space ~
1201 \begin_inset Quotes eld
1205 \begin_inset Quotes erd
1209 \begin_inset space ~
1212 2, has been automatically renumbered to Section
1213 \begin_inset space ~
1216 3! In true WYSIWYM fashion, you just need to identify the text that makes
1217 up the section titles, and \SpecialChar LyX
1218 takes care of numbering the sections and typesettin
1222 \begin_layout Standard
1231 environment, and type the following five lines:
1234 \begin_layout LyX-Code
1235 Sections and subsections are described below.
1238 \begin_layout LyX-Code
1242 \begin_layout LyX-Code
1243 Sections are bigger than subsections.
1246 \begin_layout LyX-Code
1247 Subsection description
1250 \begin_layout LyX-Code
1251 Subsections are smaller than sections.
1254 \begin_layout Standard
1255 Click on the second line and select
1265 numbers the subsection
1266 \begin_inset Quotes eld
1270 \begin_inset Quotes erd
1273 , and typesets it in a font which is bigger than regular text but smaller
1274 than the section title.
1275 Change the fourth line to the
1279 environment as well.
1280 As you probably expected, \SpecialChar LyX
1281 automatically numbered the section
1282 \begin_inset Quotes eld
1286 \begin_inset Quotes erd
1290 If you put yet another section before Section
1291 \begin_inset space ~
1295 \begin_inset space ~
1298 2 will be renumbered as Section 3, and the subsections will be renumbered
1300 \begin_inset Quotes eld
1304 \begin_inset Quotes erd
1308 \begin_inset Quotes eld
1312 \begin_inset Quotes erd
1318 \begin_layout Standard
1319 Further levels of sectioning include
1332 We will let you play with these on your own.
1333 You may notice that paragraph and subparagraph headings are not numbered
1334 by default, and that subparagraphs are indented; see the
1338 for an explanation and how to change this.
1343 headings are actually the highest level of sectioning, above
1347 s, but you are only allowed to use them in certain types (text classes)
1349 documents (see Section
1350 \begin_inset space ~
1354 \begin_inset CommandInset ref
1356 reference "sec:Document-Classes"
1363 \begin_layout Standard
1364 Finally, you may want to have sections or subsections that are not numbered.
1365 There are environments for this as well.
1366 If you change one of your section headings to the
1370 environment (you may have to scroll down in the
1374 box to find it), \SpecialChar LyX
1375 will use the same font size for the heading as it uses
1376 for a regular section, but it will not number that section.
1377 There are corresponding
1378 \begin_inset Quotes eld
1382 \begin_inset Quotes erd
1385 heading environments for
1394 Try changing some of your sections or subsections to the starred environments,
1395 and note how the other section numbers are updated.
1398 \begin_layout Labeling
1399 \labelwidthstring 00.00.0000
1404 : Fix the section and subsection headings in
1405 \begin_inset Newline newline
1416 \begin_layout Subsection
1420 \begin_layout Standard
1422 has several different environments for typesetting lists.
1423 The various list environments free you from hitting
1427 a million times when writing an outline, or from renumbering a whole list
1428 when you want to add a point in the middle of the list.
1429 Different types of documents logically require different list environments:
1432 \begin_layout Itemize
1433 A slide presentation might use the
1437 environment's bulleted lists to describe different points.
1440 \begin_layout Itemize
1441 An outline would use the
1445 environment's numbered lists (and lettered sublists).
1448 \begin_layout Itemize
1449 A document describing several software packages could use the
1453 environment, where each item in the list begins with a bold-faced word.
1456 \begin_layout Itemize
1465 ) environment is a variation on the
1472 \begin_layout Standard
1473 Let us write a list of reasons why \SpecialChar LyX
1474 is better than other word processors.
1475 Somewhere in your document, type:
1478 \begin_layout Standard
1482 is better than other word processors because:
1485 \begin_layout Standard
1502 arg "layout Itemize"
1508 \begin_inset Quotes eld
1512 \begin_inset Quotes erd
1516 Type in your reasons:
1519 \begin_layout LyX-Code
1520 Typesetting is done for you.
1523 \begin_layout LyX-Code
1527 \begin_layout LyX-Code
1528 Lists are very easy to create!
1531 \begin_layout Standard
1532 List environments, unlike headings, do not end when you type
1537 Instead, \SpecialChar LyX
1538 assumes you are going on to the next item in the list.
1539 The above will therefore result in a three-item list.
1540 If you want more than one paragraph within one list
1544 , one way is to use the
1547 \begin_inset space ~
1552 , which you get by typing
1557 In order to get out of the list, you need to reselect the
1561 environment (or just use the key binding
1564 arg "layout Standard"
1570 \begin_layout Standard
1571 You now have a beautiful itemized list.
1572 You might want to run \SpecialChar LaTeX
1573 to see how the list looks when printed out.
1574 But what if you wanted to number the reasons? Well, just select the whole
1579 \begin_layout Plain Layout
1581 will not let you select the first bullet (or the actual number in a numbered
1582 section title) unless you also select the paragraph
1586 it, which you probably do not want to do.
1587 This is on purpose because the bullet or number depends on the document
1588 settings or text position, respectively.
1604 arg "layout Enumerate"
1608 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1609 will fix the numbering.
1612 \begin_layout Standard
1613 While the list is still selected, you can change to the other two list environme
1621 \begin_inset space \thinspace{}
1627 \begin_inset space \thinspace{}
1637 arg "layout Description"
1646 ), in order to see what they look like.
1647 For those two environments, each list item is made up of a term, which
1648 is the item's first word, followed by a definition, which is the rest of
1649 the paragraph (until you hit
1654 The term is either typeset in boldface (
1659 \begin_inset Quotes eld
1663 \begin_inset Quotes erd
1670 \begin_layout Plain Layout
1671 But a typesetter's tab, which will change to fit the size of the largest
1672 term, not a pathetic, rigid, unchangeable typewriter
1685 ) from the rest of the paragraph.
1686 If you want to have more than one word in the definition, then separate
1690 \begin_inset space ~
1698 \begin_layout Labeling
1699 \labelwidthstring 00.00.0000
1704 : Typeset the list in
1709 \begin_layout Standard
1710 You can nest lists within each other in all sorts of interesting ways.
1711 An obvious example would be writing outlines.
1712 Numbered and bulleted lists will have different numbering and bulleting
1713 schemes for sublists.
1718 for details on the different sorts of lists and for examples of nestings.
1721 \begin_layout Subsection
1722 Other environments: Verses, Quotations, and more
1725 \begin_layout Standard
1726 There are two environments for setting quotations apart from surrounding
1731 for short quotes and
1745 \begin_layout Plain Layout
1746 used in this Tutorial for the long typing examples
1755 font; this environment is the only place in \SpecialChar LyX
1756 where you are allowed to use
1757 multiple spaces to allow code indenting.
1758 You can even write poetry using the
1766 to separate stanzas, and
1770 to separate lines within a stanza.
1775 for more complete descriptions of all of the available \SpecialChar LyX
1779 \begin_layout Labeling
1780 \labelwidthstring 00.00.0000
1785 : Correctly typeset the
1787 Quote, \SpecialChar LyX
1795 \begin_inset Newline newline
1803 \begin_layout Chapter
1807 \begin_layout Standard
1808 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1810 It introduced you to the basic editing operations in \SpecialChar LyX
1811 , as well as the powerful
1812 method of writing with environments.
1813 Most people who use \SpecialChar LyX
1814 , though, will want to write documents: papers, articles,
1815 books, manuals, or letters.
1816 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1818 a complete document.
1819 It will introduce you to text classes, which allow you to write different
1821 It will then describe many of the additions that turn text into a document,
1822 such as titles, footnotes, cross references, bibliographies, and tables
1826 \begin_layout Section
1828 \begin_inset CommandInset label
1830 name "sec:Document-Classes"
1837 \begin_layout Standard
1838 Different sorts of documents should be typeset differently.
1839 For example, books are generally printed double-sided, while articles are
1841 In addition, many documents contain special environments: letters contain
1842 some environments — such as the sender's address and the signature — which
1843 do not make sense in a book or article.
1844 The \SpecialChar LyX
1853 \begin_layout Plain Layout
1854 for \SpecialChar LaTeX
1855 users: this is equivalent to the \SpecialChar LaTeX
1861 takes care of these large scale differences between different sorts of
1863 This Tutorial, for example, was written in the
1868 Document classes are another major part of the WYSIWYM philosophy; they
1869 tell \SpecialChar LyX
1870 how to typeset the document, so you do not need to know how.
1873 \begin_layout Standard
1874 Your document is probably being written in the
1882 \begin_layout Plain Layout
1883 That is usually the default document class
1888 Try changing to other document classes (using the
1890 Document\SpecialChar menuseparator
1893 dialog) to see how they are typeset differently.
1894 If you change your document to the
1898 document class and look at the
1902 box, you will see that most of the allowed environments are the same.
1903 However, you can now use the
1908 If you are ever unsure about which environments you can use in a given
1909 document class, just consult the
1916 \begin_layout Standard
1917 Font sizes, one- or two-column printing, and page headings are just some
1918 of the ways journals' typesettings differ from one another.
1919 As the Computer Age continues to mature, journals have begun accepting
1920 electronic submissions, creating \SpecialChar LaTeX
1922 \begin_inset Quotes eld
1926 \begin_inset Quotes erd
1929 so that authors can submit correctly typeset articles.
1931 is set up to support this as well.
1932 For example, \SpecialChar LyX
1933 supports typesetting (and extra environments) for the American
1934 Mathematics Society journals using the
1937 \begin_inset space ~
1945 \begin_layout Standard
1946 Here is a very quick reference to some of the document classes.
1949 Special Document Classes
1955 manual for many more details.
1958 \begin_layout Standard
1960 \begin_inset Tabular
1961 <lyxtabular version="3" rows="7" columns="2">
1962 <features tabularvalignment="middle">
1963 <column alignment="center" valignment="top" width="0pt">
1964 <column alignment="center" valignment="top" width="0pt">
1966 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1969 \begin_layout Plain Layout
1975 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1978 \begin_layout Plain Layout
1986 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1989 \begin_layout Plain Layout
1995 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1998 \begin_layout Plain Layout
1999 one-sided, no chapters
2006 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2009 \begin_layout Plain Layout
2015 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2018 \begin_layout Plain Layout
2019 layout & environments for American Math Society
2026 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2029 \begin_layout Plain Layout
2035 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2038 \begin_layout Plain Layout
2039 longer than article, two-sided
2046 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2049 \begin_layout Plain Layout
2055 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2058 \begin_layout Plain Layout
2059 report + front and back matter
2066 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2069 \begin_layout Plain Layout
2075 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2078 \begin_layout Plain Layout
2086 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2089 \begin_layout Plain Layout
2095 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2098 \begin_layout Plain Layout
2099 lots of extra environments for address, signature\SpecialChar ldots
2113 \begin_layout Section
2114 Templates: Writing a Letter
2117 \begin_layout Standard
2118 One way to write a letter would be to open a new file, and choose a
2124 Document\SpecialChar menuseparator
2128 While this is the most obvious way to write a letter, it seems like extra
2130 Every time you write a business letter, you want to have your address,
2131 the address to which you are sending it, a body, a signature, etc.
2137 for letters, which contains a sample letter; once you have a template,
2138 you can just replace a couple of parts of the letter with your text each
2139 time you write a letter.
2142 \begin_layout Standard
2143 Open a new file with
2145 File\SpecialChar menuseparator
2147 \begin_inset space ~
2151 \begin_inset space ~
2162 Save and print the file to see how the various environments are typeset.
2165 \begin_layout Standard
2166 When you look at the
2170 box, you will see several environments, like the
2173 \begin_inset space ~
2178 environment, that do not exist in most other document classes.
2184 You can play around for a while to figure out how the various environments
2186 You will notice for example that the
2190 environment has the word
2191 \begin_inset Quotes eld
2195 \begin_inset Quotes erd
2198 in red before the actual text of the signature.
2199 This word does not show up in the actual letter, as you will see if you
2200 view/export the file.
2201 It is just there to let you know where the signature goes.
2202 Also, note that it does not matter where in the file the
2207 Remember, \SpecialChar LyX
2208 is WYSIWYM; you can put the
2212 environment anywhere you want, but \SpecialChar LyX
2213 knows that in the printout, the signature
2214 should be at the end.
2217 \begin_layout Standard
2218 A template is just a regular \SpecialChar LyX
2220 This means you can fill in your address and signature and save the file
2222 From now on, any time you want to write a letter, you can use the new template
2224 We do not have to suggest an actual
2225 \begin_inset Quotes eld
2229 \begin_inset Quotes erd
2232 here; just write a letter to someone!
2236 \begin_layout Plain Layout
2237 One warning, if you are writing from a template.
2238 If you erase all of the text in an environment — for example, if you erase
2242 \begin_inset space ~
2247 field so that you can replace it with your own — and then you move the
2248 cursor without writing any text, the environment may disappear.
2249 This is because most environments cannot exist without any text in them.
2250 Just reselect the environment from the
2262 \begin_layout Standard
2263 Templates can be a huge time-saver, and we urge you to use them whenever
2265 In addition, they can help a person learn how to use some of the fancier
2267 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2269 of less computer-aware users.
2270 When they are first learning \SpecialChar LyX
2271 , it will be less intimidating if they have
2272 a letter template customized for their company, for example.
2275 \begin_layout Standard
2276 \begin_inset Newpage newpage
2282 \begin_layout Section
2286 \begin_layout Standard
2288 (like \SpecialChar LaTeX
2289 ) considers the title — which may contain the actual title, the author,
2290 the date, and even an abstract of a paper — to be a separate part of the
2294 \begin_layout Standard
2295 Go back to your first \SpecialChar LyX
2296 document and make sure it is using the
2304 \begin_layout Plain Layout
2305 You should not be using the letter any more, since the
2309 document class does not allow titles.
2314 Type a title on the first line, and change the line to the
2319 On the next line, type your name and change it to the
2324 On the next line, write the date in the
2329 Type a paragraph or two summarizing your document using the
2334 Notice how the title is presented when it is printed out.
2335 If you change the document format to Book, you will get a separate title
2336 page, like the first page of this tutorial.
2339 \begin_layout Labeling
2340 \labelwidthstring 00.00.0000
2345 : Fix the title, date, and author in
2350 \begin_layout Section
2351 Labels and Cross-References
2354 \begin_layout Standard
2355 You can label section headings, list items, formulas, footnotes, and floats
2359 \begin_layout Plain Layout
2360 Floats are explained in the
2374 Once you do so, you can refer to the element in other parts of the document,
2375 using cross-references.
2376 You can refer to a section's number, to the page on which the section begins
2378 As with section numbering, \SpecialChar LyX
2379 also takes care of cross-reference numbering
2381 Automatic management of labels and cross-references is among the most significa
2382 nt advantages of \SpecialChar LyX
2383 (and \SpecialChar LaTeX
2384 ) over conventional word processors.
2387 \begin_layout Subsection
2391 \begin_layout Standard
2392 Go to our second section, whose title is
2393 \begin_inset Quotes eld
2397 \begin_inset Quotes erd
2401 Click at the end of the section title line, and select
2403 Insert\SpecialChar menuseparator
2406 or the toolbar button
2413 A dialog asks you for a label name, and gives you a suggestion.
2418 , the label name will be placed in a box next to the section title.
2421 \begin_layout Standard
2422 So far you have not done anything — the output will look exactly the same,
2423 since labels do not show up in the printed document.
2424 However, now that you have added a label, you can refer to that label with
2426 We will do that next.
2429 \begin_layout Subsection
2430 Your first cross-reference
2433 \begin_layout Standard
2434 Place the cursor somewhere in Section
2435 \begin_inset space ~
2442 \begin_layout LyX-Code
2443 If you want to know more about this document,
2444 \begin_inset Newline newline
2450 \begin_layout Standard
2451 Now, with the cursor before the final period, select
2453 Insert\SpecialChar menuseparator
2455 \begin_inset space ~
2460 or the toolbar button
2463 arg "dialog-show-new-inset ref"
2467 The Cross-reference dialog pops up.
2468 It shows a list of the possible labels you can reference.
2469 At the moment, there should be only one,
2470 \begin_inset Quotes eld
2473 sec:About-This-Document
2474 \begin_inset Quotes erd
2478 First, select the drop-down menu labeled
2479 \begin_inset Quotes eld
2483 \begin_inset Quotes erd
2487 \begin_inset Quotes eld
2491 \begin_inset Quotes erd
2496 \begin_inset Quotes eld
2499 sec:About-This-Document
2500 \begin_inset Quotes erd
2503 (it may be selected by default), and a reference marker will appear containing
2505 \begin_inset Quotes eld
2508 Ref: sec:About-This-Document
2509 \begin_inset Quotes erd
2512 (To be really correct, you should put a
2515 \begin_inset space ~
2523 arg "command-alternatives math-space ; space-insert protected"
2526 ) in between the word
2527 \begin_inset Quotes eld
2531 \begin_inset Quotes erd
2534 and the reference.) An alternative way to reference a label is to right-click
2535 the label and select
2539 in the pop-up context menu.
2540 The cross-reference to this label is now in the clipboard and can be copied
2541 to the actual cursor position via the menu
2543 Edit\SpecialChar menuseparator
2553 In the printed document, this reference marker will be replaced with the
2555 Preview your document and you will see that \SpecialChar LaTeX
2556 has been even cleverer than
2559 \begin_inset Quotes eld
2563 \begin_inset Quotes erd
2569 \begin_layout Standard
2570 Conveniently, a cross-reference acts as a hyperlink when you are editing
2571 a document in \SpecialChar LyX
2572 ; clicking on it will pop up the
2579 \begin_inset space ~
2583 \begin_inset space ~
2588 will move the cursor to the referenced label.
2591 \begin_layout Subsection
2592 More fun with labels
2595 \begin_layout Standard
2596 We told you that \SpecialChar LyX
2597 takes care of numbering cross-references; now you can
2599 Add a new section before Section
2600 \begin_inset space ~
2604 Update the preview, and — voilà! — the section cross-reference changed
2606 \begin_inset Quotes eld
2610 \begin_inset Quotes erd
2613 ! Change the section
2614 \begin_inset Quotes eld
2618 \begin_inset Quotes erd
2621 to a subsection, and the cross-reference will reference Subsection
2622 \begin_inset space ~
2625 2.1 instead of Section
2626 \begin_inset space ~
2630 The page reference will not change unless you add a whole page of text
2631 before the label, of course.
2635 \begin_layout Standard
2636 If you want some more practice with labels, then try putting a new label
2637 where your first cross-reference was, and refer to that label from elsewhere
2639 If you will be inserting cross-references often, it may be convenient to
2647 \begin_layout Standard
2648 If you want to confirm that the cross-referencing gets the pages right even
2649 for larger documents,
2653 a couple pages of text from the
2657 to the clipboard, and
2661 them into your document.
2665 \begin_layout Plain Layout
2666 By the way, copying a chapter title may cause an error, because chapters
2667 are not allowed in the article class, see Section
2668 \begin_inset space ~
2672 \begin_inset CommandInset ref
2674 reference "sec:Document-Classes"
2679 If this happens, just delete the chapter title.
2687 \begin_layout Labeling
2688 \labelwidthstring 00.00.0000
2693 : Fix the references in
2698 \begin_layout Section
2699 Footnotes and Margin Notes
2702 \begin_layout Standard
2703 Footnotes can be added using the toolbar button
2706 arg "footnote-insert"
2711 Insert\SpecialChar menuseparator
2715 Click at the end of the word
2716 \begin_inset Quotes eld
2721 \begin_inset Quotes erd
2724 somewhere in your document and insert a footnote.
2725 A footnote box appears where you can enter the text of the footnote.
2727 should place the cursor at the beginning of the footnote box.
2731 \begin_layout LyX-Code
2733 is a typesetting word processor.
2736 \begin_layout Standard
2737 Now click on the button labeled
2738 \begin_inset Quotes eld
2742 \begin_inset Quotes erd
2746 The footnote box is closed, leaving the button showing where the footnote
2747 marker will be in the printed text; this is called
2748 \begin_inset Quotes eld
2752 \begin_inset Quotes erd
2756 You can unfold the footnote at any time and re-edit its text by clicking
2758 \begin_inset Quotes eld
2762 \begin_inset Quotes erd
2768 \begin_layout Standard
2769 A footnote can be cut and pasted like normal text.
2770 Go ahead; try it! All you need to do is select the footnote button
2774 \begin_layout Plain Layout
2775 It may be easier to select it using the keyboard.
2776 You might accidentally open the footnote if you are trying to select the
2777 marker itself with the mouse.
2791 In addition, you can change regular text to a footnote, by selecting it
2795 arg "footnote-insert"
2798 button; change a footnote to regular text by hitting the
2802 key when the cursor is in the first position of a footnote, or by hitting
2807 key when the cursor is in the very last position of the footnote.
2810 \begin_layout Standard
2811 Margin notes can be added using the menu
2813 Insert\SpecialChar menuseparator
2815 \begin_inset space ~
2820 or the toolbar button
2823 arg "marginalnote-insert"
2826 \SpecialChar endofsentence
2827 Margin notes are like footnotes, except that:
2830 \begin_layout Itemize
2831 the on-screen boxes say
2832 \begin_inset Quotes eld
2836 \begin_inset Quotes erd
2840 \begin_inset Quotes eld
2844 \begin_inset Quotes erd
2850 \begin_layout Itemize
2851 the notes will be placed in the margin, instead of below the text
2854 \begin_layout Itemize
2855 margin notes are not numbered
2858 \begin_layout Standard
2859 Change your \SpecialChar LyX
2860 footnote back to text, then select and change it to a margin
2862 Run \SpecialChar LaTeX
2863 again to see what the margin note looks like.
2866 \begin_layout Labeling
2867 \labelwidthstring 00.00.0000
2872 : Fix the footnote in
2877 \begin_layout Section
2879 \begin_inset CommandInset label
2881 name "sec:bibliographies"
2888 \begin_layout Standard
2889 Bibliographies are similar to cross-references.
2890 The bibliography contains a list of references at the end of the document,
2891 and they can be referenced from within the document.
2892 Like section titles, \SpecialChar LyX
2893 and \SpecialChar LaTeX
2894 make your job easier by automatically numbering
2895 the bibliography items and changing citations when the item numbers change.
2898 \begin_layout Standard
2899 Go to the end of the document and switch to the
2904 Now, each paragraph you type will be a reference.
2906 \begin_inset Quotes eld
2911 The Lyx Tutorial, by the \SpecialChar LyX
2915 \begin_inset Quotes erd
2918 as your first reference.
2919 Note that \SpecialChar LyX
2920 automatically puts a number in a box before each reference.
2921 Click on the boxed reference number, and the
2924 \begin_inset space ~
2934 is to refer to this reference within the \SpecialChar LyX
2944 is set (default), you will see the number of the bibliography in the output.
2950 \begin_inset Quotes eld
2954 \begin_inset Quotes erd
2957 to make it easy to remember.
2960 \begin_layout Standard
2961 Now pick somewhere in your document that you would like to insert a reference.
2964 Insert\SpecialChar menuseparator
2967 or the toolbar button
2970 arg "dialog-show-new-inset citation"
2979 The left panel in this dialog lists all the bibliography entries, and this
2980 field allows you to choose which bibliography item you want to cite.
2982 \begin_inset Quotes eld
2986 \begin_inset Quotes erd
2989 (right now, that is the only item in the bibliography), then use the
2993 button in the center to insert it.
2994 (You can have multiple citations in the same place by transferring a number
2999 \begin_layout Plain Layout
3000 If one uses label names for references that are easy to remember it is easier
3001 to find the entry in the list of references.
3011 Now preview your file and you will see that the citation appears in brackets
3012 in the text, referring to the bibliography at the end of the document.
3015 \begin_layout Standard
3019 \begin_inset space ~
3028 dialog will put a remark (such as a reference to a page or chapter within
3029 the referenced book or article) in the brackets after the reference.
3030 If you want the references to have labels instead of numbers in the printed
3031 output (for example, some journals would use
3032 \begin_inset Quotes eld
3036 \begin_inset Quotes erd
3039 to refer to a paper written by Smith in 1995), use the
3046 \begin_inset space ~
3059 \begin_layout Labeling
3060 \labelwidthstring 00.00.0000
3065 Fix the bibliography and citation in
3070 \begin_layout Section
3074 \begin_layout Standard
3075 You may want to put a table of contents at the beginning of your document.
3077 makes this easy to do.
3082 after your document title and before your first section title and select
3085 Insert\SpecialChar menuseparator
3087 \begin_inset space ~
3091 \begin_inset space ~
3094 TOC\SpecialChar menuseparator
3096 \begin_inset space ~
3100 \begin_inset space ~
3107 \begin_inset Quotes eld
3111 \begin_inset Quotes erd
3114 will appear in a button on the first line of the document.
3118 \begin_layout Standard
3119 This may not appear to be very useful.
3120 However, if you look at your preview, you will see that a table of contents
3121 has been generated, listing the various sections and subsections in your
3123 As usual, if you reorder sections or create new ones, you will see those
3124 changes in the preview when you update it.
3128 \begin_layout Standard
3129 The table of contents is not printed in the on-screen version of the document.
3130 But you can display the table of contents in a separate window by clicking
3131 on the table of contents button, or by using
3133 View\SpecialChar menuseparator
3135 \begin_inset space ~
3140 or the toolbar button
3143 arg "dialog-toggle toc"
3147 This menu will work even if you do not have a table of contents inset in
3149 This is a very useful tool for rearranging your document parts.
3150 Clicking on a (sub)section title in the
3154 window will highlight that line and move the display (in the \SpecialChar LyX
3156 to that place in the document.
3157 You can also use the arrow keys to move up and down in the table of contents.
3158 You may therefore find it convenient to leave this window open throughout
3160 You can get similar functionality from the
3164 menu, though, where the table of contents appears automatically.
3167 \begin_layout Standard
3168 To get rid of the Table of Contents, you can delete the table of contents
3169 button just like any other text.
3172 \begin_layout Labeling
3173 \labelwidthstring 00.00.0000
3178 : Fix the table of contents in
3183 \begin_layout Chapter
3187 \begin_layout Standard
3189 is used by many scientists because it outputs great looking equations,
3190 avoiding the control characters used by word processors and their equation
3192 Many of these scientists are frustrated, however, because writing equations
3193 in \SpecialChar LaTeX
3194 is more like programming than writing.
3195 Happily, \SpecialChar LyX
3196 has WYSIWYM support for equations.
3197 If you are used to \SpecialChar LaTeX
3198 , you will find that all of the usual \SpecialChar LaTeX
3200 can be typed in normally, but they will show up in a WYSIWYM fashion.
3201 If, on the other hand, you have never written in \SpecialChar LaTeX
3205 \begin_inset space ~
3210 will allow you to write professional-looking math quickly and easily.
3213 \begin_layout Section
3217 \begin_layout Standard
3218 Somewhere in your \SpecialChar LyX
3222 \begin_layout LyX-Code
3223 I like what Einstein said, E=mc^2, because it is
3224 \begin_inset Newline linebreak
3230 \begin_layout Standard
3231 Now, that equation does not look very good in \SpecialChar LyX
3232 and in the output; there
3233 is no space between the letters and the equals sign, and you would like
3234 to write an actual superscript for the
3235 \begin_inset Quotes eld
3239 \begin_inset Quotes erd
3243 That bad typesetting happened because we did not tell \SpecialChar LyX
3244 that we were writing
3245 a mathematical expression, so it typeset the equation like regular old
3249 \begin_layout Standard
3250 But we can create a formula that will be typeset properly.
3251 Highlight the equation and click the toolbar button
3259 Insert\SpecialChar menuseparator
3260 Math\SpecialChar menuseparator
3262 \begin_inset space ~
3268 If nothing is highlighted \SpecialChar LyX
3269 inserts a little blue square, which is an empty
3271 The expression appears in blue and the blue square disappears as soon as
3272 the formula is not empty.
3277 to leave the equation.
3278 The purple markers disappear, leaving the cursor to the right of the expression.
3279 Now, if you type something, it will be regular text.
3282 \begin_layout Standard
3283 Looking at the output you will notice that the expression was typeset nicely,
3284 with spaces between the letters and the equals sign, and a superscript
3286 \begin_inset Quotes eld
3290 \begin_inset Quotes erd
3294 Letters in math mode are assumed to be variables, and come out in italics.
3295 Numbers are just numbers.
3298 \begin_layout Standard
3299 This math editor is another example of the WYSIWYM philosophy.
3300 In \SpecialChar LaTeX
3301 , you write a mathematical expression using text and commands like
3307 ; this can be frustrating, because you cannot see what an expression looks
3308 like until you run the file under \SpecialChar LaTeX
3309 and you may have to spend time, for
3310 example, finding missing brackets.
3312 does not attempt to get the expression to look perfect (WYSIWYG), but
3313 it gives you an extremely good idea of what the expression will look like.
3315 then takes care of the professional typesetting.
3318 \begin_layout Section
3319 Navigating an Equation
3322 \begin_layout Standard
3324 \begin_inset Formula $E=mc^{2}$
3328 \begin_inset Formula $E=1+mc^{2}$
3332 Use the arrow keys to move the cursor into the expression.
3333 Note that when you enter the expression, the purple markers appear to let
3334 you know you are editing math.
3343 to move the cursor past the equals sign, and just type
3344 \begin_inset Quotes eld
3348 \begin_inset Quotes erd
3352 Again, you can use the arrow keys or
3356 to leave the formula\SpecialChar endofsentence
3360 \begin_layout Standard
3361 Other than the special keys described below, typing in math mode is like
3362 editing regular text.
3372 Select text either with the arrow keys or with the mouse.
3375 Edit\SpecialChar menuseparator
3378 works in math mode as well as cut and paste.
3379 One thing to be careful of: if you are left or right outside a formula
3388 respectively, you delete the whole formula.
3389 Luckily, you can just use
3396 \begin_layout Standard
3397 What if you want to change
3398 \begin_inset Formula $E=mc^{2}$
3402 \begin_inset Formula $E=mc^{2.5}+1$
3405 ? Again, you can use the mouse to click in the right place.
3406 However, you can also use the arrow keys.
3407 If the cursor is just after the
3408 \begin_inset Quotes eld
3412 \begin_inset Quotes erd
3416 \begin_inset Quotes eld
3420 \begin_inset Quotes erd
3427 and the cursor is moved to the level of the superscript, just before the
3429 \begin_inset Quotes eld
3433 \begin_inset Quotes erd
3438 \begin_inset Quotes eld
3442 \begin_inset Quotes erd
3450 will move the cursor back to the regular level.
3459 , the cursor will be placed
3463 the superscript (so that you can then type the
3464 \begin_inset Quotes eld
3468 \begin_inset Quotes erd
3474 \begin_layout Section
3475 Exponents and Indices
3478 \begin_layout Standard
3479 An exponent can be entered from the
3482 \begin_inset space ~
3487 (see below), but it is actually simpler just to type the caret key,
3488 \begin_inset Quotes eld
3492 \begin_inset Quotes erd
3497 will place another blue rectangle in the superscript, so that whatever
3498 you write next will be superscripted, and in a smaller font size.
3499 Everything you type until you hit a
3507 to exit the formula entirely) will be in the superscript.
3510 \begin_layout Standard
3511 Writing a subscript (index) is just as easy; start one by typing the underscore
3513 \begin_inset Quotes eld
3517 \begin_inset Quotes erd
3521 You can subscript and superscript both subscripts and superscripts like
3523 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3530 \begin_layout Labeling
3531 \labelwidthstring 00.00.0000
3537 \begin_inset space ~
3547 \begin_layout Section
3551 \begin_layout Standard
3555 \begin_inset space ~
3560 is a convenient way to enter symbols and/or to perform complicated formula
3562 Many of these operations can be accomplished from the keyboard or the
3564 Insert\SpecialChar menuseparator
3569 Edit\SpecialChar menuseparator
3572 menus (the latter only appears when you are in Math mode).
3573 However, we are going to concentrate on using the
3576 \begin_inset space ~
3581 , just to let you know what is out there; you can learn keyboard shortcuts
3582 and commands later from the
3589 \begin_layout Standard
3593 \begin_inset space ~
3598 is shown when the cursor is in a formula and can also be turned on manually
3601 View\SpecialChar menuseparator
3605 When you click there on
3606 \begin_inset Quotes eld
3610 \begin_inset Quotes erd
3616 arg "toolbar-toggle math"
3619 ) the toolbar will be shown permanently at the bottom; this state is visualized
3624 menu with a checkmark.
3625 When you click in this state again on
3626 \begin_inset Quotes eld
3630 \begin_inset Quotes erd
3640 \begin_inset space ~
3645 is only shown when the cursor is within a formula; this state is visualized
3646 by the renaming of the menu entry from
3647 \begin_inset Quotes eld
3651 \begin_inset Quotes erd
3655 \begin_inset Quotes eld
3659 \begin_inset space ~
3663 \begin_inset Quotes erd
3669 \begin_layout Subsection
3673 \begin_layout Standard
3677 \begin_inset space ~
3682 allows you to choose from a large array of symbols used in math: operators,
3683 arrows, relationships, delimiters, special characters, sums and integrals.
3684 Note that subscripting and superscripting allow you to put lower and upper
3685 limits on sums and integrals.
3688 \begin_layout Subsection
3689 Roots, decorations, and delimiters
3692 \begin_layout Standard
3693 To type a square root, just click on the button
3696 arg "math-insert \\sqrt"
3700 The square root appears, and the cursor is in a new insertion point inside
3702 You can type variables, numbers, other square roots, fractions, whatever
3705 will automatically resize the square root to fit what is inside.
3708 \begin_layout Standard
3710 \begin_inset Quotes eld
3714 \begin_inset Quotes erd
3718 \begin_inset Formula $\overrightarrow{a}$
3721 ) or group of characters (
3722 \begin_inset Formula $\overrightarrow{a+b}$
3725 ) is done similarly.
3726 Decorations are available from the toolbar via the button
3729 arg "math-insert \\hat"
3733 Click on a decoration, and \SpecialChar LyX
3734 will insert that decoration with an insertion
3735 point under (or over) it.
3736 Just type what you want in the insertion point.
3737 There are two sets of decorations: those that resize with the text you
3738 type, and those that have a fixed size, and are most appropriate for a
3743 \begin_layout Standard
3744 Delimiters such as parentheses, brackets, and braces work similarly, but
3745 are a bit more complicated.
3746 Hit the delimiter button
3749 arg "dialog-show mathdelimiter"
3757 Your current selection of delimiters is displayed in a box.
3758 It is a pair of parentheses by default, but you can choose a pair of braces,
3759 a brace and a parenthesis, or choose the empty square to have something
3761 \begin_inset Quotes eld
3765 \begin_inset Formula $a=\left\langle 7\right.$
3769 \begin_inset Quotes erd
3772 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3777 \begin_layout Standard
3778 If you are lazy, you can type actual parentheses in math mode, rather than
3784 However, those parentheses will be the same size as regular text, which
3785 will look bad if you have a big fraction or matrix inside the parentheses.
3786 So it is better to use one of the three delimiter buttons that insert them
3787 directly, for example
3790 arg "math-delim ( )"
3796 \begin_layout Standard
3797 You can also put delimiters or a square root sign or a decoration on already
3798 existing formula parts.
3799 Select the portion of the formula that you want to adjust, and then click
3800 on the button you want from the
3803 \begin_inset space ~
3809 Try using this to change Newton's second law from scalar to vector form
3811 \begin_inset Formula $f=ma$
3815 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3819 Once you have learned about matrices, this is how you will put parentheses
3820 or brackets around them.
3823 \begin_layout Subsection
3827 \begin_layout Standard
3828 To create a fraction, click on the fraction button
3831 arg "math-insert \\frac-square"
3837 \begin_inset space ~
3844 writes two insertion points in a fraction.
3845 As you would expect, you can use arrow keys or the mouse to move around
3847 Click on the top square and type
3848 \begin_inset Quotes eld
3852 \begin_inset Quotes erd
3861 \begin_inset Quotes eld
3865 \begin_inset Quotes erd
3869 You have made a fraction! Of course you can type anything within each of
3870 the two boxes: variables with exponents, square roots, other fractions,
3875 \begin_layout Labeling
3876 \labelwidthstring 00.00.0000
3882 \begin_inset space ~
3892 \begin_layout Subsection
3893 Functions: lim, log, sin and others
3896 \begin_layout Standard
3897 Because letters in math mode are considered to be variables, if you type
3899 \begin_inset Quotes eld
3903 \begin_inset Quotes erd
3906 in math mode, \SpecialChar LyX
3907 thinks you are typing the product of the three variables
3909 \begin_inset Formula $s$
3913 \begin_inset Formula $i$
3917 \begin_inset Formula $n$
3921 The three letters will be typeset in italics, when what you really wanted
3923 \begin_inset Quotes eld
3927 \begin_inset Quotes erd
3931 In addition, \SpecialChar LyX
3932 will not put a space between the word
3933 \begin_inset Quotes eld
3937 \begin_inset Quotes erd
3941 \begin_inset Quotes eld
3945 \begin_inset Quotes erd
3952 will exit the formula).
3954 \begin_inset Quotes eld
3958 \begin_inset Formula $\sin(x)$
3962 \begin_inset Quotes erd
3966 \begin_inset Quotes eld
3970 \begin_inset Formula $sin(x)$
3974 \begin_inset Quotes erd
3980 \begin_layout Standard
3984 \begin_inset space ~
3992 arg "math-insert \\functions"
3996 \begin_inset Quotes eld
4000 \begin_inset Quotes erd
4003 in the pop-up function list.
4005 \begin_inset Quotes eld
4009 \begin_inset Quotes erd
4012 is displayed in \SpecialChar LyX
4013 in black, and set in upright roman type.
4014 The whole word is treated as one symbol, so if you type
4018 , it will delete the whole word.
4020 \begin_inset Quotes eld
4024 \begin_inset Quotes erd
4027 , which will be written in blue italics, like you expect in a formula.
4028 In the output, the expression will be correctly typeset.
4032 \begin_layout Standard
4033 The function list includes other trigonometric functions and their inverses,
4034 hyperbolic functions, logarithms, limits, and quite a few others.
4035 These functions can take subscripts and superscripts, important for typing
4037 \begin_inset Quotes eld
4041 \begin_inset Formula $\cos^{2}\theta$
4045 \begin_inset Quotes erd
4049 \begin_inset Quotes eld
4053 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4057 \begin_inset Quotes erd
4063 \begin_layout Labeling
4064 \labelwidthstring 00.00.0000
4070 \begin_inset space ~
4080 \begin_layout Subsection
4084 \begin_layout Standard
4085 Click on the matrix button
4088 arg "dialog-show mathmatrix"
4094 \begin_inset space ~
4100 A pop-up dialog allows you to choose how many rows and columns you want
4102 Choose 2 rows and 3 columns and hit
4108 prints 6 insertion points in a
4109 \begin_inset Formula $2\times3$
4113 As usual, you can put any sort of formula expression (a square root, another
4114 matrix, etc.) in each insertion point.
4115 You can also leave some of the insertion points empty if you want.
4118 \begin_layout Standard
4123 can be used to move horizontally between the columns of a matrix.
4124 Alternatively, you can use the arrow keys to move around - hitting
4128 at the end of one box will move to the next box,
4132 will move to the next row, etc.
4135 \begin_layout Standard
4136 If you need to change the number of rows and columns, use the menu
4138 Edit\SpecialChar menuseparator
4140 \begin_inset space \thinspace{}
4144 \begin_inset space \thinspace{}
4149 or the math toolbar buttons
4152 arg "tabular-feature append-row"
4158 arg "tabular-feature delete-row"
4164 arg "tabular-feature append-column"
4170 arg "tabular-feature delete-column"
4176 \begin_layout Standard
4181 for information on how to change the horizontal alignment of each column,
4182 and how to change the vertical position of the whole matrix.
4183 Note that if you want to write a table containing text, you should use
4185 's wonderful table support, rather than trying to write text in a matrix.
4188 \begin_layout Subsection
4192 \begin_layout Standard
4193 All of the expressions we have written so far have been on the same line
4194 as the text that came before and after them, otherwise known as inline
4196 This is fine for short, simple expressions, but if you want to write larger
4197 ones, or if you want your expressions to stand out from the text, you need
4198 to write them in display mode.
4199 In addition, only displayed expressions can be labeled and numbered (see
4204 ), and multi-line equations must be in display mode.
4207 \begin_layout Standard
4208 While being in a formula, click on the display button
4219 This centers the formula and adds a blank line before and after it.
4220 Now type in an expression and compile your file to see how it looks.
4221 The display button is actually a toggle; use it now to change a couple
4222 of your expressions to display mode and back.
4226 \begin_layout Standard
4227 Display mode has a couple differences from inline mode:
4230 \begin_layout Itemize
4231 The default font is larger for a few symbols, like
4232 \begin_inset Formula $\sum$
4236 \begin_inset Formula $\int$
4242 \begin_layout Itemize
4243 Subscripts and superscripts for limits and sums (but not integrals) are
4244 written under and over rather than next to the symbols
4247 \begin_layout Itemize
4251 \begin_layout Standard
4252 Other than these differences, though, displayed expressions and inline expressio
4253 ns are very similar.
4256 \begin_layout Standard
4257 One final note about the way displayed formulas are typeset: be careful
4258 about whether you are putting your equation into a new paragraph or not.
4259 If your formula is in the middle of a sentence or paragraph, then do not
4265 Doing so will cause the text
4269 the formula to start a new paragraph.
4270 That text will be indented or follow a blank line, depending on your document
4271 paragraph settings, which is probably not what you want.
4274 \begin_layout Labeling
4275 \labelwidthstring 00.00.0000
4280 : Put the various equations in
4284 into display mode, and see how they are typeset differently.
4287 \begin_layout Labeling
4288 \labelwidthstring 00.00.0000
4293 : Using various tools you have learned in this section, you should be able
4294 to write an equation like:
4298 \begin_layout Plain Layout
4299 After you have done it the hard way, give
4301 Insert\SpecialChar menuseparator
4302 Math\SpecialChar menuseparator
4304 \begin_inset space ~
4315 \begin_inset Formula
4317 f(x)=\left\{ \begin{array}{cc}
4320 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4329 \begin_layout Section
4333 \begin_layout Standard
4334 Now you are familiar with the basics.
4336 's math editor can do a lot more.
4337 You can refer to the
4341 manual for tips on how to:
4344 \begin_layout Itemize
4345 Label and number expressions.
4348 \begin_layout Itemize
4349 Create multi-line equations.
4352 \begin_layout Itemize
4353 Change typefaces, e.
4354 \begin_inset space \thinspace{}
4358 \begin_inset space \space{}
4361 to write bold-face text in an expression.
4364 \begin_layout Itemize
4365 Fine-tune font sizes and spacing within an expression.
4366 (Do not worry about this until your final draft!)
4369 \begin_layout Itemize
4371 These are very powerful, because you just define them once at the top of
4372 the document, and then you can use them throughout the document.
4375 \begin_layout Itemize
4376 Do almost all you can do with math.
4379 \begin_layout Chapter
4383 \begin_layout Section
4384 Other major \SpecialChar LyX
4388 \begin_layout Standard
4389 We have not gone through all the possible commands in \SpecialChar LyX
4390 , and we are not planning
4399 \begin_inset space ~
4404 manual for more information.
4405 We will just mention a couple more major things \SpecialChar LyX
4409 \begin_layout Itemize
4411 has WYSIWYM support for tables.
4414 Insert\SpecialChar menuseparator
4420 arg "tabular-insert"
4424 Click on the table with the
4431 \begin_inset space ~
4436 dialog box which allows extensive table editing.
4440 arg "toolbar-toggle table"
4443 the table toolbar will appear permanently.
4446 \begin_layout Itemize
4448 also supports including pictures in any format within documents.
4451 Insert\SpecialChar menuseparator
4457 arg "dialog-show-new-inset graphics"
4461 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4462 can have captions, and \SpecialChar LyX
4463 will automatically generate lists of figures and/or
4467 \begin_layout Itemize
4469 is heavily configurable.
4470 Everything from how the \SpecialChar LyX
4471 window looks to how the output comes out can be
4472 configured in a number of ways.
4473 Much configuration is done through
4475 Tools\SpecialChar menuseparator
4479 For more information on this, check out
4481 Help\SpecialChar menuseparator
4482 Customization\SpecialChar endofsentence
4486 \begin_layout Itemize
4488 is being developed by a team of programmers on five continents.
4489 Therefore, \SpecialChar LyX
4490 has better support for non-English languages (such as Dutch,
4491 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4492 ) than many word processors.
4493 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4494 languages Chinese Japanese, and Korean are supported.
4495 You can write documents in other languages and you can also configure \SpecialChar LyX
4497 to show its menus and error messages in other languages.
4501 \begin_layout Itemize
4502 The \SpecialChar LyX
4503 menus feature keybindings.
4504 This means that you can do
4506 File\SpecialChar menuseparator
4517 or by using the binding which is shown next to it in the menu (
4524 Keybindings are also configurable.
4525 For information on this, check out
4527 Help\SpecialChar menuseparator
4528 Customization\SpecialChar endofsentence
4532 \begin_layout Itemize
4534 can read \SpecialChar LaTeX
4537 \begin_inset space ~
4541 \begin_inset CommandInset ref
4543 reference "sec:tex2lyx"
4550 \begin_layout Itemize
4551 Spell-checking, thesaurus, and word count facilities are available.
4554 \begin_layout Itemize
4555 Generation of indexes and nomenclatures/glossaries is supported.
4558 \begin_layout Section
4560 for \SpecialChar LaTeX
4562 \begin_inset CommandInset label
4564 name "sec:latexusers"
4571 \begin_layout Standard
4572 If you do not know anything about \SpecialChar LaTeX
4573 , you do not have to read this section.
4574 Actually, you might want to
4578 about \SpecialChar LaTeX
4579 , and then read this chapter.
4580 However, some of those who begin to use \SpecialChar LyX
4581 will be familiar with \SpecialChar LaTeX
4583 If you are such a person, you may be wondering if \SpecialChar LyX
4584 can really do everything
4587 The short answer is that \SpecialChar LyX
4588 can do pretty much everything \SpecialChar LaTeX
4590 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4595 \begin_layout Standard
4596 Because this is just a tutorial, we are only going to mention things that
4597 new \SpecialChar LyX
4598 users will most likely be interested in.
4599 In the interests of keeping the Tutorial short, we will give only minimal
4604 \begin_inset space ~
4612 \begin_inset space ~
4617 manuals have a great deal of information on differences between \SpecialChar LyX
4618 and \SpecialChar LaTeX
4620 and how to do various \SpecialChar LaTeX
4621 tricks in \SpecialChar LyX
4625 \begin_layout Subsection
4630 \begin_layout Standard
4631 Anything that you enter in \SpecialChar TeX
4632 mode will be passed straight to \SpecialChar LaTeX
4634 displayed in red on the screen.
4635 You can use \SpecialChar TeX
4636 commands in \SpecialChar LyX
4639 Insert\SpecialChar menuseparator
4641 \begin_inset space ~
4653 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4657 \begin_layout Standard
4658 In a math formula, \SpecialChar TeX
4659 mode is handled a bit differently.
4661 mode is entered there by typing a backslash.
4662 The backslash is not written out, but anything you type afterwards will
4664 You exit \SpecialChar TeX
4669 or some other non-alphabetic character, like a number, underscore, caret
4671 Once you exit \SpecialChar TeX
4672 mode, if \SpecialChar LyX
4673 knows the \SpecialChar TeX
4674 command you have typed in, it will
4675 convert it to WYSIWYM\SpecialChar endofsentence
4677 \begin_inset Quotes eld
4687 \begin_inset Quotes erd
4690 in a formula and then press
4696 \begin_inset Quotes eld
4700 \begin_inset Quotes erd
4704 \begin_inset Quotes eld
4708 \begin_inset Formula $\gamma$
4712 \begin_inset Quotes erd
4716 This will work for almost all, non-complicated math macros.
4717 This may be faster than using the
4720 \begin_inset space ~
4725 , and will be especially convenient for experienced \SpecialChar LaTeX
4729 \begin_layout Standard
4730 As a special case, if you type
4731 \begin_inset Quotes eld
4741 \begin_inset Quotes erd
4744 in a formula, the beginning
4748 ending braces will be inserted in red while the cursor is placed between
4750 This makes it more convenient to type those commands that take an argument.
4753 \begin_layout Standard
4755 cannot do absolutely everything that \SpecialChar LaTeX
4757 Some fancy functions are not supported at all, while some work but are
4760 mode allows users to get the full flexibility of \SpecialChar LaTeX
4761 , while having all the
4762 convenient features of \SpecialChar LyX
4763 , like WYSIWYM math, tables, and editing.
4765 could never support every \SpecialChar LaTeX
4773 in the preamble (see Section
4774 \begin_inset space ~
4778 \begin_inset CommandInset ref
4780 reference "sec:preamble"
4784 ), you can use any package you want — although you will not have WYSIWYM
4785 support for that package's features.
4788 \begin_layout Subsection
4789 Importing \SpecialChar LaTeX
4795 \begin_inset CommandInset label
4804 \begin_layout Standard
4805 You can import a \SpecialChar LaTeX
4806 file into \SpecialChar LyX
4809 File\SpecialChar menuseparator
4810 Import\SpecialChar menuseparator
4812 \begin_inset space ~
4817 menu in \SpecialChar LyX
4819 This will call the program
4823 which will create a file foo.lyx from the file foo.tex.
4825 will then open that file.
4826 If the translation does not work, you can try calling
4830 from the command line, possibly using fancier options.
4833 \begin_layout Standard
4834 Even when the translation does work,
4838 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4840 It will leave things it does not understand in \SpecialChar TeX
4841 mode; so, after translating
4846 , you can look for the red text and manually edit it to get it right.
4849 \begin_layout Standard
4854 has its own documentation (manpage), which Unix/Linux users can access
4855 via the console command
4858 \begin_inset space ~
4864 The manpage describes which \SpecialChar LaTeX
4865 commands and environments are not supported,
4866 what bugs you might run into (and how to get around them), and how to use
4867 the various options.
4870 \begin_layout Standard
4871 It is important to understand that
4875 can only translate files whose document class is
4876 \begin_inset Quotes eld
4880 \begin_inset Quotes erd
4884 , that is, for which there is a corresponding \SpecialChar LyX
4890 If there is no layout file, then you will get an error saying that the
4891 conversion could not be performed.
4892 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4897 simply will not know how to translate the \SpecialChar LaTeX
4898 that it finds there into things
4901 More about layout files and how they are created is explained in detail
4909 \begin_layout Subsection
4910 Converting \SpecialChar LyX
4911 Documents to \SpecialChar LaTeX
4915 \begin_layout Standard
4916 You might wish to convert a \SpecialChar LyX
4917 Document to a \SpecialChar LaTeX
4919 For example, a co-worker or co-author who does not have \SpecialChar LyX
4924 File\SpecialChar menuseparator
4925 Export\SpecialChar menuseparator
4929 This will create a file
4937 file you are editing.
4940 \begin_layout Subsection
4945 \begin_layout Subsubsection
4949 \begin_layout Standard
4952 Document\SpecialChar menuseparator
4955 dialog takes care of the document-wide options, such as changing the document
4956 class, default font size and paper size.
4957 Document class options and also options for \SpecialChar LaTeX
4958 packages can be entered there
4962 \begin_inset space ~
4970 \begin_layout Subsubsection
4971 Other Preamble Matter
4972 \begin_inset CommandInset label
4981 \begin_layout Standard
4982 If you have special commands to put in the preamble of a \SpecialChar LaTeX
4984 use them in a \SpecialChar LyX
4988 Document\SpecialChar menuseparator
4989 Settings\SpecialChar menuseparator
4991 \begin_inset space ~
4996 and type in the dialog window (or from the document settings dialog, depending
4998 Anything you type will (as with \SpecialChar TeX
4999 mode) be sent directly to \SpecialChar LaTeX
5003 \begin_layout Subsection
5008 \begin_layout Standard
5010 has support for Bib\SpecialChar TeX
5011 , which allows you to build databases of bibliographical
5012 references to be used in multiple documents.
5015 Insert\SpecialChar menuseparator
5017 \begin_inset space \thinspace{}
5021 \begin_inset space \thinspace{}
5024 TOC\SpecialChar menuseparator
5026 \begin_inset space ~
5041 field you load Bib\SpecialChar TeX
5046 field you can load Bib\SpecialChar TeX
5050 \begin_layout Standard
5051 After you have done this, you can use citations from any bibliographies
5052 you have included with
5054 Insert\SpecialChar menuseparator
5058 \begin_inset space ~
5062 \begin_inset CommandInset ref
5064 reference "sec:bibliographies"
5073 dialog will show a list of all the references in your
5081 \begin_layout Section
5085 \begin_layout Standard
5086 Sometimes when you try to view a document, there will be errors, things
5087 that \SpecialChar LyX
5088 or \SpecialChar LaTeX
5090 When this happens, \SpecialChar LyX
5095 \begin_inset space ~
5101 Clicking on individual errors in this dialog will take you to the place
5102 in the \SpecialChar LyX
5103 document where the error occurs and also display the detailed \SpecialChar LaTeX