1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 %This preamble is designed to ensure that the document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
22 \fi % end if pdflatex is used
24 % the pages of the TOC is numbered roman
25 % and a pdf-bookmark for the TOC is added
26 \let\myTOC\tableofcontents
27 \renewcommand\tableofcontents{%
29 \pdfbookmark[1]{\contentsname}{}
33 \use_default_options false
37 \maintain_unincluded_children false
39 \language_package default
44 \font_typewriter default
46 \font_default_family default
47 \use_non_tex_fonts false
53 \default_output_format default
55 \bibtex_command default
56 \index_command default
60 \pdf_title "The LyX Tutorial"
61 \pdf_author "LyX Team"
62 \pdf_subject "LyX-documentation Tutorial"
63 \pdf_keywords "LyX, documentation"
65 \pdf_bookmarksnumbered true
66 \pdf_bookmarksopen true
67 \pdf_bookmarksopenlevel 1
72 \pdf_pdfusetitle false
73 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
76 \use_package amsmath 0
77 \use_package amssymb 0
80 \use_package mathdots 1
81 \use_package mathtools 0
83 \use_package stackrel 0
84 \use_package stmaryrd 0
85 \use_package undertilde 0
87 \cite_engine_type default
91 \paperorientation portrait
101 \paragraph_separation indent
102 \paragraph_indentation default
103 \quotes_language english
106 \paperpagestyle headings
107 \tracking_changes false
108 \output_changes false
111 \html_be_strict false
125 \begin_layout Plain Layout
127 If you have comments on or corrections to this documentation, please send
128 them to the LyX Documentation mailing list:
129 \begin_inset CommandInset href
131 target "lyx-docs@lists.lyx.org"
144 \begin_layout Standard
145 \begin_inset CommandInset toc
146 LatexCommand tableofcontents
153 \begin_layout Chapter
157 \begin_layout Section
161 \begin_layout Standard
162 This manual is designed for all of you who have never heard of LaTeX, or
163 do not know it very well.
164 Now, do not panic - you will not need to learn LaTeX to use LyX.
165 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
167 There are some things you will need to learn, however, in order to use
171 \begin_layout Standard
172 Some of you probably found your way to this document because you tried to
173 put two spaces after a
174 \begin_inset Quotes eld
178 \begin_inset Quotes erd
181 or tried to put three blank lines between paragraphs.
182 You found out you could not and, in fact, you will find out that most of
183 the little tricks you are accustomed to use in word processors will not
185 That is because most word processors you have used before allow you manually
186 to enter all spacings, font changes, and so on.
187 So you end up not only writing a document but typesetting it, too.
188 LyX does the typesetting for you, in a consistent fashion, letting you
189 focus on the important things, like the content of your writing.
192 \begin_layout Standard
193 So read on to learn more about LyX.
194 Reading this tutorial is definitely worth the time.
197 \begin_layout Section
207 \begin_layout Standard
208 Before we get started with this section, you need to know that this
212 uses the notation outlined in the
217 If you came to this manual first, please read the
221 before you continue with the
228 \begin_layout Standard
229 Now that you know which fonts mean what in the documentation, we want to
230 talk a bit about what this
237 \begin_layout Subsection
238 Getting the most out of the Tutorial
241 \begin_layout Standard
242 This tutorial consists of examples and exercises.
243 To get the most out of this document, you should read through it, typing
244 all the little things we are telling you to type and trying out all of
245 the exercises to see if you get them right.
246 For convenience, you might want to print out the PDF version of this document.
249 \begin_layout Standard
250 If you are familiar with LaTeX, you will probably be able to read the
254 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
255 However, LyX has features you will want to learn about.
256 Even if you do not feel like reading the rest of the
260 , you should definitely check out Section
265 \begin_inset CommandInset ref
267 reference "sec:latexusers"
271 , which is specifically written for experienced LaTeX users.
274 \begin_layout Subsection
282 \begin_layout Itemize
283 Detailed explanations of all of LyX's features.
287 \begin_layout Standard
296 \begin_layout Itemize
297 Detailed explanations of LaTeX.
301 \begin_layout Standard
303 If you want to learn some of the neat tricks you can do with LaTeX in LyX,
304 you can have a look at the
316 \begin_layout Standard
317 It is time to move on, time for your first document \SpecialChar \ldots{}
321 \begin_layout Chapter
322 Getting started with LyX
325 \begin_layout Section
326 Your first LyX document
329 \begin_layout Standard
331 You are ready to start writing.
332 Before you do, there are a few things we need to mention, which will hopefully
333 make the Tutorial more instructive and useful.
337 \begin_layout Standard
338 Because there is information we cannot give you in the Tutorial, the
344 thing that you need to do is find the
351 Start up LyX, select the
360 You may want to load the
364 as well (if you are not reading it within LyX already).
365 This way, you can read them while you are writing your own file.
369 \begin_layout Plain Layout
370 They can also serve as good examples of how to use the many features of
376 Note that once you have got more than one document open, you can use the
381 menu or the document tabs to switch between them.
384 \begin_layout Standard
385 In this Tutorial, we are going to assume that you have a fully working version
386 of LyX, as well as a LaTeX-distribution and a PDF-viewer.
387 This should be the case on all major Linux- and BSD-distributions, as well
388 as on Windows, where this is setup by the LyX installers.
391 \begin_layout Standard
392 Finally, we have written a file called
396 to let you practice your LyX skills.
397 Imagine that it was typed by someone who did not know about any of LyX's
399 As you learn new LyX functions, we will suggest that you fix those parts
405 It also contains `subtle' hints about how to fix things.
409 \begin_layout Plain Layout
410 The hints are located in yellow
411 \begin_inset Quotes eld
415 \begin_inset Quotes erd
419 Access the text in a note by clicking on it.
424 If you want to cheat, or check what you have done, there is also a file
429 which contains the same text written and typeset by a LyX master.
432 \begin_layout Standard
433 The example files can be found in the
437 directory of LyX's installation folder.
444 File\SpecialChar \menuseparator
451 to save a copy in your own directory for you to work on.
452 As you fix parts of the raw document, check to see how those changes affect
456 \begin_layout Standard
461 directory contains lots of other examples files.
462 They will show you how to do various fancy things with LyX.
463 After you have read the Tutorial, or when you are confused about how to
464 do something fancy in LyX, take a look at these files.
467 \begin_layout Subsection
468 Typing, Viewing, and Exporting
471 \begin_layout Itemize
474 File\SpecialChar \menuseparator
478 \begin_layout Itemize
479 Type a sentence like:
481 This is my first LyX document!
484 \begin_layout Itemize
485 Save your document with
487 File\SpecialChar \menuseparator
496 \begin_layout Itemize
497 Create a PDF file, with
499 Document\SpecialChar \menuseparator
502 or the toolbar button
509 LyX will open a PDF-viewer program displaying your document as it will
514 \begin_layout Plain Layout
515 You can save time by leaving the PDF-viewer running in the background.
518 Document\SpecialChar \menuseparator
521 or the toolbar button
527 and just click on the PDF-viewer window (or unminimize it) afterwards.
535 \begin_layout Itemize
536 Export the ready to print document with
538 File\SpecialChar \menuseparator
546 \begin_layout Standard
547 Congratulations! You have written your first LyX document.
548 All of the rest is just details.
551 \begin_layout Subsection
555 \begin_layout Standard
556 LyX can of course do most of the things you are used to doing with a word
558 It will word-wrap and indent paragraphs automatically.
559 Here is a quick description of how to do some simple actions.
562 \begin_layout Description
563 Undo LyX has multiple levels of undo, which means you can undo everything
564 you have done since your current editing session started, by selecting
567 Edit\SpecialChar \menuseparator
576 ) over and over again.
577 If you undo too much, just select
579 Edit\SpecialChar \menuseparator
592 \begin_layout Standard
593 Currently, undo is limited to 100 steps.
597 \begin_layout Description
600 Edit\SpecialChar \menuseparator
611 Edit\SpecialChar \menuseparator
622 Edit\SpecialChar \menuseparator
631 ) to cut, copy, and paste.
632 Or automatically paste selected text (including selections from other programs)
640 \begin_layout Description
643 Edit\SpecialChar \menuseparator
657 arg "dialog-show findreplace"
661 In the dialog, search with the
673 button to replace a word you have found.
677 \begin_layout Plain Layout
678 Close the window when you are done or leave it open if you find it more
680 Most dialog boxes in LyX can operate like this.
681 Just be sure you have the right window in focus when you are trying to
682 type in the main LyX window or a LyX dialog.
687 If you like, you can specify whether to make the search case-sensitive,
688 or to search for only complete words; you can also search backwards through
692 \begin_layout Description
707 , which will by default print characters in italics), set it in
717 , usually small caps, used for people's names), or use your own formatting
720 Edit\SpecialChar \menuseparator
725 Style\SpecialChar \menuseparator
728 dialog (toolbar button
731 arg "dialog-show character"
737 \begin_layout Description
738 Toolbar Other buttons on the toolbar allow you to do some of the more popular
766 \begin_layout Standard
767 Of course, you have not yet written enough to make most of these functions
769 As you write more, though, try undoing, pasting, etc.
772 \begin_layout Subsection
773 WYSIWYM: Whitespace in LyX
776 \begin_layout Standard
777 One of the hardest things for new users to get used to is the way that LyX
779 As many times as you hit
783 , you will only get one blank line.
784 As many times as you hit
788 , you will only get one space.
789 On a blank line, LyX will not let you type even one space.
794 key will not move you forward one tab stop; in fact there
798 no tab stops! There is no ruler at the top of the page to let you set tabs
802 \begin_layout Standard
803 Many word processors are based on the WYSIWYG principle:
804 \begin_inset Quotes eld
807 What You See Is What You Get.
808 \begin_inset Quotes erd
811 LyX, on the other hand, is based on the principle that
812 \begin_inset Quotes eld
815 What You See Is What You
820 \begin_inset Quotes erd
823 You type what you mean and LyX will take care of typesetting it for you
824 so that the output looks nice.
829 grammatically separates paragraphs and a
833 grammatically separates words; so there is no reason to have several of
838 has no grammatical function at all - so LyX does not support it.
839 Using LyX, you will spend more of your time worrying about the
843 of your document and less time worrying about the
852 for more information on the WYSIWYM concept.
855 \begin_layout Standard
856 LyX does have (many) ways to fine-tune the formatting of your document.
857 After all, LyX might not typeset
866 has information about all that.
867 It includes horizontal fills and vertical space — which are more powerful
868 and versatile than multiple spaces or blank lines — and ways to change
869 font sizes, character styles, and paragraph alignments by hand.
870 The idea, though, is that you can write your whole document, focusing on
871 content, and just worry about that fine-tuning at the end.
872 With standard word processors, you will be distracted by document formatting
873 throughout the writing process.
876 \begin_layout Section
880 \begin_layout Standard
881 Different parts of a document have different purposes; we call these parts
887 Most of a document is made up of regular text.
888 Section titles (chapter, subsection, etc.) let the reader know that a new
889 topic or subtopic will be discussed.
890 Certain types of documents have special environments.
891 A journal article will have an abstract and a title.
892 A letter will have neither of these, but will probably have an environment
893 that gives the writer's address.
896 \begin_layout Standard
897 Environments are a major part of the
898 \begin_inset Quotes eld
901 What You See Is What You Mean
902 \begin_inset Quotes erd
906 A given environment may require a certain font style, font size, indenting,
907 line spacing, and more.
908 This problem is aggravated, because the exact formatting for a given environmen
909 t may change: one journal may use boldface, 18 point, centered type for
910 section titles while another uses italicized, 15 point, left justified
911 type; different languages may have different standards for indenting; and
912 bibliography formats can vary widely.
913 LyX lets you avoid learning all the different formatting styles.
916 \begin_layout Standard
921 choice box is located on the left end of the toolbar and looks like this:
923 \begin_inset Graphics
924 filename clipart/ToolbarEnvBox.png
931 It indicates in which environment you are currently writing.
932 While you were writing your first document, it said
933 \begin_inset Quotes eld
937 \begin_inset Quotes erd
940 which is the default environment for text.
941 Now you will put a number of environments in your new document so that
942 you can see how they work.
945 \begin_layout Subsection
946 Sections and Subsections
949 \begin_layout Standard
954 on the first line of your new LyX file, and select
966 \begin_layout Plain Layout
972 If nothing is selected, LyX changes the paragraph you are currently in
973 to the selected environment.
974 Alternatively, you can change several paragraphs to a different environment
975 by selecting them before picking an environment.
992 , which will be covered below.
993 LyX numbers the section
994 \begin_inset Quotes eld
998 \begin_inset Quotes erd
1001 and typesets the section heading (title) in a larger font.
1012 \begin_inset Quotes eld
1016 \begin_inset Quotes erd
1020 \begin_inset Quotes eld
1024 \begin_inset Quotes erd
1028 Section headings, like most environments, are assumed to end when you type
1034 Type the document introduction:
1037 \begin_layout LyX-Code
1038 This is an introduction to my first LyX document.
1041 \begin_layout Standard
1056 \begin_inset Quotes eld
1060 \begin_inset Quotes erd
1063 and waits for you to type a title.
1065 \begin_inset Quotes eld
1071 \begin_inset space ~
1077 \begin_inset Quotes erd
1080 , and you will see that LyX again sets it as a section title.
1083 \begin_layout Standard
1085 Go to the end of Section
1086 \begin_inset space ~
1090 \begin_inset Quotes eld
1093 my first LyX document.
1094 \begin_inset Quotes erd
1111 \begin_inset Quotes eld
1115 \begin_inset Quotes erd
1118 and waits for you to type a title.
1125 \begin_inset space ~
1129 \begin_inset Quotes eld
1133 \begin_inset Quotes erd
1137 \begin_inset space ~
1140 2, has been automatically renumbered to Section
1141 \begin_inset space ~
1144 3! In true WYSIWYM fashion, you just need to identify the text that makes
1145 up the section titles, and LyX takes care of numbering the sections and
1149 \begin_layout Standard
1158 environment, and type the following five lines:
1161 \begin_layout LyX-Code
1162 Sections and subsections are described below.
1165 \begin_layout LyX-Code
1169 \begin_layout LyX-Code
1170 Sections are bigger than subsections.
1173 \begin_layout LyX-Code
1174 Subsection description
1177 \begin_layout LyX-Code
1178 Subsections are smaller than sections.
1181 \begin_layout Standard
1182 Click on the second line and select
1191 LyX numbers the subsection
1192 \begin_inset Quotes eld
1196 \begin_inset Quotes erd
1199 , and typesets it in a font which is bigger than regular text but smaller
1200 than the section title.
1201 Change the fourth line to the
1205 environment as well.
1206 As you probably expected, LyX automatically numbered the section
1207 \begin_inset Quotes eld
1211 \begin_inset Quotes erd
1215 If you put yet another section before Section
1216 \begin_inset space ~
1220 \begin_inset space ~
1223 2 will be renumbered as Section 3, and the subsections will be renumbered
1225 \begin_inset Quotes eld
1229 \begin_inset Quotes erd
1233 \begin_inset Quotes eld
1237 \begin_inset Quotes erd
1243 \begin_layout Standard
1244 Further levels of sectioning include
1257 We will let you play with these on your own.
1258 You may notice that paragraph and subparagraph headings are not numbered
1259 by default, and that subparagraphs are indented; see the
1263 for an explanation and how to change this.
1268 headings are actually the highest level of sectioning, above
1272 s, but you are only allowed to use them in certain types (text classes)
1273 of LyX documents (see Section
1274 \begin_inset space ~
1278 \begin_inset CommandInset ref
1280 reference "sec:Document-Classes"
1287 \begin_layout Standard
1288 Finally, you may want to have sections or subsections that are not numbered.
1289 There are environments for this as well.
1290 If you change one of your section headings to the
1294 environment (you may have to scroll down in the
1298 box to find it), LyX will use the same font size for the heading as it
1299 uses for a regular section, but it will not number that section.
1300 There are corresponding
1301 \begin_inset Quotes eld
1305 \begin_inset Quotes erd
1308 heading environments for
1317 Try changing some of your sections or subsections to the starred environments,
1318 and note how the other section numbers are updated.
1321 \begin_layout Standard
1326 : Fix the section and subsection headings in
1334 \begin_layout Subsection
1338 \begin_layout Standard
1339 LyX has several different environments for typesetting lists.
1340 The various list environments free you from hitting
1344 a million times when writing an outline, or from renumbering a whole list
1345 when you want to add a point in the middle of the list.
1346 Different types of documents logically require different list environments:
1349 \begin_layout Itemize
1350 A slide presentation might use the
1354 environment's bulleted lists to describe different points.
1357 \begin_layout Itemize
1358 An outline would use the
1362 environment's numbered lists (and lettered sublists).
1365 \begin_layout Itemize
1366 A document describing several software packages could use the
1370 environment, where each item in the list begins with a bold-faced word.
1373 \begin_layout Itemize
1382 ) environment is a variation on the
1389 \begin_layout Standard
1390 Let us write a list of reasons why LyX is better than other word processors.
1391 Somewhere in your document, type:
1394 \begin_layout Standard
1397 LyX is better than other word processors because:
1400 \begin_layout Standard
1417 arg "layout Itemize"
1422 \begin_inset Quotes eld
1426 \begin_inset Quotes erd
1430 Type in your reasons:
1433 \begin_layout LyX-Code
1434 Typesetting is done for you.
1437 \begin_layout LyX-Code
1441 \begin_layout LyX-Code
1442 Lists are very easy to create!
1445 \begin_layout Standard
1446 List environments, unlike headings, do not end when you type
1451 Instead, LyX assumes you are going on to the next item in the list.
1452 The above will therefore result in a three-item list.
1453 If you want more than one paragraph within one list
1457 , one way is to use the
1460 \begin_inset space ~
1465 , which you get by typing
1470 In order to get out of the list, you need to reselect the
1474 environment (or just use the key binding
1477 arg "layout Standard"
1483 \begin_layout Standard
1484 You now have a beautiful itemized list.
1485 You might want to run LaTeX to see how the list looks when printed out.
1486 But what if you wanted to number the reasons? Well, just select the whole
1491 \begin_layout Plain Layout
1492 LyX will not let you select the first bullet (or the actual number in a
1493 numbered section title) unless you also select the paragraph
1497 it, which you probably do not want to do.
1498 This is on purpose because the bullet or number depends on the document
1499 settings or text position, respectively.
1515 arg "layout Enumerate"
1519 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1523 \begin_layout Standard
1524 While the list is still selected, you can change to the other two list environme
1532 \begin_inset space \thinspace{}
1538 \begin_inset space \thinspace{}
1548 arg "layout Description"
1557 ), in order to see what they look like.
1558 For those two environments, each list item is made up of a term, which
1559 is the item's first word, followed by a definition, which is the rest of
1560 the paragraph (until you hit
1565 The term is either typeset in boldface (
1570 \begin_inset Quotes eld
1574 \begin_inset Quotes erd
1581 \begin_layout Plain Layout
1582 But a typesetter's tab, which will change to fit the size of the largest
1583 term, not a pathetic, rigid, unchangeable typewriter
1596 ) from the rest of the paragraph.
1597 If you want to have more than one word in the definition, then separate
1601 \begin_inset space ~
1609 \begin_layout Standard
1614 : Typeset the list in
1619 \begin_layout Standard
1620 You can nest lists within each other in all sorts of interesting ways.
1621 An obvious example would be writing outlines.
1622 Numbered and bulleted lists will have different numbering and bulleting
1623 schemes for sublists.
1628 for details on the different sorts of lists and for examples of nestings.
1631 \begin_layout Subsection
1632 Other environments: Verses, Quotations, and more
1635 \begin_layout Standard
1636 There are two environments for setting quotations apart from surrounding
1641 for short quotes and
1654 \begin_layout Plain Layout
1655 used in this Tutorial for the long typing examples
1664 font; this environment is the only place in LyX where you are allowed to
1665 use multiple spaces to allow code indenting.
1666 You can even write poetry using the
1674 to separate stanzas, and
1678 to separate lines within a stanza.
1683 for more complete descriptions of all of the available LyX environments.
1686 \begin_layout Standard
1691 : Correctly typeset the
1704 \begin_layout Chapter
1708 \begin_layout Standard
1709 The previous chapter hopefully allowed you to get used to writing in LyX.
1710 It introduced you to the basic editing operations in LyX, as well as the
1711 powerful method of writing with environments.
1712 Most people who use LyX, though, will want to write documents: papers,
1713 articles, books, manuals, or letters.
1714 This chapter is meant to take you from simply writing text with LyX to
1715 writing a complete document.
1716 It will introduce you to text classes, which allow you to write different
1718 It will then describe many of the additions that turn text into a document,
1719 such as titles, footnotes, cross references, bibliographies, and tables
1723 \begin_layout Section
1725 \begin_inset CommandInset label
1727 name "sec:Document-Classes"
1734 \begin_layout Standard
1735 Different sorts of documents should be typeset differently.
1736 For example, books are generally printed double-sided, while articles are
1738 In addition, many documents contain special environments: letters contain
1739 some environments — such as the sender's address and the signature — which
1740 do not make sense in a book or article.
1749 \begin_layout Plain Layout
1750 for LaTeX users: this is equivalent to the LaTeX document class
1755 takes care of these large scale differences between different sorts of
1757 This Tutorial, for example, was written in the
1762 Document classes are another major part of the WYSIWYM philosophy; they
1763 tell LyX how to typeset the document, so you do not need to know how.
1766 \begin_layout Standard
1767 Your document is probably being written in the
1775 \begin_layout Plain Layout
1776 That is usually the default document class
1781 Try changing to other document classes (using the
1783 Document\SpecialChar \menuseparator
1786 dialog) to see how they are typeset differently.
1787 If you change your document to the
1791 document class and look at the
1795 box, you will see that most of the allowed environments are the same.
1796 However, you can now use the
1801 If you are ever unsure about which environments you can use in a given
1802 document class, just consult the
1809 \begin_layout Standard
1810 Font sizes, one- or two-column printing, and page headings are just some
1811 of the ways journals' typesettings differ from one another.
1812 As the Computer Age continues to mature, journals have begun accepting
1813 electronic submissions, creating LaTeX
1814 \begin_inset Quotes eld
1818 \begin_inset Quotes erd
1821 so that authors can submit correctly typeset articles.
1822 LyX is set up to support this as well.
1823 For example, LyX supports typesetting (and extra environments) for the
1824 American Mathematics Society journals using the
1827 \begin_inset space ~
1835 \begin_layout Standard
1836 Here is a very quick reference to some of the document classes.
1839 Special Document Classes
1845 manual for many more details.
1848 \begin_layout Standard
1850 \begin_inset Tabular
1851 <lyxtabular version="3" rows="7" columns="2">
1852 <features rotate="0" tabularvalignment="middle">
1853 <column alignment="center" valignment="top" width="0pt">
1854 <column alignment="center" valignment="top" width="0pt">
1856 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1859 \begin_layout Plain Layout
1865 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1868 \begin_layout Plain Layout
1876 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1879 \begin_layout Plain Layout
1885 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1888 \begin_layout Plain Layout
1889 one-sided, no chapters
1896 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1899 \begin_layout Plain Layout
1905 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1908 \begin_layout Plain Layout
1909 layout & environments for American Math Society
1916 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1919 \begin_layout Plain Layout
1925 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1928 \begin_layout Plain Layout
1929 longer than article, two-sided
1936 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1939 \begin_layout Plain Layout
1945 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1948 \begin_layout Plain Layout
1949 report + front and back matter
1956 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1959 \begin_layout Plain Layout
1965 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1968 \begin_layout Plain Layout
1976 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1979 \begin_layout Plain Layout
1985 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1988 \begin_layout Plain Layout
1989 lots of extra environments for address, signature\SpecialChar \ldots{}
2003 \begin_layout Section
2004 Templates: Writing a Letter
2007 \begin_layout Standard
2008 One way to write a letter would be to open a new file, and choose a
2014 Document\SpecialChar \menuseparator
2018 While this is the most obvious way to write a letter, it seems like extra
2020 Every time you write a business letter, you want to have your address,
2021 the address to which you are sending it, a body, a signature, etc.
2026 for letters, which contains a sample letter; once you have a template,
2027 you can just replace a couple of parts of the letter with your text each
2028 time you write a letter.
2031 \begin_layout Standard
2032 Open a new file with
2034 File\SpecialChar \menuseparator
2036 \begin_inset space ~
2040 \begin_inset space ~
2051 Save and print the file to see how the various environments are typeset.
2054 \begin_layout Standard
2055 When you look at the
2059 box, you will see several environments, like the
2062 \begin_inset space ~
2067 environment, that do not exist in most other document classes.
2073 You can play around for a while to figure out how the various environments
2075 You will notice for example that the
2079 environment has the word
2080 \begin_inset Quotes eld
2084 \begin_inset Quotes erd
2087 in red before the actual text of the signature.
2088 This word does not show up in the actual letter, as you will see if you
2089 view/export the file.
2090 It is just there to let you know where the signature goes.
2091 Also, note that it does not matter where in the file the
2096 Remember, LyX is WYSIWYM; you can put the
2100 environment anywhere you want, but LyX knows that in the printout, the
2101 signature should be at the end.
2104 \begin_layout Standard
2105 A template is just a regular LyX file.
2106 This means you can fill in your address and signature and save the file
2108 From now on, any time you want to write a letter, you can use the new template
2110 We do not have to suggest an actual
2111 \begin_inset Quotes eld
2115 \begin_inset Quotes erd
2118 here; just write a letter to someone!
2122 \begin_layout Plain Layout
2123 One warning, if you are writing from a template.
2124 If you erase all of the text in an environment — for example, if you erase
2128 \begin_inset space ~
2133 field so that you can replace it with your own — and then you move the
2134 cursor without writing any text, the environment may disappear.
2135 This is because most environments cannot exist without any text in them.
2136 Just reselect the environment from the
2148 \begin_layout Standard
2149 Templates can be a huge time-saver, and we urge you to use them whenever
2151 In addition, they can help a person learn how to use some of the fancier
2153 Finally, they may be useful for a person who is configuring LyX for a bunch
2154 of less computer-aware users.
2155 When they are first learning LyX, it will be less intimidating if they
2156 have a letter template customized for their company, for example.
2159 \begin_layout Section
2163 \begin_layout Standard
2164 LyX (like LaTeX) considers the title — which may contain the actual title,
2165 the author, the date, and even an abstract of a paper — to be a separate
2166 part of the document.
2169 \begin_layout Standard
2170 Go back to your first LyX document and make sure it is using the
2178 \begin_layout Plain Layout
2179 You should not be using the letter any more, since the
2183 document class does not allow titles.
2188 Type a title on the first line, and change the line to the
2193 On the next line, type your name and change it to the
2198 On the next line, write the date in the
2203 Type a paragraph or two summarizing your document using the
2208 Notice how the title is presented when it is printed out.
2209 If you change the document format to Book, you will get a separate title
2210 page, like the first page of this tutorial.
2213 \begin_layout Standard
2218 : Fix the title, date, and author in
2223 \begin_layout Section
2224 Labels and Cross-References
2227 \begin_layout Standard
2228 You can label section headings, list items, formulas, footnotes, and floats
2232 \begin_layout Plain Layout
2233 Floats are explained in the
2247 Once you do so, you can refer to the element in other parts of the document,
2248 using cross-references.
2249 You can refer to a section's number, to the page on which the section begins
2251 As with section numbering, LyX also takes care of cross-reference numbering
2253 Automatic management of labels and cross-references is among the most significa
2254 nt advantages of LyX (and LaTeX) over conventional word processors.
2257 \begin_layout Subsection
2261 \begin_layout Standard
2262 Go to our second section, whose title is
2263 \begin_inset Quotes eld
2267 \begin_inset Quotes erd
2271 Click at the end of the section title line, and select
2273 Insert\SpecialChar \menuseparator
2276 or the toolbar button
2283 A dialog asks you for a label name, and gives you a suggestion.
2288 , the label name will be placed in a box next to the section title.
2291 \begin_layout Standard
2292 So far you have not done anything — the output will look exactly the same,
2293 since labels do not show up in the printed document.
2294 However, now that you have added a label, you can refer to that label with
2296 We will do that next.
2299 \begin_layout Subsection
2300 Your first cross-reference
2303 \begin_layout Standard
2304 Place the cursor somewhere in Section
2305 \begin_inset space ~
2312 \begin_layout LyX-Code
2313 If you want to know more about this document, then see
2314 \begin_inset Newline newline
2317 Section, which can be found on page.
2320 \begin_layout Standard
2321 Now, with the cursor after the word
2322 \begin_inset Quotes eld
2326 \begin_inset Quotes erd
2331 Insert\SpecialChar \menuseparator
2333 \begin_inset space ~
2338 or the toolbar button
2341 arg "dialog-show-new-inset ref"
2345 The Cross-reference dialog pops up.
2346 It shows a list of the possible labels you can reference.
2347 At the moment, there should be only one,
2348 \begin_inset Quotes eld
2351 sec:About-This-Document
2352 \begin_inset Quotes erd
2356 First, select the drop-down menu labeled
2357 \begin_inset Quotes eld
2361 \begin_inset Quotes erd
2365 \begin_inset Quotes eld
2368 <reference> on page <page>
2369 \begin_inset Quotes erd
2374 \begin_inset Quotes eld
2377 sec:About-This-Document
2378 \begin_inset Quotes erd
2381 (it may be selected by default), and a reference marker will appear containing
2383 \begin_inset Quotes eld
2386 Ref+Text: sec:About-This-Document
2387 \begin_inset Quotes erd
2390 (To be really correct, you should put a
2393 \begin_inset space ~
2401 arg "command-alternatives space-insert protected ; math-space"
2404 ) in between the word
2405 \begin_inset Quotes eld
2409 \begin_inset Quotes erd
2412 and the reference.) An alternative way to reference a label is to right-click
2413 the label and select
2417 in the pop-up context menu.
2418 The cross-reference to this label is now in the clipboard and can be copied
2419 to the actual cursor position via the menu
2421 Edit\SpecialChar \menuseparator
2431 In the printed document, this reference marker will be replaced with the
2432 section number and then the page number.
2433 Preview your document and you will see that LaTeX has been even cleverer
2436 \begin_inset Quotes eld
2440 \begin_inset Quotes erd
2443 and depending how much text you have between the start of Section
2444 \begin_inset space ~
2447 2 and this cross-reference you may see
2448 \begin_inset Quotes eld
2452 \begin_inset Quotes erd
2456 \begin_inset Quotes eld
2459 on the previous page
2460 \begin_inset Quotes erd
2464 \begin_inset Quotes eld
2468 \begin_inset Quotes erd
2475 is the page number).
2478 \begin_layout Standard
2479 Conveniently, a cross-reference acts as a hyperlink when you are editing
2480 a document in LyX; clicking on it will pop up the
2487 \begin_inset space ~
2491 \begin_inset space ~
2496 will move the cursor to the referenced label.
2499 \begin_layout Subsection
2500 More fun with labels
2503 \begin_layout Standard
2504 We told you that LyX takes care of numbering cross-references; now you can
2506 Add a new section before Section
2507 \begin_inset space ~
2511 Update the preview, and — voilà ! — the section cross-reference changed
2513 \begin_inset Quotes eld
2517 \begin_inset Quotes erd
2520 ! Change the section
2521 \begin_inset Quotes eld
2525 \begin_inset Quotes erd
2528 to a subsection, and the cross-reference will reference Subsection
2529 \begin_inset space ~
2532 2.1 instead of Section
2533 \begin_inset space ~
2537 The page reference will not change unless you add a whole page of text
2538 before the label, of course.
2542 \begin_layout Standard
2543 If you want some more practice with labels, then try putting a new label
2544 where your first cross-reference was, and refer to that label from elsewhere
2546 If you will be inserting cross-references often, it may be convenient to
2554 \begin_layout Standard
2555 If you want to confirm that the cross-referencing gets the pages right even
2556 for larger documents,
2560 a couple pages of text from the
2564 to the clipboard, and
2568 them into your document.
2572 \begin_layout Plain Layout
2573 By the way, copying a chapter title may cause an error, because chapters
2574 are not allowed in the article class, see Section
2575 \begin_inset space ~
2579 \begin_inset CommandInset ref
2581 reference "sec:Document-Classes"
2586 If this happens, just delete the chapter title.
2594 \begin_layout Standard
2599 : Fix the references in
2604 \begin_layout Section
2605 Footnotes and Margin Notes
2608 \begin_layout Standard
2609 Footnotes can be added using the toolbar button
2612 arg "footnote-insert"
2617 Insert\SpecialChar \menuseparator
2621 Click at the end of the word
2622 \begin_inset Quotes eld
2626 \begin_inset Quotes erd
2629 somewhere in your document and insert a footnote.
2630 A footnote box appears where you can enter the text of the footnote.
2631 LyX should place the cursor at the beginning of the footnote box.
2635 \begin_layout LyX-Code
2636 LyX is a typesetting word processor.
2639 \begin_layout Standard
2640 Now click on the button labeled
2641 \begin_inset Quotes eld
2645 \begin_inset Quotes erd
2649 The footnote box is closed, leaving the button showing where the footnote
2650 marker will be in the printed text; this is called
2651 \begin_inset Quotes eld
2655 \begin_inset Quotes erd
2659 You can unfold the footnote at any time and re-edit its text by clicking
2661 \begin_inset Quotes eld
2665 \begin_inset Quotes erd
2671 \begin_layout Standard
2672 A footnote can be cut and pasted like normal text.
2673 Go ahead; try it! All you need to do is select the footnote button
2677 \begin_layout Plain Layout
2678 It may be easier to select it using the keyboard.
2679 You might accidentally open the footnote if you are trying to select the
2680 marker itself with the mouse.
2694 In addition, you can change regular text to a footnote, by selecting it
2698 arg "footnote-insert"
2701 button; change a footnote to regular text by hitting the
2705 key when the cursor is in the first position of a footnote, or by hitting
2710 key when the cursor is in the very last position of the footnote.
2713 \begin_layout Standard
2714 Margin notes can be added using the menu
2716 Insert\SpecialChar \menuseparator
2718 \begin_inset space ~
2723 or the toolbar button
2726 arg "marginalnote-insert"
2730 Margin notes are like footnotes, except that:
2733 \begin_layout Itemize
2734 the on-screen boxes say
2735 \begin_inset Quotes eld
2739 \begin_inset Quotes erd
2743 \begin_inset Quotes eld
2747 \begin_inset Quotes erd
2753 \begin_layout Itemize
2754 the notes will be placed in the margin, instead of below the text
2757 \begin_layout Itemize
2758 margin notes are not numbered
2761 \begin_layout Standard
2762 Change your LyX footnote back to text, then select and change it to a margin
2764 Run LaTeX again to see what the margin note looks like.
2767 \begin_layout Standard
2772 : Fix the footnote in
2777 \begin_layout Section
2779 \begin_inset CommandInset label
2781 name "sec:bibliographies"
2788 \begin_layout Standard
2789 Bibliographies are similar to cross-references.
2790 The bibliography contains a list of references at the end of the document,
2791 and they can be referenced from within the document.
2792 Like section titles, LyX and LaTeX make your job easier by automatically
2793 numbering the bibliography items and changing citations when the item numbers
2797 \begin_layout Standard
2798 Go to the end of the document and switch to the
2803 Now, each paragraph you type will be a reference.
2805 \begin_inset Quotes eld
2810 The Lyx Tutorial, by the LyX Documentation Team
2813 \begin_inset Quotes erd
2816 as your first reference.
2817 Note that LyX automatically puts a number in a box before each reference.
2818 Click on the boxed reference number, and the
2821 \begin_inset space ~
2831 is to refer to this reference within the LyX document, the
2840 is set (default), you will see the number of the bibliography in the output.
2846 \begin_inset Quotes eld
2850 \begin_inset Quotes erd
2853 to make it easy to remember.
2856 \begin_layout Standard
2857 Now pick somewhere in your document that you would like to insert a reference.
2860 Insert\SpecialChar \menuseparator
2863 or the toolbar button
2866 arg "dialog-show-new-inset citation"
2875 The left panel in this dialog lists all the bibliography entries, and this
2876 field allows you to choose which bibliography item you want to cite.
2878 \begin_inset Quotes eld
2882 \begin_inset Quotes erd
2885 (right now, that is the only item in the bibliography), then use the
2889 button in the center to insert it.
2890 (You can have multiple citations in the same place by transferring a number
2895 \begin_layout Plain Layout
2896 If one uses label names for references that are easy to remember it is easier
2897 to find the entry in the list of references.
2907 Now preview your file and you will see that the citation appears in brackets
2908 in the text, referring to the bibliography at the end of the document.
2911 \begin_layout Standard
2915 \begin_inset space ~
2924 dialog will put a remark (such as a reference to a page or chapter within
2925 the referenced book or article) in the brackets after the reference.
2926 If you want the references to have labels instead of numbers in the printed
2927 output (for example, some journals would use
2928 \begin_inset Quotes eld
2932 \begin_inset Quotes erd
2935 to refer to a paper written by Smith in 1995), use the
2942 \begin_inset space ~
2955 \begin_layout Standard
2960 Fix the bibliography and citation in
2965 \begin_layout Section
2969 \begin_layout Standard
2970 You may want to put a table of contents at the beginning of your document.
2971 LyX makes this easy to do.
2976 after your document title and before your first section title and select
2979 Insert\SpecialChar \menuseparator
2981 \begin_inset space ~
2985 \begin_inset space ~
2988 TOC\SpecialChar \menuseparator
2990 \begin_inset space ~
2994 \begin_inset space ~
3001 \begin_inset Quotes eld
3005 \begin_inset Quotes erd
3008 will appear in a button on the first line of the document.
3012 \begin_layout Standard
3013 This may not appear to be very useful.
3014 However, if you look at your preview, you will see that a table of contents
3015 has been generated, listing the various sections and subsections in your
3017 As usual, if you reorder sections or create new ones, you will see those
3018 changes in the preview when you update it.
3022 \begin_layout Standard
3023 The table of contents is not printed in the on-screen version of the document.
3024 But you can display the table of contents in a separate window by clicking
3025 on the table of contents button, or by using
3027 View\SpecialChar \menuseparator
3029 \begin_inset space ~
3034 or the toolbar button
3037 arg "dialog-toggle toc"
3041 This menu will work even if you do not have a table of contents inset in
3043 This is a very useful tool for rearranging your document parts.
3044 Clicking on a (sub)section title in the
3048 window will highlight that line and move the display (in the LyX editing
3049 window) to that place in the document.
3050 You can also use the arrow keys to move up and down in the table of contents.
3051 You may therefore find it convenient to leave this window open throughout
3053 You can get similar functionality from the
3057 menu, though, where the table of contents appears automatically.
3060 \begin_layout Standard
3061 To get rid of the Table of Contents, you can delete the table of contents
3062 button just like any other text.
3065 \begin_layout Standard
3070 : Fix the table of contents in
3075 \begin_layout Chapter
3079 \begin_layout Standard
3080 LaTeX is used by many scientists because it outputs great looking equations,
3081 avoiding the control characters used by word processors and their equation
3083 Many of these scientists are frustrated, however, because writing equations
3084 in LaTeX is more like programming than writing.
3085 Happily, LyX has WYSIWYM support for equations.
3086 If you are used to LaTeX, you will find that all of the usual LaTeX math
3087 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3088 If, on the other hand, you have never written in LaTeX, then the
3091 \begin_inset space ~
3096 will allow you to write professional-looking math quickly and easily.
3099 \begin_layout Section
3103 \begin_layout Standard
3104 Somewhere in your LyX document, type:
3107 \begin_layout LyX-Code
3108 I like what Einstein said, E=mc^2, because it is so simple.
3112 \begin_layout Standard
3113 Now, that equation does not look very good in LyX and in the output; there
3114 is no space between the letters and the equals sign, and you would like
3115 to write an actual superscript for the
3116 \begin_inset Quotes eld
3120 \begin_inset Quotes erd
3124 That bad typesetting happened because we did not tell LyX that we were
3125 writing a mathematical expression, so it typeset the equation like regular
3129 \begin_layout Standard
3130 But we can create a formula that will be typeset properly.
3131 Highlight the equation and click the toolbar button
3139 Insert\SpecialChar \menuseparator
3140 Math\SpecialChar \menuseparator
3142 \begin_inset space ~
3148 If nothing is highlighted LyX inserts a little blue square, which is an
3150 The expression appears in blue and the blue square disappears as soon as
3151 the formula is not empty.
3156 to leave the equation.
3157 The purple markers disappear, leaving the cursor to the right of the expression.
3158 Now, if you type something, it will be regular text.
3161 \begin_layout Standard
3162 Looking at the output you will notice that the expression was typeset nicely,
3163 with spaces between the letters and the equals sign, and a superscript
3165 \begin_inset Quotes eld
3169 \begin_inset Quotes erd
3173 Letters in math mode are assumed to be variables, and come out in italics.
3174 Numbers are just numbers.
3177 \begin_layout Standard
3178 This math editor is another example of the WYSIWYM philosophy.
3179 In LaTeX, you write a mathematical expression using text and commands like
3186 ; this can be frustrating, because you cannot see what an expression looks
3187 like until you run the file under LaTeX and you may have to spend time,
3188 for example, finding missing brackets.
3189 LyX does not attempt to get the expression to look perfect (WYSIWYG), but
3190 it gives you an extremely good idea of what the expression will look like.
3191 LaTeX then takes care of the professional typesetting.
3194 \begin_layout Section
3195 Navigating an Equation
3198 \begin_layout Standard
3200 \begin_inset Formula $E=mc^{2}$
3204 \begin_inset Formula $E=1+mc^{2}$
3208 Use the arrow keys to move the cursor into the expression.
3209 Note that when you enter the expression, the purple markers appear to let
3210 you know you are editing math.
3219 to move the cursor past the equals sign, and just type
3220 \begin_inset Quotes eld
3224 \begin_inset Quotes erd
3228 Again, you can use the arrow keys or
3232 to leave the formula\SpecialChar \@.
3236 \begin_layout Standard
3237 Other than the special keys described below, typing in math mode is like
3238 editing regular text.
3248 Select text either with the arrow keys or with the mouse.
3251 Edit\SpecialChar \menuseparator
3254 works in math mode as well as cut and paste.
3255 One thing to be careful of: if you are left or right outside a formula
3264 respectively, you delete the whole formula.
3265 Luckily, you can just use
3272 \begin_layout Standard
3273 What if you want to change
3274 \begin_inset Formula $E=mc^{2}$
3278 \begin_inset Formula $E=mc^{2.5}+1$
3281 ? Again, you can use the mouse to click in the right place.
3282 However, you can also use the arrow keys.
3283 If the cursor is just after the
3284 \begin_inset Quotes eld
3288 \begin_inset Quotes erd
3292 \begin_inset Quotes eld
3296 \begin_inset Quotes erd
3303 and the cursor is moved to the level of the superscript, just before the
3305 \begin_inset Quotes eld
3309 \begin_inset Quotes erd
3314 \begin_inset Quotes eld
3318 \begin_inset Quotes erd
3326 will move the cursor back to the regular level.
3335 , the cursor will be placed
3339 the superscript (so that you can then type the
3340 \begin_inset Quotes eld
3344 \begin_inset Quotes erd
3350 \begin_layout Section
3351 Exponents and Indices
3354 \begin_layout Standard
3355 An exponent can be entered from the
3358 \begin_inset space ~
3363 (see below), but it is actually simpler just to type the caret key,
3364 \begin_inset Quotes eld
3368 \begin_inset Quotes erd
3372 LyX will place another blue rectangle in the superscript, so that whatever
3373 you write next will be superscripted, and in a smaller font size.
3374 Everything you type until you hit a
3382 to exit the formula entirely) will be in the superscript.
3385 \begin_layout Standard
3386 Writing a subscript (index) is just as easy; start one by typing the underscore
3388 \begin_inset Quotes eld
3392 \begin_inset Quotes erd
3396 You can subscript and superscript both subscripts and superscripts like
3398 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3405 \begin_layout Standard
3417 \begin_layout Section
3421 \begin_layout Standard
3425 \begin_inset space ~
3430 is a convenient way to enter symbols and/or to perform complicated formula
3432 Many of these operations can be accomplished from the keyboard or the
3434 Insert\SpecialChar \menuseparator
3439 Edit\SpecialChar \menuseparator
3442 menus (the latter only appears when you are in Math mode).
3443 However, we are going to concentrate on using the
3446 \begin_inset space ~
3451 , just to let you know what is out there; you can learn keyboard shortcuts
3452 and commands later from the
3459 \begin_layout Standard
3463 \begin_inset space ~
3468 is shown when the cursor is in a formula and can also be turned on manually
3471 View\SpecialChar \menuseparator
3475 When you click there on
3476 \begin_inset Quotes eld
3480 \begin_inset Quotes erd
3486 arg "toolbar-toggle math"
3489 ) the toolbar will be shown permanently at the bottom; this state is visualized
3494 menu with a checkmark.
3495 When you click in this state again on
3496 \begin_inset Quotes eld
3500 \begin_inset Quotes erd
3510 \begin_inset space ~
3515 is only shown when the cursor is within a formula; this state is visualized
3516 by the renaming of the menu entry from
3517 \begin_inset Quotes eld
3521 \begin_inset Quotes erd
3525 \begin_inset Quotes eld
3529 \begin_inset space ~
3533 \begin_inset Quotes erd
3539 \begin_layout Subsection
3543 \begin_layout Standard
3547 \begin_inset space ~
3552 allows you to choose from a large array of symbols used in math: operators,
3553 arrows, relationships, delimiters, special characters, sums and integrals.
3554 Note that subscripting and superscripting allow you to put lower and upper
3555 limits on sums and integrals.
3558 \begin_layout Subsection
3559 Roots, decorations, and delimiters
3562 \begin_layout Standard
3563 To type a square root, just click on the button
3566 arg "math-insert \\sqrt"
3570 The square root appears, and the cursor is in a new insertion point inside
3572 You can type variables, numbers, other square roots, fractions, whatever
3574 LyX will automatically resize the square root to fit what is inside.
3577 \begin_layout Standard
3579 \begin_inset Quotes eld
3583 \begin_inset Quotes erd
3587 \begin_inset Formula $\overrightarrow{a}$
3590 ) or group of characters (
3591 \begin_inset Formula $\overrightarrow{a+b}$
3594 ) is done similarly.
3595 Decorations are available from the toolbar via the button
3598 arg "math-insert \\hat"
3602 Click on a decoration, and LyX will insert that decoration with an insertion
3603 point under (or over) it.
3604 Just type what you want in the insertion point.
3605 There are two sets of decorations: those that resize with the text you
3606 type, and those that have a fixed size, and are most appropriate for a
3611 \begin_layout Standard
3612 Delimiters such as parentheses, brackets, and braces work similarly, but
3613 are a bit more complicated.
3614 Hit the delimiter button
3617 arg "dialog-show mathdelimiter"
3625 Your current selection of delimiters is displayed in a box.
3626 It is a pair of parentheses by default, but you can choose a pair of braces,
3627 a brace and a parenthesis, or choose the empty square to have something
3629 \begin_inset Quotes eld
3633 \begin_inset Formula $a=\left\langle 7\right.$
3637 \begin_inset Quotes erd
3640 (the empty delimiter is displayed as a broken line in LyX, but will not
3641 show up in the output).
3644 \begin_layout Standard
3645 If you are lazy, you can type actual parentheses in math mode, rather than
3651 However, those parentheses will be the same size as regular text, which
3652 will look bad if you have a big fraction or matrix inside the parentheses.
3653 So it is better to use one of the three delimiter buttons that insert them
3654 directly, for example
3657 arg "math-delim ( )"
3663 \begin_layout Standard
3664 You can also put delimiters or a square root sign or a decoration on already
3665 existing formula parts.
3666 Select the portion of the formula that you want to adjust, and then click
3667 on the button you want from the
3670 \begin_inset space ~
3676 Try using this to change Newton's second law from scalar to vector form
3678 \begin_inset Formula $f=ma$
3682 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3686 Once you have learned about matrices, this is how you will put parentheses
3687 or brackets around them.
3690 \begin_layout Subsection
3694 \begin_layout Standard
3695 To create a fraction, click on the fraction button
3698 arg "math-insert \\frac-square"
3704 \begin_inset space ~
3710 LyX writes two insertion points in a fraction.
3711 As you would expect, you can use arrow keys or the mouse to move around
3713 Click on the top square and type
3714 \begin_inset Quotes eld
3718 \begin_inset Quotes erd
3727 \begin_inset Quotes eld
3731 \begin_inset Quotes erd
3735 You have made a fraction! Of course you can type anything within each of
3736 the two boxes: variables with exponents, square roots, other fractions,
3741 \begin_layout Standard
3753 \begin_layout Subsection
3754 Functions: lim, log, sin and others
3757 \begin_layout Standard
3758 Because letters in math mode are considered to be variables, if you type
3760 \begin_inset Quotes eld
3764 \begin_inset Quotes erd
3767 in math mode, LyX thinks you are typing the product of the three variables
3769 \begin_inset Formula $s$
3773 \begin_inset Formula $i$
3777 \begin_inset Formula $n$
3781 The three letters will be typeset in italics, when what you really wanted
3783 \begin_inset Quotes eld
3787 \begin_inset Quotes erd
3791 In addition, LyX will not put a space between the word
3792 \begin_inset Quotes eld
3796 \begin_inset Quotes erd
3800 \begin_inset Quotes eld
3804 \begin_inset Quotes erd
3811 will exit the formula).
3813 \begin_inset Quotes eld
3817 \begin_inset Formula $\sin(x)$
3821 \begin_inset Quotes erd
3825 \begin_inset Quotes eld
3829 \begin_inset Formula $sin(x)$
3833 \begin_inset Quotes erd
3839 \begin_layout Standard
3843 \begin_inset space ~
3851 arg "math-insert \\functions"
3855 \begin_inset Quotes eld
3859 \begin_inset Quotes erd
3862 in the pop-up function list.
3864 \begin_inset Quotes eld
3868 \begin_inset Quotes erd
3871 is displayed in LyX in black, and set in upright roman type.
3872 The whole word is treated as one symbol, so if you type
3876 , it will delete the whole word.
3878 \begin_inset Quotes eld
3882 \begin_inset Quotes erd
3885 , which will be written in blue italics, like you expect in a formula.
3886 In the output, the expression will be correctly typeset.
3890 \begin_layout Standard
3891 The function list includes other trigonometric functions and their inverses,
3892 hyperbolic functions, logarithms, limits, and quite a few others.
3893 These functions can take subscripts and superscripts, important for typing
3895 \begin_inset Quotes eld
3899 \begin_inset Formula $\cos^{2}\theta$
3903 \begin_inset Quotes erd
3907 \begin_inset Quotes eld
3911 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3915 \begin_inset Quotes erd
3921 \begin_layout Standard
3933 \begin_layout Subsection
3937 \begin_layout Standard
3938 Click on the matrix button
3941 arg "dialog-show mathmatrix"
3947 \begin_inset space ~
3953 A pop-up dialog allows you to choose how many rows and columns you want
3955 Choose 2 rows and 3 columns and hit
3960 LyX prints 6 insertion points in a
3961 \begin_inset Formula $2\times3$
3965 As usual, you can put any sort of formula expression (a square root, another
3966 matrix, etc.) in each insertion point.
3967 You can also leave some of the insertion points empty if you want.
3970 \begin_layout Standard
3975 can be used to move horizontally between the columns of a matrix.
3976 Alternatively, you can use the arrow keys to move around - hitting
3980 at the end of one box will move to the next box,
3984 will move to the next row, etc.
3987 \begin_layout Standard
3988 If you need to change the number of rows and columns, use the menu
3990 Edit\SpecialChar \menuseparator
3992 \begin_inset space \thinspace{}
3996 \begin_inset space \thinspace{}
4001 or the math toolbar buttons
4004 arg "inset-modify tabular append-row"
4010 arg "inset-modify tabular delete-row"
4016 arg "inset-modify tabular append-column"
4022 arg "inset-modify tabular delete-column"
4028 \begin_layout Standard
4033 for information on how to change the horizontal alignment of each column,
4034 and how to change the vertical position of the whole matrix.
4035 Note that if you want to write a table containing text, you should use
4036 LyX's wonderful table support, rather than trying to write text in a matrix.
4039 \begin_layout Subsection
4043 \begin_layout Standard
4044 All of the expressions we have written so far have been on the same line
4045 as the text that came before and after them, otherwise known as inline
4047 This is fine for short, simple expressions, but if you want to write larger
4048 ones, or if you want your expressions to stand out from the text, you need
4049 to write them in display mode.
4050 In addition, only displayed expressions can be labeled and numbered (see
4055 ), and multi-line equations must be in display mode.
4058 \begin_layout Standard
4059 While being in a formula, click on the display button
4068 \begin_inset space ~
4074 This centers the formula and adds a blank line before and after it.
4075 Now type in an expression and compile your file to see how it looks.
4076 The display button is actually a toggle; use it now to change a couple
4077 of your expressions to display mode and back.
4081 \begin_layout Standard
4082 Display mode has a couple differences from inline mode:
4085 \begin_layout Itemize
4086 The default font is larger for a few symbols, like
4087 \begin_inset Formula $\sum$
4091 \begin_inset Formula $\int$
4097 \begin_layout Itemize
4098 Subscripts and superscripts for limits and sums (but not integrals) are
4099 written under and over rather than next to the symbols
4102 \begin_layout Itemize
4106 \begin_layout Standard
4107 Other than these differences, though, displayed expressions and inline expressio
4108 ns are very similar.
4111 \begin_layout Standard
4112 One final note about the way displayed formulas are typeset: be careful
4113 about whether you are putting your equation into a new paragraph or not.
4114 If your formula is in the middle of a sentence or paragraph, then do not
4120 Doing so will cause the text
4124 the formula to start a new paragraph.
4125 That text will be indented or follow a blank line, depending on your document
4126 paragraph settings, which is probably not what you want.
4129 \begin_layout Standard
4134 : Put the various equations in
4138 into display mode, and see how they are typeset differently.
4141 \begin_layout Standard
4146 : Using various tools you have learned in this section, you should be able
4147 to write an equation like:
4151 \begin_layout Plain Layout
4152 After you have done it the hard way, give
4154 Insert\SpecialChar \menuseparator
4155 Math\SpecialChar \menuseparator
4157 \begin_inset space ~
4168 \begin_inset Formula
4170 f(x)=\left\{ \begin{array}{cc}
4173 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4182 \begin_layout Section
4186 \begin_layout Standard
4187 Now you are familiar with the basics.
4188 LyX's math editor can do a lot more.
4189 You can refer to the
4193 manual for tips on how to:
4196 \begin_layout Itemize
4197 Label and number expressions.
4200 \begin_layout Itemize
4201 Create multi-line equations.
4204 \begin_layout Itemize
4205 Change typefaces, e.
4206 \begin_inset space \thinspace{}
4210 \begin_inset space \space{}
4213 to write bold-face text in an expression.
4216 \begin_layout Itemize
4217 Fine-tune font sizes and spacing within an expression.
4218 (Do not worry about this until your final draft!)
4221 \begin_layout Itemize
4223 These are very powerful, because you just define them once at the top of
4224 the document, and then you can use them throughout the document.
4227 \begin_layout Itemize
4228 Do almost all you can do with math.
4231 \begin_layout Chapter
4235 \begin_layout Section
4236 Other major LyX Features
4239 \begin_layout Standard
4240 We have not gone through all the possible commands in LyX, and we are not
4249 \begin_inset space ~
4254 manual for more information.
4255 We will just mention a couple more major things LyX can do:
4258 \begin_layout Itemize
4259 LyX has WYSIWYM support for tables.
4262 Insert\SpecialChar \menuseparator
4268 arg "tabular-insert"
4272 Click on the table with the
4279 \begin_inset space ~
4284 dialog box which allows extensive table editing.
4288 arg "toolbar-toggle table"
4291 the table toolbar will appear permanently.
4294 \begin_layout Itemize
4295 LyX also supports including pictures in any format within documents.
4298 Insert\SpecialChar \menuseparator
4304 arg "dialog-show-new-inset graphics"
4308 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4309 can have captions, and LyX will automatically generate lists of figures
4313 \begin_layout Itemize
4314 LyX is heavily configurable.
4315 Everything from how the LyX window looks to how the output comes out can
4316 be configured in a number of ways.
4317 Much configuration is done through
4319 Tools\SpecialChar \menuseparator
4323 For more information on this, check out
4325 Help\SpecialChar \menuseparator
4326 Customization\SpecialChar \@.
4330 \begin_layout Itemize
4331 LyX is being developed by a team of programmers on five continents.
4332 Therefore, LyX has better support for non-English languages (such as Dutch,
4333 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4334 ) than many word processors.
4335 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4336 languages Chinese Japanese, and Korean are supported.
4337 You can write documents in other languages and you can also configure LyX
4338 to show its menus and error messages in other languages.
4342 \begin_layout Itemize
4343 The LyX menus feature keybindings.
4344 This means that you can do
4346 File\SpecialChar \menuseparator
4357 or by using the binding which is shown next to it in the menu (
4364 Keybindings are also configurable.
4365 For information on this, check out
4367 Help\SpecialChar \menuseparator
4368 Customization\SpecialChar \@.
4372 \begin_layout Itemize
4373 LyX can read LaTeX documents.
4375 \begin_inset space ~
4379 \begin_inset CommandInset ref
4381 reference "sec:tex2lyx"
4388 \begin_layout Itemize
4389 Spell-checking, thesaurus, and word count facilities are available.
4392 \begin_layout Itemize
4393 Generation of indexes and nomenclatures/glossaries is supported.
4396 \begin_layout Section
4398 \begin_inset CommandInset label
4400 name "sec:latexusers"
4407 \begin_layout Standard
4408 If you do not know anything about LaTeX, you do not have to read this section.
4409 Actually, you might want to
4413 about LaTeX, and then read this chapter.
4414 However, some of those who begin to use LyX will be familiar with LaTeX.
4415 If you are such a person, you may be wondering if LyX can really do everything
4417 The short answer is that LyX can do pretty much everything LaTeX can do
4418 in one form or another, and it definitely simplifies most parts of writing
4422 \begin_layout Standard
4423 Because this is just a tutorial, we are only going to mention things that
4424 new LyX users will most likely be interested in.
4425 In the interests of keeping the Tutorial short, we will give only minimal
4430 \begin_inset space ~
4438 \begin_inset space ~
4443 manuals have a great deal of information on differences between LyX and
4444 LaTeX, and how to do various LaTeX tricks in LyX.
4447 \begin_layout Subsection
4451 \begin_layout Standard
4452 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4453 will be displayed in red on the screen.
4454 You can use TeX commands in LyX by choosing
4456 Insert\SpecialChar \menuseparator
4458 \begin_inset space ~
4470 This creates a box where everything within it is passed straight to LaTeX.
4473 \begin_layout Standard
4474 In a math formula, TeX mode is handled a bit differently.
4475 TeX mode is entered there by typing a backslash.
4476 The backslash is not written out, but anything you type afterwards will
4478 You exit TeX mode by typing
4482 or some other non-alphabetic character, like a number, underscore, caret
4484 Once you exit TeX mode, if LyX knows the TeX command you have typed in,
4485 it will convert it to WYSIWYM\SpecialChar \@.
4487 \begin_inset Quotes eld
4497 \begin_inset Quotes erd
4500 in a formula and then press
4504 , LyX will change the red
4505 \begin_inset Quotes eld
4509 \begin_inset Quotes erd
4513 \begin_inset Quotes eld
4517 \begin_inset Formula $\gamma$
4521 \begin_inset Quotes erd
4525 This will work for almost all, non-complicated math macros.
4526 This may be faster than using the
4529 \begin_inset space ~
4534 , and will be especially convenient for experienced LaTeX users.
4537 \begin_layout Standard
4538 As a special case, if you type
4539 \begin_inset Quotes eld
4549 \begin_inset Quotes erd
4552 in a formula, the beginning
4556 ending braces will be inserted in red while the cursor is placed between
4558 This makes it more convenient to type those commands that take an argument.
4561 \begin_layout Standard
4562 LyX cannot do absolutely everything that LaTeX can do.
4563 Some fancy functions are not supported at all, while some work but are
4565 TeX mode allows users to get the full flexibility of LaTeX, while having
4566 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4567 LyX could never support every LaTeX package.
4574 in the preamble (see Section
4575 \begin_inset space ~
4579 \begin_inset CommandInset ref
4581 reference "sec:preamble"
4585 ), you can use any package you want — although you will not have WYSIWYM
4586 support for that package's features.
4589 \begin_layout Subsection
4590 Importing LaTeX Documents —
4595 \begin_inset CommandInset label
4604 \begin_layout Standard
4605 You can import a LaTeX file into LyX by using the
4607 File\SpecialChar \menuseparator
4608 Import\SpecialChar \menuseparator
4610 \begin_inset space ~
4616 This will call the program
4620 which will create a file foo.lyx from the file foo.tex.
4621 LyX will then open that file.
4622 If the translation does not work, you can try calling
4626 from the command line, possibly using fancier options.
4629 \begin_layout Standard
4630 Even when the translation does work,
4634 may not translate everything, though it does handle most legal LaTeX.
4635 It will leave things it does not understand in TeX mode; so, after translating
4640 , you can look for the red text and manually edit it to get it right.
4643 \begin_layout Standard
4648 has its own documentation (manpage), which Unix/Linux users can access
4649 via the console command
4652 \begin_inset space ~
4658 The manpage describes which LaTeX commands and environments are not supported,
4659 what bugs you might run into (and how to get around them), and how to use
4660 the various options.
4663 \begin_layout Standard
4664 It is important to understand that
4668 can only translate files whose document class is
4669 \begin_inset Quotes eld
4673 \begin_inset Quotes erd
4676 to LyX, that is, for which there is a corresponding LyX
4681 If there is no layout file, then you will get an error saying that the
4682 conversion could not be performed.
4683 So, unless you have a layout for the document class of your LaTeX file,
4688 simply will not know how to translate the LaTeX that it finds there into
4689 things LyX understands.
4690 More about layout files and how they are created is explained in detail
4698 \begin_layout Subsection
4699 Converting LyX Documents to LaTeX
4702 \begin_layout Standard
4703 You might wish to convert a LyX Document to a LaTeX file.
4704 For example, a co-worker or co-author who does not have LyX might want
4708 File\SpecialChar \menuseparator
4709 Export\SpecialChar \menuseparator
4713 This will create a file
4721 file you are editing.
4724 \begin_layout Subsection
4728 \begin_layout Subsubsection
4732 \begin_layout Standard
4735 Document\SpecialChar \menuseparator
4738 dialog takes care of the document-wide options, such as changing the document
4739 class, default font size and paper size.
4740 Document class options and also options for LaTeX packages can be entered
4744 \begin_inset space ~
4752 \begin_layout Subsubsection
4753 Other Preamble Matter
4754 \begin_inset CommandInset label
4763 \begin_layout Standard
4764 If you have special commands to put in the preamble of a LaTeX file, you
4765 can use them in a LyX document as well.
4768 Document\SpecialChar \menuseparator
4769 Settings\SpecialChar \menuseparator
4771 \begin_inset space ~
4776 and type in the dialog window (or from the document settings dialog, depending
4778 Anything you type will (as with TeX mode) be sent directly to LaTeX.
4781 \begin_layout Subsection
4785 \begin_layout Standard
4786 LyX has support for BibTeX, which allows you to build databases of bibliographic
4787 al references to be used in multiple documents.
4790 Insert\SpecialChar \menuseparator
4792 \begin_inset space \thinspace{}
4796 \begin_inset space \thinspace{}
4799 TOC\SpecialChar \menuseparator
4801 \begin_inset space ~
4815 field you load BibTeX files, in the
4819 field you can load BibTeX style files.
4822 \begin_layout Standard
4823 After you have done this, you can use citations from any bibliographies
4824 you have included with
4826 Insert\SpecialChar \menuseparator
4830 \begin_inset space ~
4834 \begin_inset CommandInset ref
4836 reference "sec:bibliographies"
4845 dialog will show a list of all the references in your
4852 \begin_layout Section
4856 \begin_layout Standard
4857 Sometimes when you try to view a document, there will be errors, things
4858 that LyX or LaTeX cannot understand.
4859 When this happens, LyX will open a
4862 \begin_inset space ~
4868 Clicking on individual errors in this dialog will take you to the place
4869 in the LyX document where the error occurs and also display the detailed
4870 LaTeX error message.