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 true
93 \author -712698321 "Jürgen Spitzmüller"
104 by the \SpecialChar LyX
109 \begin_layout Plain Layout
111 If you have comments on or corrections to this documentation, please send
112 them to the \SpecialChar LyX
113 Documentation mailing list:
114 \begin_inset CommandInset href
116 target "lyx-docs@lists.lyx.org"
130 \begin_layout Standard
131 \begin_inset CommandInset toc
132 LatexCommand tableofcontents
139 \begin_layout Chapter
143 \begin_layout Section
144 Welcome to \SpecialChar LyX
148 \begin_layout Standard
149 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
152 Now, do not panic – you will not need to learn \SpecialChar LaTeX
153 to use \SpecialChar LyX
155 That is, after all, the whole point of \SpecialChar LyX
156 : to provide an almost-WYSIWYG interface
157 to \SpecialChar LaTeX
159 There are some things you will need to learn, however, in order to use
164 \begin_layout Standard
165 Some of you probably found your way to this document because you tried to
166 put two spaces after a
167 \begin_inset Quotes eld
171 \begin_inset Quotes erd
174 or tried to put three blank lines between paragraphs.
175 You found out you could not and, in fact, you will find out that most of
176 the little tricks you are accustomed to use in word processors will not
177 work in \SpecialChar LyX
179 That is because most word processors you have used before allow you manually
180 to enter all spacings, font changes, and so on.
181 So you end up not only writing a document but typesetting it, too.
183 does the typesetting for you, in a consistent fashion, letting you focus
184 on the important things, like the content of your writing.
187 \begin_layout Standard
188 So read on to learn more about \SpecialChar LyX
190 Reading this tutorial is definitely worth the time.
193 \begin_layout Section
203 \begin_layout Standard
204 Before we get started with this section, you need to know that this
208 uses the notation outlined in the
213 If you came to this manual first, please read the
217 before you continue with the
224 \begin_layout Standard
225 Now that you know which fonts mean what in the documentation, we want to
226 talk a bit about what this
233 \begin_layout Subsection
234 Getting the most out of the Tutorial
237 \begin_layout Standard
238 This tutorial consists of examples and exercises.
239 To get the most out of this document, you should read through it, typing
240 all the little things we are telling you to type and trying out all of
241 the exercises to see if you get them right.
242 For convenience, you might want to print out the PDF version of this document.
245 \begin_layout Standard
246 If you are familiar with \SpecialChar LaTeX
247 , you will probably be able to read the
251 somewhat faster, since many \SpecialChar LyX
252 ideas are just \SpecialChar LaTeX
254 However, \SpecialChar LyX
255 has features you will want to learn about.
256 Even if you do not feel like reading the rest of the
260 , you should definitely check out Section
265 \begin_inset CommandInset ref
267 reference "sec:latexusers"
271 , which is specifically written for experienced \SpecialChar LaTeX
275 \begin_layout Subsection
283 \begin_layout Itemize
284 Detailed explanations of all of \SpecialChar LyX
289 \begin_layout Standard
298 \begin_layout Itemize
299 Detailed explanations of \SpecialChar LaTeX
304 \begin_layout Standard
306 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
309 can have a look at the
321 \begin_layout Standard
322 It is time to move on, time for your first document \SpecialChar ldots
326 \begin_layout Chapter
327 Getting started with \SpecialChar LyX
331 \begin_layout Section
332 Your first \SpecialChar LyX
336 \begin_layout Standard
337 OK\SpecialChar endofsentence
338 You are ready to start writing.
339 Before you do, there are a few things we need to mention, which will hopefully
340 make the Tutorial more instructive and useful.
344 \begin_layout Standard
345 Because there is information we cannot give you in the Tutorial, the
351 thing that you need to do is find the
358 Start up \SpecialChar LyX
368 You may want to load the
372 as well (if you are not reading it within \SpecialChar LyX
374 This way, you can read them while you are writing your own file.
378 \begin_layout Plain Layout
379 They can also serve as good examples of how to use the many features of
386 Note that once you have got more than one document open, you can use the
391 menu or the document tabs to switch between them.
394 \begin_layout Standard
395 In this Tutorial, we are going to assume that you have a fully working version
397 , as well as a \SpecialChar LaTeX
398 -distribution and a PDF-viewer.
399 This should be the case on all major Linux- and BSD-distributions, as well
400 as on Windows, where this is setup by the \SpecialChar LyX
404 \begin_layout Standard
405 Finally, we have written a file called
406 \change_deleted -712698321 1553351112
410 \change_inserted -712698321 1553351120
418 to let you practice your \SpecialChar LyX
420 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
423 As you learn new \SpecialChar LyX
424 functions, we will suggest that you fix those parts of
426 \change_deleted -712698321 1553351165
430 \change_inserted -712698321 1553351165
440 \begin_inset Quotes els
444 \begin_inset Quotes ers
447 hints about how to fix things.
451 \begin_layout Plain Layout
452 The hints are located in yellow
453 \begin_inset Quotes eld
457 \begin_inset Quotes erd
461 Access the text in a note by clicking on it.
466 If you want to cheat, or check what you have done, there is also a file
468 \change_deleted -712698321 1553351273
472 \change_inserted -712698321 1553351278
480 which contains the same text written and typeset by a \SpecialChar LyX
484 \begin_layout Standard
485 The example files can be found in
486 \change_inserted -712698321 1553351405
488 \begin_inset Quotes eld
492 \begin_inset Quotes erd
497 File\SpecialChar menuseparator
498 Open Example\SpecialChar ldots
500 \change_deleted -712698321 1553351425
507 directory of \SpecialChar LyX
508 's installation folder
512 \change_deleted -712698321 1553351441
516 \change_inserted -712698321 1553351441
526 File\SpecialChar menuseparator
533 to save a copy in your own directory for you to work on.
534 As you fix parts of the raw document, check to see how those changes affect
538 \begin_layout Standard
540 \change_deleted -712698321 1553351473
546 \change_inserted -712698321 1553351473
549 File\SpecialChar menuseparator
550 Open Example\SpecialChar ldots
555 contains lots of other examples files.
556 They will show you how to do various fancy things with \SpecialChar LyX
558 After you have read the Tutorial, or when you are confused about how to
559 do something fancy in \SpecialChar LyX
560 , take a look at these files.
563 \begin_layout Subsection
564 Typing, Viewing, and Exporting
567 \begin_layout Itemize
570 File\SpecialChar menuseparator
574 \begin_layout Itemize
575 Type a sentence like:
577 This is my first \SpecialChar LyX
581 \begin_layout Itemize
582 Save your document with
584 File\SpecialChar menuseparator
589 As\SpecialChar endofsentence
593 \begin_layout Itemize
594 Create a PDF file, with
596 Document\SpecialChar menuseparator
599 or the toolbar button
607 will open a PDF-viewer program displaying your document as it will look
611 \begin_layout Itemize
612 Export the ready to print document with
614 File\SpecialChar menuseparator
622 \begin_layout Standard
623 Congratulations! You have written your first \SpecialChar LyX
625 All of the rest is just details.
626 \begin_inset Newline newline
632 \begin_layout Standard
637 You can save time by leaving the PDF viewer running in the background.
638 Under MacOS and Linux you can use
640 Document\SpecialChar menuseparator
643 or the toolbar button
649 and just click on the PDF viewer window afterwards.
650 Under Windows still use
652 Document\SpecialChar menuseparator
664 \begin_layout Standard
669 In case you are using a high-resolution display, the LyX toolbar icons
671 To change their size, right-click into a toolbar.
674 \begin_layout Subsection
678 \begin_layout Standard
680 can of course do most of the things you are used to doing with a word processor.
681 It will word-wrap and indent paragraphs automatically.
682 Here is a quick description of how to do some simple actions.
685 \begin_layout Description
686 Undo \SpecialChar LyX
687 has multiple levels of undo, which means you can undo everything you
688 have done since your current editing session started, by selecting
690 Edit\SpecialChar menuseparator
699 ) over and over again.
700 If you undo too much, just select
702 Edit\SpecialChar menuseparator
715 \begin_layout Standard
716 Currently, undo is limited to 100 steps.
720 \begin_layout Description
723 Edit\SpecialChar menuseparator
734 Edit\SpecialChar menuseparator
745 Edit\SpecialChar menuseparator
754 ) to cut, copy, and paste.
755 Or automatically paste selected text (including selections from other programs)
763 \begin_layout Description
766 Edit\SpecialChar menuseparator
780 arg "dialog-show findreplace"
784 In the dialog, search with the
796 button to replace a word you have found.
800 \begin_layout Plain Layout
801 Close the window when you are done or leave it open if you find it more
803 Most dialog boxes in \SpecialChar LyX
804 can operate like this.
805 Just be sure you have the right window in focus when you are trying to
806 type in the main \SpecialChar LyX
807 window or a \SpecialChar LyX
813 If you like, you can specify whether to make the search case-sensitive,
814 or to search for only complete words; you can also search backwards through
818 \begin_layout Description
833 , which will by default print characters in italics), set it in
843 , usually small caps, used for people's names), or use your own formatting
846 Edit\SpecialChar menuseparator
851 Style\SpecialChar menuseparator
854 dialog (toolbar button
857 arg "dialog-show character"
863 \begin_layout Description
864 Toolbar Other buttons on the toolbar allow you to do some of the more popular
892 \begin_layout Standard
893 Of course, you have not yet written enough to make most of these functions
895 As you write more, though, try undoing, pasting, etc.
898 \begin_layout Subsection
899 WYSIWYM: Whitespace in \SpecialChar LyX
903 \begin_layout Standard
904 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
907 As many times as you hit
911 , you will only get one blank line.
912 As many times as you hit
916 , you will only get one space.
917 On a blank line, \SpecialChar LyX
918 will not let you type even one space.
923 key will not move you forward one tab stop; in fact there
927 no tab stops! There is no ruler at the top of the page to let you set tabs
931 \begin_layout Standard
932 Many word processors are based on the WYSIWYG principle:
933 \begin_inset Quotes eld
936 What You See Is What You Get.
937 \begin_inset Quotes erd
941 , on the other hand, is based on the principle that
942 \begin_inset Quotes eld
945 What You See Is What You
950 \begin_inset Quotes erd
953 You type what you mean and \SpecialChar LyX
954 will take care of typesetting it for you so
955 that the output looks nice.
960 grammatically separates paragraphs and a
964 grammatically separates words; so there is no reason to have several of
969 has no grammatical function at all – so \SpecialChar LyX
971 Using \SpecialChar LyX
972 , you will spend more of your time worrying about the
976 of your document and less time worrying about the
985 for more information on the WYSIWYM concept.
988 \begin_layout Standard
990 does have (many) ways to fine-tune the formatting of your document.
991 After all, \SpecialChar LyX
1001 has information about all that.
1002 It includes horizontal fills and vertical space — which are more powerful
1003 and versatile than multiple spaces or blank lines — and ways to change
1004 font sizes, character styles, and paragraph alignments by hand.
1005 The idea, though, is that you can write your whole document, focusing on
1006 content, and just worry about that fine-tuning at the end.
1007 With standard word processors, you will be distracted by document formatting
1008 throughout the writing process.
1011 \begin_layout Section
1015 \begin_layout Standard
1016 Different parts of a document have different purposes; we call these parts
1022 Most of a document is made up of regular text.
1023 Section titles (chapter, subsection, etc.) let the reader know that a new
1024 topic or subtopic will be discussed.
1025 Certain types of documents have special environments.
1026 A journal article will have an abstract and a title.
1027 A letter will have neither of these, but will probably have an environment
1028 that gives the writer's address.
1031 \begin_layout Standard
1032 Environments are a major part of the
1033 \begin_inset Quotes eld
1036 What You See Is What You Mean
1037 \begin_inset Quotes erd
1040 philosophy of \SpecialChar LyX
1042 A given environment may require a certain font style, font size, indenting,
1043 line spacing, and more.
1044 This problem is aggravated, because the exact formatting for a given environmen
1045 t may change: one journal may use boldface, 18 point, centered type for
1046 section titles while another uses italicized, 15 point, left justified
1047 type; different languages may have different standards for indenting; and
1048 bibliography formats can vary widely.
1050 lets you avoid learning all the different formatting styles.
1053 \begin_layout Standard
1058 choice box is located on the left end of the toolbar and looks like this:
1060 \begin_inset Graphics
1061 filename clipart/ToolbarEnvBox.png
1068 It indicates in which environment you are currently writing.
1069 While you were writing your first document, it said
1070 \begin_inset Quotes eld
1074 \begin_inset Quotes erd
1077 which is the default environment for text.
1078 Now you will put a number of environments in your new document so that
1079 you can see how they work.
1082 \begin_layout Subsection
1083 Sections and Subsections
1086 \begin_layout Standard
1091 on the first line of your new \SpecialChar LyX
1104 \begin_layout Plain Layout
1110 If nothing is selected, \SpecialChar LyX
1111 changes the paragraph you are currently in to
1112 the selected environment.
1113 Alternatively, you can change several paragraphs to a different environment
1114 by selecting them before picking an environment.
1131 , which will be covered below.
1134 \begin_inset Quotes eld
1138 \begin_inset Quotes erd
1141 and typesets the section heading (title) in a larger font.
1146 \SpecialChar endofsentence
1152 \begin_inset Quotes eld
1156 \begin_inset Quotes erd
1160 \begin_inset Quotes eld
1164 \begin_inset Quotes erd
1168 Section headings, like most environments, are assumed to end when you type
1173 \SpecialChar endofsentence
1174 Type the document introduction:
1177 \begin_layout LyX-Code
1178 This is an introduction to my first \SpecialChar LyX
1182 \begin_layout Standard
1198 \begin_inset Quotes eld
1202 \begin_inset Quotes erd
1205 and waits for you to type a title.
1207 \begin_inset Quotes eld
1213 \begin_inset space ~
1219 \begin_inset Quotes erd
1222 , and you will see that \SpecialChar LyX
1223 again sets it as a section title.
1226 \begin_layout Standard
1228 Go to the end of Section
1229 \begin_inset space ~
1233 \begin_inset Quotes eld
1236 my first \SpecialChar LyX
1238 \begin_inset Quotes erd
1254 Again, \SpecialChar LyX
1256 \begin_inset Quotes eld
1260 \begin_inset Quotes erd
1263 and waits for you to type a title.
1270 \begin_inset space ~
1274 \begin_inset Quotes eld
1278 \begin_inset Quotes erd
1282 \begin_inset space ~
1285 2, has been automatically renumbered to Section
1286 \begin_inset space ~
1289 3! In true WYSIWYM fashion, you just need to identify the text that makes
1290 up the section titles, and \SpecialChar LyX
1291 takes care of numbering the sections and typesettin
1295 \begin_layout Standard
1304 environment, and type the following five lines:
1307 \begin_layout LyX-Code
1308 Sections and subsections are described below.
1311 \begin_layout LyX-Code
1315 \begin_layout LyX-Code
1316 Sections are bigger than subsections.
1319 \begin_layout LyX-Code
1320 Subsection description
1323 \begin_layout LyX-Code
1324 Subsections are smaller than sections.
1327 \begin_layout Standard
1328 Click on the second line and select
1338 numbers the subsection
1339 \begin_inset Quotes eld
1343 \begin_inset Quotes erd
1346 , and typesets it in a font which is bigger than regular text but smaller
1347 than the section title.
1348 Change the fourth line to the
1352 environment as well.
1353 As you probably expected, \SpecialChar LyX
1354 automatically numbered the section
1355 \begin_inset Quotes eld
1359 \begin_inset Quotes erd
1363 If you put yet another section before Section
1364 \begin_inset space ~
1368 \begin_inset space ~
1371 2 will be renumbered as Section 3, and the subsections will be renumbered
1373 \begin_inset Quotes eld
1377 \begin_inset Quotes erd
1381 \begin_inset Quotes eld
1385 \begin_inset Quotes erd
1391 \begin_layout Standard
1392 Further levels of sectioning include
1405 We will let you play with these on your own.
1406 You may notice that paragraph and subparagraph headings are not numbered
1407 by default, and that subparagraphs are indented; see the
1411 for an explanation and how to change this.
1416 headings are actually the highest level of sectioning, above
1420 s, but you are only allowed to use them in certain types (text classes)
1422 documents (see Section
1423 \begin_inset space ~
1427 \begin_inset CommandInset ref
1429 reference "sec:Document-Classes"
1436 \begin_layout Standard
1437 Finally, you may want to have sections or subsections that are not numbered.
1438 There are environments for this as well.
1439 If you change one of your section headings to the
1443 environment (you may have to scroll down in the
1447 box to find it), \SpecialChar LyX
1448 will use the same font size for the heading as it uses
1449 for a regular section, but it will not number that section.
1450 There are corresponding
1451 \begin_inset Quotes eld
1455 \begin_inset Quotes erd
1458 heading environments for
1467 Try changing some of your sections or subsections to the starred environments,
1468 and note how the other section numbers are updated.
1471 \begin_layout Labeling
1472 \labelwidthstring 00.00.0000
1477 : Fix the section and subsection headings in
1478 \change_inserted -712698321 1553351516
1482 \change_deleted -712698321 1553351522
1486 \begin_inset Newline newline
1499 \begin_layout Subsection
1503 \begin_layout Standard
1505 has several different environments for typesetting lists.
1506 The various list environments free you from hitting
1510 a million times when writing an outline, or from renumbering a whole list
1511 when you want to add a point in the middle of the list.
1512 Different types of documents logically require different list environments:
1515 \begin_layout Itemize
1516 A slide presentation might use the
1520 environment's bulleted lists to describe different points.
1523 \begin_layout Itemize
1524 An outline would use the
1528 environment's numbered lists (and lettered sublists).
1531 \begin_layout Itemize
1532 A document describing several software packages could use the
1536 environment, where each item in the list begins with a bold-faced word.
1539 \begin_layout Itemize
1548 ) environment is a variation on the
1555 \begin_layout Standard
1556 Let us write a list of reasons why \SpecialChar LyX
1557 is better than other word processors.
1558 Somewhere in your document, type:
1561 \begin_layout Standard
1565 is better than other word processors because:
1568 \begin_layout Standard
1585 arg "layout Itemize"
1591 \begin_inset Quotes eld
1595 \begin_inset Quotes erd
1599 Type in your reasons:
1602 \begin_layout LyX-Code
1603 Typesetting is done for you.
1606 \begin_layout LyX-Code
1610 \begin_layout LyX-Code
1611 Lists are very easy to create!
1614 \begin_layout Standard
1615 List environments, unlike headings, do not end when you type
1620 Instead, \SpecialChar LyX
1621 assumes you are going on to the next item in the list.
1622 The above will therefore result in a three-item list.
1623 If you want more than one paragraph within one list
1627 , one way is to use the
1630 \begin_inset space ~
1635 , which you get by typing
1640 In order to get out of the list, you need to reselect the
1644 environment (or just use the key binding
1647 arg "layout Standard"
1653 \begin_layout Standard
1654 You now have a beautiful itemized list.
1655 You might want to run \SpecialChar LaTeX
1656 to see how the list looks when printed out.
1657 But what if you wanted to number the reasons? Well, just select the whole
1662 \begin_layout Plain Layout
1664 will not let you select the first bullet (or the actual number in a numbered
1665 section title) unless you also select the paragraph
1669 it, which you probably do not want to do.
1670 This is on purpose because the bullet or number depends on the document
1671 settings or text position, respectively.
1687 arg "layout Enumerate"
1691 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1692 will fix the numbering.
1695 \begin_layout Standard
1696 While the list is still selected, you can change to the other two list environme
1704 \begin_inset space \thinspace{}
1710 \begin_inset space \thinspace{}
1720 arg "layout Description"
1729 ), in order to see what they look like.
1730 For those two environments, each list item is made up of a term, which
1731 is the item's first word, followed by a definition, which is the rest of
1732 the paragraph (until you hit
1737 The term is either typeset in boldface (
1742 \begin_inset Quotes eld
1746 \begin_inset Quotes erd
1753 \begin_layout Plain Layout
1754 But a typesetter's tab, which will change to fit the size of the largest
1755 term, not a pathetic, rigid, unchangeable typewriter
1768 ) from the rest of the paragraph.
1769 If you want to have more than one word in the definition, then separate
1773 \begin_inset space ~
1781 \begin_layout Labeling
1782 \labelwidthstring 00.00.0000
1787 : Typeset the list in
1788 \change_deleted -712698321 1553351539
1792 \change_inserted -712698321 1553351539
1801 \begin_layout Standard
1802 You can nest lists within each other in all sorts of interesting ways.
1803 An obvious example would be writing outlines.
1804 Numbered and bulleted lists will have different numbering and bulleting
1805 schemes for sublists.
1810 for details on the different sorts of lists and for examples of nestings.
1813 \begin_layout Subsection
1814 Other environments: Verses, Quotations, and more
1817 \begin_layout Standard
1818 There are two environments for setting quotations apart from surrounding
1823 for short quotes and
1837 \begin_layout Plain Layout
1838 used in this Tutorial for the long typing examples
1847 font; this environment is the only place in \SpecialChar LyX
1848 where you are allowed to use
1849 multiple spaces to allow code indenting.
1850 You can even write poetry using the
1858 to separate stanzas, and
1862 to separate lines within a stanza.
1867 for more complete descriptions of all of the available \SpecialChar LyX
1871 \begin_layout Labeling
1872 \labelwidthstring 00.00.0000
1877 : Correctly typeset the
1879 Quote, \SpecialChar LyX
1887 \change_inserted -712698321 1553351552
1891 \change_deleted -712698321 1553351554
1895 \begin_inset Newline newline
1905 \begin_layout Chapter
1909 \begin_layout Standard
1910 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1912 It introduced you to the basic editing operations in \SpecialChar LyX
1913 , as well as the powerful
1914 method of writing with environments.
1915 Most people who use \SpecialChar LyX
1916 , though, will want to write documents: papers, articles,
1917 books, manuals, or letters.
1918 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1920 a complete document.
1921 It will introduce you to text classes, which allow you to write different
1923 It will then describe many of the additions that turn text into a document,
1924 such as titles, footnotes, cross references, bibliographies, and tables
1928 \begin_layout Section
1930 \begin_inset CommandInset label
1932 name "sec:Document-Classes"
1939 \begin_layout Standard
1940 Different sorts of documents should be typeset differently.
1941 For example, books are generally printed double-sided, while articles are
1943 In addition, many documents contain special environments: letters contain
1944 some environments — such as the sender's address and the signature — which
1945 do not make sense in a book or article.
1946 The \SpecialChar LyX
1955 \begin_layout Plain Layout
1956 for \SpecialChar LaTeX
1957 users: this is equivalent to the \SpecialChar LaTeX
1963 takes care of these large scale differences between different sorts of
1965 This Tutorial, for example, was written in the
1970 Document classes are another major part of the WYSIWYM philosophy; they
1971 tell \SpecialChar LyX
1972 how to typeset the document, so you do not need to know how.
1975 \begin_layout Standard
1976 Your document is probably being written in the
1984 \begin_layout Plain Layout
1985 That is usually the default document class
1990 Try changing to other document classes (using the
1992 Document\SpecialChar menuseparator
1995 dialog) to see how they are typeset differently.
1996 If you change your document to the
2000 document class and look at the
2004 box, you will see that most of the allowed environments are the same.
2005 However, you can now use the
2010 If you are ever unsure about which environments you can use in a given
2011 document class, just consult the
2018 \begin_layout Standard
2019 Font sizes, one- or two-column printing, and page headings are just some
2020 of the ways journals' typesettings differ from one another.
2021 As the Computer Age continues to mature, journals have begun accepting
2022 electronic submissions, creating \SpecialChar LaTeX
2024 \begin_inset Quotes eld
2028 \begin_inset Quotes erd
2031 so that authors can submit correctly typeset articles.
2033 is set up to support this as well.
2034 For example, \SpecialChar LyX
2035 supports typesetting (and extra environments) for the American
2036 Mathematics Society journals using the
2039 \begin_inset space ~
2047 \begin_layout Standard
2048 Here is a very quick reference to some of the document classes.
2051 Special Document Classes
2057 manual for many more details.
2060 \begin_layout Standard
2062 \begin_inset Tabular
2063 <lyxtabular version="3" rows="7" columns="2">
2064 <features tabularvalignment="middle">
2065 <column alignment="center" valignment="top" width="0pt">
2066 <column alignment="center" valignment="top" width="0pt">
2068 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2071 \begin_layout Plain Layout
2077 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2080 \begin_layout Plain Layout
2088 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2091 \begin_layout Plain Layout
2097 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2100 \begin_layout Plain Layout
2101 one-sided, no chapters
2108 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2111 \begin_layout Plain Layout
2117 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2120 \begin_layout Plain Layout
2121 layout & environments for American Math Society
2128 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2131 \begin_layout Plain Layout
2137 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2140 \begin_layout Plain Layout
2141 longer than article, two-sided
2148 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2151 \begin_layout Plain Layout
2157 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2160 \begin_layout Plain Layout
2161 report + front and back matter
2168 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2171 \begin_layout Plain Layout
2177 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2180 \begin_layout Plain Layout
2188 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2191 \begin_layout Plain Layout
2197 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2200 \begin_layout Plain Layout
2201 lots of extra environments for address, signature\SpecialChar ldots
2215 \begin_layout Section
2216 Templates: Writing a Letter
2219 \begin_layout Standard
2220 One way to write a letter would be to open a new file, and choose a
2226 Document\SpecialChar menuseparator
2230 While this is the most obvious way to write a letter, it seems like extra
2232 Every time you write a business letter, you want to have your address,
2233 the address to which you are sending it, a body, a signature, etc.
2239 for letters, which contains a sample letter; once you have a template,
2240 you can just replace a couple of parts of the letter with your text each
2241 time you write a letter.
2244 \begin_layout Standard
2245 Open a new file with
2247 File\SpecialChar menuseparator
2249 \begin_inset space ~
2253 \begin_inset space ~
2257 \change_inserted -712698321 1553351676
2265 \change_deleted -712698321 1553351662
2269 \change_inserted -712698321 1553351666
2273 Letter (Standard Class)
2278 Save and print the file to see how the various environments are typeset.
2281 \begin_layout Standard
2282 When you look at the
2286 box, you will see several environments, like the
2289 \begin_inset space ~
2294 environment, that do not exist in most other document classes.
2300 You can play around for a while to figure out how the various environments
2302 You will notice for example that the
2306 environment has the word
2307 \begin_inset Quotes eld
2311 \begin_inset Quotes erd
2314 in red before the actual text of the signature.
2315 This word does not show up in the actual letter, as you will see if you
2316 view/export the file.
2317 It is just there to let you know where the signature goes.
2318 Also, note that it does not matter where in the file the
2323 Remember, \SpecialChar LyX
2324 is WYSIWYM; you can put the
2328 environment anywhere you want, but \SpecialChar LyX
2329 knows that in the printout, the signature
2330 should be at the end.
2333 \begin_layout Standard
2334 A template is just a regular \SpecialChar LyX
2336 This means you can fill in your address and signature and save the file
2338 From now on, any time you want to write a letter, you can use the new template
2340 We do not have to suggest an actual
2341 \begin_inset Quotes eld
2345 \begin_inset Quotes erd
2348 here; just write a letter to someone!
2352 \begin_layout Plain Layout
2353 One warning, if you are writing from a template.
2354 If you erase all of the text in an environment — for example, if you erase
2358 \begin_inset space ~
2363 field so that you can replace it with your own — and then you move the
2364 cursor without writing any text, the environment may disappear.
2365 This is because most environments cannot exist without any text in them.
2366 Just reselect the environment from the
2378 \begin_layout Standard
2379 Templates can be a huge time-saver, and we urge you to use them whenever
2381 In addition, they can help a person learn how to use some of the fancier
2383 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2385 of less computer-aware users.
2386 When they are first learning \SpecialChar LyX
2387 , it will be less intimidating if they have
2388 a letter template customized for their company, for example.
2391 \begin_layout Standard
2392 \begin_inset Newpage newpage
2398 \begin_layout Section
2402 \begin_layout Standard
2404 (like \SpecialChar LaTeX
2405 ) considers the title — which may contain the actual title, the author,
2406 the date, and even an abstract of a paper — to be a separate part of the
2410 \begin_layout Standard
2411 Go back to your first \SpecialChar LyX
2412 document and make sure it is using the
2420 \begin_layout Plain Layout
2421 You should not be using the letter any more, since the
2425 document class does not allow titles.
2430 Type a title on the first line, and change the line to the
2435 On the next line, type your name and change it to the
2440 On the next line, write the date in the
2445 Type a paragraph or two summarizing your document using the
2450 Notice how the title is presented when it is printed out.
2451 If you change the document format to Book, you will get a separate title
2452 page, like the first page of this tutorial.
2455 \begin_layout Labeling
2456 \labelwidthstring 00.00.0000
2461 : Fix the title, date, and author in
2462 \change_deleted -712698321 1553351568
2466 \change_inserted -712698321 1553351568
2475 \begin_layout Section
2476 Labels and Cross-References
2479 \begin_layout Standard
2480 You can label section headings, list items, formulas, footnotes, and floats
2484 \begin_layout Plain Layout
2485 Floats are explained in the
2499 Once you do so, you can refer to the element in other parts of the document,
2500 using cross-references.
2501 You can refer to a section's number, to the page on which the section begins
2503 As with section numbering, \SpecialChar LyX
2504 also takes care of cross-reference numbering
2506 Automatic management of labels and cross-references is among the most significa
2507 nt advantages of \SpecialChar LyX
2508 (and \SpecialChar LaTeX
2509 ) over conventional word processors.
2512 \begin_layout Subsection
2516 \begin_layout Standard
2517 Go to our second section, whose title is
2518 \begin_inset Quotes eld
2522 \begin_inset Quotes erd
2526 Click at the end of the section title line, and select
2528 Insert\SpecialChar menuseparator
2531 or the toolbar button
2538 A dialog asks you for a label name, and gives you a suggestion.
2543 , the label name will be placed in a box next to the section title.
2546 \begin_layout Standard
2547 So far you have not done anything — the output will look exactly the same,
2548 since labels do not show up in the printed document.
2549 However, now that you have added a label, you can refer to that label with
2551 We will do that next.
2554 \begin_layout Subsection
2555 Your first cross-reference
2558 \begin_layout Standard
2559 Place the cursor somewhere in Section
2560 \begin_inset space ~
2567 \begin_layout LyX-Code
2568 If you want to know more about this document,
2569 \begin_inset Newline newline
2575 \begin_layout Standard
2576 Now, with the cursor before the final period, select
2578 Insert\SpecialChar menuseparator
2580 \begin_inset space ~
2585 or the toolbar button
2588 arg "dialog-show-new-inset ref"
2592 The Cross-reference dialog pops up.
2593 It shows a list of the possible labels you can reference.
2594 At the moment, there should be only one,
2595 \begin_inset Quotes eld
2598 sec:About-This-Document
2599 \begin_inset Quotes erd
2603 First, select the drop-down menu labeled
2604 \begin_inset Quotes eld
2608 \begin_inset Quotes erd
2612 \begin_inset Quotes eld
2616 \begin_inset Quotes erd
2621 \begin_inset Quotes eld
2624 sec:About-This-Document
2625 \begin_inset Quotes erd
2628 (it may be selected by default), and a reference marker will appear containing
2630 \begin_inset Quotes eld
2633 Ref: sec:About-This-Document
2634 \begin_inset Quotes erd
2637 (To be really correct, you should put a
2640 \begin_inset space ~
2648 arg "command-alternatives math-space ; space-insert protected"
2651 ) in between the word
2652 \begin_inset Quotes eld
2656 \begin_inset Quotes erd
2659 and the reference.) An alternative way to reference a label is to right-click
2660 the label and select
2664 in the pop-up context menu.
2665 The cross-reference to this label is now in the clipboard and can be copied
2666 to the actual cursor position via the menu
2668 Edit\SpecialChar menuseparator
2678 In the printed document, this reference marker will be replaced with the
2680 Preview your document and you will see that \SpecialChar LaTeX
2681 has been even cleverer than
2684 \begin_inset Quotes eld
2688 \begin_inset Quotes erd
2694 \begin_layout Standard
2695 Conveniently, a cross-reference acts as a hyperlink when you are editing
2696 a document in \SpecialChar LyX
2697 ; clicking on it will pop up the
2704 \begin_inset space ~
2708 \begin_inset space ~
2713 will move the cursor to the referenced label.
2716 \begin_layout Subsection
2717 More fun with labels
2720 \begin_layout Standard
2721 We told you that \SpecialChar LyX
2722 takes care of numbering cross-references; now you can
2724 Add a new section before Section
2725 \begin_inset space ~
2729 Update the preview, and — voilà! — the section cross-reference changed
2731 \begin_inset Quotes eld
2735 \begin_inset Quotes erd
2738 ! Change the section
2739 \begin_inset Quotes eld
2743 \begin_inset Quotes erd
2746 to a subsection, and the cross-reference will reference Subsection
2747 \begin_inset space ~
2750 2.1 instead of Section
2751 \begin_inset space ~
2755 The page reference will not change unless you add a whole page of text
2756 before the label, of course.
2760 \begin_layout Standard
2761 If you want some more practice with labels, then try putting a new label
2762 where your first cross-reference was, and refer to that label from elsewhere
2764 If you will be inserting cross-references often, it may be convenient to
2772 \begin_layout Standard
2773 If you want to confirm that the cross-referencing gets the pages right even
2774 for larger documents,
2778 a couple pages of text from the
2782 to the clipboard, and
2786 them into your document.
2790 \begin_layout Plain Layout
2791 By the way, copying a chapter title may cause an error, because chapters
2792 are not allowed in the article class, see Section
2793 \begin_inset space ~
2797 \begin_inset CommandInset ref
2799 reference "sec:Document-Classes"
2804 If this happens, just delete the chapter title.
2812 \begin_layout Labeling
2813 \labelwidthstring 00.00.0000
2818 : Fix the references in
2819 \change_deleted -712698321 1553351573
2823 \change_inserted -712698321 1553351573
2832 \begin_layout Section
2833 Footnotes and Margin Notes
2836 \begin_layout Standard
2837 Footnotes can be added using the toolbar button
2840 arg "footnote-insert"
2845 Insert\SpecialChar menuseparator
2849 Click at the end of the word
2850 \begin_inset Quotes eld
2855 \begin_inset Quotes erd
2858 somewhere in your document and insert a footnote.
2859 A footnote box appears where you can enter the text of the footnote.
2861 should place the cursor at the beginning of the footnote box.
2865 \begin_layout LyX-Code
2867 is a typesetting word processor.
2870 \begin_layout Standard
2871 Now click on the button labeled
2872 \begin_inset Quotes eld
2876 \begin_inset Quotes erd
2880 The footnote box is closed, leaving the button showing where the footnote
2881 marker will be in the printed text; this is called
2882 \begin_inset Quotes eld
2886 \begin_inset Quotes erd
2890 You can unfold the footnote at any time and re-edit its text by clicking
2892 \begin_inset Quotes eld
2896 \begin_inset Quotes erd
2902 \begin_layout Standard
2903 A footnote can be cut and pasted like normal text.
2904 Go ahead; try it! All you need to do is select the footnote button
2908 \begin_layout Plain Layout
2909 It may be easier to select it using the keyboard.
2910 You might accidentally open the footnote if you are trying to select the
2911 marker itself with the mouse.
2925 In addition, you can change regular text to a footnote, by selecting it
2929 arg "footnote-insert"
2932 button; change a footnote to regular text by hitting the
2936 key when the cursor is in the first position of a footnote, or by hitting
2941 key when the cursor is in the very last position of the footnote.
2944 \begin_layout Standard
2945 Margin notes can be added using the menu
2947 Insert\SpecialChar menuseparator
2949 \begin_inset space ~
2954 or the toolbar button
2957 arg "marginalnote-insert"
2960 \SpecialChar endofsentence
2961 Margin notes are like footnotes, except that:
2964 \begin_layout Itemize
2965 the on-screen boxes say
2966 \begin_inset Quotes eld
2970 \begin_inset Quotes erd
2974 \begin_inset Quotes eld
2978 \begin_inset Quotes erd
2984 \begin_layout Itemize
2985 the notes will be placed in the margin, instead of below the text
2988 \begin_layout Itemize
2989 margin notes are not numbered
2992 \begin_layout Standard
2993 Change your \SpecialChar LyX
2994 footnote back to text, then select and change it to a margin
2996 Run \SpecialChar LaTeX
2997 again to see what the margin note looks like.
3000 \begin_layout Labeling
3001 \labelwidthstring 00.00.0000
3006 : Fix the footnote in
3007 \change_deleted -712698321 1553351579
3011 \change_inserted -712698321 1553351579
3020 \begin_layout Section
3022 \begin_inset CommandInset label
3024 name "sec:bibliographies"
3031 \begin_layout Standard
3032 Bibliographies are similar to cross-references.
3033 The bibliography contains a list of references at the end of the document,
3034 and they can be referenced from within the document.
3035 Like section titles, \SpecialChar LyX
3036 and \SpecialChar LaTeX
3037 make your job easier by automatically numbering
3038 the bibliography items and changing citations when the item numbers change.
3041 \begin_layout Standard
3042 Go to the end of the document and switch to the
3047 Now, each paragraph you type will be a reference.
3049 \begin_inset Quotes eld
3054 The Lyx Tutorial, by the \SpecialChar LyX
3058 \begin_inset Quotes erd
3061 as your first reference.
3062 Note that \SpecialChar LyX
3063 automatically puts a number in a box before each reference.
3064 Click on the boxed reference number, and the
3067 \begin_inset space ~
3077 is to refer to this reference within the \SpecialChar LyX
3087 is set (default), you will see the number of the bibliography in the output.
3093 \begin_inset Quotes eld
3097 \begin_inset Quotes erd
3100 to make it easy to remember.
3103 \begin_layout Standard
3104 Now pick somewhere in your document that you would like to insert a reference.
3107 Insert\SpecialChar menuseparator
3110 or the toolbar button
3113 arg "dialog-show-new-inset citation"
3122 The left panel in this dialog lists all the bibliography entries, and this
3123 field allows you to choose which bibliography item you want to cite.
3125 \begin_inset Quotes eld
3129 \begin_inset Quotes erd
3132 (right now, that is the only item in the bibliography), then use the
3136 button in the center to insert it.
3137 (You can have multiple citations in the same place by transferring a number
3142 \begin_layout Plain Layout
3143 If one uses label names for references that are easy to remember it is easier
3144 to find the entry in the list of references.
3154 Now preview your file and you will see that the citation appears in brackets
3155 in the text, referring to the bibliography at the end of the document.
3158 \begin_layout Standard
3162 \begin_inset space ~
3171 dialog will put a remark (such as a reference to a page or chapter within
3172 the referenced book or article) in the brackets after the reference.
3173 If you want the references to have labels instead of numbers in the printed
3174 output (for example, some journals would use
3175 \begin_inset Quotes eld
3179 \begin_inset Quotes erd
3182 to refer to a paper written by Smith in 1995), use the
3189 \begin_inset space ~
3202 \begin_layout Labeling
3203 \labelwidthstring 00.00.0000
3208 Fix the bibliography and citation in
3209 \change_deleted -712698321 1553351585
3213 \change_inserted -712698321 1553351585
3222 \begin_layout Section
3226 \begin_layout Standard
3227 You may want to put a table of contents at the beginning of your document.
3229 makes this easy to do.
3234 after your document title and before your first section title and select
3237 Insert\SpecialChar menuseparator
3239 \begin_inset space ~
3243 \begin_inset space ~
3246 TOC\SpecialChar menuseparator
3248 \begin_inset space ~
3252 \begin_inset space ~
3259 \begin_inset Quotes eld
3263 \begin_inset Quotes erd
3266 will appear in a button on the first line of the document.
3270 \begin_layout Standard
3271 This may not appear to be very useful.
3272 However, if you look at your preview, you will see that a table of contents
3273 has been generated, listing the various sections and subsections in your
3275 As usual, if you reorder sections or create new ones, you will see those
3276 changes in the preview when you update it.
3280 \begin_layout Standard
3281 The table of contents is not printed in the on-screen version of the document.
3282 But you can display the table of contents in a separate window by clicking
3283 on the table of contents button, or by using
3285 View\SpecialChar menuseparator
3287 \begin_inset space ~
3292 or the toolbar button
3295 arg "dialog-toggle toc"
3299 This menu will work even if you do not have a table of contents inset in
3301 This is a very useful tool for rearranging your document parts.
3302 Clicking on a (sub)section title in the
3306 window will highlight that line and move the display (in the \SpecialChar LyX
3308 to that place in the document.
3309 You can also use the arrow keys to move up and down in the table of contents.
3310 You may therefore find it convenient to leave this window open throughout
3312 You can get similar functionality from the
3316 menu, though, where the table of contents appears automatically.
3319 \begin_layout Standard
3320 To get rid of the Table of Contents, you can delete the table of contents
3321 button just like any other text.
3324 \begin_layout Labeling
3325 \labelwidthstring 00.00.0000
3330 : Fix the table of contents in
3331 \change_deleted -712698321 1553351589
3335 \change_inserted -712698321 1553351589
3344 \begin_layout Chapter
3348 \begin_layout Standard
3350 is used by many scientists because it outputs great looking equations,
3351 avoiding the control characters used by word processors and their equation
3353 Many of these scientists are frustrated, however, because writing equations
3354 in \SpecialChar LaTeX
3355 is more like programming than writing.
3356 Happily, \SpecialChar LyX
3357 has WYSIWYM support for equations.
3358 If you are used to \SpecialChar LaTeX
3359 , you will find that all of the usual \SpecialChar LaTeX
3361 can be typed in normally, but they will show up in a WYSIWYM fashion.
3362 If, on the other hand, you have never written in \SpecialChar LaTeX
3366 \begin_inset space ~
3371 will allow you to write professional-looking math quickly and easily.
3374 \begin_layout Section
3378 \begin_layout Standard
3379 Somewhere in your \SpecialChar LyX
3383 \begin_layout LyX-Code
3384 I like what Einstein said, E=mc^2, because it is
3385 \begin_inset Newline linebreak
3391 \begin_layout Standard
3392 Now, that equation does not look very good in \SpecialChar LyX
3393 and in the output; there
3394 is no space between the letters and the equals sign, and you would like
3395 to write an actual superscript for the
3396 \begin_inset Quotes eld
3400 \begin_inset Quotes erd
3404 That bad typesetting happened because we did not tell \SpecialChar LyX
3405 that we were writing
3406 a mathematical expression, so it typeset the equation like regular old
3410 \begin_layout Standard
3411 But we can create a formula that will be typeset properly.
3412 Highlight the equation and click the toolbar button
3420 Insert\SpecialChar menuseparator
3421 Math\SpecialChar menuseparator
3423 \begin_inset space ~
3429 If nothing is highlighted \SpecialChar LyX
3430 inserts a little blue square, which is an empty
3432 The expression appears in blue and the blue square disappears as soon as
3433 the formula is not empty.
3438 to leave the equation.
3439 The purple markers disappear, leaving the cursor to the right of the expression.
3440 Now, if you type something, it will be regular text.
3443 \begin_layout Standard
3444 Looking at the output you will notice that the expression was typeset nicely,
3445 with spaces between the letters and the equals sign, and a superscript
3447 \begin_inset Quotes eld
3451 \begin_inset Quotes erd
3455 Letters in math mode are assumed to be variables, and come out in italics.
3456 Numbers are just numbers.
3459 \begin_layout Standard
3460 This math editor is another example of the WYSIWYM philosophy.
3461 In \SpecialChar LaTeX
3462 , you write a mathematical expression using text and commands like
3468 ; this can be frustrating, because you cannot see what an expression looks
3469 like until you run the file under \SpecialChar LaTeX
3470 and you may have to spend time, for
3471 example, finding missing brackets.
3473 does not attempt to get the expression to look perfect (WYSIWYG), but
3474 it gives you an extremely good idea of what the expression will look like.
3476 then takes care of the professional typesetting.
3479 \begin_layout Section
3480 Navigating an Equation
3483 \begin_layout Standard
3485 \begin_inset Formula $E=mc^{2}$
3489 \begin_inset Formula $E=1+mc^{2}$
3493 Use the arrow keys to move the cursor into the expression.
3494 Note that when you enter the expression, the purple markers appear to let
3495 you know you are editing math.
3504 to move the cursor past the equals sign, and just type
3505 \begin_inset Quotes eld
3509 \begin_inset Quotes erd
3513 Again, you can use the arrow keys or
3517 to leave the formula\SpecialChar endofsentence
3521 \begin_layout Standard
3522 Other than the special keys described below, typing in math mode is like
3523 editing regular text.
3533 Select text either with the arrow keys or with the mouse.
3536 Edit\SpecialChar menuseparator
3539 works in math mode as well as cut and paste.
3540 One thing to be careful of: if you are left or right outside a formula
3549 respectively, you delete the whole formula.
3550 Luckily, you can just use
3557 \begin_layout Standard
3558 What if you want to change
3559 \begin_inset Formula $E=mc^{2}$
3563 \begin_inset Formula $E=mc^{2.5}+1$
3566 ? Again, you can use the mouse to click in the right place.
3567 However, you can also use the arrow keys.
3568 If the cursor is just after the
3569 \begin_inset Quotes eld
3573 \begin_inset Quotes erd
3577 \begin_inset Quotes eld
3581 \begin_inset Quotes erd
3588 and the cursor is moved to the level of the superscript, just before the
3590 \begin_inset Quotes eld
3594 \begin_inset Quotes erd
3599 \begin_inset Quotes eld
3603 \begin_inset Quotes erd
3611 will move the cursor back to the regular level.
3620 , the cursor will be placed
3624 the superscript (so that you can then type the
3625 \begin_inset Quotes eld
3629 \begin_inset Quotes erd
3635 \begin_layout Section
3636 Exponents and Indices
3639 \begin_layout Standard
3640 An exponent can be entered from the
3643 \begin_inset space ~
3648 (see below), but it is actually simpler just to type the caret key,
3649 \begin_inset Quotes eld
3653 \begin_inset Quotes erd
3658 will place another blue rectangle in the superscript, so that whatever
3659 you write next will be superscripted, and in a smaller font size.
3660 Everything you type until you hit a
3668 to exit the formula entirely) will be in the superscript.
3671 \begin_layout Standard
3672 Writing a subscript (index) is just as easy; start one by typing the underscore
3674 \begin_inset Quotes eld
3678 \begin_inset Quotes erd
3682 You can subscript and superscript both subscripts and superscripts like
3684 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3691 \begin_layout Labeling
3692 \labelwidthstring 00.00.0000
3698 \begin_inset space ~
3702 \change_deleted -712698321 1553351597
3706 \change_inserted -712698321 1553351597
3717 \begin_layout Section
3721 \begin_layout Standard
3725 \begin_inset space ~
3730 is a convenient way to enter symbols and/or to perform complicated formula
3732 Many of these operations can be accomplished from the keyboard or the
3734 Insert\SpecialChar menuseparator
3739 Edit\SpecialChar menuseparator
3742 menus (the latter only appears when you are in Math mode).
3743 However, we are going to concentrate on using the
3746 \begin_inset space ~
3751 , just to let you know what is out there; you can learn keyboard shortcuts
3752 and commands later from the
3759 \begin_layout Standard
3763 \begin_inset space ~
3768 is shown when the cursor is in a formula and can also be turned on manually
3771 View\SpecialChar menuseparator
3775 When you click there on
3776 \begin_inset Quotes eld
3780 \begin_inset Quotes erd
3786 arg "toolbar-toggle math"
3789 ) the toolbar will be shown permanently at the bottom; this state is visualized
3794 menu with a checkmark.
3795 When you click in this state again on
3796 \begin_inset Quotes eld
3800 \begin_inset Quotes erd
3810 \begin_inset space ~
3815 is only shown when the cursor is within a formula; this state is visualized
3816 by the renaming of the menu entry from
3817 \begin_inset Quotes eld
3821 \begin_inset Quotes erd
3825 \begin_inset Quotes eld
3829 \begin_inset space ~
3833 \begin_inset Quotes erd
3839 \begin_layout Subsection
3843 \begin_layout Standard
3847 \begin_inset space ~
3852 allows you to choose from a large array of symbols used in math: operators,
3853 arrows, relationships, delimiters, special characters, sums and integrals.
3854 Note that subscripting and superscripting allow you to put lower and upper
3855 limits on sums and integrals.
3858 \begin_layout Subsection
3859 Roots, decorations, and delimiters
3862 \begin_layout Standard
3863 To type a square root, just click on the button
3866 arg "math-insert \\sqrt"
3870 The square root appears, and the cursor is in a new insertion point inside
3872 You can type variables, numbers, other square roots, fractions, whatever
3875 will automatically resize the square root to fit what is inside.
3878 \begin_layout Standard
3880 \begin_inset Quotes eld
3884 \begin_inset Quotes erd
3888 \begin_inset Formula $\overrightarrow{a}$
3891 ) or group of characters (
3892 \begin_inset Formula $\overrightarrow{a+b}$
3895 ) is done similarly.
3896 Decorations are available from the toolbar via the button
3899 arg "math-insert \\hat"
3903 Click on a decoration, and \SpecialChar LyX
3904 will insert that decoration with an insertion
3905 point under (or over) it.
3906 Just type what you want in the insertion point.
3907 There are two sets of decorations: those that resize with the text you
3908 type, and those that have a fixed size, and are most appropriate for a
3913 \begin_layout Standard
3914 Delimiters such as parentheses, brackets, and braces work similarly, but
3915 are a bit more complicated.
3916 Hit the delimiter button
3919 arg "dialog-show mathdelimiter"
3927 Your current selection of delimiters is displayed in a box.
3928 It is a pair of parentheses by default, but you can choose a pair of braces,
3929 a brace and a parenthesis, or choose the empty square to have something
3931 \begin_inset Quotes eld
3935 \begin_inset Formula $a=\left\langle 7\right.$
3939 \begin_inset Quotes erd
3942 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3947 \begin_layout Standard
3948 If you are lazy, you can type actual parentheses in math mode, rather than
3954 However, those parentheses will be the same size as regular text, which
3955 will look bad if you have a big fraction or matrix inside the parentheses.
3956 So it is better to use one of the three delimiter buttons that insert them
3957 directly, for example
3960 arg "math-delim ( )"
3966 \begin_layout Standard
3967 You can also put delimiters or a square root sign or a decoration on already
3968 existing formula parts.
3969 Select the portion of the formula that you want to adjust, and then click
3970 on the button you want from the
3973 \begin_inset space ~
3979 Try using this to change Newton's second law from scalar to vector form
3981 \begin_inset Formula $f=ma$
3985 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3989 Once you have learned about matrices, this is how you will put parentheses
3990 or brackets around them.
3993 \begin_layout Subsection
3997 \begin_layout Standard
3998 To create a fraction, click on the fraction button
4001 arg "math-insert \\frac-square"
4007 \begin_inset space ~
4014 writes two insertion points in a fraction.
4015 As you would expect, you can use arrow keys or the mouse to move around
4017 Click on the top square and type
4018 \begin_inset Quotes eld
4022 \begin_inset Quotes erd
4031 \begin_inset Quotes eld
4035 \begin_inset Quotes erd
4039 You have made a fraction! Of course you can type anything within each of
4040 the two boxes: variables with exponents, square roots, other fractions,
4045 \begin_layout Labeling
4046 \labelwidthstring 00.00.0000
4052 \begin_inset space ~
4056 \change_deleted -712698321 1553351607
4060 \change_inserted -712698321 1553351607
4071 \begin_layout Subsection
4072 Functions: lim, log, sin and others
4075 \begin_layout Standard
4076 Because letters in math mode are considered to be variables, if you type
4078 \begin_inset Quotes eld
4082 \begin_inset Quotes erd
4085 in math mode, \SpecialChar LyX
4086 thinks you are typing the product of the three variables
4088 \begin_inset Formula $s$
4092 \begin_inset Formula $i$
4096 \begin_inset Formula $n$
4100 The three letters will be typeset in italics, when what you really wanted
4102 \begin_inset Quotes eld
4106 \begin_inset Quotes erd
4110 In addition, \SpecialChar LyX
4111 will not put a space between the word
4112 \begin_inset Quotes eld
4116 \begin_inset Quotes erd
4120 \begin_inset Quotes eld
4124 \begin_inset Quotes erd
4131 will exit the formula).
4133 \begin_inset Quotes eld
4137 \begin_inset Formula $\sin(x)$
4141 \begin_inset Quotes erd
4145 \begin_inset Quotes eld
4149 \begin_inset Formula $sin(x)$
4153 \begin_inset Quotes erd
4159 \begin_layout Standard
4163 \begin_inset space ~
4171 arg "math-insert \\functions"
4175 \begin_inset Quotes eld
4179 \begin_inset Quotes erd
4182 in the pop-up function list.
4184 \begin_inset Quotes eld
4188 \begin_inset Quotes erd
4191 is displayed in \SpecialChar LyX
4192 in black, and set in upright roman type.
4193 The whole word is treated as one symbol, so if you type
4197 , it will delete the whole word.
4199 \begin_inset Quotes eld
4203 \begin_inset Quotes erd
4206 , which will be written in blue italics, like you expect in a formula.
4207 In the output, the expression will be correctly typeset.
4211 \begin_layout Standard
4212 The function list includes other trigonometric functions and their inverses,
4213 hyperbolic functions, logarithms, limits, and quite a few others.
4214 These functions can take subscripts and superscripts, important for typing
4216 \begin_inset Quotes eld
4220 \begin_inset Formula $\cos^{2}\theta$
4224 \begin_inset Quotes erd
4228 \begin_inset Quotes eld
4232 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4236 \begin_inset Quotes erd
4242 \begin_layout Labeling
4243 \labelwidthstring 00.00.0000
4249 \begin_inset space ~
4253 \change_deleted -712698321 1553351612
4257 \change_inserted -712698321 1553351612
4268 \begin_layout Subsection
4272 \begin_layout Standard
4273 Click on the matrix button
4276 arg "dialog-show mathmatrix"
4282 \begin_inset space ~
4288 A pop-up dialog allows you to choose how many rows and columns you want
4290 Choose 2 rows and 3 columns and hit
4296 prints 6 insertion points in a
4297 \begin_inset Formula $2\times3$
4301 As usual, you can put any sort of formula expression (a square root, another
4302 matrix, etc.) in each insertion point.
4303 You can also leave some of the insertion points empty if you want.
4306 \begin_layout Standard
4311 can be used to move horizontally between the columns of a matrix.
4312 Alternatively, you can use the arrow keys to move around - hitting
4316 at the end of one box will move to the next box,
4320 will move to the next row, etc.
4323 \begin_layout Standard
4324 If you need to change the number of rows and columns, use the menu
4326 Edit\SpecialChar menuseparator
4328 \begin_inset space \thinspace{}
4332 \begin_inset space \thinspace{}
4337 or the math toolbar buttons
4340 arg "tabular-feature append-row"
4346 arg "tabular-feature delete-row"
4352 arg "tabular-feature append-column"
4358 arg "tabular-feature delete-column"
4364 \begin_layout Standard
4369 for information on how to change the horizontal alignment of each column,
4370 and how to change the vertical position of the whole matrix.
4371 Note that if you want to write a table containing text, you should use
4373 's wonderful table support, rather than trying to write text in a matrix.
4376 \begin_layout Subsection
4380 \begin_layout Standard
4381 All of the expressions we have written so far have been on the same line
4382 as the text that came before and after them, otherwise known as inline
4384 This is fine for short, simple expressions, but if you want to write larger
4385 ones, or if you want your expressions to stand out from the text, you need
4386 to write them in display mode.
4387 In addition, only displayed expressions can be labeled and numbered (see
4392 ), and multi-line equations must be in display mode.
4395 \begin_layout Standard
4396 While being in a formula, click on the display button
4407 This centers the formula and adds a blank line before and after it.
4408 Now type in an expression and compile your file to see how it looks.
4409 The display button is actually a toggle; use it now to change a couple
4410 of your expressions to display mode and back.
4414 \begin_layout Standard
4415 Display mode has a couple differences from inline mode:
4418 \begin_layout Itemize
4419 The default font is larger for a few symbols, like
4420 \begin_inset Formula $\sum$
4424 \begin_inset Formula $\int$
4430 \begin_layout Itemize
4431 Subscripts and superscripts for limits and sums (but not integrals) are
4432 written under and over rather than next to the symbols
4435 \begin_layout Itemize
4439 \begin_layout Standard
4440 Other than these differences, though, displayed expressions and inline expressio
4441 ns are very similar.
4444 \begin_layout Standard
4445 One final note about the way displayed formulas are typeset: be careful
4446 about whether you are putting your equation into a new paragraph or not.
4447 If your formula is in the middle of a sentence or paragraph, then do not
4453 Doing so will cause the text
4457 the formula to start a new paragraph.
4458 That text will be indented or follow a blank line, depending on your document
4459 paragraph settings, which is probably not what you want.
4462 \begin_layout Labeling
4463 \labelwidthstring 00.00.0000
4468 : Put the various equations in
4469 \change_deleted -712698321 1553351617
4473 \change_inserted -712698321 1553351617
4481 into display mode, and see how they are typeset differently.
4484 \begin_layout Labeling
4485 \labelwidthstring 00.00.0000
4490 : Using various tools you have learned in this section, you should be able
4491 to write an equation like:
4495 \begin_layout Plain Layout
4496 After you have done it the hard way, give
4498 Insert\SpecialChar menuseparator
4499 Math\SpecialChar menuseparator
4501 \begin_inset space ~
4512 \begin_inset Formula
4514 f(x)=\left\{ \begin{array}{cc}
4517 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4526 \begin_layout Section
4530 \begin_layout Standard
4531 Now you are familiar with the basics.
4533 's math editor can do a lot more.
4534 You can refer to the
4538 manual for tips on how to:
4541 \begin_layout Itemize
4542 Label and number expressions.
4545 \begin_layout Itemize
4546 Create multi-line equations.
4549 \begin_layout Itemize
4550 Change typefaces, e.
4551 \begin_inset space \thinspace{}
4555 \begin_inset space \space{}
4558 to write bold-face text in an expression.
4561 \begin_layout Itemize
4562 Fine-tune font sizes and spacing within an expression.
4563 (Do not worry about this until your final draft!)
4566 \begin_layout Itemize
4568 These are very powerful, because you just define them once at the top of
4569 the document, and then you can use them throughout the document.
4572 \begin_layout Itemize
4573 Do almost all you can do with math.
4576 \begin_layout Chapter
4580 \begin_layout Section
4581 Other major \SpecialChar LyX
4585 \begin_layout Standard
4586 We have not gone through all the possible commands in \SpecialChar LyX
4587 , and we are not planning
4596 \begin_inset space ~
4601 manual for more information.
4602 We will just mention a couple more major things \SpecialChar LyX
4606 \begin_layout Itemize
4608 has WYSIWYM support for tables.
4611 Insert\SpecialChar menuseparator
4617 arg "tabular-insert"
4621 Click on the table with the
4628 \begin_inset space ~
4633 dialog box which allows extensive table editing.
4637 arg "toolbar-toggle table"
4640 the table toolbar will appear permanently.
4643 \begin_layout Itemize
4645 also supports including pictures in any format within documents.
4648 Insert\SpecialChar menuseparator
4654 arg "dialog-show-new-inset graphics"
4658 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4659 can have captions, and \SpecialChar LyX
4660 will automatically generate lists of figures and/or
4664 \begin_layout Itemize
4666 is heavily configurable.
4667 Everything from how the \SpecialChar LyX
4668 window looks to how the output comes out can be
4669 configured in a number of ways.
4670 Much configuration is done through
4672 Tools\SpecialChar menuseparator
4676 For more information on this, check out
4678 Help\SpecialChar menuseparator
4679 Customization\SpecialChar endofsentence
4683 \begin_layout Itemize
4685 is being developed by a team of programmers on five continents.
4686 Therefore, \SpecialChar LyX
4687 has better support for non-English languages (such as Dutch,
4688 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4689 ) than many word processors.
4690 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4691 languages Chinese Japanese, and Korean are supported.
4692 You can write documents in other languages and you can also configure \SpecialChar LyX
4694 to show its menus and error messages in other languages.
4698 \begin_layout Itemize
4699 The \SpecialChar LyX
4700 menus feature keybindings.
4701 This means that you can do
4703 File\SpecialChar menuseparator
4714 or by using the binding which is shown next to it in the menu (
4721 Keybindings are also configurable.
4722 For information on this, check out
4724 Help\SpecialChar menuseparator
4725 Customization\SpecialChar endofsentence
4729 \begin_layout Itemize
4731 can read \SpecialChar LaTeX
4734 \begin_inset space ~
4738 \begin_inset CommandInset ref
4740 reference "sec:tex2lyx"
4747 \begin_layout Itemize
4748 Spell-checking, thesaurus, and word count facilities are available.
4751 \begin_layout Itemize
4752 Generation of indexes and nomenclatures/glossaries is supported.
4755 \begin_layout Section
4757 for \SpecialChar LaTeX
4759 \begin_inset CommandInset label
4761 name "sec:latexusers"
4768 \begin_layout Standard
4769 If you do not know anything about \SpecialChar LaTeX
4770 , you do not have to read this section.
4771 Actually, you might want to
4775 about \SpecialChar LaTeX
4776 , and then read this chapter.
4777 However, some of those who begin to use \SpecialChar LyX
4778 will be familiar with \SpecialChar LaTeX
4780 If you are such a person, you may be wondering if \SpecialChar LyX
4781 can really do everything
4784 The short answer is that \SpecialChar LyX
4785 can do pretty much everything \SpecialChar LaTeX
4787 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4792 \begin_layout Standard
4793 Because this is just a tutorial, we are only going to mention things that
4794 new \SpecialChar LyX
4795 users will most likely be interested in.
4796 In the interests of keeping the Tutorial short, we will give only minimal
4801 \begin_inset space ~
4809 \begin_inset space ~
4814 manuals have a great deal of information on differences between \SpecialChar LyX
4815 and \SpecialChar LaTeX
4817 and how to do various \SpecialChar LaTeX
4818 tricks in \SpecialChar LyX
4822 \begin_layout Subsection
4827 \begin_layout Standard
4828 Anything that you enter in \SpecialChar TeX
4829 mode will be passed straight to \SpecialChar LaTeX
4831 displayed in red on the screen.
4832 You can use \SpecialChar TeX
4833 commands in \SpecialChar LyX
4836 Insert\SpecialChar menuseparator
4838 \begin_inset space ~
4850 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4854 \begin_layout Standard
4855 In a math formula, \SpecialChar TeX
4856 mode is handled a bit differently.
4858 mode is entered there by typing a backslash.
4859 The backslash is not written out, but anything you type afterwards will
4861 You exit \SpecialChar TeX
4866 or some other non-alphabetic character, like a number, underscore, caret
4868 Once you exit \SpecialChar TeX
4869 mode, if \SpecialChar LyX
4870 knows the \SpecialChar TeX
4871 command you have typed in, it will
4872 convert it to WYSIWYM\SpecialChar endofsentence
4874 \begin_inset Quotes eld
4884 \begin_inset Quotes erd
4887 in a formula and then press
4893 \begin_inset Quotes eld
4897 \begin_inset Quotes erd
4901 \begin_inset Quotes eld
4905 \begin_inset Formula $\gamma$
4909 \begin_inset Quotes erd
4913 This will work for almost all, non-complicated math macros.
4914 This may be faster than using the
4917 \begin_inset space ~
4922 , and will be especially convenient for experienced \SpecialChar LaTeX
4926 \begin_layout Standard
4927 As a special case, if you type
4928 \begin_inset Quotes eld
4938 \begin_inset Quotes erd
4941 in a formula, the beginning
4945 ending braces will be inserted in red while the cursor is placed between
4947 This makes it more convenient to type those commands that take an argument.
4950 \begin_layout Standard
4952 cannot do absolutely everything that \SpecialChar LaTeX
4954 Some fancy functions are not supported at all, while some work but are
4957 mode allows users to get the full flexibility of \SpecialChar LaTeX
4958 , while having all the
4959 convenient features of \SpecialChar LyX
4960 , like WYSIWYM math, tables, and editing.
4962 could never support every \SpecialChar LaTeX
4970 in the preamble (see Section
4971 \begin_inset space ~
4975 \begin_inset CommandInset ref
4977 reference "sec:preamble"
4981 ), you can use any package you want — although you will not have WYSIWYM
4982 support for that package's features.
4985 \begin_layout Subsection
4986 Importing \SpecialChar LaTeX
4992 \begin_inset CommandInset label
5001 \begin_layout Standard
5002 You can import a \SpecialChar LaTeX
5003 file into \SpecialChar LyX
5006 File\SpecialChar menuseparator
5007 Import\SpecialChar menuseparator
5009 \begin_inset space ~
5014 menu in \SpecialChar LyX
5016 This will call the program
5020 which will create a file foo.lyx from the file foo.tex.
5022 will then open that file.
5023 If the translation does not work, you can try calling
5027 from the command line, possibly using fancier options.
5030 \begin_layout Standard
5031 Even when the translation does work,
5035 may not translate everything, though it does handle most legal \SpecialChar LaTeX
5037 It will leave things it does not understand in \SpecialChar TeX
5038 mode; so, after translating
5043 , you can look for the red text and manually edit it to get it right.
5046 \begin_layout Standard
5051 has its own documentation (manpage), which Unix/Linux users can access
5052 via the console command
5055 \begin_inset space ~
5061 The manpage describes which \SpecialChar LaTeX
5062 commands and environments are not supported,
5063 what bugs you might run into (and how to get around them), and how to use
5064 the various options.
5067 \begin_layout Standard
5068 It is important to understand that
5072 can only translate files whose document class is
5073 \begin_inset Quotes eld
5077 \begin_inset Quotes erd
5081 , that is, for which there is a corresponding \SpecialChar LyX
5087 If there is no layout file, then you will get an error saying that the
5088 conversion could not be performed.
5089 So, unless you have a layout for the document class of your \SpecialChar LaTeX
5094 simply will not know how to translate the \SpecialChar LaTeX
5095 that it finds there into things
5098 More about layout files and how they are created is explained in detail
5106 \begin_layout Subsection
5107 Converting \SpecialChar LyX
5108 Documents to \SpecialChar LaTeX
5112 \begin_layout Standard
5113 You might wish to convert a \SpecialChar LyX
5114 Document to a \SpecialChar LaTeX
5116 For example, a co-worker or co-author who does not have \SpecialChar LyX
5121 File\SpecialChar menuseparator
5122 Export\SpecialChar menuseparator
5126 This will create a file
5134 file you are editing.
5137 \begin_layout Subsection
5142 \begin_layout Subsubsection
5146 \begin_layout Standard
5149 Document\SpecialChar menuseparator
5152 dialog takes care of the document-wide options, such as changing the document
5153 class, default font size and paper size.
5154 Document class options and also options for \SpecialChar LaTeX
5155 packages can be entered there
5159 \begin_inset space ~
5167 \begin_layout Subsubsection
5168 Other Preamble Matter
5169 \begin_inset CommandInset label
5178 \begin_layout Standard
5179 If you have special commands to put in the preamble of a \SpecialChar LaTeX
5181 use them in a \SpecialChar LyX
5185 Document\SpecialChar menuseparator
5186 Settings\SpecialChar menuseparator
5188 \begin_inset space ~
5193 and type in the dialog window (or from the document settings dialog, depending
5195 Anything you type will (as with \SpecialChar TeX
5196 mode) be sent directly to \SpecialChar LaTeX
5200 \begin_layout Subsection
5205 \begin_layout Standard
5207 has support for Bib\SpecialChar TeX
5208 , which allows you to build databases of bibliographical
5209 references to be used in multiple documents.
5212 Insert\SpecialChar menuseparator
5214 \begin_inset space \thinspace{}
5218 \begin_inset space \thinspace{}
5221 TOC\SpecialChar menuseparator
5223 \begin_inset space ~
5238 field you load Bib\SpecialChar TeX
5243 field you can load Bib\SpecialChar TeX
5247 \begin_layout Standard
5248 After you have done this, you can use citations from any bibliographies
5249 you have included with
5251 Insert\SpecialChar menuseparator
5255 \begin_inset space ~
5259 \begin_inset CommandInset ref
5261 reference "sec:bibliographies"
5270 dialog will show a list of all the references in your
5278 \begin_layout Section
5282 \begin_layout Standard
5283 Sometimes when you try to view a document, there will be errors, things
5284 that \SpecialChar LyX
5285 or \SpecialChar LaTeX
5287 When this happens, \SpecialChar LyX
5292 \begin_inset space ~
5298 Clicking on individual errors in this dialog will take you to the place
5299 in the \SpecialChar LyX
5300 document where the error occurs and also display the detailed \SpecialChar LaTeX