1 #LyX 2.4 created this file. For more info see https://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
8 \use_default_options false
12 \maintain_unincluded_children no
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_typewriter_osf false
27 \font_sf_scale 100 100
28 \font_tt_scale 100 100
30 \use_dash_ligatures false
32 \default_output_format pdf2
34 \bibtex_command default
35 \index_command default
39 \pdf_title "The LyX Tutorial"
40 \pdf_author "LyX Team"
41 \pdf_subject "LyX-documentation Tutorial"
42 \pdf_keywords "LyX, documentation"
44 \pdf_bookmarksnumbered true
45 \pdf_bookmarksopen true
46 \pdf_bookmarksopenlevel 1
51 \pdf_pdfusetitle false
52 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
55 \use_package amsmath 1
56 \use_package amssymb 1
59 \use_package mathdots 1
60 \use_package mathtools 1
62 \use_package stackrel 1
63 \use_package stmaryrd 1
64 \use_package undertilde 1
66 \cite_engine_type default
70 \paperorientation portrait
82 \paragraph_separation indent
83 \paragraph_indentation default
85 \math_numbering_side default
90 \paperpagestyle headings
91 \tracking_changes true
92 \postpone_fragile_content false
97 \author -712698321 "Jürgen Spitzmüller"
98 \author -131811572 "Yuriy Skalko"
109 by the \SpecialChar LyX
114 \begin_layout Plain Layout
116 If you have comments on or corrections to this documentation, please send
117 them to the \SpecialChar LyX
118 Documentation mailing list:
119 \begin_inset CommandInset href
121 target "lyx-docs@lists.lyx.org"
135 \begin_layout Standard
136 \begin_inset CommandInset toc
137 LatexCommand tableofcontents
144 \begin_layout Chapter
148 \begin_layout Section
149 Welcome to \SpecialChar LyX
153 \begin_layout Standard
154 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
157 Now, do not panic – you will not need to learn \SpecialChar LaTeX
158 to use \SpecialChar LyX
160 That is, after all, the whole point of \SpecialChar LyX
161 : to provide an almost-WYSIWYG interface
162 to \SpecialChar LaTeX
164 There are some things you will need to learn, however, in order to use
169 \begin_layout Standard
170 Some of you probably found your way to this document because you tried to
171 put two spaces after a
172 \begin_inset Quotes eld
176 \begin_inset Quotes erd
179 or tried to put three blank lines between paragraphs.
180 You found out you could not and, in fact, you will find out that most of
181 the little tricks you are accustomed to use in word processors will not
182 work in \SpecialChar LyX
184 That is because most word processors you have used before allow you manually
185 to enter all spacings, font changes, and so on.
186 So you end up not only writing a document but typesetting it, too.
188 does the typesetting for you, in a consistent fashion, letting you focus
189 on the important things, like the content of your writing.
192 \begin_layout Standard
193 So read on to learn more about \SpecialChar LyX
195 Reading this tutorial is definitely worth the time.
198 \begin_layout Section
208 \begin_layout Standard
209 Before we get started with this section, you need to know that this
213 uses the notation outlined in the
218 If you came to this manual first, please read the
222 before you continue with the
229 \begin_layout Standard
230 Now that you know which fonts mean what in the documentation, we want to
231 talk a bit about what this
238 \begin_layout Subsection
239 Getting the most out of the Tutorial
242 \begin_layout Standard
243 This tutorial consists of examples and exercises.
244 To get the most out of this document, you should read through it, typing
245 all the little things we are telling you to type and trying out all of
246 the exercises to see if you get them right.
247 For convenience, you might want to print out the PDF version of this document.
250 \begin_layout Standard
251 If you are familiar with \SpecialChar LaTeX
252 , you will probably be able to read the
256 somewhat faster, since many \SpecialChar LyX
257 ideas are just \SpecialChar LaTeX
259 However, \SpecialChar LyX
260 has features you will want to learn about.
261 Even if you do not feel like reading the rest of the
265 , you should definitely check out Section
270 \begin_inset CommandInset ref
272 reference "sec:latexusers"
276 , which is specifically written for experienced \SpecialChar LaTeX
280 \begin_layout Subsection
288 \begin_layout Itemize
289 Detailed explanations of all of \SpecialChar LyX
294 \begin_layout Standard
303 \begin_layout Itemize
304 Detailed explanations of \SpecialChar LaTeX
309 \begin_layout Standard
311 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
314 can have a look at the
326 \begin_layout Standard
327 It is time to move on, time for your first document \SpecialChar ldots
331 \begin_layout Chapter
332 Getting started with \SpecialChar LyX
336 \begin_layout Section
337 Your first \SpecialChar LyX
341 \begin_layout Standard
342 OK\SpecialChar endofsentence
343 You are ready to start writing.
344 Before you do, there are a few things we need to mention, which will hopefully
345 make the Tutorial more instructive and useful.
349 \begin_layout Standard
350 Because there is information we cannot give you in the Tutorial, the
356 thing that you need to do is find the
363 Start up \SpecialChar LyX
373 You may want to load the
377 as well (if you are not reading it within \SpecialChar LyX
379 This way, you can read them while you are writing your own file.
383 \begin_layout Plain Layout
384 They can also serve as good examples of how to use the many features of
391 Note that once you have got more than one document open, you can use the
396 menu or the document tabs to switch between them.
399 \begin_layout Standard
400 In this Tutorial, we are going to assume that you have a fully working version
402 , as well as a \SpecialChar LaTeX
403 -distribution and a PDF-viewer.
404 This should be the case on all major Linux- and BSD-distributions, as well
405 as on Windows, where this is setup by the \SpecialChar LyX
409 \begin_layout Standard
410 Finally, we have written a file called
411 \change_deleted -712698321 1553351112
415 \change_inserted -712698321 1553351120
423 to let you practice your \SpecialChar LyX
425 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
428 As you learn new \SpecialChar LyX
429 functions, we will suggest that you fix those parts of
431 \change_deleted -712698321 1553351165
435 \change_inserted -712698321 1553351165
445 \begin_inset Quotes els
449 \begin_inset Quotes ers
452 hints about how to fix things.
456 \begin_layout Plain Layout
457 The hints are located in yellow
458 \begin_inset Quotes eld
462 \begin_inset Quotes erd
466 Access the text in a note by clicking on it.
471 If you want to cheat, or check what you have done, there is also a file
473 \change_deleted -712698321 1553351273
477 \change_inserted -712698321 1553351278
485 which contains the same text written and typeset by a \SpecialChar LyX
489 \begin_layout Standard
490 The example files can be found in
491 \change_inserted -712698321 1553351405
493 \begin_inset Quotes eld
497 \begin_inset Quotes erd
502 File\SpecialChar menuseparator
503 Open Example\SpecialChar ldots
505 \change_deleted -712698321 1553351425
512 directory of \SpecialChar LyX
513 's installation folder
517 \change_deleted -712698321 1553351441
521 \change_inserted -712698321 1553351441
531 File\SpecialChar menuseparator
538 to save a copy in your own directory for you to work on.
539 As you fix parts of the raw document, check to see how those changes affect
543 \begin_layout Standard
545 \change_deleted -712698321 1553351473
551 \change_inserted -712698321 1553351473
554 File\SpecialChar menuseparator
555 Open Example\SpecialChar ldots
560 contains lots of other examples files.
561 They will show you how to do various fancy things with \SpecialChar LyX
563 After you have read the Tutorial, or when you are confused about how to
564 do something fancy in \SpecialChar LyX
565 , take a look at these files.
568 \begin_layout Subsection
569 Typing, Viewing, and Exporting
572 \begin_layout Itemize
575 File\SpecialChar menuseparator
579 \begin_layout Itemize
580 Type a sentence like:
582 This is my first \SpecialChar LyX
586 \begin_layout Itemize
587 Save your document with
589 File\SpecialChar menuseparator
594 As\SpecialChar endofsentence
598 \begin_layout Itemize
599 Create a PDF file, with
601 Document\SpecialChar menuseparator
604 or the toolbar button
612 will open a PDF-viewer program displaying your document as it will look
616 \begin_layout Itemize
617 Export the ready to print document with
619 File\SpecialChar menuseparator
627 \begin_layout Standard
628 Congratulations! You have written your first \SpecialChar LyX
630 All of the rest is just details.
631 \begin_inset Newline newline
637 \begin_layout Standard
642 You can save time by leaving the PDF viewer running in the background.
643 Under MacOS and Linux you can use
645 Document\SpecialChar menuseparator
648 or the toolbar button
654 and just click on the PDF viewer window afterwards.
655 Under Windows still use
657 Document\SpecialChar menuseparator
669 \begin_layout Standard
674 In case you are using a high-resolution display, the LyX toolbar icons
676 To change their size, right-click into a toolbar.
679 \begin_layout Subsection
683 \begin_layout Standard
685 can of course do most of the things you are used to doing with a word processor.
686 It will word-wrap and indent paragraphs automatically.
687 Here is a quick description of how to do some simple actions.
690 \begin_layout Description
691 Undo \SpecialChar LyX
692 has multiple levels of undo, which means you can undo everything you
693 have done since your current editing session started, by selecting
695 Edit\SpecialChar menuseparator
704 ) over and over again.
705 If you undo too much, just select
707 Edit\SpecialChar menuseparator
720 \begin_layout Standard
721 Currently, undo is limited to 100 steps.
725 \begin_layout Description
728 Edit\SpecialChar menuseparator
739 Edit\SpecialChar menuseparator
750 Edit\SpecialChar menuseparator
759 ) to cut, copy, and paste.
760 Or automatically paste selected text (including selections from other programs)
768 \begin_layout Description
771 Edit\SpecialChar menuseparator
785 arg "dialog-show findreplace"
789 In the dialog, search with the
801 button to replace a word you have found.
805 \begin_layout Plain Layout
806 Close the window when you are done or leave it open if you find it more
808 Most dialog boxes in \SpecialChar LyX
809 can operate like this.
810 Just be sure you have the right window in focus when you are trying to
811 type in the main \SpecialChar LyX
812 window or a \SpecialChar LyX
818 If you like, you can specify whether to make the search case-sensitive,
819 or to search for only complete words; you can also search backwards through
823 \begin_layout Description
838 , which will by default print characters in italics), set it in
848 , usually small caps, used for people's names), or use your own formatting
851 Edit\SpecialChar menuseparator
856 Style\SpecialChar menuseparator
859 dialog (toolbar button
862 arg "dialog-show character"
868 \begin_layout Description
869 Toolbar Other buttons on the toolbar allow you to do some of the more popular
897 \begin_layout Standard
898 Of course, you have not yet written enough to make most of these functions
900 As you write more, though, try undoing, pasting, etc.
903 \begin_layout Subsection
904 WYSIWYM: Whitespace in \SpecialChar LyX
908 \begin_layout Standard
909 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
912 As many times as you hit
916 , you will only get one blank line.
917 As many times as you hit
921 , you will only get one space.
922 On a blank line, \SpecialChar LyX
923 will not let you type even one space.
928 key will not move you forward one tab stop; in fact there
932 no tab stops! There is no ruler at the top of the page to let you set tabs
936 \begin_layout Standard
937 Many word processors are based on the WYSIWYG principle:
938 \begin_inset Quotes eld
941 What You See Is What You Get.
942 \begin_inset Quotes erd
946 , on the other hand, is based on the principle that
947 \begin_inset Quotes eld
950 What You See Is What You
955 \begin_inset Quotes erd
958 You type what you mean and \SpecialChar LyX
959 will take care of typesetting it for you so
960 that the output looks nice.
965 grammatically separates paragraphs and a
969 grammatically separates words; so there is no reason to have several of
974 has no grammatical function at all – so \SpecialChar LyX
976 Using \SpecialChar LyX
977 , you will spend more of your time worrying about the
981 of your document and less time worrying about the
990 for more information on the WYSIWYM concept.
993 \begin_layout Standard
995 does have (many) ways to fine-tune the formatting of your document.
996 After all, \SpecialChar LyX
1006 has information about all that.
1007 It includes horizontal fills and vertical space — which are more powerful
1008 and versatile than multiple spaces or blank lines — and ways to change
1009 font sizes, character styles, and paragraph alignments by hand.
1010 The idea, though, is that you can write your whole document, focusing on
1011 content, and just worry about that fine-tuning at the end.
1012 With standard word processors, you will be distracted by document formatting
1013 throughout the writing process.
1016 \begin_layout Section
1020 \begin_layout Standard
1021 Different parts of a document have different purposes; we call these parts
1027 Most of a document is made up of regular text.
1028 Section titles (chapter, subsection, etc.) let the reader know that a new
1029 topic or subtopic will be discussed.
1030 Certain types of documents have special environments.
1031 A journal article will have an abstract and a title.
1032 A letter will have neither of these, but will probably have an environment
1033 that gives the writer's address.
1036 \begin_layout Standard
1037 Environments are a major part of the
1038 \begin_inset Quotes eld
1041 What You See Is What You Mean
1042 \begin_inset Quotes erd
1045 philosophy of \SpecialChar LyX
1047 A given environment may require a certain font style, font size, indenting,
1048 line spacing, and more.
1049 This problem is aggravated, because the exact formatting for a given environmen
1050 t may change: one journal may use boldface, 18 point, centered type for
1051 section titles while another uses italicized, 15 point, left justified
1052 type; different languages may have different standards for indenting; and
1053 bibliography formats can vary widely.
1055 lets you avoid learning all the different formatting styles.
1058 \begin_layout Standard
1063 choice box is located on the left end of the toolbar and looks like this:
1065 \begin_inset Graphics
1066 filename clipart/ToolbarEnvBox.png
1073 It indicates in which environment you are currently writing.
1074 While you were writing your first document, it said
1075 \begin_inset Quotes eld
1079 \begin_inset Quotes erd
1082 which is the default environment for text.
1083 Now you will put a number of environments in your new document so that
1084 you can see how they work.
1087 \begin_layout Subsection
1088 Sections and Subsections
1091 \begin_layout Standard
1096 on the first line of your new \SpecialChar LyX
1109 \begin_layout Plain Layout
1115 If nothing is selected, \SpecialChar LyX
1116 changes the paragraph you are currently in to
1117 the selected environment.
1118 Alternatively, you can change several paragraphs to a different environment
1119 by selecting them before picking an environment.
1136 , which will be covered below.
1139 \begin_inset Quotes eld
1143 \begin_inset Quotes erd
1146 and typesets the section heading (title) in a larger font.
1151 \SpecialChar endofsentence
1157 \begin_inset Quotes eld
1161 \begin_inset Quotes erd
1165 \begin_inset Quotes eld
1169 \begin_inset Quotes erd
1173 Section headings, like most environments, are assumed to end when you type
1178 \SpecialChar endofsentence
1179 Type the document introduction:
1182 \begin_layout LyX-Code
1183 This is an introduction to my first \SpecialChar LyX
1187 \begin_layout Standard
1203 \begin_inset Quotes eld
1207 \begin_inset Quotes erd
1210 and waits for you to type a title.
1212 \begin_inset Quotes eld
1218 \begin_inset space ~
1224 \begin_inset Quotes erd
1227 , and you will see that \SpecialChar LyX
1228 again sets it as a section title.
1231 \begin_layout Standard
1233 Go to the end of Section
1234 \begin_inset space ~
1238 \begin_inset Quotes eld
1241 my first \SpecialChar LyX
1243 \begin_inset Quotes erd
1259 Again, \SpecialChar LyX
1261 \begin_inset Quotes eld
1265 \begin_inset Quotes erd
1268 and waits for you to type a title.
1275 \begin_inset space ~
1279 \begin_inset Quotes eld
1283 \begin_inset Quotes erd
1287 \begin_inset space ~
1290 2, has been automatically renumbered to Section
1291 \begin_inset space ~
1294 3! In true WYSIWYM fashion, you just need to identify the text that makes
1295 up the section titles, and \SpecialChar LyX
1296 takes care of numbering the sections and typesettin
1300 \begin_layout Standard
1309 environment, and type the following five lines:
1312 \begin_layout LyX-Code
1313 Sections and subsections are described below.
1316 \begin_layout LyX-Code
1320 \begin_layout LyX-Code
1321 Sections are bigger than subsections.
1324 \begin_layout LyX-Code
1325 Subsection description
1328 \begin_layout LyX-Code
1329 Subsections are smaller than sections.
1332 \begin_layout Standard
1333 Click on the second line and select
1343 numbers the subsection
1344 \begin_inset Quotes eld
1348 \begin_inset Quotes erd
1351 , and typesets it in a font which is bigger than regular text but smaller
1352 than the section title.
1353 Change the fourth line to the
1357 environment as well.
1358 As you probably expected, \SpecialChar LyX
1359 automatically numbered the section
1360 \begin_inset Quotes eld
1364 \begin_inset Quotes erd
1368 If you put yet another section before Section
1369 \begin_inset space ~
1373 \begin_inset space ~
1376 2 will be renumbered as Section 3, and the subsections will be renumbered
1378 \begin_inset Quotes eld
1382 \begin_inset Quotes erd
1386 \begin_inset Quotes eld
1390 \begin_inset Quotes erd
1396 \begin_layout Standard
1397 Further levels of sectioning include
1410 We will let you play with these on your own.
1411 You may notice that paragraph and subparagraph headings are not numbered
1412 by default, and that subparagraphs are indented; see the
1416 for an explanation and how to change this.
1421 headings are actually the highest level of sectioning, above
1425 s, but you are only allowed to use them in certain types (text classes)
1427 documents (see Section
1428 \begin_inset space ~
1432 \begin_inset CommandInset ref
1434 reference "sec:Document-Classes"
1441 \begin_layout Standard
1442 Finally, you may want to have sections or subsections that are not numbered.
1443 There are environments for this as well.
1444 If you change one of your section headings to the
1448 environment (you may have to scroll down in the
1452 box to find it), \SpecialChar LyX
1453 will use the same font size for the heading as it uses
1454 for a regular section, but it will not number that section.
1455 There are corresponding
1456 \begin_inset Quotes eld
1460 \begin_inset Quotes erd
1463 heading environments for
1472 Try changing some of your sections or subsections to the starred environments,
1473 and note how the other section numbers are updated.
1476 \begin_layout Labeling
1477 \labelwidthstring 00.00.0000
1482 : Fix the section and subsection headings in
1483 \change_inserted -712698321 1553351516
1487 \change_deleted -712698321 1553351522
1491 \begin_inset Newline newline
1504 \begin_layout Subsection
1508 \begin_layout Standard
1510 has several different environments for typesetting lists.
1511 The various list environments free you from hitting
1515 a million times when writing an outline, or from renumbering a whole list
1516 when you want to add a point in the middle of the list.
1517 Different types of documents logically require different list environments:
1520 \begin_layout Itemize
1521 A slide presentation might use the
1525 environment's bulleted lists to describe different points.
1528 \begin_layout Itemize
1529 An outline would use the
1533 environment's numbered lists (and lettered sublists).
1536 \begin_layout Itemize
1537 A document describing several software packages could use the
1541 environment, where each item in the list begins with a bold-faced word.
1544 \begin_layout Itemize
1553 ) environment is a variation on the
1560 \begin_layout Standard
1561 Let us write a list of reasons why \SpecialChar LyX
1562 is better than other word processors.
1563 Somewhere in your document, type:
1566 \begin_layout Standard
1570 is better than other word processors because:
1573 \begin_layout Standard
1590 arg "layout-toggle Itemize"
1596 \begin_inset Quotes eld
1600 \begin_inset Quotes erd
1604 Type in your reasons:
1607 \begin_layout LyX-Code
1608 Typesetting is done for you.
1611 \begin_layout LyX-Code
1615 \begin_layout LyX-Code
1616 Lists are very easy to create!
1619 \begin_layout Standard
1620 List environments, unlike headings, do not end when you type
1625 Instead, \SpecialChar LyX
1626 assumes you are going on to the next item in the list.
1627 The above will therefore result in a three-item list.
1628 If you want more than one paragraph within one list
1632 , one way is to use the
1635 \begin_inset space ~
1640 , which you get by typing
1645 In order to get out of the list, you need to reselect the
1649 environment (or just use the key binding
1652 arg "layout Standard"
1658 \begin_layout Standard
1659 You now have a beautiful itemized list.
1660 You might want to run \SpecialChar LaTeX
1661 to see how the list looks when printed out.
1662 But what if you wanted to number the reasons? Well, just select the whole
1667 \begin_layout Plain Layout
1669 will not let you select the first bullet (or the actual number in a numbered
1670 section title) unless you also select the paragraph
1674 it, which you probably do not want to do.
1675 This is on purpose because the bullet or number depends on the document
1676 settings or text position, respectively.
1692 arg "layout-toggle Enumerate"
1696 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1697 will fix the numbering.
1700 \begin_layout Standard
1701 While the list is still selected, you can change to the other two list environme
1709 \begin_inset space \thinspace{}
1715 \begin_inset space \thinspace{}
1725 arg "layout-toggle Description"
1731 arg "layout-toggle List"
1734 ), in order to see what they look like.
1735 For those two environments, each list item is made up of a term, which
1736 is the item's first word, followed by a definition, which is the rest of
1737 the paragraph (until you hit
1742 The term is either typeset in boldface (
1747 \begin_inset Quotes eld
1751 \begin_inset Quotes erd
1758 \begin_layout Plain Layout
1759 But a typesetter's tab, which will change to fit the size of the largest
1760 term, not a pathetic, rigid, unchangeable typewriter
1773 ) from the rest of the paragraph.
1774 If you want to have more than one word in the definition, then separate
1778 \begin_inset space ~
1786 \begin_layout Labeling
1787 \labelwidthstring 00.00.0000
1792 : Typeset the list in
1793 \change_deleted -712698321 1553351539
1797 \change_inserted -712698321 1553351539
1806 \begin_layout Standard
1807 You can nest lists within each other in all sorts of interesting ways.
1808 An obvious example would be writing outlines.
1809 Numbered and bulleted lists will have different numbering and bulleting
1810 schemes for sublists.
1815 for details on the different sorts of lists and for examples of nestings.
1818 \begin_layout Subsection
1819 Other environments: Verses, Quotations, and more
1822 \begin_layout Standard
1823 There are two environments for setting quotations apart from surrounding
1828 for short quotes and
1842 \begin_layout Plain Layout
1843 used in this Tutorial for the long typing examples
1852 font; this environment is the only place in \SpecialChar LyX
1853 where you are allowed to use
1854 multiple spaces to allow code indenting.
1855 You can even write poetry using the
1863 to separate stanzas, and
1867 to separate lines within a stanza.
1872 for more complete descriptions of all of the available \SpecialChar LyX
1876 \begin_layout Labeling
1877 \labelwidthstring 00.00.0000
1882 : Correctly typeset the
1884 Quote, \SpecialChar LyX
1892 \change_inserted -712698321 1553351552
1896 \change_deleted -712698321 1553351554
1900 \begin_inset Newline newline
1910 \begin_layout Chapter
1914 \begin_layout Standard
1915 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1917 It introduced you to the basic editing operations in \SpecialChar LyX
1918 , as well as the powerful
1919 method of writing with environments.
1920 Most people who use \SpecialChar LyX
1921 , though, will want to write documents: papers, articles,
1922 books, manuals, or letters.
1923 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1925 a complete document.
1926 It will introduce you to text classes, which allow you to write different
1928 It will then describe many of the additions that turn text into a document,
1929 such as titles, footnotes, cross references, bibliographies, and tables
1933 \begin_layout Section
1935 \begin_inset CommandInset label
1937 name "sec:Document-Classes"
1944 \begin_layout Standard
1945 Different sorts of documents should be typeset differently.
1946 For example, books are generally printed double-sided, while articles are
1948 In addition, many documents contain special environments: letters contain
1949 some environments — such as the sender's address and the signature — which
1950 do not make sense in a book or article.
1951 The \SpecialChar LyX
1960 \begin_layout Plain Layout
1961 for \SpecialChar LaTeX
1962 users: this is equivalent to the \SpecialChar LaTeX
1968 takes care of these large scale differences between different sorts of
1970 This Tutorial, for example, was written in the
1975 Document classes are another major part of the WYSIWYM philosophy; they
1976 tell \SpecialChar LyX
1977 how to typeset the document, so you do not need to know how.
1980 \begin_layout Standard
1981 Your document is probably being written in the
1989 \begin_layout Plain Layout
1990 That is usually the default document class
1995 Try changing to other document classes (using the
1997 Document\SpecialChar menuseparator
2000 dialog) to see how they are typeset differently.
2001 If you change your document to the
2005 document class and look at the
2009 box, you will see that most of the allowed environments are the same.
2010 However, you can now use the
2015 If you are ever unsure about which environments you can use in a given
2016 document class, just consult the
2023 \begin_layout Standard
2024 Font sizes, one- or two-column printing, and page headings are just some
2025 of the ways journals' typesettings differ from one another.
2026 As the Computer Age continues to mature, journals have begun accepting
2027 electronic submissions, creating \SpecialChar LaTeX
2029 \begin_inset Quotes eld
2033 \begin_inset Quotes erd
2036 so that authors can submit correctly typeset articles.
2038 is set up to support this as well.
2039 For example, \SpecialChar LyX
2040 supports typesetting (and extra environments) for the American
2041 Mathematics Society journals using the
2044 \begin_inset space ~
2052 \begin_layout Standard
2053 Here is a very quick reference to some of the document classes.
2056 Special Document Classes
2062 manual for many more details.
2065 \begin_layout Standard
2067 \begin_inset Tabular
2068 <lyxtabular version="3" rows="7" columns="2">
2069 <features tabularvalignment="middle">
2070 <column alignment="center" valignment="top" width="0pt">
2071 <column alignment="center" valignment="top" width="0pt">
2073 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2076 \begin_layout Plain Layout
2082 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2085 \begin_layout Plain Layout
2093 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2096 \begin_layout Plain Layout
2102 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2105 \begin_layout Plain Layout
2106 one-sided, no chapters
2113 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2116 \begin_layout Plain Layout
2122 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2125 \begin_layout Plain Layout
2126 layout & environments for American Math Society
2133 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2136 \begin_layout Plain Layout
2142 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2145 \begin_layout Plain Layout
2146 longer than article, two-sided
2153 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2156 \begin_layout Plain Layout
2162 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2165 \begin_layout Plain Layout
2166 report + front and back matter
2173 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2176 \begin_layout Plain Layout
2182 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2185 \begin_layout Plain Layout
2193 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2196 \begin_layout Plain Layout
2202 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2205 \begin_layout Plain Layout
2206 lots of extra environments for address, signature\SpecialChar ldots
2220 \begin_layout Section
2221 Templates: Writing a Letter
2224 \begin_layout Standard
2225 One way to write a letter would be to open a new file, and choose a
2231 Document\SpecialChar menuseparator
2235 While this is the most obvious way to write a letter, it seems like extra
2237 Every time you write a business letter, you want to have your address,
2238 the address to which you are sending it, a body, a signature, etc.
2244 for letters, which contains a sample letter; once you have a template,
2245 you can just replace a couple of parts of the letter with your text each
2246 time you write a letter.
2249 \begin_layout Standard
2250 Open a new file with
2252 File\SpecialChar menuseparator
2254 \begin_inset space ~
2258 \begin_inset space ~
2262 \change_inserted -712698321 1553351676
2270 \change_deleted -712698321 1553351662
2274 \change_inserted -712698321 1553351666
2278 Letter (Standard Class)
2283 Save and print the file to see how the various environments are typeset.
2286 \begin_layout Standard
2287 When you look at the
2291 box, you will see several environments, like the
2294 \begin_inset space ~
2299 environment, that do not exist in most other document classes.
2305 You can play around for a while to figure out how the various environments
2307 You will notice for example that the
2311 environment has the word
2312 \begin_inset Quotes eld
2316 \begin_inset Quotes erd
2319 in red before the actual text of the signature.
2320 This word does not show up in the actual letter, as you will see if you
2321 view/export the file.
2322 It is just there to let you know where the signature goes.
2323 Also, note that it does not matter where in the file the
2328 Remember, \SpecialChar LyX
2329 is WYSIWYM; you can put the
2333 environment anywhere you want, but \SpecialChar LyX
2334 knows that in the printout, the signature
2335 should be at the end.
2338 \begin_layout Standard
2339 A template is just a regular \SpecialChar LyX
2341 This means you can fill in your address and signature and save the file
2343 From now on, any time you want to write a letter, you can use the new template
2345 We do not have to suggest an actual
2346 \begin_inset Quotes eld
2350 \begin_inset Quotes erd
2353 here; just write a letter to someone!
2357 \begin_layout Plain Layout
2358 One warning, if you are writing from a template.
2359 If you erase all of the text in an environment — for example, if you erase
2363 \begin_inset space ~
2368 field so that you can replace it with your own — and then you move the
2369 cursor without writing any text, the environment may disappear.
2370 This is because most environments cannot exist without any text in them.
2371 Just reselect the environment from the
2383 \begin_layout Standard
2384 Templates can be a huge time-saver, and we urge you to use them whenever
2386 In addition, they can help a person learn how to use some of the fancier
2388 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2390 of less computer-aware users.
2391 When they are first learning \SpecialChar LyX
2392 , it will be less intimidating if they have
2393 a letter template customized for their company, for example.
2396 \begin_layout Standard
2397 \begin_inset Newpage newpage
2403 \begin_layout Section
2407 \begin_layout Standard
2409 (like \SpecialChar LaTeX
2410 ) considers the title — which may contain the actual title, the author,
2411 the date, and even an abstract of a paper — to be a separate part of the
2415 \begin_layout Standard
2416 Go back to your first \SpecialChar LyX
2417 document and make sure it is using the
2425 \begin_layout Plain Layout
2426 You should not be using the letter any more, since the
2430 document class does not allow titles.
2435 Type a title on the first line, and change the line to the
2440 On the next line, type your name and change it to the
2445 On the next line, write the date in the
2450 Type a paragraph or two summarizing your document using the
2455 Notice how the title is presented when it is printed out.
2456 If you change the document format to Book, you will get a separate title
2457 page, like the first page of this tutorial.
2460 \begin_layout Labeling
2461 \labelwidthstring 00.00.0000
2466 : Fix the title, date, and author in
2467 \change_deleted -712698321 1553351568
2471 \change_inserted -712698321 1553351568
2480 \begin_layout Section
2481 Labels and Cross-References
2484 \begin_layout Standard
2485 You can label section headings, list items, formulas, footnotes, and floats
2489 \begin_layout Plain Layout
2490 Floats are explained in the
2504 Once you do so, you can refer to the element in other parts of the document,
2505 using cross-references.
2506 You can refer to a section's number, to the page on which the section begins
2508 As with section numbering, \SpecialChar LyX
2509 also takes care of cross-reference numbering
2511 Automatic management of labels and cross-references is among the most significa
2512 nt advantages of \SpecialChar LyX
2513 (and \SpecialChar LaTeX
2514 ) over conventional word processors.
2517 \begin_layout Subsection
2521 \begin_layout Standard
2522 Go to our second section, whose title is
2523 \begin_inset Quotes eld
2527 \begin_inset Quotes erd
2531 Click at the end of the section title line, and select
2533 Insert\SpecialChar menuseparator
2536 or the toolbar button
2543 A dialog asks you for a label name, and gives you a suggestion.
2548 , the label name will be placed in a box next to the section title.
2551 \begin_layout Standard
2552 So far you have not done anything — the output will look exactly the same,
2553 since labels do not show up in the printed document.
2554 However, now that you have added a label, you can refer to that label with
2556 We will do that next.
2559 \begin_layout Subsection
2560 Your first cross-reference
2563 \begin_layout Standard
2564 Place the cursor somewhere in Section
2565 \begin_inset space ~
2572 \begin_layout LyX-Code
2573 If you want to know more about this document,
2574 \begin_inset Newline newline
2580 \begin_layout Standard
2581 Now, with the cursor before the final period, select
2583 Insert\SpecialChar menuseparator
2585 \begin_inset space ~
2590 or the toolbar button
2593 arg "dialog-show-new-inset ref"
2597 The Cross-reference dialog pops up.
2598 It shows a list of the possible labels you can reference.
2599 At the moment, there should be only one,
2600 \begin_inset Quotes eld
2603 sec:About-This-Document
2604 \begin_inset Quotes erd
2608 First, select the drop-down menu labeled
2609 \begin_inset Quotes eld
2613 \begin_inset Quotes erd
2617 \begin_inset Quotes eld
2621 \begin_inset Quotes erd
2626 \begin_inset Quotes eld
2629 sec:About-This-Document
2630 \begin_inset Quotes erd
2633 (it may be selected by default), and a reference marker will appear containing
2635 \begin_inset Quotes eld
2638 Ref: sec:About-This-Document
2639 \begin_inset Quotes erd
2642 (To be really correct, you should put a
2645 \begin_inset space ~
2653 arg "command-alternatives math-space ; space-insert protected"
2656 ) in between the word
2657 \begin_inset Quotes eld
2661 \begin_inset Quotes erd
2664 and the reference.) An alternative way to reference a label is to right-click
2665 the label and select
2669 in the pop-up context menu.
2670 The cross-reference to this label is now in the clipboard and can be copied
2671 to the actual cursor position via the menu
2673 Edit\SpecialChar menuseparator
2683 In the printed document, this reference marker will be replaced with the
2685 Preview your document and you will see that \SpecialChar LaTeX
2686 has been even cleverer than
2689 \begin_inset Quotes eld
2693 \begin_inset Quotes erd
2699 \begin_layout Standard
2700 Conveniently, a cross-reference acts as a hyperlink when you are editing
2701 a document in \SpecialChar LyX
2702 ; clicking on it will pop up the
2709 \begin_inset space ~
2713 \begin_inset space ~
2718 will move the cursor to the referenced label.
2721 \begin_layout Subsection
2722 More fun with labels
2725 \begin_layout Standard
2726 We told you that \SpecialChar LyX
2727 takes care of numbering cross-references; now you can
2729 Add a new section before Section
2730 \begin_inset space ~
2734 Update the preview, and — voilà! — the section cross-reference changed
2736 \begin_inset Quotes eld
2740 \begin_inset Quotes erd
2743 ! Change the section
2744 \begin_inset Quotes eld
2748 \begin_inset Quotes erd
2751 to a subsection, and the cross-reference will reference Subsection
2752 \begin_inset space ~
2755 2.1 instead of Section
2756 \begin_inset space ~
2760 The page reference will not change unless you add a whole page of text
2761 before the label, of course.
2765 \begin_layout Standard
2766 If you want some more practice with labels, then try putting a new label
2767 where your first cross-reference was, and refer to that label from elsewhere
2769 If you will be inserting cross-references often, it may be convenient to
2777 \begin_layout Standard
2778 If you want to confirm that the cross-referencing gets the pages right even
2779 for larger documents,
2783 a couple pages of text from the
2787 to the clipboard, and
2791 them into your document.
2795 \begin_layout Plain Layout
2796 By the way, copying a chapter title may cause an error, because chapters
2797 are not allowed in the article class, see Section
2798 \begin_inset space ~
2802 \begin_inset CommandInset ref
2804 reference "sec:Document-Classes"
2809 If this happens, just delete the chapter title.
2817 \begin_layout Labeling
2818 \labelwidthstring 00.00.0000
2823 : Fix the references in
2824 \change_deleted -712698321 1553351573
2828 \change_inserted -712698321 1553351573
2837 \begin_layout Section
2838 Footnotes and Margin Notes
2841 \begin_layout Standard
2842 Footnotes can be added using the toolbar button
2845 arg "footnote-insert"
2850 Insert\SpecialChar menuseparator
2854 Click at the end of the word
2855 \begin_inset Quotes eld
2860 \begin_inset Quotes erd
2863 somewhere in your document and insert a footnote.
2864 A footnote box appears where you can enter the text of the footnote.
2866 should place the cursor at the beginning of the footnote box.
2870 \begin_layout LyX-Code
2872 is a typesetting word processor.
2875 \begin_layout Standard
2876 Now click on the button labeled
2877 \begin_inset Quotes eld
2881 \begin_inset Quotes erd
2885 The footnote box is closed, leaving the button showing where the footnote
2886 marker will be in the printed text; this is called
2887 \begin_inset Quotes eld
2891 \begin_inset Quotes erd
2895 You can unfold the footnote at any time and re-edit its text by clicking
2897 \begin_inset Quotes eld
2901 \begin_inset Quotes erd
2907 \begin_layout Standard
2908 A footnote can be cut and pasted like normal text.
2909 Go ahead; try it! All you need to do is select the footnote button
2913 \begin_layout Plain Layout
2914 It may be easier to select it using the keyboard.
2915 You might accidentally open the footnote if you are trying to select the
2916 marker itself with the mouse.
2930 In addition, you can change regular text to a footnote, by selecting it
2934 arg "footnote-insert"
2937 button; change a footnote to regular text by hitting the
2941 key when the cursor is in the first position of a footnote, or by hitting
2946 key when the cursor is in the very last position of the footnote.
2949 \begin_layout Standard
2950 Margin notes can be added using the menu
2952 Insert\SpecialChar menuseparator
2954 \begin_inset space ~
2959 or the toolbar button
2962 arg "marginalnote-insert"
2965 \SpecialChar endofsentence
2966 Margin notes are like footnotes, except that:
2969 \begin_layout Itemize
2970 the on-screen boxes say
2971 \begin_inset Quotes eld
2975 \begin_inset Quotes erd
2979 \begin_inset Quotes eld
2983 \begin_inset Quotes erd
2989 \begin_layout Itemize
2990 the notes will be placed in the margin, instead of below the text
2993 \begin_layout Itemize
2994 margin notes are not numbered
2997 \begin_layout Standard
2998 Change your \SpecialChar LyX
2999 footnote back to text, then select and change it to a margin
3001 Run \SpecialChar LaTeX
3002 again to see what the margin note looks like.
3005 \begin_layout Labeling
3006 \labelwidthstring 00.00.0000
3011 : Fix the footnote in
3012 \change_deleted -712698321 1553351579
3016 \change_inserted -712698321 1553351579
3025 \begin_layout Section
3027 \begin_inset CommandInset label
3029 name "sec:bibliographies"
3036 \begin_layout Standard
3037 Bibliographies are similar to cross-references.
3038 The bibliography contains a list of references at the end of the document,
3039 and they can be referenced from within the document.
3040 Like section titles, \SpecialChar LyX
3041 and \SpecialChar LaTeX
3042 make your job easier by automatically numbering
3043 the bibliography items and changing citations when the item numbers change.
3046 \begin_layout Standard
3047 Go to the end of the document and switch to the
3052 Now, each paragraph you type will be a reference.
3054 \begin_inset Quotes eld
3059 The Lyx Tutorial, by the \SpecialChar LyX
3063 \begin_inset Quotes erd
3066 as your first reference.
3067 Note that \SpecialChar LyX
3068 automatically puts a number in a box before each reference.
3069 Click on the boxed reference number, and the
3072 \begin_inset space ~
3082 is to refer to this reference within the \SpecialChar LyX
3092 is set (default), you will see the number of the bibliography in the output.
3098 \begin_inset Quotes eld
3102 \begin_inset Quotes erd
3105 to make it easy to remember.
3108 \begin_layout Standard
3109 Now pick somewhere in your document that you would like to insert a reference.
3112 Insert\SpecialChar menuseparator
3115 or the toolbar button
3118 arg "dialog-show-new-inset citation"
3127 The left panel in this dialog lists all the bibliography entries, and this
3128 field allows you to choose which bibliography item you want to cite.
3130 \begin_inset Quotes eld
3134 \begin_inset Quotes erd
3137 (right now, that is the only item in the bibliography), then use the
3141 button in the center to insert it.
3142 (You can have multiple citations in the same place by transferring a number
3147 \begin_layout Plain Layout
3148 If one uses label names for references that are easy to remember it is easier
3149 to find the entry in the list of references.
3159 Now preview your file and you will see that the citation appears in brackets
3160 in the text, referring to the bibliography at the end of the document.
3163 \begin_layout Standard
3167 \begin_inset space ~
3176 dialog will put a remark (such as a reference to a page or chapter within
3177 the referenced book or article) in the brackets after the reference.
3178 If you want the references to have labels instead of numbers in the printed
3179 output (for example, some journals would use
3180 \begin_inset Quotes eld
3184 \begin_inset Quotes erd
3187 to refer to a paper written by Smith in 1995), use the
3194 \begin_inset space ~
3207 \begin_layout Labeling
3208 \labelwidthstring 00.00.0000
3213 Fix the bibliography and citation in
3214 \change_deleted -712698321 1553351585
3218 \change_inserted -712698321 1553351585
3227 \begin_layout Section
3231 \begin_layout Standard
3232 You may want to put a table of contents at the beginning of your document.
3234 makes this easy to do.
3239 after your document title and before your first section title and select
3242 Insert\SpecialChar menuseparator
3244 \begin_inset space ~
3248 \begin_inset space ~
3252 \change_inserted -712698321 1590305779
3254 \begin_inset space \thinspace{}
3258 \begin_inset space \thinspace{}
3263 \SpecialChar menuseparator
3265 \begin_inset space ~
3269 \begin_inset space ~
3276 \begin_inset Quotes eld
3280 \begin_inset Quotes erd
3283 will appear in a button on the first line of the document.
3287 \begin_layout Standard
3288 This may not appear to be very useful.
3289 However, if you look at your preview, you will see that a table of contents
3290 has been generated, listing the various sections and subsections in your
3292 As usual, if you reorder sections or create new ones, you will see those
3293 changes in the preview when you update it.
3297 \begin_layout Standard
3298 The table of contents is not printed in the on-screen version of the document.
3299 But you can display the table of contents in a separate window by clicking
3300 on the table of contents button, or by using
3302 View\SpecialChar menuseparator
3304 \begin_inset space ~
3309 or the toolbar button
3312 arg "dialog-toggle toc"
3316 This menu will work even if you do not have a table of contents inset in
3318 This is a very useful tool for rearranging your document parts.
3319 Clicking on a (sub)section title in the
3323 window will highlight that line and move the display (in the \SpecialChar LyX
3325 to that place in the document.
3326 You can also use the arrow keys to move up and down in the table of contents.
3327 You may therefore find it convenient to leave this window open throughout
3329 You can get similar functionality from the
3333 menu, though, where the table of contents appears automatically.
3336 \begin_layout Standard
3337 To get rid of the Table of Contents, you can delete the table of contents
3338 button just like any other text.
3341 \begin_layout Labeling
3342 \labelwidthstring 00.00.0000
3347 : Fix the table of contents in
3348 \change_deleted -712698321 1553351589
3352 \change_inserted -712698321 1553351589
3361 \begin_layout Chapter
3365 \begin_layout Standard
3367 is used by many scientists because it outputs great looking equations,
3368 avoiding the control characters used by word processors and their equation
3370 Many of these scientists are frustrated, however, because writing equations
3371 in \SpecialChar LaTeX
3372 is more like programming than writing.
3373 Happily, \SpecialChar LyX
3374 has WYSIWYM support for equations.
3375 If you are used to \SpecialChar LaTeX
3376 , you will find that all of the usual \SpecialChar LaTeX
3378 can be typed in normally, but they will show up in a WYSIWYM fashion.
3379 If, on the other hand, you have never written in \SpecialChar LaTeX
3384 toolbar will allow you to write professional-looking math quickly and easily.
3387 \begin_layout Section
3391 \begin_layout Standard
3392 Somewhere in your \SpecialChar LyX
3396 \begin_layout LyX-Code
3397 I like what Einstein said, E=mc^2, because it is
3398 \begin_inset Newline linebreak
3404 \begin_layout Standard
3405 Now, that equation does not look very good in \SpecialChar LyX
3406 and in the output; there
3407 is no space between the letters and the equals sign, and you would like
3408 to write an actual superscript for the
3409 \begin_inset Quotes eld
3413 \begin_inset Quotes erd
3417 That bad typesetting happened because we did not tell \SpecialChar LyX
3418 that we were writing
3419 a mathematical expression, so it typeset the equation like regular old
3423 \begin_layout Standard
3424 But we can create a formula that will be typeset properly.
3425 Highlight the equation and click the toolbar button
3433 Insert\SpecialChar menuseparator
3434 Math\SpecialChar menuseparator
3436 \begin_inset space ~
3442 If nothing is highlighted \SpecialChar LyX
3443 inserts a little blue square, which is an empty
3445 The expression appears in blue and the blue square disappears as soon as
3446 the formula is not empty.
3451 to leave the equation.
3452 The purple markers disappear, leaving the cursor to the right of the expression.
3453 Now, if you type something, it will be regular text.
3456 \begin_layout Standard
3457 Looking at the output you will notice that the expression was typeset nicely,
3458 with spaces between the letters and the equals sign, and a superscript
3460 \begin_inset Quotes eld
3464 \begin_inset Quotes erd
3468 Letters in math mode are assumed to be variables, and come out in italics.
3469 Numbers are just numbers.
3472 \begin_layout Standard
3473 This math editor is another example of the WYSIWYM philosophy.
3474 In \SpecialChar LaTeX
3475 , you write a mathematical expression using text and commands like
3481 ; this can be frustrating, because you cannot see what an expression looks
3482 like until you run the file under \SpecialChar LaTeX
3483 and you may have to spend time, for
3484 example, finding missing brackets.
3486 does not attempt to get the expression to look perfect (WYSIWYG), but
3487 it gives you an extremely good idea of what the expression will look like.
3489 then takes care of the professional typesetting.
3492 \begin_layout Section
3493 Navigating an Equation
3496 \begin_layout Standard
3498 \begin_inset Formula $E=mc^{2}$
3502 \begin_inset Formula $E=1+mc^{2}$
3506 Use the arrow keys to move the cursor into the expression.
3507 Note that when you enter the expression, the purple markers appear to let
3508 you know you are editing math.
3517 to move the cursor past the equals sign, and just type
3518 \begin_inset Quotes eld
3522 \begin_inset Quotes erd
3526 Again, you can use the arrow keys or
3530 to leave the formula\SpecialChar endofsentence
3534 \begin_layout Standard
3535 Other than the special keys described below, typing in math mode is like
3536 editing regular text.
3546 Select text either with the arrow keys or with the mouse.
3549 Edit\SpecialChar menuseparator
3552 works in math mode as well as cut and paste.
3553 One thing to be careful of: if you are left or right outside a formula
3562 respectively, you delete the whole formula.
3563 Luckily, you can just use
3570 \begin_layout Standard
3571 What if you want to change
3572 \begin_inset Formula $E=mc^{2}$
3576 \begin_inset Formula $E=mc^{2.5}+1$
3579 ? Again, you can use the mouse to click in the right place.
3580 However, you can also use the arrow keys.
3581 If the cursor is just after the
3582 \begin_inset Quotes eld
3586 \begin_inset Quotes erd
3590 \begin_inset Quotes eld
3594 \begin_inset Quotes erd
3601 and the cursor is moved to the level of the superscript, just before the
3603 \begin_inset Quotes eld
3607 \begin_inset Quotes erd
3612 \begin_inset Quotes eld
3616 \begin_inset Quotes erd
3624 will move the cursor back to the regular level.
3633 , the cursor will be placed
3637 the superscript (so that you can then type the
3638 \begin_inset Quotes eld
3642 \begin_inset Quotes erd
3648 \begin_layout Section
3649 Exponents and Indices
3652 \begin_layout Standard
3653 An exponent can be entered from the
3657 toolbar (see below), but it is actually simpler just to type the caret
3659 \begin_inset Quotes eld
3663 \begin_inset Quotes erd
3668 will place another blue rectangle in the superscript, so that whatever
3669 you write next will be superscripted, and in a smaller font size.
3670 Everything you type until you hit a
3678 to exit the formula entirely) will be in the superscript.
3681 \begin_layout Standard
3682 Writing a subscript (index) is just as easy; start one by typing the underscore
3684 \begin_inset Quotes eld
3688 \begin_inset Quotes erd
3692 You can subscript and superscript both subscripts and superscripts like
3694 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3701 \begin_layout Labeling
3702 \labelwidthstring 00.00.0000
3708 \begin_inset space ~
3712 \change_deleted -712698321 1553351597
3716 \change_inserted -712698321 1553351597
3727 \begin_layout Section
3731 \begin_layout Standard
3736 toolbar is a convenient way to enter symbols and/or to perform complicated
3738 Many of these operations can be accomplished from the keyboard or the
3740 Insert\SpecialChar menuseparator
3745 Edit\SpecialChar menuseparator
3748 menus (the latter only appears when you are in Math mode).
3749 However, we are going to concentrate on using the
3753 toolbar, just to let you know what is out there; you can learn keyboard
3754 shortcuts and commands later from the
3761 \begin_layout Standard
3766 toolbar is shown when the cursor is in a formula and can also be turned
3767 on manually in the menu
3769 View\SpecialChar menuseparator
3773 When you click there on
3774 \begin_inset Quotes eld
3778 \begin_inset Quotes erd
3784 arg "toolbar-toggle math"
3787 ) the toolbar will be shown permanently at the bottom; this state is visualized
3792 menu with a checkmark.
3793 When you click in this state again on
3794 \begin_inset Quotes eld
3798 \begin_inset Quotes erd
3809 toolbar is only shown when the cursor is within a formula; this state is
3810 visualized by the renaming of the menu entry from
3811 \begin_inset Quotes eld
3815 \begin_inset Quotes erd
3819 \begin_inset Quotes eld
3823 \begin_inset space ~
3827 \begin_inset Quotes erd
3833 \begin_layout Subsection
3837 \begin_layout Standard
3842 toolbar allows you to choose from a large array of symbols used in math:
3843 operators, arrows, relationships, delimiters, special characters, sums
3845 Note that subscripting and superscripting allow you to put lower and upper
3846 limits on sums and integrals.
3849 \begin_layout Subsection
3850 Roots, decorations, and delimiters
3853 \begin_layout Standard
3854 To type a square root, just click on the button
3857 arg "math-insert \\sqrt"
3861 The square root appears, and the cursor is in a new insertion point inside
3863 You can type variables, numbers, other square roots, fractions, whatever
3866 will automatically resize the square root to fit what is inside.
3869 \begin_layout Standard
3871 \begin_inset Quotes eld
3875 \begin_inset Quotes erd
3879 \begin_inset Formula $\overrightarrow{a}$
3882 ) or group of characters (
3883 \begin_inset Formula $\overrightarrow{a+b}$
3886 ) is done similarly.
3887 Decorations are available from the toolbar via the button
3890 arg "math-insert \\hat"
3894 Click on a decoration, and \SpecialChar LyX
3895 will insert that decoration with an insertion
3896 point under (or over) it.
3897 Just type what you want in the insertion point.
3898 There are two sets of decorations: those that resize with the text you
3899 type, and those that have a fixed size, and are most appropriate for a
3904 \begin_layout Standard
3905 Delimiters such as parentheses, brackets, and braces work similarly, but
3906 are a bit more complicated.
3907 Hit the delimiter button
3910 arg "dialog-show mathdelimiter"
3916 \begin_inset space ~
3922 Your current selection of delimiters is displayed in a box.
3923 It is a pair of parentheses by default, but you can choose a pair of braces,
3924 a brace and a parenthesis, or choose the empty square to have something
3926 \begin_inset Quotes eld
3930 \begin_inset Formula $a=\left\langle 7\right.$
3934 \begin_inset Quotes erd
3937 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3942 \begin_layout Standard
3943 If you are lazy, you can type actual parentheses in math mode, rather than
3947 \begin_inset space ~
3953 However, those parentheses will be the same size as regular text, which
3954 will look bad if you have a big fraction or matrix inside the parentheses.
3955 So it is better to use one of the three delimiter buttons that insert them
3956 directly, for example
3959 arg "math-delim ( )"
3965 \begin_layout Standard
3966 You can also put delimiters or a square root sign or a decoration on already
3967 existing formula parts.
3968 Select the portion of the formula that you want to adjust, and then click
3969 on the button you want from the
3974 Try using this to change Newton's second law from scalar to vector form
3976 \begin_inset Formula $f=ma$
3980 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3984 Once you have learned about matrices, this is how you will put parentheses
3985 or brackets around them.
3988 \begin_layout Subsection
3992 \begin_layout Standard
3993 To create a fraction, click on the fraction button
3994 \change_deleted -131811572 1566935165
3998 arg "math-insert \\frac-square"
4002 \change_inserted -131811572 1566935147
4006 arg "math-insert \\frac"
4017 writes two insertion points in a fraction.
4018 As you would expect, you can use arrow keys or the mouse to move around
4020 Click on the top square and type
4021 \begin_inset Quotes eld
4025 \begin_inset Quotes erd
4034 \begin_inset Quotes eld
4038 \begin_inset Quotes erd
4042 You have made a fraction! Of course you can type anything within each of
4043 the two boxes: variables with exponents, square roots, other fractions,
4047 \begin_layout Labeling
4048 \labelwidthstring 00.00.0000
4054 \begin_inset space ~
4058 \change_deleted -712698321 1553351607
4062 \change_inserted -712698321 1553351607
4073 \begin_layout Subsection
4074 Functions: lim, log, sin and others
4077 \begin_layout Standard
4078 Because letters in math mode are considered to be variables, if you type
4080 \begin_inset Quotes eld
4084 \begin_inset Quotes erd
4087 in math mode, \SpecialChar LyX
4088 thinks you are typing the product of the three variables
4090 \begin_inset Formula $s$
4094 \begin_inset Formula $i$
4098 \begin_inset Formula $n$
4102 The three letters will be typeset in italics, when what you really wanted
4104 \begin_inset Quotes eld
4108 \begin_inset Quotes erd
4112 In addition, \SpecialChar LyX
4113 will not put a space between the word
4114 \begin_inset Quotes eld
4118 \begin_inset Quotes erd
4122 \begin_inset Quotes eld
4126 \begin_inset Quotes erd
4133 will exit the formula).
4135 \begin_inset Quotes eld
4139 \begin_inset Formula $\sin(x)$
4143 \begin_inset Quotes erd
4147 \begin_inset Quotes eld
4151 \begin_inset Formula $sin(x)$
4155 \begin_inset Quotes erd
4161 \begin_layout Standard
4169 arg "math-insert \\functions"
4173 \begin_inset Quotes eld
4177 \begin_inset Quotes erd
4180 in the pop-up function list.
4182 \begin_inset Quotes eld
4186 \begin_inset Quotes erd
4189 is displayed in \SpecialChar LyX
4190 in black, and set in upright roman type.
4191 The whole word is treated as one symbol, so if you type
4195 , it will delete the whole word.
4197 \begin_inset Quotes eld
4201 \begin_inset Quotes erd
4204 , which will be written in blue italics, like you expect in a formula.
4205 In the output, the expression will be correctly typeset.
4209 \begin_layout Standard
4210 The function list includes other trigonometric functions and their inverses,
4211 hyperbolic functions, logarithms, limits, and quite a few others.
4212 These functions can take subscripts and superscripts, important for typing
4214 \begin_inset Quotes eld
4218 \begin_inset Formula $\cos^{2}\theta$
4222 \begin_inset Quotes erd
4226 \begin_inset Quotes eld
4230 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4234 \begin_inset Quotes erd
4240 \begin_layout Labeling
4241 \labelwidthstring 00.00.0000
4247 \begin_inset space ~
4251 \change_deleted -712698321 1553351612
4255 \change_inserted -712698321 1553351612
4266 \begin_layout Subsection
4270 \begin_layout Standard
4271 Click on the matrix button
4274 arg "dialog-show mathmatrix"
4280 \change_inserted -131811572 1566934540
4286 A pop-up dialog allows you to choose how many rows and columns you want
4288 Choose 2 rows and 3 columns and hit
4294 prints 6 insertion points in a
4295 \begin_inset Formula $2\times3$
4299 As usual, you can put any sort of formula expression (a square root, another
4300 matrix, etc.) in each insertion point.
4301 You can also leave some of the insertion points empty if you want.
4304 \begin_layout Standard
4309 can be used to move horizontally between the columns of a matrix.
4310 Alternatively, you can use the arrow keys to move around - hitting
4314 at the end of one box will move to the next box,
4318 will move to the next row, etc.
4321 \begin_layout Standard
4322 If you need to change the number of rows and columns, use the menu
4324 Edit\SpecialChar menuseparator
4326 \begin_inset space \thinspace{}
4330 \begin_inset space \thinspace{}
4335 or the math toolbar buttons
4338 arg "tabular-feature append-row"
4344 arg "tabular-feature delete-row"
4350 arg "tabular-feature append-column"
4356 arg "tabular-feature delete-column"
4362 \begin_layout Standard
4367 for information on how to change the horizontal alignment of each column,
4368 and how to change the vertical position of the whole matrix.
4369 Note that if you want to write a table containing text, you should use
4371 's wonderful table support, rather than trying to write text in a matrix.
4374 \begin_layout Subsection
4378 \begin_layout Standard
4379 All of the expressions we have written so far have been on the same line
4380 as the text that came before and after them, otherwise known as inline
4382 This is fine for short, simple expressions, but if you want to write larger
4383 ones, or if you want your expressions to stand out from the text, you need
4384 to write them in display mode.
4385 In addition, only displayed expressions can be labeled and numbered (see
4390 ), and multi-line equations must be in display mode.
4393 \begin_layout Standard
4394 While being in a formula, click on the display button
4405 This centers the formula and adds a blank line before and after it.
4406 Now type in an expression and compile your file to see how it looks.
4407 The display button is actually a toggle; use it now to change a couple
4408 of your expressions to display mode and back.
4411 \begin_layout Standard
4412 Display mode has a couple differences from inline mode:
4415 \begin_layout Itemize
4416 The default font is larger for a few symbols, like
4417 \begin_inset Formula $\sum$
4421 \begin_inset Formula $\int$
4427 \begin_layout Itemize
4428 Subscripts and superscripts for limits and sums (but not integrals) are
4429 written under and over rather than next to the symbols
4432 \begin_layout Itemize
4436 \begin_layout Standard
4437 Other than these differences, though, displayed expressions and inline expressio
4438 ns are very similar.
4441 \begin_layout Standard
4442 One final note about the way displayed formulas are typeset: be careful
4443 about whether you are putting your equation into a new paragraph or not.
4444 If your formula is in the middle of a sentence or paragraph, then do not
4450 Doing so will cause the text
4454 the formula to start a new paragraph.
4455 That text will be indented or follow a blank line, depending on your document
4456 paragraph settings, which is probably not what you want.
4459 \begin_layout Labeling
4460 \labelwidthstring 00.00.0000
4465 : Put the various equations in
4466 \change_deleted -712698321 1553351617
4470 \change_inserted -712698321 1553351617
4478 into display mode, and see how they are typeset differently.
4481 \begin_layout Labeling
4482 \labelwidthstring 00.00.0000
4487 : Using various tools you have learned in this section, you should be able
4488 to write an equation like:
4492 \begin_layout Plain Layout
4493 After you have done it the hard way, give
4495 Insert\SpecialChar menuseparator
4496 Math\SpecialChar menuseparator
4498 \begin_inset space ~
4509 \begin_inset Formula
4511 f(x)=\left\{ \begin{array}{cc}
4514 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4523 \begin_layout Section
4527 \begin_layout Standard
4528 Now you are familiar with the basics.
4530 's math editor can do a lot more.
4531 You can refer to the
4535 manual for tips on how to:
4538 \begin_layout Itemize
4539 Label and number expressions.
4542 \begin_layout Itemize
4543 Create multi-line equations.
4546 \begin_layout Itemize
4547 Change typefaces, e.
4548 \begin_inset space \thinspace{}
4552 \begin_inset space \space{}
4555 to write bold-face text in an expression.
4558 \begin_layout Itemize
4559 Fine-tune font sizes and spacing within an expression.
4560 (Do not worry about this until your final draft!)
4563 \begin_layout Itemize
4565 These are very powerful, because you just define them once at the top of
4566 the document, and then you can use them throughout the document.
4569 \begin_layout Itemize
4570 Do almost all you can do with math.
4573 \begin_layout Chapter
4577 \begin_layout Section
4578 Other major \SpecialChar LyX
4582 \begin_layout Standard
4583 We have not gone through all the possible commands in \SpecialChar LyX
4584 , and we are not planning
4593 \begin_inset space ~
4598 manual for more information.
4599 We will just mention a couple more major things \SpecialChar LyX
4603 \begin_layout Itemize
4605 has WYSIWYM support for tables.
4608 Insert\SpecialChar menuseparator
4614 arg "tabular-insert"
4618 Click on the table with the
4625 \begin_inset space ~
4630 dialog box which allows extensive table editing.
4634 arg "toolbar-toggle table"
4637 the table toolbar will appear permanently.
4640 \begin_layout Itemize
4642 also supports including pictures in any format within documents.
4645 Insert\SpecialChar menuseparator
4651 arg "dialog-show-new-inset graphics"
4655 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4656 can have captions, and \SpecialChar LyX
4657 will automatically generate lists of figures and/or
4661 \begin_layout Itemize
4663 is heavily configurable.
4664 Everything from how the \SpecialChar LyX
4665 window looks to how the output comes out can be
4666 configured in a number of ways.
4667 Much configuration is done through
4669 Tools\SpecialChar menuseparator
4673 For more information on this, check out
4675 Help\SpecialChar menuseparator
4676 Customization\SpecialChar endofsentence
4680 \begin_layout Itemize
4682 is being developed by a team of programmers on five continents.
4683 Therefore, \SpecialChar LyX
4684 has better support for non-English languages (such as Dutch,
4685 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4686 ) than many word processors.
4687 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4688 languages Chinese Japanese, and Korean are supported.
4689 You can write documents in other languages and you can also configure \SpecialChar LyX
4691 to show its menus and error messages in other languages.
4695 \begin_layout Itemize
4696 The \SpecialChar LyX
4697 menus feature keybindings.
4698 This means that you can do
4700 File\SpecialChar menuseparator
4711 or by using the binding which is shown next to it in the menu (
4718 Keybindings are also configurable.
4719 For information on this, check out
4721 Help\SpecialChar menuseparator
4722 Customization\SpecialChar endofsentence
4726 \begin_layout Itemize
4728 can read \SpecialChar LaTeX
4731 \begin_inset space ~
4735 \begin_inset CommandInset ref
4737 reference "sec:tex2lyx"
4744 \begin_layout Itemize
4745 Spell-checking, thesaurus, and word count facilities are available.
4748 \begin_layout Itemize
4749 Generation of indexes and nomenclatures/glossaries is supported.
4752 \begin_layout Section
4754 for \SpecialChar LaTeX
4756 \begin_inset CommandInset label
4758 name "sec:latexusers"
4765 \begin_layout Standard
4766 If you do not know anything about \SpecialChar LaTeX
4767 , you do not have to read this section.
4768 Actually, you might want to
4772 about \SpecialChar LaTeX
4773 , and then read this chapter.
4774 However, some of those who begin to use \SpecialChar LyX
4775 will be familiar with \SpecialChar LaTeX
4777 If you are such a person, you may be wondering if \SpecialChar LyX
4778 can really do everything
4781 The short answer is that \SpecialChar LyX
4782 can do pretty much everything \SpecialChar LaTeX
4784 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4789 \begin_layout Standard
4790 Because this is just a tutorial, we are only going to mention things that
4791 new \SpecialChar LyX
4792 users will most likely be interested in.
4793 In the interests of keeping the Tutorial short, we will give only minimal
4798 \begin_inset space ~
4806 \begin_inset space ~
4811 manuals have a great deal of information on differences between \SpecialChar LyX
4812 and \SpecialChar LaTeX
4814 and how to do various \SpecialChar LaTeX
4815 tricks in \SpecialChar LyX
4819 \begin_layout Subsection
4824 \begin_layout Standard
4825 Anything that you enter in \SpecialChar TeX
4826 mode will be passed straight to \SpecialChar LaTeX
4828 displayed in red on the screen.
4829 You can use \SpecialChar TeX
4830 commands in \SpecialChar LyX
4833 Insert\SpecialChar menuseparator
4835 \begin_inset space ~
4847 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4851 \begin_layout Standard
4852 In a math formula, \SpecialChar TeX
4853 mode is handled a bit differently.
4855 mode is entered there by typing a backslash.
4856 The backslash is not written out, but anything you type afterwards will
4858 You exit \SpecialChar TeX
4863 or some other non-alphabetic character, like a number, underscore, caret
4865 Once you exit \SpecialChar TeX
4866 mode, if \SpecialChar LyX
4867 knows the \SpecialChar TeX
4868 command you have typed in, it will
4869 convert it to WYSIWYM\SpecialChar endofsentence
4871 \begin_inset Quotes eld
4881 \begin_inset Quotes erd
4884 in a formula and then press
4890 \begin_inset Quotes eld
4894 \begin_inset Quotes erd
4898 \begin_inset Quotes eld
4902 \begin_inset Formula $\gamma$
4906 \begin_inset Quotes erd
4910 This will work for almost all, non-complicated math macros.
4911 This may be faster than using the
4914 \begin_inset space ~
4919 , and will be especially convenient for experienced \SpecialChar LaTeX
4923 \begin_layout Standard
4924 As a special case, if you type
4925 \begin_inset Quotes eld
4935 \begin_inset Quotes erd
4938 in a formula, the beginning
4942 ending braces will be inserted in red while the cursor is placed between
4944 This makes it more convenient to type those commands that take an argument.
4947 \begin_layout Standard
4949 cannot do absolutely everything that \SpecialChar LaTeX
4951 Some fancy functions are not supported at all, while some work but are
4954 mode allows users to get the full flexibility of \SpecialChar LaTeX
4955 , while having all the
4956 convenient features of \SpecialChar LyX
4957 , like WYSIWYM math, tables, and editing.
4959 could never support every \SpecialChar LaTeX
4967 in the preamble (see Section
4968 \begin_inset space ~
4972 \begin_inset CommandInset ref
4974 reference "sec:preamble"
4978 ), you can use any package you want — although you will not have WYSIWYM
4979 support for that package's features.
4982 \begin_layout Subsection
4983 Importing \SpecialChar LaTeX
4989 \begin_inset CommandInset label
4998 \begin_layout Standard
4999 You can import a \SpecialChar LaTeX
5000 file into \SpecialChar LyX
5003 File\SpecialChar menuseparator
5004 Import\SpecialChar menuseparator
5006 \begin_inset space ~
5011 menu in \SpecialChar LyX
5013 This will call the program
5017 which will create a file foo.lyx from the file foo.tex.
5019 will then open that file.
5020 If the translation does not work, you can try calling
5024 from the command line, possibly using fancier options.
5027 \begin_layout Standard
5028 Even when the translation does work,
5032 may not translate everything, though it does handle most legal \SpecialChar LaTeX
5034 It will leave things it does not understand in \SpecialChar TeX
5035 mode; so, after translating
5040 , you can look for the red text and manually edit it to get it right.
5043 \begin_layout Standard
5048 has its own documentation (manpage), which Unix/Linux users can access
5049 via the console command
5052 \begin_inset space ~
5058 The manpage describes which \SpecialChar LaTeX
5059 commands and environments are not supported,
5060 what bugs you might run into (and how to get around them), and how to use
5061 the various options.
5064 \begin_layout Standard
5065 It is important to understand that
5069 can only translate files whose document class is
5070 \begin_inset Quotes eld
5074 \begin_inset Quotes erd
5078 , that is, for which there is a corresponding \SpecialChar LyX
5084 If there is no layout file, then you will get an error saying that the
5085 conversion could not be performed.
5086 So, unless you have a layout for the document class of your \SpecialChar LaTeX
5091 simply will not know how to translate the \SpecialChar LaTeX
5092 that it finds there into things
5095 More about layout files and how they are created is explained in detail
5103 \begin_layout Subsection
5104 Converting \SpecialChar LyX
5105 Documents to \SpecialChar LaTeX
5109 \begin_layout Standard
5110 You might wish to convert a \SpecialChar LyX
5111 Document to a \SpecialChar LaTeX
5113 For example, a co-worker or co-author who does not have \SpecialChar LyX
5118 File\SpecialChar menuseparator
5119 Export\SpecialChar menuseparator
5123 This will create a file
5131 file you are editing.
5134 \begin_layout Subsection
5139 \begin_layout Subsubsection
5143 \begin_layout Standard
5146 Document\SpecialChar menuseparator
5149 dialog takes care of the document-wide options, such as changing the document
5150 class, default font size and paper size.
5151 Document class options and also options for \SpecialChar LaTeX
5152 packages can be entered there
5156 \begin_inset space ~
5164 \begin_layout Subsubsection
5165 Other Preamble Matter
5166 \begin_inset CommandInset label
5175 \begin_layout Standard
5176 If you have special commands to put in the preamble of a \SpecialChar LaTeX
5178 use them in a \SpecialChar LyX
5182 Document\SpecialChar menuseparator
5183 Settings\SpecialChar menuseparator
5185 \begin_inset space ~
5190 and type in the dialog window (or from the document settings dialog, depending
5192 Anything you type will (as with \SpecialChar TeX
5193 mode) be sent directly to \SpecialChar LaTeX
5197 \begin_layout Subsection
5202 \begin_layout Standard
5204 has support for Bib\SpecialChar TeX
5206 \change_inserted -712698321 1590301994
5209 , which allows you to build databases of bibliographical references to be
5210 used in multiple documents.
5213 Insert\SpecialChar menuseparator
5215 \begin_inset space \thinspace{}
5219 \begin_inset space \thinspace{}
5223 \change_inserted -712698321 1590301964
5225 \begin_inset space \thinspace{}
5229 \begin_inset space \thinspace{}
5234 \SpecialChar menuseparator
5236 \change_inserted -712698321 1590301973
5240 \begin_inset space ~
5254 \change_inserted -712698321 1590302046
5260 \change_deleted -712698321 1590302066
5262 \change_inserted -712698321 1590302067
5266 \change_deleted -712698321 1590302057
5268 \change_inserted -712698321 1590302058
5273 \change_inserted -712698321 1590302061
5281 \change_deleted -712698321 1590302077
5283 \change_inserted -712698321 1590302078
5288 \change_deleted -712698321 1590302081
5294 \begin_layout Standard
5295 After you have done this, you can use citations from any bibliographies
5296 you have included with
5298 Insert\SpecialChar menuseparator
5302 \begin_inset space ~
5306 \begin_inset CommandInset ref
5308 reference "sec:bibliographies"
5317 dialog will show a list of all the references in your
5324 \change_inserted -712698321 1590302176
5325 If you want to use Biblatex rather than classic Bib\SpecialChar TeX
5326 , please refer to the
5327 User Guide for instructions.
5332 \begin_layout Section
5336 \begin_layout Standard
5337 Sometimes when you try to view a document, there will be errors, things
5338 that \SpecialChar LyX
5339 or \SpecialChar LaTeX
5341 When this happens, \SpecialChar LyX
5346 \begin_inset space ~
5352 Clicking on individual errors in this dialog will take you to the place
5353 in the \SpecialChar LyX
5354 document where the error occurs and also display the detailed \SpecialChar LaTeX