1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
8 % DO NOT ALTER THIS PREAMBLE!!!
10 %This preamble is designed to ensure that the document prints
11 % out as advertised. If you mess with this preamble,
12 % parts of the document may not print out as expected. If you
13 % have problems LaTeXing this file, please contact
14 % the documentation team
15 % email: lyx-docs@lists.lyx.org
17 \usepackage{ifpdf} % part of the hyperref bundle
18 \ifpdf % if pdflatex is used
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 \use_default_options false
38 \maintain_unincluded_children false
40 \language_package default
45 \font_typewriter default
47 \font_default_family default
48 \use_non_tex_fonts false
54 \default_output_format default
56 \bibtex_command default
57 \index_command default
61 \pdf_title "The LyX Tutorial"
62 \pdf_author "LyX Team"
63 \pdf_subject "LyX-documentation Tutorial"
64 \pdf_keywords "LyX, documentation"
66 \pdf_bookmarksnumbered true
67 \pdf_bookmarksopen true
68 \pdf_bookmarksopenlevel 1
73 \pdf_pdfusetitle false
74 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
77 \use_package amsmath 0
78 \use_package amssymb 0
81 \use_package mathdots 1
82 \use_package mathtools 0
84 \use_package stackrel 0
85 \use_package stmaryrd 0
86 \use_package undertilde 0
88 \cite_engine_type default
92 \paperorientation portrait
102 \paragraph_separation indent
103 \paragraph_indentation default
104 \quotes_language english
107 \paperpagestyle headings
108 \tracking_changes false
109 \output_changes false
112 \html_be_strict false
118 /The \SpecialChar LyX
123 by the \SpecialChar LyX
128 \begin_layout Plain Layout
130 If you have comments on or corrections to this documentation, please send
131 them to the \SpecialChar LyX
132 Documentation mailing list:
133 \begin_inset CommandInset href
135 target "lyx-docs@lists.lyx.org"
148 \begin_layout Standard
149 \begin_inset CommandInset toc
150 LatexCommand tableofcontents
157 \begin_layout Chapter
161 \begin_layout Section
162 Welcome to \SpecialChar LyX
166 \begin_layout Standard
167 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
170 Now, do not panic - you will not need to learn \SpecialChar LaTeX
171 to use \SpecialChar LyX
173 That is, after all, the whole point of \SpecialChar LyX
174 : to provide an almost-WYSIWYG interface
175 to \SpecialChar LaTeX
177 There are some things you will need to learn, however, in order to use
182 \begin_layout Standard
183 Some of you probably found your way to this document because you tried to
184 put two spaces after a
185 \begin_inset Quotes eld
189 \begin_inset Quotes erd
192 or tried to put three blank lines between paragraphs.
193 You found out you could not and, in fact, you will find out that most of
194 the little tricks you are accustomed to use in word processors will not
195 work in \SpecialChar LyX
197 That is because most word processors you have used before allow you manually
198 to enter all spacings, font changes, and so on.
199 So you end up not only writing a document but typesetting it, too.
201 does the typesetting for you, in a consistent fashion, letting you focus
202 on the important things, like the content of your writing.
205 \begin_layout Standard
206 So read on to learn more about \SpecialChar LyX
208 Reading this tutorial is definitely worth the time.
211 \begin_layout Section
221 \begin_layout Standard
222 Before we get started with this section, you need to know that this
226 uses the notation outlined in the
231 If you came to this manual first, please read the
235 before you continue with the
242 \begin_layout Standard
243 Now that you know which fonts mean what in the documentation, we want to
244 talk a bit about what this
251 \begin_layout Subsection
252 Getting the most out of the Tutorial
255 \begin_layout Standard
256 This tutorial consists of examples and exercises.
257 To get the most out of this document, you should read through it, typing
258 all the little things we are telling you to type and trying out all of
259 the exercises to see if you get them right.
260 For convenience, you might want to print out the PDF version of this document.
263 \begin_layout Standard
264 If you are familiar with \SpecialChar LaTeX
265 , you will probably be able to read the
269 somewhat faster, since many \SpecialChar LyX
270 ideas are just \SpecialChar LaTeX
272 However, \SpecialChar LyX
273 has features you will want to learn about.
274 Even if you do not feel like reading the rest of the
278 , you should definitely check out Section
283 \begin_inset CommandInset ref
285 reference "sec:latexusers"
289 , which is specifically written for experienced \SpecialChar LaTeX
293 \begin_layout Subsection
301 \begin_layout Itemize
302 Detailed explanations of all of \SpecialChar LyX
304 \begin_inset Separator parbreak
311 \begin_layout Standard
320 \begin_layout Itemize
321 Detailed explanations of \SpecialChar LaTeX
323 \begin_inset Separator parbreak
330 \begin_layout Standard
332 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
335 can have a look at the
347 \begin_layout Standard
348 It is time to move on, time for your first document \SpecialChar ldots
352 \begin_layout Chapter
353 Getting started with \SpecialChar LyX
357 \begin_layout Section
358 Your first \SpecialChar LyX
362 \begin_layout Standard
363 OK\SpecialChar endofsentence
364 You are ready to start writing.
365 Before you do, there are a few things we need to mention, which will hopefully
366 make the Tutorial more instructive and useful.
370 \begin_layout Standard
371 Because there is information we cannot give you in the Tutorial, the
377 thing that you need to do is find the
384 Start up \SpecialChar LyX
394 You may want to load the
398 as well (if you are not reading it within \SpecialChar LyX
400 This way, you can read them while you are writing your own file.
404 \begin_layout Plain Layout
405 They can also serve as good examples of how to use the many features of
412 Note that once you have got more than one document open, you can use the
417 menu or the document tabs to switch between them.
420 \begin_layout Standard
421 In this Tutorial, we are going to assume that you have a fully working version
423 , as well as a \SpecialChar LaTeX
424 -distribution and a PDF-viewer.
425 This should be the case on all major Linux- and BSD-distributions, as well
426 as on Windows, where this is setup by the \SpecialChar LyX
430 \begin_layout Standard
431 Finally, we have written a file called
435 to let you practice your \SpecialChar LyX
437 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
440 As you learn new \SpecialChar LyX
441 functions, we will suggest that you fix those parts of
447 It also contains `subtle' hints about how to fix things.
451 \begin_layout Plain Layout
452 The hints are located in yellow
453 \begin_inset Quotes eld
457 \begin_inset Quotes erd
461 Access the text in a note by clicking on it.
466 If you want to cheat, or check what you have done, there is also a file
471 which contains the same text written and typeset by a \SpecialChar LyX
475 \begin_layout Standard
476 The example files can be found in the
480 directory of \SpecialChar LyX
481 's installation folder.
488 File\SpecialChar menuseparator
495 to save a copy in your own directory for you to work on.
496 As you fix parts of the raw document, check to see how those changes affect
500 \begin_layout Standard
505 directory contains lots of other examples files.
506 They will show you how to do various fancy things with \SpecialChar LyX
508 After you have read the Tutorial, or when you are confused about how to
509 do something fancy in \SpecialChar LyX
510 , take a look at these files.
513 \begin_layout Subsection
514 Typing, Viewing, and Exporting
517 \begin_layout Itemize
520 File\SpecialChar menuseparator
524 \begin_layout Itemize
525 Type a sentence like:
527 This is my first \SpecialChar LyX
531 \begin_layout Itemize
532 Save your document with
534 File\SpecialChar menuseparator
539 As\SpecialChar endofsentence
543 \begin_layout Itemize
544 Create a PDF file, with
546 Document\SpecialChar menuseparator
549 or the toolbar button
557 will open a PDF-viewer program displaying your document as it will look
562 \begin_layout Plain Layout
563 You can save time by leaving the PDF-viewer running in the background.
566 Document\SpecialChar menuseparator
569 or the toolbar button
575 and just click on the PDF-viewer window (or unminimize it) afterwards.
583 \begin_layout Itemize
584 Export the ready to print document with
586 File\SpecialChar menuseparator
594 \begin_layout Standard
595 Congratulations! You have written your first \SpecialChar LyX
597 All of the rest is just details.
600 \begin_layout Subsection
604 \begin_layout Standard
606 can of course do most of the things you are used to doing with a word processor.
607 It will word-wrap and indent paragraphs automatically.
608 Here is a quick description of how to do some simple actions.
611 \begin_layout Description
612 Undo \SpecialChar LyX
613 has multiple levels of undo, which means you can undo everything you
614 have done since your current editing session started, by selecting
616 Edit\SpecialChar menuseparator
625 ) over and over again.
626 If you undo too much, just select
628 Edit\SpecialChar menuseparator
638 \begin_inset Separator parbreak
645 \begin_layout Standard
646 Currently, undo is limited to 100 steps.
650 \begin_layout Description
653 Edit\SpecialChar menuseparator
664 Edit\SpecialChar menuseparator
675 Edit\SpecialChar menuseparator
684 ) to cut, copy, and paste.
685 Or automatically paste selected text (including selections from other programs)
693 \begin_layout Description
696 Edit\SpecialChar menuseparator
710 arg "dialog-show findreplace"
714 In the dialog, search with the
726 button to replace a word you have found.
730 \begin_layout Plain Layout
731 Close the window when you are done or leave it open if you find it more
733 Most dialog boxes in \SpecialChar LyX
734 can operate like this.
735 Just be sure you have the right window in focus when you are trying to
736 type in the main \SpecialChar LyX
737 window or a \SpecialChar LyX
743 If you like, you can specify whether to make the search case-sensitive,
744 or to search for only complete words; you can also search backwards through
748 \begin_layout Description
763 , which will by default print characters in italics), set it in
773 , usually small caps, used for people's names), or use your own formatting
776 Edit\SpecialChar menuseparator
781 Style\SpecialChar menuseparator
784 dialog (toolbar button
787 arg "dialog-show character"
793 \begin_layout Description
794 Toolbar Other buttons on the toolbar allow you to do some of the more popular
822 \begin_layout Standard
823 Of course, you have not yet written enough to make most of these functions
825 As you write more, though, try undoing, pasting, etc.
828 \begin_layout Subsection
829 WYSIWYM: Whitespace in \SpecialChar LyX
833 \begin_layout Standard
834 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
837 As many times as you hit
841 , you will only get one blank line.
842 As many times as you hit
846 , you will only get one space.
847 On a blank line, \SpecialChar LyX
848 will not let you type even one space.
853 key will not move you forward one tab stop; in fact there
857 no tab stops! There is no ruler at the top of the page to let you set tabs
861 \begin_layout Standard
862 Many word processors are based on the WYSIWYG principle:
863 \begin_inset Quotes eld
866 What You See Is What You Get.
867 \begin_inset Quotes erd
871 , on the other hand, is based on the principle that
872 \begin_inset Quotes eld
875 What You See Is What You
880 \begin_inset Quotes erd
883 You type what you mean and \SpecialChar LyX
884 will take care of typesetting it for you so
885 that the output looks nice.
890 grammatically separates paragraphs and a
894 grammatically separates words; so there is no reason to have several of
899 has no grammatical function at all - so \SpecialChar LyX
901 Using \SpecialChar LyX
902 , you will spend more of your time worrying about the
906 of your document and less time worrying about the
915 for more information on the WYSIWYM concept.
918 \begin_layout Standard
920 does have (many) ways to fine-tune the formatting of your document.
921 After all, \SpecialChar LyX
931 has information about all that.
932 It includes horizontal fills and vertical space — which are more powerful
933 and versatile than multiple spaces or blank lines — and ways to change
934 font sizes, character styles, and paragraph alignments by hand.
935 The idea, though, is that you can write your whole document, focusing on
936 content, and just worry about that fine-tuning at the end.
937 With standard word processors, you will be distracted by document formatting
938 throughout the writing process.
941 \begin_layout Section
945 \begin_layout Standard
946 Different parts of a document have different purposes; we call these parts
952 Most of a document is made up of regular text.
953 Section titles (chapter, subsection, etc.) let the reader know that a new
954 topic or subtopic will be discussed.
955 Certain types of documents have special environments.
956 A journal article will have an abstract and a title.
957 A letter will have neither of these, but will probably have an environment
958 that gives the writer's address.
961 \begin_layout Standard
962 Environments are a major part of the
963 \begin_inset Quotes eld
966 What You See Is What You Mean
967 \begin_inset Quotes erd
970 philosophy of \SpecialChar LyX
972 A given environment may require a certain font style, font size, indenting,
973 line spacing, and more.
974 This problem is aggravated, because the exact formatting for a given environmen
975 t may change: one journal may use boldface, 18 point, centered type for
976 section titles while another uses italicized, 15 point, left justified
977 type; different languages may have different standards for indenting; and
978 bibliography formats can vary widely.
980 lets you avoid learning all the different formatting styles.
983 \begin_layout Standard
988 choice box is located on the left end of the toolbar and looks like this:
990 \begin_inset Graphics
991 filename clipart/ToolbarEnvBox.png
998 It indicates in which environment you are currently writing.
999 While you were writing your first document, it said
1000 \begin_inset Quotes eld
1004 \begin_inset Quotes erd
1007 which is the default environment for text.
1008 Now you will put a number of environments in your new document so that
1009 you can see how they work.
1012 \begin_layout Subsection
1013 Sections and Subsections
1016 \begin_layout Standard
1021 on the first line of your new \SpecialChar LyX
1034 \begin_layout Plain Layout
1040 If nothing is selected, \SpecialChar LyX
1041 changes the paragraph you are currently in to
1042 the selected environment.
1043 Alternatively, you can change several paragraphs to a different environment
1044 by selecting them before picking an environment.
1061 , which will be covered below.
1064 \begin_inset Quotes eld
1068 \begin_inset Quotes erd
1071 and typesets the section heading (title) in a larger font.
1076 \SpecialChar endofsentence
1082 \begin_inset Quotes eld
1086 \begin_inset Quotes erd
1090 \begin_inset Quotes eld
1094 \begin_inset Quotes erd
1098 Section headings, like most environments, are assumed to end when you type
1103 \SpecialChar endofsentence
1104 Type the document introduction:
1107 \begin_layout LyX-Code
1108 This is an introduction to my first \SpecialChar LyX
1112 \begin_layout Standard
1128 \begin_inset Quotes eld
1132 \begin_inset Quotes erd
1135 and waits for you to type a title.
1137 \begin_inset Quotes eld
1143 \begin_inset space ~
1149 \begin_inset Quotes erd
1152 , and you will see that \SpecialChar LyX
1153 again sets it as a section title.
1156 \begin_layout Standard
1158 Go to the end of Section
1159 \begin_inset space ~
1163 \begin_inset Quotes eld
1166 my first \SpecialChar LyX
1168 \begin_inset Quotes erd
1184 Again, \SpecialChar LyX
1186 \begin_inset Quotes eld
1190 \begin_inset Quotes erd
1193 and waits for you to type a title.
1200 \begin_inset space ~
1204 \begin_inset Quotes eld
1208 \begin_inset Quotes erd
1212 \begin_inset space ~
1215 2, has been automatically renumbered to Section
1216 \begin_inset space ~
1219 3! In true WYSIWYM fashion, you just need to identify the text that makes
1220 up the section titles, and \SpecialChar LyX
1221 takes care of numbering the sections and typesettin
1225 \begin_layout Standard
1234 environment, and type the following five lines:
1237 \begin_layout LyX-Code
1238 Sections and subsections are described below.
1241 \begin_layout LyX-Code
1245 \begin_layout LyX-Code
1246 Sections are bigger than subsections.
1249 \begin_layout LyX-Code
1250 Subsection description
1253 \begin_layout LyX-Code
1254 Subsections are smaller than sections.
1257 \begin_layout Standard
1258 Click on the second line and select
1268 numbers the subsection
1269 \begin_inset Quotes eld
1273 \begin_inset Quotes erd
1276 , and typesets it in a font which is bigger than regular text but smaller
1277 than the section title.
1278 Change the fourth line to the
1282 environment as well.
1283 As you probably expected, \SpecialChar LyX
1284 automatically numbered the section
1285 \begin_inset Quotes eld
1289 \begin_inset Quotes erd
1293 If you put yet another section before Section
1294 \begin_inset space ~
1298 \begin_inset space ~
1301 2 will be renumbered as Section 3, and the subsections will be renumbered
1303 \begin_inset Quotes eld
1307 \begin_inset Quotes erd
1311 \begin_inset Quotes eld
1315 \begin_inset Quotes erd
1321 \begin_layout Standard
1322 Further levels of sectioning include
1335 We will let you play with these on your own.
1336 You may notice that paragraph and subparagraph headings are not numbered
1337 by default, and that subparagraphs are indented; see the
1341 for an explanation and how to change this.
1346 headings are actually the highest level of sectioning, above
1350 s, but you are only allowed to use them in certain types (text classes)
1352 documents (see Section
1353 \begin_inset space ~
1357 \begin_inset CommandInset ref
1359 reference "sec:Document-Classes"
1366 \begin_layout Standard
1367 Finally, you may want to have sections or subsections that are not numbered.
1368 There are environments for this as well.
1369 If you change one of your section headings to the
1373 environment (you may have to scroll down in the
1377 box to find it), \SpecialChar LyX
1378 will use the same font size for the heading as it uses
1379 for a regular section, but it will not number that section.
1380 There are corresponding
1381 \begin_inset Quotes eld
1385 \begin_inset Quotes erd
1388 heading environments for
1397 Try changing some of your sections or subsections to the starred environments,
1398 and note how the other section numbers are updated.
1401 \begin_layout Standard
1406 : Fix the section and subsection headings in
1414 \begin_layout Subsection
1418 \begin_layout Standard
1420 has several different environments for typesetting lists.
1421 The various list environments free you from hitting
1425 a million times when writing an outline, or from renumbering a whole list
1426 when you want to add a point in the middle of the list.
1427 Different types of documents logically require different list environments:
1430 \begin_layout Itemize
1431 A slide presentation might use the
1435 environment's bulleted lists to describe different points.
1438 \begin_layout Itemize
1439 An outline would use the
1443 environment's numbered lists (and lettered sublists).
1446 \begin_layout Itemize
1447 A document describing several software packages could use the
1451 environment, where each item in the list begins with a bold-faced word.
1454 \begin_layout Itemize
1463 ) environment is a variation on the
1470 \begin_layout Standard
1471 Let us write a list of reasons why \SpecialChar LyX
1472 is better than other word processors.
1473 Somewhere in your document, type:
1476 \begin_layout Standard
1480 is better than other word processors because:
1483 \begin_layout Standard
1500 arg "layout Itemize"
1506 \begin_inset Quotes eld
1510 \begin_inset Quotes erd
1514 Type in your reasons:
1517 \begin_layout LyX-Code
1518 Typesetting is done for you.
1521 \begin_layout LyX-Code
1525 \begin_layout LyX-Code
1526 Lists are very easy to create!
1529 \begin_layout Standard
1530 List environments, unlike headings, do not end when you type
1535 Instead, \SpecialChar LyX
1536 assumes you are going on to the next item in the list.
1537 The above will therefore result in a three-item list.
1538 If you want more than one paragraph within one list
1542 , one way is to use the
1545 \begin_inset space ~
1550 , which you get by typing
1555 In order to get out of the list, you need to reselect the
1559 environment (or just use the key binding
1562 arg "layout Standard"
1568 \begin_layout Standard
1569 You now have a beautiful itemized list.
1570 You might want to run \SpecialChar LaTeX
1571 to see how the list looks when printed out.
1572 But what if you wanted to number the reasons? Well, just select the whole
1577 \begin_layout Plain Layout
1579 will not let you select the first bullet (or the actual number in a numbered
1580 section title) unless you also select the paragraph
1584 it, which you probably do not want to do.
1585 This is on purpose because the bullet or number depends on the document
1586 settings or text position, respectively.
1602 arg "layout Enumerate"
1606 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1607 will fix the numbering.
1610 \begin_layout Standard
1611 While the list is still selected, you can change to the other two list environme
1619 \begin_inset space \thinspace{}
1625 \begin_inset space \thinspace{}
1635 arg "layout Description"
1644 ), in order to see what they look like.
1645 For those two environments, each list item is made up of a term, which
1646 is the item's first word, followed by a definition, which is the rest of
1647 the paragraph (until you hit
1652 The term is either typeset in boldface (
1657 \begin_inset Quotes eld
1661 \begin_inset Quotes erd
1668 \begin_layout Plain Layout
1669 But a typesetter's tab, which will change to fit the size of the largest
1670 term, not a pathetic, rigid, unchangeable typewriter
1683 ) from the rest of the paragraph.
1684 If you want to have more than one word in the definition, then separate
1688 \begin_inset space ~
1696 \begin_layout Standard
1701 : Typeset the list in
1706 \begin_layout Standard
1707 You can nest lists within each other in all sorts of interesting ways.
1708 An obvious example would be writing outlines.
1709 Numbered and bulleted lists will have different numbering and bulleting
1710 schemes for sublists.
1715 for details on the different sorts of lists and for examples of nestings.
1718 \begin_layout Subsection
1719 Other environments: Verses, Quotations, and more
1722 \begin_layout Standard
1723 There are two environments for setting quotations apart from surrounding
1728 for short quotes and
1742 \begin_layout Plain Layout
1743 used in this Tutorial for the long typing examples
1752 font; this environment is the only place in \SpecialChar LyX
1753 where you are allowed to use
1754 multiple spaces to allow code indenting.
1755 You can even write poetry using the
1763 to separate stanzas, and
1767 to separate lines within a stanza.
1772 for more complete descriptions of all of the available \SpecialChar LyX
1776 \begin_layout Standard
1781 : Correctly typeset the
1783 Quote, \SpecialChar LyX
1795 \begin_layout Chapter
1799 \begin_layout Standard
1800 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1802 It introduced you to the basic editing operations in \SpecialChar LyX
1803 , as well as the powerful
1804 method of writing with environments.
1805 Most people who use \SpecialChar LyX
1806 , though, will want to write documents: papers, articles,
1807 books, manuals, or letters.
1808 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1810 a complete document.
1811 It will introduce you to text classes, which allow you to write different
1813 It will then describe many of the additions that turn text into a document,
1814 such as titles, footnotes, cross references, bibliographies, and tables
1818 \begin_layout Section
1820 \begin_inset CommandInset label
1822 name "sec:Document-Classes"
1829 \begin_layout Standard
1830 Different sorts of documents should be typeset differently.
1831 For example, books are generally printed double-sided, while articles are
1833 In addition, many documents contain special environments: letters contain
1834 some environments — such as the sender's address and the signature — which
1835 do not make sense in a book or article.
1836 The \SpecialChar LyX
1845 \begin_layout Plain Layout
1846 for \SpecialChar LaTeX
1847 users: this is equivalent to the \SpecialChar LaTeX
1853 takes care of these large scale differences between different sorts of
1855 This Tutorial, for example, was written in the
1860 Document classes are another major part of the WYSIWYM philosophy; they
1861 tell \SpecialChar LyX
1862 how to typeset the document, so you do not need to know how.
1865 \begin_layout Standard
1866 Your document is probably being written in the
1874 \begin_layout Plain Layout
1875 That is usually the default document class
1880 Try changing to other document classes (using the
1882 Document\SpecialChar menuseparator
1885 dialog) to see how they are typeset differently.
1886 If you change your document to the
1890 document class and look at the
1894 box, you will see that most of the allowed environments are the same.
1895 However, you can now use the
1900 If you are ever unsure about which environments you can use in a given
1901 document class, just consult the
1908 \begin_layout Standard
1909 Font sizes, one- or two-column printing, and page headings are just some
1910 of the ways journals' typesettings differ from one another.
1911 As the Computer Age continues to mature, journals have begun accepting
1912 electronic submissions, creating \SpecialChar LaTeX
1914 \begin_inset Quotes eld
1918 \begin_inset Quotes erd
1921 so that authors can submit correctly typeset articles.
1923 is set up to support this as well.
1924 For example, \SpecialChar LyX
1925 supports typesetting (and extra environments) for the American
1926 Mathematics Society journals using the
1929 \begin_inset space ~
1937 \begin_layout Standard
1938 Here is a very quick reference to some of the document classes.
1941 Special Document Classes
1947 manual for many more details.
1948 \begin_inset Separator parbreak
1954 \begin_layout Standard
1956 \begin_inset Tabular
1957 <lyxtabular version="3" rows="7" columns="2">
1958 <features tabularvalignment="middle">
1959 <column alignment="center" valignment="top" width="0pt">
1960 <column alignment="center" valignment="top" width="0pt">
1962 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1965 \begin_layout Plain Layout
1971 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1974 \begin_layout Plain Layout
1982 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1985 \begin_layout Plain Layout
1991 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1994 \begin_layout Plain Layout
1995 one-sided, no chapters
2002 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2005 \begin_layout Plain Layout
2011 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2014 \begin_layout Plain Layout
2015 layout & environments for American Math Society
2022 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2025 \begin_layout Plain Layout
2031 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2034 \begin_layout Plain Layout
2035 longer than article, two-sided
2042 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2045 \begin_layout Plain Layout
2051 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2054 \begin_layout Plain Layout
2055 report + front and back matter
2062 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2065 \begin_layout Plain Layout
2071 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2074 \begin_layout Plain Layout
2082 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2085 \begin_layout Plain Layout
2091 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2094 \begin_layout Plain Layout
2095 lots of extra environments for address, signature\SpecialChar ldots
2109 \begin_layout Section
2110 Templates: Writing a Letter
2113 \begin_layout Standard
2114 One way to write a letter would be to open a new file, and choose a
2120 Document\SpecialChar menuseparator
2124 While this is the most obvious way to write a letter, it seems like extra
2126 Every time you write a business letter, you want to have your address,
2127 the address to which you are sending it, a body, a signature, etc.
2133 for letters, which contains a sample letter; once you have a template,
2134 you can just replace a couple of parts of the letter with your text each
2135 time you write a letter.
2138 \begin_layout Standard
2139 Open a new file with
2141 File\SpecialChar menuseparator
2143 \begin_inset space ~
2147 \begin_inset space ~
2158 Save and print the file to see how the various environments are typeset.
2161 \begin_layout Standard
2162 When you look at the
2166 box, you will see several environments, like the
2169 \begin_inset space ~
2174 environment, that do not exist in most other document classes.
2180 You can play around for a while to figure out how the various environments
2182 You will notice for example that the
2186 environment has the word
2187 \begin_inset Quotes eld
2191 \begin_inset Quotes erd
2194 in red before the actual text of the signature.
2195 This word does not show up in the actual letter, as you will see if you
2196 view/export the file.
2197 It is just there to let you know where the signature goes.
2198 Also, note that it does not matter where in the file the
2203 Remember, \SpecialChar LyX
2204 is WYSIWYM; you can put the
2208 environment anywhere you want, but \SpecialChar LyX
2209 knows that in the printout, the signature
2210 should be at the end.
2213 \begin_layout Standard
2214 A template is just a regular \SpecialChar LyX
2216 This means you can fill in your address and signature and save the file
2218 From now on, any time you want to write a letter, you can use the new template
2220 We do not have to suggest an actual
2221 \begin_inset Quotes eld
2225 \begin_inset Quotes erd
2228 here; just write a letter to someone!
2232 \begin_layout Plain Layout
2233 One warning, if you are writing from a template.
2234 If you erase all of the text in an environment — for example, if you erase
2238 \begin_inset space ~
2243 field so that you can replace it with your own — and then you move the
2244 cursor without writing any text, the environment may disappear.
2245 This is because most environments cannot exist without any text in them.
2246 Just reselect the environment from the
2258 \begin_layout Standard
2259 Templates can be a huge time-saver, and we urge you to use them whenever
2261 In addition, they can help a person learn how to use some of the fancier
2263 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2265 of less computer-aware users.
2266 When they are first learning \SpecialChar LyX
2267 , it will be less intimidating if they have
2268 a letter template customized for their company, for example.
2271 \begin_layout Section
2275 \begin_layout Standard
2277 (like \SpecialChar LaTeX
2278 ) considers the title — which may contain the actual title, the author,
2279 the date, and even an abstract of a paper — to be a separate part of the
2283 \begin_layout Standard
2284 Go back to your first \SpecialChar LyX
2285 document and make sure it is using the
2293 \begin_layout Plain Layout
2294 You should not be using the letter any more, since the
2298 document class does not allow titles.
2303 Type a title on the first line, and change the line to the
2308 On the next line, type your name and change it to the
2313 On the next line, write the date in the
2318 Type a paragraph or two summarizing your document using the
2323 Notice how the title is presented when it is printed out.
2324 If you change the document format to Book, you will get a separate title
2325 page, like the first page of this tutorial.
2328 \begin_layout Standard
2333 : Fix the title, date, and author in
2338 \begin_layout Section
2339 Labels and Cross-References
2342 \begin_layout Standard
2343 You can label section headings, list items, formulas, footnotes, and floats
2347 \begin_layout Plain Layout
2348 Floats are explained in the
2362 Once you do so, you can refer to the element in other parts of the document,
2363 using cross-references.
2364 You can refer to a section's number, to the page on which the section begins
2366 As with section numbering, \SpecialChar LyX
2367 also takes care of cross-reference numbering
2369 Automatic management of labels and cross-references is among the most significa
2370 nt advantages of \SpecialChar LyX
2371 (and \SpecialChar LaTeX
2372 ) over conventional word processors.
2375 \begin_layout Subsection
2379 \begin_layout Standard
2380 Go to our second section, whose title is
2381 \begin_inset Quotes eld
2385 \begin_inset Quotes erd
2389 Click at the end of the section title line, and select
2391 Insert\SpecialChar menuseparator
2394 or the toolbar button
2401 A dialog asks you for a label name, and gives you a suggestion.
2406 , the label name will be placed in a box next to the section title.
2409 \begin_layout Standard
2410 So far you have not done anything — the output will look exactly the same,
2411 since labels do not show up in the printed document.
2412 However, now that you have added a label, you can refer to that label with
2414 We will do that next.
2417 \begin_layout Subsection
2418 Your first cross-reference
2421 \begin_layout Standard
2422 Place the cursor somewhere in Section
2423 \begin_inset space ~
2430 \begin_layout LyX-Code
2431 If you want to know more about this document, then see Section .
2434 \begin_layout Standard
2435 Now, with the cursor before the final period, select
2437 Insert\SpecialChar menuseparator
2439 \begin_inset space ~
2444 or the toolbar button
2447 arg "dialog-show-new-inset ref"
2451 The Cross-reference dialog pops up.
2452 It shows a list of the possible labels you can reference.
2453 At the moment, there should be only one,
2454 \begin_inset Quotes eld
2457 sec:About-This-Document
2458 \begin_inset Quotes erd
2462 First, select the drop-down menu labeled
2463 \begin_inset Quotes eld
2467 \begin_inset Quotes erd
2471 \begin_inset Quotes eld
2474 <reference> on page <page>
2475 \begin_inset Quotes erd
2480 \begin_inset Quotes eld
2483 sec:About-This-Document
2484 \begin_inset Quotes erd
2487 (it may be selected by default), and a reference marker will appear containing
2489 \begin_inset Quotes eld
2492 Ref+Text: sec:About-This-Document
2493 \begin_inset Quotes erd
2496 (To be really correct, you should put a
2499 \begin_inset space ~
2507 arg "command-alternatives space-insert protected ; math-space"
2510 ) in between the word
2511 \begin_inset Quotes eld
2515 \begin_inset Quotes erd
2518 and the reference.) An alternative way to reference a label is to right-click
2519 the label and select
2523 in the pop-up context menu.
2524 The cross-reference to this label is now in the clipboard and can be copied
2525 to the actual cursor position via the menu
2527 Edit\SpecialChar menuseparator
2537 In the printed document, this reference marker will be replaced with the
2538 section number and then the page number.
2539 Preview your document and you will see that \SpecialChar LaTeX
2540 has been even cleverer than
2543 \begin_inset Quotes eld
2547 \begin_inset Quotes erd
2550 and depending how much text you have between the start of Section
2551 \begin_inset space ~
2554 2 and this cross-reference you may see
2555 \begin_inset Quotes eld
2559 \begin_inset Quotes erd
2563 \begin_inset Quotes eld
2566 on the previous page
2567 \begin_inset Quotes erd
2571 \begin_inset Quotes eld
2575 \begin_inset Quotes erd
2582 is the page number).
2585 \begin_layout Standard
2586 Conveniently, a cross-reference acts as a hyperlink when you are editing
2587 a document in \SpecialChar LyX
2588 ; clicking on it will pop up the
2595 \begin_inset space ~
2599 \begin_inset space ~
2604 will move the cursor to the referenced label.
2607 \begin_layout Subsection
2608 More fun with labels
2611 \begin_layout Standard
2612 We told you that \SpecialChar LyX
2613 takes care of numbering cross-references; now you can
2615 Add a new section before Section
2616 \begin_inset space ~
2620 Update the preview, and — voilà ! — the section cross-reference changed
2622 \begin_inset Quotes eld
2626 \begin_inset Quotes erd
2629 ! Change the section
2630 \begin_inset Quotes eld
2634 \begin_inset Quotes erd
2637 to a subsection, and the cross-reference will reference Subsection
2638 \begin_inset space ~
2641 2.1 instead of Section
2642 \begin_inset space ~
2646 The page reference will not change unless you add a whole page of text
2647 before the label, of course.
2651 \begin_layout Standard
2652 If you want some more practice with labels, then try putting a new label
2653 where your first cross-reference was, and refer to that label from elsewhere
2655 If you will be inserting cross-references often, it may be convenient to
2663 \begin_layout Standard
2664 If you want to confirm that the cross-referencing gets the pages right even
2665 for larger documents,
2669 a couple pages of text from the
2673 to the clipboard, and
2677 them into your document.
2681 \begin_layout Plain Layout
2682 By the way, copying a chapter title may cause an error, because chapters
2683 are not allowed in the article class, see Section
2684 \begin_inset space ~
2688 \begin_inset CommandInset ref
2690 reference "sec:Document-Classes"
2695 If this happens, just delete the chapter title.
2703 \begin_layout Standard
2708 : Fix the references in
2713 \begin_layout Section
2714 Footnotes and Margin Notes
2717 \begin_layout Standard
2718 Footnotes can be added using the toolbar button
2721 arg "footnote-insert"
2726 Insert\SpecialChar menuseparator
2730 Click at the end of the word
2731 \begin_inset Quotes eld
2736 \begin_inset Quotes erd
2739 somewhere in your document and insert a footnote.
2740 A footnote box appears where you can enter the text of the footnote.
2742 should place the cursor at the beginning of the footnote box.
2746 \begin_layout LyX-Code
2748 is a typesetting word processor.
2751 \begin_layout Standard
2752 Now click on the button labeled
2753 \begin_inset Quotes eld
2757 \begin_inset Quotes erd
2761 The footnote box is closed, leaving the button showing where the footnote
2762 marker will be in the printed text; this is called
2763 \begin_inset Quotes eld
2767 \begin_inset Quotes erd
2771 You can unfold the footnote at any time and re-edit its text by clicking
2773 \begin_inset Quotes eld
2777 \begin_inset Quotes erd
2783 \begin_layout Standard
2784 A footnote can be cut and pasted like normal text.
2785 Go ahead; try it! All you need to do is select the footnote button
2789 \begin_layout Plain Layout
2790 It may be easier to select it using the keyboard.
2791 You might accidentally open the footnote if you are trying to select the
2792 marker itself with the mouse.
2806 In addition, you can change regular text to a footnote, by selecting it
2810 arg "footnote-insert"
2813 button; change a footnote to regular text by hitting the
2817 key when the cursor is in the first position of a footnote, or by hitting
2822 key when the cursor is in the very last position of the footnote.
2825 \begin_layout Standard
2826 Margin notes can be added using the menu
2828 Insert\SpecialChar menuseparator
2830 \begin_inset space ~
2835 or the toolbar button
2838 arg "marginalnote-insert"
2841 \SpecialChar endofsentence
2842 Margin notes are like footnotes, except that:
2845 \begin_layout Itemize
2846 the on-screen boxes say
2847 \begin_inset Quotes eld
2851 \begin_inset Quotes erd
2855 \begin_inset Quotes eld
2859 \begin_inset Quotes erd
2865 \begin_layout Itemize
2866 the notes will be placed in the margin, instead of below the text
2869 \begin_layout Itemize
2870 margin notes are not numbered
2873 \begin_layout Standard
2874 Change your \SpecialChar LyX
2875 footnote back to text, then select and change it to a margin
2877 Run \SpecialChar LaTeX
2878 again to see what the margin note looks like.
2881 \begin_layout Standard
2886 : Fix the footnote in
2891 \begin_layout Section
2893 \begin_inset CommandInset label
2895 name "sec:bibliographies"
2902 \begin_layout Standard
2903 Bibliographies are similar to cross-references.
2904 The bibliography contains a list of references at the end of the document,
2905 and they can be referenced from within the document.
2906 Like section titles, \SpecialChar LyX
2907 and \SpecialChar LaTeX
2908 make your job easier by automatically numbering
2909 the bibliography items and changing citations when the item numbers change.
2912 \begin_layout Standard
2913 Go to the end of the document and switch to the
2918 Now, each paragraph you type will be a reference.
2920 \begin_inset Quotes eld
2925 The Lyx Tutorial, by the \SpecialChar LyX
2929 \begin_inset Quotes erd
2932 as your first reference.
2933 Note that \SpecialChar LyX
2934 automatically puts a number in a box before each reference.
2935 Click on the boxed reference number, and the
2938 \begin_inset space ~
2948 is to refer to this reference within the \SpecialChar LyX
2958 is set (default), you will see the number of the bibliography in the output.
2964 \begin_inset Quotes eld
2968 \begin_inset Quotes erd
2971 to make it easy to remember.
2974 \begin_layout Standard
2975 Now pick somewhere in your document that you would like to insert a reference.
2978 Insert\SpecialChar menuseparator
2981 or the toolbar button
2984 arg "dialog-show-new-inset citation"
2993 The left panel in this dialog lists all the bibliography entries, and this
2994 field allows you to choose which bibliography item you want to cite.
2996 \begin_inset Quotes eld
3000 \begin_inset Quotes erd
3003 (right now, that is the only item in the bibliography), then use the
3007 button in the center to insert it.
3008 (You can have multiple citations in the same place by transferring a number
3013 \begin_layout Plain Layout
3014 If one uses label names for references that are easy to remember it is easier
3015 to find the entry in the list of references.
3025 Now preview your file and you will see that the citation appears in brackets
3026 in the text, referring to the bibliography at the end of the document.
3029 \begin_layout Standard
3033 \begin_inset space ~
3042 dialog will put a remark (such as a reference to a page or chapter within
3043 the referenced book or article) in the brackets after the reference.
3044 If you want the references to have labels instead of numbers in the printed
3045 output (for example, some journals would use
3046 \begin_inset Quotes eld
3050 \begin_inset Quotes erd
3053 to refer to a paper written by Smith in 1995), use the
3060 \begin_inset space ~
3073 \begin_layout Standard
3078 Fix the bibliography and citation in
3083 \begin_layout Section
3087 \begin_layout Standard
3088 You may want to put a table of contents at the beginning of your document.
3090 makes this easy to do.
3095 after your document title and before your first section title and select
3098 Insert\SpecialChar menuseparator
3100 \begin_inset space ~
3104 \begin_inset space ~
3107 TOC\SpecialChar menuseparator
3109 \begin_inset space ~
3113 \begin_inset space ~
3120 \begin_inset Quotes eld
3124 \begin_inset Quotes erd
3127 will appear in a button on the first line of the document.
3131 \begin_layout Standard
3132 This may not appear to be very useful.
3133 However, if you look at your preview, you will see that a table of contents
3134 has been generated, listing the various sections and subsections in your
3136 As usual, if you reorder sections or create new ones, you will see those
3137 changes in the preview when you update it.
3141 \begin_layout Standard
3142 The table of contents is not printed in the on-screen version of the document.
3143 But you can display the table of contents in a separate window by clicking
3144 on the table of contents button, or by using
3146 View\SpecialChar menuseparator
3148 \begin_inset space ~
3153 or the toolbar button
3156 arg "dialog-toggle toc"
3160 This menu will work even if you do not have a table of contents inset in
3162 This is a very useful tool for rearranging your document parts.
3163 Clicking on a (sub)section title in the
3167 window will highlight that line and move the display (in the \SpecialChar LyX
3169 to that place in the document.
3170 You can also use the arrow keys to move up and down in the table of contents.
3171 You may therefore find it convenient to leave this window open throughout
3173 You can get similar functionality from the
3177 menu, though, where the table of contents appears automatically.
3180 \begin_layout Standard
3181 To get rid of the Table of Contents, you can delete the table of contents
3182 button just like any other text.
3185 \begin_layout Standard
3190 : Fix the table of contents in
3195 \begin_layout Chapter
3199 \begin_layout Standard
3201 is used by many scientists because it outputs great looking equations,
3202 avoiding the control characters used by word processors and their equation
3204 Many of these scientists are frustrated, however, because writing equations
3205 in \SpecialChar LaTeX
3206 is more like programming than writing.
3207 Happily, \SpecialChar LyX
3208 has WYSIWYM support for equations.
3209 If you are used to \SpecialChar LaTeX
3210 , you will find that all of the usual \SpecialChar LaTeX
3212 can be typed in normally, but they will show up in a WYSIWYM fashion.
3213 If, on the other hand, you have never written in \SpecialChar LaTeX
3217 \begin_inset space ~
3222 will allow you to write professional-looking math quickly and easily.
3225 \begin_layout Section
3229 \begin_layout Standard
3230 Somewhere in your \SpecialChar LyX
3234 \begin_layout LyX-Code
3235 I like what Einstein said, E=mc^2, because it is so simple.
3239 \begin_layout Standard
3240 Now, that equation does not look very good in \SpecialChar LyX
3241 and in the output; there
3242 is no space between the letters and the equals sign, and you would like
3243 to write an actual superscript for the
3244 \begin_inset Quotes eld
3248 \begin_inset Quotes erd
3252 That bad typesetting happened because we did not tell \SpecialChar LyX
3253 that we were writing
3254 a mathematical expression, so it typeset the equation like regular old
3258 \begin_layout Standard
3259 But we can create a formula that will be typeset properly.
3260 Highlight the equation and click the toolbar button
3268 Insert\SpecialChar menuseparator
3269 Math\SpecialChar menuseparator
3271 \begin_inset space ~
3277 If nothing is highlighted \SpecialChar LyX
3278 inserts a little blue square, which is an empty
3280 The expression appears in blue and the blue square disappears as soon as
3281 the formula is not empty.
3286 to leave the equation.
3287 The purple markers disappear, leaving the cursor to the right of the expression.
3288 Now, if you type something, it will be regular text.
3291 \begin_layout Standard
3292 Looking at the output you will notice that the expression was typeset nicely,
3293 with spaces between the letters and the equals sign, and a superscript
3295 \begin_inset Quotes eld
3299 \begin_inset Quotes erd
3303 Letters in math mode are assumed to be variables, and come out in italics.
3304 Numbers are just numbers.
3307 \begin_layout Standard
3308 This math editor is another example of the WYSIWYM philosophy.
3309 In \SpecialChar LaTeX
3310 , you write a mathematical expression using text and commands like
3316 ; this can be frustrating, because you cannot see what an expression looks
3317 like until you run the file under \SpecialChar LaTeX
3318 and you may have to spend time, for
3319 example, finding missing brackets.
3321 does not attempt to get the expression to look perfect (WYSIWYG), but
3322 it gives you an extremely good idea of what the expression will look like.
3324 then takes care of the professional typesetting.
3327 \begin_layout Section
3328 Navigating an Equation
3331 \begin_layout Standard
3333 \begin_inset Formula $E=mc^{2}$
3337 \begin_inset Formula $E=1+mc^{2}$
3341 Use the arrow keys to move the cursor into the expression.
3342 Note that when you enter the expression, the purple markers appear to let
3343 you know you are editing math.
3352 to move the cursor past the equals sign, and just type
3353 \begin_inset Quotes eld
3357 \begin_inset Quotes erd
3361 Again, you can use the arrow keys or
3365 to leave the formula\SpecialChar endofsentence
3369 \begin_layout Standard
3370 Other than the special keys described below, typing in math mode is like
3371 editing regular text.
3381 Select text either with the arrow keys or with the mouse.
3384 Edit\SpecialChar menuseparator
3387 works in math mode as well as cut and paste.
3388 One thing to be careful of: if you are left or right outside a formula
3397 respectively, you delete the whole formula.
3398 Luckily, you can just use
3405 \begin_layout Standard
3406 What if you want to change
3407 \begin_inset Formula $E=mc^{2}$
3411 \begin_inset Formula $E=mc^{2.5}+1$
3414 ? Again, you can use the mouse to click in the right place.
3415 However, you can also use the arrow keys.
3416 If the cursor is just after the
3417 \begin_inset Quotes eld
3421 \begin_inset Quotes erd
3425 \begin_inset Quotes eld
3429 \begin_inset Quotes erd
3436 and the cursor is moved to the level of the superscript, just before the
3438 \begin_inset Quotes eld
3442 \begin_inset Quotes erd
3447 \begin_inset Quotes eld
3451 \begin_inset Quotes erd
3459 will move the cursor back to the regular level.
3468 , the cursor will be placed
3472 the superscript (so that you can then type the
3473 \begin_inset Quotes eld
3477 \begin_inset Quotes erd
3483 \begin_layout Section
3484 Exponents and Indices
3487 \begin_layout Standard
3488 An exponent can be entered from the
3491 \begin_inset space ~
3496 (see below), but it is actually simpler just to type the caret key,
3497 \begin_inset Quotes eld
3501 \begin_inset Quotes erd
3506 will place another blue rectangle in the superscript, so that whatever
3507 you write next will be superscripted, and in a smaller font size.
3508 Everything you type until you hit a
3516 to exit the formula entirely) will be in the superscript.
3519 \begin_layout Standard
3520 Writing a subscript (index) is just as easy; start one by typing the underscore
3522 \begin_inset Quotes eld
3526 \begin_inset Quotes erd
3530 You can subscript and superscript both subscripts and superscripts like
3532 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3539 \begin_layout Standard
3551 \begin_layout Section
3555 \begin_layout Standard
3559 \begin_inset space ~
3564 is a convenient way to enter symbols and/or to perform complicated formula
3566 Many of these operations can be accomplished from the keyboard or the
3568 Insert\SpecialChar menuseparator
3573 Edit\SpecialChar menuseparator
3576 menus (the latter only appears when you are in Math mode).
3577 However, we are going to concentrate on using the
3580 \begin_inset space ~
3585 , just to let you know what is out there; you can learn keyboard shortcuts
3586 and commands later from the
3593 \begin_layout Standard
3597 \begin_inset space ~
3602 is shown when the cursor is in a formula and can also be turned on manually
3605 View\SpecialChar menuseparator
3609 When you click there on
3610 \begin_inset Quotes eld
3614 \begin_inset Quotes erd
3620 arg "toolbar-toggle math"
3623 ) the toolbar will be shown permanently at the bottom; this state is visualized
3628 menu with a checkmark.
3629 When you click in this state again on
3630 \begin_inset Quotes eld
3634 \begin_inset Quotes erd
3644 \begin_inset space ~
3649 is only shown when the cursor is within a formula; this state is visualized
3650 by the renaming of the menu entry from
3651 \begin_inset Quotes eld
3655 \begin_inset Quotes erd
3659 \begin_inset Quotes eld
3663 \begin_inset space ~
3667 \begin_inset Quotes erd
3673 \begin_layout Subsection
3677 \begin_layout Standard
3681 \begin_inset space ~
3686 allows you to choose from a large array of symbols used in math: operators,
3687 arrows, relationships, delimiters, special characters, sums and integrals.
3688 Note that subscripting and superscripting allow you to put lower and upper
3689 limits on sums and integrals.
3692 \begin_layout Subsection
3693 Roots, decorations, and delimiters
3696 \begin_layout Standard
3697 To type a square root, just click on the button
3700 arg "math-insert \\sqrt"
3704 The square root appears, and the cursor is in a new insertion point inside
3706 You can type variables, numbers, other square roots, fractions, whatever
3709 will automatically resize the square root to fit what is inside.
3712 \begin_layout Standard
3714 \begin_inset Quotes eld
3718 \begin_inset Quotes erd
3722 \begin_inset Formula $\overrightarrow{a}$
3725 ) or group of characters (
3726 \begin_inset Formula $\overrightarrow{a+b}$
3729 ) is done similarly.
3730 Decorations are available from the toolbar via the button
3733 arg "math-insert \\hat"
3737 Click on a decoration, and \SpecialChar LyX
3738 will insert that decoration with an insertion
3739 point under (or over) it.
3740 Just type what you want in the insertion point.
3741 There are two sets of decorations: those that resize with the text you
3742 type, and those that have a fixed size, and are most appropriate for a
3747 \begin_layout Standard
3748 Delimiters such as parentheses, brackets, and braces work similarly, but
3749 are a bit more complicated.
3750 Hit the delimiter button
3753 arg "dialog-show mathdelimiter"
3761 Your current selection of delimiters is displayed in a box.
3762 It is a pair of parentheses by default, but you can choose a pair of braces,
3763 a brace and a parenthesis, or choose the empty square to have something
3765 \begin_inset Quotes eld
3769 \begin_inset Formula $a=\left\langle 7\right.$
3773 \begin_inset Quotes erd
3776 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3781 \begin_layout Standard
3782 If you are lazy, you can type actual parentheses in math mode, rather than
3788 However, those parentheses will be the same size as regular text, which
3789 will look bad if you have a big fraction or matrix inside the parentheses.
3790 So it is better to use one of the three delimiter buttons that insert them
3791 directly, for example
3794 arg "math-delim ( )"
3800 \begin_layout Standard
3801 You can also put delimiters or a square root sign or a decoration on already
3802 existing formula parts.
3803 Select the portion of the formula that you want to adjust, and then click
3804 on the button you want from the
3807 \begin_inset space ~
3813 Try using this to change Newton's second law from scalar to vector form
3815 \begin_inset Formula $f=ma$
3819 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3823 Once you have learned about matrices, this is how you will put parentheses
3824 or brackets around them.
3827 \begin_layout Subsection
3831 \begin_layout Standard
3832 To create a fraction, click on the fraction button
3835 arg "math-insert \\frac-square"
3841 \begin_inset space ~
3848 writes two insertion points in a fraction.
3849 As you would expect, you can use arrow keys or the mouse to move around
3851 Click on the top square and type
3852 \begin_inset Quotes eld
3856 \begin_inset Quotes erd
3865 \begin_inset Quotes eld
3869 \begin_inset Quotes erd
3873 You have made a fraction! Of course you can type anything within each of
3874 the two boxes: variables with exponents, square roots, other fractions,
3879 \begin_layout Standard
3891 \begin_layout Subsection
3892 Functions: lim, log, sin and others
3895 \begin_layout Standard
3896 Because letters in math mode are considered to be variables, if you type
3898 \begin_inset Quotes eld
3902 \begin_inset Quotes erd
3905 in math mode, \SpecialChar LyX
3906 thinks you are typing the product of the three variables
3908 \begin_inset Formula $s$
3912 \begin_inset Formula $i$
3916 \begin_inset Formula $n$
3920 The three letters will be typeset in italics, when what you really wanted
3922 \begin_inset Quotes eld
3926 \begin_inset Quotes erd
3930 In addition, \SpecialChar LyX
3931 will not put a space between the word
3932 \begin_inset Quotes eld
3936 \begin_inset Quotes erd
3940 \begin_inset Quotes eld
3944 \begin_inset Quotes erd
3951 will exit the formula).
3953 \begin_inset Quotes eld
3957 \begin_inset Formula $\sin(x)$
3961 \begin_inset Quotes erd
3965 \begin_inset Quotes eld
3969 \begin_inset Formula $sin(x)$
3973 \begin_inset Quotes erd
3979 \begin_layout Standard
3983 \begin_inset space ~
3991 arg "math-insert \\functions"
3995 \begin_inset Quotes eld
3999 \begin_inset Quotes erd
4002 in the pop-up function list.
4004 \begin_inset Quotes eld
4008 \begin_inset Quotes erd
4011 is displayed in \SpecialChar LyX
4012 in black, and set in upright roman type.
4013 The whole word is treated as one symbol, so if you type
4017 , it will delete the whole word.
4019 \begin_inset Quotes eld
4023 \begin_inset Quotes erd
4026 , which will be written in blue italics, like you expect in a formula.
4027 In the output, the expression will be correctly typeset.
4031 \begin_layout Standard
4032 The function list includes other trigonometric functions and their inverses,
4033 hyperbolic functions, logarithms, limits, and quite a few others.
4034 These functions can take subscripts and superscripts, important for typing
4036 \begin_inset Quotes eld
4040 \begin_inset Formula $\cos^{2}\theta$
4044 \begin_inset Quotes erd
4048 \begin_inset Quotes eld
4052 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4056 \begin_inset Quotes erd
4062 \begin_layout Standard
4074 \begin_layout Subsection
4078 \begin_layout Standard
4079 Click on the matrix button
4082 arg "dialog-show mathmatrix"
4088 \begin_inset space ~
4094 A pop-up dialog allows you to choose how many rows and columns you want
4096 Choose 2 rows and 3 columns and hit
4102 prints 6 insertion points in a
4103 \begin_inset Formula $2\times3$
4107 As usual, you can put any sort of formula expression (a square root, another
4108 matrix, etc.) in each insertion point.
4109 You can also leave some of the insertion points empty if you want.
4112 \begin_layout Standard
4117 can be used to move horizontally between the columns of a matrix.
4118 Alternatively, you can use the arrow keys to move around - hitting
4122 at the end of one box will move to the next box,
4126 will move to the next row, etc.
4129 \begin_layout Standard
4130 If you need to change the number of rows and columns, use the menu
4132 Edit\SpecialChar menuseparator
4134 \begin_inset space \thinspace{}
4138 \begin_inset space \thinspace{}
4143 or the math toolbar buttons
4146 arg "inset-modify tabular append-row"
4152 arg "inset-modify tabular delete-row"
4158 arg "inset-modify tabular append-column"
4164 arg "inset-modify tabular delete-column"
4170 \begin_layout Standard
4175 for information on how to change the horizontal alignment of each column,
4176 and how to change the vertical position of the whole matrix.
4177 Note that if you want to write a table containing text, you should use
4179 's wonderful table support, rather than trying to write text in a matrix.
4182 \begin_layout Subsection
4186 \begin_layout Standard
4187 All of the expressions we have written so far have been on the same line
4188 as the text that came before and after them, otherwise known as inline
4190 This is fine for short, simple expressions, but if you want to write larger
4191 ones, or if you want your expressions to stand out from the text, you need
4192 to write them in display mode.
4193 In addition, only displayed expressions can be labeled and numbered (see
4198 ), and multi-line equations must be in display mode.
4201 \begin_layout Standard
4202 While being in a formula, click on the display button
4211 \begin_inset space ~
4217 This centers the formula and adds a blank line before and after it.
4218 Now type in an expression and compile your file to see how it looks.
4219 The display button is actually a toggle; use it now to change a couple
4220 of your expressions to display mode and back.
4224 \begin_layout Standard
4225 Display mode has a couple differences from inline mode:
4228 \begin_layout Itemize
4229 The default font is larger for a few symbols, like
4230 \begin_inset Formula $\sum$
4234 \begin_inset Formula $\int$
4240 \begin_layout Itemize
4241 Subscripts and superscripts for limits and sums (but not integrals) are
4242 written under and over rather than next to the symbols
4245 \begin_layout Itemize
4249 \begin_layout Standard
4250 Other than these differences, though, displayed expressions and inline expressio
4251 ns are very similar.
4254 \begin_layout Standard
4255 One final note about the way displayed formulas are typeset: be careful
4256 about whether you are putting your equation into a new paragraph or not.
4257 If your formula is in the middle of a sentence or paragraph, then do not
4263 Doing so will cause the text
4267 the formula to start a new paragraph.
4268 That text will be indented or follow a blank line, depending on your document
4269 paragraph settings, which is probably not what you want.
4272 \begin_layout Standard
4277 : Put the various equations in
4281 into display mode, and see how they are typeset differently.
4284 \begin_layout Standard
4289 : Using various tools you have learned in this section, you should be able
4290 to write an equation like:
4294 \begin_layout Plain Layout
4295 After you have done it the hard way, give
4297 Insert\SpecialChar menuseparator
4298 Math\SpecialChar menuseparator
4300 \begin_inset space ~
4311 \begin_inset Formula
4313 f(x)=\left\{ \begin{array}{cc}
4316 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4325 \begin_layout Section
4329 \begin_layout Standard
4330 Now you are familiar with the basics.
4332 's math editor can do a lot more.
4333 You can refer to the
4337 manual for tips on how to:
4340 \begin_layout Itemize
4341 Label and number expressions.
4344 \begin_layout Itemize
4345 Create multi-line equations.
4348 \begin_layout Itemize
4349 Change typefaces, e.
4350 \begin_inset space \thinspace{}
4354 \begin_inset space \space{}
4357 to write bold-face text in an expression.
4360 \begin_layout Itemize
4361 Fine-tune font sizes and spacing within an expression.
4362 (Do not worry about this until your final draft!)
4365 \begin_layout Itemize
4367 These are very powerful, because you just define them once at the top of
4368 the document, and then you can use them throughout the document.
4371 \begin_layout Itemize
4372 Do almost all you can do with math.
4375 \begin_layout Chapter
4379 \begin_layout Section
4380 Other major \SpecialChar LyX
4384 \begin_layout Standard
4385 We have not gone through all the possible commands in \SpecialChar LyX
4386 , and we are not planning
4395 \begin_inset space ~
4400 manual for more information.
4401 We will just mention a couple more major things \SpecialChar LyX
4405 \begin_layout Itemize
4407 has WYSIWYM support for tables.
4410 Insert\SpecialChar menuseparator
4416 arg "tabular-insert"
4420 Click on the table with the
4427 \begin_inset space ~
4432 dialog box which allows extensive table editing.
4436 arg "toolbar-toggle table"
4439 the table toolbar will appear permanently.
4442 \begin_layout Itemize
4444 also supports including pictures in any format within documents.
4447 Insert\SpecialChar menuseparator
4453 arg "dialog-show-new-inset graphics"
4457 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4458 can have captions, and \SpecialChar LyX
4459 will automatically generate lists of figures and/or
4463 \begin_layout Itemize
4465 is heavily configurable.
4466 Everything from how the \SpecialChar LyX
4467 window looks to how the output comes out can be
4468 configured in a number of ways.
4469 Much configuration is done through
4471 Tools\SpecialChar menuseparator
4475 For more information on this, check out
4477 Help\SpecialChar menuseparator
4478 Customization\SpecialChar endofsentence
4482 \begin_layout Itemize
4484 is being developed by a team of programmers on five continents.
4485 Therefore, \SpecialChar LyX
4486 has better support for non-English languages (such as Dutch,
4487 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4488 ) than many word processors.
4489 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4490 languages Chinese Japanese, and Korean are supported.
4491 You can write documents in other languages and you can also configure \SpecialChar LyX
4493 to show its menus and error messages in other languages.
4497 \begin_layout Itemize
4498 The \SpecialChar LyX
4499 menus feature keybindings.
4500 This means that you can do
4502 File\SpecialChar menuseparator
4513 or by using the binding which is shown next to it in the menu (
4520 Keybindings are also configurable.
4521 For information on this, check out
4523 Help\SpecialChar menuseparator
4524 Customization\SpecialChar endofsentence
4528 \begin_layout Itemize
4530 can read \SpecialChar LaTeX
4533 \begin_inset space ~
4537 \begin_inset CommandInset ref
4539 reference "sec:tex2lyx"
4546 \begin_layout Itemize
4547 Spell-checking, thesaurus, and word count facilities are available.
4550 \begin_layout Itemize
4551 Generation of indexes and nomenclatures/glossaries is supported.
4554 \begin_layout Section
4556 for \SpecialChar LaTeX
4558 \begin_inset CommandInset label
4560 name "sec:latexusers"
4567 \begin_layout Standard
4568 If you do not know anything about \SpecialChar LaTeX
4569 , you do not have to read this section.
4570 Actually, you might want to
4574 about \SpecialChar LaTeX
4575 , and then read this chapter.
4576 However, some of those who begin to use \SpecialChar LyX
4577 will be familiar with \SpecialChar LaTeX
4579 If you are such a person, you may be wondering if \SpecialChar LyX
4580 can really do everything
4583 The short answer is that \SpecialChar LyX
4584 can do pretty much everything \SpecialChar LaTeX
4586 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4591 \begin_layout Standard
4592 Because this is just a tutorial, we are only going to mention things that
4593 new \SpecialChar LyX
4594 users will most likely be interested in.
4595 In the interests of keeping the Tutorial short, we will give only minimal
4600 \begin_inset space ~
4608 \begin_inset space ~
4613 manuals have a great deal of information on differences between \SpecialChar LyX
4614 and \SpecialChar LaTeX
4616 and how to do various \SpecialChar LaTeX
4617 tricks in \SpecialChar LyX
4621 \begin_layout Subsection
4626 \begin_layout Standard
4627 Anything that you enter in \SpecialChar TeX
4628 mode will be passed straight to \SpecialChar LaTeX
4630 displayed in red on the screen.
4631 You can use \SpecialChar TeX
4632 commands in \SpecialChar LyX
4635 Insert\SpecialChar menuseparator
4638 \begin_inset space ~
4650 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4654 \begin_layout Standard
4655 In a math formula, \SpecialChar TeX
4656 mode is handled a bit differently.
4658 mode is entered there by typing a backslash.
4659 The backslash is not written out, but anything you type afterwards will
4661 You exit \SpecialChar TeX
4666 or some other non-alphabetic character, like a number, underscore, caret
4668 Once you exit \SpecialChar TeX
4669 mode, if \SpecialChar LyX
4670 knows the \SpecialChar TeX
4671 command you have typed in, it will
4672 convert it to WYSIWYM\SpecialChar endofsentence
4674 \begin_inset Quotes eld
4684 \begin_inset Quotes erd
4687 in a formula and then press
4693 \begin_inset Quotes eld
4697 \begin_inset Quotes erd
4701 \begin_inset Quotes eld
4705 \begin_inset Formula $\gamma$
4709 \begin_inset Quotes erd
4713 This will work for almost all, non-complicated math macros.
4714 This may be faster than using the
4717 \begin_inset space ~
4722 , and will be especially convenient for experienced \SpecialChar LaTeX
4726 \begin_layout Standard
4727 As a special case, if you type
4728 \begin_inset Quotes eld
4738 \begin_inset Quotes erd
4741 in a formula, the beginning
4745 ending braces will be inserted in red while the cursor is placed between
4747 This makes it more convenient to type those commands that take an argument.
4750 \begin_layout Standard
4752 cannot do absolutely everything that \SpecialChar LaTeX
4754 Some fancy functions are not supported at all, while some work but are
4757 mode allows users to get the full flexibility of \SpecialChar LaTeX
4758 , while having all the
4759 convenient features of \SpecialChar LyX
4760 , like WYSIWYM math, tables, and editing.
4762 could never support every \SpecialChar LaTeX
4770 in the preamble (see Section
4771 \begin_inset space ~
4775 \begin_inset CommandInset ref
4777 reference "sec:preamble"
4781 ), you can use any package you want — although you will not have WYSIWYM
4782 support for that package's features.
4785 \begin_layout Subsection
4786 Importing \SpecialChar LaTeX
4792 \begin_inset CommandInset label
4801 \begin_layout Standard
4802 You can import a \SpecialChar LaTeX
4803 file into \SpecialChar LyX
4806 File\SpecialChar menuseparator
4807 Import\SpecialChar menuseparator
4810 \begin_inset space ~
4815 menu in \SpecialChar LyX
4817 This will call the program
4821 which will create a file foo.lyx from the file foo.tex.
4823 will then open that file.
4824 If the translation does not work, you can try calling
4828 from the command line, possibly using fancier options.
4831 \begin_layout Standard
4832 Even when the translation does work,
4836 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4838 It will leave things it does not understand in \SpecialChar TeX
4839 mode; so, after translating
4844 , you can look for the red text and manually edit it to get it right.
4847 \begin_layout Standard
4852 has its own documentation (manpage), which Unix/Linux users can access
4853 via the console command
4856 \begin_inset space ~
4862 The manpage describes which \SpecialChar LaTeX
4863 commands and environments are not supported,
4864 what bugs you might run into (and how to get around them), and how to use
4865 the various options.
4868 \begin_layout Standard
4869 It is important to understand that
4873 can only translate files whose document class is
4874 \begin_inset Quotes eld
4878 \begin_inset Quotes erd
4882 , that is, for which there is a corresponding \SpecialChar LyX
4888 If there is no layout file, then you will get an error saying that the
4889 conversion could not be performed.
4890 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4895 simply will not know how to translate the \SpecialChar LaTeX
4896 that it finds there into things
4899 More about layout files and how they are created is explained in detail
4907 \begin_layout Subsection
4908 Converting \SpecialChar LyX
4909 Documents to \SpecialChar LaTeX
4913 \begin_layout Standard
4914 You might wish to convert a \SpecialChar LyX
4915 Document to a \SpecialChar LaTeX
4917 For example, a co-worker or co-author who does not have \SpecialChar LyX
4922 File\SpecialChar menuseparator
4923 Export\SpecialChar menuseparator
4928 This will create a file
4936 file you are editing.
4939 \begin_layout Subsection
4944 \begin_layout Subsubsection
4948 \begin_layout Standard
4951 Document\SpecialChar menuseparator
4954 dialog takes care of the document-wide options, such as changing the document
4955 class, default font size and paper size.
4956 Document class options and also options for \SpecialChar LaTeX
4957 packages can be entered there
4961 \begin_inset space ~
4969 \begin_layout Subsubsection
4970 Other Preamble Matter
4971 \begin_inset CommandInset label
4980 \begin_layout Standard
4981 If you have special commands to put in the preamble of a \SpecialChar LaTeX
4983 use them in a \SpecialChar LyX
4987 Document\SpecialChar menuseparator
4988 Settings\SpecialChar menuseparator
4991 \begin_inset space ~
4996 and type in the dialog window (or from the document settings dialog, depending
4998 Anything you type will (as with \SpecialChar TeX
4999 mode) be sent directly to \SpecialChar LaTeX
5003 \begin_layout Subsection
5008 \begin_layout Standard
5010 has support for Bib\SpecialChar TeX
5011 , which allows you to build databases of bibliographical
5012 references to be used in multiple documents.
5015 Insert\SpecialChar menuseparator
5017 \begin_inset space \thinspace{}
5021 \begin_inset space \thinspace{}
5024 TOC\SpecialChar menuseparator
5027 \begin_inset space ~
5042 field you load Bib\SpecialChar TeX
5047 field you can load Bib\SpecialChar TeX
5051 \begin_layout Standard
5052 After you have done this, you can use citations from any bibliographies
5053 you have included with
5055 Insert\SpecialChar menuseparator
5059 \begin_inset space ~
5063 \begin_inset CommandInset ref
5065 reference "sec:bibliographies"
5074 dialog will show a list of all the references in your
5082 \begin_layout Section
5086 \begin_layout Standard
5087 Sometimes when you try to view a document, there will be errors, things
5088 that \SpecialChar LyX
5089 or \SpecialChar LaTeX
5091 When this happens, \SpecialChar LyX
5096 \begin_inset space ~
5102 Clicking on individual errors in this dialog will take you to the place
5103 in the \SpecialChar LyX
5104 document where the error occurs and also display the detailed \SpecialChar LaTeX