1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
9 % DO NOT ALTER THIS PREAMBLE!!!
11 %This preamble is designed to ensure that the document prints
12 % out as advertised. If you mess with this preamble,
13 % parts of the document may not print out as expected. If you
14 % have problems LaTeXing this file, please contact
15 % the documentation team
16 % email: lyx-docs@lists.lyx.org
18 % the pages of the TOC is numbered roman
19 % and a pdf-bookmark for the TOC is added
20 \let\myTOC\tableofcontents
21 \renewcommand\tableofcontents{%
23 \pdfbookmark[1]{\contentsname}{}
27 \use_default_options false
31 \maintain_unincluded_children false
33 \language_package default
36 \font_roman "palatino" "default"
37 \font_sans "helvet" "default"
38 \font_typewriter "courier" "default"
39 \font_math "auto" "auto"
40 \font_default_family default
41 \use_non_tex_fonts false
44 \font_sf_scale 100 100
45 \font_tt_scale 100 100
47 \default_output_format pdf2
49 \bibtex_command default
50 \index_command default
54 \pdf_title "The LyX Tutorial"
55 \pdf_author "LyX Team"
56 \pdf_subject "LyX-documentation Tutorial"
57 \pdf_keywords "LyX, documentation"
59 \pdf_bookmarksnumbered true
60 \pdf_bookmarksopen true
61 \pdf_bookmarksopenlevel 1
66 \pdf_pdfusetitle false
67 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
70 \use_package amsmath 0
71 \use_package amssymb 0
74 \use_package mathdots 1
75 \use_package mathtools 0
77 \use_package stackrel 0
78 \use_package stmaryrd 0
79 \use_package undertilde 0
81 \cite_engine_type default
85 \paperorientation portrait
95 \paragraph_separation indent
96 \paragraph_indentation default
97 \quotes_language english
100 \paperpagestyle headings
101 \tracking_changes false
102 \output_changes false
105 \html_be_strict false
116 by the \SpecialChar LyX
121 \begin_layout Plain Layout
123 If you have comments on or corrections to this documentation, please send
124 them to the \SpecialChar LyX
125 Documentation mailing list:
126 \begin_inset CommandInset href
128 target "lyx-docs@lists.lyx.org"
141 \begin_layout Standard
142 \begin_inset CommandInset toc
143 LatexCommand tableofcontents
150 \begin_layout Chapter
154 \begin_layout Section
155 Welcome to \SpecialChar LyX
159 \begin_layout Standard
160 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
163 Now, do not panic - you will not need to learn \SpecialChar LaTeX
164 to use \SpecialChar LyX
166 That is, after all, the whole point of \SpecialChar LyX
167 : to provide an almost-WYSIWYG interface
168 to \SpecialChar LaTeX
170 There are some things you will need to learn, however, in order to use
175 \begin_layout Standard
176 Some of you probably found your way to this document because you tried to
177 put two spaces after a
178 \begin_inset Quotes eld
182 \begin_inset Quotes erd
185 or tried to put three blank lines between paragraphs.
186 You found out you could not and, in fact, you will find out that most of
187 the little tricks you are accustomed to use in word processors will not
188 work in \SpecialChar LyX
190 That is because most word processors you have used before allow you manually
191 to enter all spacings, font changes, and so on.
192 So you end up not only writing a document but typesetting it, too.
194 does the typesetting for you, in a consistent fashion, letting you focus
195 on the important things, like the content of your writing.
198 \begin_layout Standard
199 So read on to learn more about \SpecialChar LyX
201 Reading this tutorial is definitely worth the time.
204 \begin_layout Section
214 \begin_layout Standard
215 Before we get started with this section, you need to know that this
219 uses the notation outlined in the
224 If you came to this manual first, please read the
228 before you continue with the
235 \begin_layout Standard
236 Now that you know which fonts mean what in the documentation, we want to
237 talk a bit about what this
244 \begin_layout Subsection
245 Getting the most out of the Tutorial
248 \begin_layout Standard
249 This tutorial consists of examples and exercises.
250 To get the most out of this document, you should read through it, typing
251 all the little things we are telling you to type and trying out all of
252 the exercises to see if you get them right.
253 For convenience, you might want to print out the PDF version of this document.
256 \begin_layout Standard
257 If you are familiar with \SpecialChar LaTeX
258 , you will probably be able to read the
262 somewhat faster, since many \SpecialChar LyX
263 ideas are just \SpecialChar LaTeX
265 However, \SpecialChar LyX
266 has features you will want to learn about.
267 Even if you do not feel like reading the rest of the
271 , you should definitely check out Section
276 \begin_inset CommandInset ref
278 reference "sec:latexusers"
282 , which is specifically written for experienced \SpecialChar LaTeX
286 \begin_layout Subsection
294 \begin_layout Itemize
295 Detailed explanations of all of \SpecialChar LyX
297 \begin_inset Separator parbreak
304 \begin_layout Standard
313 \begin_layout Itemize
314 Detailed explanations of \SpecialChar LaTeX
316 \begin_inset Separator parbreak
323 \begin_layout Standard
325 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
328 can have a look at the
340 \begin_layout Standard
341 It is time to move on, time for your first document \SpecialChar ldots
345 \begin_layout Chapter
346 Getting started with \SpecialChar LyX
350 \begin_layout Section
351 Your first \SpecialChar LyX
355 \begin_layout Standard
356 OK\SpecialChar endofsentence
357 You are ready to start writing.
358 Before you do, there are a few things we need to mention, which will hopefully
359 make the Tutorial more instructive and useful.
363 \begin_layout Standard
364 Because there is information we cannot give you in the Tutorial, the
370 thing that you need to do is find the
377 Start up \SpecialChar LyX
387 You may want to load the
391 as well (if you are not reading it within \SpecialChar LyX
393 This way, you can read them while you are writing your own file.
397 \begin_layout Plain Layout
398 They can also serve as good examples of how to use the many features of
405 Note that once you have got more than one document open, you can use the
410 menu or the document tabs to switch between them.
413 \begin_layout Standard
414 In this Tutorial, we are going to assume that you have a fully working version
416 , as well as a \SpecialChar LaTeX
417 -distribution and a PDF-viewer.
418 This should be the case on all major Linux- and BSD-distributions, as well
419 as on Windows, where this is setup by the \SpecialChar LyX
423 \begin_layout Standard
424 Finally, we have written a file called
428 to let you practice your \SpecialChar LyX
430 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
433 As you learn new \SpecialChar LyX
434 functions, we will suggest that you fix those parts of
440 It also contains `subtle' hints about how to fix things.
444 \begin_layout Plain Layout
445 The hints are located in yellow
446 \begin_inset Quotes eld
450 \begin_inset Quotes erd
454 Access the text in a note by clicking on it.
459 If you want to cheat, or check what you have done, there is also a file
464 which contains the same text written and typeset by a \SpecialChar LyX
468 \begin_layout Standard
469 The example files can be found in the
473 directory of \SpecialChar LyX
474 's installation folder.
481 File\SpecialChar menuseparator
488 to save a copy in your own directory for you to work on.
489 As you fix parts of the raw document, check to see how those changes affect
493 \begin_layout Standard
498 directory contains lots of other examples files.
499 They will show you how to do various fancy things with \SpecialChar LyX
501 After you have read the Tutorial, or when you are confused about how to
502 do something fancy in \SpecialChar LyX
503 , take a look at these files.
506 \begin_layout Subsection
507 Typing, Viewing, and Exporting
510 \begin_layout Itemize
513 File\SpecialChar menuseparator
517 \begin_layout Itemize
518 Type a sentence like:
520 This is my first \SpecialChar LyX
524 \begin_layout Itemize
525 Save your document with
527 File\SpecialChar menuseparator
532 As\SpecialChar endofsentence
536 \begin_layout Itemize
537 Create a PDF file, with
539 Document\SpecialChar menuseparator
542 or the toolbar button
550 will open a PDF-viewer program displaying your document as it will look
555 \begin_layout Plain Layout
556 You can save time by leaving the PDF-viewer running in the background.
559 Document\SpecialChar menuseparator
562 or the toolbar button
568 and just click on the PDF-viewer window (or unminimize it) afterwards.
576 \begin_layout Itemize
577 Export the ready to print document with
579 File\SpecialChar menuseparator
587 \begin_layout Standard
588 Congratulations! You have written your first \SpecialChar LyX
590 All of the rest is just details.
593 \begin_layout Subsection
597 \begin_layout Standard
599 can of course do most of the things you are used to doing with a word processor.
600 It will word-wrap and indent paragraphs automatically.
601 Here is a quick description of how to do some simple actions.
604 \begin_layout Description
605 Undo \SpecialChar LyX
606 has multiple levels of undo, which means you can undo everything you
607 have done since your current editing session started, by selecting
609 Edit\SpecialChar menuseparator
618 ) over and over again.
619 If you undo too much, just select
621 Edit\SpecialChar menuseparator
631 \begin_inset Separator parbreak
638 \begin_layout Standard
639 Currently, undo is limited to 100 steps.
643 \begin_layout Description
646 Edit\SpecialChar menuseparator
657 Edit\SpecialChar menuseparator
668 Edit\SpecialChar menuseparator
677 ) to cut, copy, and paste.
678 Or automatically paste selected text (including selections from other programs)
686 \begin_layout Description
689 Edit\SpecialChar menuseparator
703 arg "dialog-show findreplace"
707 In the dialog, search with the
719 button to replace a word you have found.
723 \begin_layout Plain Layout
724 Close the window when you are done or leave it open if you find it more
726 Most dialog boxes in \SpecialChar LyX
727 can operate like this.
728 Just be sure you have the right window in focus when you are trying to
729 type in the main \SpecialChar LyX
730 window or a \SpecialChar LyX
736 If you like, you can specify whether to make the search case-sensitive,
737 or to search for only complete words; you can also search backwards through
741 \begin_layout Description
756 , which will by default print characters in italics), set it in
766 , usually small caps, used for people's names), or use your own formatting
769 Edit\SpecialChar menuseparator
774 Style\SpecialChar menuseparator
777 dialog (toolbar button
780 arg "dialog-show character"
786 \begin_layout Description
787 Toolbar Other buttons on the toolbar allow you to do some of the more popular
815 \begin_layout Standard
816 Of course, you have not yet written enough to make most of these functions
818 As you write more, though, try undoing, pasting, etc.
821 \begin_layout Subsection
822 WYSIWYM: Whitespace in \SpecialChar LyX
826 \begin_layout Standard
827 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
830 As many times as you hit
834 , you will only get one blank line.
835 As many times as you hit
839 , you will only get one space.
840 On a blank line, \SpecialChar LyX
841 will not let you type even one space.
846 key will not move you forward one tab stop; in fact there
850 no tab stops! There is no ruler at the top of the page to let you set tabs
854 \begin_layout Standard
855 Many word processors are based on the WYSIWYG principle:
856 \begin_inset Quotes eld
859 What You See Is What You Get.
860 \begin_inset Quotes erd
864 , on the other hand, is based on the principle that
865 \begin_inset Quotes eld
868 What You See Is What You
873 \begin_inset Quotes erd
876 You type what you mean and \SpecialChar LyX
877 will take care of typesetting it for you so
878 that the output looks nice.
883 grammatically separates paragraphs and a
887 grammatically separates words; so there is no reason to have several of
892 has no grammatical function at all - so \SpecialChar LyX
894 Using \SpecialChar LyX
895 , you will spend more of your time worrying about the
899 of your document and less time worrying about the
908 for more information on the WYSIWYM concept.
911 \begin_layout Standard
913 does have (many) ways to fine-tune the formatting of your document.
914 After all, \SpecialChar LyX
924 has information about all that.
925 It includes horizontal fills and vertical space — which are more powerful
926 and versatile than multiple spaces or blank lines — and ways to change
927 font sizes, character styles, and paragraph alignments by hand.
928 The idea, though, is that you can write your whole document, focusing on
929 content, and just worry about that fine-tuning at the end.
930 With standard word processors, you will be distracted by document formatting
931 throughout the writing process.
934 \begin_layout Section
938 \begin_layout Standard
939 Different parts of a document have different purposes; we call these parts
945 Most of a document is made up of regular text.
946 Section titles (chapter, subsection, etc.) let the reader know that a new
947 topic or subtopic will be discussed.
948 Certain types of documents have special environments.
949 A journal article will have an abstract and a title.
950 A letter will have neither of these, but will probably have an environment
951 that gives the writer's address.
954 \begin_layout Standard
955 Environments are a major part of the
956 \begin_inset Quotes eld
959 What You See Is What You Mean
960 \begin_inset Quotes erd
963 philosophy of \SpecialChar LyX
965 A given environment may require a certain font style, font size, indenting,
966 line spacing, and more.
967 This problem is aggravated, because the exact formatting for a given environmen
968 t may change: one journal may use boldface, 18 point, centered type for
969 section titles while another uses italicized, 15 point, left justified
970 type; different languages may have different standards for indenting; and
971 bibliography formats can vary widely.
973 lets you avoid learning all the different formatting styles.
976 \begin_layout Standard
981 choice box is located on the left end of the toolbar and looks like this:
983 \begin_inset Graphics
984 filename clipart/ToolbarEnvBox.png
991 It indicates in which environment you are currently writing.
992 While you were writing your first document, it said
993 \begin_inset Quotes eld
997 \begin_inset Quotes erd
1000 which is the default environment for text.
1001 Now you will put a number of environments in your new document so that
1002 you can see how they work.
1005 \begin_layout Subsection
1006 Sections and Subsections
1009 \begin_layout Standard
1014 on the first line of your new \SpecialChar LyX
1027 \begin_layout Plain Layout
1033 If nothing is selected, \SpecialChar LyX
1034 changes the paragraph you are currently in to
1035 the selected environment.
1036 Alternatively, you can change several paragraphs to a different environment
1037 by selecting them before picking an environment.
1054 , which will be covered below.
1057 \begin_inset Quotes eld
1061 \begin_inset Quotes erd
1064 and typesets the section heading (title) in a larger font.
1069 \SpecialChar endofsentence
1075 \begin_inset Quotes eld
1079 \begin_inset Quotes erd
1083 \begin_inset Quotes eld
1087 \begin_inset Quotes erd
1091 Section headings, like most environments, are assumed to end when you type
1096 \SpecialChar endofsentence
1097 Type the document introduction:
1100 \begin_layout LyX-Code
1101 This is an introduction to my first \SpecialChar LyX
1105 \begin_layout Standard
1121 \begin_inset Quotes eld
1125 \begin_inset Quotes erd
1128 and waits for you to type a title.
1130 \begin_inset Quotes eld
1136 \begin_inset space ~
1142 \begin_inset Quotes erd
1145 , and you will see that \SpecialChar LyX
1146 again sets it as a section title.
1149 \begin_layout Standard
1151 Go to the end of Section
1152 \begin_inset space ~
1156 \begin_inset Quotes eld
1159 my first \SpecialChar LyX
1161 \begin_inset Quotes erd
1177 Again, \SpecialChar LyX
1179 \begin_inset Quotes eld
1183 \begin_inset Quotes erd
1186 and waits for you to type a title.
1193 \begin_inset space ~
1197 \begin_inset Quotes eld
1201 \begin_inset Quotes erd
1205 \begin_inset space ~
1208 2, has been automatically renumbered to Section
1209 \begin_inset space ~
1212 3! In true WYSIWYM fashion, you just need to identify the text that makes
1213 up the section titles, and \SpecialChar LyX
1214 takes care of numbering the sections and typesettin
1218 \begin_layout Standard
1227 environment, and type the following five lines:
1230 \begin_layout LyX-Code
1231 Sections and subsections are described below.
1234 \begin_layout LyX-Code
1238 \begin_layout LyX-Code
1239 Sections are bigger than subsections.
1242 \begin_layout LyX-Code
1243 Subsection description
1246 \begin_layout LyX-Code
1247 Subsections are smaller than sections.
1250 \begin_layout Standard
1251 Click on the second line and select
1261 numbers the subsection
1262 \begin_inset Quotes eld
1266 \begin_inset Quotes erd
1269 , and typesets it in a font which is bigger than regular text but smaller
1270 than the section title.
1271 Change the fourth line to the
1275 environment as well.
1276 As you probably expected, \SpecialChar LyX
1277 automatically numbered the section
1278 \begin_inset Quotes eld
1282 \begin_inset Quotes erd
1286 If you put yet another section before Section
1287 \begin_inset space ~
1291 \begin_inset space ~
1294 2 will be renumbered as Section 3, and the subsections will be renumbered
1296 \begin_inset Quotes eld
1300 \begin_inset Quotes erd
1304 \begin_inset Quotes eld
1308 \begin_inset Quotes erd
1314 \begin_layout Standard
1315 Further levels of sectioning include
1328 We will let you play with these on your own.
1329 You may notice that paragraph and subparagraph headings are not numbered
1330 by default, and that subparagraphs are indented; see the
1334 for an explanation and how to change this.
1339 headings are actually the highest level of sectioning, above
1343 s, but you are only allowed to use them in certain types (text classes)
1345 documents (see Section
1346 \begin_inset space ~
1350 \begin_inset CommandInset ref
1352 reference "sec:Document-Classes"
1359 \begin_layout Standard
1360 Finally, you may want to have sections or subsections that are not numbered.
1361 There are environments for this as well.
1362 If you change one of your section headings to the
1366 environment (you may have to scroll down in the
1370 box to find it), \SpecialChar LyX
1371 will use the same font size for the heading as it uses
1372 for a regular section, but it will not number that section.
1373 There are corresponding
1374 \begin_inset Quotes eld
1378 \begin_inset Quotes erd
1381 heading environments for
1390 Try changing some of your sections or subsections to the starred environments,
1391 and note how the other section numbers are updated.
1394 \begin_layout Standard
1399 : Fix the section and subsection headings in
1407 \begin_layout Subsection
1411 \begin_layout Standard
1413 has several different environments for typesetting lists.
1414 The various list environments free you from hitting
1418 a million times when writing an outline, or from renumbering a whole list
1419 when you want to add a point in the middle of the list.
1420 Different types of documents logically require different list environments:
1423 \begin_layout Itemize
1424 A slide presentation might use the
1428 environment's bulleted lists to describe different points.
1431 \begin_layout Itemize
1432 An outline would use the
1436 environment's numbered lists (and lettered sublists).
1439 \begin_layout Itemize
1440 A document describing several software packages could use the
1444 environment, where each item in the list begins with a bold-faced word.
1447 \begin_layout Itemize
1456 ) environment is a variation on the
1463 \begin_layout Standard
1464 Let us write a list of reasons why \SpecialChar LyX
1465 is better than other word processors.
1466 Somewhere in your document, type:
1469 \begin_layout Standard
1473 is better than other word processors because:
1476 \begin_layout Standard
1493 arg "layout Itemize"
1499 \begin_inset Quotes eld
1503 \begin_inset Quotes erd
1507 Type in your reasons:
1510 \begin_layout LyX-Code
1511 Typesetting is done for you.
1514 \begin_layout LyX-Code
1518 \begin_layout LyX-Code
1519 Lists are very easy to create!
1522 \begin_layout Standard
1523 List environments, unlike headings, do not end when you type
1528 Instead, \SpecialChar LyX
1529 assumes you are going on to the next item in the list.
1530 The above will therefore result in a three-item list.
1531 If you want more than one paragraph within one list
1535 , one way is to use the
1538 \begin_inset space ~
1543 , which you get by typing
1548 In order to get out of the list, you need to reselect the
1552 environment (or just use the key binding
1555 arg "layout Standard"
1561 \begin_layout Standard
1562 You now have a beautiful itemized list.
1563 You might want to run \SpecialChar LaTeX
1564 to see how the list looks when printed out.
1565 But what if you wanted to number the reasons? Well, just select the whole
1570 \begin_layout Plain Layout
1572 will not let you select the first bullet (or the actual number in a numbered
1573 section title) unless you also select the paragraph
1577 it, which you probably do not want to do.
1578 This is on purpose because the bullet or number depends on the document
1579 settings or text position, respectively.
1595 arg "layout Enumerate"
1599 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1600 will fix the numbering.
1603 \begin_layout Standard
1604 While the list is still selected, you can change to the other two list environme
1612 \begin_inset space \thinspace{}
1618 \begin_inset space \thinspace{}
1628 arg "layout Description"
1637 ), in order to see what they look like.
1638 For those two environments, each list item is made up of a term, which
1639 is the item's first word, followed by a definition, which is the rest of
1640 the paragraph (until you hit
1645 The term is either typeset in boldface (
1650 \begin_inset Quotes eld
1654 \begin_inset Quotes erd
1661 \begin_layout Plain Layout
1662 But a typesetter's tab, which will change to fit the size of the largest
1663 term, not a pathetic, rigid, unchangeable typewriter
1676 ) from the rest of the paragraph.
1677 If you want to have more than one word in the definition, then separate
1681 \begin_inset space ~
1689 \begin_layout Standard
1694 : Typeset the list in
1699 \begin_layout Standard
1700 You can nest lists within each other in all sorts of interesting ways.
1701 An obvious example would be writing outlines.
1702 Numbered and bulleted lists will have different numbering and bulleting
1703 schemes for sublists.
1708 for details on the different sorts of lists and for examples of nestings.
1711 \begin_layout Subsection
1712 Other environments: Verses, Quotations, and more
1715 \begin_layout Standard
1716 There are two environments for setting quotations apart from surrounding
1721 for short quotes and
1735 \begin_layout Plain Layout
1736 used in this Tutorial for the long typing examples
1745 font; this environment is the only place in \SpecialChar LyX
1746 where you are allowed to use
1747 multiple spaces to allow code indenting.
1748 You can even write poetry using the
1756 to separate stanzas, and
1760 to separate lines within a stanza.
1765 for more complete descriptions of all of the available \SpecialChar LyX
1769 \begin_layout Standard
1774 : Correctly typeset the
1776 Quote, \SpecialChar LyX
1788 \begin_layout Chapter
1792 \begin_layout Standard
1793 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1795 It introduced you to the basic editing operations in \SpecialChar LyX
1796 , as well as the powerful
1797 method of writing with environments.
1798 Most people who use \SpecialChar LyX
1799 , though, will want to write documents: papers, articles,
1800 books, manuals, or letters.
1801 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1803 a complete document.
1804 It will introduce you to text classes, which allow you to write different
1806 It will then describe many of the additions that turn text into a document,
1807 such as titles, footnotes, cross references, bibliographies, and tables
1811 \begin_layout Section
1813 \begin_inset CommandInset label
1815 name "sec:Document-Classes"
1822 \begin_layout Standard
1823 Different sorts of documents should be typeset differently.
1824 For example, books are generally printed double-sided, while articles are
1826 In addition, many documents contain special environments: letters contain
1827 some environments — such as the sender's address and the signature — which
1828 do not make sense in a book or article.
1829 The \SpecialChar LyX
1838 \begin_layout Plain Layout
1839 for \SpecialChar LaTeX
1840 users: this is equivalent to the \SpecialChar LaTeX
1846 takes care of these large scale differences between different sorts of
1848 This Tutorial, for example, was written in the
1853 Document classes are another major part of the WYSIWYM philosophy; they
1854 tell \SpecialChar LyX
1855 how to typeset the document, so you do not need to know how.
1858 \begin_layout Standard
1859 Your document is probably being written in the
1867 \begin_layout Plain Layout
1868 That is usually the default document class
1873 Try changing to other document classes (using the
1875 Document\SpecialChar menuseparator
1878 dialog) to see how they are typeset differently.
1879 If you change your document to the
1883 document class and look at the
1887 box, you will see that most of the allowed environments are the same.
1888 However, you can now use the
1893 If you are ever unsure about which environments you can use in a given
1894 document class, just consult the
1901 \begin_layout Standard
1902 Font sizes, one- or two-column printing, and page headings are just some
1903 of the ways journals' typesettings differ from one another.
1904 As the Computer Age continues to mature, journals have begun accepting
1905 electronic submissions, creating \SpecialChar LaTeX
1907 \begin_inset Quotes eld
1911 \begin_inset Quotes erd
1914 so that authors can submit correctly typeset articles.
1916 is set up to support this as well.
1917 For example, \SpecialChar LyX
1918 supports typesetting (and extra environments) for the American
1919 Mathematics Society journals using the
1922 \begin_inset space ~
1930 \begin_layout Standard
1931 Here is a very quick reference to some of the document classes.
1934 Special Document Classes
1940 manual for many more details.
1941 \begin_inset Separator parbreak
1947 \begin_layout Standard
1949 \begin_inset Tabular
1950 <lyxtabular version="3" rows="7" columns="2">
1951 <features tabularvalignment="middle">
1952 <column alignment="center" valignment="top" width="0pt">
1953 <column alignment="center" valignment="top" width="0pt">
1955 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1958 \begin_layout Plain Layout
1964 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1967 \begin_layout Plain Layout
1975 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1978 \begin_layout Plain Layout
1984 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1987 \begin_layout Plain Layout
1988 one-sided, no chapters
1995 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1998 \begin_layout Plain Layout
2004 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2007 \begin_layout Plain Layout
2008 layout & environments for American Math Society
2015 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2018 \begin_layout Plain Layout
2024 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2027 \begin_layout Plain Layout
2028 longer than article, two-sided
2035 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2038 \begin_layout Plain Layout
2044 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2047 \begin_layout Plain Layout
2048 report + front and back matter
2055 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2058 \begin_layout Plain Layout
2064 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2067 \begin_layout Plain Layout
2075 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2078 \begin_layout Plain Layout
2084 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2087 \begin_layout Plain Layout
2088 lots of extra environments for address, signature\SpecialChar ldots
2102 \begin_layout Section
2103 Templates: Writing a Letter
2106 \begin_layout Standard
2107 One way to write a letter would be to open a new file, and choose a
2113 Document\SpecialChar menuseparator
2117 While this is the most obvious way to write a letter, it seems like extra
2119 Every time you write a business letter, you want to have your address,
2120 the address to which you are sending it, a body, a signature, etc.
2126 for letters, which contains a sample letter; once you have a template,
2127 you can just replace a couple of parts of the letter with your text each
2128 time you write a letter.
2131 \begin_layout Standard
2132 Open a new file with
2134 File\SpecialChar menuseparator
2136 \begin_inset space ~
2140 \begin_inset space ~
2151 Save and print the file to see how the various environments are typeset.
2154 \begin_layout Standard
2155 When you look at the
2159 box, you will see several environments, like the
2162 \begin_inset space ~
2167 environment, that do not exist in most other document classes.
2173 You can play around for a while to figure out how the various environments
2175 You will notice for example that the
2179 environment has the word
2180 \begin_inset Quotes eld
2184 \begin_inset Quotes erd
2187 in red before the actual text of the signature.
2188 This word does not show up in the actual letter, as you will see if you
2189 view/export the file.
2190 It is just there to let you know where the signature goes.
2191 Also, note that it does not matter where in the file the
2196 Remember, \SpecialChar LyX
2197 is WYSIWYM; you can put the
2201 environment anywhere you want, but \SpecialChar LyX
2202 knows that in the printout, the signature
2203 should be at the end.
2206 \begin_layout Standard
2207 A template is just a regular \SpecialChar LyX
2209 This means you can fill in your address and signature and save the file
2211 From now on, any time you want to write a letter, you can use the new template
2213 We do not have to suggest an actual
2214 \begin_inset Quotes eld
2218 \begin_inset Quotes erd
2221 here; just write a letter to someone!
2225 \begin_layout Plain Layout
2226 One warning, if you are writing from a template.
2227 If you erase all of the text in an environment — for example, if you erase
2231 \begin_inset space ~
2236 field so that you can replace it with your own — and then you move the
2237 cursor without writing any text, the environment may disappear.
2238 This is because most environments cannot exist without any text in them.
2239 Just reselect the environment from the
2251 \begin_layout Standard
2252 Templates can be a huge time-saver, and we urge you to use them whenever
2254 In addition, they can help a person learn how to use some of the fancier
2256 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2258 of less computer-aware users.
2259 When they are first learning \SpecialChar LyX
2260 , it will be less intimidating if they have
2261 a letter template customized for their company, for example.
2264 \begin_layout Section
2268 \begin_layout Standard
2270 (like \SpecialChar LaTeX
2271 ) considers the title — which may contain the actual title, the author,
2272 the date, and even an abstract of a paper — to be a separate part of the
2276 \begin_layout Standard
2277 Go back to your first \SpecialChar LyX
2278 document and make sure it is using the
2286 \begin_layout Plain Layout
2287 You should not be using the letter any more, since the
2291 document class does not allow titles.
2296 Type a title on the first line, and change the line to the
2301 On the next line, type your name and change it to the
2306 On the next line, write the date in the
2311 Type a paragraph or two summarizing your document using the
2316 Notice how the title is presented when it is printed out.
2317 If you change the document format to Book, you will get a separate title
2318 page, like the first page of this tutorial.
2321 \begin_layout Standard
2326 : Fix the title, date, and author in
2331 \begin_layout Section
2332 Labels and Cross-References
2335 \begin_layout Standard
2336 You can label section headings, list items, formulas, footnotes, and floats
2340 \begin_layout Plain Layout
2341 Floats are explained in the
2355 Once you do so, you can refer to the element in other parts of the document,
2356 using cross-references.
2357 You can refer to a section's number, to the page on which the section begins
2359 As with section numbering, \SpecialChar LyX
2360 also takes care of cross-reference numbering
2362 Automatic management of labels and cross-references is among the most significa
2363 nt advantages of \SpecialChar LyX
2364 (and \SpecialChar LaTeX
2365 ) over conventional word processors.
2368 \begin_layout Subsection
2372 \begin_layout Standard
2373 Go to our second section, whose title is
2374 \begin_inset Quotes eld
2378 \begin_inset Quotes erd
2382 Click at the end of the section title line, and select
2384 Insert\SpecialChar menuseparator
2387 or the toolbar button
2394 A dialog asks you for a label name, and gives you a suggestion.
2399 , the label name will be placed in a box next to the section title.
2402 \begin_layout Standard
2403 So far you have not done anything — the output will look exactly the same,
2404 since labels do not show up in the printed document.
2405 However, now that you have added a label, you can refer to that label with
2407 We will do that next.
2410 \begin_layout Subsection
2411 Your first cross-reference
2414 \begin_layout Standard
2415 Place the cursor somewhere in Section
2416 \begin_inset space ~
2423 \begin_layout LyX-Code
2424 If you want to know more about this document, then see Section .
2427 \begin_layout Standard
2428 Now, with the cursor before the final period, select
2430 Insert\SpecialChar menuseparator
2432 \begin_inset space ~
2437 or the toolbar button
2440 arg "dialog-show-new-inset ref"
2444 The Cross-reference dialog pops up.
2445 It shows a list of the possible labels you can reference.
2446 At the moment, there should be only one,
2447 \begin_inset Quotes eld
2450 sec:About-This-Document
2451 \begin_inset Quotes erd
2455 First, select the drop-down menu labeled
2456 \begin_inset Quotes eld
2460 \begin_inset Quotes erd
2464 \begin_inset Quotes eld
2467 <reference> on page <page>
2468 \begin_inset Quotes erd
2473 \begin_inset Quotes eld
2476 sec:About-This-Document
2477 \begin_inset Quotes erd
2480 (it may be selected by default), and a reference marker will appear containing
2482 \begin_inset Quotes eld
2485 Ref+Text: sec:About-This-Document
2486 \begin_inset Quotes erd
2489 (To be really correct, you should put a
2492 \begin_inset space ~
2500 arg "command-alternatives space-insert protected ; math-space"
2503 ) in between the word
2504 \begin_inset Quotes eld
2508 \begin_inset Quotes erd
2511 and the reference.) An alternative way to reference a label is to right-click
2512 the label and select
2516 in the pop-up context menu.
2517 The cross-reference to this label is now in the clipboard and can be copied
2518 to the actual cursor position via the menu
2520 Edit\SpecialChar menuseparator
2530 In the printed document, this reference marker will be replaced with the
2531 section number and then the page number.
2532 Preview your document and you will see that \SpecialChar LaTeX
2533 has been even cleverer than
2536 \begin_inset Quotes eld
2540 \begin_inset Quotes erd
2543 and depending how much text you have between the start of Section
2544 \begin_inset space ~
2547 2 and this cross-reference you may see
2548 \begin_inset Quotes eld
2552 \begin_inset Quotes erd
2556 \begin_inset Quotes eld
2559 on the previous page
2560 \begin_inset Quotes erd
2564 \begin_inset Quotes eld
2568 \begin_inset Quotes erd
2575 is the page number).
2578 \begin_layout Standard
2579 Conveniently, a cross-reference acts as a hyperlink when you are editing
2580 a document in \SpecialChar LyX
2581 ; clicking on it will pop up the
2588 \begin_inset space ~
2592 \begin_inset space ~
2597 will move the cursor to the referenced label.
2600 \begin_layout Subsection
2601 More fun with labels
2604 \begin_layout Standard
2605 We told you that \SpecialChar LyX
2606 takes care of numbering cross-references; now you can
2608 Add a new section before Section
2609 \begin_inset space ~
2613 Update the preview, and — voilà ! — the section cross-reference changed
2615 \begin_inset Quotes eld
2619 \begin_inset Quotes erd
2622 ! Change the section
2623 \begin_inset Quotes eld
2627 \begin_inset Quotes erd
2630 to a subsection, and the cross-reference will reference Subsection
2631 \begin_inset space ~
2634 2.1 instead of Section
2635 \begin_inset space ~
2639 The page reference will not change unless you add a whole page of text
2640 before the label, of course.
2644 \begin_layout Standard
2645 If you want some more practice with labels, then try putting a new label
2646 where your first cross-reference was, and refer to that label from elsewhere
2648 If you will be inserting cross-references often, it may be convenient to
2656 \begin_layout Standard
2657 If you want to confirm that the cross-referencing gets the pages right even
2658 for larger documents,
2662 a couple pages of text from the
2666 to the clipboard, and
2670 them into your document.
2674 \begin_layout Plain Layout
2675 By the way, copying a chapter title may cause an error, because chapters
2676 are not allowed in the article class, see Section
2677 \begin_inset space ~
2681 \begin_inset CommandInset ref
2683 reference "sec:Document-Classes"
2688 If this happens, just delete the chapter title.
2696 \begin_layout Standard
2701 : Fix the references in
2706 \begin_layout Section
2707 Footnotes and Margin Notes
2710 \begin_layout Standard
2711 Footnotes can be added using the toolbar button
2714 arg "footnote-insert"
2719 Insert\SpecialChar menuseparator
2723 Click at the end of the word
2724 \begin_inset Quotes eld
2729 \begin_inset Quotes erd
2732 somewhere in your document and insert a footnote.
2733 A footnote box appears where you can enter the text of the footnote.
2735 should place the cursor at the beginning of the footnote box.
2739 \begin_layout LyX-Code
2741 is a typesetting word processor.
2744 \begin_layout Standard
2745 Now click on the button labeled
2746 \begin_inset Quotes eld
2750 \begin_inset Quotes erd
2754 The footnote box is closed, leaving the button showing where the footnote
2755 marker will be in the printed text; this is called
2756 \begin_inset Quotes eld
2760 \begin_inset Quotes erd
2764 You can unfold the footnote at any time and re-edit its text by clicking
2766 \begin_inset Quotes eld
2770 \begin_inset Quotes erd
2776 \begin_layout Standard
2777 A footnote can be cut and pasted like normal text.
2778 Go ahead; try it! All you need to do is select the footnote button
2782 \begin_layout Plain Layout
2783 It may be easier to select it using the keyboard.
2784 You might accidentally open the footnote if you are trying to select the
2785 marker itself with the mouse.
2799 In addition, you can change regular text to a footnote, by selecting it
2803 arg "footnote-insert"
2806 button; change a footnote to regular text by hitting the
2810 key when the cursor is in the first position of a footnote, or by hitting
2815 key when the cursor is in the very last position of the footnote.
2818 \begin_layout Standard
2819 Margin notes can be added using the menu
2821 Insert\SpecialChar menuseparator
2823 \begin_inset space ~
2828 or the toolbar button
2831 arg "marginalnote-insert"
2834 \SpecialChar endofsentence
2835 Margin notes are like footnotes, except that:
2838 \begin_layout Itemize
2839 the on-screen boxes say
2840 \begin_inset Quotes eld
2844 \begin_inset Quotes erd
2848 \begin_inset Quotes eld
2852 \begin_inset Quotes erd
2858 \begin_layout Itemize
2859 the notes will be placed in the margin, instead of below the text
2862 \begin_layout Itemize
2863 margin notes are not numbered
2866 \begin_layout Standard
2867 Change your \SpecialChar LyX
2868 footnote back to text, then select and change it to a margin
2870 Run \SpecialChar LaTeX
2871 again to see what the margin note looks like.
2874 \begin_layout Standard
2879 : Fix the footnote in
2884 \begin_layout Section
2886 \begin_inset CommandInset label
2888 name "sec:bibliographies"
2895 \begin_layout Standard
2896 Bibliographies are similar to cross-references.
2897 The bibliography contains a list of references at the end of the document,
2898 and they can be referenced from within the document.
2899 Like section titles, \SpecialChar LyX
2900 and \SpecialChar LaTeX
2901 make your job easier by automatically numbering
2902 the bibliography items and changing citations when the item numbers change.
2905 \begin_layout Standard
2906 Go to the end of the document and switch to the
2911 Now, each paragraph you type will be a reference.
2913 \begin_inset Quotes eld
2918 The Lyx Tutorial, by the \SpecialChar LyX
2922 \begin_inset Quotes erd
2925 as your first reference.
2926 Note that \SpecialChar LyX
2927 automatically puts a number in a box before each reference.
2928 Click on the boxed reference number, and the
2931 \begin_inset space ~
2941 is to refer to this reference within the \SpecialChar LyX
2951 is set (default), you will see the number of the bibliography in the output.
2957 \begin_inset Quotes eld
2961 \begin_inset Quotes erd
2964 to make it easy to remember.
2967 \begin_layout Standard
2968 Now pick somewhere in your document that you would like to insert a reference.
2971 Insert\SpecialChar menuseparator
2974 or the toolbar button
2977 arg "dialog-show-new-inset citation"
2986 The left panel in this dialog lists all the bibliography entries, and this
2987 field allows you to choose which bibliography item you want to cite.
2989 \begin_inset Quotes eld
2993 \begin_inset Quotes erd
2996 (right now, that is the only item in the bibliography), then use the
3000 button in the center to insert it.
3001 (You can have multiple citations in the same place by transferring a number
3006 \begin_layout Plain Layout
3007 If one uses label names for references that are easy to remember it is easier
3008 to find the entry in the list of references.
3018 Now preview your file and you will see that the citation appears in brackets
3019 in the text, referring to the bibliography at the end of the document.
3022 \begin_layout Standard
3026 \begin_inset space ~
3035 dialog will put a remark (such as a reference to a page or chapter within
3036 the referenced book or article) in the brackets after the reference.
3037 If you want the references to have labels instead of numbers in the printed
3038 output (for example, some journals would use
3039 \begin_inset Quotes eld
3043 \begin_inset Quotes erd
3046 to refer to a paper written by Smith in 1995), use the
3053 \begin_inset space ~
3066 \begin_layout Standard
3071 Fix the bibliography and citation in
3076 \begin_layout Section
3080 \begin_layout Standard
3081 You may want to put a table of contents at the beginning of your document.
3083 makes this easy to do.
3088 after your document title and before your first section title and select
3091 Insert\SpecialChar menuseparator
3093 \begin_inset space ~
3097 \begin_inset space ~
3100 TOC\SpecialChar menuseparator
3102 \begin_inset space ~
3106 \begin_inset space ~
3113 \begin_inset Quotes eld
3117 \begin_inset Quotes erd
3120 will appear in a button on the first line of the document.
3124 \begin_layout Standard
3125 This may not appear to be very useful.
3126 However, if you look at your preview, you will see that a table of contents
3127 has been generated, listing the various sections and subsections in your
3129 As usual, if you reorder sections or create new ones, you will see those
3130 changes in the preview when you update it.
3134 \begin_layout Standard
3135 The table of contents is not printed in the on-screen version of the document.
3136 But you can display the table of contents in a separate window by clicking
3137 on the table of contents button, or by using
3139 View\SpecialChar menuseparator
3141 \begin_inset space ~
3146 or the toolbar button
3149 arg "dialog-toggle toc"
3153 This menu will work even if you do not have a table of contents inset in
3155 This is a very useful tool for rearranging your document parts.
3156 Clicking on a (sub)section title in the
3160 window will highlight that line and move the display (in the \SpecialChar LyX
3162 to that place in the document.
3163 You can also use the arrow keys to move up and down in the table of contents.
3164 You may therefore find it convenient to leave this window open throughout
3166 You can get similar functionality from the
3170 menu, though, where the table of contents appears automatically.
3173 \begin_layout Standard
3174 To get rid of the Table of Contents, you can delete the table of contents
3175 button just like any other text.
3178 \begin_layout Standard
3183 : Fix the table of contents in
3188 \begin_layout Chapter
3192 \begin_layout Standard
3194 is used by many scientists because it outputs great looking equations,
3195 avoiding the control characters used by word processors and their equation
3197 Many of these scientists are frustrated, however, because writing equations
3198 in \SpecialChar LaTeX
3199 is more like programming than writing.
3200 Happily, \SpecialChar LyX
3201 has WYSIWYM support for equations.
3202 If you are used to \SpecialChar LaTeX
3203 , you will find that all of the usual \SpecialChar LaTeX
3205 can be typed in normally, but they will show up in a WYSIWYM fashion.
3206 If, on the other hand, you have never written in \SpecialChar LaTeX
3210 \begin_inset space ~
3215 will allow you to write professional-looking math quickly and easily.
3218 \begin_layout Section
3222 \begin_layout Standard
3223 Somewhere in your \SpecialChar LyX
3227 \begin_layout LyX-Code
3228 I like what Einstein said, E=mc^2, because it is so simple.
3232 \begin_layout Standard
3233 Now, that equation does not look very good in \SpecialChar LyX
3234 and in the output; there
3235 is no space between the letters and the equals sign, and you would like
3236 to write an actual superscript for the
3237 \begin_inset Quotes eld
3241 \begin_inset Quotes erd
3245 That bad typesetting happened because we did not tell \SpecialChar LyX
3246 that we were writing
3247 a mathematical expression, so it typeset the equation like regular old
3251 \begin_layout Standard
3252 But we can create a formula that will be typeset properly.
3253 Highlight the equation and click the toolbar button
3261 Insert\SpecialChar menuseparator
3262 Math\SpecialChar menuseparator
3264 \begin_inset space ~
3270 If nothing is highlighted \SpecialChar LyX
3271 inserts a little blue square, which is an empty
3273 The expression appears in blue and the blue square disappears as soon as
3274 the formula is not empty.
3279 to leave the equation.
3280 The purple markers disappear, leaving the cursor to the right of the expression.
3281 Now, if you type something, it will be regular text.
3284 \begin_layout Standard
3285 Looking at the output you will notice that the expression was typeset nicely,
3286 with spaces between the letters and the equals sign, and a superscript
3288 \begin_inset Quotes eld
3292 \begin_inset Quotes erd
3296 Letters in math mode are assumed to be variables, and come out in italics.
3297 Numbers are just numbers.
3300 \begin_layout Standard
3301 This math editor is another example of the WYSIWYM philosophy.
3302 In \SpecialChar LaTeX
3303 , you write a mathematical expression using text and commands like
3309 ; this can be frustrating, because you cannot see what an expression looks
3310 like until you run the file under \SpecialChar LaTeX
3311 and you may have to spend time, for
3312 example, finding missing brackets.
3314 does not attempt to get the expression to look perfect (WYSIWYG), but
3315 it gives you an extremely good idea of what the expression will look like.
3317 then takes care of the professional typesetting.
3320 \begin_layout Section
3321 Navigating an Equation
3324 \begin_layout Standard
3326 \begin_inset Formula $E=mc^{2}$
3330 \begin_inset Formula $E=1+mc^{2}$
3334 Use the arrow keys to move the cursor into the expression.
3335 Note that when you enter the expression, the purple markers appear to let
3336 you know you are editing math.
3345 to move the cursor past the equals sign, and just type
3346 \begin_inset Quotes eld
3350 \begin_inset Quotes erd
3354 Again, you can use the arrow keys or
3358 to leave the formula\SpecialChar endofsentence
3362 \begin_layout Standard
3363 Other than the special keys described below, typing in math mode is like
3364 editing regular text.
3374 Select text either with the arrow keys or with the mouse.
3377 Edit\SpecialChar menuseparator
3380 works in math mode as well as cut and paste.
3381 One thing to be careful of: if you are left or right outside a formula
3390 respectively, you delete the whole formula.
3391 Luckily, you can just use
3398 \begin_layout Standard
3399 What if you want to change
3400 \begin_inset Formula $E=mc^{2}$
3404 \begin_inset Formula $E=mc^{2.5}+1$
3407 ? Again, you can use the mouse to click in the right place.
3408 However, you can also use the arrow keys.
3409 If the cursor is just after the
3410 \begin_inset Quotes eld
3414 \begin_inset Quotes erd
3418 \begin_inset Quotes eld
3422 \begin_inset Quotes erd
3429 and the cursor is moved to the level of the superscript, just before the
3431 \begin_inset Quotes eld
3435 \begin_inset Quotes erd
3440 \begin_inset Quotes eld
3444 \begin_inset Quotes erd
3452 will move the cursor back to the regular level.
3461 , the cursor will be placed
3465 the superscript (so that you can then type the
3466 \begin_inset Quotes eld
3470 \begin_inset Quotes erd
3476 \begin_layout Section
3477 Exponents and Indices
3480 \begin_layout Standard
3481 An exponent can be entered from the
3484 \begin_inset space ~
3489 (see below), but it is actually simpler just to type the caret key,
3490 \begin_inset Quotes eld
3494 \begin_inset Quotes erd
3499 will place another blue rectangle in the superscript, so that whatever
3500 you write next will be superscripted, and in a smaller font size.
3501 Everything you type until you hit a
3509 to exit the formula entirely) will be in the superscript.
3512 \begin_layout Standard
3513 Writing a subscript (index) is just as easy; start one by typing the underscore
3515 \begin_inset Quotes eld
3519 \begin_inset Quotes erd
3523 You can subscript and superscript both subscripts and superscripts like
3525 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3532 \begin_layout Standard
3544 \begin_layout Section
3548 \begin_layout Standard
3552 \begin_inset space ~
3557 is a convenient way to enter symbols and/or to perform complicated formula
3559 Many of these operations can be accomplished from the keyboard or the
3561 Insert\SpecialChar menuseparator
3566 Edit\SpecialChar menuseparator
3569 menus (the latter only appears when you are in Math mode).
3570 However, we are going to concentrate on using the
3573 \begin_inset space ~
3578 , just to let you know what is out there; you can learn keyboard shortcuts
3579 and commands later from the
3586 \begin_layout Standard
3590 \begin_inset space ~
3595 is shown when the cursor is in a formula and can also be turned on manually
3598 View\SpecialChar menuseparator
3602 When you click there on
3603 \begin_inset Quotes eld
3607 \begin_inset Quotes erd
3613 arg "toolbar-toggle math"
3616 ) the toolbar will be shown permanently at the bottom; this state is visualized
3621 menu with a checkmark.
3622 When you click in this state again on
3623 \begin_inset Quotes eld
3627 \begin_inset Quotes erd
3637 \begin_inset space ~
3642 is only shown when the cursor is within a formula; this state is visualized
3643 by the renaming of the menu entry from
3644 \begin_inset Quotes eld
3648 \begin_inset Quotes erd
3652 \begin_inset Quotes eld
3656 \begin_inset space ~
3660 \begin_inset Quotes erd
3666 \begin_layout Subsection
3670 \begin_layout Standard
3674 \begin_inset space ~
3679 allows you to choose from a large array of symbols used in math: operators,
3680 arrows, relationships, delimiters, special characters, sums and integrals.
3681 Note that subscripting and superscripting allow you to put lower and upper
3682 limits on sums and integrals.
3685 \begin_layout Subsection
3686 Roots, decorations, and delimiters
3689 \begin_layout Standard
3690 To type a square root, just click on the button
3693 arg "math-insert \\sqrt"
3697 The square root appears, and the cursor is in a new insertion point inside
3699 You can type variables, numbers, other square roots, fractions, whatever
3702 will automatically resize the square root to fit what is inside.
3705 \begin_layout Standard
3707 \begin_inset Quotes eld
3711 \begin_inset Quotes erd
3715 \begin_inset Formula $\overrightarrow{a}$
3718 ) or group of characters (
3719 \begin_inset Formula $\overrightarrow{a+b}$
3722 ) is done similarly.
3723 Decorations are available from the toolbar via the button
3726 arg "math-insert \\hat"
3730 Click on a decoration, and \SpecialChar LyX
3731 will insert that decoration with an insertion
3732 point under (or over) it.
3733 Just type what you want in the insertion point.
3734 There are two sets of decorations: those that resize with the text you
3735 type, and those that have a fixed size, and are most appropriate for a
3740 \begin_layout Standard
3741 Delimiters such as parentheses, brackets, and braces work similarly, but
3742 are a bit more complicated.
3743 Hit the delimiter button
3746 arg "dialog-show mathdelimiter"
3754 Your current selection of delimiters is displayed in a box.
3755 It is a pair of parentheses by default, but you can choose a pair of braces,
3756 a brace and a parenthesis, or choose the empty square to have something
3758 \begin_inset Quotes eld
3762 \begin_inset Formula $a=\left\langle 7\right.$
3766 \begin_inset Quotes erd
3769 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3774 \begin_layout Standard
3775 If you are lazy, you can type actual parentheses in math mode, rather than
3781 However, those parentheses will be the same size as regular text, which
3782 will look bad if you have a big fraction or matrix inside the parentheses.
3783 So it is better to use one of the three delimiter buttons that insert them
3784 directly, for example
3787 arg "math-delim ( )"
3793 \begin_layout Standard
3794 You can also put delimiters or a square root sign or a decoration on already
3795 existing formula parts.
3796 Select the portion of the formula that you want to adjust, and then click
3797 on the button you want from the
3800 \begin_inset space ~
3806 Try using this to change Newton's second law from scalar to vector form
3808 \begin_inset Formula $f=ma$
3812 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3816 Once you have learned about matrices, this is how you will put parentheses
3817 or brackets around them.
3820 \begin_layout Subsection
3824 \begin_layout Standard
3825 To create a fraction, click on the fraction button
3828 arg "math-insert \\frac-square"
3834 \begin_inset space ~
3841 writes two insertion points in a fraction.
3842 As you would expect, you can use arrow keys or the mouse to move around
3844 Click on the top square and type
3845 \begin_inset Quotes eld
3849 \begin_inset Quotes erd
3858 \begin_inset Quotes eld
3862 \begin_inset Quotes erd
3866 You have made a fraction! Of course you can type anything within each of
3867 the two boxes: variables with exponents, square roots, other fractions,
3872 \begin_layout Standard
3884 \begin_layout Subsection
3885 Functions: lim, log, sin and others
3888 \begin_layout Standard
3889 Because letters in math mode are considered to be variables, if you type
3891 \begin_inset Quotes eld
3895 \begin_inset Quotes erd
3898 in math mode, \SpecialChar LyX
3899 thinks you are typing the product of the three variables
3901 \begin_inset Formula $s$
3905 \begin_inset Formula $i$
3909 \begin_inset Formula $n$
3913 The three letters will be typeset in italics, when what you really wanted
3915 \begin_inset Quotes eld
3919 \begin_inset Quotes erd
3923 In addition, \SpecialChar LyX
3924 will not put a space between the word
3925 \begin_inset Quotes eld
3929 \begin_inset Quotes erd
3933 \begin_inset Quotes eld
3937 \begin_inset Quotes erd
3944 will exit the formula).
3946 \begin_inset Quotes eld
3950 \begin_inset Formula $\sin(x)$
3954 \begin_inset Quotes erd
3958 \begin_inset Quotes eld
3962 \begin_inset Formula $sin(x)$
3966 \begin_inset Quotes erd
3972 \begin_layout Standard
3976 \begin_inset space ~
3984 arg "math-insert \\functions"
3988 \begin_inset Quotes eld
3992 \begin_inset Quotes erd
3995 in the pop-up function list.
3997 \begin_inset Quotes eld
4001 \begin_inset Quotes erd
4004 is displayed in \SpecialChar LyX
4005 in black, and set in upright roman type.
4006 The whole word is treated as one symbol, so if you type
4010 , it will delete the whole word.
4012 \begin_inset Quotes eld
4016 \begin_inset Quotes erd
4019 , which will be written in blue italics, like you expect in a formula.
4020 In the output, the expression will be correctly typeset.
4024 \begin_layout Standard
4025 The function list includes other trigonometric functions and their inverses,
4026 hyperbolic functions, logarithms, limits, and quite a few others.
4027 These functions can take subscripts and superscripts, important for typing
4029 \begin_inset Quotes eld
4033 \begin_inset Formula $\cos^{2}\theta$
4037 \begin_inset Quotes erd
4041 \begin_inset Quotes eld
4045 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4049 \begin_inset Quotes erd
4055 \begin_layout Standard
4067 \begin_layout Subsection
4071 \begin_layout Standard
4072 Click on the matrix button
4075 arg "dialog-show mathmatrix"
4081 \begin_inset space ~
4087 A pop-up dialog allows you to choose how many rows and columns you want
4089 Choose 2 rows and 3 columns and hit
4095 prints 6 insertion points in a
4096 \begin_inset Formula $2\times3$
4100 As usual, you can put any sort of formula expression (a square root, another
4101 matrix, etc.) in each insertion point.
4102 You can also leave some of the insertion points empty if you want.
4105 \begin_layout Standard
4110 can be used to move horizontally between the columns of a matrix.
4111 Alternatively, you can use the arrow keys to move around - hitting
4115 at the end of one box will move to the next box,
4119 will move to the next row, etc.
4122 \begin_layout Standard
4123 If you need to change the number of rows and columns, use the menu
4125 Edit\SpecialChar menuseparator
4127 \begin_inset space \thinspace{}
4131 \begin_inset space \thinspace{}
4136 or the math toolbar buttons
4139 arg "tabular-feature append-row"
4145 arg "tabular-feature delete-row"
4151 arg "tabular-feature append-column"
4157 arg "tabular-feature delete-column"
4163 \begin_layout Standard
4168 for information on how to change the horizontal alignment of each column,
4169 and how to change the vertical position of the whole matrix.
4170 Note that if you want to write a table containing text, you should use
4172 's wonderful table support, rather than trying to write text in a matrix.
4175 \begin_layout Subsection
4179 \begin_layout Standard
4180 All of the expressions we have written so far have been on the same line
4181 as the text that came before and after them, otherwise known as inline
4183 This is fine for short, simple expressions, but if you want to write larger
4184 ones, or if you want your expressions to stand out from the text, you need
4185 to write them in display mode.
4186 In addition, only displayed expressions can be labeled and numbered (see
4191 ), and multi-line equations must be in display mode.
4194 \begin_layout Standard
4195 While being in a formula, click on the display button
4204 \begin_inset space ~
4210 This centers the formula and adds a blank line before and after it.
4211 Now type in an expression and compile your file to see how it looks.
4212 The display button is actually a toggle; use it now to change a couple
4213 of your expressions to display mode and back.
4217 \begin_layout Standard
4218 Display mode has a couple differences from inline mode:
4221 \begin_layout Itemize
4222 The default font is larger for a few symbols, like
4223 \begin_inset Formula $\sum$
4227 \begin_inset Formula $\int$
4233 \begin_layout Itemize
4234 Subscripts and superscripts for limits and sums (but not integrals) are
4235 written under and over rather than next to the symbols
4238 \begin_layout Itemize
4242 \begin_layout Standard
4243 Other than these differences, though, displayed expressions and inline expressio
4244 ns are very similar.
4247 \begin_layout Standard
4248 One final note about the way displayed formulas are typeset: be careful
4249 about whether you are putting your equation into a new paragraph or not.
4250 If your formula is in the middle of a sentence or paragraph, then do not
4256 Doing so will cause the text
4260 the formula to start a new paragraph.
4261 That text will be indented or follow a blank line, depending on your document
4262 paragraph settings, which is probably not what you want.
4265 \begin_layout Standard
4270 : Put the various equations in
4274 into display mode, and see how they are typeset differently.
4277 \begin_layout Standard
4282 : Using various tools you have learned in this section, you should be able
4283 to write an equation like:
4287 \begin_layout Plain Layout
4288 After you have done it the hard way, give
4290 Insert\SpecialChar menuseparator
4291 Math\SpecialChar menuseparator
4293 \begin_inset space ~
4304 \begin_inset Formula
4306 f(x)=\left\{ \begin{array}{cc}
4309 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4318 \begin_layout Section
4322 \begin_layout Standard
4323 Now you are familiar with the basics.
4325 's math editor can do a lot more.
4326 You can refer to the
4330 manual for tips on how to:
4333 \begin_layout Itemize
4334 Label and number expressions.
4337 \begin_layout Itemize
4338 Create multi-line equations.
4341 \begin_layout Itemize
4342 Change typefaces, e.
4343 \begin_inset space \thinspace{}
4347 \begin_inset space \space{}
4350 to write bold-face text in an expression.
4353 \begin_layout Itemize
4354 Fine-tune font sizes and spacing within an expression.
4355 (Do not worry about this until your final draft!)
4358 \begin_layout Itemize
4360 These are very powerful, because you just define them once at the top of
4361 the document, and then you can use them throughout the document.
4364 \begin_layout Itemize
4365 Do almost all you can do with math.
4368 \begin_layout Chapter
4372 \begin_layout Section
4373 Other major \SpecialChar LyX
4377 \begin_layout Standard
4378 We have not gone through all the possible commands in \SpecialChar LyX
4379 , and we are not planning
4388 \begin_inset space ~
4393 manual for more information.
4394 We will just mention a couple more major things \SpecialChar LyX
4398 \begin_layout Itemize
4400 has WYSIWYM support for tables.
4403 Insert\SpecialChar menuseparator
4409 arg "tabular-insert"
4413 Click on the table with the
4420 \begin_inset space ~
4425 dialog box which allows extensive table editing.
4429 arg "toolbar-toggle table"
4432 the table toolbar will appear permanently.
4435 \begin_layout Itemize
4437 also supports including pictures in any format within documents.
4440 Insert\SpecialChar menuseparator
4446 arg "dialog-show-new-inset graphics"
4450 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4451 can have captions, and \SpecialChar LyX
4452 will automatically generate lists of figures and/or
4456 \begin_layout Itemize
4458 is heavily configurable.
4459 Everything from how the \SpecialChar LyX
4460 window looks to how the output comes out can be
4461 configured in a number of ways.
4462 Much configuration is done through
4464 Tools\SpecialChar menuseparator
4468 For more information on this, check out
4470 Help\SpecialChar menuseparator
4471 Customization\SpecialChar endofsentence
4475 \begin_layout Itemize
4477 is being developed by a team of programmers on five continents.
4478 Therefore, \SpecialChar LyX
4479 has better support for non-English languages (such as Dutch,
4480 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4481 ) than many word processors.
4482 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4483 languages Chinese Japanese, and Korean are supported.
4484 You can write documents in other languages and you can also configure \SpecialChar LyX
4486 to show its menus and error messages in other languages.
4490 \begin_layout Itemize
4491 The \SpecialChar LyX
4492 menus feature keybindings.
4493 This means that you can do
4495 File\SpecialChar menuseparator
4506 or by using the binding which is shown next to it in the menu (
4513 Keybindings are also configurable.
4514 For information on this, check out
4516 Help\SpecialChar menuseparator
4517 Customization\SpecialChar endofsentence
4521 \begin_layout Itemize
4523 can read \SpecialChar LaTeX
4526 \begin_inset space ~
4530 \begin_inset CommandInset ref
4532 reference "sec:tex2lyx"
4539 \begin_layout Itemize
4540 Spell-checking, thesaurus, and word count facilities are available.
4543 \begin_layout Itemize
4544 Generation of indexes and nomenclatures/glossaries is supported.
4547 \begin_layout Section
4549 for \SpecialChar LaTeX
4551 \begin_inset CommandInset label
4553 name "sec:latexusers"
4560 \begin_layout Standard
4561 If you do not know anything about \SpecialChar LaTeX
4562 , you do not have to read this section.
4563 Actually, you might want to
4567 about \SpecialChar LaTeX
4568 , and then read this chapter.
4569 However, some of those who begin to use \SpecialChar LyX
4570 will be familiar with \SpecialChar LaTeX
4572 If you are such a person, you may be wondering if \SpecialChar LyX
4573 can really do everything
4576 The short answer is that \SpecialChar LyX
4577 can do pretty much everything \SpecialChar LaTeX
4579 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4584 \begin_layout Standard
4585 Because this is just a tutorial, we are only going to mention things that
4586 new \SpecialChar LyX
4587 users will most likely be interested in.
4588 In the interests of keeping the Tutorial short, we will give only minimal
4593 \begin_inset space ~
4601 \begin_inset space ~
4606 manuals have a great deal of information on differences between \SpecialChar LyX
4607 and \SpecialChar LaTeX
4609 and how to do various \SpecialChar LaTeX
4610 tricks in \SpecialChar LyX
4614 \begin_layout Subsection
4619 \begin_layout Standard
4620 Anything that you enter in \SpecialChar TeX
4621 mode will be passed straight to \SpecialChar LaTeX
4623 displayed in red on the screen.
4624 You can use \SpecialChar TeX
4625 commands in \SpecialChar LyX
4628 Insert\SpecialChar menuseparator
4631 \begin_inset space ~
4643 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4647 \begin_layout Standard
4648 In a math formula, \SpecialChar TeX
4649 mode is handled a bit differently.
4651 mode is entered there by typing a backslash.
4652 The backslash is not written out, but anything you type afterwards will
4654 You exit \SpecialChar TeX
4659 or some other non-alphabetic character, like a number, underscore, caret
4661 Once you exit \SpecialChar TeX
4662 mode, if \SpecialChar LyX
4663 knows the \SpecialChar TeX
4664 command you have typed in, it will
4665 convert it to WYSIWYM\SpecialChar endofsentence
4667 \begin_inset Quotes eld
4677 \begin_inset Quotes erd
4680 in a formula and then press
4686 \begin_inset Quotes eld
4690 \begin_inset Quotes erd
4694 \begin_inset Quotes eld
4698 \begin_inset Formula $\gamma$
4702 \begin_inset Quotes erd
4706 This will work for almost all, non-complicated math macros.
4707 This may be faster than using the
4710 \begin_inset space ~
4715 , and will be especially convenient for experienced \SpecialChar LaTeX
4719 \begin_layout Standard
4720 As a special case, if you type
4721 \begin_inset Quotes eld
4731 \begin_inset Quotes erd
4734 in a formula, the beginning
4738 ending braces will be inserted in red while the cursor is placed between
4740 This makes it more convenient to type those commands that take an argument.
4743 \begin_layout Standard
4745 cannot do absolutely everything that \SpecialChar LaTeX
4747 Some fancy functions are not supported at all, while some work but are
4750 mode allows users to get the full flexibility of \SpecialChar LaTeX
4751 , while having all the
4752 convenient features of \SpecialChar LyX
4753 , like WYSIWYM math, tables, and editing.
4755 could never support every \SpecialChar LaTeX
4763 in the preamble (see Section
4764 \begin_inset space ~
4768 \begin_inset CommandInset ref
4770 reference "sec:preamble"
4774 ), you can use any package you want — although you will not have WYSIWYM
4775 support for that package's features.
4778 \begin_layout Subsection
4779 Importing \SpecialChar LaTeX
4785 \begin_inset CommandInset label
4794 \begin_layout Standard
4795 You can import a \SpecialChar LaTeX
4796 file into \SpecialChar LyX
4799 File\SpecialChar menuseparator
4800 Import\SpecialChar menuseparator
4803 \begin_inset space ~
4808 menu in \SpecialChar LyX
4810 This will call the program
4814 which will create a file foo.lyx from the file foo.tex.
4816 will then open that file.
4817 If the translation does not work, you can try calling
4821 from the command line, possibly using fancier options.
4824 \begin_layout Standard
4825 Even when the translation does work,
4829 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4831 It will leave things it does not understand in \SpecialChar TeX
4832 mode; so, after translating
4837 , you can look for the red text and manually edit it to get it right.
4840 \begin_layout Standard
4845 has its own documentation (manpage), which Unix/Linux users can access
4846 via the console command
4849 \begin_inset space ~
4855 The manpage describes which \SpecialChar LaTeX
4856 commands and environments are not supported,
4857 what bugs you might run into (and how to get around them), and how to use
4858 the various options.
4861 \begin_layout Standard
4862 It is important to understand that
4866 can only translate files whose document class is
4867 \begin_inset Quotes eld
4871 \begin_inset Quotes erd
4875 , that is, for which there is a corresponding \SpecialChar LyX
4881 If there is no layout file, then you will get an error saying that the
4882 conversion could not be performed.
4883 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4888 simply will not know how to translate the \SpecialChar LaTeX
4889 that it finds there into things
4892 More about layout files and how they are created is explained in detail
4900 \begin_layout Subsection
4901 Converting \SpecialChar LyX
4902 Documents to \SpecialChar LaTeX
4906 \begin_layout Standard
4907 You might wish to convert a \SpecialChar LyX
4908 Document to a \SpecialChar LaTeX
4910 For example, a co-worker or co-author who does not have \SpecialChar LyX
4915 File\SpecialChar menuseparator
4916 Export\SpecialChar menuseparator
4921 This will create a file
4929 file you are editing.
4932 \begin_layout Subsection
4937 \begin_layout Subsubsection
4941 \begin_layout Standard
4944 Document\SpecialChar menuseparator
4947 dialog takes care of the document-wide options, such as changing the document
4948 class, default font size and paper size.
4949 Document class options and also options for \SpecialChar LaTeX
4950 packages can be entered there
4954 \begin_inset space ~
4962 \begin_layout Subsubsection
4963 Other Preamble Matter
4964 \begin_inset CommandInset label
4973 \begin_layout Standard
4974 If you have special commands to put in the preamble of a \SpecialChar LaTeX
4976 use them in a \SpecialChar LyX
4980 Document\SpecialChar menuseparator
4981 Settings\SpecialChar menuseparator
4984 \begin_inset space ~
4989 and type in the dialog window (or from the document settings dialog, depending
4991 Anything you type will (as with \SpecialChar TeX
4992 mode) be sent directly to \SpecialChar LaTeX
4996 \begin_layout Subsection
5001 \begin_layout Standard
5003 has support for Bib\SpecialChar TeX
5004 , which allows you to build databases of bibliographical
5005 references to be used in multiple documents.
5008 Insert\SpecialChar menuseparator
5010 \begin_inset space \thinspace{}
5014 \begin_inset space \thinspace{}
5017 TOC\SpecialChar menuseparator
5020 \begin_inset space ~
5035 field you load Bib\SpecialChar TeX
5040 field you can load Bib\SpecialChar TeX
5044 \begin_layout Standard
5045 After you have done this, you can use citations from any bibliographies
5046 you have included with
5048 Insert\SpecialChar menuseparator
5052 \begin_inset space ~
5056 \begin_inset CommandInset ref
5058 reference "sec:bibliographies"
5067 dialog will show a list of all the references in your
5075 \begin_layout Section
5079 \begin_layout Standard
5080 Sometimes when you try to view a document, there will be errors, things
5081 that \SpecialChar LyX
5082 or \SpecialChar LaTeX
5084 When this happens, \SpecialChar LyX
5089 \begin_inset space ~
5095 Clicking on individual errors in this dialog will take you to the place
5096 in the \SpecialChar LyX
5097 document where the error occurs and also display the detailed \SpecialChar LaTeX