1 #LyX 2.0 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 % redefine the \LyX macro for PDF bookmarks
34 \def\LyX{\texorpdfstring{%
35 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
38 \use_default_options false
42 \maintain_unincluded_children false
44 \language_package default
49 \font_typewriter default
50 \font_default_family default
51 \use_non_tex_fonts false
58 \default_output_format default
60 \bibtex_command default
61 \index_command default
65 \pdf_title "The LyX Tutorial"
66 \pdf_author "LyX Team"
67 \pdf_subject "LyX-documentation Tutorial"
68 \pdf_keywords "LyX, documentation"
70 \pdf_bookmarksnumbered true
71 \pdf_bookmarksopen true
72 \pdf_bookmarksopenlevel 1
77 \pdf_pdfusetitle false
78 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
88 \paperorientation portrait
97 \paragraph_separation indent
98 \paragraph_indentation default
99 \quotes_language english
102 \paperpagestyle headings
103 \tracking_changes false
104 \output_changes false
107 \html_be_strict false
121 \begin_layout Plain Layout
122 If you have comments or error corrections, please send them to the LyX Documenta
126 \begin_inset CommandInset href
128 target "lyx-docs@lists.lyx.org"
143 \begin_layout Standard
144 \begin_inset CommandInset toc
145 LatexCommand tableofcontents
152 \begin_layout Chapter
156 \begin_layout Section
160 \begin_layout Standard
161 This file is designed for all of you who have never heard of LaTeX, or do
162 not know it very well.
163 Now, do not panic - you will not need to learn LaTeX to use LyX.
164 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
166 There are some things you will need to learn, however, in order to use
170 \begin_layout Standard
171 Some of you probably found your way to this document because you tried to
172 put two spaces after a
173 \begin_inset Quotes eld
177 \begin_inset Quotes erd
180 or tried to put three blank lines between paragraphs.
181 You found out you could not and in fact, you will find out that most of
182 the little tricks you are accustomed to use in other word processors will
184 That is because most word processors you have used before allow you to
185 manually enter all spacings, font changes, and so on.
186 So you end up not only writing a document but typesetting it, too.
187 LyX does the typesetting for you, in a consistent fashion, letting you
188 focus on the important things, like the content of your writing.
191 \begin_layout Standard
192 So read on to learn more about LyX.
193 Reading this tutorial is definitely worth the time.
196 \begin_layout Section
206 \begin_layout Standard
207 Before we get started with this section, we want to make a quick note of
213 uses the notation outlined in the
218 If you came to this manual first, please read the
222 before you continue with the
229 \begin_layout Standard
230 Now that you know which fonts mean what, we want to talk a bit about what
238 \begin_layout Subsection
239 Getting the most out of the Tutorial
242 \begin_layout Standard
243 This tutorial consists of examples and exercises.
244 To get the most out of this document, you should read through the document,
245 typing all the little things we are telling you to type and trying out
246 all of the exercises to see if you get them right.
247 For convenience, you might want to print out the PDF version of this document.
250 \begin_layout Standard
251 If you are familiar with LaTeX, you will probably be able to read the
255 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
256 However, LyX has features you will want to learn about.
257 Even if you do not feel like reading the rest of the
261 , you should definitely check out Section
266 \begin_inset CommandInset ref
268 reference "sec:latexusers"
272 , which is specifically written for experienced LaTeX users.
275 \begin_layout Subsection
283 \begin_layout Itemize
284 Detailed explanations of all of LyX's features.
288 \begin_layout Standard
297 \begin_layout Itemize
298 Detailed explanations of LaTeX.
302 \begin_layout Standard
304 If you want to learn some of the neat tricks you can do with LaTeX in LyX,
305 you can have a look at the
317 \begin_layout Standard
318 It is time to move onwards, time for your first document \SpecialChar \ldots{}
322 \begin_layout Chapter
323 Getting started with LyX
326 \begin_layout Section
327 Your first LyX document
330 \begin_layout Standard
332 You are ready to start writing.
333 Before you do, there are a few things we need to mention, which will hopefully
334 make the Tutorial more instructive and useful.
338 \begin_layout Standard
339 Because there is information we cannot give you in the Tutorial, the
345 thing that you need to do is find the
352 Start up LyX, Choose the
361 You may want to load the
365 as well (if you are not reading it within LyX already).
366 This way, you can read them while you are writing your own file.
370 \begin_layout Plain Layout
371 They can also serve as good examples of how to use the many features of
377 Note that once you have got more than one document open, you can use the
382 menu or the document tabs to switch between them.
385 \begin_layout Standard
386 In this Tutorial, we are going to assume that you have a fully working version
387 of LyX, as well as a LaTeX-distribution, a DVI-, and a PDF-viewer.
388 This should be the case on all major Linux- and BSD-distributions, as well
389 as on Windows, where this is setup by the LyX installers.
392 \begin_layout Standard
393 Finally, we have written a file called
397 to let you practice your LyX skills.
398 Imagine that it was typed by someone who did not know about any of LyX's
400 As you learn new LyX functions, we will suggest that you fix those parts
406 It also contains `subtle' hints about how to fix things.
410 \begin_layout Plain Layout
411 The hints are located in yellow
412 \begin_inset Quotes eld
416 \begin_inset Quotes erd
420 Access the text in a note by clicking on it.
425 If you want to cheat, or check what you have done, there is also a file
430 which contains the same text written and typeset by a LyX master.
433 \begin_layout Standard
434 The example files can be found in the
438 directory of LyX's installation folder.
439 Open the raw document, and use
441 File\SpecialChar \menuseparator
448 to save a copy in your own directory for you to work on.
449 As you fix parts of the raw document, check to see how those changes affect
453 \begin_layout Standard
458 directory contains lots of other examples files.
459 They will show you how to do various fancy things with LyX.
460 After you have read the Tutorial, or when you are confused about how to
461 do something fancy in LyX, take a look at these files.
464 \begin_layout Subsection
465 Typing, Viewing, and Exporting
468 \begin_layout Itemize
471 File\SpecialChar \menuseparator
475 \begin_layout Itemize
476 Type a sentence like:
478 This is my first LyX document!
481 \begin_layout Itemize
482 Save your document with
484 File\SpecialChar \menuseparator
493 \begin_layout Itemize
494 Run LaTeX to create a DVI file, with
496 View\SpecialChar \menuseparator
499 or the toolbar button
500 \begin_inset Graphics
501 filename ../images/buffer-view_dvi.png
507 LyX will open a DVI-viewer program displaying your document as it will
512 \begin_layout Plain Layout
513 You can save time by leaving the DVI-viewer running in the background.
516 View\SpecialChar \menuseparator
517 Update\SpecialChar \menuseparator
520 or the toolbar button
521 \begin_inset Graphics
522 filename ../images/buffer-update_dvi.png
527 and just click on the DVI-viewer window (or unminimize it) after LaTeX
536 \begin_layout Itemize
537 Export the ready to print document with
539 File\SpecialChar \menuseparator
547 \begin_layout Standard
548 Congratulations! You have written your first LyX document.
549 All of the rest is just details, which are covered in the other manuals.
552 \begin_layout Subsection
556 \begin_layout Standard
557 LyX can of course do most of the things you are used to do with a word processor.
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
571 \begin_inset Graphics
572 filename ../images/undo.png
577 ) over and over again.
578 If you undo too much, just select
580 Edit\SpecialChar \menuseparator
584 \begin_inset Graphics
585 filename ../images/redo.png
595 \begin_layout Standard
596 Currently, undo is limited to 100 steps.
600 \begin_layout Description
603 Edit\SpecialChar \menuseparator
607 \begin_inset Graphics
608 filename ../images/cut.png
615 Edit\SpecialChar \menuseparator
619 \begin_inset Graphics
620 filename ../images/copy.png
627 Edit\SpecialChar \menuseparator
631 \begin_inset Graphics
632 filename ../images/paste.png
637 ) to cut, copy, and paste.
638 Or automatically paste selected text (including selections from other programs)
646 \begin_layout Description
649 Edit\SpecialChar \menuseparator
661 \begin_inset Graphics
662 filename ../images/dialog-show_findreplace.png
668 In the dialog, search with the
680 button to replace a word you have found.
684 \begin_layout Plain Layout
685 Close the window when you are done or leave it open if you find it more
687 Most dialog boxes in LyX can operate like this.
688 Just be sure you have the right window focus when you are trying to type
689 in the main LyX window or a LyX dialog.
694 If you like, you can specify whether to make the search case-sensitive,
695 or to search for only complete words; you can also search backwards through
699 \begin_layout Description
708 text (which will by default print characters in italics), set it in
716 (usually small caps, used for people's names), or use your own formatting
719 Edit\SpecialChar \menuseparator
726 dialog (toolbar button
727 \begin_inset Graphics
728 filename ../images/dialog-show_character.png
736 \begin_layout Description
737 Toolbar There are buttons on the toolbar (just below the menus) which allow
738 you to do some of the more popular functions, such as
749 \begin_layout Standard
750 Of course, you have not yet written enough to make most of these functions
752 As you write more, though, try undoing, pasting, etc.
755 \begin_layout Subsection
756 WYSIWYM: Whitespace in LyX
759 \begin_layout Standard
760 One of the hardest things for new users to get used to is the way that LyX
762 As many times as you hit
766 , you will only get one blank line.
767 As many times as you hit
771 , you will only get one space.
772 On a blank line, LyX will not let you type even one space.
777 key will not move you forward one tab stop; in fact there
781 no tab stops! There is no ruler at the top of the page to let you set tabs
785 \begin_layout Standard
786 Many word processors are based on the WYSIWYG principle:
787 \begin_inset Quotes eld
790 What You See Is What You Get.
791 \begin_inset Quotes erd
794 LyX, on the other hand, is based on the principle that
795 \begin_inset Quotes eld
798 What You See Is What You
803 \begin_inset Quotes erd
806 You type what you mean, and LyX will take care of typesetting it for you,
807 so that the output looks nice.
812 grammatically separates paragraphs, and a
816 grammatically separates words, so there is no reason to have several of
821 has no grammatical function at all, so LyX does not support it.
822 Using LyX, you will spend more of your time worrying about the
826 of your document, and less time worrying about the
835 for more information on the WYSIWYM concept.
838 \begin_layout Standard
839 LyX does have (many) ways to fine-tune the formatting of your document.
840 After all, LyX might not typeset
849 has information about all that.
850 It includes horizontal fills and vertical space — which are more powerful
851 and versatile than multiple spaces or blank lines — and ways to change
852 font sizes, character styles, and paragraph alignments by hand.
853 The idea, though, is that you can write your whole document, focusing on
854 content, and just worry about that fine-tuning at the end.
855 With standard word processors, you will be distracted by document formatting
856 throughout the writing process.
859 \begin_layout Section
863 \begin_layout Standard
864 Different parts of a document have different purposes; we call these parts
870 Most of a document is made up of regular text.
871 Section titles (chapter, subsection, etc.) let the reader know that a new
872 topic or subtopic will be discussed.
873 Certain types of documents have special environments.
874 A journal article will have an abstract and a title.
875 A letter will have neither of these, but will probably have an environment
876 that gives the writer's address.
879 \begin_layout Standard
880 Environments are a major part of the
881 \begin_inset Quotes eld
884 What You See Is What You Mean
885 \begin_inset Quotes erd
889 A given environment may require a certain font style, font size, indenting,
890 line spacing, and more.
891 This problem is aggravated, because the exact formatting for a given environmen
892 t may change: one journal may use boldface, 18 point, centered type for
893 section titles while another uses italicized, 15 point, left justified
894 type; different languages may have different standards for indenting; and
895 bibliography formats can vary widely.
896 LyX lets you avoid learning all the different formatting styles.
899 \begin_layout Standard
904 choice box is located on the left end of the toolbar and looks like this:
906 \begin_inset Graphics
907 filename clipart/ToolbarEnvBox.png
914 It indicates in which environment you are currently writing.
915 While you were writing your first document, it said
916 \begin_inset Quotes eld
920 \begin_inset Quotes erd
923 which is the default environment for text.
924 Now you will put a number of environments in your new document so that
925 you can see how they work.
928 \begin_layout Subsection
929 Sections and Subsections
932 \begin_layout Standard
937 on the first line of your LyX file, and select
949 \begin_layout Plain Layout
955 If nothing is selected, LyX changes the paragraph you are currently in
956 to the selected environment.
957 Alternatively, you can change several paragraphs to a different environment
958 by selecting them before picking an environment.
975 , which will be covered below.
976 LyX numbers the section
977 \begin_inset Quotes eld
981 \begin_inset Quotes erd
984 and typesets the section heading (title) in a larger font.
995 \begin_inset Quotes eld
999 \begin_inset Quotes erd
1003 \begin_inset Quotes eld
1007 \begin_inset Quotes erd
1011 Section headings, like most environments, are assumed to end when you type
1017 Type the document introduction:
1020 \begin_layout LyX-Code
1021 This is an introduction to my first LyX document.
1024 \begin_layout Standard
1039 \begin_inset Quotes eld
1043 \begin_inset Quotes erd
1046 and waits for you to type a title.
1048 \begin_inset Quotes eld
1054 \begin_inset space ~
1060 \begin_inset Quotes erd
1063 , and you will see that LyX again sets it as a section title.
1066 \begin_layout Standard
1068 Go to the end of Section
1069 \begin_inset space ~
1073 \begin_inset Quotes eld
1076 my first LyX document
1077 \begin_inset Quotes erd
1094 \begin_inset Quotes eld
1098 \begin_inset Quotes erd
1101 and waits for you to type a title.
1108 \begin_inset space ~
1112 \begin_inset Quotes eld
1116 \begin_inset Quotes erd
1120 \begin_inset space ~
1123 2, has been automatically renumbered to Section
1124 \begin_inset space ~
1127 3! In true WYSIWYM fashion, you just need to identify the text that makes
1128 up the section titles, and LyX takes care of numbering the sections and
1132 \begin_layout Standard
1141 environment, and type the following five lines:
1144 \begin_layout LyX-Code
1145 Sections and subsections are described below.
1148 \begin_layout LyX-Code
1152 \begin_layout LyX-Code
1153 Sections are bigger than subsections.
1156 \begin_layout LyX-Code
1157 Subsection description
1160 \begin_layout LyX-Code
1161 Subsections are smaller than sections.
1164 \begin_layout Standard
1165 Click on the second line and select
1174 LyX numbers the subsection
1175 \begin_inset Quotes eld
1179 \begin_inset Quotes erd
1182 , and typesets it in a font which is bigger than regular text but smaller
1183 than the section title.
1184 Change the fourth line to the
1188 environment as well.
1189 As you probably expected, LyX automatically numbered the section
1190 \begin_inset Quotes eld
1194 \begin_inset Quotes erd
1198 If you put yet another section before Section
1199 \begin_inset space ~
1203 \begin_inset space ~
1206 2 will be renumbered as Section 3, and the subsections will be renumbered
1208 \begin_inset Quotes eld
1212 \begin_inset Quotes erd
1216 \begin_inset Quotes eld
1220 \begin_inset Quotes erd
1227 \begin_layout Standard
1228 Further levels of sectioning include
1241 We will let you play with these on your own.
1242 You may notice that paragraph and subparagraph headings are not numbered
1243 by default, and that subparagraphs are indented; see the
1247 for an explanation and how to change this.
1252 headings are actually the highest level of sectioning, above
1256 s, but you are only allowed to use them in certain types (text classes)
1257 of LyX documents (see Section
1258 \begin_inset space ~
1262 \begin_inset CommandInset ref
1264 reference "sec:Document-Classes"
1272 \begin_layout Standard
1273 Finally, you may want to have sections or subsections that are not numbered.
1274 There are environments for this as well.
1275 If you change one of your section headings to the
1279 environment (you may have to scroll down in the
1283 box to find it), LyX will use the same font size for the heading as it
1284 uses for a regular section, but it will not number that section.
1285 There are corresponding
1286 \begin_inset Quotes eld
1290 \begin_inset Quotes erd
1293 heading environments for
1302 Try changing some of your sections or subsections to the starred environments,
1303 and note how the other section numbers are updated.
1306 \begin_layout Standard
1311 : Fix the section and subsection headings in
1319 \begin_layout Subsection
1323 \begin_layout Standard
1324 LyX has several different environments for typesetting lists.
1325 The various list environments free you from hitting
1329 a million times when writing an outline, or from renumbering a whole list
1330 when you want to add a point in the middle of the list.
1331 Different types of documents logically require different list environments:
1334 \begin_layout Itemize
1335 A slide presentation might use the
1339 environment's bulleted lists to describe different points.
1343 \begin_layout Itemize
1344 An outline would use the
1348 environment's numbered lists (and lettered sublists).
1352 \begin_layout Itemize
1353 A document describing several software packages could use the
1357 environment, where each item in the list begins with a bold-faced word.
1361 \begin_layout Itemize
1366 environment is a variation on the
1373 \begin_layout Standard
1374 Let us write a list of reasons why LyX is better than other word processors.
1375 Somewhere in your document, type:
1378 \begin_layout Standard
1381 LyX is better than other word processors because:
1384 \begin_layout Standard
1400 \begin_inset Quotes eld
1404 \begin_inset Quotes erd
1408 Type in your reasons:
1411 \begin_layout LyX-Code
1412 Typesetting is done for you.
1415 \begin_layout LyX-Code
1419 \begin_layout LyX-Code
1420 Lists are very easy to create!
1423 \begin_layout Standard
1424 List environments, unlike headings, do not end when you type
1429 Instead, LyX assumes you are going on to the next item in the list.
1430 The above will therefore result in a three-item list.
1431 If you want more than one paragraph within one list
1435 , one way is to use the
1438 \begin_inset space ~
1443 , which you get by typing
1448 In order to get out of the list, you need to reselect the
1452 environment (or just use the key binding,
1455 \begin_inset space ~
1463 \begin_layout Standard
1464 You have got a beautiful itemized list.
1465 You might want to run LaTeX to see how the list looks when printed out.
1466 But what if you wanted to number the reasons? Well, just select the whole
1471 \begin_layout Plain Layout
1472 LyX will not let you select the first bullet unless you also select the
1477 the list, which you probably do not want to do.
1478 Similarly, you cannot select the actual number in a numbered section title.
1479 This is on purpose because the bullet or number depends on the document
1480 settings or text position, respectively.
1494 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1498 \begin_layout Standard
1499 While the list is still selected, you can change to the other two list environme
1508 , in order to see what they look like.
1509 For those two environments, each list item is made up of a term, which
1510 is the item's first word, followed by a definition, which is the rest of
1511 the paragraph (until you hit
1515 .) The term is either typeset in boldface (
1520 \begin_inset Quotes eld
1524 \begin_inset Quotes erd
1531 \begin_layout Plain Layout
1532 But a typesetter's tab, which will change to fit the size of the largest
1533 term, not a pathetic, rigid, unchangeable typewriter
1546 ) from the rest of the paragraph.
1547 If you want to have more than one word in the definition, then separate
1551 \begin_inset space ~
1559 \begin_layout Standard
1564 : Typeset the list in
1569 \begin_layout Standard
1570 You can nest lists within each other in all sorts of interesting ways.
1571 An obvious example would be writing outlines.
1572 Numbered and bulleted lists will have different numbering and bulleting
1573 schemes for sublists.
1578 for details on the different sorts of lists and for examples of nestings.
1581 \begin_layout Subsection
1582 Other environments: Verses, Quotations, and more
1585 \begin_layout Standard
1586 There are two environments for setting quotations apart from surrounding
1591 for short quotes and
1604 \begin_layout Plain Layout
1605 used in this Tutorial for the long typing examples
1614 font; this environment is the only place in LyX where you are allowed to
1615 use multiple spaces to allow code indenting.
1616 You can even write poetry using the
1624 to separate stanzas, and
1628 to separate lines within a stanza.
1633 for more complete descriptions of all of the available LyX environments.
1636 \begin_layout Standard
1641 : Correctly typeset the
1650 \begin_inset Newline newline
1658 \begin_layout Chapter
1662 \begin_layout Standard
1663 The previous chapter hopefully allowed you to get used to writing in LyX.
1664 It introduced you to the basic editing operations in LyX, as well as the
1665 powerful method of writing with environments.
1666 Most people who use LyX, though, will want to write documents: papers,
1667 articles, books, manuals, or letters.
1668 This chapter is meant to take you from simply writing text with LyX to
1669 writing a complete document.
1670 It will introduce you to text classes, which allow you to write different
1672 It will then describe many of the additions that turn text into a document,
1673 such as titles, footnotes, cross references, bibliographies, and tables
1677 \begin_layout Section
1679 \begin_inset CommandInset label
1681 name "sec:Document-Classes"
1688 \begin_layout Standard
1689 Different sorts of documents should be typeset differently.
1690 For example, books are generally printed double-sided, while articles are
1692 In addition, many documents contain special environments: letters contain
1693 some environments — such as the sender's address and the signature — which
1694 do not make sense in a book or article.
1703 \begin_layout Plain Layout
1704 for LaTeX users: this is equivalent to the LaTeX document class
1709 takes care of these large scale differences between different sorts of
1711 This Tutorial, for example, was written in the
1716 Document classes are another major part of the WYSIWYM philosophy; they
1717 tell LyX how to typeset the document, so you do not need to know how.
1720 \begin_layout Standard
1721 Your document is probably being written in the
1729 \begin_layout Plain Layout
1730 That is usually the default document class
1735 Try changing to other document classes (using the
1737 Document\SpecialChar \menuseparator
1740 dialog) to see how they are typeset differently.
1741 If you change your document to the
1745 document class and look at the
1749 box, you will see that most of the allowed environments are the same.
1750 However, you can now use the
1755 If you are ever unsure about which environments you can use in a given
1756 document class, just consult the
1763 \begin_layout Standard
1764 Font sizes, one- or two-column printing, and page headings are just some
1765 of the ways journals' typesettings differ from one another.
1766 As the Computer Age continues to mature, journals have begun accepting
1767 electronic submissions, creating LaTeX
1768 \begin_inset Quotes eld
1772 \begin_inset Quotes erd
1775 so that authors can submit correctly typeset articles.
1776 LyX is set up to support this as well.
1777 For example, LyX supports typesetting (and extra environments) for the
1778 American Mathematics Society journals using the
1781 \begin_inset space ~
1789 \begin_layout Standard
1790 Here is a very quick reference to some of the document classes.
1793 Special Document Classes
1799 manual for many more details.
1802 \begin_layout Standard
1804 \begin_inset Tabular
1805 <lyxtabular version="3" rows="7" columns="2">
1806 <features tabularvalignment="middle">
1807 <column alignment="center" valignment="top" width="0pt">
1808 <column alignment="center" valignment="top" width="0pt">
1810 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1813 \begin_layout Plain Layout
1819 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1822 \begin_layout Plain Layout
1830 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1833 \begin_layout Plain Layout
1839 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1842 \begin_layout Plain Layout
1843 one-sided, no chapters
1850 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1853 \begin_layout Plain Layout
1859 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1862 \begin_layout Plain Layout
1863 layout & environments for American Math Society
1870 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1873 \begin_layout Plain Layout
1879 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1882 \begin_layout Plain Layout
1883 longer than article, two-sided
1890 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1893 \begin_layout Plain Layout
1899 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1902 \begin_layout Plain Layout
1903 report + front and back matter
1910 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1913 \begin_layout Plain Layout
1919 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1922 \begin_layout Plain Layout
1930 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1933 \begin_layout Plain Layout
1939 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1942 \begin_layout Plain Layout
1943 lots of extra environments for address, signature\SpecialChar \ldots{}
1957 \begin_layout Section
1958 Templates: Writing a Letter
1961 \begin_layout Standard
1962 One way to write a letter would be to open a new file, and choose a
1968 Document\SpecialChar \menuseparator
1972 While this is the most obvious way to write a letter, it seems like extra
1974 Every time you write a business letter, you want to have your address,
1975 the address to which you are sending it, a body, a signature, etc.
1980 for letters, which contains a sample letter; once you have a template,
1981 you can just replace a couple of parts of the letter with your text each
1982 time you write a letter.
1985 \begin_layout Standard
1986 Open a new file with
1988 File\SpecialChar \menuseparator
1990 \begin_inset space ~
1994 \begin_inset space ~
2005 Save and print the file to see how the various environments are typeset.
2008 \begin_layout Standard
2009 When you look at the
2013 box, you will see several environments, like the
2016 \begin_inset space ~
2021 environment, which do not even exist in most other document classes.
2027 You can play around for a while to figure out how the various environments
2029 You will notice for example that the
2033 environment has the word
2034 \begin_inset Quotes eld
2038 \begin_inset Quotes eld
2041 in red before the actual text of the signature.
2042 This word does not show up in the actual letter, as you will see if you
2043 view/export the file.
2044 It is just there to let you know where the signature goes.
2045 Also, note that it does not matter where in the file the
2050 Remember, LyX is WYSIWYM; you can put the
2054 environment anywhere you want, but LyX knows that in the printout, the
2055 signature should be at the end.
2058 \begin_layout Standard
2059 A template is just a regular LyX file.
2060 This means you can fill in your address and signature and save the file
2062 From now on, any time you want to write a letter, you can use the new template
2064 We do not have to suggest an actual
2065 \begin_inset Quotes eld
2069 \begin_inset Quotes erd
2072 here; just write a letter to someone!
2076 \begin_layout Plain Layout
2077 One warning, if you are writing from a template.
2078 If you erase all of the text in an environment — for example, if you erase
2082 \begin_inset space ~
2087 field so that you can replace it with your own — and then you move the
2088 cursor without writing any text, the environment may disappear.
2089 This is because most environments cannot exist without any text in them.
2090 Just reselect the environment from the
2102 \begin_layout Standard
2103 Templates can be a huge time-saver, and we urge you to use them whenever
2105 In addition, they can help a person learn how to use some of the fancier
2107 Finally, they may be useful for a person who is configuring LyX for a bunch
2108 of less computer-aware users.
2109 When they are first learning LyX, it will be much less intimidating if
2110 they have a letter template customized for their company, for example.
2113 \begin_layout Section
2117 \begin_layout Standard
2118 LyX (like LaTeX) considers the title — which may contain the actual title,
2119 the author, the date, and even an abstract of a paper — to be a separate
2120 part of the document.
2123 \begin_layout Standard
2124 Go back to your LyX document and make sure it is using the
2132 \begin_layout Plain Layout
2133 You should not be using the letter any more, since the
2137 document class does not allow titles.
2142 Type a title on the first line, and change the line to the
2147 On the next line, type your name and change it to the
2152 On the next line, write the date in the
2157 Type a paragraph or two summarizing your document using the
2162 Notice how the title is presented when it is printed out.
2163 If you change the document format to Book, you will get a separate title
2164 page, like the first page of this tutorial.
2167 \begin_layout Standard
2172 : Fix the title, date, and author in
2177 \begin_layout Section
2178 Labels and Cross-References
2181 \begin_layout Standard
2182 You can label section headings, list items, formulas, footnotes, and floats
2186 \begin_layout Plain Layout
2187 Floats are explained in the
2201 Once you do so, you can refer to this section in other parts of the document,
2202 using cross-references.
2203 You can refer either to the section's number, or to the page that the section
2205 As with section numbering, LyX also takes care about cross-reference numbering
2207 Automatic labels and cross-references are among the most significant advantages
2208 of LyX (and LaTeX) over conventional word processors.
2212 \begin_layout Subsection
2216 \begin_layout Standard
2217 Go to our second section, whose title is
2218 \begin_inset Quotes eld
2222 \begin_inset Quotes erd
2226 Click at the end of the section title line, and select
2228 Insert\SpecialChar \menuseparator
2231 or the toolbar button
2232 \begin_inset Graphics
2233 filename ../images/label-insert.png
2240 A dialog asks you for a label name, and gives you a suggestion.
2245 , the label name will be placed in a box next to the section title.
2248 \begin_layout Standard
2249 So far you have not done anything — the DVI output will look exactly the
2250 same, since labels do not show up in the printed document.
2251 However, now that you have added a label, you can refer to that label with
2253 We will do that next.
2256 \begin_layout Subsection
2257 Your first cross-reference
2260 \begin_layout Standard
2261 Place the cursor somewhere in Section
2262 \begin_inset space ~
2269 \begin_layout LyX-Code
2270 If you want to know more about this document, then see
2271 \begin_inset Newline newline
2274 Section, which can be found on page.
2277 \begin_layout Standard
2278 Now — with the cursor after the word
2279 \begin_inset Quotes eld
2283 \begin_inset Quotes erd
2288 Insert\SpecialChar \menuseparator
2290 \begin_inset space ~
2295 or the toolbar button
2296 \begin_inset Graphics
2297 filename ../images/dialog-show-new-inset_ref.png
2304 The Cross-reference dialog pops up.
2305 It shows a list of the possible labels you can reference.
2306 At the moment, there should be only one,
2307 \begin_inset Quotes eld
2310 sec:About-This-Document
2311 \begin_inset Quotes erd
2315 First, select the drop-down menu labeled Format and select
2316 \begin_inset Quotes eld
2319 <reference> on page <page>
2320 \begin_inset Quotes erd
2325 \begin_inset Quotes eld
2328 sec:About-This-Document
2329 \begin_inset Quotes erd
2332 (it may be selected by default), and a reference marker will appear containing
2334 \begin_inset Quotes eld
2337 Ref+Text: sec:About-This-Document
2338 \begin_inset Quotes erd
2341 (To be really correct, you should put a
2344 \begin_inset space ~
2350 \begin_inset Quotes eld
2354 \begin_inset Quotes erd
2358 Alternatively to that method, you can right-click on a label and use in
2359 the appearing context menu
2364 The cross-reference to this label is now in the clipboard and can be copied
2365 to the actual cursor position via the menu
2367 Edit\SpecialChar \menuseparator
2375 In the printed document, this reference marker will be replaced with the
2376 section number and then the page number.
2377 View your document as DVI, and you will see that LaTeX has been even cleverer
2380 \begin_inset Quotes eld
2384 \begin_inset Quotes erd
2387 and depending how much text you have between the start of Section
2388 \begin_inset space ~
2391 2 and this cross-reference you may see
2392 \begin_inset Quotes eld
2396 \begin_inset Quotes erd
2400 \begin_inset Quotes eld
2403 on the previous page
2404 \begin_inset Quotes erd
2408 \begin_inset Quotes eld
2412 \begin_inset Quotes erd
2419 is the page number).
2422 \begin_layout Standard
2423 Conveniently, a cross-reference acts as a hyperlink when you are editing
2424 a document in LyX; clicking on it will pop up the
2431 \begin_inset space ~
2435 \begin_inset space ~
2440 will move the cursor to the referenced label.
2443 \begin_layout Subsection
2444 More fun with labels
2447 \begin_layout Standard
2448 We told you that LyX takes care about numbering cross-references; now you
2450 Add a new section before Section
2451 \begin_inset space ~
2455 Update the DVI view, and — voilà! — the section cross reference changed
2457 \begin_inset Quotes eld
2461 \begin_inset Quotes erd
2464 ! Change the section
2465 \begin_inset Quotes eld
2469 \begin_inset Quotes erd
2472 to a subsection, and the cross-reference will reference Subsection
2473 \begin_inset space ~
2476 2.1 instead of Section
2477 \begin_inset space ~
2481 The page reference will not change unless you add a whole page of text
2482 before the label, of course.
2486 \begin_layout Standard
2487 If you want some more practice with labels, then try putting a new label
2488 where your first cross-reference was, and refer to that label from elsewhere
2490 If you will be inserting cross-references often, it may be convenient to
2498 \begin_layout Standard
2499 If you want to make sure that the cross-referencing gets the pages right
2500 even for larger documents,
2504 a couple pages of text from the
2508 to the clipboard, and
2512 the stolen text into your document.
2516 \begin_layout Plain Layout
2517 By the way, copying a chapter title may cause an error, because chapters
2518 are not allowed in the article class, see Section
2519 \begin_inset space ~
2523 \begin_inset CommandInset ref
2525 reference "sec:Document-Classes"
2530 If this happens, just delete the chapter title.
2538 \begin_layout Standard
2543 : Fix the references in
2548 \begin_layout Section
2549 Footnotes and Margin Notes
2552 \begin_layout Standard
2553 Footnotes can be added using the toolbar button
2554 \begin_inset Graphics
2555 filename ../images/footnote-insert.png
2563 Insert\SpecialChar \menuseparator
2567 Click at the end of the word
2568 \begin_inset Quotes eld
2572 \begin_inset Quotes erd
2575 somewhere in your document and click the
2576 \begin_inset Graphics
2577 filename ../images/footnote-insert.png
2584 A footnote box appears where you can enter the text of the footnote.
2585 LyX should place the cursor at the beginning of the footnote box.
2589 \begin_layout LyX-Code
2590 LyX is a typesetting word processor.
2593 \begin_layout Standard
2594 Now click on the button labeled
2595 \begin_inset Quotes eld
2599 \begin_inset Quotes erd
2603 The footnote box is closed, leaving the button showing where the footnote
2604 marker will be in the printed text; this is called
2605 \begin_inset Quotes eld
2609 \begin_inset Quotes erd
2613 You can unfold the footnote at any time and re-edit its text by clicking
2615 \begin_inset Quotes eld
2619 \begin_inset Quotes erd
2625 \begin_layout Standard
2626 A footnote can be cut and pasted like normal text.
2627 Go ahead; try it! All you need to do is select the footnote button
2631 \begin_layout Plain Layout
2632 It may be easier to select it using the keyboard.
2633 You might accidentally open the footnote if you are trying to select the
2634 marker itself with the mouse.
2648 In addition, you can change regular text to a footnote, by selecting it
2650 \begin_inset Graphics
2651 filename ../images/footnote-insert.png
2657 button; change a footnote to regular text by hitting the
2661 key when the cursor is in the first position of a footnote, or by hitting
2666 key when the cursor is in the very last position of the footnote, respectively.
2669 \begin_layout Standard
2670 Margin notes can be added using the menu
2672 Insert\SpecialChar \menuseparator
2674 \begin_inset space ~
2679 or the toolbar button
2680 \begin_inset Graphics
2681 filename ../images/marginalnote-insert.png
2688 Margin notes are like footnotes, except that:
2691 \begin_layout Itemize
2692 the on-screen boxes say
2693 \begin_inset Quotes eld
2697 \begin_inset Quotes erd
2701 \begin_inset Quotes eld
2705 \begin_inset Quotes erd
2711 \begin_layout Itemize
2712 the notes will be placed in the margin, instead of below the text
2715 \begin_layout Itemize
2716 margin notes are not numbered
2719 \begin_layout Standard
2720 Change your LyX footnote back to text, then select and change it to a margin
2722 Run LaTeX again to see what the margin note looks like.
2725 \begin_layout Standard
2730 : Fix the footnote in
2735 \begin_layout Section
2737 \begin_inset CommandInset label
2739 name "sec:bibliographies"
2746 \begin_layout Standard
2747 Bibliographies (at least in the exact sciences) are similar to cross references.
2748 The bibliography contains a list of references at the end of the document,
2749 and they can be referenced from within the document.
2750 Like section titles, LyX and LaTeX make your job easier by automatically
2751 numbering the bibliography items and changing citations when the item numbers
2755 \begin_layout Standard
2756 Go to the end of the document and switch to the
2761 Now, each paragraph you type will be a reference.
2763 \begin_inset Quotes eld
2768 The Lyx Tutorial, by the LyX Documentation Team
2771 \begin_inset Quotes erd
2774 as your first reference.
2775 Note that LyX automatically puts a number in a box before each reference.
2776 Click on the boxed reference number, and the
2779 \begin_inset space ~
2789 is to refer to this reference within the LyX document, the
2798 is set (default), you will see the number of the bibliography in the output.
2804 \begin_inset Quotes eld
2808 \begin_inset Quotes erd
2811 to make it easy to remember.
2814 \begin_layout Standard
2815 Now pick somewhere in your document that you would like to insert a reference.
2818 Insert\SpecialChar \menuseparator
2821 or the toolbar button
2822 \begin_inset Graphics
2823 filename ../images/dialog-show-new-inset_citation.png
2835 The right panel in this dialog lists all the bibliography entries, and
2836 this field allows you to choose which bibliography item you want to cite.
2838 \begin_inset Quotes eld
2842 \begin_inset Quotes erd
2845 (right now, that is the only item in the bibliography), then use the
2849 button in the center to insert it.
2850 (You can have multiple citations in the same place by transferring a number
2851 of keys this way.) Now view your file as DVI, and you will see that the
2852 citation appears in brackets in the text, referring to the bibliography
2853 at the end of the document.
2856 \begin_layout Standard
2860 \begin_inset space ~
2869 dialog will put a remark (such as a reference to a page or chapter within
2870 the referenced book or article) in the brackets after the reference.
2871 If you want the references to have labels instead of numbers in the printed
2872 output (for example, some journals would use
2873 \begin_inset Quotes eld
2877 \begin_inset Quotes erd
2880 to refer to a paper written by Smith in 1995), use the
2887 \begin_inset space ~
2900 \begin_layout Standard
2905 Fix the bibliography and citation in
2910 \begin_layout Section
2914 \begin_layout Standard
2915 You may want to put a table of contents at the beginning of your document.
2916 LyX makes this very easy to do.
2921 after your document title and before your first section title and choose
2924 Insert\SpecialChar \menuseparator
2926 \begin_inset space ~
2930 \begin_inset space ~
2933 TOC\SpecialChar \menuseparator
2935 \begin_inset space ~
2939 \begin_inset space ~
2946 \begin_inset Quotes eld
2950 \begin_inset Quotes erd
2953 will appear in a button on the first line of the document.
2957 \begin_layout Standard
2958 This may not appear to be very useful.
2959 However, if you look at your DVI file, you will see that a table of contents
2960 has been generated, listing the various sections and subsections in your
2962 As usual, if you reorder sections or create new ones, you will see those
2963 changes in the DVI file when you update it.
2967 \begin_layout Standard
2968 The table of contents is not printed in the on-screen version of the document.
2969 But you can display the table of contents in a separate window by clicking
2970 on the table of contents button, or by using
2972 Document\SpecialChar \menuseparator
2975 or the toolbar button
2976 \begin_inset Graphics
2977 filename ../images/dialog-toggle_toc.png
2984 This menu will work even if you do not have a table of contents inset in
2986 This is a very useful tool for moving around your document parts.
2987 Clicking on a (sub)section title in the
2991 window will highlight that line and move the display (in the LyX editing
2992 window) to that place in the document.
2993 You can also use the arrow keys to move up and down in the table of contents.
2994 You may therefore find it convenient to leave this window open throughout
2996 You can get similar functionality from the
3000 menu, though, where the table of contents appears automatically.
3003 \begin_layout Standard
3004 To get rid of the Table of Contents, you can delete the table of contents
3005 button just like any other text.
3008 \begin_layout Standard
3013 : Fix the table of contents in
3018 \begin_layout Chapter
3022 \begin_layout Standard
3023 LaTeX is used by many scientists because it outputs great looking equations,
3024 avoiding the control characters used by word processors and their equation
3026 Many of these scientists are frustrated, however, because writing equations
3027 in LaTeX is more like programming than writing.
3028 Happily, LyX has WYSIWYM support for equations.
3029 If you are used to LaTeX, you will find that all of the usual LaTeX math
3030 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3031 If, on the other hand, you have never written in LaTeX, then the
3034 \begin_inset space ~
3039 will allow you to write professional-looking math quickly and easily.
3042 \begin_layout Section
3046 \begin_layout Standard
3047 Somewhere in your LyX document, type:
3050 \begin_layout LyX-Code
3051 I like what Einstein said, E=mc^2, because it is so simple.
3055 \begin_layout Standard
3056 Now, that equation does not look very good in LyX and in the output; there
3057 is no space between the letters and the equals sign, and you would like
3058 to write an actual superscript for the
3059 \begin_inset Quotes eld
3063 \begin_inset Quotes erd
3067 That bad typesetting happened because we did not tell LyX that we were
3068 writing a mathematical expression, so it typeset the equation like regular
3072 \begin_layout Standard
3073 Instead, we create a formula that will get typeset properly.
3074 In order to create a formula, just click the toolbar button
3075 \begin_inset Graphics
3076 filename ../images/math-mode.png
3084 Insert\SpecialChar \menuseparator
3085 Math\SpecialChar \menuseparator
3087 \begin_inset space ~
3093 LyX will insert a little blue square, which is an empty math formula.
3099 The expression is typed in blue, and the blue square disappears as soon
3100 as the formula is not empty.
3105 to leave the equation The purple markers disappear, leaving the cursor
3106 to the right of the expression, and now if you type something, it will
3110 \begin_layout Standard
3111 Looking at the output you will notice that the expression was typeset nicely,
3112 with spaces between the letters and the equals sign, and a superscript
3114 \begin_inset Quotes eld
3118 \begin_inset Quotes erd
3122 Letters in math mode are assumed to be variables, and come out in italics.
3123 Numbers are just numbers.
3126 \begin_layout Standard
3127 This math editor is another example of the WYSIWYM philosophy.
3128 In LaTeX, you write a mathematical expression using text and commands like
3135 ; this can be frustrating, because you cannot see what an expression looks
3136 like until you run the file under LaTeX and you may have to spend time
3138 \begin_inset space \thinspace{}
3142 \begin_inset space \space{}
3146 LyX does not attempt to get the expression to look perfect (WYSIWYG), but
3147 it gives you an extremely good idea of what the expression will look like.
3148 LaTeX then takes care of the professional typesetting.
3151 \begin_layout Section
3152 Navigating an Equation
3155 \begin_layout Standard
3157 \begin_inset Formula $E=mc^{2}$
3161 \begin_inset Formula $E=1+mc^{2}$
3165 Use the arrow keys to move the cursor into the expression.
3166 Note that when you enter the expression, the purple markers appear to let
3167 you know you are editing math.
3176 to move the cursor past the equals sign, and just type
3177 \begin_inset Quotes eld
3181 \begin_inset Quotes erd
3185 Again, you can use the arrow keys or
3189 to leave the formula\SpecialChar \@.
3193 \begin_layout Standard
3194 Other than the special keys described below, typing in math mode is like
3195 editing regular text.
3205 Select text either with the arrow keys or with the mouse.
3208 Edit\SpecialChar \menuseparator
3211 works in math mode as well as cut and paste.
3212 One thing to be careful of: if you are left or right outside a formula
3221 respectively, you delete the whole formula.
3222 Luckily, you can just use
3229 \begin_layout Standard
3230 What if you want to change
3231 \begin_inset Formula $E=mc^{2}$
3235 \begin_inset Formula $E=mc^{2.5}+1$
3238 ? Again, you can use the mouse to click in the right place.
3239 However, you can also use the arrow keys.
3240 If the cursor is just after the
3241 \begin_inset Quotes eld
3245 \begin_inset Quotes erd
3249 \begin_inset Quotes eld
3253 \begin_inset Quotes erd
3260 and the cursor is moved to the level of the superscript, just before the
3262 \begin_inset Quotes eld
3266 \begin_inset Quotes erd
3271 \begin_inset Quotes eld
3275 \begin_inset Quotes erd
3283 will move the cursor back to the regular level.
3292 , the cursor will be placed
3296 the superscript (so that you can then type the
3297 \begin_inset Quotes eld
3301 \begin_inset Quotes erd
3307 \begin_layout Section
3308 Exponents and Indices
3311 \begin_layout Standard
3312 An exponent can be entered from the
3315 \begin_inset space ~
3320 (see below), but it is actually simpler just to type the caret key,
3321 \begin_inset Quotes eld
3325 \begin_inset Quotes erd
3329 LyX will place another blue rectangle in the superscript, so that whatever
3330 you write next will be superscripted, and in a smaller font size.
3331 Everything you type until you hit a
3339 to exit the formula entirely) will be in the superscript.
3342 \begin_layout Standard
3343 Writing a subscript (index) is just easy; start one by typing the underscore
3345 \begin_inset Quotes eld
3349 \begin_inset Quotes erd
3353 You can subscript and superscript both subscripts and superscripts like
3355 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3362 \begin_layout Standard
3374 \begin_layout Section
3378 \begin_layout Standard
3382 \begin_inset space ~
3387 is a convenient way to enter symbols or to perform complicated formula
3389 Many of these operations can be accomplished from the keyboard or the
3391 Edit\SpecialChar \menuseparator
3396 Insert\SpecialChar \menuseparator
3400 However, we are going to concentrate on using the
3403 \begin_inset space ~
3408 , just to let you know what is out there; you can learn keyboard shortcuts
3409 and commands later from the
3416 \begin_layout Standard
3420 \begin_inset space ~
3425 is shown when the cursor is in a formula and can also be turned on manually
3428 View\SpecialChar \menuseparator
3432 When you click there on
3433 \begin_inset Quotes eld
3437 \begin_inset Quotes erd
3440 the toolbar will be shown permanently at the bottom; this state is visualized
3445 menu with a checkmark.
3446 When you click in this state again on
3447 \begin_inset Quotes eld
3451 \begin_inset Quotes erd
3462 is only shown when the cursor is within a formula; this state is visualized
3463 by the renaming of the menu entry from
3464 \begin_inset Quotes eld
3468 \begin_inset Quotes erd
3472 \begin_inset Quotes eld
3476 \begin_inset space ~
3480 \begin_inset Quotes erd
3486 \begin_layout Subsection
3490 \begin_layout Standard
3494 \begin_inset space ~
3499 allows you to choose from a large array of symbols used in math: operators,
3500 arrows, relationships, delimiters, special characters, sums and integrals.
3501 Note that subscripting and superscripting allow you to put lower and upper
3502 limits on sums and integrals.
3506 \begin_layout Subsection
3507 Square roots, accents, and delimiters
3510 \begin_layout Standard
3511 To type a square root, just click on the button
3512 \begin_inset Graphics
3513 filename ../images/math/sqrt.png
3520 The square root appears, and the cursor is in a new insertion point inside
3522 You can type variables, numbers, other square roots, fractions, whatever
3524 LyX will automatically resize the square root to fit what is inside.
3527 \begin_layout Standard
3528 Accenting a character (
3529 \begin_inset Formula $\overrightarrow{v}$
3532 ) or group of characters (
3533 \begin_inset Formula $\overrightarrow{a+b}$
3536 ) is done the same way.
3537 Decorations are available from the toolbar via the button
3538 \begin_inset Graphics
3539 filename ../images/math/hat.png
3546 Click on a decoration, and LyX will insert that decoration with an insertion
3547 point under (or over) it.
3548 Just type what you want in the insertion point.
3549 There are two sets of decorations: those that resize with the text you
3550 type, and those that have a fixed size, and are most appropriate for a
3555 \begin_layout Standard
3556 Delimiters such as parentheses, brackets, and braces work similarly, but
3557 are a bit more complicated.
3558 Hit the delimiter button
3559 \begin_inset Graphics
3560 filename ../images/dialog-show_mathdelimiter.png
3571 Your current selection of delimiters is displayed in a box.
3572 It is a pair of parentheses by default, but you can choose a pair of braces,
3573 a brace and a parenthesis, or choose the empty square to have something
3575 \begin_inset Quotes eld
3579 \begin_inset Formula $a=\left\langle 7\right.$
3583 \begin_inset Quotes erd
3586 (the empty delimiter is displayed as a broken line in LyX, but will not
3587 show up in the output).
3590 \begin_layout Standard
3591 If you are lazy, you can type actual parentheses in math mode, rather than
3597 However, those parentheses will be the same size as regular text, which
3598 will look bad if you have a big fraction or matrix inside the parentheses.
3599 So it is better in this case to use one of the three delimiter buttons
3600 that insert directly e.
3601 \begin_inset space \thinspace{}
3605 \begin_inset space \space{}
3609 \begin_inset space \thinspace{}
3615 \begin_layout Standard
3616 You can also put delimiters or a square root sign or a decoration on already
3617 existing formula parts.
3618 Select the portion of the formula that you want to adjust, and then click
3619 on the button you want from the
3622 \begin_inset space ~
3628 Try using this to change Newton's second law from scalar to vector form
3630 \begin_inset Formula $f=ma$
3634 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3638 Once you have learned about matrices, this is how you will put parentheses
3639 or brackets around them.
3642 \begin_layout Subsection
3646 \begin_layout Standard
3647 To create a fraction, click on the fraction button
3648 \begin_inset Graphics
3649 filename ../images/math/frac.png
3659 \begin_inset space ~
3665 LyX writes two insertion points in a fraction.
3666 As you would expect, you can use arrow keys or the mouse to move around
3668 Click on the top square and type
3669 \begin_inset Quotes eld
3673 \begin_inset Quotes erd
3682 \begin_inset Quotes eld
3686 \begin_inset Quotes erd
3690 You have made a fraction! Of course you can type anything within each of
3691 the two boxes: variables with exponents, square roots, other fractions,
3696 \begin_layout Standard
3708 \begin_layout Subsection
3709 Functions: lim, log, sin and others
3712 \begin_layout Standard
3713 Because letters in math mode are considered to be variables, if you type
3715 \begin_inset Quotes eld
3719 \begin_inset Quotes erd
3722 in math mode, LyX thinks you are typing the product of the three variables
3724 \begin_inset Formula $s$
3728 \begin_inset Formula $i$
3732 \begin_inset Formula $n$
3736 The three letters will be typeset in italics, when what you really wanted
3738 \begin_inset Quotes eld
3742 \begin_inset Quotes erd
3746 In addition, LyX will not put a space between the word
3747 \begin_inset Quotes eld
3751 \begin_inset Quotes erd
3755 \begin_inset Quotes eld
3759 \begin_inset Quotes erd
3766 will exit the formula).
3768 \begin_inset Quotes eld
3772 \begin_inset Formula $\sin(x)$
3776 \begin_inset Quotes erd
3780 \begin_inset Quotes eld
3784 \begin_inset Formula $sin(x)$
3788 \begin_inset Quotes erd
3794 \begin_layout Standard
3798 \begin_inset space ~
3804 \begin_inset Graphics
3805 filename ../images/math/functions.png
3812 \begin_inset Quotes eld
3816 \begin_inset Quotes erd
3819 in the appearing function list.
3821 \begin_inset Quotes eld
3825 \begin_inset Quotes erd
3828 is displayed in LyX in black, and set in upright roman type.
3829 The whole word is treated as one symbol, so if you type
3833 , it will delete the whole word.
3835 \begin_inset Quotes eld
3839 \begin_inset Quotes erd
3842 , which will be written in blue italics, like you expect in a formula.
3843 In the output, the expression will be correctly typeset.
3847 \begin_layout Standard
3848 The function list includes other trigonometric functions and their inverses,
3849 hyperbolic functions, logarithms, limits, and quite a few others.
3850 These functions can take subscripts and superscripts, important for typing
3852 \begin_inset Quotes eld
3856 \begin_inset Formula $\cos^{2}\theta$
3860 \begin_inset Quotes erd
3864 \begin_inset Quotes eld
3868 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3872 \begin_inset Quotes erd
3878 \begin_layout Standard
3890 \begin_layout Subsection
3894 \begin_layout Standard
3895 Click on the matrix button
3896 \begin_inset Graphics
3897 filename ../images/dialog-show_mathmatrix.png
3906 \begin_inset space ~
3912 The appearing dialog allows you to choose how many rows and columns you
3913 want in your matrix.
3914 Choose 2 rows and 3 columns and hit
3919 LyX prints 6 insertion points in a
3920 \begin_inset Formula $2\times3$
3924 As usual, you can put any sort of formula expression (a square root, another
3925 matrix, etc.) in each insertion point.
3926 You can also leave some of the insertion points empty if you want.
3929 \begin_layout Standard
3934 can be used to move horizontally between the columns of a matrix.
3935 Alternatively, you can use the arrow keys to move around - hitting
3939 at the end of one box will move to the next box,
3943 will move to the next row, etc.
3946 \begin_layout Standard
3947 If you need to change the number of rows and columns, use the menu
3949 Edit\SpecialChar \menuseparator
3951 \begin_inset space \thinspace{}
3955 \begin_inset space \thinspace{}
3960 or the math toolbar buttons
3961 \begin_inset Graphics
3962 filename ../images/tabular-feature_append-row.png
3969 \begin_inset Graphics
3970 filename ../images/tabular-feature_delete-row.png
3977 \begin_inset Graphics
3978 filename ../images/tabular-feature_append-column.png
3985 \begin_inset Graphics
3986 filename ../images/tabular-feature_delete-column.png
3995 \begin_layout Standard
4000 for information on how to change the horizontal alignment of each column,
4001 and how to change the vertical position of the whole matrix.
4002 Note that if you want to write a table containing text, you should use
4003 LyX's wonderful table support, rather than trying to write text in a matrix.
4006 \begin_layout Subsection
4010 \begin_layout Standard
4011 All of the expressions we have written so far have been on the same line
4012 as the text that came before and after them, otherwise known as inline
4014 This is fine for short, simple expressions, but if you want to write larger
4015 ones, or if you want your expressions to stand out from the text, you need
4016 to write them in display mode.
4017 In addition, only displayed expressions can be labeled and numbered (see
4022 ), and multi-line equations must be in display mode.
4025 \begin_layout Standard
4026 While being in a formula, click on the display button
4027 \begin_inset Graphics
4028 filename ../images/math-display.png
4037 \begin_inset space ~
4043 This centers the formula and adds a blank line before and after it.
4044 Now type in an expression and compile your file to see how it looks.
4045 The display button is actually a toggle; use it now to change a couple
4046 of your expressions to display mode and back.
4050 \begin_layout Standard
4051 Display mode has a couple differences from inline mode:
4054 \begin_layout Itemize
4055 The default font is larger for a few symbols, like
4056 \begin_inset Formula $\sum$
4060 \begin_inset Formula $\int$
4066 \begin_layout Itemize
4067 Subscripts and superscripts for limits and sums (but not integrals) are
4068 written under and over rather than next to the symbols
4071 \begin_layout Itemize
4075 \begin_layout Standard
4076 Other than these differences, though, displayed expressions and inline expressio
4077 ns are very similar.
4080 \begin_layout Standard
4081 One final note about the way displayed formulas are typeset: Be careful
4082 about whether you are putting your equation into a new paragraph or not.
4083 If your formula is in the middle of a sentence or paragraph, then do not
4089 Doing so will cause the text
4093 the formula to start a new paragraph.
4094 That text will be indented or follow a blank line, depending on your document
4095 paragraph settings, which is probably not what you want.
4098 \begin_layout Standard
4103 : Put the various equations in
4107 into display mode, and see how they are typeset differently.
4110 \begin_layout Standard
4115 : Using various tools you have learned in this section, you should be able
4116 to write an equation like:
4120 \begin_layout Plain Layout
4121 After you have done it the hard way, give
4123 Insert\SpecialChar \menuseparator
4124 Math\SpecialChar \menuseparator
4126 \begin_inset space ~
4137 \begin_inset Formula
4139 f(x)=\left\{ \begin{array}{cc}
4142 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4151 \begin_layout Section
4155 \begin_layout Standard
4156 LyX's math editor can do a lot more.
4157 Now you are familiar with the basics, you can refer to the
4164 \begin_layout Itemize
4165 Label and number expressions
4168 \begin_layout Itemize
4169 Create multi-line equations
4172 \begin_layout Itemize
4173 Change typefaces, e.
4174 \begin_inset space \thinspace{}
4178 \begin_inset space \space{}
4181 to write bold-face text in an expression.
4184 \begin_layout Itemize
4185 Fine-tune font sizes and spacing within an expression.
4186 (Do not worry about this until your final draft!)
4189 \begin_layout Itemize
4191 These are very powerful, because you just define them once at the top of
4192 the document, and then you can use them throughout the document.
4195 \begin_layout Itemize
4196 Do lots of other things that we have no space for in this Tutorial.
4199 \begin_layout Chapter
4203 \begin_layout Section
4204 Other major LyX Features
4207 \begin_layout Standard
4208 We have not gone through all the possible commands in LyX, and we are not
4217 \begin_inset space ~
4222 manual for more information.
4223 We will just mention a couple more major things LyX can do:
4226 \begin_layout Itemize
4227 LyX has WYSIWYM support for tables.
4230 Insert\SpecialChar \menuseparator
4234 \begin_inset Graphics
4235 filename ../images/tabular-insert.png
4242 Click on the table with the
4249 \begin_inset space ~
4254 dialog box which allows extensive table editing.
4257 \begin_layout Itemize
4258 LyX also supports including pictures in any format within documents.
4261 Insert\SpecialChar \menuseparator
4265 \begin_inset Graphics
4266 filename ../images/dialog-show-new-inset_graphics.png
4273 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4274 can have captions, and LyX will automatically generate lists of figures
4278 \begin_layout Itemize
4279 LyX is heavily configurable.
4280 Everything from how the LyX window looks to how the output comes out can
4281 be configured in a number of ways.
4282 Much configuration is done through
4284 Tools\SpecialChar \menuseparator
4288 For more information on this, check out
4290 Help\SpecialChar \menuseparator
4291 Customization\SpecialChar \@.
4295 \begin_layout Itemize
4296 LyX is being developed by a team of programmers on five continents.
4297 Therefore, LyX has better support for non-English languages (such as Dutch,
4298 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4299 ) than many word processors.
4300 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4301 languages Chinese Japanese, and Korean are supported.
4302 You can write documents in other languages and you can also configure LyX
4303 to show its menus and error messages in other languages.
4307 \begin_layout Itemize
4308 The LyX menus feature keybindings.
4309 This means that you can do
4311 File\SpecialChar \menuseparator
4322 or by using the binding which is shown next to it in the menu (Ctrl+O by
4324 Keybindings are also configurable.
4325 For information on this, check out
4327 Help\SpecialChar \menuseparator
4328 Customization\SpecialChar \@.
4332 \begin_layout Itemize
4333 LyX can read LaTeX documents.
4335 \begin_inset space ~
4339 \begin_inset CommandInset ref
4341 reference "sec:tex2lyx"
4348 \begin_layout Itemize
4349 Spell-checking, thesaurus, and word count facilities are available.
4352 \begin_layout Itemize
4353 Generation of indexes and nomenclatures/glossaries is supported.
4356 \begin_layout Section
4358 \begin_inset CommandInset label
4360 name "sec:latexusers"
4367 \begin_layout Standard
4368 If you do not know anything about LaTeX, you do not have to read this section.
4369 Actually, you might want to
4373 about LaTeX, and then read this chapter.
4374 However, some who begin to use LyX will be familiar with LaTeX.
4375 If you are such a person, you may be wondering if LyX can really do everything
4377 The short answer is that LyX can do pretty much everything LaTeX can do
4378 in one form or another, and it definitely simplifies most parts of writing
4382 \begin_layout Standard
4383 Because this is just a tutorial, we are only going to mention things that
4384 new LyX users will most likely be interested in.
4385 In the interests of keeping the Tutorial short, we will give only minimal
4390 \begin_inset space ~
4398 \begin_inset space ~
4403 manual have a great deal of information on differences between LyX and
4404 LaTeX, and how to do various LaTeX tricks in LyX.
4407 \begin_layout Subsection
4411 \begin_layout Standard
4412 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4413 will be displayed in red on the screen.
4414 You can use TeX commands in LyX by choosing
4416 Insert\SpecialChar \menuseparator
4418 \begin_inset space ~
4424 \begin_inset Graphics
4425 filename ../images/ert-insert.png
4432 This creates a box where everything within it is passed straight to LaTeX.
4435 \begin_layout Standard
4436 In a math formula, TeX mode is handled a bit differently.
4437 TeX mode is there entered by typing a backslash.
4438 The backslash is not written out, but anything you type afterwards will
4440 You exit TeX mode by typing
4444 or some other non-alphabetic character, like a number, underscore, caret,
4446 Once you exit TeX mode, if LyX knows the TeX command you have typed in,
4447 it will convert it to WYSIWYM\SpecialChar \@.
4449 \begin_inset Quotes eld
4459 \begin_inset Quotes erd
4462 in a formula and then press
4466 , LyX will change the red
4467 \begin_inset Quotes eld
4471 \begin_inset Quotes erd
4475 \begin_inset Quotes eld
4479 \begin_inset Formula $\gamma$
4483 \begin_inset Quotes erd
4487 This will work for almost all, non-complicated math macros.
4488 This may be faster than using the
4491 \begin_inset space ~
4496 , and will be especially convenient for experienced LaTeX users.
4499 \begin_layout Standard
4500 As a special case, if you type
4501 \begin_inset Quotes eld
4511 \begin_inset Quotes erd
4514 in a formula, the beginning
4518 ending braces will be inserted in red while the cursor is placed between
4520 This makes it more convenient to type those commands which take an argument.
4523 \begin_layout Standard
4524 LyX cannot do absolutely everything that LaTeX can do.
4525 Some fancy functions are not supported at all, while some work but are
4527 TeX mode allows users to get the full flexibility of LaTeX, while having
4528 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4529 LyX could never support every LaTeX package.
4536 in the preamble (see Section
4537 \begin_inset space ~
4541 \begin_inset CommandInset ref
4543 reference "sec:preamble"
4547 ), you can use any package you want — although you will not have WYSIWYM
4548 support for that package's features.
4551 \begin_layout Subsection
4552 Importing LaTeX Documents —
4557 \begin_inset CommandInset label
4566 \begin_layout Standard
4567 You can import a LaTeX file into LyX by using the
4569 File\SpecialChar \menuseparator
4570 Import\SpecialChar \menuseparator
4572 \begin_inset space ~
4578 This will call the program
4582 which will create a file foo.lyx from the file foo.tex.
4583 LyX will then open that file.
4584 If the translation does not work, you can try calling
4588 from the command line, possibly using fancier options.
4591 \begin_layout Standard
4592 Even when the translation does work,
4596 may not translate everything, though it does handle most legal LaTeX.
4597 It will leave things it does not understand in TeX mode; so, after translating
4602 , you can look for the red text and manually edit it to get it right.
4605 \begin_layout Standard
4610 has its own documentation (manpage), which Unix/Linux users can access
4611 via the console command
4614 \begin_inset space ~
4620 The manpage describes which LaTeX commands and environments are not supported,
4621 what bugs you might run into (and how to get around them), and how to use
4622 the various options.
4625 \begin_layout Standard
4626 It is important to understand that
4630 can only translate files whose document class is
4631 \begin_inset Quotes eld
4635 \begin_inset Quotes erd
4638 to LyX, that is, for which there is a corresponding LyX
4643 If there is no layout file, then you will get an error saying that the
4644 conversion could not be performed.
4645 So, unless you have a layout for the document class of your LaTeX file,
4650 simply will not know how to translate the LaTeX that it finds there into
4651 things LyX understands.
4652 More about layout files and how they are created is explained in detail
4660 \begin_layout Subsection
4661 Converting LyX Documents to LaTeX
4664 \begin_layout Standard
4665 You might wish to convert a LyX Document to a LaTeX file.
4666 For example, a co-worker or co-author who does not have LyX might want
4670 File\SpecialChar \menuseparator
4671 Export\SpecialChar \menuseparator
4675 This will create a file
4683 file you are editing.
4684 LyX always creates temporary LaTeX files when viewing or printing files.
4687 \begin_layout Subsection
4691 \begin_layout Subsubsection
4695 \begin_layout Standard
4698 Document\SpecialChar \menuseparator
4701 dialog takes care of the document-wide options.
4702 You can change there the document class, default font size and paper size.
4703 Document class options but also options for LaTeX packages can be entered
4707 \begin_inset space ~
4715 \begin_layout Subsubsection
4716 Other Preamble Matter
4717 \begin_inset CommandInset label
4726 \begin_layout Standard
4727 If you have special commands to put in the preamble of a LaTeX file, you
4728 can use them in a LyX document as well.
4731 Document\SpecialChar \menuseparator
4732 Settings\SpecialChar \menuseparator
4734 \begin_inset space ~
4739 and type in the dialog window (or from the document settings dialog, depending
4741 Anything you type will (as with TeX mode) be sent directly to LaTeX.
4744 \begin_layout Subsection
4748 \begin_layout Standard
4749 LyX has support for BibTeX, which allows you to build databases of bibliographic
4750 al references to be used in multiple documents.
4753 Insert\SpecialChar \menuseparator
4755 \begin_inset space \thinspace{}
4759 \begin_inset space \thinspace{}
4762 TOC\SpecialChar \menuseparator
4764 \begin_inset space ~
4778 field you load BibTeX files, in the
4782 field you can load BibTeX style files.
4785 \begin_layout Standard
4786 After you have done this, you can use citations from any bibliographies
4787 you are including with
4789 Insert\SpecialChar \menuseparator
4793 \begin_inset space ~
4797 \begin_inset CommandInset ref
4799 reference "sec:bibliographies"
4804 LyX will take care of running BibTeX.
4809 dialog will show a list of all the references in your
4816 \begin_layout Section
4820 \begin_layout Standard
4821 Sometimes when you try to view a document, there will be errors, things
4822 that LyX or LaTeX cannot understand.
4823 When this happens, LyX will open a
4826 \begin_inset space ~
4832 Clicking on individual errors in this dialog will take you to the place
4833 in the LyX document where the error occurs and also display the detailed
4834 LaTeX error message.