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 latexpar
304 \begin_layout Standard
313 \begin_layout Itemize
314 Detailed explanations of \SpecialChar LaTeX
316 \begin_inset Separator latexpar
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 latexpar
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
1784 \begin_inset Newline newline
1792 \begin_layout Chapter
1796 \begin_layout Standard
1797 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1799 It introduced you to the basic editing operations in \SpecialChar LyX
1800 , as well as the powerful
1801 method of writing with environments.
1802 Most people who use \SpecialChar LyX
1803 , though, will want to write documents: papers, articles,
1804 books, manuals, or letters.
1805 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1807 a complete document.
1808 It will introduce you to text classes, which allow you to write different
1810 It will then describe many of the additions that turn text into a document,
1811 such as titles, footnotes, cross references, bibliographies, and tables
1815 \begin_layout Section
1817 \begin_inset CommandInset label
1819 name "sec:Document-Classes"
1826 \begin_layout Standard
1827 Different sorts of documents should be typeset differently.
1828 For example, books are generally printed double-sided, while articles are
1830 In addition, many documents contain special environments: letters contain
1831 some environments — such as the sender's address and the signature — which
1832 do not make sense in a book or article.
1833 The \SpecialChar LyX
1842 \begin_layout Plain Layout
1843 for \SpecialChar LaTeX
1844 users: this is equivalent to the \SpecialChar LaTeX
1850 takes care of these large scale differences between different sorts of
1852 This Tutorial, for example, was written in the
1857 Document classes are another major part of the WYSIWYM philosophy; they
1858 tell \SpecialChar LyX
1859 how to typeset the document, so you do not need to know how.
1862 \begin_layout Standard
1863 Your document is probably being written in the
1871 \begin_layout Plain Layout
1872 That is usually the default document class
1877 Try changing to other document classes (using the
1879 Document\SpecialChar menuseparator
1882 dialog) to see how they are typeset differently.
1883 If you change your document to the
1887 document class and look at the
1891 box, you will see that most of the allowed environments are the same.
1892 However, you can now use the
1897 If you are ever unsure about which environments you can use in a given
1898 document class, just consult the
1905 \begin_layout Standard
1906 Font sizes, one- or two-column printing, and page headings are just some
1907 of the ways journals' typesettings differ from one another.
1908 As the Computer Age continues to mature, journals have begun accepting
1909 electronic submissions, creating \SpecialChar LaTeX
1911 \begin_inset Quotes eld
1915 \begin_inset Quotes erd
1918 so that authors can submit correctly typeset articles.
1920 is set up to support this as well.
1921 For example, \SpecialChar LyX
1922 supports typesetting (and extra environments) for the American
1923 Mathematics Society journals using the
1926 \begin_inset space ~
1934 \begin_layout Standard
1935 Here is a very quick reference to some of the document classes.
1938 Special Document Classes
1944 manual for many more details.
1945 \begin_inset Separator latexpar
1951 \begin_layout Standard
1953 \begin_inset Tabular
1954 <lyxtabular version="3" rows="7" columns="2">
1955 <features tabularvalignment="middle">
1956 <column alignment="center" valignment="top" width="0pt">
1957 <column alignment="center" valignment="top" width="0pt">
1959 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1962 \begin_layout Plain Layout
1968 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1971 \begin_layout Plain Layout
1979 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1982 \begin_layout Plain Layout
1988 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1991 \begin_layout Plain Layout
1992 one-sided, no chapters
1999 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2002 \begin_layout Plain Layout
2008 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2011 \begin_layout Plain Layout
2012 layout & environments for American Math Society
2019 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2022 \begin_layout Plain Layout
2028 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2031 \begin_layout Plain Layout
2032 longer than article, two-sided
2039 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2042 \begin_layout Plain Layout
2048 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2051 \begin_layout Plain Layout
2052 report + front and back matter
2059 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2062 \begin_layout Plain Layout
2068 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2071 \begin_layout Plain Layout
2079 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2082 \begin_layout Plain Layout
2088 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2091 \begin_layout Plain Layout
2092 lots of extra environments for address, signature\SpecialChar ldots
2106 \begin_layout Section
2107 Templates: Writing a Letter
2110 \begin_layout Standard
2111 One way to write a letter would be to open a new file, and choose a
2117 Document\SpecialChar menuseparator
2121 While this is the most obvious way to write a letter, it seems like extra
2123 Every time you write a business letter, you want to have your address,
2124 the address to which you are sending it, a body, a signature, etc.
2130 for letters, which contains a sample letter; once you have a template,
2131 you can just replace a couple of parts of the letter with your text each
2132 time you write a letter.
2135 \begin_layout Standard
2136 Open a new file with
2138 File\SpecialChar menuseparator
2140 \begin_inset space ~
2144 \begin_inset space ~
2155 Save and print the file to see how the various environments are typeset.
2158 \begin_layout Standard
2159 When you look at the
2163 box, you will see several environments, like the
2166 \begin_inset space ~
2171 environment, that do not exist in most other document classes.
2177 You can play around for a while to figure out how the various environments
2179 You will notice for example that the
2183 environment has the word
2184 \begin_inset Quotes eld
2188 \begin_inset Quotes erd
2191 in red before the actual text of the signature.
2192 This word does not show up in the actual letter, as you will see if you
2193 view/export the file.
2194 It is just there to let you know where the signature goes.
2195 Also, note that it does not matter where in the file the
2200 Remember, \SpecialChar LyX
2201 is WYSIWYM; you can put the
2205 environment anywhere you want, but \SpecialChar LyX
2206 knows that in the printout, the signature
2207 should be at the end.
2210 \begin_layout Standard
2211 A template is just a regular \SpecialChar LyX
2213 This means you can fill in your address and signature and save the file
2215 From now on, any time you want to write a letter, you can use the new template
2217 We do not have to suggest an actual
2218 \begin_inset Quotes eld
2222 \begin_inset Quotes erd
2225 here; just write a letter to someone!
2229 \begin_layout Plain Layout
2230 One warning, if you are writing from a template.
2231 If you erase all of the text in an environment — for example, if you erase
2235 \begin_inset space ~
2240 field so that you can replace it with your own — and then you move the
2241 cursor without writing any text, the environment may disappear.
2242 This is because most environments cannot exist without any text in them.
2243 Just reselect the environment from the
2255 \begin_layout Standard
2256 Templates can be a huge time-saver, and we urge you to use them whenever
2258 In addition, they can help a person learn how to use some of the fancier
2260 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2262 of less computer-aware users.
2263 When they are first learning \SpecialChar LyX
2264 , it will be less intimidating if they have
2265 a letter template customized for their company, for example.
2268 \begin_layout Section
2272 \begin_layout Standard
2274 (like \SpecialChar LaTeX
2275 ) considers the title — which may contain the actual title, the author,
2276 the date, and even an abstract of a paper — to be a separate part of the
2280 \begin_layout Standard
2281 Go back to your first \SpecialChar LyX
2282 document and make sure it is using the
2290 \begin_layout Plain Layout
2291 You should not be using the letter any more, since the
2295 document class does not allow titles.
2300 Type a title on the first line, and change the line to the
2305 On the next line, type your name and change it to the
2310 On the next line, write the date in the
2315 Type a paragraph or two summarizing your document using the
2320 Notice how the title is presented when it is printed out.
2321 If you change the document format to Book, you will get a separate title
2322 page, like the first page of this tutorial.
2325 \begin_layout Standard
2330 : Fix the title, date, and author in
2335 \begin_layout Section
2336 Labels and Cross-References
2339 \begin_layout Standard
2340 You can label section headings, list items, formulas, footnotes, and floats
2344 \begin_layout Plain Layout
2345 Floats are explained in the
2359 Once you do so, you can refer to the element in other parts of the document,
2360 using cross-references.
2361 You can refer to a section's number, to the page on which the section begins
2363 As with section numbering, \SpecialChar LyX
2364 also takes care of cross-reference numbering
2366 Automatic management of labels and cross-references is among the most significa
2367 nt advantages of \SpecialChar LyX
2368 (and \SpecialChar LaTeX
2369 ) over conventional word processors.
2372 \begin_layout Subsection
2376 \begin_layout Standard
2377 Go to our second section, whose title is
2378 \begin_inset Quotes eld
2382 \begin_inset Quotes erd
2386 Click at the end of the section title line, and select
2388 Insert\SpecialChar menuseparator
2391 or the toolbar button
2398 A dialog asks you for a label name, and gives you a suggestion.
2403 , the label name will be placed in a box next to the section title.
2406 \begin_layout Standard
2407 So far you have not done anything — the output will look exactly the same,
2408 since labels do not show up in the printed document.
2409 However, now that you have added a label, you can refer to that label with
2411 We will do that next.
2414 \begin_layout Subsection
2415 Your first cross-reference
2418 \begin_layout Standard
2419 Place the cursor somewhere in Section
2420 \begin_inset space ~
2427 \begin_layout LyX-Code
2428 If you want to know more about this document, then see Section .
2431 \begin_layout Standard
2432 Now, with the cursor before the final period, select
2434 Insert\SpecialChar menuseparator
2436 \begin_inset space ~
2441 or the toolbar button
2444 arg "dialog-show-new-inset ref"
2448 The Cross-reference dialog pops up.
2449 It shows a list of the possible labels you can reference.
2450 At the moment, there should be only one,
2451 \begin_inset Quotes eld
2454 sec:About-This-Document
2455 \begin_inset Quotes erd
2459 First, select the drop-down menu labeled
2460 \begin_inset Quotes eld
2464 \begin_inset Quotes erd
2468 \begin_inset Quotes eld
2471 <reference> on page <page>
2472 \begin_inset Quotes erd
2477 \begin_inset Quotes eld
2480 sec:About-This-Document
2481 \begin_inset Quotes erd
2484 (it may be selected by default), and a reference marker will appear containing
2486 \begin_inset Quotes eld
2489 Ref+Text: sec:About-This-Document
2490 \begin_inset Quotes erd
2493 (To be really correct, you should put a
2496 \begin_inset space ~
2504 arg "command-alternatives space-insert protected ; math-space"
2507 ) in between the word
2508 \begin_inset Quotes eld
2512 \begin_inset Quotes erd
2515 and the reference.) An alternative way to reference a label is to right-click
2516 the label and select
2520 in the pop-up context menu.
2521 The cross-reference to this label is now in the clipboard and can be copied
2522 to the actual cursor position via the menu
2524 Edit\SpecialChar menuseparator
2534 In the printed document, this reference marker will be replaced with the
2535 section number and then the page number.
2536 Preview your document and you will see that \SpecialChar LaTeX
2537 has been even cleverer than
2540 \begin_inset Quotes eld
2544 \begin_inset Quotes erd
2547 and depending how much text you have between the start of Section
2548 \begin_inset space ~
2551 2 and this cross-reference you may see
2552 \begin_inset Quotes eld
2556 \begin_inset Quotes erd
2560 \begin_inset Quotes eld
2563 on the previous page
2564 \begin_inset Quotes erd
2568 \begin_inset Quotes eld
2572 \begin_inset Quotes erd
2579 is the page number).
2582 \begin_layout Standard
2583 Conveniently, a cross-reference acts as a hyperlink when you are editing
2584 a document in \SpecialChar LyX
2585 ; clicking on it will pop up the
2592 \begin_inset space ~
2596 \begin_inset space ~
2601 will move the cursor to the referenced label.
2604 \begin_layout Subsection
2605 More fun with labels
2608 \begin_layout Standard
2609 We told you that \SpecialChar LyX
2610 takes care of numbering cross-references; now you can
2612 Add a new section before Section
2613 \begin_inset space ~
2617 Update the preview, and — voilà! — the section cross-reference changed
2619 \begin_inset Quotes eld
2623 \begin_inset Quotes erd
2626 ! Change the section
2627 \begin_inset Quotes eld
2631 \begin_inset Quotes erd
2634 to a subsection, and the cross-reference will reference Subsection
2635 \begin_inset space ~
2638 2.1 instead of Section
2639 \begin_inset space ~
2643 The page reference will not change unless you add a whole page of text
2644 before the label, of course.
2648 \begin_layout Standard
2649 If you want some more practice with labels, then try putting a new label
2650 where your first cross-reference was, and refer to that label from elsewhere
2652 If you will be inserting cross-references often, it may be convenient to
2660 \begin_layout Standard
2661 If you want to confirm that the cross-referencing gets the pages right even
2662 for larger documents,
2666 a couple pages of text from the
2670 to the clipboard, and
2674 them into your document.
2678 \begin_layout Plain Layout
2679 By the way, copying a chapter title may cause an error, because chapters
2680 are not allowed in the article class, see Section
2681 \begin_inset space ~
2685 \begin_inset CommandInset ref
2687 reference "sec:Document-Classes"
2692 If this happens, just delete the chapter title.
2700 \begin_layout Standard
2705 : Fix the references in
2710 \begin_layout Section
2711 Footnotes and Margin Notes
2714 \begin_layout Standard
2715 Footnotes can be added using the toolbar button
2718 arg "footnote-insert"
2723 Insert\SpecialChar menuseparator
2727 Click at the end of the word
2728 \begin_inset Quotes eld
2733 \begin_inset Quotes erd
2736 somewhere in your document and insert a footnote.
2737 A footnote box appears where you can enter the text of the footnote.
2739 should place the cursor at the beginning of the footnote box.
2743 \begin_layout LyX-Code
2745 is a typesetting word processor.
2748 \begin_layout Standard
2749 Now click on the button labeled
2750 \begin_inset Quotes eld
2754 \begin_inset Quotes erd
2758 The footnote box is closed, leaving the button showing where the footnote
2759 marker will be in the printed text; this is called
2760 \begin_inset Quotes eld
2764 \begin_inset Quotes erd
2768 You can unfold the footnote at any time and re-edit its text by clicking
2770 \begin_inset Quotes eld
2774 \begin_inset Quotes erd
2780 \begin_layout Standard
2781 A footnote can be cut and pasted like normal text.
2782 Go ahead; try it! All you need to do is select the footnote button
2786 \begin_layout Plain Layout
2787 It may be easier to select it using the keyboard.
2788 You might accidentally open the footnote if you are trying to select the
2789 marker itself with the mouse.
2803 In addition, you can change regular text to a footnote, by selecting it
2807 arg "footnote-insert"
2810 button; change a footnote to regular text by hitting the
2814 key when the cursor is in the first position of a footnote, or by hitting
2819 key when the cursor is in the very last position of the footnote.
2822 \begin_layout Standard
2823 Margin notes can be added using the menu
2825 Insert\SpecialChar menuseparator
2827 \begin_inset space ~
2832 or the toolbar button
2835 arg "marginalnote-insert"
2838 \SpecialChar endofsentence
2839 Margin notes are like footnotes, except that:
2842 \begin_layout Itemize
2843 the on-screen boxes say
2844 \begin_inset Quotes eld
2848 \begin_inset Quotes erd
2852 \begin_inset Quotes eld
2856 \begin_inset Quotes erd
2862 \begin_layout Itemize
2863 the notes will be placed in the margin, instead of below the text
2866 \begin_layout Itemize
2867 margin notes are not numbered
2870 \begin_layout Standard
2871 Change your \SpecialChar LyX
2872 footnote back to text, then select and change it to a margin
2874 Run \SpecialChar LaTeX
2875 again to see what the margin note looks like.
2878 \begin_layout Standard
2883 : Fix the footnote in
2888 \begin_layout Section
2890 \begin_inset CommandInset label
2892 name "sec:bibliographies"
2899 \begin_layout Standard
2900 Bibliographies are similar to cross-references.
2901 The bibliography contains a list of references at the end of the document,
2902 and they can be referenced from within the document.
2903 Like section titles, \SpecialChar LyX
2904 and \SpecialChar LaTeX
2905 make your job easier by automatically numbering
2906 the bibliography items and changing citations when the item numbers change.
2909 \begin_layout Standard
2910 Go to the end of the document and switch to the
2915 Now, each paragraph you type will be a reference.
2917 \begin_inset Quotes eld
2922 The Lyx Tutorial, by the \SpecialChar LyX
2926 \begin_inset Quotes erd
2929 as your first reference.
2930 Note that \SpecialChar LyX
2931 automatically puts a number in a box before each reference.
2932 Click on the boxed reference number, and the
2935 \begin_inset space ~
2945 is to refer to this reference within the \SpecialChar LyX
2955 is set (default), you will see the number of the bibliography in the output.
2961 \begin_inset Quotes eld
2965 \begin_inset Quotes erd
2968 to make it easy to remember.
2971 \begin_layout Standard
2972 Now pick somewhere in your document that you would like to insert a reference.
2975 Insert\SpecialChar menuseparator
2978 or the toolbar button
2981 arg "dialog-show-new-inset citation"
2990 The left panel in this dialog lists all the bibliography entries, and this
2991 field allows you to choose which bibliography item you want to cite.
2993 \begin_inset Quotes eld
2997 \begin_inset Quotes erd
3000 (right now, that is the only item in the bibliography), then use the
3004 button in the center to insert it.
3005 (You can have multiple citations in the same place by transferring a number
3010 \begin_layout Plain Layout
3011 If one uses label names for references that are easy to remember it is easier
3012 to find the entry in the list of references.
3022 Now preview your file and you will see that the citation appears in brackets
3023 in the text, referring to the bibliography at the end of the document.
3026 \begin_layout Standard
3030 \begin_inset space ~
3039 dialog will put a remark (such as a reference to a page or chapter within
3040 the referenced book or article) in the brackets after the reference.
3041 If you want the references to have labels instead of numbers in the printed
3042 output (for example, some journals would use
3043 \begin_inset Quotes eld
3047 \begin_inset Quotes erd
3050 to refer to a paper written by Smith in 1995), use the
3057 \begin_inset space ~
3070 \begin_layout Standard
3075 Fix the bibliography and citation in
3080 \begin_layout Section
3084 \begin_layout Standard
3085 You may want to put a table of contents at the beginning of your document.
3087 makes this easy to do.
3092 after your document title and before your first section title and select
3095 Insert\SpecialChar menuseparator
3097 \begin_inset space ~
3101 \begin_inset space ~
3104 TOC\SpecialChar menuseparator
3106 \begin_inset space ~
3110 \begin_inset space ~
3117 \begin_inset Quotes eld
3121 \begin_inset Quotes erd
3124 will appear in a button on the first line of the document.
3128 \begin_layout Standard
3129 This may not appear to be very useful.
3130 However, if you look at your preview, you will see that a table of contents
3131 has been generated, listing the various sections and subsections in your
3133 As usual, if you reorder sections or create new ones, you will see those
3134 changes in the preview when you update it.
3138 \begin_layout Standard
3139 The table of contents is not printed in the on-screen version of the document.
3140 But you can display the table of contents in a separate window by clicking
3141 on the table of contents button, or by using
3143 View\SpecialChar menuseparator
3145 \begin_inset space ~
3150 or the toolbar button
3153 arg "dialog-toggle toc"
3157 This menu will work even if you do not have a table of contents inset in
3159 This is a very useful tool for rearranging your document parts.
3160 Clicking on a (sub)section title in the
3164 window will highlight that line and move the display (in the \SpecialChar LyX
3166 to that place in the document.
3167 You can also use the arrow keys to move up and down in the table of contents.
3168 You may therefore find it convenient to leave this window open throughout
3170 You can get similar functionality from the
3174 menu, though, where the table of contents appears automatically.
3177 \begin_layout Standard
3178 To get rid of the Table of Contents, you can delete the table of contents
3179 button just like any other text.
3182 \begin_layout Standard
3187 : Fix the table of contents in
3192 \begin_layout Chapter
3196 \begin_layout Standard
3198 is used by many scientists because it outputs great looking equations,
3199 avoiding the control characters used by word processors and their equation
3201 Many of these scientists are frustrated, however, because writing equations
3202 in \SpecialChar LaTeX
3203 is more like programming than writing.
3204 Happily, \SpecialChar LyX
3205 has WYSIWYM support for equations.
3206 If you are used to \SpecialChar LaTeX
3207 , you will find that all of the usual \SpecialChar LaTeX
3209 can be typed in normally, but they will show up in a WYSIWYM fashion.
3210 If, on the other hand, you have never written in \SpecialChar LaTeX
3214 \begin_inset space ~
3219 will allow you to write professional-looking math quickly and easily.
3222 \begin_layout Section
3226 \begin_layout Standard
3227 Somewhere in your \SpecialChar LyX
3231 \begin_layout LyX-Code
3232 I like what Einstein said, E=mc^2, because it is so simple.
3235 \begin_layout Standard
3236 Now, that equation does not look very good in \SpecialChar LyX
3237 and in the output; there
3238 is no space between the letters and the equals sign, and you would like
3239 to write an actual superscript for the
3240 \begin_inset Quotes eld
3244 \begin_inset Quotes erd
3248 That bad typesetting happened because we did not tell \SpecialChar LyX
3249 that we were writing
3250 a mathematical expression, so it typeset the equation like regular old
3254 \begin_layout Standard
3255 But we can create a formula that will be typeset properly.
3256 Highlight the equation and click the toolbar button
3264 Insert\SpecialChar menuseparator
3265 Math\SpecialChar menuseparator
3267 \begin_inset space ~
3273 If nothing is highlighted \SpecialChar LyX
3274 inserts a little blue square, which is an empty
3276 The expression appears in blue and the blue square disappears as soon as
3277 the formula is not empty.
3282 to leave the equation.
3283 The purple markers disappear, leaving the cursor to the right of the expression.
3284 Now, if you type something, it will be regular text.
3287 \begin_layout Standard
3288 Looking at the output you will notice that the expression was typeset nicely,
3289 with spaces between the letters and the equals sign, and a superscript
3291 \begin_inset Quotes eld
3295 \begin_inset Quotes erd
3299 Letters in math mode are assumed to be variables, and come out in italics.
3300 Numbers are just numbers.
3303 \begin_layout Standard
3304 This math editor is another example of the WYSIWYM philosophy.
3305 In \SpecialChar LaTeX
3306 , you write a mathematical expression using text and commands like
3312 ; this can be frustrating, because you cannot see what an expression looks
3313 like until you run the file under \SpecialChar LaTeX
3314 and you may have to spend time, for
3315 example, finding missing brackets.
3317 does not attempt to get the expression to look perfect (WYSIWYG), but
3318 it gives you an extremely good idea of what the expression will look like.
3320 then takes care of the professional typesetting.
3323 \begin_layout Section
3324 Navigating an Equation
3327 \begin_layout Standard
3329 \begin_inset Formula $E=mc^{2}$
3333 \begin_inset Formula $E=1+mc^{2}$
3337 Use the arrow keys to move the cursor into the expression.
3338 Note that when you enter the expression, the purple markers appear to let
3339 you know you are editing math.
3348 to move the cursor past the equals sign, and just type
3349 \begin_inset Quotes eld
3353 \begin_inset Quotes erd
3357 Again, you can use the arrow keys or
3361 to leave the formula\SpecialChar endofsentence
3365 \begin_layout Standard
3366 Other than the special keys described below, typing in math mode is like
3367 editing regular text.
3377 Select text either with the arrow keys or with the mouse.
3380 Edit\SpecialChar menuseparator
3383 works in math mode as well as cut and paste.
3384 One thing to be careful of: if you are left or right outside a formula
3393 respectively, you delete the whole formula.
3394 Luckily, you can just use
3401 \begin_layout Standard
3402 What if you want to change
3403 \begin_inset Formula $E=mc^{2}$
3407 \begin_inset Formula $E=mc^{2.5}+1$
3410 ? Again, you can use the mouse to click in the right place.
3411 However, you can also use the arrow keys.
3412 If the cursor is just after the
3413 \begin_inset Quotes eld
3417 \begin_inset Quotes erd
3421 \begin_inset Quotes eld
3425 \begin_inset Quotes erd
3432 and the cursor is moved to the level of the superscript, just before the
3434 \begin_inset Quotes eld
3438 \begin_inset Quotes erd
3443 \begin_inset Quotes eld
3447 \begin_inset Quotes erd
3455 will move the cursor back to the regular level.
3464 , the cursor will be placed
3468 the superscript (so that you can then type the
3469 \begin_inset Quotes eld
3473 \begin_inset Quotes erd
3479 \begin_layout Section
3480 Exponents and Indices
3483 \begin_layout Standard
3484 An exponent can be entered from the
3487 \begin_inset space ~
3492 (see below), but it is actually simpler just to type the caret key,
3493 \begin_inset Quotes eld
3497 \begin_inset Quotes erd
3502 will place another blue rectangle in the superscript, so that whatever
3503 you write next will be superscripted, and in a smaller font size.
3504 Everything you type until you hit a
3512 to exit the formula entirely) will be in the superscript.
3515 \begin_layout Standard
3516 Writing a subscript (index) is just as easy; start one by typing the underscore
3518 \begin_inset Quotes eld
3522 \begin_inset Quotes erd
3526 You can subscript and superscript both subscripts and superscripts like
3528 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3535 \begin_layout Standard
3547 \begin_layout Section
3551 \begin_layout Standard
3555 \begin_inset space ~
3560 is a convenient way to enter symbols and/or to perform complicated formula
3562 Many of these operations can be accomplished from the keyboard or the
3564 Insert\SpecialChar menuseparator
3569 Edit\SpecialChar menuseparator
3572 menus (the latter only appears when you are in Math mode).
3573 However, we are going to concentrate on using the
3576 \begin_inset space ~
3581 , just to let you know what is out there; you can learn keyboard shortcuts
3582 and commands later from the
3589 \begin_layout Standard
3593 \begin_inset space ~
3598 is shown when the cursor is in a formula and can also be turned on manually
3601 View\SpecialChar menuseparator
3605 When you click there on
3606 \begin_inset Quotes eld
3610 \begin_inset Quotes erd
3616 arg "toolbar-toggle math"
3619 ) the toolbar will be shown permanently at the bottom; this state is visualized
3624 menu with a checkmark.
3625 When you click in this state again on
3626 \begin_inset Quotes eld
3630 \begin_inset Quotes erd
3640 \begin_inset space ~
3645 is only shown when the cursor is within a formula; this state is visualized
3646 by the renaming of the menu entry from
3647 \begin_inset Quotes eld
3651 \begin_inset Quotes erd
3655 \begin_inset Quotes eld
3659 \begin_inset space ~
3663 \begin_inset Quotes erd
3669 \begin_layout Subsection
3673 \begin_layout Standard
3677 \begin_inset space ~
3682 allows you to choose from a large array of symbols used in math: operators,
3683 arrows, relationships, delimiters, special characters, sums and integrals.
3684 Note that subscripting and superscripting allow you to put lower and upper
3685 limits on sums and integrals.
3688 \begin_layout Subsection
3689 Roots, decorations, and delimiters
3692 \begin_layout Standard
3693 To type a square root, just click on the button
3696 arg "math-insert \\sqrt"
3700 The square root appears, and the cursor is in a new insertion point inside
3702 You can type variables, numbers, other square roots, fractions, whatever
3705 will automatically resize the square root to fit what is inside.
3708 \begin_layout Standard
3710 \begin_inset Quotes eld
3714 \begin_inset Quotes erd
3718 \begin_inset Formula $\overrightarrow{a}$
3721 ) or group of characters (
3722 \begin_inset Formula $\overrightarrow{a+b}$
3725 ) is done similarly.
3726 Decorations are available from the toolbar via the button
3729 arg "math-insert \\hat"
3733 Click on a decoration, and \SpecialChar LyX
3734 will insert that decoration with an insertion
3735 point under (or over) it.
3736 Just type what you want in the insertion point.
3737 There are two sets of decorations: those that resize with the text you
3738 type, and those that have a fixed size, and are most appropriate for a
3743 \begin_layout Standard
3744 Delimiters such as parentheses, brackets, and braces work similarly, but
3745 are a bit more complicated.
3746 Hit the delimiter button
3749 arg "dialog-show mathdelimiter"
3757 Your current selection of delimiters is displayed in a box.
3758 It is a pair of parentheses by default, but you can choose a pair of braces,
3759 a brace and a parenthesis, or choose the empty square to have something
3761 \begin_inset Quotes eld
3765 \begin_inset Formula $a=\left\langle 7\right.$
3769 \begin_inset Quotes erd
3772 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3777 \begin_layout Standard
3778 If you are lazy, you can type actual parentheses in math mode, rather than
3784 However, those parentheses will be the same size as regular text, which
3785 will look bad if you have a big fraction or matrix inside the parentheses.
3786 So it is better to use one of the three delimiter buttons that insert them
3787 directly, for example
3790 arg "math-delim ( )"
3796 \begin_layout Standard
3797 You can also put delimiters or a square root sign or a decoration on already
3798 existing formula parts.
3799 Select the portion of the formula that you want to adjust, and then click
3800 on the button you want from the
3803 \begin_inset space ~
3809 Try using this to change Newton's second law from scalar to vector form
3811 \begin_inset Formula $f=ma$
3815 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3819 Once you have learned about matrices, this is how you will put parentheses
3820 or brackets around them.
3823 \begin_layout Subsection
3827 \begin_layout Standard
3828 To create a fraction, click on the fraction button
3831 arg "math-insert \\frac-square"
3837 \begin_inset space ~
3844 writes two insertion points in a fraction.
3845 As you would expect, you can use arrow keys or the mouse to move around
3847 Click on the top square and type
3848 \begin_inset Quotes eld
3852 \begin_inset Quotes erd
3861 \begin_inset Quotes eld
3865 \begin_inset Quotes erd
3869 You have made a fraction! Of course you can type anything within each of
3870 the two boxes: variables with exponents, square roots, other fractions,
3875 \begin_layout Standard
3887 \begin_layout Subsection
3888 Functions: lim, log, sin and others
3891 \begin_layout Standard
3892 Because letters in math mode are considered to be variables, if you type
3894 \begin_inset Quotes eld
3898 \begin_inset Quotes erd
3901 in math mode, \SpecialChar LyX
3902 thinks you are typing the product of the three variables
3904 \begin_inset Formula $s$
3908 \begin_inset Formula $i$
3912 \begin_inset Formula $n$
3916 The three letters will be typeset in italics, when what you really wanted
3918 \begin_inset Quotes eld
3922 \begin_inset Quotes erd
3926 In addition, \SpecialChar LyX
3927 will not put a space between the word
3928 \begin_inset Quotes eld
3932 \begin_inset Quotes erd
3936 \begin_inset Quotes eld
3940 \begin_inset Quotes erd
3947 will exit the formula).
3949 \begin_inset Quotes eld
3953 \begin_inset Formula $\sin(x)$
3957 \begin_inset Quotes erd
3961 \begin_inset Quotes eld
3965 \begin_inset Formula $sin(x)$
3969 \begin_inset Quotes erd
3975 \begin_layout Standard
3979 \begin_inset space ~
3987 arg "math-insert \\functions"
3991 \begin_inset Quotes eld
3995 \begin_inset Quotes erd
3998 in the pop-up function list.
4000 \begin_inset Quotes eld
4004 \begin_inset Quotes erd
4007 is displayed in \SpecialChar LyX
4008 in black, and set in upright roman type.
4009 The whole word is treated as one symbol, so if you type
4013 , it will delete the whole word.
4015 \begin_inset Quotes eld
4019 \begin_inset Quotes erd
4022 , which will be written in blue italics, like you expect in a formula.
4023 In the output, the expression will be correctly typeset.
4027 \begin_layout Standard
4028 The function list includes other trigonometric functions and their inverses,
4029 hyperbolic functions, logarithms, limits, and quite a few others.
4030 These functions can take subscripts and superscripts, important for typing
4032 \begin_inset Quotes eld
4036 \begin_inset Formula $\cos^{2}\theta$
4040 \begin_inset Quotes erd
4044 \begin_inset Quotes eld
4048 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4052 \begin_inset Quotes erd
4058 \begin_layout Standard
4070 \begin_layout Subsection
4074 \begin_layout Standard
4075 Click on the matrix button
4078 arg "dialog-show mathmatrix"
4084 \begin_inset space ~
4090 A pop-up dialog allows you to choose how many rows and columns you want
4092 Choose 2 rows and 3 columns and hit
4098 prints 6 insertion points in a
4099 \begin_inset Formula $2\times3$
4103 As usual, you can put any sort of formula expression (a square root, another
4104 matrix, etc.) in each insertion point.
4105 You can also leave some of the insertion points empty if you want.
4108 \begin_layout Standard
4113 can be used to move horizontally between the columns of a matrix.
4114 Alternatively, you can use the arrow keys to move around - hitting
4118 at the end of one box will move to the next box,
4122 will move to the next row, etc.
4125 \begin_layout Standard
4126 If you need to change the number of rows and columns, use the menu
4128 Edit\SpecialChar menuseparator
4130 \begin_inset space \thinspace{}
4134 \begin_inset space \thinspace{}
4139 or the math toolbar buttons
4142 arg "tabular-feature append-row"
4148 arg "tabular-feature delete-row"
4154 arg "tabular-feature append-column"
4160 arg "tabular-feature delete-column"
4166 \begin_layout Standard
4171 for information on how to change the horizontal alignment of each column,
4172 and how to change the vertical position of the whole matrix.
4173 Note that if you want to write a table containing text, you should use
4175 's wonderful table support, rather than trying to write text in a matrix.
4178 \begin_layout Subsection
4182 \begin_layout Standard
4183 All of the expressions we have written so far have been on the same line
4184 as the text that came before and after them, otherwise known as inline
4186 This is fine for short, simple expressions, but if you want to write larger
4187 ones, or if you want your expressions to stand out from the text, you need
4188 to write them in display mode.
4189 In addition, only displayed expressions can be labeled and numbered (see
4194 ), and multi-line equations must be in display mode.
4197 \begin_layout Standard
4198 While being in a formula, click on the display button
4207 \begin_inset space ~
4213 This centers the formula and adds a blank line before and after it.
4214 Now type in an expression and compile your file to see how it looks.
4215 The display button is actually a toggle; use it now to change a couple
4216 of your expressions to display mode and back.
4220 \begin_layout Standard
4221 Display mode has a couple differences from inline mode:
4224 \begin_layout Itemize
4225 The default font is larger for a few symbols, like
4226 \begin_inset Formula $\sum$
4230 \begin_inset Formula $\int$
4236 \begin_layout Itemize
4237 Subscripts and superscripts for limits and sums (but not integrals) are
4238 written under and over rather than next to the symbols
4241 \begin_layout Itemize
4245 \begin_layout Standard
4246 Other than these differences, though, displayed expressions and inline expressio
4247 ns are very similar.
4250 \begin_layout Standard
4251 One final note about the way displayed formulas are typeset: be careful
4252 about whether you are putting your equation into a new paragraph or not.
4253 If your formula is in the middle of a sentence or paragraph, then do not
4259 Doing so will cause the text
4263 the formula to start a new paragraph.
4264 That text will be indented or follow a blank line, depending on your document
4265 paragraph settings, which is probably not what you want.
4268 \begin_layout Standard
4273 : Put the various equations in
4277 into display mode, and see how they are typeset differently.
4280 \begin_layout Standard
4285 : Using various tools you have learned in this section, you should be able
4286 to write an equation like:
4290 \begin_layout Plain Layout
4291 After you have done it the hard way, give
4293 Insert\SpecialChar menuseparator
4294 Math\SpecialChar menuseparator
4296 \begin_inset space ~
4307 \begin_inset Formula
4309 f(x)=\left\{ \begin{array}{cc}
4312 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4321 \begin_layout Section
4325 \begin_layout Standard
4326 Now you are familiar with the basics.
4328 's math editor can do a lot more.
4329 You can refer to the
4333 manual for tips on how to:
4336 \begin_layout Itemize
4337 Label and number expressions.
4340 \begin_layout Itemize
4341 Create multi-line equations.
4344 \begin_layout Itemize
4345 Change typefaces, e.
4346 \begin_inset space \thinspace{}
4350 \begin_inset space \space{}
4353 to write bold-face text in an expression.
4356 \begin_layout Itemize
4357 Fine-tune font sizes and spacing within an expression.
4358 (Do not worry about this until your final draft!)
4361 \begin_layout Itemize
4363 These are very powerful, because you just define them once at the top of
4364 the document, and then you can use them throughout the document.
4367 \begin_layout Itemize
4368 Do almost all you can do with math.
4371 \begin_layout Chapter
4375 \begin_layout Section
4376 Other major \SpecialChar LyX
4380 \begin_layout Standard
4381 We have not gone through all the possible commands in \SpecialChar LyX
4382 , and we are not planning
4391 \begin_inset space ~
4396 manual for more information.
4397 We will just mention a couple more major things \SpecialChar LyX
4401 \begin_layout Itemize
4403 has WYSIWYM support for tables.
4406 Insert\SpecialChar menuseparator
4412 arg "tabular-insert"
4416 Click on the table with the
4423 \begin_inset space ~
4428 dialog box which allows extensive table editing.
4432 arg "toolbar-toggle table"
4435 the table toolbar will appear permanently.
4438 \begin_layout Itemize
4440 also supports including pictures in any format within documents.
4443 Insert\SpecialChar menuseparator
4449 arg "dialog-show-new-inset graphics"
4453 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4454 can have captions, and \SpecialChar LyX
4455 will automatically generate lists of figures and/or
4459 \begin_layout Itemize
4461 is heavily configurable.
4462 Everything from how the \SpecialChar LyX
4463 window looks to how the output comes out can be
4464 configured in a number of ways.
4465 Much configuration is done through
4467 Tools\SpecialChar menuseparator
4471 For more information on this, check out
4473 Help\SpecialChar menuseparator
4474 Customization\SpecialChar endofsentence
4478 \begin_layout Itemize
4480 is being developed by a team of programmers on five continents.
4481 Therefore, \SpecialChar LyX
4482 has better support for non-English languages (such as Dutch,
4483 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4484 ) than many word processors.
4485 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4486 languages Chinese Japanese, and Korean are supported.
4487 You can write documents in other languages and you can also configure \SpecialChar LyX
4489 to show its menus and error messages in other languages.
4493 \begin_layout Itemize
4494 The \SpecialChar LyX
4495 menus feature keybindings.
4496 This means that you can do
4498 File\SpecialChar menuseparator
4509 or by using the binding which is shown next to it in the menu (
4516 Keybindings are also configurable.
4517 For information on this, check out
4519 Help\SpecialChar menuseparator
4520 Customization\SpecialChar endofsentence
4524 \begin_layout Itemize
4526 can read \SpecialChar LaTeX
4529 \begin_inset space ~
4533 \begin_inset CommandInset ref
4535 reference "sec:tex2lyx"
4542 \begin_layout Itemize
4543 Spell-checking, thesaurus, and word count facilities are available.
4546 \begin_layout Itemize
4547 Generation of indexes and nomenclatures/glossaries is supported.
4550 \begin_layout Section
4552 for \SpecialChar LaTeX
4554 \begin_inset CommandInset label
4556 name "sec:latexusers"
4563 \begin_layout Standard
4564 If you do not know anything about \SpecialChar LaTeX
4565 , you do not have to read this section.
4566 Actually, you might want to
4570 about \SpecialChar LaTeX
4571 , and then read this chapter.
4572 However, some of those who begin to use \SpecialChar LyX
4573 will be familiar with \SpecialChar LaTeX
4575 If you are such a person, you may be wondering if \SpecialChar LyX
4576 can really do everything
4579 The short answer is that \SpecialChar LyX
4580 can do pretty much everything \SpecialChar LaTeX
4582 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4587 \begin_layout Standard
4588 Because this is just a tutorial, we are only going to mention things that
4589 new \SpecialChar LyX
4590 users will most likely be interested in.
4591 In the interests of keeping the Tutorial short, we will give only minimal
4596 \begin_inset space ~
4604 \begin_inset space ~
4609 manuals have a great deal of information on differences between \SpecialChar LyX
4610 and \SpecialChar LaTeX
4612 and how to do various \SpecialChar LaTeX
4613 tricks in \SpecialChar LyX
4617 \begin_layout Subsection
4622 \begin_layout Standard
4623 Anything that you enter in \SpecialChar TeX
4624 mode will be passed straight to \SpecialChar LaTeX
4626 displayed in red on the screen.
4627 You can use \SpecialChar TeX
4628 commands in \SpecialChar LyX
4631 Insert\SpecialChar menuseparator
4634 \begin_inset space ~
4646 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4650 \begin_layout Standard
4651 In a math formula, \SpecialChar TeX
4652 mode is handled a bit differently.
4654 mode is entered there by typing a backslash.
4655 The backslash is not written out, but anything you type afterwards will
4657 You exit \SpecialChar TeX
4662 or some other non-alphabetic character, like a number, underscore, caret
4664 Once you exit \SpecialChar TeX
4665 mode, if \SpecialChar LyX
4666 knows the \SpecialChar TeX
4667 command you have typed in, it will
4668 convert it to WYSIWYM\SpecialChar endofsentence
4670 \begin_inset Quotes eld
4680 \begin_inset Quotes erd
4683 in a formula and then press
4689 \begin_inset Quotes eld
4693 \begin_inset Quotes erd
4697 \begin_inset Quotes eld
4701 \begin_inset Formula $\gamma$
4705 \begin_inset Quotes erd
4709 This will work for almost all, non-complicated math macros.
4710 This may be faster than using the
4713 \begin_inset space ~
4718 , and will be especially convenient for experienced \SpecialChar LaTeX
4722 \begin_layout Standard
4723 As a special case, if you type
4724 \begin_inset Quotes eld
4734 \begin_inset Quotes erd
4737 in a formula, the beginning
4741 ending braces will be inserted in red while the cursor is placed between
4743 This makes it more convenient to type those commands that take an argument.
4746 \begin_layout Standard
4748 cannot do absolutely everything that \SpecialChar LaTeX
4750 Some fancy functions are not supported at all, while some work but are
4753 mode allows users to get the full flexibility of \SpecialChar LaTeX
4754 , while having all the
4755 convenient features of \SpecialChar LyX
4756 , like WYSIWYM math, tables, and editing.
4758 could never support every \SpecialChar LaTeX
4766 in the preamble (see Section
4767 \begin_inset space ~
4771 \begin_inset CommandInset ref
4773 reference "sec:preamble"
4777 ), you can use any package you want — although you will not have WYSIWYM
4778 support for that package's features.
4781 \begin_layout Subsection
4782 Importing \SpecialChar LaTeX
4788 \begin_inset CommandInset label
4797 \begin_layout Standard
4798 You can import a \SpecialChar LaTeX
4799 file into \SpecialChar LyX
4802 File\SpecialChar menuseparator
4803 Import\SpecialChar menuseparator
4806 \begin_inset space ~
4811 menu in \SpecialChar LyX
4813 This will call the program
4817 which will create a file foo.lyx from the file foo.tex.
4819 will then open that file.
4820 If the translation does not work, you can try calling
4824 from the command line, possibly using fancier options.
4827 \begin_layout Standard
4828 Even when the translation does work,
4832 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4834 It will leave things it does not understand in \SpecialChar TeX
4835 mode; so, after translating
4840 , you can look for the red text and manually edit it to get it right.
4843 \begin_layout Standard
4848 has its own documentation (manpage), which Unix/Linux users can access
4849 via the console command
4852 \begin_inset space ~
4858 The manpage describes which \SpecialChar LaTeX
4859 commands and environments are not supported,
4860 what bugs you might run into (and how to get around them), and how to use
4861 the various options.
4864 \begin_layout Standard
4865 It is important to understand that
4869 can only translate files whose document class is
4870 \begin_inset Quotes eld
4874 \begin_inset Quotes erd
4878 , that is, for which there is a corresponding \SpecialChar LyX
4884 If there is no layout file, then you will get an error saying that the
4885 conversion could not be performed.
4886 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4891 simply will not know how to translate the \SpecialChar LaTeX
4892 that it finds there into things
4895 More about layout files and how they are created is explained in detail
4903 \begin_layout Subsection
4904 Converting \SpecialChar LyX
4905 Documents to \SpecialChar LaTeX
4909 \begin_layout Standard
4910 You might wish to convert a \SpecialChar LyX
4911 Document to a \SpecialChar LaTeX
4913 For example, a co-worker or co-author who does not have \SpecialChar LyX
4918 File\SpecialChar menuseparator
4919 Export\SpecialChar menuseparator
4924 This will create a file
4932 file you are editing.
4935 \begin_layout Subsection
4940 \begin_layout Subsubsection
4944 \begin_layout Standard
4947 Document\SpecialChar menuseparator
4950 dialog takes care of the document-wide options, such as changing the document
4951 class, default font size and paper size.
4952 Document class options and also options for \SpecialChar LaTeX
4953 packages can be entered there
4957 \begin_inset space ~
4965 \begin_layout Subsubsection
4966 Other Preamble Matter
4967 \begin_inset CommandInset label
4976 \begin_layout Standard
4977 If you have special commands to put in the preamble of a \SpecialChar LaTeX
4979 use them in a \SpecialChar LyX
4983 Document\SpecialChar menuseparator
4984 Settings\SpecialChar menuseparator
4987 \begin_inset space ~
4992 and type in the dialog window (or from the document settings dialog, depending
4994 Anything you type will (as with \SpecialChar TeX
4995 mode) be sent directly to \SpecialChar LaTeX
4999 \begin_layout Subsection
5004 \begin_layout Standard
5006 has support for Bib\SpecialChar TeX
5007 , which allows you to build databases of bibliographical
5008 references to be used in multiple documents.
5011 Insert\SpecialChar menuseparator
5013 \begin_inset space \thinspace{}
5017 \begin_inset space \thinspace{}
5020 TOC\SpecialChar menuseparator
5023 \begin_inset space ~
5038 field you load Bib\SpecialChar TeX
5043 field you can load Bib\SpecialChar TeX
5047 \begin_layout Standard
5048 After you have done this, you can use citations from any bibliographies
5049 you have included with
5051 Insert\SpecialChar menuseparator
5055 \begin_inset space ~
5059 \begin_inset CommandInset ref
5061 reference "sec:bibliographies"
5070 dialog will show a list of all the references in your
5078 \begin_layout Section
5082 \begin_layout Standard
5083 Sometimes when you try to view a document, there will be errors, things
5084 that \SpecialChar LyX
5085 or \SpecialChar LaTeX
5087 When this happens, \SpecialChar LyX
5092 \begin_inset space ~
5098 Clicking on individual errors in this dialog will take you to the place
5099 in the \SpecialChar LyX
5100 document where the error occurs and also display the detailed \SpecialChar LaTeX