1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
8 % DO NOT ALTER THIS PREAMBLE!!!
10 %This preamble is designed to ensure that the document prints
11 % out as advertised. If you mess with this preamble,
12 % parts of the document may not print out as expected. If you
13 % have problems LaTeXing this file, please contact
14 % the documentation team
15 % email: lyx-docs@lists.lyx.org
17 % the pages of the TOC is numbered roman
18 % and a pdf-bookmark for the TOC is added
19 \let\myTOC\tableofcontents
20 \renewcommand\tableofcontents{%
22 \pdfbookmark[1]{\contentsname}{}
26 \use_default_options false
30 \maintain_unincluded_children false
32 \language_package default
35 \font_roman "palatino" "default"
36 \font_sans "helvet" "default"
37 \font_typewriter "courier" "default"
38 \font_math "auto" "auto"
39 \font_default_family default
40 \use_non_tex_fonts false
43 \font_sf_scale 100 100
44 \font_tt_scale 100 100
46 \default_output_format default
48 \bibtex_command default
49 \index_command default
53 \pdf_title "The LyX Tutorial"
54 \pdf_author "LyX Team"
55 \pdf_subject "LyX-documentation Tutorial"
56 \pdf_keywords "LyX, documentation"
58 \pdf_bookmarksnumbered true
59 \pdf_bookmarksopen true
60 \pdf_bookmarksopenlevel 1
65 \pdf_pdfusetitle false
66 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
69 \use_package amsmath 0
70 \use_package amssymb 0
73 \use_package mathdots 1
74 \use_package mathtools 0
76 \use_package stackrel 0
77 \use_package stmaryrd 0
78 \use_package undertilde 0
80 \cite_engine_type default
84 \paperorientation portrait
94 \paragraph_separation indent
95 \paragraph_indentation default
96 \quotes_language english
99 \paperpagestyle headings
100 \tracking_changes false
101 \output_changes false
104 \html_be_strict false
115 by the \SpecialChar LyX
120 \begin_layout Plain Layout
122 If you have comments on or corrections to this documentation, please send
123 them to the \SpecialChar LyX
124 Documentation mailing list:
125 \begin_inset CommandInset href
127 target "lyx-docs@lists.lyx.org"
140 \begin_layout Standard
141 \begin_inset CommandInset toc
142 LatexCommand tableofcontents
149 \begin_layout Chapter
153 \begin_layout Section
154 Welcome to \SpecialChar LyX
158 \begin_layout Standard
159 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
162 Now, do not panic - you will not need to learn \SpecialChar LaTeX
163 to use \SpecialChar LyX
165 That is, after all, the whole point of \SpecialChar LyX
166 : to provide an almost-WYSIWYG interface
167 to \SpecialChar LaTeX
169 There are some things you will need to learn, however, in order to use
174 \begin_layout Standard
175 Some of you probably found your way to this document because you tried to
176 put two spaces after a
177 \begin_inset Quotes eld
181 \begin_inset Quotes erd
184 or tried to put three blank lines between paragraphs.
185 You found out you could not and, in fact, you will find out that most of
186 the little tricks you are accustomed to use in word processors will not
187 work in \SpecialChar LyX
189 That is because most word processors you have used before allow you manually
190 to enter all spacings, font changes, and so on.
191 So you end up not only writing a document but typesetting it, too.
193 does the typesetting for you, in a consistent fashion, letting you focus
194 on the important things, like the content of your writing.
197 \begin_layout Standard
198 So read on to learn more about \SpecialChar LyX
200 Reading this tutorial is definitely worth the time.
203 \begin_layout Section
213 \begin_layout Standard
214 Before we get started with this section, you need to know that this
218 uses the notation outlined in the
223 If you came to this manual first, please read the
227 before you continue with the
234 \begin_layout Standard
235 Now that you know which fonts mean what in the documentation, we want to
236 talk a bit about what this
243 \begin_layout Subsection
244 Getting the most out of the Tutorial
247 \begin_layout Standard
248 This tutorial consists of examples and exercises.
249 To get the most out of this document, you should read through it, typing
250 all the little things we are telling you to type and trying out all of
251 the exercises to see if you get them right.
252 For convenience, you might want to print out the PDF version of this document.
255 \begin_layout Standard
256 If you are familiar with \SpecialChar LaTeX
257 , you will probably be able to read the
261 somewhat faster, since many \SpecialChar LyX
262 ideas are just \SpecialChar LaTeX
264 However, \SpecialChar LyX
265 has features you will want to learn about.
266 Even if you do not feel like reading the rest of the
270 , you should definitely check out Section
275 \begin_inset CommandInset ref
277 reference "sec:latexusers"
281 , which is specifically written for experienced \SpecialChar LaTeX
285 \begin_layout Subsection
293 \begin_layout Itemize
294 Detailed explanations of all of \SpecialChar LyX
296 \begin_inset Separator parbreak
303 \begin_layout Standard
312 \begin_layout Itemize
313 Detailed explanations of \SpecialChar LaTeX
315 \begin_inset Separator parbreak
322 \begin_layout Standard
324 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
327 can have a look at the
339 \begin_layout Standard
340 It is time to move on, time for your first document \SpecialChar ldots
344 \begin_layout Chapter
345 Getting started with \SpecialChar LyX
349 \begin_layout Section
350 Your first \SpecialChar LyX
354 \begin_layout Standard
355 OK\SpecialChar endofsentence
356 You are ready to start writing.
357 Before you do, there are a few things we need to mention, which will hopefully
358 make the Tutorial more instructive and useful.
362 \begin_layout Standard
363 Because there is information we cannot give you in the Tutorial, the
369 thing that you need to do is find the
376 Start up \SpecialChar LyX
386 You may want to load the
390 as well (if you are not reading it within \SpecialChar LyX
392 This way, you can read them while you are writing your own file.
396 \begin_layout Plain Layout
397 They can also serve as good examples of how to use the many features of
404 Note that once you have got more than one document open, you can use the
409 menu or the document tabs to switch between them.
412 \begin_layout Standard
413 In this Tutorial, we are going to assume that you have a fully working version
415 , as well as a \SpecialChar LaTeX
416 -distribution and a PDF-viewer.
417 This should be the case on all major Linux- and BSD-distributions, as well
418 as on Windows, where this is setup by the \SpecialChar LyX
422 \begin_layout Standard
423 Finally, we have written a file called
427 to let you practice your \SpecialChar LyX
429 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
432 As you learn new \SpecialChar LyX
433 functions, we will suggest that you fix those parts of
439 It also contains `subtle' hints about how to fix things.
443 \begin_layout Plain Layout
444 The hints are located in yellow
445 \begin_inset Quotes eld
449 \begin_inset Quotes erd
453 Access the text in a note by clicking on it.
458 If you want to cheat, or check what you have done, there is also a file
463 which contains the same text written and typeset by a \SpecialChar LyX
467 \begin_layout Standard
468 The example files can be found in the
472 directory of \SpecialChar LyX
473 's installation folder.
480 File\SpecialChar menuseparator
487 to save a copy in your own directory for you to work on.
488 As you fix parts of the raw document, check to see how those changes affect
492 \begin_layout Standard
497 directory contains lots of other examples files.
498 They will show you how to do various fancy things with \SpecialChar LyX
500 After you have read the Tutorial, or when you are confused about how to
501 do something fancy in \SpecialChar LyX
502 , take a look at these files.
505 \begin_layout Subsection
506 Typing, Viewing, and Exporting
509 \begin_layout Itemize
512 File\SpecialChar menuseparator
516 \begin_layout Itemize
517 Type a sentence like:
519 This is my first \SpecialChar LyX
523 \begin_layout Itemize
524 Save your document with
526 File\SpecialChar menuseparator
531 As\SpecialChar endofsentence
535 \begin_layout Itemize
536 Create a PDF file, with
538 Document\SpecialChar menuseparator
541 or the toolbar button
549 will open a PDF-viewer program displaying your document as it will look
554 \begin_layout Plain Layout
555 You can save time by leaving the PDF-viewer running in the background.
558 Document\SpecialChar menuseparator
561 or the toolbar button
567 and just click on the PDF-viewer window (or unminimize it) afterwards.
575 \begin_layout Itemize
576 Export the ready to print document with
578 File\SpecialChar menuseparator
586 \begin_layout Standard
587 Congratulations! You have written your first \SpecialChar LyX
589 All of the rest is just details.
592 \begin_layout Subsection
596 \begin_layout Standard
598 can of course do most of the things you are used to doing with a word processor.
599 It will word-wrap and indent paragraphs automatically.
600 Here is a quick description of how to do some simple actions.
603 \begin_layout Description
604 Undo \SpecialChar LyX
605 has multiple levels of undo, which means you can undo everything you
606 have done since your current editing session started, by selecting
608 Edit\SpecialChar menuseparator
617 ) over and over again.
618 If you undo too much, just select
620 Edit\SpecialChar menuseparator
630 \begin_inset Separator parbreak
637 \begin_layout Standard
638 Currently, undo is limited to 100 steps.
642 \begin_layout Description
645 Edit\SpecialChar menuseparator
656 Edit\SpecialChar menuseparator
667 Edit\SpecialChar menuseparator
676 ) to cut, copy, and paste.
677 Or automatically paste selected text (including selections from other programs)
685 \begin_layout Description
688 Edit\SpecialChar menuseparator
702 arg "dialog-show findreplace"
706 In the dialog, search with the
718 button to replace a word you have found.
722 \begin_layout Plain Layout
723 Close the window when you are done or leave it open if you find it more
725 Most dialog boxes in \SpecialChar LyX
726 can operate like this.
727 Just be sure you have the right window in focus when you are trying to
728 type in the main \SpecialChar LyX
729 window or a \SpecialChar LyX
735 If you like, you can specify whether to make the search case-sensitive,
736 or to search for only complete words; you can also search backwards through
740 \begin_layout Description
755 , which will by default print characters in italics), set it in
765 , usually small caps, used for people's names), or use your own formatting
768 Edit\SpecialChar menuseparator
773 Style\SpecialChar menuseparator
776 dialog (toolbar button
779 arg "dialog-show character"
785 \begin_layout Description
786 Toolbar Other buttons on the toolbar allow you to do some of the more popular
814 \begin_layout Standard
815 Of course, you have not yet written enough to make most of these functions
817 As you write more, though, try undoing, pasting, etc.
820 \begin_layout Subsection
821 WYSIWYM: Whitespace in \SpecialChar LyX
825 \begin_layout Standard
826 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
829 As many times as you hit
833 , you will only get one blank line.
834 As many times as you hit
838 , you will only get one space.
839 On a blank line, \SpecialChar LyX
840 will not let you type even one space.
845 key will not move you forward one tab stop; in fact there
849 no tab stops! There is no ruler at the top of the page to let you set tabs
853 \begin_layout Standard
854 Many word processors are based on the WYSIWYG principle:
855 \begin_inset Quotes eld
858 What You See Is What You Get.
859 \begin_inset Quotes erd
863 , on the other hand, is based on the principle that
864 \begin_inset Quotes eld
867 What You See Is What You
872 \begin_inset Quotes erd
875 You type what you mean and \SpecialChar LyX
876 will take care of typesetting it for you so
877 that the output looks nice.
882 grammatically separates paragraphs and a
886 grammatically separates words; so there is no reason to have several of
891 has no grammatical function at all - so \SpecialChar LyX
893 Using \SpecialChar LyX
894 , you will spend more of your time worrying about the
898 of your document and less time worrying about the
907 for more information on the WYSIWYM concept.
910 \begin_layout Standard
912 does have (many) ways to fine-tune the formatting of your document.
913 After all, \SpecialChar LyX
923 has information about all that.
924 It includes horizontal fills and vertical space — which are more powerful
925 and versatile than multiple spaces or blank lines — and ways to change
926 font sizes, character styles, and paragraph alignments by hand.
927 The idea, though, is that you can write your whole document, focusing on
928 content, and just worry about that fine-tuning at the end.
929 With standard word processors, you will be distracted by document formatting
930 throughout the writing process.
933 \begin_layout Section
937 \begin_layout Standard
938 Different parts of a document have different purposes; we call these parts
944 Most of a document is made up of regular text.
945 Section titles (chapter, subsection, etc.) let the reader know that a new
946 topic or subtopic will be discussed.
947 Certain types of documents have special environments.
948 A journal article will have an abstract and a title.
949 A letter will have neither of these, but will probably have an environment
950 that gives the writer's address.
953 \begin_layout Standard
954 Environments are a major part of the
955 \begin_inset Quotes eld
958 What You See Is What You Mean
959 \begin_inset Quotes erd
962 philosophy of \SpecialChar LyX
964 A given environment may require a certain font style, font size, indenting,
965 line spacing, and more.
966 This problem is aggravated, because the exact formatting for a given environmen
967 t may change: one journal may use boldface, 18 point, centered type for
968 section titles while another uses italicized, 15 point, left justified
969 type; different languages may have different standards for indenting; and
970 bibliography formats can vary widely.
972 lets you avoid learning all the different formatting styles.
975 \begin_layout Standard
980 choice box is located on the left end of the toolbar and looks like this:
982 \begin_inset Graphics
983 filename clipart/ToolbarEnvBox.png
990 It indicates in which environment you are currently writing.
991 While you were writing your first document, it said
992 \begin_inset Quotes eld
996 \begin_inset Quotes erd
999 which is the default environment for text.
1000 Now you will put a number of environments in your new document so that
1001 you can see how they work.
1004 \begin_layout Subsection
1005 Sections and Subsections
1008 \begin_layout Standard
1013 on the first line of your new \SpecialChar LyX
1026 \begin_layout Plain Layout
1032 If nothing is selected, \SpecialChar LyX
1033 changes the paragraph you are currently in to
1034 the selected environment.
1035 Alternatively, you can change several paragraphs to a different environment
1036 by selecting them before picking an environment.
1053 , which will be covered below.
1056 \begin_inset Quotes eld
1060 \begin_inset Quotes erd
1063 and typesets the section heading (title) in a larger font.
1068 \SpecialChar endofsentence
1074 \begin_inset Quotes eld
1078 \begin_inset Quotes erd
1082 \begin_inset Quotes eld
1086 \begin_inset Quotes erd
1090 Section headings, like most environments, are assumed to end when you type
1095 \SpecialChar endofsentence
1096 Type the document introduction:
1099 \begin_layout LyX-Code
1100 This is an introduction to my first \SpecialChar LyX
1104 \begin_layout Standard
1120 \begin_inset Quotes eld
1124 \begin_inset Quotes erd
1127 and waits for you to type a title.
1129 \begin_inset Quotes eld
1135 \begin_inset space ~
1141 \begin_inset Quotes erd
1144 , and you will see that \SpecialChar LyX
1145 again sets it as a section title.
1148 \begin_layout Standard
1150 Go to the end of Section
1151 \begin_inset space ~
1155 \begin_inset Quotes eld
1158 my first \SpecialChar LyX
1160 \begin_inset Quotes erd
1176 Again, \SpecialChar LyX
1178 \begin_inset Quotes eld
1182 \begin_inset Quotes erd
1185 and waits for you to type a title.
1192 \begin_inset space ~
1196 \begin_inset Quotes eld
1200 \begin_inset Quotes erd
1204 \begin_inset space ~
1207 2, has been automatically renumbered to Section
1208 \begin_inset space ~
1211 3! In true WYSIWYM fashion, you just need to identify the text that makes
1212 up the section titles, and \SpecialChar LyX
1213 takes care of numbering the sections and typesettin
1217 \begin_layout Standard
1226 environment, and type the following five lines:
1229 \begin_layout LyX-Code
1230 Sections and subsections are described below.
1233 \begin_layout LyX-Code
1237 \begin_layout LyX-Code
1238 Sections are bigger than subsections.
1241 \begin_layout LyX-Code
1242 Subsection description
1245 \begin_layout LyX-Code
1246 Subsections are smaller than sections.
1249 \begin_layout Standard
1250 Click on the second line and select
1260 numbers the subsection
1261 \begin_inset Quotes eld
1265 \begin_inset Quotes erd
1268 , and typesets it in a font which is bigger than regular text but smaller
1269 than the section title.
1270 Change the fourth line to the
1274 environment as well.
1275 As you probably expected, \SpecialChar LyX
1276 automatically numbered the section
1277 \begin_inset Quotes eld
1281 \begin_inset Quotes erd
1285 If you put yet another section before Section
1286 \begin_inset space ~
1290 \begin_inset space ~
1293 2 will be renumbered as Section 3, and the subsections will be renumbered
1295 \begin_inset Quotes eld
1299 \begin_inset Quotes erd
1303 \begin_inset Quotes eld
1307 \begin_inset Quotes erd
1313 \begin_layout Standard
1314 Further levels of sectioning include
1327 We will let you play with these on your own.
1328 You may notice that paragraph and subparagraph headings are not numbered
1329 by default, and that subparagraphs are indented; see the
1333 for an explanation and how to change this.
1338 headings are actually the highest level of sectioning, above
1342 s, but you are only allowed to use them in certain types (text classes)
1344 documents (see Section
1345 \begin_inset space ~
1349 \begin_inset CommandInset ref
1351 reference "sec:Document-Classes"
1358 \begin_layout Standard
1359 Finally, you may want to have sections or subsections that are not numbered.
1360 There are environments for this as well.
1361 If you change one of your section headings to the
1365 environment (you may have to scroll down in the
1369 box to find it), \SpecialChar LyX
1370 will use the same font size for the heading as it uses
1371 for a regular section, but it will not number that section.
1372 There are corresponding
1373 \begin_inset Quotes eld
1377 \begin_inset Quotes erd
1380 heading environments for
1389 Try changing some of your sections or subsections to the starred environments,
1390 and note how the other section numbers are updated.
1393 \begin_layout Standard
1398 : Fix the section and subsection headings in
1406 \begin_layout Subsection
1410 \begin_layout Standard
1412 has several different environments for typesetting lists.
1413 The various list environments free you from hitting
1417 a million times when writing an outline, or from renumbering a whole list
1418 when you want to add a point in the middle of the list.
1419 Different types of documents logically require different list environments:
1422 \begin_layout Itemize
1423 A slide presentation might use the
1427 environment's bulleted lists to describe different points.
1430 \begin_layout Itemize
1431 An outline would use the
1435 environment's numbered lists (and lettered sublists).
1438 \begin_layout Itemize
1439 A document describing several software packages could use the
1443 environment, where each item in the list begins with a bold-faced word.
1446 \begin_layout Itemize
1455 ) environment is a variation on the
1462 \begin_layout Standard
1463 Let us write a list of reasons why \SpecialChar LyX
1464 is better than other word processors.
1465 Somewhere in your document, type:
1468 \begin_layout Standard
1472 is better than other word processors because:
1475 \begin_layout Standard
1492 arg "layout Itemize"
1498 \begin_inset Quotes eld
1502 \begin_inset Quotes erd
1506 Type in your reasons:
1509 \begin_layout LyX-Code
1510 Typesetting is done for you.
1513 \begin_layout LyX-Code
1517 \begin_layout LyX-Code
1518 Lists are very easy to create!
1521 \begin_layout Standard
1522 List environments, unlike headings, do not end when you type
1527 Instead, \SpecialChar LyX
1528 assumes you are going on to the next item in the list.
1529 The above will therefore result in a three-item list.
1530 If you want more than one paragraph within one list
1534 , one way is to use the
1537 \begin_inset space ~
1542 , which you get by typing
1547 In order to get out of the list, you need to reselect the
1551 environment (or just use the key binding
1554 arg "layout Standard"
1560 \begin_layout Standard
1561 You now have a beautiful itemized list.
1562 You might want to run \SpecialChar LaTeX
1563 to see how the list looks when printed out.
1564 But what if you wanted to number the reasons? Well, just select the whole
1569 \begin_layout Plain Layout
1571 will not let you select the first bullet (or the actual number in a numbered
1572 section title) unless you also select the paragraph
1576 it, which you probably do not want to do.
1577 This is on purpose because the bullet or number depends on the document
1578 settings or text position, respectively.
1594 arg "layout Enumerate"
1598 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1599 will fix the numbering.
1602 \begin_layout Standard
1603 While the list is still selected, you can change to the other two list environme
1611 \begin_inset space \thinspace{}
1617 \begin_inset space \thinspace{}
1627 arg "layout Description"
1636 ), in order to see what they look like.
1637 For those two environments, each list item is made up of a term, which
1638 is the item's first word, followed by a definition, which is the rest of
1639 the paragraph (until you hit
1644 The term is either typeset in boldface (
1649 \begin_inset Quotes eld
1653 \begin_inset Quotes erd
1660 \begin_layout Plain Layout
1661 But a typesetter's tab, which will change to fit the size of the largest
1662 term, not a pathetic, rigid, unchangeable typewriter
1675 ) from the rest of the paragraph.
1676 If you want to have more than one word in the definition, then separate
1680 \begin_inset space ~
1688 \begin_layout Standard
1693 : Typeset the list in
1698 \begin_layout Standard
1699 You can nest lists within each other in all sorts of interesting ways.
1700 An obvious example would be writing outlines.
1701 Numbered and bulleted lists will have different numbering and bulleting
1702 schemes for sublists.
1707 for details on the different sorts of lists and for examples of nestings.
1710 \begin_layout Subsection
1711 Other environments: Verses, Quotations, and more
1714 \begin_layout Standard
1715 There are two environments for setting quotations apart from surrounding
1720 for short quotes and
1734 \begin_layout Plain Layout
1735 used in this Tutorial for the long typing examples
1744 font; this environment is the only place in \SpecialChar LyX
1745 where you are allowed to use
1746 multiple spaces to allow code indenting.
1747 You can even write poetry using the
1755 to separate stanzas, and
1759 to separate lines within a stanza.
1764 for more complete descriptions of all of the available \SpecialChar LyX
1768 \begin_layout Standard
1773 : Correctly typeset the
1775 Quote, \SpecialChar LyX
1787 \begin_layout Chapter
1791 \begin_layout Standard
1792 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1794 It introduced you to the basic editing operations in \SpecialChar LyX
1795 , as well as the powerful
1796 method of writing with environments.
1797 Most people who use \SpecialChar LyX
1798 , though, will want to write documents: papers, articles,
1799 books, manuals, or letters.
1800 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1802 a complete document.
1803 It will introduce you to text classes, which allow you to write different
1805 It will then describe many of the additions that turn text into a document,
1806 such as titles, footnotes, cross references, bibliographies, and tables
1810 \begin_layout Section
1812 \begin_inset CommandInset label
1814 name "sec:Document-Classes"
1821 \begin_layout Standard
1822 Different sorts of documents should be typeset differently.
1823 For example, books are generally printed double-sided, while articles are
1825 In addition, many documents contain special environments: letters contain
1826 some environments — such as the sender's address and the signature — which
1827 do not make sense in a book or article.
1828 The \SpecialChar LyX
1837 \begin_layout Plain Layout
1838 for \SpecialChar LaTeX
1839 users: this is equivalent to the \SpecialChar LaTeX
1845 takes care of these large scale differences between different sorts of
1847 This Tutorial, for example, was written in the
1852 Document classes are another major part of the WYSIWYM philosophy; they
1853 tell \SpecialChar LyX
1854 how to typeset the document, so you do not need to know how.
1857 \begin_layout Standard
1858 Your document is probably being written in the
1866 \begin_layout Plain Layout
1867 That is usually the default document class
1872 Try changing to other document classes (using the
1874 Document\SpecialChar menuseparator
1877 dialog) to see how they are typeset differently.
1878 If you change your document to the
1882 document class and look at the
1886 box, you will see that most of the allowed environments are the same.
1887 However, you can now use the
1892 If you are ever unsure about which environments you can use in a given
1893 document class, just consult the
1900 \begin_layout Standard
1901 Font sizes, one- or two-column printing, and page headings are just some
1902 of the ways journals' typesettings differ from one another.
1903 As the Computer Age continues to mature, journals have begun accepting
1904 electronic submissions, creating \SpecialChar LaTeX
1906 \begin_inset Quotes eld
1910 \begin_inset Quotes erd
1913 so that authors can submit correctly typeset articles.
1915 is set up to support this as well.
1916 For example, \SpecialChar LyX
1917 supports typesetting (and extra environments) for the American
1918 Mathematics Society journals using the
1921 \begin_inset space ~
1929 \begin_layout Standard
1930 Here is a very quick reference to some of the document classes.
1933 Special Document Classes
1939 manual for many more details.
1940 \begin_inset Separator parbreak
1946 \begin_layout Standard
1948 \begin_inset Tabular
1949 <lyxtabular version="3" rows="7" columns="2">
1950 <features tabularvalignment="middle">
1951 <column alignment="center" valignment="top" width="0pt">
1952 <column alignment="center" valignment="top" width="0pt">
1954 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1957 \begin_layout Plain Layout
1963 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1966 \begin_layout Plain Layout
1974 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1977 \begin_layout Plain Layout
1983 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1986 \begin_layout Plain Layout
1987 one-sided, no chapters
1994 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1997 \begin_layout Plain Layout
2003 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2006 \begin_layout Plain Layout
2007 layout & environments for American Math Society
2014 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2017 \begin_layout Plain Layout
2023 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2026 \begin_layout Plain Layout
2027 longer than article, two-sided
2034 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2037 \begin_layout Plain Layout
2043 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2046 \begin_layout Plain Layout
2047 report + front and back matter
2054 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2057 \begin_layout Plain Layout
2063 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2066 \begin_layout Plain Layout
2074 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2077 \begin_layout Plain Layout
2083 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2086 \begin_layout Plain Layout
2087 lots of extra environments for address, signature\SpecialChar ldots
2101 \begin_layout Section
2102 Templates: Writing a Letter
2105 \begin_layout Standard
2106 One way to write a letter would be to open a new file, and choose a
2112 Document\SpecialChar menuseparator
2116 While this is the most obvious way to write a letter, it seems like extra
2118 Every time you write a business letter, you want to have your address,
2119 the address to which you are sending it, a body, a signature, etc.
2125 for letters, which contains a sample letter; once you have a template,
2126 you can just replace a couple of parts of the letter with your text each
2127 time you write a letter.
2130 \begin_layout Standard
2131 Open a new file with
2133 File\SpecialChar menuseparator
2135 \begin_inset space ~
2139 \begin_inset space ~
2150 Save and print the file to see how the various environments are typeset.
2153 \begin_layout Standard
2154 When you look at the
2158 box, you will see several environments, like the
2161 \begin_inset space ~
2166 environment, that do not exist in most other document classes.
2172 You can play around for a while to figure out how the various environments
2174 You will notice for example that the
2178 environment has the word
2179 \begin_inset Quotes eld
2183 \begin_inset Quotes erd
2186 in red before the actual text of the signature.
2187 This word does not show up in the actual letter, as you will see if you
2188 view/export the file.
2189 It is just there to let you know where the signature goes.
2190 Also, note that it does not matter where in the file the
2195 Remember, \SpecialChar LyX
2196 is WYSIWYM; you can put the
2200 environment anywhere you want, but \SpecialChar LyX
2201 knows that in the printout, the signature
2202 should be at the end.
2205 \begin_layout Standard
2206 A template is just a regular \SpecialChar LyX
2208 This means you can fill in your address and signature and save the file
2210 From now on, any time you want to write a letter, you can use the new template
2212 We do not have to suggest an actual
2213 \begin_inset Quotes eld
2217 \begin_inset Quotes erd
2220 here; just write a letter to someone!
2224 \begin_layout Plain Layout
2225 One warning, if you are writing from a template.
2226 If you erase all of the text in an environment — for example, if you erase
2230 \begin_inset space ~
2235 field so that you can replace it with your own — and then you move the
2236 cursor without writing any text, the environment may disappear.
2237 This is because most environments cannot exist without any text in them.
2238 Just reselect the environment from the
2250 \begin_layout Standard
2251 Templates can be a huge time-saver, and we urge you to use them whenever
2253 In addition, they can help a person learn how to use some of the fancier
2255 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2257 of less computer-aware users.
2258 When they are first learning \SpecialChar LyX
2259 , it will be less intimidating if they have
2260 a letter template customized for their company, for example.
2263 \begin_layout Section
2267 \begin_layout Standard
2269 (like \SpecialChar LaTeX
2270 ) considers the title — which may contain the actual title, the author,
2271 the date, and even an abstract of a paper — to be a separate part of the
2275 \begin_layout Standard
2276 Go back to your first \SpecialChar LyX
2277 document and make sure it is using the
2285 \begin_layout Plain Layout
2286 You should not be using the letter any more, since the
2290 document class does not allow titles.
2295 Type a title on the first line, and change the line to the
2300 On the next line, type your name and change it to the
2305 On the next line, write the date in the
2310 Type a paragraph or two summarizing your document using the
2315 Notice how the title is presented when it is printed out.
2316 If you change the document format to Book, you will get a separate title
2317 page, like the first page of this tutorial.
2320 \begin_layout Standard
2325 : Fix the title, date, and author in
2330 \begin_layout Section
2331 Labels and Cross-References
2334 \begin_layout Standard
2335 You can label section headings, list items, formulas, footnotes, and floats
2339 \begin_layout Plain Layout
2340 Floats are explained in the
2354 Once you do so, you can refer to the element in other parts of the document,
2355 using cross-references.
2356 You can refer to a section's number, to the page on which the section begins
2358 As with section numbering, \SpecialChar LyX
2359 also takes care of cross-reference numbering
2361 Automatic management of labels and cross-references is among the most significa
2362 nt advantages of \SpecialChar LyX
2363 (and \SpecialChar LaTeX
2364 ) over conventional word processors.
2367 \begin_layout Subsection
2371 \begin_layout Standard
2372 Go to our second section, whose title is
2373 \begin_inset Quotes eld
2377 \begin_inset Quotes erd
2381 Click at the end of the section title line, and select
2383 Insert\SpecialChar menuseparator
2386 or the toolbar button
2393 A dialog asks you for a label name, and gives you a suggestion.
2398 , the label name will be placed in a box next to the section title.
2401 \begin_layout Standard
2402 So far you have not done anything — the output will look exactly the same,
2403 since labels do not show up in the printed document.
2404 However, now that you have added a label, you can refer to that label with
2406 We will do that next.
2409 \begin_layout Subsection
2410 Your first cross-reference
2413 \begin_layout Standard
2414 Place the cursor somewhere in Section
2415 \begin_inset space ~
2422 \begin_layout LyX-Code
2423 If you want to know more about this document, then see Section .
2426 \begin_layout Standard
2427 Now, with the cursor before the final period, select
2429 Insert\SpecialChar menuseparator
2431 \begin_inset space ~
2436 or the toolbar button
2439 arg "dialog-show-new-inset ref"
2443 The Cross-reference dialog pops up.
2444 It shows a list of the possible labels you can reference.
2445 At the moment, there should be only one,
2446 \begin_inset Quotes eld
2449 sec:About-This-Document
2450 \begin_inset Quotes erd
2454 First, select the drop-down menu labeled
2455 \begin_inset Quotes eld
2459 \begin_inset Quotes erd
2463 \begin_inset Quotes eld
2466 <reference> on page <page>
2467 \begin_inset Quotes erd
2472 \begin_inset Quotes eld
2475 sec:About-This-Document
2476 \begin_inset Quotes erd
2479 (it may be selected by default), and a reference marker will appear containing
2481 \begin_inset Quotes eld
2484 Ref+Text: sec:About-This-Document
2485 \begin_inset Quotes erd
2488 (To be really correct, you should put a
2491 \begin_inset space ~
2499 arg "command-alternatives space-insert protected ; math-space"
2502 ) in between the word
2503 \begin_inset Quotes eld
2507 \begin_inset Quotes erd
2510 and the reference.) An alternative way to reference a label is to right-click
2511 the label and select
2515 in the pop-up context menu.
2516 The cross-reference to this label is now in the clipboard and can be copied
2517 to the actual cursor position via the menu
2519 Edit\SpecialChar menuseparator
2529 In the printed document, this reference marker will be replaced with the
2530 section number and then the page number.
2531 Preview your document and you will see that \SpecialChar LaTeX
2532 has been even cleverer than
2535 \begin_inset Quotes eld
2539 \begin_inset Quotes erd
2542 and depending how much text you have between the start of Section
2543 \begin_inset space ~
2546 2 and this cross-reference you may see
2547 \begin_inset Quotes eld
2551 \begin_inset Quotes erd
2555 \begin_inset Quotes eld
2558 on the previous page
2559 \begin_inset Quotes erd
2563 \begin_inset Quotes eld
2567 \begin_inset Quotes erd
2574 is the page number).
2577 \begin_layout Standard
2578 Conveniently, a cross-reference acts as a hyperlink when you are editing
2579 a document in \SpecialChar LyX
2580 ; clicking on it will pop up the
2587 \begin_inset space ~
2591 \begin_inset space ~
2596 will move the cursor to the referenced label.
2599 \begin_layout Subsection
2600 More fun with labels
2603 \begin_layout Standard
2604 We told you that \SpecialChar LyX
2605 takes care of numbering cross-references; now you can
2607 Add a new section before Section
2608 \begin_inset space ~
2612 Update the preview, and — voilà ! — the section cross-reference changed
2614 \begin_inset Quotes eld
2618 \begin_inset Quotes erd
2621 ! Change the section
2622 \begin_inset Quotes eld
2626 \begin_inset Quotes erd
2629 to a subsection, and the cross-reference will reference Subsection
2630 \begin_inset space ~
2633 2.1 instead of Section
2634 \begin_inset space ~
2638 The page reference will not change unless you add a whole page of text
2639 before the label, of course.
2643 \begin_layout Standard
2644 If you want some more practice with labels, then try putting a new label
2645 where your first cross-reference was, and refer to that label from elsewhere
2647 If you will be inserting cross-references often, it may be convenient to
2655 \begin_layout Standard
2656 If you want to confirm that the cross-referencing gets the pages right even
2657 for larger documents,
2661 a couple pages of text from the
2665 to the clipboard, and
2669 them into your document.
2673 \begin_layout Plain Layout
2674 By the way, copying a chapter title may cause an error, because chapters
2675 are not allowed in the article class, see Section
2676 \begin_inset space ~
2680 \begin_inset CommandInset ref
2682 reference "sec:Document-Classes"
2687 If this happens, just delete the chapter title.
2695 \begin_layout Standard
2700 : Fix the references in
2705 \begin_layout Section
2706 Footnotes and Margin Notes
2709 \begin_layout Standard
2710 Footnotes can be added using the toolbar button
2713 arg "footnote-insert"
2718 Insert\SpecialChar menuseparator
2722 Click at the end of the word
2723 \begin_inset Quotes eld
2728 \begin_inset Quotes erd
2731 somewhere in your document and insert a footnote.
2732 A footnote box appears where you can enter the text of the footnote.
2734 should place the cursor at the beginning of the footnote box.
2738 \begin_layout LyX-Code
2740 is a typesetting word processor.
2743 \begin_layout Standard
2744 Now click on the button labeled
2745 \begin_inset Quotes eld
2749 \begin_inset Quotes erd
2753 The footnote box is closed, leaving the button showing where the footnote
2754 marker will be in the printed text; this is called
2755 \begin_inset Quotes eld
2759 \begin_inset Quotes erd
2763 You can unfold the footnote at any time and re-edit its text by clicking
2765 \begin_inset Quotes eld
2769 \begin_inset Quotes erd
2775 \begin_layout Standard
2776 A footnote can be cut and pasted like normal text.
2777 Go ahead; try it! All you need to do is select the footnote button
2781 \begin_layout Plain Layout
2782 It may be easier to select it using the keyboard.
2783 You might accidentally open the footnote if you are trying to select the
2784 marker itself with the mouse.
2798 In addition, you can change regular text to a footnote, by selecting it
2802 arg "footnote-insert"
2805 button; change a footnote to regular text by hitting the
2809 key when the cursor is in the first position of a footnote, or by hitting
2814 key when the cursor is in the very last position of the footnote.
2817 \begin_layout Standard
2818 Margin notes can be added using the menu
2820 Insert\SpecialChar menuseparator
2822 \begin_inset space ~
2827 or the toolbar button
2830 arg "marginalnote-insert"
2833 \SpecialChar endofsentence
2834 Margin notes are like footnotes, except that:
2837 \begin_layout Itemize
2838 the on-screen boxes say
2839 \begin_inset Quotes eld
2843 \begin_inset Quotes erd
2847 \begin_inset Quotes eld
2851 \begin_inset Quotes erd
2857 \begin_layout Itemize
2858 the notes will be placed in the margin, instead of below the text
2861 \begin_layout Itemize
2862 margin notes are not numbered
2865 \begin_layout Standard
2866 Change your \SpecialChar LyX
2867 footnote back to text, then select and change it to a margin
2869 Run \SpecialChar LaTeX
2870 again to see what the margin note looks like.
2873 \begin_layout Standard
2878 : Fix the footnote in
2883 \begin_layout Section
2885 \begin_inset CommandInset label
2887 name "sec:bibliographies"
2894 \begin_layout Standard
2895 Bibliographies are similar to cross-references.
2896 The bibliography contains a list of references at the end of the document,
2897 and they can be referenced from within the document.
2898 Like section titles, \SpecialChar LyX
2899 and \SpecialChar LaTeX
2900 make your job easier by automatically numbering
2901 the bibliography items and changing citations when the item numbers change.
2904 \begin_layout Standard
2905 Go to the end of the document and switch to the
2910 Now, each paragraph you type will be a reference.
2912 \begin_inset Quotes eld
2917 The Lyx Tutorial, by the \SpecialChar LyX
2921 \begin_inset Quotes erd
2924 as your first reference.
2925 Note that \SpecialChar LyX
2926 automatically puts a number in a box before each reference.
2927 Click on the boxed reference number, and the
2930 \begin_inset space ~
2940 is to refer to this reference within the \SpecialChar LyX
2950 is set (default), you will see the number of the bibliography in the output.
2956 \begin_inset Quotes eld
2960 \begin_inset Quotes erd
2963 to make it easy to remember.
2966 \begin_layout Standard
2967 Now pick somewhere in your document that you would like to insert a reference.
2970 Insert\SpecialChar menuseparator
2973 or the toolbar button
2976 arg "dialog-show-new-inset citation"
2985 The left panel in this dialog lists all the bibliography entries, and this
2986 field allows you to choose which bibliography item you want to cite.
2988 \begin_inset Quotes eld
2992 \begin_inset Quotes erd
2995 (right now, that is the only item in the bibliography), then use the
2999 button in the center to insert it.
3000 (You can have multiple citations in the same place by transferring a number
3005 \begin_layout Plain Layout
3006 If one uses label names for references that are easy to remember it is easier
3007 to find the entry in the list of references.
3017 Now preview your file and you will see that the citation appears in brackets
3018 in the text, referring to the bibliography at the end of the document.
3021 \begin_layout Standard
3025 \begin_inset space ~
3034 dialog will put a remark (such as a reference to a page or chapter within
3035 the referenced book or article) in the brackets after the reference.
3036 If you want the references to have labels instead of numbers in the printed
3037 output (for example, some journals would use
3038 \begin_inset Quotes eld
3042 \begin_inset Quotes erd
3045 to refer to a paper written by Smith in 1995), use the
3052 \begin_inset space ~
3065 \begin_layout Standard
3070 Fix the bibliography and citation in
3075 \begin_layout Section
3079 \begin_layout Standard
3080 You may want to put a table of contents at the beginning of your document.
3082 makes this easy to do.
3087 after your document title and before your first section title and select
3090 Insert\SpecialChar menuseparator
3092 \begin_inset space ~
3096 \begin_inset space ~
3099 TOC\SpecialChar menuseparator
3101 \begin_inset space ~
3105 \begin_inset space ~
3112 \begin_inset Quotes eld
3116 \begin_inset Quotes erd
3119 will appear in a button on the first line of the document.
3123 \begin_layout Standard
3124 This may not appear to be very useful.
3125 However, if you look at your preview, you will see that a table of contents
3126 has been generated, listing the various sections and subsections in your
3128 As usual, if you reorder sections or create new ones, you will see those
3129 changes in the preview when you update it.
3133 \begin_layout Standard
3134 The table of contents is not printed in the on-screen version of the document.
3135 But you can display the table of contents in a separate window by clicking
3136 on the table of contents button, or by using
3138 View\SpecialChar menuseparator
3140 \begin_inset space ~
3145 or the toolbar button
3148 arg "dialog-toggle toc"
3152 This menu will work even if you do not have a table of contents inset in
3154 This is a very useful tool for rearranging your document parts.
3155 Clicking on a (sub)section title in the
3159 window will highlight that line and move the display (in the \SpecialChar LyX
3161 to that place in the document.
3162 You can also use the arrow keys to move up and down in the table of contents.
3163 You may therefore find it convenient to leave this window open throughout
3165 You can get similar functionality from the
3169 menu, though, where the table of contents appears automatically.
3172 \begin_layout Standard
3173 To get rid of the Table of Contents, you can delete the table of contents
3174 button just like any other text.
3177 \begin_layout Standard
3182 : Fix the table of contents in
3187 \begin_layout Chapter
3191 \begin_layout Standard
3193 is used by many scientists because it outputs great looking equations,
3194 avoiding the control characters used by word processors and their equation
3196 Many of these scientists are frustrated, however, because writing equations
3197 in \SpecialChar LaTeX
3198 is more like programming than writing.
3199 Happily, \SpecialChar LyX
3200 has WYSIWYM support for equations.
3201 If you are used to \SpecialChar LaTeX
3202 , you will find that all of the usual \SpecialChar LaTeX
3204 can be typed in normally, but they will show up in a WYSIWYM fashion.
3205 If, on the other hand, you have never written in \SpecialChar LaTeX
3209 \begin_inset space ~
3214 will allow you to write professional-looking math quickly and easily.
3217 \begin_layout Section
3221 \begin_layout Standard
3222 Somewhere in your \SpecialChar LyX
3226 \begin_layout LyX-Code
3227 I like what Einstein said, E=mc^2, because it is so simple.
3231 \begin_layout Standard
3232 Now, that equation does not look very good in \SpecialChar LyX
3233 and in the output; there
3234 is no space between the letters and the equals sign, and you would like
3235 to write an actual superscript for the
3236 \begin_inset Quotes eld
3240 \begin_inset Quotes erd
3244 That bad typesetting happened because we did not tell \SpecialChar LyX
3245 that we were writing
3246 a mathematical expression, so it typeset the equation like regular old
3250 \begin_layout Standard
3251 But we can create a formula that will be typeset properly.
3252 Highlight the equation and click the toolbar button
3260 Insert\SpecialChar menuseparator
3261 Math\SpecialChar menuseparator
3263 \begin_inset space ~
3269 If nothing is highlighted \SpecialChar LyX
3270 inserts a little blue square, which is an empty
3272 The expression appears in blue and the blue square disappears as soon as
3273 the formula is not empty.
3278 to leave the equation.
3279 The purple markers disappear, leaving the cursor to the right of the expression.
3280 Now, if you type something, it will be regular text.
3283 \begin_layout Standard
3284 Looking at the output you will notice that the expression was typeset nicely,
3285 with spaces between the letters and the equals sign, and a superscript
3287 \begin_inset Quotes eld
3291 \begin_inset Quotes erd
3295 Letters in math mode are assumed to be variables, and come out in italics.
3296 Numbers are just numbers.
3299 \begin_layout Standard
3300 This math editor is another example of the WYSIWYM philosophy.
3301 In \SpecialChar LaTeX
3302 , you write a mathematical expression using text and commands like
3308 ; this can be frustrating, because you cannot see what an expression looks
3309 like until you run the file under \SpecialChar LaTeX
3310 and you may have to spend time, for
3311 example, finding missing brackets.
3313 does not attempt to get the expression to look perfect (WYSIWYG), but
3314 it gives you an extremely good idea of what the expression will look like.
3316 then takes care of the professional typesetting.
3319 \begin_layout Section
3320 Navigating an Equation
3323 \begin_layout Standard
3325 \begin_inset Formula $E=mc^{2}$
3329 \begin_inset Formula $E=1+mc^{2}$
3333 Use the arrow keys to move the cursor into the expression.
3334 Note that when you enter the expression, the purple markers appear to let
3335 you know you are editing math.
3344 to move the cursor past the equals sign, and just type
3345 \begin_inset Quotes eld
3349 \begin_inset Quotes erd
3353 Again, you can use the arrow keys or
3357 to leave the formula\SpecialChar endofsentence
3361 \begin_layout Standard
3362 Other than the special keys described below, typing in math mode is like
3363 editing regular text.
3373 Select text either with the arrow keys or with the mouse.
3376 Edit\SpecialChar menuseparator
3379 works in math mode as well as cut and paste.
3380 One thing to be careful of: if you are left or right outside a formula
3389 respectively, you delete the whole formula.
3390 Luckily, you can just use
3397 \begin_layout Standard
3398 What if you want to change
3399 \begin_inset Formula $E=mc^{2}$
3403 \begin_inset Formula $E=mc^{2.5}+1$
3406 ? Again, you can use the mouse to click in the right place.
3407 However, you can also use the arrow keys.
3408 If the cursor is just after the
3409 \begin_inset Quotes eld
3413 \begin_inset Quotes erd
3417 \begin_inset Quotes eld
3421 \begin_inset Quotes erd
3428 and the cursor is moved to the level of the superscript, just before the
3430 \begin_inset Quotes eld
3434 \begin_inset Quotes erd
3439 \begin_inset Quotes eld
3443 \begin_inset Quotes erd
3451 will move the cursor back to the regular level.
3460 , the cursor will be placed
3464 the superscript (so that you can then type the
3465 \begin_inset Quotes eld
3469 \begin_inset Quotes erd
3475 \begin_layout Section
3476 Exponents and Indices
3479 \begin_layout Standard
3480 An exponent can be entered from the
3483 \begin_inset space ~
3488 (see below), but it is actually simpler just to type the caret key,
3489 \begin_inset Quotes eld
3493 \begin_inset Quotes erd
3498 will place another blue rectangle in the superscript, so that whatever
3499 you write next will be superscripted, and in a smaller font size.
3500 Everything you type until you hit a
3508 to exit the formula entirely) will be in the superscript.
3511 \begin_layout Standard
3512 Writing a subscript (index) is just as easy; start one by typing the underscore
3514 \begin_inset Quotes eld
3518 \begin_inset Quotes erd
3522 You can subscript and superscript both subscripts and superscripts like
3524 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3531 \begin_layout Standard
3543 \begin_layout Section
3547 \begin_layout Standard
3551 \begin_inset space ~
3556 is a convenient way to enter symbols and/or to perform complicated formula
3558 Many of these operations can be accomplished from the keyboard or the
3560 Insert\SpecialChar menuseparator
3565 Edit\SpecialChar menuseparator
3568 menus (the latter only appears when you are in Math mode).
3569 However, we are going to concentrate on using the
3572 \begin_inset space ~
3577 , just to let you know what is out there; you can learn keyboard shortcuts
3578 and commands later from the
3585 \begin_layout Standard
3589 \begin_inset space ~
3594 is shown when the cursor is in a formula and can also be turned on manually
3597 View\SpecialChar menuseparator
3601 When you click there on
3602 \begin_inset Quotes eld
3606 \begin_inset Quotes erd
3612 arg "toolbar-toggle math"
3615 ) the toolbar will be shown permanently at the bottom; this state is visualized
3620 menu with a checkmark.
3621 When you click in this state again on
3622 \begin_inset Quotes eld
3626 \begin_inset Quotes erd
3636 \begin_inset space ~
3641 is only shown when the cursor is within a formula; this state is visualized
3642 by the renaming of the menu entry from
3643 \begin_inset Quotes eld
3647 \begin_inset Quotes erd
3651 \begin_inset Quotes eld
3655 \begin_inset space ~
3659 \begin_inset Quotes erd
3665 \begin_layout Subsection
3669 \begin_layout Standard
3673 \begin_inset space ~
3678 allows you to choose from a large array of symbols used in math: operators,
3679 arrows, relationships, delimiters, special characters, sums and integrals.
3680 Note that subscripting and superscripting allow you to put lower and upper
3681 limits on sums and integrals.
3684 \begin_layout Subsection
3685 Roots, decorations, and delimiters
3688 \begin_layout Standard
3689 To type a square root, just click on the button
3692 arg "math-insert \\sqrt"
3696 The square root appears, and the cursor is in a new insertion point inside
3698 You can type variables, numbers, other square roots, fractions, whatever
3701 will automatically resize the square root to fit what is inside.
3704 \begin_layout Standard
3706 \begin_inset Quotes eld
3710 \begin_inset Quotes erd
3714 \begin_inset Formula $\overrightarrow{a}$
3717 ) or group of characters (
3718 \begin_inset Formula $\overrightarrow{a+b}$
3721 ) is done similarly.
3722 Decorations are available from the toolbar via the button
3725 arg "math-insert \\hat"
3729 Click on a decoration, and \SpecialChar LyX
3730 will insert that decoration with an insertion
3731 point under (or over) it.
3732 Just type what you want in the insertion point.
3733 There are two sets of decorations: those that resize with the text you
3734 type, and those that have a fixed size, and are most appropriate for a
3739 \begin_layout Standard
3740 Delimiters such as parentheses, brackets, and braces work similarly, but
3741 are a bit more complicated.
3742 Hit the delimiter button
3745 arg "dialog-show mathdelimiter"
3753 Your current selection of delimiters is displayed in a box.
3754 It is a pair of parentheses by default, but you can choose a pair of braces,
3755 a brace and a parenthesis, or choose the empty square to have something
3757 \begin_inset Quotes eld
3761 \begin_inset Formula $a=\left\langle 7\right.$
3765 \begin_inset Quotes erd
3768 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3773 \begin_layout Standard
3774 If you are lazy, you can type actual parentheses in math mode, rather than
3780 However, those parentheses will be the same size as regular text, which
3781 will look bad if you have a big fraction or matrix inside the parentheses.
3782 So it is better to use one of the three delimiter buttons that insert them
3783 directly, for example
3786 arg "math-delim ( )"
3792 \begin_layout Standard
3793 You can also put delimiters or a square root sign or a decoration on already
3794 existing formula parts.
3795 Select the portion of the formula that you want to adjust, and then click
3796 on the button you want from the
3799 \begin_inset space ~
3805 Try using this to change Newton's second law from scalar to vector form
3807 \begin_inset Formula $f=ma$
3811 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3815 Once you have learned about matrices, this is how you will put parentheses
3816 or brackets around them.
3819 \begin_layout Subsection
3823 \begin_layout Standard
3824 To create a fraction, click on the fraction button
3827 arg "math-insert \\frac-square"
3833 \begin_inset space ~
3840 writes two insertion points in a fraction.
3841 As you would expect, you can use arrow keys or the mouse to move around
3843 Click on the top square and type
3844 \begin_inset Quotes eld
3848 \begin_inset Quotes erd
3857 \begin_inset Quotes eld
3861 \begin_inset Quotes erd
3865 You have made a fraction! Of course you can type anything within each of
3866 the two boxes: variables with exponents, square roots, other fractions,
3871 \begin_layout Standard
3883 \begin_layout Subsection
3884 Functions: lim, log, sin and others
3887 \begin_layout Standard
3888 Because letters in math mode are considered to be variables, if you type
3890 \begin_inset Quotes eld
3894 \begin_inset Quotes erd
3897 in math mode, \SpecialChar LyX
3898 thinks you are typing the product of the three variables
3900 \begin_inset Formula $s$
3904 \begin_inset Formula $i$
3908 \begin_inset Formula $n$
3912 The three letters will be typeset in italics, when what you really wanted
3914 \begin_inset Quotes eld
3918 \begin_inset Quotes erd
3922 In addition, \SpecialChar LyX
3923 will not put a space between the word
3924 \begin_inset Quotes eld
3928 \begin_inset Quotes erd
3932 \begin_inset Quotes eld
3936 \begin_inset Quotes erd
3943 will exit the formula).
3945 \begin_inset Quotes eld
3949 \begin_inset Formula $\sin(x)$
3953 \begin_inset Quotes erd
3957 \begin_inset Quotes eld
3961 \begin_inset Formula $sin(x)$
3965 \begin_inset Quotes erd
3971 \begin_layout Standard
3975 \begin_inset space ~
3983 arg "math-insert \\functions"
3987 \begin_inset Quotes eld
3991 \begin_inset Quotes erd
3994 in the pop-up function list.
3996 \begin_inset Quotes eld
4000 \begin_inset Quotes erd
4003 is displayed in \SpecialChar LyX
4004 in black, and set in upright roman type.
4005 The whole word is treated as one symbol, so if you type
4009 , it will delete the whole word.
4011 \begin_inset Quotes eld
4015 \begin_inset Quotes erd
4018 , which will be written in blue italics, like you expect in a formula.
4019 In the output, the expression will be correctly typeset.
4023 \begin_layout Standard
4024 The function list includes other trigonometric functions and their inverses,
4025 hyperbolic functions, logarithms, limits, and quite a few others.
4026 These functions can take subscripts and superscripts, important for typing
4028 \begin_inset Quotes eld
4032 \begin_inset Formula $\cos^{2}\theta$
4036 \begin_inset Quotes erd
4040 \begin_inset Quotes eld
4044 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4048 \begin_inset Quotes erd
4054 \begin_layout Standard
4066 \begin_layout Subsection
4070 \begin_layout Standard
4071 Click on the matrix button
4074 arg "dialog-show mathmatrix"
4080 \begin_inset space ~
4086 A pop-up dialog allows you to choose how many rows and columns you want
4088 Choose 2 rows and 3 columns and hit
4094 prints 6 insertion points in a
4095 \begin_inset Formula $2\times3$
4099 As usual, you can put any sort of formula expression (a square root, another
4100 matrix, etc.) in each insertion point.
4101 You can also leave some of the insertion points empty if you want.
4104 \begin_layout Standard
4109 can be used to move horizontally between the columns of a matrix.
4110 Alternatively, you can use the arrow keys to move around - hitting
4114 at the end of one box will move to the next box,
4118 will move to the next row, etc.
4121 \begin_layout Standard
4122 If you need to change the number of rows and columns, use the menu
4124 Edit\SpecialChar menuseparator
4126 \begin_inset space \thinspace{}
4130 \begin_inset space \thinspace{}
4135 or the math toolbar buttons
4138 arg "inset-modify tabular append-row"
4144 arg "inset-modify tabular delete-row"
4150 arg "inset-modify tabular append-column"
4156 arg "inset-modify tabular delete-column"
4162 \begin_layout Standard
4167 for information on how to change the horizontal alignment of each column,
4168 and how to change the vertical position of the whole matrix.
4169 Note that if you want to write a table containing text, you should use
4171 's wonderful table support, rather than trying to write text in a matrix.
4174 \begin_layout Subsection
4178 \begin_layout Standard
4179 All of the expressions we have written so far have been on the same line
4180 as the text that came before and after them, otherwise known as inline
4182 This is fine for short, simple expressions, but if you want to write larger
4183 ones, or if you want your expressions to stand out from the text, you need
4184 to write them in display mode.
4185 In addition, only displayed expressions can be labeled and numbered (see
4190 ), and multi-line equations must be in display mode.
4193 \begin_layout Standard
4194 While being in a formula, click on the display button
4203 \begin_inset space ~
4209 This centers the formula and adds a blank line before and after it.
4210 Now type in an expression and compile your file to see how it looks.
4211 The display button is actually a toggle; use it now to change a couple
4212 of your expressions to display mode and back.
4216 \begin_layout Standard
4217 Display mode has a couple differences from inline mode:
4220 \begin_layout Itemize
4221 The default font is larger for a few symbols, like
4222 \begin_inset Formula $\sum$
4226 \begin_inset Formula $\int$
4232 \begin_layout Itemize
4233 Subscripts and superscripts for limits and sums (but not integrals) are
4234 written under and over rather than next to the symbols
4237 \begin_layout Itemize
4241 \begin_layout Standard
4242 Other than these differences, though, displayed expressions and inline expressio
4243 ns are very similar.
4246 \begin_layout Standard
4247 One final note about the way displayed formulas are typeset: be careful
4248 about whether you are putting your equation into a new paragraph or not.
4249 If your formula is in the middle of a sentence or paragraph, then do not
4255 Doing so will cause the text
4259 the formula to start a new paragraph.
4260 That text will be indented or follow a blank line, depending on your document
4261 paragraph settings, which is probably not what you want.
4264 \begin_layout Standard
4269 : Put the various equations in
4273 into display mode, and see how they are typeset differently.
4276 \begin_layout Standard
4281 : Using various tools you have learned in this section, you should be able
4282 to write an equation like:
4286 \begin_layout Plain Layout
4287 After you have done it the hard way, give
4289 Insert\SpecialChar menuseparator
4290 Math\SpecialChar menuseparator
4292 \begin_inset space ~
4303 \begin_inset Formula
4305 f(x)=\left\{ \begin{array}{cc}
4308 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4317 \begin_layout Section
4321 \begin_layout Standard
4322 Now you are familiar with the basics.
4324 's math editor can do a lot more.
4325 You can refer to the
4329 manual for tips on how to:
4332 \begin_layout Itemize
4333 Label and number expressions.
4336 \begin_layout Itemize
4337 Create multi-line equations.
4340 \begin_layout Itemize
4341 Change typefaces, e.
4342 \begin_inset space \thinspace{}
4346 \begin_inset space \space{}
4349 to write bold-face text in an expression.
4352 \begin_layout Itemize
4353 Fine-tune font sizes and spacing within an expression.
4354 (Do not worry about this until your final draft!)
4357 \begin_layout Itemize
4359 These are very powerful, because you just define them once at the top of
4360 the document, and then you can use them throughout the document.
4363 \begin_layout Itemize
4364 Do almost all you can do with math.
4367 \begin_layout Chapter
4371 \begin_layout Section
4372 Other major \SpecialChar LyX
4376 \begin_layout Standard
4377 We have not gone through all the possible commands in \SpecialChar LyX
4378 , and we are not planning
4387 \begin_inset space ~
4392 manual for more information.
4393 We will just mention a couple more major things \SpecialChar LyX
4397 \begin_layout Itemize
4399 has WYSIWYM support for tables.
4402 Insert\SpecialChar menuseparator
4408 arg "tabular-insert"
4412 Click on the table with the
4419 \begin_inset space ~
4424 dialog box which allows extensive table editing.
4428 arg "toolbar-toggle table"
4431 the table toolbar will appear permanently.
4434 \begin_layout Itemize
4436 also supports including pictures in any format within documents.
4439 Insert\SpecialChar menuseparator
4445 arg "dialog-show-new-inset graphics"
4449 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4450 can have captions, and \SpecialChar LyX
4451 will automatically generate lists of figures and/or
4455 \begin_layout Itemize
4457 is heavily configurable.
4458 Everything from how the \SpecialChar LyX
4459 window looks to how the output comes out can be
4460 configured in a number of ways.
4461 Much configuration is done through
4463 Tools\SpecialChar menuseparator
4467 For more information on this, check out
4469 Help\SpecialChar menuseparator
4470 Customization\SpecialChar endofsentence
4474 \begin_layout Itemize
4476 is being developed by a team of programmers on five continents.
4477 Therefore, \SpecialChar LyX
4478 has better support for non-English languages (such as Dutch,
4479 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4480 ) than many word processors.
4481 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4482 languages Chinese Japanese, and Korean are supported.
4483 You can write documents in other languages and you can also configure \SpecialChar LyX
4485 to show its menus and error messages in other languages.
4489 \begin_layout Itemize
4490 The \SpecialChar LyX
4491 menus feature keybindings.
4492 This means that you can do
4494 File\SpecialChar menuseparator
4505 or by using the binding which is shown next to it in the menu (
4512 Keybindings are also configurable.
4513 For information on this, check out
4515 Help\SpecialChar menuseparator
4516 Customization\SpecialChar endofsentence
4520 \begin_layout Itemize
4522 can read \SpecialChar LaTeX
4525 \begin_inset space ~
4529 \begin_inset CommandInset ref
4531 reference "sec:tex2lyx"
4538 \begin_layout Itemize
4539 Spell-checking, thesaurus, and word count facilities are available.
4542 \begin_layout Itemize
4543 Generation of indexes and nomenclatures/glossaries is supported.
4546 \begin_layout Section
4548 for \SpecialChar LaTeX
4550 \begin_inset CommandInset label
4552 name "sec:latexusers"
4559 \begin_layout Standard
4560 If you do not know anything about \SpecialChar LaTeX
4561 , you do not have to read this section.
4562 Actually, you might want to
4566 about \SpecialChar LaTeX
4567 , and then read this chapter.
4568 However, some of those who begin to use \SpecialChar LyX
4569 will be familiar with \SpecialChar LaTeX
4571 If you are such a person, you may be wondering if \SpecialChar LyX
4572 can really do everything
4575 The short answer is that \SpecialChar LyX
4576 can do pretty much everything \SpecialChar LaTeX
4578 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4583 \begin_layout Standard
4584 Because this is just a tutorial, we are only going to mention things that
4585 new \SpecialChar LyX
4586 users will most likely be interested in.
4587 In the interests of keeping the Tutorial short, we will give only minimal
4592 \begin_inset space ~
4600 \begin_inset space ~
4605 manuals have a great deal of information on differences between \SpecialChar LyX
4606 and \SpecialChar LaTeX
4608 and how to do various \SpecialChar LaTeX
4609 tricks in \SpecialChar LyX
4613 \begin_layout Subsection
4618 \begin_layout Standard
4619 Anything that you enter in \SpecialChar TeX
4620 mode will be passed straight to \SpecialChar LaTeX
4622 displayed in red on the screen.
4623 You can use \SpecialChar TeX
4624 commands in \SpecialChar LyX
4627 Insert\SpecialChar menuseparator
4630 \begin_inset space ~
4642 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4646 \begin_layout Standard
4647 In a math formula, \SpecialChar TeX
4648 mode is handled a bit differently.
4650 mode is entered there by typing a backslash.
4651 The backslash is not written out, but anything you type afterwards will
4653 You exit \SpecialChar TeX
4658 or some other non-alphabetic character, like a number, underscore, caret
4660 Once you exit \SpecialChar TeX
4661 mode, if \SpecialChar LyX
4662 knows the \SpecialChar TeX
4663 command you have typed in, it will
4664 convert it to WYSIWYM\SpecialChar endofsentence
4666 \begin_inset Quotes eld
4676 \begin_inset Quotes erd
4679 in a formula and then press
4685 \begin_inset Quotes eld
4689 \begin_inset Quotes erd
4693 \begin_inset Quotes eld
4697 \begin_inset Formula $\gamma$
4701 \begin_inset Quotes erd
4705 This will work for almost all, non-complicated math macros.
4706 This may be faster than using the
4709 \begin_inset space ~
4714 , and will be especially convenient for experienced \SpecialChar LaTeX
4718 \begin_layout Standard
4719 As a special case, if you type
4720 \begin_inset Quotes eld
4730 \begin_inset Quotes erd
4733 in a formula, the beginning
4737 ending braces will be inserted in red while the cursor is placed between
4739 This makes it more convenient to type those commands that take an argument.
4742 \begin_layout Standard
4744 cannot do absolutely everything that \SpecialChar LaTeX
4746 Some fancy functions are not supported at all, while some work but are
4749 mode allows users to get the full flexibility of \SpecialChar LaTeX
4750 , while having all the
4751 convenient features of \SpecialChar LyX
4752 , like WYSIWYM math, tables, and editing.
4754 could never support every \SpecialChar LaTeX
4762 in the preamble (see Section
4763 \begin_inset space ~
4767 \begin_inset CommandInset ref
4769 reference "sec:preamble"
4773 ), you can use any package you want — although you will not have WYSIWYM
4774 support for that package's features.
4777 \begin_layout Subsection
4778 Importing \SpecialChar LaTeX
4784 \begin_inset CommandInset label
4793 \begin_layout Standard
4794 You can import a \SpecialChar LaTeX
4795 file into \SpecialChar LyX
4798 File\SpecialChar menuseparator
4799 Import\SpecialChar menuseparator
4802 \begin_inset space ~
4807 menu in \SpecialChar LyX
4809 This will call the program
4813 which will create a file foo.lyx from the file foo.tex.
4815 will then open that file.
4816 If the translation does not work, you can try calling
4820 from the command line, possibly using fancier options.
4823 \begin_layout Standard
4824 Even when the translation does work,
4828 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4830 It will leave things it does not understand in \SpecialChar TeX
4831 mode; so, after translating
4836 , you can look for the red text and manually edit it to get it right.
4839 \begin_layout Standard
4844 has its own documentation (manpage), which Unix/Linux users can access
4845 via the console command
4848 \begin_inset space ~
4854 The manpage describes which \SpecialChar LaTeX
4855 commands and environments are not supported,
4856 what bugs you might run into (and how to get around them), and how to use
4857 the various options.
4860 \begin_layout Standard
4861 It is important to understand that
4865 can only translate files whose document class is
4866 \begin_inset Quotes eld
4870 \begin_inset Quotes erd
4874 , that is, for which there is a corresponding \SpecialChar LyX
4880 If there is no layout file, then you will get an error saying that the
4881 conversion could not be performed.
4882 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4887 simply will not know how to translate the \SpecialChar LaTeX
4888 that it finds there into things
4891 More about layout files and how they are created is explained in detail
4899 \begin_layout Subsection
4900 Converting \SpecialChar LyX
4901 Documents to \SpecialChar LaTeX
4905 \begin_layout Standard
4906 You might wish to convert a \SpecialChar LyX
4907 Document to a \SpecialChar LaTeX
4909 For example, a co-worker or co-author who does not have \SpecialChar LyX
4914 File\SpecialChar menuseparator
4915 Export\SpecialChar menuseparator
4920 This will create a file
4928 file you are editing.
4931 \begin_layout Subsection
4936 \begin_layout Subsubsection
4940 \begin_layout Standard
4943 Document\SpecialChar menuseparator
4946 dialog takes care of the document-wide options, such as changing the document
4947 class, default font size and paper size.
4948 Document class options and also options for \SpecialChar LaTeX
4949 packages can be entered there
4953 \begin_inset space ~
4961 \begin_layout Subsubsection
4962 Other Preamble Matter
4963 \begin_inset CommandInset label
4972 \begin_layout Standard
4973 If you have special commands to put in the preamble of a \SpecialChar LaTeX
4975 use them in a \SpecialChar LyX
4979 Document\SpecialChar menuseparator
4980 Settings\SpecialChar menuseparator
4983 \begin_inset space ~
4988 and type in the dialog window (or from the document settings dialog, depending
4990 Anything you type will (as with \SpecialChar TeX
4991 mode) be sent directly to \SpecialChar LaTeX
4995 \begin_layout Subsection
5000 \begin_layout Standard
5002 has support for Bib\SpecialChar TeX
5003 , which allows you to build databases of bibliographical
5004 references to be used in multiple documents.
5007 Insert\SpecialChar menuseparator
5009 \begin_inset space \thinspace{}
5013 \begin_inset space \thinspace{}
5016 TOC\SpecialChar menuseparator
5019 \begin_inset space ~
5034 field you load Bib\SpecialChar TeX
5039 field you can load Bib\SpecialChar TeX
5043 \begin_layout Standard
5044 After you have done this, you can use citations from any bibliographies
5045 you have included with
5047 Insert\SpecialChar menuseparator
5051 \begin_inset space ~
5055 \begin_inset CommandInset ref
5057 reference "sec:bibliographies"
5066 dialog will show a list of all the references in your
5074 \begin_layout Section
5078 \begin_layout Standard
5079 Sometimes when you try to view a document, there will be errors, things
5080 that \SpecialChar LyX
5081 or \SpecialChar LaTeX
5083 When this happens, \SpecialChar LyX
5088 \begin_inset space ~
5094 Clicking on individual errors in this dialog will take you to the place
5095 in the \SpecialChar LyX
5096 document where the error occurs and also display the detailed \SpecialChar LaTeX