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
78 \paragraph_separation indent
79 \paragraph_indentation default
81 \math_numbering_side default
85 \paperpagestyle headings
86 \tracking_changes false
102 by the \SpecialChar LyX
107 \begin_layout Plain Layout
109 If you have comments on or corrections to this documentation, please send
110 them to the \SpecialChar LyX
111 Documentation mailing list:
112 \begin_inset CommandInset href
114 target "lyx-docs@lists.lyx.org"
128 \begin_layout Standard
129 \begin_inset CommandInset toc
130 LatexCommand tableofcontents
137 \begin_layout Chapter
141 \begin_layout Section
142 Welcome to \SpecialChar LyX
146 \begin_layout Standard
147 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
150 Now, do not panic – you will not need to learn \SpecialChar LaTeX
151 to use \SpecialChar LyX
153 That is, after all, the whole point of \SpecialChar LyX
154 : to provide an almost-WYSIWYG interface
155 to \SpecialChar LaTeX
157 There are some things you will need to learn, however, in order to use
162 \begin_layout Standard
163 Some of you probably found your way to this document because you tried to
164 put two spaces after a
165 \begin_inset Quotes eld
169 \begin_inset Quotes erd
172 or tried to put three blank lines between paragraphs.
173 You found out you could not and, in fact, you will find out that most of
174 the little tricks you are accustomed to use in word processors will not
175 work in \SpecialChar LyX
177 That is because most word processors you have used before allow you manually
178 to enter all spacings, font changes, and so on.
179 So you end up not only writing a document but typesetting it, too.
181 does the typesetting for you, in a consistent fashion, letting you focus
182 on the important things, like the content of your writing.
185 \begin_layout Standard
186 So read on to learn more about \SpecialChar LyX
188 Reading this tutorial is definitely worth the time.
191 \begin_layout Section
201 \begin_layout Standard
202 Before we get started with this section, you need to know that this
206 uses the notation outlined in the
211 If you came to this manual first, please read the
215 before you continue with the
222 \begin_layout Standard
223 Now that you know which fonts mean what in the documentation, we want to
224 talk a bit about what this
231 \begin_layout Subsection
232 Getting the most out of the Tutorial
235 \begin_layout Standard
236 This tutorial consists of examples and exercises.
237 To get the most out of this document, you should read through it, typing
238 all the little things we are telling you to type and trying out all of
239 the exercises to see if you get them right.
240 For convenience, you might want to print out the PDF version of this document.
243 \begin_layout Standard
244 If you are familiar with \SpecialChar LaTeX
245 , you will probably be able to read the
249 somewhat faster, since many \SpecialChar LyX
250 ideas are just \SpecialChar LaTeX
252 However, \SpecialChar LyX
253 has features you will want to learn about.
254 Even if you do not feel like reading the rest of the
258 , you should definitely check out Section
263 \begin_inset CommandInset ref
265 reference "sec:latexusers"
269 , which is specifically written for experienced \SpecialChar LaTeX
273 \begin_layout Subsection
281 \begin_layout Itemize
282 Detailed explanations of all of \SpecialChar LyX
287 \begin_layout Standard
296 \begin_layout Itemize
297 Detailed explanations of \SpecialChar LaTeX
302 \begin_layout Standard
304 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
307 can have a look at the
319 \begin_layout Standard
320 It is time to move on, time for your first document \SpecialChar ldots
324 \begin_layout Chapter
325 Getting started with \SpecialChar LyX
329 \begin_layout Section
330 Your first \SpecialChar LyX
334 \begin_layout Standard
335 OK\SpecialChar endofsentence
336 You are ready to start writing.
337 Before you do, there are a few things we need to mention, which will hopefully
338 make the Tutorial more instructive and useful.
342 \begin_layout Standard
343 Because there is information we cannot give you in the Tutorial, the
349 thing that you need to do is find the
356 Start up \SpecialChar LyX
366 You may want to load the
370 as well (if you are not reading it within \SpecialChar LyX
372 This way, you can read them while you are writing your own file.
376 \begin_layout Plain Layout
377 They can also serve as good examples of how to use the many features of
384 Note that once you have got more than one document open, you can use the
389 menu or the document tabs to switch between them.
392 \begin_layout Standard
393 In this Tutorial, we are going to assume that you have a fully working version
395 , as well as a \SpecialChar LaTeX
396 -distribution and a PDF-viewer.
397 This should be the case on all major Linux- and BSD-distributions, as well
398 as on Windows, where this is setup by the \SpecialChar LyX
402 \begin_layout Standard
403 Finally, we have written a file called
407 to let you practice your \SpecialChar LyX
409 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
412 As you learn new \SpecialChar LyX
413 functions, we will suggest that you fix those parts of
419 It also contains `subtle' hints about how to fix things.
423 \begin_layout Plain Layout
424 The hints are located in yellow
425 \begin_inset Quotes eld
429 \begin_inset Quotes erd
433 Access the text in a note by clicking on it.
438 If you want to cheat, or check what you have done, there is also a file
440 \begin_inset Newline newline
447 which contains the same text written and typeset by a \SpecialChar LyX
451 \begin_layout Standard
452 The example files can be found in the
456 directory of \SpecialChar LyX
457 's installation folder.
464 File\SpecialChar menuseparator
471 to save a copy in your own directory for you to work on.
472 As you fix parts of the raw document, check to see how those changes affect
476 \begin_layout Standard
481 directory contains lots of other examples files.
482 They will show you how to do various fancy things with \SpecialChar LyX
484 After you have read the Tutorial, or when you are confused about how to
485 do something fancy in \SpecialChar LyX
486 , take a look at these files.
489 \begin_layout Subsection
490 Typing, Viewing, and Exporting
493 \begin_layout Itemize
496 File\SpecialChar menuseparator
500 \begin_layout Itemize
501 Type a sentence like:
503 This is my first \SpecialChar LyX
507 \begin_layout Itemize
508 Save your document with
510 File\SpecialChar menuseparator
515 As\SpecialChar endofsentence
519 \begin_layout Itemize
520 Create a PDF file, with
522 Document\SpecialChar menuseparator
525 or the toolbar button
533 will open a PDF-viewer program displaying your document as it will look
537 \begin_layout Itemize
538 Export the ready to print document with
540 File\SpecialChar menuseparator
548 \begin_layout Standard
549 Congratulations! You have written your first \SpecialChar LyX
551 All of the rest is just details.
552 \begin_inset Newline newline
558 \begin_layout Standard
563 You can save time by leaving the PDF viewer running in the background.
564 Under MacOS and Linux you can use
566 Document\SpecialChar menuseparator
569 or the toolbar button
575 and just click on the PDF viewer window afterwards.
576 Under Windows still use
578 Document\SpecialChar menuseparator
590 \begin_layout Standard
595 In case you are using a high-resolution display, the LyX toolbar icons
597 To change their size, right-click into a toolbar.
600 \begin_layout Subsection
604 \begin_layout Standard
606 can of course do most of the things you are used to doing with a word processor.
607 It will word-wrap and indent paragraphs automatically.
608 Here is a quick description of how to do some simple actions.
611 \begin_layout Description
612 Undo \SpecialChar LyX
613 has multiple levels of undo, which means you can undo everything you
614 have done since your current editing session started, by selecting
616 Edit\SpecialChar menuseparator
625 ) over and over again.
626 If you undo too much, just select
628 Edit\SpecialChar menuseparator
641 \begin_layout Standard
642 Currently, undo is limited to 100 steps.
646 \begin_layout Description
649 Edit\SpecialChar menuseparator
660 Edit\SpecialChar menuseparator
671 Edit\SpecialChar menuseparator
680 ) to cut, copy, and paste.
681 Or automatically paste selected text (including selections from other programs)
689 \begin_layout Description
692 Edit\SpecialChar menuseparator
706 arg "dialog-show findreplace"
710 In the dialog, search with the
722 button to replace a word you have found.
726 \begin_layout Plain Layout
727 Close the window when you are done or leave it open if you find it more
729 Most dialog boxes in \SpecialChar LyX
730 can operate like this.
731 Just be sure you have the right window in focus when you are trying to
732 type in the main \SpecialChar LyX
733 window or a \SpecialChar LyX
739 If you like, you can specify whether to make the search case-sensitive,
740 or to search for only complete words; you can also search backwards through
744 \begin_layout Description
759 , which will by default print characters in italics), set it in
769 , usually small caps, used for people's names), or use your own formatting
772 Edit\SpecialChar menuseparator
777 Style\SpecialChar menuseparator
780 dialog (toolbar button
783 arg "dialog-show character"
789 \begin_layout Description
790 Toolbar Other buttons on the toolbar allow you to do some of the more popular
818 \begin_layout Standard
819 Of course, you have not yet written enough to make most of these functions
821 As you write more, though, try undoing, pasting, etc.
824 \begin_layout Subsection
825 WYSIWYM: Whitespace in \SpecialChar LyX
829 \begin_layout Standard
830 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
833 As many times as you hit
837 , you will only get one blank line.
838 As many times as you hit
842 , you will only get one space.
843 On a blank line, \SpecialChar LyX
844 will not let you type even one space.
849 key will not move you forward one tab stop; in fact there
853 no tab stops! There is no ruler at the top of the page to let you set tabs
857 \begin_layout Standard
858 Many word processors are based on the WYSIWYG principle:
859 \begin_inset Quotes eld
862 What You See Is What You Get.
863 \begin_inset Quotes erd
867 , on the other hand, is based on the principle that
868 \begin_inset Quotes eld
871 What You See Is What You
876 \begin_inset Quotes erd
879 You type what you mean and \SpecialChar LyX
880 will take care of typesetting it for you so
881 that the output looks nice.
886 grammatically separates paragraphs and a
890 grammatically separates words; so there is no reason to have several of
895 has no grammatical function at all – so \SpecialChar LyX
897 Using \SpecialChar LyX
898 , you will spend more of your time worrying about the
902 of your document and less time worrying about the
911 for more information on the WYSIWYM concept.
914 \begin_layout Standard
916 does have (many) ways to fine-tune the formatting of your document.
917 After all, \SpecialChar LyX
927 has information about all that.
928 It includes horizontal fills and vertical space — which are more powerful
929 and versatile than multiple spaces or blank lines — and ways to change
930 font sizes, character styles, and paragraph alignments by hand.
931 The idea, though, is that you can write your whole document, focusing on
932 content, and just worry about that fine-tuning at the end.
933 With standard word processors, you will be distracted by document formatting
934 throughout the writing process.
937 \begin_layout Section
941 \begin_layout Standard
942 Different parts of a document have different purposes; we call these parts
948 Most of a document is made up of regular text.
949 Section titles (chapter, subsection, etc.) let the reader know that a new
950 topic or subtopic will be discussed.
951 Certain types of documents have special environments.
952 A journal article will have an abstract and a title.
953 A letter will have neither of these, but will probably have an environment
954 that gives the writer's address.
957 \begin_layout Standard
958 Environments are a major part of the
959 \begin_inset Quotes eld
962 What You See Is What You Mean
963 \begin_inset Quotes erd
966 philosophy of \SpecialChar LyX
968 A given environment may require a certain font style, font size, indenting,
969 line spacing, and more.
970 This problem is aggravated, because the exact formatting for a given environmen
971 t may change: one journal may use boldface, 18 point, centered type for
972 section titles while another uses italicized, 15 point, left justified
973 type; different languages may have different standards for indenting; and
974 bibliography formats can vary widely.
976 lets you avoid learning all the different formatting styles.
979 \begin_layout Standard
984 choice box is located on the left end of the toolbar and looks like this:
986 \begin_inset Graphics
987 filename clipart/ToolbarEnvBox.png
994 It indicates in which environment you are currently writing.
995 While you were writing your first document, it said
996 \begin_inset Quotes eld
1000 \begin_inset Quotes erd
1003 which is the default environment for text.
1004 Now you will put a number of environments in your new document so that
1005 you can see how they work.
1008 \begin_layout Subsection
1009 Sections and Subsections
1012 \begin_layout Standard
1017 on the first line of your new \SpecialChar LyX
1030 \begin_layout Plain Layout
1036 If nothing is selected, \SpecialChar LyX
1037 changes the paragraph you are currently in to
1038 the selected environment.
1039 Alternatively, you can change several paragraphs to a different environment
1040 by selecting them before picking an environment.
1057 , which will be covered below.
1060 \begin_inset Quotes eld
1064 \begin_inset Quotes erd
1067 and typesets the section heading (title) in a larger font.
1072 \SpecialChar endofsentence
1078 \begin_inset Quotes eld
1082 \begin_inset Quotes erd
1086 \begin_inset Quotes eld
1090 \begin_inset Quotes erd
1094 Section headings, like most environments, are assumed to end when you type
1099 \SpecialChar endofsentence
1100 Type the document introduction:
1103 \begin_layout LyX-Code
1104 This is an introduction to my first \SpecialChar LyX
1108 \begin_layout Standard
1124 \begin_inset Quotes eld
1128 \begin_inset Quotes erd
1131 and waits for you to type a title.
1133 \begin_inset Quotes eld
1139 \begin_inset space ~
1145 \begin_inset Quotes erd
1148 , and you will see that \SpecialChar LyX
1149 again sets it as a section title.
1152 \begin_layout Standard
1154 Go to the end of Section
1155 \begin_inset space ~
1159 \begin_inset Quotes eld
1162 my first \SpecialChar LyX
1164 \begin_inset Quotes erd
1180 Again, \SpecialChar LyX
1182 \begin_inset Quotes eld
1186 \begin_inset Quotes erd
1189 and waits for you to type a title.
1196 \begin_inset space ~
1200 \begin_inset Quotes eld
1204 \begin_inset Quotes erd
1208 \begin_inset space ~
1211 2, has been automatically renumbered to Section
1212 \begin_inset space ~
1215 3! In true WYSIWYM fashion, you just need to identify the text that makes
1216 up the section titles, and \SpecialChar LyX
1217 takes care of numbering the sections and typesettin
1221 \begin_layout Standard
1230 environment, and type the following five lines:
1233 \begin_layout LyX-Code
1234 Sections and subsections are described below.
1237 \begin_layout LyX-Code
1241 \begin_layout LyX-Code
1242 Sections are bigger than subsections.
1245 \begin_layout LyX-Code
1246 Subsection description
1249 \begin_layout LyX-Code
1250 Subsections are smaller than sections.
1253 \begin_layout Standard
1254 Click on the second line and select
1264 numbers the subsection
1265 \begin_inset Quotes eld
1269 \begin_inset Quotes erd
1272 , and typesets it in a font which is bigger than regular text but smaller
1273 than the section title.
1274 Change the fourth line to the
1278 environment as well.
1279 As you probably expected, \SpecialChar LyX
1280 automatically numbered the section
1281 \begin_inset Quotes eld
1285 \begin_inset Quotes erd
1289 If you put yet another section before Section
1290 \begin_inset space ~
1294 \begin_inset space ~
1297 2 will be renumbered as Section 3, and the subsections will be renumbered
1299 \begin_inset Quotes eld
1303 \begin_inset Quotes erd
1307 \begin_inset Quotes eld
1311 \begin_inset Quotes erd
1317 \begin_layout Standard
1318 Further levels of sectioning include
1331 We will let you play with these on your own.
1332 You may notice that paragraph and subparagraph headings are not numbered
1333 by default, and that subparagraphs are indented; see the
1337 for an explanation and how to change this.
1342 headings are actually the highest level of sectioning, above
1346 s, but you are only allowed to use them in certain types (text classes)
1348 documents (see Section
1349 \begin_inset space ~
1353 \begin_inset CommandInset ref
1355 reference "sec:Document-Classes"
1362 \begin_layout Standard
1363 Finally, you may want to have sections or subsections that are not numbered.
1364 There are environments for this as well.
1365 If you change one of your section headings to the
1369 environment (you may have to scroll down in the
1373 box to find it), \SpecialChar LyX
1374 will use the same font size for the heading as it uses
1375 for a regular section, but it will not number that section.
1376 There are corresponding
1377 \begin_inset Quotes eld
1381 \begin_inset Quotes erd
1384 heading environments for
1393 Try changing some of your sections or subsections to the starred environments,
1394 and note how the other section numbers are updated.
1397 \begin_layout Labeling
1398 \labelwidthstring 00.00.0000
1403 : Fix the section and subsection headings in
1404 \begin_inset Newline newline
1415 \begin_layout Subsection
1419 \begin_layout Standard
1421 has several different environments for typesetting lists.
1422 The various list environments free you from hitting
1426 a million times when writing an outline, or from renumbering a whole list
1427 when you want to add a point in the middle of the list.
1428 Different types of documents logically require different list environments:
1431 \begin_layout Itemize
1432 A slide presentation might use the
1436 environment's bulleted lists to describe different points.
1439 \begin_layout Itemize
1440 An outline would use the
1444 environment's numbered lists (and lettered sublists).
1447 \begin_layout Itemize
1448 A document describing several software packages could use the
1452 environment, where each item in the list begins with a bold-faced word.
1455 \begin_layout Itemize
1464 ) environment is a variation on the
1471 \begin_layout Standard
1472 Let us write a list of reasons why \SpecialChar LyX
1473 is better than other word processors.
1474 Somewhere in your document, type:
1477 \begin_layout Standard
1481 is better than other word processors because:
1484 \begin_layout Standard
1501 arg "layout Itemize"
1507 \begin_inset Quotes eld
1511 \begin_inset Quotes erd
1515 Type in your reasons:
1518 \begin_layout LyX-Code
1519 Typesetting is done for you.
1522 \begin_layout LyX-Code
1526 \begin_layout LyX-Code
1527 Lists are very easy to create!
1530 \begin_layout Standard
1531 List environments, unlike headings, do not end when you type
1536 Instead, \SpecialChar LyX
1537 assumes you are going on to the next item in the list.
1538 The above will therefore result in a three-item list.
1539 If you want more than one paragraph within one list
1543 , one way is to use the
1546 \begin_inset space ~
1551 , which you get by typing
1556 In order to get out of the list, you need to reselect the
1560 environment (or just use the key binding
1563 arg "layout Standard"
1569 \begin_layout Standard
1570 You now have a beautiful itemized list.
1571 You might want to run \SpecialChar LaTeX
1572 to see how the list looks when printed out.
1573 But what if you wanted to number the reasons? Well, just select the whole
1578 \begin_layout Plain Layout
1580 will not let you select the first bullet (or the actual number in a numbered
1581 section title) unless you also select the paragraph
1585 it, which you probably do not want to do.
1586 This is on purpose because the bullet or number depends on the document
1587 settings or text position, respectively.
1603 arg "layout Enumerate"
1607 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1608 will fix the numbering.
1611 \begin_layout Standard
1612 While the list is still selected, you can change to the other two list environme
1620 \begin_inset space \thinspace{}
1626 \begin_inset space \thinspace{}
1636 arg "layout Description"
1645 ), in order to see what they look like.
1646 For those two environments, each list item is made up of a term, which
1647 is the item's first word, followed by a definition, which is the rest of
1648 the paragraph (until you hit
1653 The term is either typeset in boldface (
1658 \begin_inset Quotes eld
1662 \begin_inset Quotes erd
1669 \begin_layout Plain Layout
1670 But a typesetter's tab, which will change to fit the size of the largest
1671 term, not a pathetic, rigid, unchangeable typewriter
1684 ) from the rest of the paragraph.
1685 If you want to have more than one word in the definition, then separate
1689 \begin_inset space ~
1697 \begin_layout Labeling
1698 \labelwidthstring 00.00.0000
1703 : Typeset the list in
1708 \begin_layout Standard
1709 You can nest lists within each other in all sorts of interesting ways.
1710 An obvious example would be writing outlines.
1711 Numbered and bulleted lists will have different numbering and bulleting
1712 schemes for sublists.
1717 for details on the different sorts of lists and for examples of nestings.
1720 \begin_layout Subsection
1721 Other environments: Verses, Quotations, and more
1724 \begin_layout Standard
1725 There are two environments for setting quotations apart from surrounding
1730 for short quotes and
1744 \begin_layout Plain Layout
1745 used in this Tutorial for the long typing examples
1754 font; this environment is the only place in \SpecialChar LyX
1755 where you are allowed to use
1756 multiple spaces to allow code indenting.
1757 You can even write poetry using the
1765 to separate stanzas, and
1769 to separate lines within a stanza.
1774 for more complete descriptions of all of the available \SpecialChar LyX
1778 \begin_layout Labeling
1779 \labelwidthstring 00.00.0000
1784 : Correctly typeset the
1786 Quote, \SpecialChar LyX
1794 \begin_inset Newline newline
1802 \begin_layout Chapter
1806 \begin_layout Standard
1807 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1809 It introduced you to the basic editing operations in \SpecialChar LyX
1810 , as well as the powerful
1811 method of writing with environments.
1812 Most people who use \SpecialChar LyX
1813 , though, will want to write documents: papers, articles,
1814 books, manuals, or letters.
1815 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1817 a complete document.
1818 It will introduce you to text classes, which allow you to write different
1820 It will then describe many of the additions that turn text into a document,
1821 such as titles, footnotes, cross references, bibliographies, and tables
1825 \begin_layout Section
1827 \begin_inset CommandInset label
1829 name "sec:Document-Classes"
1836 \begin_layout Standard
1837 Different sorts of documents should be typeset differently.
1838 For example, books are generally printed double-sided, while articles are
1840 In addition, many documents contain special environments: letters contain
1841 some environments — such as the sender's address and the signature — which
1842 do not make sense in a book or article.
1843 The \SpecialChar LyX
1852 \begin_layout Plain Layout
1853 for \SpecialChar LaTeX
1854 users: this is equivalent to the \SpecialChar LaTeX
1860 takes care of these large scale differences between different sorts of
1862 This Tutorial, for example, was written in the
1867 Document classes are another major part of the WYSIWYM philosophy; they
1868 tell \SpecialChar LyX
1869 how to typeset the document, so you do not need to know how.
1872 \begin_layout Standard
1873 Your document is probably being written in the
1881 \begin_layout Plain Layout
1882 That is usually the default document class
1887 Try changing to other document classes (using the
1889 Document\SpecialChar menuseparator
1892 dialog) to see how they are typeset differently.
1893 If you change your document to the
1897 document class and look at the
1901 box, you will see that most of the allowed environments are the same.
1902 However, you can now use the
1907 If you are ever unsure about which environments you can use in a given
1908 document class, just consult the
1915 \begin_layout Standard
1916 Font sizes, one- or two-column printing, and page headings are just some
1917 of the ways journals' typesettings differ from one another.
1918 As the Computer Age continues to mature, journals have begun accepting
1919 electronic submissions, creating \SpecialChar LaTeX
1921 \begin_inset Quotes eld
1925 \begin_inset Quotes erd
1928 so that authors can submit correctly typeset articles.
1930 is set up to support this as well.
1931 For example, \SpecialChar LyX
1932 supports typesetting (and extra environments) for the American
1933 Mathematics Society journals using the
1936 \begin_inset space ~
1944 \begin_layout Standard
1945 Here is a very quick reference to some of the document classes.
1948 Special Document Classes
1954 manual for many more details.
1957 \begin_layout Standard
1959 \begin_inset Tabular
1960 <lyxtabular version="3" rows="7" columns="2">
1961 <features tabularvalignment="middle">
1962 <column alignment="center" valignment="top" width="0pt">
1963 <column alignment="center" valignment="top" width="0pt">
1965 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1968 \begin_layout Plain Layout
1974 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1977 \begin_layout Plain Layout
1985 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1988 \begin_layout Plain Layout
1994 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1997 \begin_layout Plain Layout
1998 one-sided, no chapters
2005 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2008 \begin_layout Plain Layout
2014 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2017 \begin_layout Plain Layout
2018 layout & environments for American Math Society
2025 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2028 \begin_layout Plain Layout
2034 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2037 \begin_layout Plain Layout
2038 longer than article, two-sided
2045 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2048 \begin_layout Plain Layout
2054 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2057 \begin_layout Plain Layout
2058 report + front and back matter
2065 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2068 \begin_layout Plain Layout
2074 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2077 \begin_layout Plain Layout
2085 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2088 \begin_layout Plain Layout
2094 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2097 \begin_layout Plain Layout
2098 lots of extra environments for address, signature\SpecialChar ldots
2112 \begin_layout Section
2113 Templates: Writing a Letter
2116 \begin_layout Standard
2117 One way to write a letter would be to open a new file, and choose a
2123 Document\SpecialChar menuseparator
2127 While this is the most obvious way to write a letter, it seems like extra
2129 Every time you write a business letter, you want to have your address,
2130 the address to which you are sending it, a body, a signature, etc.
2136 for letters, which contains a sample letter; once you have a template,
2137 you can just replace a couple of parts of the letter with your text each
2138 time you write a letter.
2141 \begin_layout Standard
2142 Open a new file with
2144 File\SpecialChar menuseparator
2146 \begin_inset space ~
2150 \begin_inset space ~
2161 Save and print the file to see how the various environments are typeset.
2164 \begin_layout Standard
2165 When you look at the
2169 box, you will see several environments, like the
2172 \begin_inset space ~
2177 environment, that do not exist in most other document classes.
2183 You can play around for a while to figure out how the various environments
2185 You will notice for example that the
2189 environment has the word
2190 \begin_inset Quotes eld
2194 \begin_inset Quotes erd
2197 in red before the actual text of the signature.
2198 This word does not show up in the actual letter, as you will see if you
2199 view/export the file.
2200 It is just there to let you know where the signature goes.
2201 Also, note that it does not matter where in the file the
2206 Remember, \SpecialChar LyX
2207 is WYSIWYM; you can put the
2211 environment anywhere you want, but \SpecialChar LyX
2212 knows that in the printout, the signature
2213 should be at the end.
2216 \begin_layout Standard
2217 A template is just a regular \SpecialChar LyX
2219 This means you can fill in your address and signature and save the file
2221 From now on, any time you want to write a letter, you can use the new template
2223 We do not have to suggest an actual
2224 \begin_inset Quotes eld
2228 \begin_inset Quotes erd
2231 here; just write a letter to someone!
2235 \begin_layout Plain Layout
2236 One warning, if you are writing from a template.
2237 If you erase all of the text in an environment — for example, if you erase
2241 \begin_inset space ~
2246 field so that you can replace it with your own — and then you move the
2247 cursor without writing any text, the environment may disappear.
2248 This is because most environments cannot exist without any text in them.
2249 Just reselect the environment from the
2261 \begin_layout Standard
2262 Templates can be a huge time-saver, and we urge you to use them whenever
2264 In addition, they can help a person learn how to use some of the fancier
2266 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2268 of less computer-aware users.
2269 When they are first learning \SpecialChar LyX
2270 , it will be less intimidating if they have
2271 a letter template customized for their company, for example.
2274 \begin_layout Standard
2275 \begin_inset Newpage newpage
2281 \begin_layout Section
2285 \begin_layout Standard
2287 (like \SpecialChar LaTeX
2288 ) considers the title — which may contain the actual title, the author,
2289 the date, and even an abstract of a paper — to be a separate part of the
2293 \begin_layout Standard
2294 Go back to your first \SpecialChar LyX
2295 document and make sure it is using the
2303 \begin_layout Plain Layout
2304 You should not be using the letter any more, since the
2308 document class does not allow titles.
2313 Type a title on the first line, and change the line to the
2318 On the next line, type your name and change it to the
2323 On the next line, write the date in the
2328 Type a paragraph or two summarizing your document using the
2333 Notice how the title is presented when it is printed out.
2334 If you change the document format to Book, you will get a separate title
2335 page, like the first page of this tutorial.
2338 \begin_layout Labeling
2339 \labelwidthstring 00.00.0000
2344 : Fix the title, date, and author in
2349 \begin_layout Section
2350 Labels and Cross-References
2353 \begin_layout Standard
2354 You can label section headings, list items, formulas, footnotes, and floats
2358 \begin_layout Plain Layout
2359 Floats are explained in the
2373 Once you do so, you can refer to the element in other parts of the document,
2374 using cross-references.
2375 You can refer to a section's number, to the page on which the section begins
2377 As with section numbering, \SpecialChar LyX
2378 also takes care of cross-reference numbering
2380 Automatic management of labels and cross-references is among the most significa
2381 nt advantages of \SpecialChar LyX
2382 (and \SpecialChar LaTeX
2383 ) over conventional word processors.
2386 \begin_layout Subsection
2390 \begin_layout Standard
2391 Go to our second section, whose title is
2392 \begin_inset Quotes eld
2396 \begin_inset Quotes erd
2400 Click at the end of the section title line, and select
2402 Insert\SpecialChar menuseparator
2405 or the toolbar button
2412 A dialog asks you for a label name, and gives you a suggestion.
2417 , the label name will be placed in a box next to the section title.
2420 \begin_layout Standard
2421 So far you have not done anything — the output will look exactly the same,
2422 since labels do not show up in the printed document.
2423 However, now that you have added a label, you can refer to that label with
2425 We will do that next.
2428 \begin_layout Subsection
2429 Your first cross-reference
2432 \begin_layout Standard
2433 Place the cursor somewhere in Section
2434 \begin_inset space ~
2441 \begin_layout LyX-Code
2442 If you want to know more about this document,
2443 \begin_inset Newline newline
2449 \begin_layout Standard
2450 Now, with the cursor before the final period, select
2452 Insert\SpecialChar menuseparator
2454 \begin_inset space ~
2459 or the toolbar button
2462 arg "dialog-show-new-inset ref"
2466 The Cross-reference dialog pops up.
2467 It shows a list of the possible labels you can reference.
2468 At the moment, there should be only one,
2469 \begin_inset Quotes eld
2472 sec:About-This-Document
2473 \begin_inset Quotes erd
2477 First, select the drop-down menu labeled
2478 \begin_inset Quotes eld
2482 \begin_inset Quotes erd
2486 \begin_inset Quotes eld
2490 \begin_inset Quotes erd
2495 \begin_inset Quotes eld
2498 sec:About-This-Document
2499 \begin_inset Quotes erd
2502 (it may be selected by default), and a reference marker will appear containing
2504 \begin_inset Quotes eld
2507 Ref: sec:About-This-Document
2508 \begin_inset Quotes erd
2511 (To be really correct, you should put a
2514 \begin_inset space ~
2522 arg "command-alternatives math-space ; space-insert protected"
2525 ) in between the word
2526 \begin_inset Quotes eld
2530 \begin_inset Quotes erd
2533 and the reference.) An alternative way to reference a label is to right-click
2534 the label and select
2538 in the pop-up context menu.
2539 The cross-reference to this label is now in the clipboard and can be copied
2540 to the actual cursor position via the menu
2542 Edit\SpecialChar menuseparator
2552 In the printed document, this reference marker will be replaced with the
2554 Preview your document and you will see that \SpecialChar LaTeX
2555 has been even cleverer than
2558 \begin_inset Quotes eld
2562 \begin_inset Quotes erd
2568 \begin_layout Standard
2569 Conveniently, a cross-reference acts as a hyperlink when you are editing
2570 a document in \SpecialChar LyX
2571 ; clicking on it will pop up the
2578 \begin_inset space ~
2582 \begin_inset space ~
2587 will move the cursor to the referenced label.
2590 \begin_layout Subsection
2591 More fun with labels
2594 \begin_layout Standard
2595 We told you that \SpecialChar LyX
2596 takes care of numbering cross-references; now you can
2598 Add a new section before Section
2599 \begin_inset space ~
2603 Update the preview, and — voilà! — the section cross-reference changed
2605 \begin_inset Quotes eld
2609 \begin_inset Quotes erd
2612 ! Change the section
2613 \begin_inset Quotes eld
2617 \begin_inset Quotes erd
2620 to a subsection, and the cross-reference will reference Subsection
2621 \begin_inset space ~
2624 2.1 instead of Section
2625 \begin_inset space ~
2629 The page reference will not change unless you add a whole page of text
2630 before the label, of course.
2634 \begin_layout Standard
2635 If you want some more practice with labels, then try putting a new label
2636 where your first cross-reference was, and refer to that label from elsewhere
2638 If you will be inserting cross-references often, it may be convenient to
2646 \begin_layout Standard
2647 If you want to confirm that the cross-referencing gets the pages right even
2648 for larger documents,
2652 a couple pages of text from the
2656 to the clipboard, and
2660 them into your document.
2664 \begin_layout Plain Layout
2665 By the way, copying a chapter title may cause an error, because chapters
2666 are not allowed in the article class, see Section
2667 \begin_inset space ~
2671 \begin_inset CommandInset ref
2673 reference "sec:Document-Classes"
2678 If this happens, just delete the chapter title.
2686 \begin_layout Labeling
2687 \labelwidthstring 00.00.0000
2692 : Fix the references in
2697 \begin_layout Section
2698 Footnotes and Margin Notes
2701 \begin_layout Standard
2702 Footnotes can be added using the toolbar button
2705 arg "footnote-insert"
2710 Insert\SpecialChar menuseparator
2714 Click at the end of the word
2715 \begin_inset Quotes eld
2720 \begin_inset Quotes erd
2723 somewhere in your document and insert a footnote.
2724 A footnote box appears where you can enter the text of the footnote.
2726 should place the cursor at the beginning of the footnote box.
2730 \begin_layout LyX-Code
2732 is a typesetting word processor.
2735 \begin_layout Standard
2736 Now click on the button labeled
2737 \begin_inset Quotes eld
2741 \begin_inset Quotes erd
2745 The footnote box is closed, leaving the button showing where the footnote
2746 marker will be in the printed text; this is called
2747 \begin_inset Quotes eld
2751 \begin_inset Quotes erd
2755 You can unfold the footnote at any time and re-edit its text by clicking
2757 \begin_inset Quotes eld
2761 \begin_inset Quotes erd
2767 \begin_layout Standard
2768 A footnote can be cut and pasted like normal text.
2769 Go ahead; try it! All you need to do is select the footnote button
2773 \begin_layout Plain Layout
2774 It may be easier to select it using the keyboard.
2775 You might accidentally open the footnote if you are trying to select the
2776 marker itself with the mouse.
2790 In addition, you can change regular text to a footnote, by selecting it
2794 arg "footnote-insert"
2797 button; change a footnote to regular text by hitting the
2801 key when the cursor is in the first position of a footnote, or by hitting
2806 key when the cursor is in the very last position of the footnote.
2809 \begin_layout Standard
2810 Margin notes can be added using the menu
2812 Insert\SpecialChar menuseparator
2814 \begin_inset space ~
2819 or the toolbar button
2822 arg "marginalnote-insert"
2825 \SpecialChar endofsentence
2826 Margin notes are like footnotes, except that:
2829 \begin_layout Itemize
2830 the on-screen boxes say
2831 \begin_inset Quotes eld
2835 \begin_inset Quotes erd
2839 \begin_inset Quotes eld
2843 \begin_inset Quotes erd
2849 \begin_layout Itemize
2850 the notes will be placed in the margin, instead of below the text
2853 \begin_layout Itemize
2854 margin notes are not numbered
2857 \begin_layout Standard
2858 Change your \SpecialChar LyX
2859 footnote back to text, then select and change it to a margin
2861 Run \SpecialChar LaTeX
2862 again to see what the margin note looks like.
2865 \begin_layout Labeling
2866 \labelwidthstring 00.00.0000
2871 : Fix the footnote in
2876 \begin_layout Section
2878 \begin_inset CommandInset label
2880 name "sec:bibliographies"
2887 \begin_layout Standard
2888 Bibliographies are similar to cross-references.
2889 The bibliography contains a list of references at the end of the document,
2890 and they can be referenced from within the document.
2891 Like section titles, \SpecialChar LyX
2892 and \SpecialChar LaTeX
2893 make your job easier by automatically numbering
2894 the bibliography items and changing citations when the item numbers change.
2897 \begin_layout Standard
2898 Go to the end of the document and switch to the
2903 Now, each paragraph you type will be a reference.
2905 \begin_inset Quotes eld
2910 The Lyx Tutorial, by the \SpecialChar LyX
2914 \begin_inset Quotes erd
2917 as your first reference.
2918 Note that \SpecialChar LyX
2919 automatically puts a number in a box before each reference.
2920 Click on the boxed reference number, and the
2923 \begin_inset space ~
2933 is to refer to this reference within the \SpecialChar LyX
2943 is set (default), you will see the number of the bibliography in the output.
2949 \begin_inset Quotes eld
2953 \begin_inset Quotes erd
2956 to make it easy to remember.
2959 \begin_layout Standard
2960 Now pick somewhere in your document that you would like to insert a reference.
2963 Insert\SpecialChar menuseparator
2966 or the toolbar button
2969 arg "dialog-show-new-inset citation"
2978 The left panel in this dialog lists all the bibliography entries, and this
2979 field allows you to choose which bibliography item you want to cite.
2981 \begin_inset Quotes eld
2985 \begin_inset Quotes erd
2988 (right now, that is the only item in the bibliography), then use the
2992 button in the center to insert it.
2993 (You can have multiple citations in the same place by transferring a number
2998 \begin_layout Plain Layout
2999 If one uses label names for references that are easy to remember it is easier
3000 to find the entry in the list of references.
3010 Now preview your file and you will see that the citation appears in brackets
3011 in the text, referring to the bibliography at the end of the document.
3014 \begin_layout Standard
3018 \begin_inset space ~
3027 dialog will put a remark (such as a reference to a page or chapter within
3028 the referenced book or article) in the brackets after the reference.
3029 If you want the references to have labels instead of numbers in the printed
3030 output (for example, some journals would use
3031 \begin_inset Quotes eld
3035 \begin_inset Quotes erd
3038 to refer to a paper written by Smith in 1995), use the
3045 \begin_inset space ~
3058 \begin_layout Labeling
3059 \labelwidthstring 00.00.0000
3064 Fix the bibliography and citation in
3069 \begin_layout Section
3073 \begin_layout Standard
3074 You may want to put a table of contents at the beginning of your document.
3076 makes this easy to do.
3081 after your document title and before your first section title and select
3084 Insert\SpecialChar menuseparator
3086 \begin_inset space ~
3090 \begin_inset space ~
3093 TOC\SpecialChar menuseparator
3095 \begin_inset space ~
3099 \begin_inset space ~
3106 \begin_inset Quotes eld
3110 \begin_inset Quotes erd
3113 will appear in a button on the first line of the document.
3117 \begin_layout Standard
3118 This may not appear to be very useful.
3119 However, if you look at your preview, you will see that a table of contents
3120 has been generated, listing the various sections and subsections in your
3122 As usual, if you reorder sections or create new ones, you will see those
3123 changes in the preview when you update it.
3127 \begin_layout Standard
3128 The table of contents is not printed in the on-screen version of the document.
3129 But you can display the table of contents in a separate window by clicking
3130 on the table of contents button, or by using
3132 View\SpecialChar menuseparator
3134 \begin_inset space ~
3139 or the toolbar button
3142 arg "dialog-toggle toc"
3146 This menu will work even if you do not have a table of contents inset in
3148 This is a very useful tool for rearranging your document parts.
3149 Clicking on a (sub)section title in the
3153 window will highlight that line and move the display (in the \SpecialChar LyX
3155 to that place in the document.
3156 You can also use the arrow keys to move up and down in the table of contents.
3157 You may therefore find it convenient to leave this window open throughout
3159 You can get similar functionality from the
3163 menu, though, where the table of contents appears automatically.
3166 \begin_layout Standard
3167 To get rid of the Table of Contents, you can delete the table of contents
3168 button just like any other text.
3171 \begin_layout Labeling
3172 \labelwidthstring 00.00.0000
3177 : Fix the table of contents in
3182 \begin_layout Chapter
3186 \begin_layout Standard
3188 is used by many scientists because it outputs great looking equations,
3189 avoiding the control characters used by word processors and their equation
3191 Many of these scientists are frustrated, however, because writing equations
3192 in \SpecialChar LaTeX
3193 is more like programming than writing.
3194 Happily, \SpecialChar LyX
3195 has WYSIWYM support for equations.
3196 If you are used to \SpecialChar LaTeX
3197 , you will find that all of the usual \SpecialChar LaTeX
3199 can be typed in normally, but they will show up in a WYSIWYM fashion.
3200 If, on the other hand, you have never written in \SpecialChar LaTeX
3204 \begin_inset space ~
3209 will allow you to write professional-looking math quickly and easily.
3212 \begin_layout Section
3216 \begin_layout Standard
3217 Somewhere in your \SpecialChar LyX
3221 \begin_layout LyX-Code
3222 I like what Einstein said, E=mc^2, because it is
3223 \begin_inset Newline linebreak
3229 \begin_layout Standard
3230 Now, that equation does not look very good in \SpecialChar LyX
3231 and in the output; there
3232 is no space between the letters and the equals sign, and you would like
3233 to write an actual superscript for the
3234 \begin_inset Quotes eld
3238 \begin_inset Quotes erd
3242 That bad typesetting happened because we did not tell \SpecialChar LyX
3243 that we were writing
3244 a mathematical expression, so it typeset the equation like regular old
3248 \begin_layout Standard
3249 But we can create a formula that will be typeset properly.
3250 Highlight the equation and click the toolbar button
3258 Insert\SpecialChar menuseparator
3259 Math\SpecialChar menuseparator
3261 \begin_inset space ~
3267 If nothing is highlighted \SpecialChar LyX
3268 inserts a little blue square, which is an empty
3270 The expression appears in blue and the blue square disappears as soon as
3271 the formula is not empty.
3276 to leave the equation.
3277 The purple markers disappear, leaving the cursor to the right of the expression.
3278 Now, if you type something, it will be regular text.
3281 \begin_layout Standard
3282 Looking at the output you will notice that the expression was typeset nicely,
3283 with spaces between the letters and the equals sign, and a superscript
3285 \begin_inset Quotes eld
3289 \begin_inset Quotes erd
3293 Letters in math mode are assumed to be variables, and come out in italics.
3294 Numbers are just numbers.
3297 \begin_layout Standard
3298 This math editor is another example of the WYSIWYM philosophy.
3299 In \SpecialChar LaTeX
3300 , you write a mathematical expression using text and commands like
3306 ; this can be frustrating, because you cannot see what an expression looks
3307 like until you run the file under \SpecialChar LaTeX
3308 and you may have to spend time, for
3309 example, finding missing brackets.
3311 does not attempt to get the expression to look perfect (WYSIWYG), but
3312 it gives you an extremely good idea of what the expression will look like.
3314 then takes care of the professional typesetting.
3317 \begin_layout Section
3318 Navigating an Equation
3321 \begin_layout Standard
3323 \begin_inset Formula $E=mc^{2}$
3327 \begin_inset Formula $E=1+mc^{2}$
3331 Use the arrow keys to move the cursor into the expression.
3332 Note that when you enter the expression, the purple markers appear to let
3333 you know you are editing math.
3342 to move the cursor past the equals sign, and just type
3343 \begin_inset Quotes eld
3347 \begin_inset Quotes erd
3351 Again, you can use the arrow keys or
3355 to leave the formula\SpecialChar endofsentence
3359 \begin_layout Standard
3360 Other than the special keys described below, typing in math mode is like
3361 editing regular text.
3371 Select text either with the arrow keys or with the mouse.
3374 Edit\SpecialChar menuseparator
3377 works in math mode as well as cut and paste.
3378 One thing to be careful of: if you are left or right outside a formula
3387 respectively, you delete the whole formula.
3388 Luckily, you can just use
3395 \begin_layout Standard
3396 What if you want to change
3397 \begin_inset Formula $E=mc^{2}$
3401 \begin_inset Formula $E=mc^{2.5}+1$
3404 ? Again, you can use the mouse to click in the right place.
3405 However, you can also use the arrow keys.
3406 If the cursor is just after the
3407 \begin_inset Quotes eld
3411 \begin_inset Quotes erd
3415 \begin_inset Quotes eld
3419 \begin_inset Quotes erd
3426 and the cursor is moved to the level of the superscript, just before the
3428 \begin_inset Quotes eld
3432 \begin_inset Quotes erd
3437 \begin_inset Quotes eld
3441 \begin_inset Quotes erd
3449 will move the cursor back to the regular level.
3458 , the cursor will be placed
3462 the superscript (so that you can then type the
3463 \begin_inset Quotes eld
3467 \begin_inset Quotes erd
3473 \begin_layout Section
3474 Exponents and Indices
3477 \begin_layout Standard
3478 An exponent can be entered from the
3481 \begin_inset space ~
3486 (see below), but it is actually simpler just to type the caret key,
3487 \begin_inset Quotes eld
3491 \begin_inset Quotes erd
3496 will place another blue rectangle in the superscript, so that whatever
3497 you write next will be superscripted, and in a smaller font size.
3498 Everything you type until you hit a
3506 to exit the formula entirely) will be in the superscript.
3509 \begin_layout Standard
3510 Writing a subscript (index) is just as easy; start one by typing the underscore
3512 \begin_inset Quotes eld
3516 \begin_inset Quotes erd
3520 You can subscript and superscript both subscripts and superscripts like
3522 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3529 \begin_layout Labeling
3530 \labelwidthstring 00.00.0000
3536 \begin_inset space ~
3546 \begin_layout Section
3550 \begin_layout Standard
3554 \begin_inset space ~
3559 is a convenient way to enter symbols and/or to perform complicated formula
3561 Many of these operations can be accomplished from the keyboard or the
3563 Insert\SpecialChar menuseparator
3568 Edit\SpecialChar menuseparator
3571 menus (the latter only appears when you are in Math mode).
3572 However, we are going to concentrate on using the
3575 \begin_inset space ~
3580 , just to let you know what is out there; you can learn keyboard shortcuts
3581 and commands later from the
3588 \begin_layout Standard
3592 \begin_inset space ~
3597 is shown when the cursor is in a formula and can also be turned on manually
3600 View\SpecialChar menuseparator
3604 When you click there on
3605 \begin_inset Quotes eld
3609 \begin_inset Quotes erd
3615 arg "toolbar-toggle math"
3618 ) the toolbar will be shown permanently at the bottom; this state is visualized
3623 menu with a checkmark.
3624 When you click in this state again on
3625 \begin_inset Quotes eld
3629 \begin_inset Quotes erd
3639 \begin_inset space ~
3644 is only shown when the cursor is within a formula; this state is visualized
3645 by the renaming of the menu entry from
3646 \begin_inset Quotes eld
3650 \begin_inset Quotes erd
3654 \begin_inset Quotes eld
3658 \begin_inset space ~
3662 \begin_inset Quotes erd
3668 \begin_layout Subsection
3672 \begin_layout Standard
3676 \begin_inset space ~
3681 allows you to choose from a large array of symbols used in math: operators,
3682 arrows, relationships, delimiters, special characters, sums and integrals.
3683 Note that subscripting and superscripting allow you to put lower and upper
3684 limits on sums and integrals.
3687 \begin_layout Subsection
3688 Roots, decorations, and delimiters
3691 \begin_layout Standard
3692 To type a square root, just click on the button
3695 arg "math-insert \\sqrt"
3699 The square root appears, and the cursor is in a new insertion point inside
3701 You can type variables, numbers, other square roots, fractions, whatever
3704 will automatically resize the square root to fit what is inside.
3707 \begin_layout Standard
3709 \begin_inset Quotes eld
3713 \begin_inset Quotes erd
3717 \begin_inset Formula $\overrightarrow{a}$
3720 ) or group of characters (
3721 \begin_inset Formula $\overrightarrow{a+b}$
3724 ) is done similarly.
3725 Decorations are available from the toolbar via the button
3728 arg "math-insert \\hat"
3732 Click on a decoration, and \SpecialChar LyX
3733 will insert that decoration with an insertion
3734 point under (or over) it.
3735 Just type what you want in the insertion point.
3736 There are two sets of decorations: those that resize with the text you
3737 type, and those that have a fixed size, and are most appropriate for a
3742 \begin_layout Standard
3743 Delimiters such as parentheses, brackets, and braces work similarly, but
3744 are a bit more complicated.
3745 Hit the delimiter button
3748 arg "dialog-show mathdelimiter"
3756 Your current selection of delimiters is displayed in a box.
3757 It is a pair of parentheses by default, but you can choose a pair of braces,
3758 a brace and a parenthesis, or choose the empty square to have something
3760 \begin_inset Quotes eld
3764 \begin_inset Formula $a=\left\langle 7\right.$
3768 \begin_inset Quotes erd
3771 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3776 \begin_layout Standard
3777 If you are lazy, you can type actual parentheses in math mode, rather than
3783 However, those parentheses will be the same size as regular text, which
3784 will look bad if you have a big fraction or matrix inside the parentheses.
3785 So it is better to use one of the three delimiter buttons that insert them
3786 directly, for example
3789 arg "math-delim ( )"
3795 \begin_layout Standard
3796 You can also put delimiters or a square root sign or a decoration on already
3797 existing formula parts.
3798 Select the portion of the formula that you want to adjust, and then click
3799 on the button you want from the
3802 \begin_inset space ~
3808 Try using this to change Newton's second law from scalar to vector form
3810 \begin_inset Formula $f=ma$
3814 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3818 Once you have learned about matrices, this is how you will put parentheses
3819 or brackets around them.
3822 \begin_layout Subsection
3826 \begin_layout Standard
3827 To create a fraction, click on the fraction button
3830 arg "math-insert \\frac-square"
3836 \begin_inset space ~
3843 writes two insertion points in a fraction.
3844 As you would expect, you can use arrow keys or the mouse to move around
3846 Click on the top square and type
3847 \begin_inset Quotes eld
3851 \begin_inset Quotes erd
3860 \begin_inset Quotes eld
3864 \begin_inset Quotes erd
3868 You have made a fraction! Of course you can type anything within each of
3869 the two boxes: variables with exponents, square roots, other fractions,
3874 \begin_layout Labeling
3875 \labelwidthstring 00.00.0000
3881 \begin_inset space ~
3891 \begin_layout Subsection
3892 Functions: lim, log, sin and others
3895 \begin_layout Standard
3896 Because letters in math mode are considered to be variables, if you type
3898 \begin_inset Quotes eld
3902 \begin_inset Quotes erd
3905 in math mode, \SpecialChar LyX
3906 thinks you are typing the product of the three variables
3908 \begin_inset Formula $s$
3912 \begin_inset Formula $i$
3916 \begin_inset Formula $n$
3920 The three letters will be typeset in italics, when what you really wanted
3922 \begin_inset Quotes eld
3926 \begin_inset Quotes erd
3930 In addition, \SpecialChar LyX
3931 will not put a space between the word
3932 \begin_inset Quotes eld
3936 \begin_inset Quotes erd
3940 \begin_inset Quotes eld
3944 \begin_inset Quotes erd
3951 will exit the formula).
3953 \begin_inset Quotes eld
3957 \begin_inset Formula $\sin(x)$
3961 \begin_inset Quotes erd
3965 \begin_inset Quotes eld
3969 \begin_inset Formula $sin(x)$
3973 \begin_inset Quotes erd
3979 \begin_layout Standard
3983 \begin_inset space ~
3991 arg "math-insert \\functions"
3995 \begin_inset Quotes eld
3999 \begin_inset Quotes erd
4002 in the pop-up function list.
4004 \begin_inset Quotes eld
4008 \begin_inset Quotes erd
4011 is displayed in \SpecialChar LyX
4012 in black, and set in upright roman type.
4013 The whole word is treated as one symbol, so if you type
4017 , it will delete the whole word.
4019 \begin_inset Quotes eld
4023 \begin_inset Quotes erd
4026 , which will be written in blue italics, like you expect in a formula.
4027 In the output, the expression will be correctly typeset.
4031 \begin_layout Standard
4032 The function list includes other trigonometric functions and their inverses,
4033 hyperbolic functions, logarithms, limits, and quite a few others.
4034 These functions can take subscripts and superscripts, important for typing
4036 \begin_inset Quotes eld
4040 \begin_inset Formula $\cos^{2}\theta$
4044 \begin_inset Quotes erd
4048 \begin_inset Quotes eld
4052 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4056 \begin_inset Quotes erd
4062 \begin_layout Labeling
4063 \labelwidthstring 00.00.0000
4069 \begin_inset space ~
4079 \begin_layout Subsection
4083 \begin_layout Standard
4084 Click on the matrix button
4087 arg "dialog-show mathmatrix"
4093 \begin_inset space ~
4099 A pop-up dialog allows you to choose how many rows and columns you want
4101 Choose 2 rows and 3 columns and hit
4107 prints 6 insertion points in a
4108 \begin_inset Formula $2\times3$
4112 As usual, you can put any sort of formula expression (a square root, another
4113 matrix, etc.) in each insertion point.
4114 You can also leave some of the insertion points empty if you want.
4117 \begin_layout Standard
4122 can be used to move horizontally between the columns of a matrix.
4123 Alternatively, you can use the arrow keys to move around - hitting
4127 at the end of one box will move to the next box,
4131 will move to the next row, etc.
4134 \begin_layout Standard
4135 If you need to change the number of rows and columns, use the menu
4137 Edit\SpecialChar menuseparator
4139 \begin_inset space \thinspace{}
4143 \begin_inset space \thinspace{}
4148 or the math toolbar buttons
4151 arg "tabular-feature append-row"
4157 arg "tabular-feature delete-row"
4163 arg "tabular-feature append-column"
4169 arg "tabular-feature delete-column"
4175 \begin_layout Standard
4180 for information on how to change the horizontal alignment of each column,
4181 and how to change the vertical position of the whole matrix.
4182 Note that if you want to write a table containing text, you should use
4184 's wonderful table support, rather than trying to write text in a matrix.
4187 \begin_layout Subsection
4191 \begin_layout Standard
4192 All of the expressions we have written so far have been on the same line
4193 as the text that came before and after them, otherwise known as inline
4195 This is fine for short, simple expressions, but if you want to write larger
4196 ones, or if you want your expressions to stand out from the text, you need
4197 to write them in display mode.
4198 In addition, only displayed expressions can be labeled and numbered (see
4203 ), and multi-line equations must be in display mode.
4206 \begin_layout Standard
4207 While being in a formula, click on the display button
4218 This centers the formula and adds a blank line before and after it.
4219 Now type in an expression and compile your file to see how it looks.
4220 The display button is actually a toggle; use it now to change a couple
4221 of your expressions to display mode and back.
4225 \begin_layout Standard
4226 Display mode has a couple differences from inline mode:
4229 \begin_layout Itemize
4230 The default font is larger for a few symbols, like
4231 \begin_inset Formula $\sum$
4235 \begin_inset Formula $\int$
4241 \begin_layout Itemize
4242 Subscripts and superscripts for limits and sums (but not integrals) are
4243 written under and over rather than next to the symbols
4246 \begin_layout Itemize
4250 \begin_layout Standard
4251 Other than these differences, though, displayed expressions and inline expressio
4252 ns are very similar.
4255 \begin_layout Standard
4256 One final note about the way displayed formulas are typeset: be careful
4257 about whether you are putting your equation into a new paragraph or not.
4258 If your formula is in the middle of a sentence or paragraph, then do not
4264 Doing so will cause the text
4268 the formula to start a new paragraph.
4269 That text will be indented or follow a blank line, depending on your document
4270 paragraph settings, which is probably not what you want.
4273 \begin_layout Labeling
4274 \labelwidthstring 00.00.0000
4279 : Put the various equations in
4283 into display mode, and see how they are typeset differently.
4286 \begin_layout Labeling
4287 \labelwidthstring 00.00.0000
4292 : Using various tools you have learned in this section, you should be able
4293 to write an equation like:
4297 \begin_layout Plain Layout
4298 After you have done it the hard way, give
4300 Insert\SpecialChar menuseparator
4301 Math\SpecialChar menuseparator
4303 \begin_inset space ~
4314 \begin_inset Formula
4316 f(x)=\left\{ \begin{array}{cc}
4319 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4328 \begin_layout Section
4332 \begin_layout Standard
4333 Now you are familiar with the basics.
4335 's math editor can do a lot more.
4336 You can refer to the
4340 manual for tips on how to:
4343 \begin_layout Itemize
4344 Label and number expressions.
4347 \begin_layout Itemize
4348 Create multi-line equations.
4351 \begin_layout Itemize
4352 Change typefaces, e.
4353 \begin_inset space \thinspace{}
4357 \begin_inset space \space{}
4360 to write bold-face text in an expression.
4363 \begin_layout Itemize
4364 Fine-tune font sizes and spacing within an expression.
4365 (Do not worry about this until your final draft!)
4368 \begin_layout Itemize
4370 These are very powerful, because you just define them once at the top of
4371 the document, and then you can use them throughout the document.
4374 \begin_layout Itemize
4375 Do almost all you can do with math.
4378 \begin_layout Chapter
4382 \begin_layout Section
4383 Other major \SpecialChar LyX
4387 \begin_layout Standard
4388 We have not gone through all the possible commands in \SpecialChar LyX
4389 , and we are not planning
4398 \begin_inset space ~
4403 manual for more information.
4404 We will just mention a couple more major things \SpecialChar LyX
4408 \begin_layout Itemize
4410 has WYSIWYM support for tables.
4413 Insert\SpecialChar menuseparator
4419 arg "tabular-insert"
4423 Click on the table with the
4430 \begin_inset space ~
4435 dialog box which allows extensive table editing.
4439 arg "toolbar-toggle table"
4442 the table toolbar will appear permanently.
4445 \begin_layout Itemize
4447 also supports including pictures in any format within documents.
4450 Insert\SpecialChar menuseparator
4456 arg "dialog-show-new-inset graphics"
4460 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4461 can have captions, and \SpecialChar LyX
4462 will automatically generate lists of figures and/or
4466 \begin_layout Itemize
4468 is heavily configurable.
4469 Everything from how the \SpecialChar LyX
4470 window looks to how the output comes out can be
4471 configured in a number of ways.
4472 Much configuration is done through
4474 Tools\SpecialChar menuseparator
4478 For more information on this, check out
4480 Help\SpecialChar menuseparator
4481 Customization\SpecialChar endofsentence
4485 \begin_layout Itemize
4487 is being developed by a team of programmers on five continents.
4488 Therefore, \SpecialChar LyX
4489 has better support for non-English languages (such as Dutch,
4490 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4491 ) than many word processors.
4492 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4493 languages Chinese Japanese, and Korean are supported.
4494 You can write documents in other languages and you can also configure \SpecialChar LyX
4496 to show its menus and error messages in other languages.
4500 \begin_layout Itemize
4501 The \SpecialChar LyX
4502 menus feature keybindings.
4503 This means that you can do
4505 File\SpecialChar menuseparator
4516 or by using the binding which is shown next to it in the menu (
4523 Keybindings are also configurable.
4524 For information on this, check out
4526 Help\SpecialChar menuseparator
4527 Customization\SpecialChar endofsentence
4531 \begin_layout Itemize
4533 can read \SpecialChar LaTeX
4536 \begin_inset space ~
4540 \begin_inset CommandInset ref
4542 reference "sec:tex2lyx"
4549 \begin_layout Itemize
4550 Spell-checking, thesaurus, and word count facilities are available.
4553 \begin_layout Itemize
4554 Generation of indexes and nomenclatures/glossaries is supported.
4557 \begin_layout Section
4559 for \SpecialChar LaTeX
4561 \begin_inset CommandInset label
4563 name "sec:latexusers"
4570 \begin_layout Standard
4571 If you do not know anything about \SpecialChar LaTeX
4572 , you do not have to read this section.
4573 Actually, you might want to
4577 about \SpecialChar LaTeX
4578 , and then read this chapter.
4579 However, some of those who begin to use \SpecialChar LyX
4580 will be familiar with \SpecialChar LaTeX
4582 If you are such a person, you may be wondering if \SpecialChar LyX
4583 can really do everything
4586 The short answer is that \SpecialChar LyX
4587 can do pretty much everything \SpecialChar LaTeX
4589 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4594 \begin_layout Standard
4595 Because this is just a tutorial, we are only going to mention things that
4596 new \SpecialChar LyX
4597 users will most likely be interested in.
4598 In the interests of keeping the Tutorial short, we will give only minimal
4603 \begin_inset space ~
4611 \begin_inset space ~
4616 manuals have a great deal of information on differences between \SpecialChar LyX
4617 and \SpecialChar LaTeX
4619 and how to do various \SpecialChar LaTeX
4620 tricks in \SpecialChar LyX
4624 \begin_layout Subsection
4629 \begin_layout Standard
4630 Anything that you enter in \SpecialChar TeX
4631 mode will be passed straight to \SpecialChar LaTeX
4633 displayed in red on the screen.
4634 You can use \SpecialChar TeX
4635 commands in \SpecialChar LyX
4638 Insert\SpecialChar menuseparator
4640 \begin_inset space ~
4652 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4656 \begin_layout Standard
4657 In a math formula, \SpecialChar TeX
4658 mode is handled a bit differently.
4660 mode is entered there by typing a backslash.
4661 The backslash is not written out, but anything you type afterwards will
4663 You exit \SpecialChar TeX
4668 or some other non-alphabetic character, like a number, underscore, caret
4670 Once you exit \SpecialChar TeX
4671 mode, if \SpecialChar LyX
4672 knows the \SpecialChar TeX
4673 command you have typed in, it will
4674 convert it to WYSIWYM\SpecialChar endofsentence
4676 \begin_inset Quotes eld
4686 \begin_inset Quotes erd
4689 in a formula and then press
4695 \begin_inset Quotes eld
4699 \begin_inset Quotes erd
4703 \begin_inset Quotes eld
4707 \begin_inset Formula $\gamma$
4711 \begin_inset Quotes erd
4715 This will work for almost all, non-complicated math macros.
4716 This may be faster than using the
4719 \begin_inset space ~
4724 , and will be especially convenient for experienced \SpecialChar LaTeX
4728 \begin_layout Standard
4729 As a special case, if you type
4730 \begin_inset Quotes eld
4740 \begin_inset Quotes erd
4743 in a formula, the beginning
4747 ending braces will be inserted in red while the cursor is placed between
4749 This makes it more convenient to type those commands that take an argument.
4752 \begin_layout Standard
4754 cannot do absolutely everything that \SpecialChar LaTeX
4756 Some fancy functions are not supported at all, while some work but are
4759 mode allows users to get the full flexibility of \SpecialChar LaTeX
4760 , while having all the
4761 convenient features of \SpecialChar LyX
4762 , like WYSIWYM math, tables, and editing.
4764 could never support every \SpecialChar LaTeX
4772 in the preamble (see Section
4773 \begin_inset space ~
4777 \begin_inset CommandInset ref
4779 reference "sec:preamble"
4783 ), you can use any package you want — although you will not have WYSIWYM
4784 support for that package's features.
4787 \begin_layout Subsection
4788 Importing \SpecialChar LaTeX
4794 \begin_inset CommandInset label
4803 \begin_layout Standard
4804 You can import a \SpecialChar LaTeX
4805 file into \SpecialChar LyX
4808 File\SpecialChar menuseparator
4809 Import\SpecialChar menuseparator
4811 \begin_inset space ~
4816 menu in \SpecialChar LyX
4818 This will call the program
4822 which will create a file foo.lyx from the file foo.tex.
4824 will then open that file.
4825 If the translation does not work, you can try calling
4829 from the command line, possibly using fancier options.
4832 \begin_layout Standard
4833 Even when the translation does work,
4837 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4839 It will leave things it does not understand in \SpecialChar TeX
4840 mode; so, after translating
4845 , you can look for the red text and manually edit it to get it right.
4848 \begin_layout Standard
4853 has its own documentation (manpage), which Unix/Linux users can access
4854 via the console command
4857 \begin_inset space ~
4863 The manpage describes which \SpecialChar LaTeX
4864 commands and environments are not supported,
4865 what bugs you might run into (and how to get around them), and how to use
4866 the various options.
4869 \begin_layout Standard
4870 It is important to understand that
4874 can only translate files whose document class is
4875 \begin_inset Quotes eld
4879 \begin_inset Quotes erd
4883 , that is, for which there is a corresponding \SpecialChar LyX
4889 If there is no layout file, then you will get an error saying that the
4890 conversion could not be performed.
4891 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4896 simply will not know how to translate the \SpecialChar LaTeX
4897 that it finds there into things
4900 More about layout files and how they are created is explained in detail
4908 \begin_layout Subsection
4909 Converting \SpecialChar LyX
4910 Documents to \SpecialChar LaTeX
4914 \begin_layout Standard
4915 You might wish to convert a \SpecialChar LyX
4916 Document to a \SpecialChar LaTeX
4918 For example, a co-worker or co-author who does not have \SpecialChar LyX
4923 File\SpecialChar menuseparator
4924 Export\SpecialChar menuseparator
4928 This will create a file
4936 file you are editing.
4939 \begin_layout Subsection
4944 \begin_layout Subsubsection
4948 \begin_layout Standard
4951 Document\SpecialChar menuseparator
4954 dialog takes care of the document-wide options, such as changing the document
4955 class, default font size and paper size.
4956 Document class options and also options for \SpecialChar LaTeX
4957 packages can be entered there
4961 \begin_inset space ~
4969 \begin_layout Subsubsection
4970 Other Preamble Matter
4971 \begin_inset CommandInset label
4980 \begin_layout Standard
4981 If you have special commands to put in the preamble of a \SpecialChar LaTeX
4983 use them in a \SpecialChar LyX
4987 Document\SpecialChar menuseparator
4988 Settings\SpecialChar menuseparator
4990 \begin_inset space ~
4995 and type in the dialog window (or from the document settings dialog, depending
4997 Anything you type will (as with \SpecialChar TeX
4998 mode) be sent directly to \SpecialChar LaTeX
5002 \begin_layout Subsection
5007 \begin_layout Standard
5009 has support for Bib\SpecialChar TeX
5010 , which allows you to build databases of bibliographical
5011 references to be used in multiple documents.
5014 Insert\SpecialChar menuseparator
5016 \begin_inset space \thinspace{}
5020 \begin_inset space \thinspace{}
5023 TOC\SpecialChar menuseparator
5025 \begin_inset space ~
5040 field you load Bib\SpecialChar TeX
5045 field you can load Bib\SpecialChar TeX
5049 \begin_layout Standard
5050 After you have done this, you can use citations from any bibliographies
5051 you have included with
5053 Insert\SpecialChar menuseparator
5057 \begin_inset space ~
5061 \begin_inset CommandInset ref
5063 reference "sec:bibliographies"
5072 dialog will show a list of all the references in your
5080 \begin_layout Section
5084 \begin_layout Standard
5085 Sometimes when you try to view a document, there will be errors, things
5086 that \SpecialChar LyX
5087 or \SpecialChar LaTeX
5089 When this happens, \SpecialChar LyX
5094 \begin_inset space ~
5100 Clicking on individual errors in this dialog will take you to the place
5101 in the \SpecialChar LyX
5102 document where the error occurs and also display the detailed \SpecialChar LaTeX