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"
94 \author -131811572 "Yuriy Skalko"
105 by the \SpecialChar LyX
110 \begin_layout Plain Layout
112 If you have comments on or corrections to this documentation, please send
113 them to the \SpecialChar LyX
114 Documentation mailing list:
115 \begin_inset CommandInset href
117 target "lyx-docs@lists.lyx.org"
131 \begin_layout Standard
132 \begin_inset CommandInset toc
133 LatexCommand tableofcontents
140 \begin_layout Chapter
144 \begin_layout Section
145 Welcome to \SpecialChar LyX
149 \begin_layout Standard
150 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
153 Now, do not panic – you will not need to learn \SpecialChar LaTeX
154 to use \SpecialChar LyX
156 That is, after all, the whole point of \SpecialChar LyX
157 : to provide an almost-WYSIWYG interface
158 to \SpecialChar LaTeX
160 There are some things you will need to learn, however, in order to use
165 \begin_layout Standard
166 Some of you probably found your way to this document because you tried to
167 put two spaces after a
168 \begin_inset Quotes eld
172 \begin_inset Quotes erd
175 or tried to put three blank lines between paragraphs.
176 You found out you could not and, in fact, you will find out that most of
177 the little tricks you are accustomed to use in word processors will not
178 work in \SpecialChar LyX
180 That is because most word processors you have used before allow you manually
181 to enter all spacings, font changes, and so on.
182 So you end up not only writing a document but typesetting it, too.
184 does the typesetting for you, in a consistent fashion, letting you focus
185 on the important things, like the content of your writing.
188 \begin_layout Standard
189 So read on to learn more about \SpecialChar LyX
191 Reading this tutorial is definitely worth the time.
194 \begin_layout Section
204 \begin_layout Standard
205 Before we get started with this section, you need to know that this
209 uses the notation outlined in the
214 If you came to this manual first, please read the
218 before you continue with the
225 \begin_layout Standard
226 Now that you know which fonts mean what in the documentation, we want to
227 talk a bit about what this
234 \begin_layout Subsection
235 Getting the most out of the Tutorial
238 \begin_layout Standard
239 This tutorial consists of examples and exercises.
240 To get the most out of this document, you should read through it, typing
241 all the little things we are telling you to type and trying out all of
242 the exercises to see if you get them right.
243 For convenience, you might want to print out the PDF version of this document.
246 \begin_layout Standard
247 If you are familiar with \SpecialChar LaTeX
248 , you will probably be able to read the
252 somewhat faster, since many \SpecialChar LyX
253 ideas are just \SpecialChar LaTeX
255 However, \SpecialChar LyX
256 has features you will want to learn about.
257 Even if you do not feel like reading the rest of the
261 , you should definitely check out Section
266 \begin_inset CommandInset ref
268 reference "sec:latexusers"
272 , which is specifically written for experienced \SpecialChar LaTeX
276 \begin_layout Subsection
284 \begin_layout Itemize
285 Detailed explanations of all of \SpecialChar LyX
290 \begin_layout Standard
299 \begin_layout Itemize
300 Detailed explanations of \SpecialChar LaTeX
305 \begin_layout Standard
307 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
310 can have a look at the
322 \begin_layout Standard
323 It is time to move on, time for your first document \SpecialChar ldots
327 \begin_layout Chapter
328 Getting started with \SpecialChar LyX
332 \begin_layout Section
333 Your first \SpecialChar LyX
337 \begin_layout Standard
338 OK\SpecialChar endofsentence
339 You are ready to start writing.
340 Before you do, there are a few things we need to mention, which will hopefully
341 make the Tutorial more instructive and useful.
345 \begin_layout Standard
346 Because there is information we cannot give you in the Tutorial, the
352 thing that you need to do is find the
359 Start up \SpecialChar LyX
369 You may want to load the
373 as well (if you are not reading it within \SpecialChar LyX
375 This way, you can read them while you are writing your own file.
379 \begin_layout Plain Layout
380 They can also serve as good examples of how to use the many features of
387 Note that once you have got more than one document open, you can use the
392 menu or the document tabs to switch between them.
395 \begin_layout Standard
396 In this Tutorial, we are going to assume that you have a fully working version
398 , as well as a \SpecialChar LaTeX
399 -distribution and a PDF-viewer.
400 This should be the case on all major Linux- and BSD-distributions, as well
401 as on Windows, where this is setup by the \SpecialChar LyX
405 \begin_layout Standard
406 Finally, we have written a file called
407 \change_deleted -712698321 1553351112
411 \change_inserted -712698321 1553351120
419 to let you practice your \SpecialChar LyX
421 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
424 As you learn new \SpecialChar LyX
425 functions, we will suggest that you fix those parts of
427 \change_deleted -712698321 1553351165
431 \change_inserted -712698321 1553351165
441 \begin_inset Quotes els
445 \begin_inset Quotes ers
448 hints about how to fix things.
452 \begin_layout Plain Layout
453 The hints are located in yellow
454 \begin_inset Quotes eld
458 \begin_inset Quotes erd
462 Access the text in a note by clicking on it.
467 If you want to cheat, or check what you have done, there is also a file
469 \change_deleted -712698321 1553351273
473 \change_inserted -712698321 1553351278
481 which contains the same text written and typeset by a \SpecialChar LyX
485 \begin_layout Standard
486 The example files can be found in
487 \change_inserted -712698321 1553351405
489 \begin_inset Quotes eld
493 \begin_inset Quotes erd
498 File\SpecialChar menuseparator
499 Open Example\SpecialChar ldots
501 \change_deleted -712698321 1553351425
508 directory of \SpecialChar LyX
509 's installation folder
513 \change_deleted -712698321 1553351441
517 \change_inserted -712698321 1553351441
527 File\SpecialChar menuseparator
534 to save a copy in your own directory for you to work on.
535 As you fix parts of the raw document, check to see how those changes affect
539 \begin_layout Standard
541 \change_deleted -712698321 1553351473
547 \change_inserted -712698321 1553351473
550 File\SpecialChar menuseparator
551 Open Example\SpecialChar ldots
556 contains lots of other examples files.
557 They will show you how to do various fancy things with \SpecialChar LyX
559 After you have read the Tutorial, or when you are confused about how to
560 do something fancy in \SpecialChar LyX
561 , take a look at these files.
564 \begin_layout Subsection
565 Typing, Viewing, and Exporting
568 \begin_layout Itemize
571 File\SpecialChar menuseparator
575 \begin_layout Itemize
576 Type a sentence like:
578 This is my first \SpecialChar LyX
582 \begin_layout Itemize
583 Save your document with
585 File\SpecialChar menuseparator
590 As\SpecialChar endofsentence
594 \begin_layout Itemize
595 Create a PDF file, with
597 Document\SpecialChar menuseparator
600 or the toolbar button
608 will open a PDF-viewer program displaying your document as it will look
612 \begin_layout Itemize
613 Export the ready to print document with
615 File\SpecialChar menuseparator
623 \begin_layout Standard
624 Congratulations! You have written your first \SpecialChar LyX
626 All of the rest is just details.
627 \begin_inset Newline newline
633 \begin_layout Standard
638 You can save time by leaving the PDF viewer running in the background.
639 Under MacOS and Linux you can use
641 Document\SpecialChar menuseparator
644 or the toolbar button
650 and just click on the PDF viewer window afterwards.
651 Under Windows still use
653 Document\SpecialChar menuseparator
665 \begin_layout Standard
670 In case you are using a high-resolution display, the LyX toolbar icons
672 To change their size, right-click into a toolbar.
675 \begin_layout Subsection
679 \begin_layout Standard
681 can of course do most of the things you are used to doing with a word processor.
682 It will word-wrap and indent paragraphs automatically.
683 Here is a quick description of how to do some simple actions.
686 \begin_layout Description
687 Undo \SpecialChar LyX
688 has multiple levels of undo, which means you can undo everything you
689 have done since your current editing session started, by selecting
691 Edit\SpecialChar menuseparator
700 ) over and over again.
701 If you undo too much, just select
703 Edit\SpecialChar menuseparator
716 \begin_layout Standard
717 Currently, undo is limited to 100 steps.
721 \begin_layout Description
724 Edit\SpecialChar menuseparator
735 Edit\SpecialChar menuseparator
746 Edit\SpecialChar menuseparator
755 ) to cut, copy, and paste.
756 Or automatically paste selected text (including selections from other programs)
764 \begin_layout Description
767 Edit\SpecialChar menuseparator
781 arg "dialog-show findreplace"
785 In the dialog, search with the
797 button to replace a word you have found.
801 \begin_layout Plain Layout
802 Close the window when you are done or leave it open if you find it more
804 Most dialog boxes in \SpecialChar LyX
805 can operate like this.
806 Just be sure you have the right window in focus when you are trying to
807 type in the main \SpecialChar LyX
808 window or a \SpecialChar LyX
814 If you like, you can specify whether to make the search case-sensitive,
815 or to search for only complete words; you can also search backwards through
819 \begin_layout Description
834 , which will by default print characters in italics), set it in
844 , usually small caps, used for people's names), or use your own formatting
847 Edit\SpecialChar menuseparator
852 Style\SpecialChar menuseparator
855 dialog (toolbar button
858 arg "dialog-show character"
864 \begin_layout Description
865 Toolbar Other buttons on the toolbar allow you to do some of the more popular
893 \begin_layout Standard
894 Of course, you have not yet written enough to make most of these functions
896 As you write more, though, try undoing, pasting, etc.
899 \begin_layout Subsection
900 WYSIWYM: Whitespace in \SpecialChar LyX
904 \begin_layout Standard
905 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
908 As many times as you hit
912 , you will only get one blank line.
913 As many times as you hit
917 , you will only get one space.
918 On a blank line, \SpecialChar LyX
919 will not let you type even one space.
924 key will not move you forward one tab stop; in fact there
928 no tab stops! There is no ruler at the top of the page to let you set tabs
932 \begin_layout Standard
933 Many word processors are based on the WYSIWYG principle:
934 \begin_inset Quotes eld
937 What You See Is What You Get.
938 \begin_inset Quotes erd
942 , on the other hand, is based on the principle that
943 \begin_inset Quotes eld
946 What You See Is What You
951 \begin_inset Quotes erd
954 You type what you mean and \SpecialChar LyX
955 will take care of typesetting it for you so
956 that the output looks nice.
961 grammatically separates paragraphs and a
965 grammatically separates words; so there is no reason to have several of
970 has no grammatical function at all – so \SpecialChar LyX
972 Using \SpecialChar LyX
973 , you will spend more of your time worrying about the
977 of your document and less time worrying about the
986 for more information on the WYSIWYM concept.
989 \begin_layout Standard
991 does have (many) ways to fine-tune the formatting of your document.
992 After all, \SpecialChar LyX
1002 has information about all that.
1003 It includes horizontal fills and vertical space — which are more powerful
1004 and versatile than multiple spaces or blank lines — and ways to change
1005 font sizes, character styles, and paragraph alignments by hand.
1006 The idea, though, is that you can write your whole document, focusing on
1007 content, and just worry about that fine-tuning at the end.
1008 With standard word processors, you will be distracted by document formatting
1009 throughout the writing process.
1012 \begin_layout Section
1016 \begin_layout Standard
1017 Different parts of a document have different purposes; we call these parts
1023 Most of a document is made up of regular text.
1024 Section titles (chapter, subsection, etc.) let the reader know that a new
1025 topic or subtopic will be discussed.
1026 Certain types of documents have special environments.
1027 A journal article will have an abstract and a title.
1028 A letter will have neither of these, but will probably have an environment
1029 that gives the writer's address.
1032 \begin_layout Standard
1033 Environments are a major part of the
1034 \begin_inset Quotes eld
1037 What You See Is What You Mean
1038 \begin_inset Quotes erd
1041 philosophy of \SpecialChar LyX
1043 A given environment may require a certain font style, font size, indenting,
1044 line spacing, and more.
1045 This problem is aggravated, because the exact formatting for a given environmen
1046 t may change: one journal may use boldface, 18 point, centered type for
1047 section titles while another uses italicized, 15 point, left justified
1048 type; different languages may have different standards for indenting; and
1049 bibliography formats can vary widely.
1051 lets you avoid learning all the different formatting styles.
1054 \begin_layout Standard
1059 choice box is located on the left end of the toolbar and looks like this:
1061 \begin_inset Graphics
1062 filename clipart/ToolbarEnvBox.png
1069 It indicates in which environment you are currently writing.
1070 While you were writing your first document, it said
1071 \begin_inset Quotes eld
1075 \begin_inset Quotes erd
1078 which is the default environment for text.
1079 Now you will put a number of environments in your new document so that
1080 you can see how they work.
1083 \begin_layout Subsection
1084 Sections and Subsections
1087 \begin_layout Standard
1092 on the first line of your new \SpecialChar LyX
1105 \begin_layout Plain Layout
1111 If nothing is selected, \SpecialChar LyX
1112 changes the paragraph you are currently in to
1113 the selected environment.
1114 Alternatively, you can change several paragraphs to a different environment
1115 by selecting them before picking an environment.
1132 , which will be covered below.
1135 \begin_inset Quotes eld
1139 \begin_inset Quotes erd
1142 and typesets the section heading (title) in a larger font.
1147 \SpecialChar endofsentence
1153 \begin_inset Quotes eld
1157 \begin_inset Quotes erd
1161 \begin_inset Quotes eld
1165 \begin_inset Quotes erd
1169 Section headings, like most environments, are assumed to end when you type
1174 \SpecialChar endofsentence
1175 Type the document introduction:
1178 \begin_layout LyX-Code
1179 This is an introduction to my first \SpecialChar LyX
1183 \begin_layout Standard
1199 \begin_inset Quotes eld
1203 \begin_inset Quotes erd
1206 and waits for you to type a title.
1208 \begin_inset Quotes eld
1214 \begin_inset space ~
1220 \begin_inset Quotes erd
1223 , and you will see that \SpecialChar LyX
1224 again sets it as a section title.
1227 \begin_layout Standard
1229 Go to the end of Section
1230 \begin_inset space ~
1234 \begin_inset Quotes eld
1237 my first \SpecialChar LyX
1239 \begin_inset Quotes erd
1255 Again, \SpecialChar LyX
1257 \begin_inset Quotes eld
1261 \begin_inset Quotes erd
1264 and waits for you to type a title.
1271 \begin_inset space ~
1275 \begin_inset Quotes eld
1279 \begin_inset Quotes erd
1283 \begin_inset space ~
1286 2, has been automatically renumbered to Section
1287 \begin_inset space ~
1290 3! In true WYSIWYM fashion, you just need to identify the text that makes
1291 up the section titles, and \SpecialChar LyX
1292 takes care of numbering the sections and typesettin
1296 \begin_layout Standard
1305 environment, and type the following five lines:
1308 \begin_layout LyX-Code
1309 Sections and subsections are described below.
1312 \begin_layout LyX-Code
1316 \begin_layout LyX-Code
1317 Sections are bigger than subsections.
1320 \begin_layout LyX-Code
1321 Subsection description
1324 \begin_layout LyX-Code
1325 Subsections are smaller than sections.
1328 \begin_layout Standard
1329 Click on the second line and select
1339 numbers the subsection
1340 \begin_inset Quotes eld
1344 \begin_inset Quotes erd
1347 , and typesets it in a font which is bigger than regular text but smaller
1348 than the section title.
1349 Change the fourth line to the
1353 environment as well.
1354 As you probably expected, \SpecialChar LyX
1355 automatically numbered the section
1356 \begin_inset Quotes eld
1360 \begin_inset Quotes erd
1364 If you put yet another section before Section
1365 \begin_inset space ~
1369 \begin_inset space ~
1372 2 will be renumbered as Section 3, and the subsections will be renumbered
1374 \begin_inset Quotes eld
1378 \begin_inset Quotes erd
1382 \begin_inset Quotes eld
1386 \begin_inset Quotes erd
1392 \begin_layout Standard
1393 Further levels of sectioning include
1406 We will let you play with these on your own.
1407 You may notice that paragraph and subparagraph headings are not numbered
1408 by default, and that subparagraphs are indented; see the
1412 for an explanation and how to change this.
1417 headings are actually the highest level of sectioning, above
1421 s, but you are only allowed to use them in certain types (text classes)
1423 documents (see Section
1424 \begin_inset space ~
1428 \begin_inset CommandInset ref
1430 reference "sec:Document-Classes"
1437 \begin_layout Standard
1438 Finally, you may want to have sections or subsections that are not numbered.
1439 There are environments for this as well.
1440 If you change one of your section headings to the
1444 environment (you may have to scroll down in the
1448 box to find it), \SpecialChar LyX
1449 will use the same font size for the heading as it uses
1450 for a regular section, but it will not number that section.
1451 There are corresponding
1452 \begin_inset Quotes eld
1456 \begin_inset Quotes erd
1459 heading environments for
1468 Try changing some of your sections or subsections to the starred environments,
1469 and note how the other section numbers are updated.
1472 \begin_layout Labeling
1473 \labelwidthstring 00.00.0000
1478 : Fix the section and subsection headings in
1479 \change_inserted -712698321 1553351516
1483 \change_deleted -712698321 1553351522
1487 \begin_inset Newline newline
1500 \begin_layout Subsection
1504 \begin_layout Standard
1506 has several different environments for typesetting lists.
1507 The various list environments free you from hitting
1511 a million times when writing an outline, or from renumbering a whole list
1512 when you want to add a point in the middle of the list.
1513 Different types of documents logically require different list environments:
1516 \begin_layout Itemize
1517 A slide presentation might use the
1521 environment's bulleted lists to describe different points.
1524 \begin_layout Itemize
1525 An outline would use the
1529 environment's numbered lists (and lettered sublists).
1532 \begin_layout Itemize
1533 A document describing several software packages could use the
1537 environment, where each item in the list begins with a bold-faced word.
1540 \begin_layout Itemize
1549 ) environment is a variation on the
1556 \begin_layout Standard
1557 Let us write a list of reasons why \SpecialChar LyX
1558 is better than other word processors.
1559 Somewhere in your document, type:
1562 \begin_layout Standard
1566 is better than other word processors because:
1569 \begin_layout Standard
1586 arg "layout-toggle Itemize"
1592 \begin_inset Quotes eld
1596 \begin_inset Quotes erd
1600 Type in your reasons:
1603 \begin_layout LyX-Code
1604 Typesetting is done for you.
1607 \begin_layout LyX-Code
1611 \begin_layout LyX-Code
1612 Lists are very easy to create!
1615 \begin_layout Standard
1616 List environments, unlike headings, do not end when you type
1621 Instead, \SpecialChar LyX
1622 assumes you are going on to the next item in the list.
1623 The above will therefore result in a three-item list.
1624 If you want more than one paragraph within one list
1628 , one way is to use the
1631 \begin_inset space ~
1636 , which you get by typing
1641 In order to get out of the list, you need to reselect the
1645 environment (or just use the key binding
1648 arg "layout Standard"
1654 \begin_layout Standard
1655 You now have a beautiful itemized list.
1656 You might want to run \SpecialChar LaTeX
1657 to see how the list looks when printed out.
1658 But what if you wanted to number the reasons? Well, just select the whole
1663 \begin_layout Plain Layout
1665 will not let you select the first bullet (or the actual number in a numbered
1666 section title) unless you also select the paragraph
1670 it, which you probably do not want to do.
1671 This is on purpose because the bullet or number depends on the document
1672 settings or text position, respectively.
1688 arg "layout-toggle Enumerate"
1692 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1693 will fix the numbering.
1696 \begin_layout Standard
1697 While the list is still selected, you can change to the other two list environme
1705 \begin_inset space \thinspace{}
1711 \begin_inset space \thinspace{}
1721 arg "layout-toggle Description"
1727 arg "layout-toggle List"
1730 ), in order to see what they look like.
1731 For those two environments, each list item is made up of a term, which
1732 is the item's first word, followed by a definition, which is the rest of
1733 the paragraph (until you hit
1738 The term is either typeset in boldface (
1743 \begin_inset Quotes eld
1747 \begin_inset Quotes erd
1754 \begin_layout Plain Layout
1755 But a typesetter's tab, which will change to fit the size of the largest
1756 term, not a pathetic, rigid, unchangeable typewriter
1769 ) from the rest of the paragraph.
1770 If you want to have more than one word in the definition, then separate
1774 \begin_inset space ~
1782 \begin_layout Labeling
1783 \labelwidthstring 00.00.0000
1788 : Typeset the list in
1789 \change_deleted -712698321 1553351539
1793 \change_inserted -712698321 1553351539
1802 \begin_layout Standard
1803 You can nest lists within each other in all sorts of interesting ways.
1804 An obvious example would be writing outlines.
1805 Numbered and bulleted lists will have different numbering and bulleting
1806 schemes for sublists.
1811 for details on the different sorts of lists and for examples of nestings.
1814 \begin_layout Subsection
1815 Other environments: Verses, Quotations, and more
1818 \begin_layout Standard
1819 There are two environments for setting quotations apart from surrounding
1824 for short quotes and
1838 \begin_layout Plain Layout
1839 used in this Tutorial for the long typing examples
1848 font; this environment is the only place in \SpecialChar LyX
1849 where you are allowed to use
1850 multiple spaces to allow code indenting.
1851 You can even write poetry using the
1859 to separate stanzas, and
1863 to separate lines within a stanza.
1868 for more complete descriptions of all of the available \SpecialChar LyX
1872 \begin_layout Labeling
1873 \labelwidthstring 00.00.0000
1878 : Correctly typeset the
1880 Quote, \SpecialChar LyX
1888 \change_inserted -712698321 1553351552
1892 \change_deleted -712698321 1553351554
1896 \begin_inset Newline newline
1906 \begin_layout Chapter
1910 \begin_layout Standard
1911 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1913 It introduced you to the basic editing operations in \SpecialChar LyX
1914 , as well as the powerful
1915 method of writing with environments.
1916 Most people who use \SpecialChar LyX
1917 , though, will want to write documents: papers, articles,
1918 books, manuals, or letters.
1919 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1921 a complete document.
1922 It will introduce you to text classes, which allow you to write different
1924 It will then describe many of the additions that turn text into a document,
1925 such as titles, footnotes, cross references, bibliographies, and tables
1929 \begin_layout Section
1931 \begin_inset CommandInset label
1933 name "sec:Document-Classes"
1940 \begin_layout Standard
1941 Different sorts of documents should be typeset differently.
1942 For example, books are generally printed double-sided, while articles are
1944 In addition, many documents contain special environments: letters contain
1945 some environments — such as the sender's address and the signature — which
1946 do not make sense in a book or article.
1947 The \SpecialChar LyX
1956 \begin_layout Plain Layout
1957 for \SpecialChar LaTeX
1958 users: this is equivalent to the \SpecialChar LaTeX
1964 takes care of these large scale differences between different sorts of
1966 This Tutorial, for example, was written in the
1971 Document classes are another major part of the WYSIWYM philosophy; they
1972 tell \SpecialChar LyX
1973 how to typeset the document, so you do not need to know how.
1976 \begin_layout Standard
1977 Your document is probably being written in the
1985 \begin_layout Plain Layout
1986 That is usually the default document class
1991 Try changing to other document classes (using the
1993 Document\SpecialChar menuseparator
1996 dialog) to see how they are typeset differently.
1997 If you change your document to the
2001 document class and look at the
2005 box, you will see that most of the allowed environments are the same.
2006 However, you can now use the
2011 If you are ever unsure about which environments you can use in a given
2012 document class, just consult the
2019 \begin_layout Standard
2020 Font sizes, one- or two-column printing, and page headings are just some
2021 of the ways journals' typesettings differ from one another.
2022 As the Computer Age continues to mature, journals have begun accepting
2023 electronic submissions, creating \SpecialChar LaTeX
2025 \begin_inset Quotes eld
2029 \begin_inset Quotes erd
2032 so that authors can submit correctly typeset articles.
2034 is set up to support this as well.
2035 For example, \SpecialChar LyX
2036 supports typesetting (and extra environments) for the American
2037 Mathematics Society journals using the
2040 \begin_inset space ~
2048 \begin_layout Standard
2049 Here is a very quick reference to some of the document classes.
2052 Special Document Classes
2058 manual for many more details.
2061 \begin_layout Standard
2063 \begin_inset Tabular
2064 <lyxtabular version="3" rows="7" columns="2">
2065 <features tabularvalignment="middle">
2066 <column alignment="center" valignment="top" width="0pt">
2067 <column alignment="center" valignment="top" width="0pt">
2069 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2072 \begin_layout Plain Layout
2078 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2081 \begin_layout Plain Layout
2089 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2092 \begin_layout Plain Layout
2098 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2101 \begin_layout Plain Layout
2102 one-sided, no chapters
2109 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2112 \begin_layout Plain Layout
2118 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2121 \begin_layout Plain Layout
2122 layout & environments for American Math Society
2129 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2132 \begin_layout Plain Layout
2138 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2141 \begin_layout Plain Layout
2142 longer than article, two-sided
2149 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2152 \begin_layout Plain Layout
2158 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2161 \begin_layout Plain Layout
2162 report + front and back matter
2169 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2172 \begin_layout Plain Layout
2178 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2181 \begin_layout Plain Layout
2189 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2192 \begin_layout Plain Layout
2198 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2201 \begin_layout Plain Layout
2202 lots of extra environments for address, signature\SpecialChar ldots
2216 \begin_layout Section
2217 Templates: Writing a Letter
2220 \begin_layout Standard
2221 One way to write a letter would be to open a new file, and choose a
2227 Document\SpecialChar menuseparator
2231 While this is the most obvious way to write a letter, it seems like extra
2233 Every time you write a business letter, you want to have your address,
2234 the address to which you are sending it, a body, a signature, etc.
2240 for letters, which contains a sample letter; once you have a template,
2241 you can just replace a couple of parts of the letter with your text each
2242 time you write a letter.
2245 \begin_layout Standard
2246 Open a new file with
2248 File\SpecialChar menuseparator
2250 \begin_inset space ~
2254 \begin_inset space ~
2258 \change_inserted -712698321 1553351676
2266 \change_deleted -712698321 1553351662
2270 \change_inserted -712698321 1553351666
2274 Letter (Standard Class)
2279 Save and print the file to see how the various environments are typeset.
2282 \begin_layout Standard
2283 When you look at the
2287 box, you will see several environments, like the
2290 \begin_inset space ~
2295 environment, that do not exist in most other document classes.
2301 You can play around for a while to figure out how the various environments
2303 You will notice for example that the
2307 environment has the word
2308 \begin_inset Quotes eld
2312 \begin_inset Quotes erd
2315 in red before the actual text of the signature.
2316 This word does not show up in the actual letter, as you will see if you
2317 view/export the file.
2318 It is just there to let you know where the signature goes.
2319 Also, note that it does not matter where in the file the
2324 Remember, \SpecialChar LyX
2325 is WYSIWYM; you can put the
2329 environment anywhere you want, but \SpecialChar LyX
2330 knows that in the printout, the signature
2331 should be at the end.
2334 \begin_layout Standard
2335 A template is just a regular \SpecialChar LyX
2337 This means you can fill in your address and signature and save the file
2339 From now on, any time you want to write a letter, you can use the new template
2341 We do not have to suggest an actual
2342 \begin_inset Quotes eld
2346 \begin_inset Quotes erd
2349 here; just write a letter to someone!
2353 \begin_layout Plain Layout
2354 One warning, if you are writing from a template.
2355 If you erase all of the text in an environment — for example, if you erase
2359 \begin_inset space ~
2364 field so that you can replace it with your own — and then you move the
2365 cursor without writing any text, the environment may disappear.
2366 This is because most environments cannot exist without any text in them.
2367 Just reselect the environment from the
2379 \begin_layout Standard
2380 Templates can be a huge time-saver, and we urge you to use them whenever
2382 In addition, they can help a person learn how to use some of the fancier
2384 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2386 of less computer-aware users.
2387 When they are first learning \SpecialChar LyX
2388 , it will be less intimidating if they have
2389 a letter template customized for their company, for example.
2392 \begin_layout Standard
2393 \begin_inset Newpage newpage
2399 \begin_layout Section
2403 \begin_layout Standard
2405 (like \SpecialChar LaTeX
2406 ) considers the title — which may contain the actual title, the author,
2407 the date, and even an abstract of a paper — to be a separate part of the
2411 \begin_layout Standard
2412 Go back to your first \SpecialChar LyX
2413 document and make sure it is using the
2421 \begin_layout Plain Layout
2422 You should not be using the letter any more, since the
2426 document class does not allow titles.
2431 Type a title on the first line, and change the line to the
2436 On the next line, type your name and change it to the
2441 On the next line, write the date in the
2446 Type a paragraph or two summarizing your document using the
2451 Notice how the title is presented when it is printed out.
2452 If you change the document format to Book, you will get a separate title
2453 page, like the first page of this tutorial.
2456 \begin_layout Labeling
2457 \labelwidthstring 00.00.0000
2462 : Fix the title, date, and author in
2463 \change_deleted -712698321 1553351568
2467 \change_inserted -712698321 1553351568
2476 \begin_layout Section
2477 Labels and Cross-References
2480 \begin_layout Standard
2481 You can label section headings, list items, formulas, footnotes, and floats
2485 \begin_layout Plain Layout
2486 Floats are explained in the
2500 Once you do so, you can refer to the element in other parts of the document,
2501 using cross-references.
2502 You can refer to a section's number, to the page on which the section begins
2504 As with section numbering, \SpecialChar LyX
2505 also takes care of cross-reference numbering
2507 Automatic management of labels and cross-references is among the most significa
2508 nt advantages of \SpecialChar LyX
2509 (and \SpecialChar LaTeX
2510 ) over conventional word processors.
2513 \begin_layout Subsection
2517 \begin_layout Standard
2518 Go to our second section, whose title is
2519 \begin_inset Quotes eld
2523 \begin_inset Quotes erd
2527 Click at the end of the section title line, and select
2529 Insert\SpecialChar menuseparator
2532 or the toolbar button
2539 A dialog asks you for a label name, and gives you a suggestion.
2544 , the label name will be placed in a box next to the section title.
2547 \begin_layout Standard
2548 So far you have not done anything — the output will look exactly the same,
2549 since labels do not show up in the printed document.
2550 However, now that you have added a label, you can refer to that label with
2552 We will do that next.
2555 \begin_layout Subsection
2556 Your first cross-reference
2559 \begin_layout Standard
2560 Place the cursor somewhere in Section
2561 \begin_inset space ~
2568 \begin_layout LyX-Code
2569 If you want to know more about this document,
2570 \begin_inset Newline newline
2576 \begin_layout Standard
2577 Now, with the cursor before the final period, select
2579 Insert\SpecialChar menuseparator
2581 \begin_inset space ~
2586 or the toolbar button
2589 arg "dialog-show-new-inset ref"
2593 The Cross-reference dialog pops up.
2594 It shows a list of the possible labels you can reference.
2595 At the moment, there should be only one,
2596 \begin_inset Quotes eld
2599 sec:About-This-Document
2600 \begin_inset Quotes erd
2604 First, select the drop-down menu labeled
2605 \begin_inset Quotes eld
2609 \begin_inset Quotes erd
2613 \begin_inset Quotes eld
2617 \begin_inset Quotes erd
2622 \begin_inset Quotes eld
2625 sec:About-This-Document
2626 \begin_inset Quotes erd
2629 (it may be selected by default), and a reference marker will appear containing
2631 \begin_inset Quotes eld
2634 Ref: sec:About-This-Document
2635 \begin_inset Quotes erd
2638 (To be really correct, you should put a
2641 \begin_inset space ~
2649 arg "command-alternatives math-space ; space-insert protected"
2652 ) in between the word
2653 \begin_inset Quotes eld
2657 \begin_inset Quotes erd
2660 and the reference.) An alternative way to reference a label is to right-click
2661 the label and select
2665 in the pop-up context menu.
2666 The cross-reference to this label is now in the clipboard and can be copied
2667 to the actual cursor position via the menu
2669 Edit\SpecialChar menuseparator
2679 In the printed document, this reference marker will be replaced with the
2681 Preview your document and you will see that \SpecialChar LaTeX
2682 has been even cleverer than
2685 \begin_inset Quotes eld
2689 \begin_inset Quotes erd
2695 \begin_layout Standard
2696 Conveniently, a cross-reference acts as a hyperlink when you are editing
2697 a document in \SpecialChar LyX
2698 ; clicking on it will pop up the
2705 \begin_inset space ~
2709 \begin_inset space ~
2714 will move the cursor to the referenced label.
2717 \begin_layout Subsection
2718 More fun with labels
2721 \begin_layout Standard
2722 We told you that \SpecialChar LyX
2723 takes care of numbering cross-references; now you can
2725 Add a new section before Section
2726 \begin_inset space ~
2730 Update the preview, and — voilà! — the section cross-reference changed
2732 \begin_inset Quotes eld
2736 \begin_inset Quotes erd
2739 ! Change the section
2740 \begin_inset Quotes eld
2744 \begin_inset Quotes erd
2747 to a subsection, and the cross-reference will reference Subsection
2748 \begin_inset space ~
2751 2.1 instead of Section
2752 \begin_inset space ~
2756 The page reference will not change unless you add a whole page of text
2757 before the label, of course.
2761 \begin_layout Standard
2762 If you want some more practice with labels, then try putting a new label
2763 where your first cross-reference was, and refer to that label from elsewhere
2765 If you will be inserting cross-references often, it may be convenient to
2773 \begin_layout Standard
2774 If you want to confirm that the cross-referencing gets the pages right even
2775 for larger documents,
2779 a couple pages of text from the
2783 to the clipboard, and
2787 them into your document.
2791 \begin_layout Plain Layout
2792 By the way, copying a chapter title may cause an error, because chapters
2793 are not allowed in the article class, see Section
2794 \begin_inset space ~
2798 \begin_inset CommandInset ref
2800 reference "sec:Document-Classes"
2805 If this happens, just delete the chapter title.
2813 \begin_layout Labeling
2814 \labelwidthstring 00.00.0000
2819 : Fix the references in
2820 \change_deleted -712698321 1553351573
2824 \change_inserted -712698321 1553351573
2833 \begin_layout Section
2834 Footnotes and Margin Notes
2837 \begin_layout Standard
2838 Footnotes can be added using the toolbar button
2841 arg "footnote-insert"
2846 Insert\SpecialChar menuseparator
2850 Click at the end of the word
2851 \begin_inset Quotes eld
2856 \begin_inset Quotes erd
2859 somewhere in your document and insert a footnote.
2860 A footnote box appears where you can enter the text of the footnote.
2862 should place the cursor at the beginning of the footnote box.
2866 \begin_layout LyX-Code
2868 is a typesetting word processor.
2871 \begin_layout Standard
2872 Now click on the button labeled
2873 \begin_inset Quotes eld
2877 \begin_inset Quotes erd
2881 The footnote box is closed, leaving the button showing where the footnote
2882 marker will be in the printed text; this is called
2883 \begin_inset Quotes eld
2887 \begin_inset Quotes erd
2891 You can unfold the footnote at any time and re-edit its text by clicking
2893 \begin_inset Quotes eld
2897 \begin_inset Quotes erd
2903 \begin_layout Standard
2904 A footnote can be cut and pasted like normal text.
2905 Go ahead; try it! All you need to do is select the footnote button
2909 \begin_layout Plain Layout
2910 It may be easier to select it using the keyboard.
2911 You might accidentally open the footnote if you are trying to select the
2912 marker itself with the mouse.
2926 In addition, you can change regular text to a footnote, by selecting it
2930 arg "footnote-insert"
2933 button; change a footnote to regular text by hitting the
2937 key when the cursor is in the first position of a footnote, or by hitting
2942 key when the cursor is in the very last position of the footnote.
2945 \begin_layout Standard
2946 Margin notes can be added using the menu
2948 Insert\SpecialChar menuseparator
2950 \begin_inset space ~
2955 or the toolbar button
2958 arg "marginalnote-insert"
2961 \SpecialChar endofsentence
2962 Margin notes are like footnotes, except that:
2965 \begin_layout Itemize
2966 the on-screen boxes say
2967 \begin_inset Quotes eld
2971 \begin_inset Quotes erd
2975 \begin_inset Quotes eld
2979 \begin_inset Quotes erd
2985 \begin_layout Itemize
2986 the notes will be placed in the margin, instead of below the text
2989 \begin_layout Itemize
2990 margin notes are not numbered
2993 \begin_layout Standard
2994 Change your \SpecialChar LyX
2995 footnote back to text, then select and change it to a margin
2997 Run \SpecialChar LaTeX
2998 again to see what the margin note looks like.
3001 \begin_layout Labeling
3002 \labelwidthstring 00.00.0000
3007 : Fix the footnote in
3008 \change_deleted -712698321 1553351579
3012 \change_inserted -712698321 1553351579
3021 \begin_layout Section
3023 \begin_inset CommandInset label
3025 name "sec:bibliographies"
3032 \begin_layout Standard
3033 Bibliographies are similar to cross-references.
3034 The bibliography contains a list of references at the end of the document,
3035 and they can be referenced from within the document.
3036 Like section titles, \SpecialChar LyX
3037 and \SpecialChar LaTeX
3038 make your job easier by automatically numbering
3039 the bibliography items and changing citations when the item numbers change.
3042 \begin_layout Standard
3043 Go to the end of the document and switch to the
3048 Now, each paragraph you type will be a reference.
3050 \begin_inset Quotes eld
3055 The Lyx Tutorial, by the \SpecialChar LyX
3059 \begin_inset Quotes erd
3062 as your first reference.
3063 Note that \SpecialChar LyX
3064 automatically puts a number in a box before each reference.
3065 Click on the boxed reference number, and the
3068 \begin_inset space ~
3078 is to refer to this reference within the \SpecialChar LyX
3088 is set (default), you will see the number of the bibliography in the output.
3094 \begin_inset Quotes eld
3098 \begin_inset Quotes erd
3101 to make it easy to remember.
3104 \begin_layout Standard
3105 Now pick somewhere in your document that you would like to insert a reference.
3108 Insert\SpecialChar menuseparator
3111 or the toolbar button
3114 arg "dialog-show-new-inset citation"
3123 The left panel in this dialog lists all the bibliography entries, and this
3124 field allows you to choose which bibliography item you want to cite.
3126 \begin_inset Quotes eld
3130 \begin_inset Quotes erd
3133 (right now, that is the only item in the bibliography), then use the
3137 button in the center to insert it.
3138 (You can have multiple citations in the same place by transferring a number
3143 \begin_layout Plain Layout
3144 If one uses label names for references that are easy to remember it is easier
3145 to find the entry in the list of references.
3155 Now preview your file and you will see that the citation appears in brackets
3156 in the text, referring to the bibliography at the end of the document.
3159 \begin_layout Standard
3163 \begin_inset space ~
3172 dialog will put a remark (such as a reference to a page or chapter within
3173 the referenced book or article) in the brackets after the reference.
3174 If you want the references to have labels instead of numbers in the printed
3175 output (for example, some journals would use
3176 \begin_inset Quotes eld
3180 \begin_inset Quotes erd
3183 to refer to a paper written by Smith in 1995), use the
3190 \begin_inset space ~
3203 \begin_layout Labeling
3204 \labelwidthstring 00.00.0000
3209 Fix the bibliography and citation in
3210 \change_deleted -712698321 1553351585
3214 \change_inserted -712698321 1553351585
3223 \begin_layout Section
3227 \begin_layout Standard
3228 You may want to put a table of contents at the beginning of your document.
3230 makes this easy to do.
3235 after your document title and before your first section title and select
3238 Insert\SpecialChar menuseparator
3240 \begin_inset space ~
3244 \begin_inset space ~
3248 \change_inserted -712698321 1590305779
3250 \begin_inset space \thinspace{}
3254 \begin_inset space \thinspace{}
3259 \SpecialChar menuseparator
3261 \begin_inset space ~
3265 \begin_inset space ~
3272 \begin_inset Quotes eld
3276 \begin_inset Quotes erd
3279 will appear in a button on the first line of the document.
3283 \begin_layout Standard
3284 This may not appear to be very useful.
3285 However, if you look at your preview, you will see that a table of contents
3286 has been generated, listing the various sections and subsections in your
3288 As usual, if you reorder sections or create new ones, you will see those
3289 changes in the preview when you update it.
3293 \begin_layout Standard
3294 The table of contents is not printed in the on-screen version of the document.
3295 But you can display the table of contents in a separate window by clicking
3296 on the table of contents button, or by using
3298 View\SpecialChar menuseparator
3300 \begin_inset space ~
3305 or the toolbar button
3308 arg "dialog-toggle toc"
3312 This menu will work even if you do not have a table of contents inset in
3314 This is a very useful tool for rearranging your document parts.
3315 Clicking on a (sub)section title in the
3319 window will highlight that line and move the display (in the \SpecialChar LyX
3321 to that place in the document.
3322 You can also use the arrow keys to move up and down in the table of contents.
3323 You may therefore find it convenient to leave this window open throughout
3325 You can get similar functionality from the
3329 menu, though, where the table of contents appears automatically.
3332 \begin_layout Standard
3333 To get rid of the Table of Contents, you can delete the table of contents
3334 button just like any other text.
3337 \begin_layout Labeling
3338 \labelwidthstring 00.00.0000
3343 : Fix the table of contents in
3344 \change_deleted -712698321 1553351589
3348 \change_inserted -712698321 1553351589
3357 \begin_layout Chapter
3361 \begin_layout Standard
3363 is used by many scientists because it outputs great looking equations,
3364 avoiding the control characters used by word processors and their equation
3366 Many of these scientists are frustrated, however, because writing equations
3367 in \SpecialChar LaTeX
3368 is more like programming than writing.
3369 Happily, \SpecialChar LyX
3370 has WYSIWYM support for equations.
3371 If you are used to \SpecialChar LaTeX
3372 , you will find that all of the usual \SpecialChar LaTeX
3374 can be typed in normally, but they will show up in a WYSIWYM fashion.
3375 If, on the other hand, you have never written in \SpecialChar LaTeX
3380 toolbar will allow you to write professional-looking math quickly and easily.
3383 \begin_layout Section
3387 \begin_layout Standard
3388 Somewhere in your \SpecialChar LyX
3392 \begin_layout LyX-Code
3393 I like what Einstein said, E=mc^2, because it is
3394 \begin_inset Newline linebreak
3400 \begin_layout Standard
3401 Now, that equation does not look very good in \SpecialChar LyX
3402 and in the output; there
3403 is no space between the letters and the equals sign, and you would like
3404 to write an actual superscript for the
3405 \begin_inset Quotes eld
3409 \begin_inset Quotes erd
3413 That bad typesetting happened because we did not tell \SpecialChar LyX
3414 that we were writing
3415 a mathematical expression, so it typeset the equation like regular old
3419 \begin_layout Standard
3420 But we can create a formula that will be typeset properly.
3421 Highlight the equation and click the toolbar button
3429 Insert\SpecialChar menuseparator
3430 Math\SpecialChar menuseparator
3432 \begin_inset space ~
3438 If nothing is highlighted \SpecialChar LyX
3439 inserts a little blue square, which is an empty
3441 The expression appears in blue and the blue square disappears as soon as
3442 the formula is not empty.
3447 to leave the equation.
3448 The purple markers disappear, leaving the cursor to the right of the expression.
3449 Now, if you type something, it will be regular text.
3452 \begin_layout Standard
3453 Looking at the output you will notice that the expression was typeset nicely,
3454 with spaces between the letters and the equals sign, and a superscript
3456 \begin_inset Quotes eld
3460 \begin_inset Quotes erd
3464 Letters in math mode are assumed to be variables, and come out in italics.
3465 Numbers are just numbers.
3468 \begin_layout Standard
3469 This math editor is another example of the WYSIWYM philosophy.
3470 In \SpecialChar LaTeX
3471 , you write a mathematical expression using text and commands like
3477 ; this can be frustrating, because you cannot see what an expression looks
3478 like until you run the file under \SpecialChar LaTeX
3479 and you may have to spend time, for
3480 example, finding missing brackets.
3482 does not attempt to get the expression to look perfect (WYSIWYG), but
3483 it gives you an extremely good idea of what the expression will look like.
3485 then takes care of the professional typesetting.
3488 \begin_layout Section
3489 Navigating an Equation
3492 \begin_layout Standard
3494 \begin_inset Formula $E=mc^{2}$
3498 \begin_inset Formula $E=1+mc^{2}$
3502 Use the arrow keys to move the cursor into the expression.
3503 Note that when you enter the expression, the purple markers appear to let
3504 you know you are editing math.
3513 to move the cursor past the equals sign, and just type
3514 \begin_inset Quotes eld
3518 \begin_inset Quotes erd
3522 Again, you can use the arrow keys or
3526 to leave the formula\SpecialChar endofsentence
3530 \begin_layout Standard
3531 Other than the special keys described below, typing in math mode is like
3532 editing regular text.
3542 Select text either with the arrow keys or with the mouse.
3545 Edit\SpecialChar menuseparator
3548 works in math mode as well as cut and paste.
3549 One thing to be careful of: if you are left or right outside a formula
3558 respectively, you delete the whole formula.
3559 Luckily, you can just use
3566 \begin_layout Standard
3567 What if you want to change
3568 \begin_inset Formula $E=mc^{2}$
3572 \begin_inset Formula $E=mc^{2.5}+1$
3575 ? Again, you can use the mouse to click in the right place.
3576 However, you can also use the arrow keys.
3577 If the cursor is just after the
3578 \begin_inset Quotes eld
3582 \begin_inset Quotes erd
3586 \begin_inset Quotes eld
3590 \begin_inset Quotes erd
3597 and the cursor is moved to the level of the superscript, just before the
3599 \begin_inset Quotes eld
3603 \begin_inset Quotes erd
3608 \begin_inset Quotes eld
3612 \begin_inset Quotes erd
3620 will move the cursor back to the regular level.
3629 , the cursor will be placed
3633 the superscript (so that you can then type the
3634 \begin_inset Quotes eld
3638 \begin_inset Quotes erd
3644 \begin_layout Section
3645 Exponents and Indices
3648 \begin_layout Standard
3649 An exponent can be entered from the
3653 toolbar (see below), but it is actually simpler just to type the caret
3655 \begin_inset Quotes eld
3659 \begin_inset Quotes erd
3664 will place another blue rectangle in the superscript, so that whatever
3665 you write next will be superscripted, and in a smaller font size.
3666 Everything you type until you hit a
3674 to exit the formula entirely) will be in the superscript.
3677 \begin_layout Standard
3678 Writing a subscript (index) is just as easy; start one by typing the underscore
3680 \begin_inset Quotes eld
3684 \begin_inset Quotes erd
3688 You can subscript and superscript both subscripts and superscripts like
3690 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3697 \begin_layout Labeling
3698 \labelwidthstring 00.00.0000
3704 \begin_inset space ~
3708 \change_deleted -712698321 1553351597
3712 \change_inserted -712698321 1553351597
3723 \begin_layout Section
3727 \begin_layout Standard
3732 toolbar is a convenient way to enter symbols and/or to perform complicated
3734 Many of these operations can be accomplished from the keyboard or the
3736 Insert\SpecialChar menuseparator
3741 Edit\SpecialChar menuseparator
3744 menus (the latter only appears when you are in Math mode).
3745 However, we are going to concentrate on using the
3749 toolbar, just to let you know what is out there; you can learn keyboard
3750 shortcuts and commands later from the
3757 \begin_layout Standard
3762 toolbar is shown when the cursor is in a formula and can also be turned
3763 on manually in the menu
3765 View\SpecialChar menuseparator
3769 When you click there on
3770 \begin_inset Quotes eld
3774 \begin_inset Quotes erd
3780 arg "toolbar-toggle math"
3783 ) the toolbar will be shown permanently at the bottom; this state is visualized
3788 menu with a checkmark.
3789 When you click in this state again on
3790 \begin_inset Quotes eld
3794 \begin_inset Quotes erd
3805 toolbar is only shown when the cursor is within a formula; this state is
3806 visualized by the renaming of the menu entry from
3807 \begin_inset Quotes eld
3811 \begin_inset Quotes erd
3815 \begin_inset Quotes eld
3819 \begin_inset space ~
3823 \begin_inset Quotes erd
3829 \begin_layout Subsection
3833 \begin_layout Standard
3838 toolbar allows you to choose from a large array of symbols used in math:
3839 operators, arrows, relationships, delimiters, special characters, sums
3841 Note that subscripting and superscripting allow you to put lower and upper
3842 limits on sums and integrals.
3845 \begin_layout Subsection
3846 Roots, decorations, and delimiters
3849 \begin_layout Standard
3850 To type a square root, just click on the button
3853 arg "math-insert \\sqrt"
3857 The square root appears, and the cursor is in a new insertion point inside
3859 You can type variables, numbers, other square roots, fractions, whatever
3862 will automatically resize the square root to fit what is inside.
3865 \begin_layout Standard
3867 \begin_inset Quotes eld
3871 \begin_inset Quotes erd
3875 \begin_inset Formula $\overrightarrow{a}$
3878 ) or group of characters (
3879 \begin_inset Formula $\overrightarrow{a+b}$
3882 ) is done similarly.
3883 Decorations are available from the toolbar via the button
3886 arg "math-insert \\hat"
3890 Click on a decoration, and \SpecialChar LyX
3891 will insert that decoration with an insertion
3892 point under (or over) it.
3893 Just type what you want in the insertion point.
3894 There are two sets of decorations: those that resize with the text you
3895 type, and those that have a fixed size, and are most appropriate for a
3900 \begin_layout Standard
3901 Delimiters such as parentheses, brackets, and braces work similarly, but
3902 are a bit more complicated.
3903 Hit the delimiter button
3906 arg "dialog-show mathdelimiter"
3912 \begin_inset space ~
3918 Your current selection of delimiters is displayed in a box.
3919 It is a pair of parentheses by default, but you can choose a pair of braces,
3920 a brace and a parenthesis, or choose the empty square to have something
3922 \begin_inset Quotes eld
3926 \begin_inset Formula $a=\left\langle 7\right.$
3930 \begin_inset Quotes erd
3933 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3938 \begin_layout Standard
3939 If you are lazy, you can type actual parentheses in math mode, rather than
3943 \begin_inset space ~
3949 However, those parentheses will be the same size as regular text, which
3950 will look bad if you have a big fraction or matrix inside the parentheses.
3951 So it is better to use one of the three delimiter buttons that insert them
3952 directly, for example
3955 arg "math-delim ( )"
3961 \begin_layout Standard
3962 You can also put delimiters or a square root sign or a decoration on already
3963 existing formula parts.
3964 Select the portion of the formula that you want to adjust, and then click
3965 on the button you want from the
3970 Try using this to change Newton's second law from scalar to vector form
3972 \begin_inset Formula $f=ma$
3976 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3980 Once you have learned about matrices, this is how you will put parentheses
3981 or brackets around them.
3984 \begin_layout Subsection
3988 \begin_layout Standard
3989 To create a fraction, click on the fraction button
3990 \change_deleted -131811572 1566935165
3994 arg "math-insert \\frac-square"
3998 \change_inserted -131811572 1566935147
4002 arg "math-insert \\frac"
4013 writes two insertion points in a fraction.
4014 As you would expect, you can use arrow keys or the mouse to move around
4016 Click on the top square and type
4017 \begin_inset Quotes eld
4021 \begin_inset Quotes erd
4030 \begin_inset Quotes eld
4034 \begin_inset Quotes erd
4038 You have made a fraction! Of course you can type anything within each of
4039 the two boxes: variables with exponents, square roots, other fractions,
4043 \begin_layout Labeling
4044 \labelwidthstring 00.00.0000
4050 \begin_inset space ~
4054 \change_deleted -712698321 1553351607
4058 \change_inserted -712698321 1553351607
4069 \begin_layout Subsection
4070 Functions: lim, log, sin and others
4073 \begin_layout Standard
4074 Because letters in math mode are considered to be variables, if you type
4076 \begin_inset Quotes eld
4080 \begin_inset Quotes erd
4083 in math mode, \SpecialChar LyX
4084 thinks you are typing the product of the three variables
4086 \begin_inset Formula $s$
4090 \begin_inset Formula $i$
4094 \begin_inset Formula $n$
4098 The three letters will be typeset in italics, when what you really wanted
4100 \begin_inset Quotes eld
4104 \begin_inset Quotes erd
4108 In addition, \SpecialChar LyX
4109 will not put a space between the word
4110 \begin_inset Quotes eld
4114 \begin_inset Quotes erd
4118 \begin_inset Quotes eld
4122 \begin_inset Quotes erd
4129 will exit the formula).
4131 \begin_inset Quotes eld
4135 \begin_inset Formula $\sin(x)$
4139 \begin_inset Quotes erd
4143 \begin_inset Quotes eld
4147 \begin_inset Formula $sin(x)$
4151 \begin_inset Quotes erd
4157 \begin_layout Standard
4165 arg "math-insert \\functions"
4169 \begin_inset Quotes eld
4173 \begin_inset Quotes erd
4176 in the pop-up function list.
4178 \begin_inset Quotes eld
4182 \begin_inset Quotes erd
4185 is displayed in \SpecialChar LyX
4186 in black, and set in upright roman type.
4187 The whole word is treated as one symbol, so if you type
4191 , it will delete the whole word.
4193 \begin_inset Quotes eld
4197 \begin_inset Quotes erd
4200 , which will be written in blue italics, like you expect in a formula.
4201 In the output, the expression will be correctly typeset.
4205 \begin_layout Standard
4206 The function list includes other trigonometric functions and their inverses,
4207 hyperbolic functions, logarithms, limits, and quite a few others.
4208 These functions can take subscripts and superscripts, important for typing
4210 \begin_inset Quotes eld
4214 \begin_inset Formula $\cos^{2}\theta$
4218 \begin_inset Quotes erd
4222 \begin_inset Quotes eld
4226 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4230 \begin_inset Quotes erd
4236 \begin_layout Labeling
4237 \labelwidthstring 00.00.0000
4243 \begin_inset space ~
4247 \change_deleted -712698321 1553351612
4251 \change_inserted -712698321 1553351612
4262 \begin_layout Subsection
4266 \begin_layout Standard
4267 Click on the matrix button
4270 arg "dialog-show mathmatrix"
4276 \change_inserted -131811572 1566934540
4282 A pop-up dialog allows you to choose how many rows and columns you want
4284 Choose 2 rows and 3 columns and hit
4290 prints 6 insertion points in a
4291 \begin_inset Formula $2\times3$
4295 As usual, you can put any sort of formula expression (a square root, another
4296 matrix, etc.) in each insertion point.
4297 You can also leave some of the insertion points empty if you want.
4300 \begin_layout Standard
4305 can be used to move horizontally between the columns of a matrix.
4306 Alternatively, you can use the arrow keys to move around - hitting
4310 at the end of one box will move to the next box,
4314 will move to the next row, etc.
4317 \begin_layout Standard
4318 If you need to change the number of rows and columns, use the menu
4320 Edit\SpecialChar menuseparator
4322 \begin_inset space \thinspace{}
4326 \begin_inset space \thinspace{}
4331 or the math toolbar buttons
4334 arg "tabular-feature append-row"
4340 arg "tabular-feature delete-row"
4346 arg "tabular-feature append-column"
4352 arg "tabular-feature delete-column"
4358 \begin_layout Standard
4363 for information on how to change the horizontal alignment of each column,
4364 and how to change the vertical position of the whole matrix.
4365 Note that if you want to write a table containing text, you should use
4367 's wonderful table support, rather than trying to write text in a matrix.
4370 \begin_layout Subsection
4374 \begin_layout Standard
4375 All of the expressions we have written so far have been on the same line
4376 as the text that came before and after them, otherwise known as inline
4378 This is fine for short, simple expressions, but if you want to write larger
4379 ones, or if you want your expressions to stand out from the text, you need
4380 to write them in display mode.
4381 In addition, only displayed expressions can be labeled and numbered (see
4386 ), and multi-line equations must be in display mode.
4389 \begin_layout Standard
4390 While being in a formula, click on the display button
4401 This centers the formula and adds a blank line before and after it.
4402 Now type in an expression and compile your file to see how it looks.
4403 The display button is actually a toggle; use it now to change a couple
4404 of your expressions to display mode and back.
4407 \begin_layout Standard
4408 Display mode has a couple differences from inline mode:
4411 \begin_layout Itemize
4412 The default font is larger for a few symbols, like
4413 \begin_inset Formula $\sum$
4417 \begin_inset Formula $\int$
4423 \begin_layout Itemize
4424 Subscripts and superscripts for limits and sums (but not integrals) are
4425 written under and over rather than next to the symbols
4428 \begin_layout Itemize
4432 \begin_layout Standard
4433 Other than these differences, though, displayed expressions and inline expressio
4434 ns are very similar.
4437 \begin_layout Standard
4438 One final note about the way displayed formulas are typeset: be careful
4439 about whether you are putting your equation into a new paragraph or not.
4440 If your formula is in the middle of a sentence or paragraph, then do not
4446 Doing so will cause the text
4450 the formula to start a new paragraph.
4451 That text will be indented or follow a blank line, depending on your document
4452 paragraph settings, which is probably not what you want.
4455 \begin_layout Labeling
4456 \labelwidthstring 00.00.0000
4461 : Put the various equations in
4462 \change_deleted -712698321 1553351617
4466 \change_inserted -712698321 1553351617
4474 into display mode, and see how they are typeset differently.
4477 \begin_layout Labeling
4478 \labelwidthstring 00.00.0000
4483 : Using various tools you have learned in this section, you should be able
4484 to write an equation like:
4488 \begin_layout Plain Layout
4489 After you have done it the hard way, give
4491 Insert\SpecialChar menuseparator
4492 Math\SpecialChar menuseparator
4494 \begin_inset space ~
4505 \begin_inset Formula
4507 f(x)=\left\{ \begin{array}{cc}
4510 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4519 \begin_layout Section
4523 \begin_layout Standard
4524 Now you are familiar with the basics.
4526 's math editor can do a lot more.
4527 You can refer to the
4531 manual for tips on how to:
4534 \begin_layout Itemize
4535 Label and number expressions.
4538 \begin_layout Itemize
4539 Create multi-line equations.
4542 \begin_layout Itemize
4543 Change typefaces, e.
4544 \begin_inset space \thinspace{}
4548 \begin_inset space \space{}
4551 to write bold-face text in an expression.
4554 \begin_layout Itemize
4555 Fine-tune font sizes and spacing within an expression.
4556 (Do not worry about this until your final draft!)
4559 \begin_layout Itemize
4561 These are very powerful, because you just define them once at the top of
4562 the document, and then you can use them throughout the document.
4565 \begin_layout Itemize
4566 Do almost all you can do with math.
4569 \begin_layout Chapter
4573 \begin_layout Section
4574 Other major \SpecialChar LyX
4578 \begin_layout Standard
4579 We have not gone through all the possible commands in \SpecialChar LyX
4580 , and we are not planning
4589 \begin_inset space ~
4594 manual for more information.
4595 We will just mention a couple more major things \SpecialChar LyX
4599 \begin_layout Itemize
4601 has WYSIWYM support for tables.
4604 Insert\SpecialChar menuseparator
4610 arg "tabular-insert"
4614 Click on the table with the
4621 \begin_inset space ~
4626 dialog box which allows extensive table editing.
4630 arg "toolbar-toggle table"
4633 the table toolbar will appear permanently.
4636 \begin_layout Itemize
4638 also supports including pictures in any format within documents.
4641 Insert\SpecialChar menuseparator
4647 arg "dialog-show-new-inset graphics"
4651 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4652 can have captions, and \SpecialChar LyX
4653 will automatically generate lists of figures and/or
4657 \begin_layout Itemize
4659 is heavily configurable.
4660 Everything from how the \SpecialChar LyX
4661 window looks to how the output comes out can be
4662 configured in a number of ways.
4663 Much configuration is done through
4665 Tools\SpecialChar menuseparator
4669 For more information on this, check out
4671 Help\SpecialChar menuseparator
4672 Customization\SpecialChar endofsentence
4676 \begin_layout Itemize
4678 is being developed by a team of programmers on five continents.
4679 Therefore, \SpecialChar LyX
4680 has better support for non-English languages (such as Dutch,
4681 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4682 ) than many word processors.
4683 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4684 languages Chinese Japanese, and Korean are supported.
4685 You can write documents in other languages and you can also configure \SpecialChar LyX
4687 to show its menus and error messages in other languages.
4691 \begin_layout Itemize
4692 The \SpecialChar LyX
4693 menus feature keybindings.
4694 This means that you can do
4696 File\SpecialChar menuseparator
4707 or by using the binding which is shown next to it in the menu (
4714 Keybindings are also configurable.
4715 For information on this, check out
4717 Help\SpecialChar menuseparator
4718 Customization\SpecialChar endofsentence
4722 \begin_layout Itemize
4724 can read \SpecialChar LaTeX
4727 \begin_inset space ~
4731 \begin_inset CommandInset ref
4733 reference "sec:tex2lyx"
4740 \begin_layout Itemize
4741 Spell-checking, thesaurus, and word count facilities are available.
4744 \begin_layout Itemize
4745 Generation of indexes and nomenclatures/glossaries is supported.
4748 \begin_layout Section
4750 for \SpecialChar LaTeX
4752 \begin_inset CommandInset label
4754 name "sec:latexusers"
4761 \begin_layout Standard
4762 If you do not know anything about \SpecialChar LaTeX
4763 , you do not have to read this section.
4764 Actually, you might want to
4768 about \SpecialChar LaTeX
4769 , and then read this chapter.
4770 However, some of those who begin to use \SpecialChar LyX
4771 will be familiar with \SpecialChar LaTeX
4773 If you are such a person, you may be wondering if \SpecialChar LyX
4774 can really do everything
4777 The short answer is that \SpecialChar LyX
4778 can do pretty much everything \SpecialChar LaTeX
4780 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4785 \begin_layout Standard
4786 Because this is just a tutorial, we are only going to mention things that
4787 new \SpecialChar LyX
4788 users will most likely be interested in.
4789 In the interests of keeping the Tutorial short, we will give only minimal
4794 \begin_inset space ~
4802 \begin_inset space ~
4807 manuals have a great deal of information on differences between \SpecialChar LyX
4808 and \SpecialChar LaTeX
4810 and how to do various \SpecialChar LaTeX
4811 tricks in \SpecialChar LyX
4815 \begin_layout Subsection
4820 \begin_layout Standard
4821 Anything that you enter in \SpecialChar TeX
4822 mode will be passed straight to \SpecialChar LaTeX
4824 displayed in red on the screen.
4825 You can use \SpecialChar TeX
4826 commands in \SpecialChar LyX
4829 Insert\SpecialChar menuseparator
4831 \begin_inset space ~
4843 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4847 \begin_layout Standard
4848 In a math formula, \SpecialChar TeX
4849 mode is handled a bit differently.
4851 mode is entered there by typing a backslash.
4852 The backslash is not written out, but anything you type afterwards will
4854 You exit \SpecialChar TeX
4859 or some other non-alphabetic character, like a number, underscore, caret
4861 Once you exit \SpecialChar TeX
4862 mode, if \SpecialChar LyX
4863 knows the \SpecialChar TeX
4864 command you have typed in, it will
4865 convert it to WYSIWYM\SpecialChar endofsentence
4867 \begin_inset Quotes eld
4877 \begin_inset Quotes erd
4880 in a formula and then press
4886 \begin_inset Quotes eld
4890 \begin_inset Quotes erd
4894 \begin_inset Quotes eld
4898 \begin_inset Formula $\gamma$
4902 \begin_inset Quotes erd
4906 This will work for almost all, non-complicated math macros.
4907 This may be faster than using the
4910 \begin_inset space ~
4915 , and will be especially convenient for experienced \SpecialChar LaTeX
4919 \begin_layout Standard
4920 As a special case, if you type
4921 \begin_inset Quotes eld
4931 \begin_inset Quotes erd
4934 in a formula, the beginning
4938 ending braces will be inserted in red while the cursor is placed between
4940 This makes it more convenient to type those commands that take an argument.
4943 \begin_layout Standard
4945 cannot do absolutely everything that \SpecialChar LaTeX
4947 Some fancy functions are not supported at all, while some work but are
4950 mode allows users to get the full flexibility of \SpecialChar LaTeX
4951 , while having all the
4952 convenient features of \SpecialChar LyX
4953 , like WYSIWYM math, tables, and editing.
4955 could never support every \SpecialChar LaTeX
4963 in the preamble (see Section
4964 \begin_inset space ~
4968 \begin_inset CommandInset ref
4970 reference "sec:preamble"
4974 ), you can use any package you want — although you will not have WYSIWYM
4975 support for that package's features.
4978 \begin_layout Subsection
4979 Importing \SpecialChar LaTeX
4985 \begin_inset CommandInset label
4994 \begin_layout Standard
4995 You can import a \SpecialChar LaTeX
4996 file into \SpecialChar LyX
4999 File\SpecialChar menuseparator
5000 Import\SpecialChar menuseparator
5002 \begin_inset space ~
5007 menu in \SpecialChar LyX
5009 This will call the program
5013 which will create a file foo.lyx from the file foo.tex.
5015 will then open that file.
5016 If the translation does not work, you can try calling
5020 from the command line, possibly using fancier options.
5023 \begin_layout Standard
5024 Even when the translation does work,
5028 may not translate everything, though it does handle most legal \SpecialChar LaTeX
5030 It will leave things it does not understand in \SpecialChar TeX
5031 mode; so, after translating
5036 , you can look for the red text and manually edit it to get it right.
5039 \begin_layout Standard
5044 has its own documentation (manpage), which Unix/Linux users can access
5045 via the console command
5048 \begin_inset space ~
5054 The manpage describes which \SpecialChar LaTeX
5055 commands and environments are not supported,
5056 what bugs you might run into (and how to get around them), and how to use
5057 the various options.
5060 \begin_layout Standard
5061 It is important to understand that
5065 can only translate files whose document class is
5066 \begin_inset Quotes eld
5070 \begin_inset Quotes erd
5074 , that is, for which there is a corresponding \SpecialChar LyX
5080 If there is no layout file, then you will get an error saying that the
5081 conversion could not be performed.
5082 So, unless you have a layout for the document class of your \SpecialChar LaTeX
5087 simply will not know how to translate the \SpecialChar LaTeX
5088 that it finds there into things
5091 More about layout files and how they are created is explained in detail
5099 \begin_layout Subsection
5100 Converting \SpecialChar LyX
5101 Documents to \SpecialChar LaTeX
5105 \begin_layout Standard
5106 You might wish to convert a \SpecialChar LyX
5107 Document to a \SpecialChar LaTeX
5109 For example, a co-worker or co-author who does not have \SpecialChar LyX
5114 File\SpecialChar menuseparator
5115 Export\SpecialChar menuseparator
5119 This will create a file
5127 file you are editing.
5130 \begin_layout Subsection
5135 \begin_layout Subsubsection
5139 \begin_layout Standard
5142 Document\SpecialChar menuseparator
5145 dialog takes care of the document-wide options, such as changing the document
5146 class, default font size and paper size.
5147 Document class options and also options for \SpecialChar LaTeX
5148 packages can be entered there
5152 \begin_inset space ~
5160 \begin_layout Subsubsection
5161 Other Preamble Matter
5162 \begin_inset CommandInset label
5171 \begin_layout Standard
5172 If you have special commands to put in the preamble of a \SpecialChar LaTeX
5174 use them in a \SpecialChar LyX
5178 Document\SpecialChar menuseparator
5179 Settings\SpecialChar menuseparator
5181 \begin_inset space ~
5186 and type in the dialog window (or from the document settings dialog, depending
5188 Anything you type will (as with \SpecialChar TeX
5189 mode) be sent directly to \SpecialChar LaTeX
5193 \begin_layout Subsection
5198 \begin_layout Standard
5200 has support for Bib\SpecialChar TeX
5202 \change_inserted -712698321 1590301994
5205 , which allows you to build databases of bibliographical references to be
5206 used in multiple documents.
5209 Insert\SpecialChar menuseparator
5211 \begin_inset space \thinspace{}
5215 \begin_inset space \thinspace{}
5219 \change_inserted -712698321 1590301964
5221 \begin_inset space \thinspace{}
5225 \begin_inset space \thinspace{}
5230 \SpecialChar menuseparator
5232 \change_inserted -712698321 1590301973
5236 \begin_inset space ~
5250 \change_inserted -712698321 1590302046
5256 \change_deleted -712698321 1590302066
5258 \change_inserted -712698321 1590302067
5262 \change_deleted -712698321 1590302057
5264 \change_inserted -712698321 1590302058
5269 \change_inserted -712698321 1590302061
5277 \change_deleted -712698321 1590302077
5279 \change_inserted -712698321 1590302078
5284 \change_deleted -712698321 1590302081
5290 \begin_layout Standard
5291 After you have done this, you can use citations from any bibliographies
5292 you have included with
5294 Insert\SpecialChar menuseparator
5298 \begin_inset space ~
5302 \begin_inset CommandInset ref
5304 reference "sec:bibliographies"
5313 dialog will show a list of all the references in your
5320 \change_inserted -712698321 1590302176
5321 If you want to use Biblatex rather than classic Bib\SpecialChar TeX
5322 , please refer to the
5323 User Guide for instructions.
5328 \begin_layout Section
5332 \begin_layout Standard
5333 Sometimes when you try to view a document, there will be errors, things
5334 that \SpecialChar LyX
5335 or \SpecialChar LaTeX
5337 When this happens, \SpecialChar LyX
5342 \begin_inset space ~
5348 Clicking on individual errors in this dialog will take you to the place
5349 in the \SpecialChar LyX
5350 document where the error occurs and also display the detailed \SpecialChar LaTeX