1 #LyX 1.5.2svn 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}}
21 {\usepackage[scaled=0.92]{helvet}
23 \usepackage{courier} }
25 % link all cross references and URLs in pdf output
26 \usepackage[colorlinks=true, bookmarks, bookmarksnumbered,
27 bookmarksopen, bookmarksopenlevel=2,
28 linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,
29 pdfpagelayout=OneColumn, pdfnewwindow=true,
30 pdfstartview=XYZ, plainpages=false, pdfpagelabels,
31 pdfauthor={LyX Team}, pdftex,
32 pdftitle={The LyX Tutorial},pdfsubject={LyX-documentation Tutorial},
33 pdfkeywords={LyX, documentation}]{hyperref}
35 \else % if dvi or ps is produced
37 % link all cross references and URLs in dvi output
38 \usepackage[ps2pdf]{hyperref}
40 \fi % end if pdflatex is used
42 % the pages of the TOC are numbered roman
43 % and a pdf-bookmark for the TOC is added
45 \let\myTOC\tableofcontents
46 \renewcommand\tableofcontents{%
47 \pdfbookmark[1]{Contents}{}
50 \pagenumbering{arabic} }
52 % redefine the \LyX macro for PDF bookmarks
53 \def\LyX{\texorpdfstring{%
54 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
61 \font_typewriter default
62 \font_default_family default
68 \paperfontsize default
76 \paperorientation portrait
79 \paragraph_separation indent
81 \quotes_language english
84 \paperpagestyle headings
85 \tracking_changes false
102 \begin_layout Standard
103 Principal maintainer of this file is
108 If you have comments or error corrections, please send them to the LyX
109 Documentation mailing list,
111 lyx-docs@lists.lyx.org
121 \begin_layout Standard
122 \begin_inset LatexCommand tableofcontents
129 \begin_layout Chapter
133 \begin_layout Section
137 \begin_layout Standard
138 This file is designed for all of you who have never heard of LaTeX, or don't
140 Now, don't panic - you won't need to learn LaTeX to use LyX.
141 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
143 There are some things you will need to learn, however, in order to use
147 \begin_layout Standard
148 Some of you probably found your way to this document because you tried to
149 put two spaces after a
150 \begin_inset Quotes eld
154 \begin_inset Quotes erd
157 or tried to put 3 blank lines between paragraphs.
158 After much frustration, you found you couldn't.
159 In fact, you'll find that most of the little tricks you're accustomed to
160 using in other word processors just won't work in LyX.
161 That's because most word processors you've used before allow you to manually
162 enter all spacings, font changes, and so on.
163 So you end up not only writing a document but typesetting it, too.
164 LyX does the typesetting for you, in a consistent fashion, letting you
165 focus on the important things, like the content of your writing.
168 \begin_layout Standard
169 So, bear with us and read on.
170 Reading this tutorial is definitely worth the time.
173 \begin_layout Section
183 \begin_layout Standard
184 Before we get started with this section, we want to make a quick note of
190 uses the notation outlined in the
195 If you came to this manual first, go read the
203 \begin_layout Standard
204 Now that you know which fonts mean what, we want to talk a bit about what
212 \begin_layout Subsection
213 Getting the Most out of the Tutorial
216 \begin_layout Standard
217 This tutorial consists of examples and exercises.
218 To get the most out of this document, you should read through the document,
219 typing all the silly little things we're telling you to type and trying
220 out all of the exercises to see if you get them right.
221 For convenience, you might want to print out the PostScript® version of
225 \begin_layout Standard
226 If you are familiar with LaTeX, you'll probably be able to read the
230 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
231 However, LyX does have idiosyncrasies
235 \begin_layout Standard
236 or, more optimistically,
237 \begin_inset Quotes eld
241 \begin_inset Quotes erd
249 you'll want to learn about.
250 Even if you don't feel like reading the rest of the
254 , you should definitely check out Section\InsetSpace ~
256 \begin_inset LatexCommand ref
257 reference "sec:latexusers"
261 , which is specifically written for experienced LaTeX users.
264 \begin_layout Subsection
272 \begin_layout Itemize
273 Detailed explanations of all of LyX's features.
277 \begin_layout Standard
285 \begin_layout Standard
286 Seriously, though, we're here to get you up and running so that all you
292 If we tried to duplicate all of the information about all of LyX's features
297 would be redundant, too long, and forever out of date.
298 All we do here is introduce things; imagine there is a
299 \begin_inset Quotes eld
307 \begin_inset Quotes erd
310 at the end of every section.
314 \begin_layout Itemize
315 Detailed explanations of LaTeX.
319 \begin_layout Standard
321 If you're really curious about learning some of the neat tricks you can
322 do with LaTeX, you can always go get a LaTeX book.
323 There are several good ones on the market.
324 No need to reinvent the wheel, after all\SpecialChar \ldots{}
329 \begin_layout Standard
330 So, brave soul, it's time to move onwards.
331 Time for your first document \SpecialChar \ldots{}
335 \begin_layout Chapter
336 Getting Started with LyX
339 \begin_layout Section
340 Your First LyX Document
343 \begin_layout Standard
344 \begin_inset LatexCommand label
345 name "sec:first-doc-ex"
350 You're ready to start writing.
351 Before you do, though, there are a few things we need to mention, which
352 will hopefully make the
356 more instructive, useful, and fun.
360 \begin_layout Standard
361 Because there's lots of information that we won't be giving you, the
367 thing that you need to do is find the
372 Luckily, this is very simple.
388 You may want to load the
392 as well (if you're not reading it on screen already).
393 This way, you can read them while you're writing your own file
397 \begin_layout Standard
398 They can also serve as good examples of how to use the many features of
405 Note that once you've got more than one document open, you can use the
413 menu or the document tabs to switch between them.
418 will not cover in detail subjects which are described in the other LyX
420 This may make life a bit harder for you at the beginning, but it will keep
426 It will also get you in the habit of using the other manuals, which ---
427 in the long run --- will save you a lot of time.
430 \begin_layout Standard
435 , we're going to assume that you have a fully working version of LyX, as
440 or some other dvi viewer,
444 or some other way of converting
448 documents to PostScript® documents, and a working printer.
449 This is a lot to assume.
450 If any of this is not true, you (or a friendly system administrator) will
451 need to set up your system.
452 You can find information on setup in other manuals.
455 \begin_layout Standard
456 Finally, we've written a file to let you practice your LyX skills on.
462 Imagine that it was typed by someone who didn't know about any of LyX's
464 As you learn new LyX functions, we'll suggest that you fix those parts
471 \begin_inset Quotes eld
475 \begin_inset Quotes erd
478 hints about how to fix things
482 \begin_layout Standard
483 The hints are located in yellow
484 \begin_inset Quotes eld
488 \begin_inset Quotes erd
492 Access the text in a note by clicking on it.
498 If you want to cheat (or check what you've done), there's also a file called
503 which contains the same text as written and typeset by a LyX master.
506 \begin_layout Standard
507 The example files can be found in the
511 directory, which you can get to by selecting
516 ile\SpecialChar \menuseparator
523 and then clicking on the
531 Open the raw document, and use
536 ile\SpecialChar \menuseparator
544 to save a copy in your own directory for you to work on.
545 As you fix parts of the raw document, check to see how those changes affect
549 \begin_layout Standard
554 directory contains lots of other examples files.
555 They will show you how to do various fancy things with LyX.
556 They are especially useful to display things that (due to length or other
557 reasons) won't fit in the documentation.
562 , or when you're confused about how to do something fancy in LyX, take a
566 \begin_layout Subsection
567 Typing, Viewing, and Printing
570 \begin_layout Itemize
576 ile\SpecialChar \menuseparator
584 \begin_layout Itemize
585 Type a sentence like:
587 This is my first LyX document!
590 \begin_layout Itemize
591 Save your document with
596 ile\SpecialChar \menuseparator
606 \begin_layout Itemize
607 Run LaTeX to create a
616 iew\SpecialChar \menuseparator
624 You may see things being printed in the window you ran the
629 These are messages from LaTeX, which you can ignore for now.
638 viewer), which will pop up a new window displaying what your document will
639 look like when printed.
643 \begin_layout Standard
644 You can save time by leaving
648 running in the background.
654 iew\SpecialChar \menuseparator
659 pdate\SpecialChar \menuseparator
666 and just click on the
670 window (or unminimize it) after LaTeX finishes running.
678 \begin_layout Itemize
684 ile\SpecialChar \menuseparator
697 \begin_layout Standard
698 Congratulations! You've written and printed your first LyX document.
699 All of the rest is just details, which is covered in the rest of the
718 \begin_layout Subsection
722 \begin_layout Standard
723 LyX can of course do most of the things you're used to doing with a word
725 It will word-wrap and indent paragraphs automatically.
726 Here's a quick description of how to do some simple actions.
729 \begin_layout Description
730 Undo LyX has multiple levels of undo, which means you can undo everything
731 you've done since your current editing session started, by selecting
736 dit\SpecialChar \menuseparator
744 If you undo too much, just select
749 dit\SpecialChar \menuseparator
761 \begin_layout Standard
762 Currently, undo is limited to 100 steps.
763 Undo also doesn't work for
767 ; for instance, changes to the document layout.
768 Each of these is really a LyX bug.
772 \begin_layout Description
778 dit\SpecialChar \menuseparator
786 dit\SpecialChar \menuseparator
794 dit\SpecialChar \menuseparator
797 to cut, copy, and paste.
798 Or automatically paste selected text (including selections from other programs)
806 \begin_layout Description
812 dit\SpecialChar \menuseparator
822 In the dialog, search with the
836 button to replace a word you've found
840 \begin_layout Standard
841 Close the window when you're done.
842 Or leave it open if you find it more convenient.
843 Most dialog boxes in LyX --- including the
859 dialogs, as well as the various math dialogs can operate like this.
865 ile\SpecialChar \menuseparator
872 , won't let you type anything in the main LyX window until you actually
874 Just be sure you have the right window focus when you're trying to type
875 in the main LyX window or give a command in some other LyX dialog.
881 If you like, you can specify whether to make the search case-sensitive,
882 or to search for only complete words; you can also search backwards through
886 \begin_layout Description
887 Character\InsetSpace ~
892 text (which will generally put characters in italics), put it in
900 (usually small caps, used for people's names) from the toggle buttons in
906 dit\SpecialChar \menuseparator
917 \begin_layout Description
918 Toolbar There are buttons on the toolbar (just below the menus) which allow
919 you to do some of the more popular functions, such as
930 \begin_layout Standard
931 Of course, you haven't yet written enough to make most of these functions
933 As you write more, though, try undoing, pasting, etc.
936 \begin_layout Subsection
937 WYSIWYM: Whitespace in LyX
940 \begin_layout Standard
941 \begin_inset LatexCommand label
942 name "sec:whitespace"
946 One of the hardest things for new users to get used to is the way that LyX
948 As many times as you hit
952 , you'll only get one blank line.
953 As many times as you hit
957 , you'll only get one space.
958 On a blank line, LyX won't let you type even one space.
963 key won't move you forward one tab stop; in fact there
967 no tab stops! There's no ruler at the top of the page to let you set tabs
971 \begin_layout Standard
972 Many commercial word processors are based on the WYSIWYG principle:
973 \begin_inset Quotes eld
976 What You See Is What You Get.
977 \begin_inset Quotes erd
980 LyX, on the other hand, is based on the principle that
981 \begin_inset Quotes eld
984 What You See Is What You
989 \begin_inset Quotes erd
992 You type what you mean, and LyX will take care of typesetting it for you,
993 so that the output looks nice.
998 grammatically separates paragraphs, and a
1002 grammatically separates words, so there is no reason to have several of
1007 has no grammatical function at all, so LyX does not support it.
1008 Using LyX, you'll spend more of your time worrying about the
1012 of your document, and less time worrying about the
1021 for more information on the WYSIWYM concept.
1024 \begin_layout Standard
1025 LyX does have (many) ways to fine-tune the formatting of your document.
1026 After all, LyX might not typeset
1035 has information about all that.
1040 s and vertical space --- which are more powerful and versatile than multiple
1041 spaces or blank lines --- and ways to change font sizes, character styles,
1042 and paragraph alignments by hand.
1043 The idea, though, is that you can write your whole document, focusing on
1044 content, and just worry about that fine-tuning at the end.
1045 With standard word processors, you'll be distracted by document formatting
1046 throughout the writing process.
1049 \begin_layout Section
1053 \begin_layout Standard
1054 Different parts of a document have different purposes; we call these parts
1060 Most of a document is made up of regular text.
1061 Section (chapter, subsection, etc.) titles let the reader know that a new
1062 topic or subtopic will be discussed.
1063 Certain types of documents have special environments.
1064 A journal article will have an abstract, and a title.
1065 A letter will have neither of these, but will probably have an environment
1066 that gives the writer's address.
1069 \begin_layout Standard
1070 Environments are a major part of the
1071 \begin_inset Quotes eld
1074 What You See Is What You Mean
1075 \begin_inset Quotes erd
1079 A given environment may require a certain font style, font size, indenting,
1080 line spacing, and more.
1081 This problem is aggravated, because the exact formatting for a given environmen
1082 t may change: one journal may use boldface, 18 point, centered type for
1083 section titles while another uses italicized, 15 point, left justified
1084 type; different languages may have different standards for indenting; and
1085 bibliography formats can vary widely.
1086 LyX lets you avoid learning all the different formatting styles.
1089 \begin_layout Standard
1094 box is located on the left end of the toolbar (just under the
1102 It indicates which environment you're currently writing in.
1103 While you were writing your first document, it said
1104 \begin_inset Quotes eld
1108 \begin_inset Quotes erd
1111 which is the default environment for text.
1112 Now you will put a number of environments in your new document so that
1113 you can see how they work.
1114 You'll do so with the
1118 menu, which you open by clicking on the
1119 \begin_inset Quotes eld
1123 \begin_inset Quotes erd
1126 icon just to the right of the
1133 \begin_layout Subsection
1134 Sections and Subsections
1137 \begin_layout Standard
1142 on the first line of your LyX file, and select
1154 \begin_layout Standard
1160 If nothing is selected, LyX changes the paragraph you are currently in
1161 to the selected environment.
1162 Alternatively, you can change several paragraphs to a different environment
1163 by selecting them before picking an environment.
1181 , which will be covered below.
1182 LyX numbers the section
1183 \begin_inset Quotes eld
1187 \begin_inset Quotes erd
1190 and typesets the section heading (title) in a larger font.
1201 \begin_inset Quotes eld
1205 \begin_inset Quotes erd
1209 \begin_inset Quotes eld
1213 \begin_inset Quotes erd
1217 Section headings, like most environments, are assumed to end when you type
1223 Type the document introduction:
1226 \begin_layout LyX-Code
1227 This is an introduction to my first LyX document.
1230 \begin_layout Standard
1245 \begin_inset Quotes eld
1249 \begin_inset Quotes erd
1252 and waits for you to type a title.
1257 , and you'll see that LyX again sets it as a section title.
1260 \begin_layout Standard
1262 Go to the end of Section\InsetSpace ~
1264 \begin_inset Quotes eld
1267 my first LyX document
1268 \begin_inset Quotes erd
1285 \begin_inset Quotes eld
1289 \begin_inset Quotes erd
1292 and waits for you to type a title.
1298 Section\InsetSpace ~
1300 \begin_inset Quotes eld
1304 \begin_inset Quotes erd
1307 , which used to be Section\InsetSpace ~
1308 2, has been automatically renumbered to Section\InsetSpace ~
1310 In true WYSIWYM fashion, you just need to identify the text that makes
1311 up the section titles, and LyX takes care of numbering the sections and
1315 \begin_layout Standard
1324 environment, and type the following five lines:
1327 \begin_layout LyX-Code
1328 Sections and subsections are described below.
1331 \begin_layout LyX-Code
1335 \begin_layout LyX-Code
1336 Sections are bigger than subsections.
1339 \begin_layout LyX-Code
1340 Subsection description
1343 \begin_layout LyX-Code
1344 Subsections are smaller than sections.
1347 \begin_layout Standard
1348 Click on the second line and select
1357 LyX numbers the subsection
1358 \begin_inset Quotes eld
1362 \begin_inset Quotes erd
1365 , and typesets it in a font which is bigger than regular text but smaller
1366 than the section title.
1367 Change the fourth line
1371 environment as well.
1372 As you probably expected, LyX automatically numbered the section
1373 \begin_inset Quotes eld
1377 \begin_inset Quotes erd
1381 If you put yet another section before Section\InsetSpace ~
1382 2, Section\InsetSpace ~
1383 2 will be renumbered
1384 as Section 3, and the subsections will be renumbered to
1385 \begin_inset Quotes eld
1389 \begin_inset Quotes erd
1393 \begin_inset Quotes eld
1397 \begin_inset Quotes erd
1404 \begin_layout Standard
1405 Further levels of sectioning include
1418 We'll let you play with these on your own.
1419 You may notice that paragraph and subparagraph headings are not numbered
1420 by default, and that subparagraphs are indented; see the
1429 headings are actually the highest level of sectioning, above
1433 s, but you're only allowed to use them in certain types (text classes) of
1434 LyX documents (see Section\InsetSpace ~
1436 \begin_inset LatexCommand ref
1437 reference "sec:textclasses"
1445 \begin_layout Standard
1446 Finally, you may want to have sections or subsections that are not numbered.
1447 There are environments for this as well.
1448 If you change one of your section headings to the
1452 environment (you may have to scroll down in the
1456 menu to find it), LyX will use the same font size for the heading as it
1457 uses for a regular section, but it won't number that section.
1458 There are corresponding
1459 \begin_inset Quotes eld
1463 \begin_inset Quotes erd
1466 heading environments for
1475 Try changing some of your sections or subsections to the starred environments,
1476 and note how the other sections' numbers are updated.
1479 \begin_layout Standard
1484 : Fix the section and subsection headings in
1492 \begin_layout Subsection
1496 \begin_layout Standard
1497 LyX has several different environments for typesetting lists.
1498 The various list environments free you from hitting
1502 a million times when writing an outline, or from renumbering a whole list
1503 when you want to add a point in the middle of the list, and lets you concentrat
1504 e on the list content.
1508 \begin_layout Standard
1509 Yes, we're overemphasizing this point throughout the
1518 the main philosophy of LyX, so please forgive us.
1523 Different types of documents logically require different list environments:
1526 \begin_layout Itemize
1527 A slide presentation might use the
1531 environment's bulleted lists to describe different points.
1535 \begin_layout Itemize
1536 An outline would use the
1540 environment's numbered lists (and lettered sublists).
1544 \begin_layout Itemize
1545 A document describing several software packages could use the
1549 environment, where each item in the list begins with a bold-faced word.
1553 \begin_layout Itemize
1558 environment --- not found in LaTeX --- is a slightly different form of
1566 \begin_layout Standard
1567 Let's write a list of reasons why LyX is better than other word processors.
1568 Somewhere in your document, type:
1571 \begin_layout Standard
1574 Lyx is better than other word processors because:
1577 \begin_layout Standard
1593 \begin_inset Quotes eld
1597 \begin_inset Quotes erd
1600 (actually, an asterisk, which will be converted to a round circle on output)
1602 Type in your reasons:
1605 \begin_layout LyX-Code
1606 Typesetting is done for you.
1609 \begin_layout LyX-Code
1613 \begin_layout LyX-Code
1614 Lists are very easy to create!
1617 \begin_layout Standard
1618 List environments, unlike headings, do not end when you type
1623 Instead, LyX assumes you're going on to the next item in the list.
1624 The above will therefore result in a three-item list.
1625 If you want more than one paragraph within one list
1629 , one way is to use the
1631 Protected\InsetSpace ~
1634 , which you get by typing
1639 In order to get out of the list, you need to reselect the
1643 environment (or just use the keybinding,
1651 \begin_layout Standard
1652 You've got a beautiful itemized list.
1653 You might want to run LaTeX to see how the list looks when printed out.
1654 But what if you wanted to number the reasons? Well, just select the whole
1659 \begin_layout Standard
1660 LyX won't let you select the first bullet unless you also select the paragraph
1665 the list, which you probably don't want to do.
1666 Similarly, you can't select the actual number in a numbered section title.
1667 Don't worry about it.
1681 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1685 \begin_layout Standard
1686 While the list is still selected, you can change to the other two list environme
1695 , in order to see what they look like.
1696 For those two environments, each list item is made up of a term, which
1697 is the item's first word, followed by a definition, which is the rest of
1698 the paragraph (until you hit
1702 .) The term is either typeset in boldface (
1707 \begin_inset Quotes eld
1711 \begin_inset Quotes erd
1718 \begin_layout Standard
1719 But a typesetter's tab, which will change to fit the size of the largest
1720 term, not a pathetic, rigid, unchangeable typewriter
1733 ) from the rest of the paragraph.
1734 If you want to have more than one word in the definition, then separate
1737 Protected\InsetSpace ~
1743 \begin_layout Standard
1748 : Typeset the list in
1753 \begin_layout Standard
1754 You can nest lists within each other in all sorts of interesting ways.
1755 An obvious example would be writing outlines.
1756 Numbered and bulleted lists will have different numbering and bulleting
1757 schemes for sublists.
1762 for details on the different sorts of lists, as well as examples which
1770 \begin_layout Subsection
1771 Other Environments: Verses, Quotations, and More
1774 \begin_layout Standard
1775 There are two environments for setting quotations apart from surrounding
1780 for short quotes and
1789 environment, also used in the
1793 for the long typing examples) is written in a
1797 font; this environment is the only place in LyX where you're allowed to
1798 use multiple spaces to allow code indenting.
1799 You can even write poetry using the
1807 to separate stanzas, and
1811 to separate lines within a stanza.
1816 for more complete descriptions of all of the available LyX environments.
1819 \begin_layout Standard
1824 : Correctly typeset the
1836 \begin_layout Standard
1850 \begin_layout Chapter
1854 \begin_layout Standard
1855 The previous chapter hopefully allowed you to get used to writing in LyX.
1856 It introduced you to the basic editing operations in LyX, as well as the
1857 powerful method of writing with environments.
1858 Most people who use LyX, though, will want to write documents: papers,
1859 articles, books, manuals, or letters.
1860 This chapter is meant to take you from simply writing text with LyX to
1861 writing a complete document.
1862 It will introduce you to text classes, which allow you to write different
1864 It will then describe many of the additions that turn text into a document,
1865 such as titles, footnotes, cross references, bibliographies, and tables
1869 \begin_layout Section
1873 \begin_layout Standard
1874 \begin_inset LatexCommand label
1875 name "sec:textclasses"
1879 Different sorts of documents should be typeset differently.
1880 For example, books are generally printed double-sided, while articles are
1882 In addition, many documents contain special environments: letters contain
1883 some environments --- such as the sender's address and the signature ---
1884 which do not make sense in a book or article.
1891 \begin_layout Standard
1892 LaTeX users: this is equivalent to the LaTeX document class
1899 takes care of these large scale differences between different sorts of
1905 , for example, was written in the
1910 Text classes are another major part of the WYSIWYM philosophy; they tell
1911 LyX how to typeset the document, so you don't need to know how.
1914 \begin_layout Standard
1915 Your document is probably being written in the
1923 \begin_layout Standard
1924 That's usually the default text class
1930 Try changing to other text classes (using the
1935 ocument\SpecialChar \menuseparator
1942 dialog) to see how they are typeset differently.
1943 If you change your document to the
1947 text class and look at the
1951 menu, you'll see that most of the allowed environments are the same.
1952 However, you can now use the
1957 If you're ever unsure about which environments you can use in a given text
1958 class, just consult the
1965 \begin_layout Standard
1966 Font sizes, one- or two-column printing, and page headings are just some
1967 of the ways journals' typesettings differ from one another.
1968 As the Computer Age continues to mature, journals have begun accepting
1969 electronic submissions, creating LaTeX
1970 \begin_inset Quotes eld
1974 \begin_inset Quotes erd
1977 so that authors can submit correctly typeset articles.
1978 LyX is set up to support this as well.
1979 For example, LyX supports typesetting (and extra environments) for the
1980 American Mathematics Society journals using the
1982 Article\InsetSpace ~
1988 \begin_layout Standard
1989 Here's a very quick reference to some of the text classes.
1992 Special Document Classes
1998 manual for many more details.
2001 \begin_layout Standard
2003 \begin_inset Tabular
2004 <lyxtabular version="3" rows="7" columns="2">
2006 <column alignment="center" valignment="top" leftline="true" width="0pt">
2007 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
2008 <row topline="true" bottomline="true">
2009 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2012 \begin_layout Standard
2018 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2021 \begin_layout Standard
2028 <row topline="true">
2029 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2032 \begin_layout Standard
2038 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2041 \begin_layout Standard
2042 one-sided, no chapters
2048 <row topline="true">
2049 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2052 \begin_layout Standard
2058 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2061 \begin_layout Standard
2062 layout & environments for American Math Society
2068 <row topline="true">
2069 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2072 \begin_layout Standard
2078 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2081 \begin_layout Standard
2082 longer than article, two-sided
2088 <row topline="true" bottomline="true">
2089 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2092 \begin_layout Standard
2098 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2101 \begin_layout Standard
2102 report + front and back matter
2108 <row bottomline="true">
2109 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2112 \begin_layout Standard
2118 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2121 \begin_layout Standard
2122 transparencies (also including FoilTeX)
2128 <row bottomline="true">
2129 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2132 \begin_layout Standard
2138 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2141 \begin_layout Standard
2142 lots of extra environments for address, signature\SpecialChar \ldots{}
2156 \begin_layout Section
2157 Templates: Writing a Letter
2160 \begin_layout Standard
2161 One of the most popular text classes is
2166 One way to write a letter would be to open a new file, and choose
2175 ocument\SpecialChar \menuseparator
2183 While this is the most obvious way to write a letter, it seems like extra
2185 Every time you write a business letter, you want to have your address,
2186 the address you're sending to, a body, a signature, etc.
2191 for letters, which contains a sample letter; once you have a template,
2192 you can just replace a couple parts of the letter with your text each time
2196 \begin_layout Standard
2197 Open a new file with
2202 ile\SpecialChar \menuseparator
2217 Save and print the file to see how the various environments are typeset.
2220 \begin_layout Standard
2221 When you look at the
2225 menu, you'll see several environments, like the
2230 environment, which don't even exist in most other text classes.
2240 You can play around for a while to figure out how the various environments
2242 You'll notice for example that the
2246 environment has the word
2247 \begin_inset Quotes eld
2251 \begin_inset Quotes eld
2254 in red before the actual text of the signature.
2255 This word doesn't show up in the actual letter, as you'll see if you try
2257 It's just there to let you know where the signature goes.
2258 Also, note that it doesn't matter where in the file the
2263 Remember, LyX is WYSIWYM; you can put the
2267 environment anywhere you want, but LyX knows that in the printout, the
2268 signature should be at the end.
2271 \begin_layout Standard
2272 A template is just a regular LyX file.
2273 This means you can fill in your address and signature and save the file
2275 From now on, any time you want to write a letter, you can use the new template
2277 We probably don't have to suggest an actual
2278 \begin_inset Quotes eld
2282 \begin_inset Quotes erd
2285 here; just write a letter to someone!
2289 \begin_layout Standard
2290 One warning, if you're writing from a template.
2291 If you erase all of the text in an environment --- for example, if you
2297 field so that you can replace it with your own --- and then you move the
2298 cursor without writing any text, the environment may disappear.
2299 This is because most environments cannot exist without any text in them.
2300 Just reselect the environment from the
2304 menu to get it back.
2312 \begin_layout Standard
2313 Templates can be a huge time-saver, and we urge you to use them whenever
2315 In addition, they can help a person learn how to use some of the fancier
2317 Finally, they may be useful for a person who is configuring LyX for a bunch
2318 of less computer-aware users.
2319 When they're first learning LyX, it will be much less intimidating if they
2320 have a letter template customized for their company, for example.
2323 \begin_layout Section
2327 \begin_layout Standard
2328 LyX (like LaTeX) considers the title --- which may contain the actual title,
2329 the author, the date, and even an abstract of a paper --- to be a separate
2330 part of the document.
2333 \begin_layout Standard
2338 document and make sure it's using the
2346 \begin_layout Standard
2347 You should not be using the letter any more, since the
2351 textclass doesn't allow titles.
2356 Type a title on the first line, and change the line to the
2361 On the next line, type your name and change it to the
2366 On the next line, write the date in the
2371 Type a paragraph or two summarizing your document using the
2376 Notice how the title is presented when it's printed out.
2377 If you changed the document format to Book, you'll get a separate title
2378 page, like the first page of this tutorial.
2381 \begin_layout Standard
2386 : Fix the title, date, and author in
2391 \begin_layout Section
2392 Labels and Cross-References
2395 \begin_layout Standard
2396 \begin_inset LatexCommand label
2401 You can label a section (or subsubsection, or, more rarely, just a random
2402 piece of text) in your document.
2403 Once you do so, you can refer to this section in other parts of the document,
2404 using cross-references.
2405 You can refer either to the section's number, or to the page that the section
2407 As with sections and footnotes, LyX worries about the cross-references
2409 Automatic labels and cross-references are one of the best advantages of
2410 LyX (and LaTeX) over conventional word processors.
2413 \begin_layout Subsection*
2417 \begin_layout Standard
2418 Let's mark our second section, whose title is
2419 \begin_inset Quotes eld
2423 \begin_inset Quotes erd
2427 Click at the end of the section title line, and select
2432 nsert\SpecialChar \menuseparator
2440 A dialog asks you for a label name, and gives you a suggestion.
2445 , the label name will be placed in a box next to the section title.
2448 \begin_layout Standard
2449 By the way, you could have put the label right anywhere within the section
2450 as well; section references will refer to the last section or subsection
2451 whose heading comes before the label.
2452 However, putting it on the same line as the section title (or, perhaps,
2453 on the first line of the section's text) ensures that page references will
2454 reference the beginning of the section.
2457 \begin_layout Standard
2458 So far you haven't done anything --- the
2462 file will look exactly the same, since labels don't show up in the printed
2464 However, now that you've added a label, you can refer to that label with
2469 \begin_layout Subsection*
2470 Your first cross-references
2473 \begin_layout Standard
2474 Place the cursor somewhere in Section\InsetSpace ~
2479 \begin_layout LyX-Code
2480 If you want to know more about this document, then see
2486 \begin_layout Standard
2487 Now --- with the cursor after the word
2488 \begin_inset Quotes eld
2492 \begin_inset Quotes erd
2500 nsert\SpecialChar \menuseparator
2514 It shows a list of the possible labels you can reference.
2515 At the moment, there should be only one,
2516 \begin_inset Quotes eld
2520 \begin_inset Quotes erd
2524 Select it (it may be selected by default), and click
2529 Now put the cursor after the word
2530 \begin_inset Quotes eld
2534 \begin_inset Quotes erd
2537 , and change the reference type to use the page number then click
2542 (To be really correct, you should put a
2544 Protected\InsetSpace ~
2548 \begin_inset Quotes eld
2552 \begin_inset Quotes erd
2556 Same for the page reference.)
2559 \begin_layout Standard
2560 LyX puts the references in a box right where the cursor was.
2561 In the printed document, this reference marker will be replaced with either
2562 the page or section number (depending on what you selected in the
2572 iew\SpecialChar \menuseparator
2577 pdate\SpecialChar \menuseparator
2584 , and you'll see that on the last page we refer to
2585 \begin_inset Quotes eld
2588 Section\InsetSpace ~
2590 \begin_inset Quotes erd
2594 \begin_inset Quotes eld
2599 \begin_inset Quotes erd
2602 (or whatever page Section\InsetSpace ~
2606 \begin_layout Standard
2607 Conveniently, a cross-reference acts as a hyperlink when you're editing
2608 a document in LyX; clicking on it will pop up the
2618 will move the cursor to the referenced label.
2621 \begin_layout Subsection*
2622 More fun with labels
2625 \begin_layout Standard
2626 We told you that LyX worries about numbering cross-references; now you can
2628 Add a new section before Section\InsetSpace ~
2630 Now rerun LaTeX, and --- voilà ! --- the section cross reference changed
2632 \begin_inset Quotes eld
2636 \begin_inset Quotes erd
2640 \begin_inset Quotes eld
2644 \begin_inset Quotes erd
2647 to a subsection, and the cross-reference will reference Subsection\InsetSpace ~
2649 of Section\InsetSpace ~
2651 The page reference won't change unless you add a whole page of text before
2652 the label, of course.
2656 \begin_layout Standard
2657 If you want some more practice with labels, then try putting a new label
2658 where your first cross-reference was, and refer to that label from elsewhere
2660 If you'll be inserting cross-references often (if, for example, you're
2661 writing a journal article), it may be convenient to leave the
2668 \begin_layout Standard
2669 If you want to make sure that the cross-referencing gets the pages right
2670 even for larger documents,
2674 a couple pages of text from the
2678 to the clipboard, and
2682 the stolen text into your document
2686 \begin_layout Standard
2687 By the way, copying a chapter title may cause an error, because chapters
2688 aren't allowed in the article class.
2689 If this happens, just delete the chapter title.
2690 If you want to know why this happens, see Section\InsetSpace ~
2692 \begin_inset LatexCommand ref
2693 reference "sec:textclasses"
2706 \begin_layout Standard
2711 : Fix the references in
2716 \begin_layout Section
2717 Footnotes and Margin Notes
2720 \begin_layout Standard
2721 Footnotes can be added using the
2726 button in the toolbar
2730 \begin_layout Standard
2731 The button shows an arrow pointing to red text, which is just below some
2742 nsert\SpecialChar \menuseparator
2750 Click at the end of the word
2751 \begin_inset Quotes eld
2755 \begin_inset Quotes erd
2758 somewhere in your document and hit the
2764 A footnote box appears where you can enter the text of the footnote.
2765 LyX should place the cursor at the beginning of the footnote box.
2769 \begin_layout LyX-Code
2770 LyX is a typesetting word processor.
2773 \begin_layout Standard
2774 Now click on the button labelled
2775 \begin_inset Quotes eld
2779 \begin_inset Quotes erd
2782 The footnote box disappears, leaving the button showing where the footnote
2783 marker will be in the printed text; this is called
2784 \begin_inset Quotes eld
2788 \begin_inset Quotes erd
2792 You can unfold the footnote at any time --- and re-edit its text, if you
2793 want --- by clicking again on the
2794 \begin_inset Quotes eld
2798 \begin_inset Quotes erd
2804 \begin_layout Standard
2805 You may wonder why the footnote button is a word instead of a number.
2806 The answer is that LyX worries about the footnote numbering for you in
2808 You can see this yourself by looking at the
2813 If you add other footnotes, LyX will renumber the footnotes.
2814 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2815 there's really no need to put the numbers in the LyX file.
2818 \begin_layout Standard
2819 A footnote can be cut and pasted like normal text.
2820 Go ahead; try it! All you need to do is select the footnote button
2824 \begin_layout Standard
2825 It may be easier to select it using the keyboard.
2826 You might accidentally open the footnote if you're trying to select the
2827 marker itself with the mouse.
2841 In addition, you can change regular text to a footnote, by selecting it
2847 button; change a footnote to regular text by hitting the
2851 key when the cursor is in the first position of a footnote, or by hitting
2856 key when the cursor is in the very last position of the footnote, respectively.
2859 \begin_layout Standard
2860 Margin notes can be added using the toolbar button (the button shows an
2861 arrow pointing to red text next to (i.e., in the margin of) black text, and
2862 should be next to the
2867 button in the toolbar.) or
2872 nsert\SpecialChar \menuseparator
2877 arginal\InsetSpace ~
2881 Margin notes are like footnotes, except that:
2884 \begin_layout Itemize
2885 the on-screen boxes say
2886 \begin_inset Quotes eld
2890 \begin_inset Quotes erd
2894 \begin_inset Quotes eld
2898 \begin_inset Quotes erd
2904 \begin_layout Itemize
2905 the notes will be placed in the margin, instead of below the text
2908 \begin_layout Itemize
2909 margin notes are not numbered
2912 \begin_layout Standard
2913 Change your LyX footnote back to text, then select and change it to a margin
2915 Run LaTeX again to see what the margin note looks like.
2918 \begin_layout Standard
2923 : Fix the footnote in
2928 \begin_layout Section
2932 \begin_layout Standard
2933 \begin_inset LatexCommand label
2934 name "sec:bibliographies"
2938 Bibliographies (at least in the exact sciences) are similar to cross references.
2939 The bibliography contains a list of references at the end of the document,
2940 and they can be referenced from within the document.
2941 Like section titles, LyX and LaTeX make your job easier by automatically
2942 numbering the bibliography items and changing citations when the items'
2946 \begin_layout Standard
2947 Go to the end of the document and switch to the
2952 Now, each paragraph you type will be a reference.
2955 The Lyx Tutorial, by the LyX Documentation Team
2957 as your first reference.
2958 Note that LyX automatically puts a number in a box before each reference.
2959 Click on the boxed reference number, and a
2961 Bibliography\InsetSpace ~
2965 You use the first field, the
2969 , to refer to this reference within the LyX document.
2970 By default, it is a number.
2976 \begin_inset Quotes eld
2980 \begin_inset Quotes erd
2983 to make it easy to remember.
2986 \begin_layout Standard
2987 Now pick somewhere in your document that you would like to insert a reference.
2993 nsert\SpecialChar \menuseparator
3006 The right panel in this dialog lists all the bibliography entries, and
3007 this field allows you to choose which bibliography item you want to cite.
3009 \begin_inset Quotes eld
3013 \begin_inset Quotes erd
3016 (right now, that's the only item in the bibliography), then use the left
3017 arrow in the center to insert it.
3018 (You can have multiple citations in the same place by transferring a number
3019 of keys this way.) Now run LaTeX, and you'll see that the citation appears
3020 in brackets in the text, referring to the bibliography at the end of the
3024 \begin_layout Standard
3025 How are the other fields used? The
3037 dialog will put a remark (such as a reference to a page or chapter within
3038 the referenced book or article) in the brackets after the reference.
3039 If you want the references to have labels instead of numbers in the printed
3040 output (for example, some journals would use
3041 \begin_inset Quotes eld
3045 \begin_inset Quotes erd
3048 to refer to a paper written by Smith in 1995), use the
3057 Bibliography\InsetSpace ~
3062 As usual, you can see the
3069 \begin_layout Standard
3074 Fix the bibliography and citation in
3079 \begin_layout Section
3083 \begin_layout Standard
3084 You may want to put a table of contents at the beginning of your document.
3085 LyX makes this very easy to do.
3090 after your document title and before your first section title and choose
3096 nsert\SpecialChar \menuseparator
3103 C\SpecialChar \menuseparator
3114 \begin_inset Quotes eld
3118 \begin_inset Quotes erd
3121 will appear in a button on the first line of the document.
3125 \begin_layout Standard
3126 This may not appear to be very useful.
3127 However, if you look at your
3131 file, you will see that a table of contents has been generated, listing
3132 the various sections and subsections in your document.
3133 As usual, if you reorder sections or create new ones, you will see those
3138 file when you update it.
3142 \begin_layout Standard
3143 The table of contents is not printed in the on-screen version of the document,
3144 because you can't edit it anyway.
3145 However, you can display the table of contents in a separate window by
3146 clicking on the table of contents button, or by using
3151 ocument\SpecialChar \menuseparator
3161 The menu command will work even if you don't have a table of contents inset
3163 This is a very useful tool.
3170 window to move around your document.
3171 Clicking on a (sub)section title in the
3177 window will highlight that line and move the cursor (in the LyX editing
3178 window) to that place in the document.
3179 You can also use the arrow keys to move up and down in the table of contents.
3180 You may therefore find it convenient to leave this window open throughout
3182 You can get similar functionality from the
3189 menu, though, where the table of contents appears automatically.
3192 \begin_layout Standard
3193 To get rid of the Table of Contents, you can delete the table of contents
3194 button just like any other text.
3197 \begin_layout Standard
3202 : Fix the table of contents in
3207 \begin_layout Chapter
3211 \begin_layout Standard
3212 LaTeX is used by many scientists because it outputs great looking equations,
3213 avoiding the control characters used by word processors and their equation
3215 Many of these scientists are frustrated, however, because writing equations
3216 in LaTeX is more like programming than writing.
3217 Happily, LyX has WYSIWYM support for equations.
3218 If you are used to LaTeX, you'll find that all of the usual LaTeX math
3219 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3220 If, on the other hand, you've never written in LaTeX, then the
3225 will allow you to write professional-looking math quickly and easily
3229 \begin_layout Standard
3230 LyX can't check if the math you're writing is actually
3243 \begin_layout Section
3247 \begin_layout Standard
3248 Somewhere in your LyX document, type:
3251 \begin_layout LyX-Code
3252 I like what Einstein said, E=mc^2, because it's so simple.
3256 \begin_layout Standard
3257 Now, that equation doesn't look very good, even in the
3261 file; there's no space between the letters and the equals sign, and you'd
3262 like to write an actual superscript for the
3263 \begin_inset Quotes eld
3267 \begin_inset Quotes erd
3271 That bad typesetting happened because we didn't tell LyX that we were writing
3272 a mathematical expression, so it typeset the equation like regular old
3276 \begin_layout Standard
3277 Instead, we create a formula that will get typeset properly.
3278 In order to create a formula, just click the toolbar button with
3279 \begin_inset Formula $\frac{a+b}{c}$
3282 written on it in blue.
3283 LyX will insert a little blue square, which is an empty math formula.
3284 LyX has placed the cursor in the blue square, so just type
3289 The expression is typed in blue, and the blue square disappears as soon
3290 as the formula is not empty.
3295 to leave the equation The purple markers disappear, leaving the cursor
3296 to the right of the expression, and now if you type something, it will
3300 \begin_layout Standard
3301 Run LaTeX and look at the
3306 Notice that the expression was typeset nicely, with spaces between the
3307 letters and the equals sign, and a superscript
3308 \begin_inset Quotes eld
3312 \begin_inset Quotes erd
3316 Letters in math mode are assumed to be variables, and come out in italics.
3317 Numbers are just numbers.
3320 \begin_layout Standard
3321 This math editor is another example of the WYSIWYM philosophy.
3322 In LaTeX, you write a mathematical expression using text and commands like
3329 ; this can be frustrating, because you can't see what an expression looks
3330 like until you LaTeX the file, and may have to spend time to find missing
3332 \begin_inset Quotes eld
3336 \begin_inset Quotes erd
3340 On the other hand, LyX doesn't attempt to get the expression to look perfect
3341 (WYSIWYG), but it gives you an extremely good idea of what the expression
3343 LaTeX then takes care of the professional typesetting.
3344 99% of the time, you won't have to make any changes to the font sizes or
3345 spacing that LaTeX outputs.
3346 This way (sorry to be so repetitive) you can focus on the
3350 of your mathematical expressions, not their format.
3353 \begin_layout Section
3354 Navigating an Equation
3357 \begin_layout Standard
3359 \begin_inset Formula $E=mc^{2}$
3363 \begin_inset Formula $E=1+mc^{2}$
3367 Use the arrow keys to move the cursor into the expression.
3368 Note that when you enter the expression, the purple markers appear to let
3369 you know you're editing math.
3378 to move the cursor past the equals sign, and just type
3379 \begin_inset Quotes eld
3383 \begin_inset Quotes erd
3387 Again, you can use the arrow keys or
3391 to leave the formula\SpecialChar \@.
3395 \begin_layout Standard
3396 Other than the special keys described below, typing in math mode is like
3397 editing regular text.
3407 Select text either with the arrow keys or with the mouse.
3413 dit\SpecialChar \menuseparator
3420 works in math mode, as does cutting and pasting.
3421 One thing to be careful of: if you're right outside a formula and you type
3430 ), it will delete the whole expression.
3431 Luckily, you can just use
3438 \begin_layout Standard
3439 What if you want to change
3440 \begin_inset Formula $E=mc^{2}$
3444 \begin_inset Formula $E=mc^{2.5}+1$
3447 ? Again, you can use the mouse to click in the right place.
3448 However, you can also use the arrow keys.
3449 If the cursor is just after the
3450 \begin_inset Quotes eld
3454 \begin_inset Quotes erd
3458 \begin_inset Quotes eld
3462 \begin_inset Quotes erd
3469 will move the cursor to the level of the superscript, just before the
3470 \begin_inset Quotes eld
3474 \begin_inset Quotes erd
3479 \begin_inset Quotes eld
3483 \begin_inset Quotes erd
3491 will move the cursor back to the regular level.
3496 from anywhere within the superscript, the cursor will be placed just
3500 the superscript (so that you can then type the
3501 \begin_inset Quotes eld
3505 \begin_inset Quotes erd
3511 \begin_layout Section
3512 Exponents and Indices
3515 \begin_layout Standard
3516 An exponent can be entered from the
3521 (see below), but it's actually simpler just to type the caret key,
3522 \begin_inset Quotes eld
3526 \begin_inset Quotes erd
3530 LyX will place another blue rectangle in the superscript, so that whatever
3531 you write next will be superscripted, and in a smaller font size.
3532 Everything you type until you hit a
3540 to exit Mathed entirely) will be in the superscript.
3543 \begin_layout Standard
3544 Writing a subscript (index) is just as easy --- start one by typing the
3546 \begin_inset Quotes eld
3550 \begin_inset Quotes eld
3554 You can subscript and superscript both subscripts and superscripts like
3556 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3563 \begin_layout Standard
3575 \begin_layout Section
3581 \begin_layout Standard
3587 is a convenient way to enter symbols or to perform many complicated Mathed
3589 Many of these functions can be accomplished from the keyboard or the
3594 dit\SpecialChar \menuseparator
3608 \SpecialChar \menuseparator
3617 However, we're going to concentrate on using the
3622 , just to let you know what's out there; you can learn keyboard shortcuts
3623 later, from other manuals.
3631 \SpecialChar \menuseparator
3638 \SpecialChar \menuseparator
3645 now and leave it open while reading this section.
3648 \begin_layout Standard
3649 Right-clicking on a formula will open the
3656 \begin_layout Subsection
3660 \begin_layout Standard
3666 which allow you to choose from a large array of symbols used in math: various
3667 arrows, relations, operators, and sums and integrals.
3668 Note that subscripting and superscripting allow you to put lower and upper
3669 limits on sums and integrals.
3673 \begin_layout Standard
3674 \begin_inset Quotes eld
3677 Nothing you can do that can't be done\SpecialChar \ldots{}
3679 \begin_inset Formula $\heartsuit$
3683 \begin_inset Quotes erd
3689 \begin_layout Subsection
3690 Square roots, accents, and delimiters
3693 \begin_layout Standard
3694 To type a square root, just click on the button with a square root sign
3696 The square root appears, and the cursor is in a new insertion point inside
3698 You can type variables, numbers, other square roots, fractions, whatever
3700 LyX will automatically resize the square root to fit what's inside.
3703 \begin_layout Standard
3704 Accenting a character (
3705 \begin_inset Formula $\overrightarrow{v}$
3708 ) or group of characters (
3709 \begin_inset Formula $\overrightarrow{a+b}$
3712 ) is done the same way.
3717 types are available from the panel.
3718 Click on a decoration, and LyX will insert that decoration with an insertion
3719 point under (or over) it.
3720 Just type what you want in the insertion point.
3721 There are two sets of decorations: those that resize with the text you
3722 type, and those that have fixed size, and are most appropriate for a single
3727 \begin_layout Standard
3728 Delimiters such as parentheses, brackets, and braces work similarly, but
3729 are a bit more complicated.
3734 button, which features a blue square surrounded by brackets, to pop up
3740 Your current selection of delimiters is displayed in a box.
3741 It's a pair of parentheses by default, but you can choose a pair of braces,
3742 a brace and a parenthesis, or even choose the empty square to have something
3744 \begin_inset Quotes eld
3748 \begin_inset Formula $a=\left\langle 7\right.$
3752 \begin_inset Quotes erd
3755 (the empty delimiter is displayed as a broken line in LyX, but won't show
3759 \begin_layout Standard
3760 If you're lazy, you can type actual parentheses in math mode, rather than
3766 However, those parentheses will be the same size as regular text, which
3767 will look bad if you have a big fraction or matrix inside the parentheses.
3772 window will guarantee that the delimiters are sized based on what's inside
3776 \begin_layout Standard
3777 You can also put delimiters or a square root sign or a decoration on already
3779 Select the portion of the formula that you want to adjust, and then click
3780 on the button you want from the
3786 Try using this to change Newton's second law from scalar to vector form
3788 \begin_inset Formula $f=ma$
3792 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3796 Once you've learned about matrices, this is how you'll put parentheses
3797 or brackets around them.
3800 \begin_layout Subsection
3804 \begin_layout Standard
3805 Fractions are very simple in Mathed.
3815 , which shows a fraction with blue squares in the numerator and the denominator.
3816 LyX writes two insertion points in a fraction.
3817 As you would expect, you can use arrow keys or the mouse to move around
3819 Click on the top square and type
3820 \begin_inset Quotes eld
3824 \begin_inset Quotes erd
3833 \begin_inset Quotes eld
3837 \begin_inset Quotes erd
3841 You've made a fraction! Of course you can type anything within each of
3842 the two boxes: variables with exponents, square roots, other fractions,
3847 \begin_layout Standard
3859 \begin_layout Subsection
3860 TeX mode: Limits, log, sin and others
3863 \begin_layout Standard
3864 Because letters in math mode are considered to be variables, if you type
3866 \begin_inset Quotes eld
3870 \begin_inset Quotes erd
3873 in math mode, LyX thinks you're typing the product of the three variables
3875 \begin_inset Formula $s$
3879 \begin_inset Formula $i$
3883 \begin_inset Formula $n$
3887 The three letters will be typeset in italics, when what you really wanted
3889 \begin_inset Quotes eld
3893 \begin_inset Quotes erd
3897 In addition, LyX won't put a space between the word
3898 \begin_inset Quotes eld
3902 \begin_inset Quotes erd
3906 \begin_inset Quotes eld
3910 \begin_inset Quotes erd
3917 will just exit math mode).
3919 \begin_inset Quotes eld
3923 \begin_inset Formula $\sin x$
3927 \begin_inset Quotes erd
3931 \begin_inset Quotes eld
3935 \begin_inset Formula $sinx$
3939 \begin_inset Quotes erd
3945 \begin_layout Standard
3947 \begin_inset Quotes eld
3951 \begin_inset Quotes erd
3965 \begin_inset Quotes eld
3969 \begin_inset Quotes erd
3972 is written in black, in upright roman type.
3973 The whole word is treated as one symbol, so if you type
3977 , it will delete the whole word.
3979 \begin_inset Quotes eld
3983 \begin_inset Quotes erd
3986 , which will be written in blue italics, like you expect in Mathed.
3991 file, the expression will be correctly typeset.
3995 \begin_layout Standard
3996 Other commands you need to type in TeX mode using the
4000 box include other trigonometric functions and their inverses, hyperbolic
4001 functions, logarithms, limits, and quite a few others.
4002 These functions can take subscripts and superscripts, important for typing
4004 \begin_inset Quotes eld
4008 \begin_inset Formula $\cos^{2}\theta$
4012 \begin_inset Quotes erd
4016 \begin_inset Quotes eld
4020 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4024 \begin_inset Quotes erd
4030 \begin_layout Standard
4042 \begin_layout Subsection
4046 \begin_layout Standard
4047 \begin_inset LatexCommand label
4062 The dialog has two sliding bars which allow you to choose how many rows
4063 and columns you want in your matrix.
4064 Choose 2 rows and 3 columns and hit
4073 LyX prints 6 insertion points in a
4074 \begin_inset Formula $2\times3$
4078 As usual, you can put any sort of Mathed expression (a square root, another
4079 matrix, etc.) in each insertion point.
4080 You can also leave some of the insertion points empty if you want.
4083 \begin_layout Standard
4088 can be used to move horizontally between the columns of a matrix.
4089 Alternatively, you can use the arrow keys to move around - hitting
4093 at the end of one box will move to the next box,
4097 will move to the next row, etc.
4100 \begin_layout Standard
4101 If you suddenly need more rows or columns, use
4106 dit\SpecialChar \menuseparator
4111 ath\SpecialChar \menuseparator
4129 They add a row or column just after the current position.
4150 \begin_layout Standard
4155 for information on how to change the horizontal alignment of each column,
4156 and how to change the vertical position of the whole matrix.
4157 Note that if you want to write a table containing text, you should use
4158 LyX' wonderful table support, rather than trying to write text in a matrix.
4161 \begin_layout Subsection
4165 \begin_layout Standard
4166 All of the expressions we have written so far have been on the same line
4167 as the text that came before and after them, otherwise known as inline
4169 This is fine for short, simple expressions, but if you want to write larger
4170 ones, or if you want your expressions to stand out from the text, you need
4171 to write them in display mode.
4172 In addition, only displayed expressions can be labeled and numbered (see
4177 ), and multi-line equations (see Sec.
4179 \begin_inset LatexCommand ref
4180 reference "sec:multiline"
4184 ) must be in display mode.
4187 \begin_layout Standard
4197 , which represents a couple lines of text before and after a centered blue
4199 LyX inserts a formula, but the insertion point is on a new line, and it's
4200 centered within that line.
4201 Now type an expression and run LaTeX to see how it looks.
4206 button is actually a toggle; use it now to change a couple of your expressions
4207 to display mode and back.
4211 \begin_layout Standard
4212 Display mode has a couple differences from inline mode:
4215 \begin_layout Itemize
4216 The default font is larger for a few symbols, like
4217 \begin_inset Formula $\sum$
4221 \begin_inset Formula $\int$
4227 \begin_layout Itemize
4228 Subscripts and superscripts for limits and sums (but not integrals) are
4229 written under rather than next to the symbols
4232 \begin_layout Itemize
4236 \begin_layout Standard
4237 Other than these differences, though, displayed expressions and inline expressio
4238 ns are very similar.
4241 \begin_layout Standard
4242 One final note about the way displayed formulae are typeset: be careful
4243 about whether you're putting your equation into a new paragraph or not.
4244 If your formula is in the middle of a sentence or paragraph, then don't
4250 Doing so will cause the text
4254 the formula to start a new paragraph.
4255 That text will therefore be indented, which is probably not what you want.
4258 \begin_layout Standard
4263 : Put the various equations in
4267 into display mode, and see how they're typeset differently.
4270 \begin_layout Standard
4275 : Using various tools you've learned in this section, you should be able
4276 to write an equation like
4280 \begin_layout Standard
4281 After you've done it the hard way, why don't you give
4286 nsert\SpecialChar \menuseparator
4291 \SpecialChar \menuseparator
4305 \begin_inset Formula \[
4306 f(x)=\left\{ \begin{array}{cc}
4309 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4316 \begin_layout Section
4320 \begin_layout Standard
4321 Mathed can do plenty more.
4322 By now, you're familiar with the basics, so we'll just refer to the
4329 \begin_layout Itemize
4330 Labeling and numbering expressions
4333 \begin_layout Itemize
4334 Multi-line equations
4337 \begin_layout Itemize
4338 Change typefaces, e.g., to write bold-face text in an expression.
4341 \begin_layout Itemize
4342 Fine-tune font sizes and spacing within an expression.
4343 (Don't worry about this until your final draft!)
4346 \begin_layout Itemize
4348 These are very powerful, because you just define them once at the top of
4349 the document, and then you can use them throughout the document.
4350 If you change the macro definition, the references to the macro will be
4351 changed throughout the document.
4352 Macros can even take arguments.
4355 \begin_layout Itemize
4356 Do lots of other things we didn't have time to mention in this
4363 \begin_layout Chapter
4367 \begin_layout Section
4368 Other Major LyX Features
4371 \begin_layout Standard
4372 We haven't gone through all the possible commands in LyX, and we aren't
4378 for more information.
4379 We'll just mention a couple more major things LyX can do\SpecialChar \ldots{}
4383 \begin_layout Itemize
4384 LyX has WYSIWYM support for tables.
4390 nsert\SpecialChar \menuseparator
4398 Click on the table with the
4407 dialog box which allows extensive table editing.
4410 \begin_layout Itemize
4411 LyX also supports including pictures in a number of formats (including JPEG
4412 and other bitmap formats, PostScript® and raw LaTeX) within documents.
4418 nsert\SpecialChar \menuseparator
4426 Then click on the figure to choose the file to include, rotate or scale
4427 it, etc.) Tables and figures can have captions, and LyX will automatically
4428 generate lists of figures and/or tables.
4431 \begin_layout Itemize
4432 Version control is supported, using RCS (
4439 \begin_layout Itemize
4440 LyX is heavily configurable.
4441 Everything from how the LyX window looks to how the output comes out can
4442 be configured in a number of ways.
4443 Much configuration is done through
4448 ools\SpecialChar \menuseparator
4456 For more information on this, check out
4461 elp\SpecialChar \menuseparator
4466 ustomization\SpecialChar \@.
4470 \begin_layout Itemize
4471 LyX is being developed by a team of programmers on five continents.
4472 Therefore, LyX has better support for non-English languages (such as Dutch,
4473 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4474 ) than many word processors.
4475 Even some right-to-left languages like Hebrew or Arabic are supported.
4476 You can write documents in other languages, but you can also configure
4477 LyX to show its menus and error messages in other languages.
4481 \begin_layout Itemize
4482 The LyX menus feature keybindings.
4483 This means that you can do
4488 ile\SpecialChar \menuseparator
4503 or by using the binding which is shown next to it in the menu (C-O by default).
4504 Keybindings are also configurable.
4505 For information on this, check out
4510 elp\SpecialChar \menuseparator
4515 ustomization\SpecialChar \@.
4519 \begin_layout Itemize
4520 LyX can read in LaTeX documents.
4521 See Section\InsetSpace ~
4523 \begin_inset LatexCommand ref
4524 reference "sec:tex2lyx"
4531 \begin_layout Itemize
4532 Spellchecking and thesaurus facilities are available.
4535 \begin_layout Itemize
4536 The text box near the bottom of the LyX window is called the minibuffer
4537 (after a similar feature in
4542 This gives you access to all sorts of interesting functionality, including
4543 functionality which could break your document.
4544 In other words, don't type in the minibuffer unless you know what you're
4548 \begin_layout Section
4552 \begin_layout Standard
4553 \begin_inset LatexCommand label
4554 name "sec:latexusers"
4558 If you don't know anything about LaTeX, you don't have to read this section.
4559 Actually, you might want to
4563 about LaTeX, and then read this chapter.
4564 However, many people who begin to use LyX will be familiar with LaTeX.
4565 If you are such a person, you may be wondering if LyX can really do everything
4567 The short answer is that LyX can do pretty much everything LaTeX can do
4568 in one form or another, and it definitely simplifies most parts of writing
4570 The tool that is used to convert a LaTeX document to LyX was rewritten
4571 completely for LyX\InsetSpace ~
4573 It should now be able to handle most LaTeX gracefully.
4576 \begin_layout Standard
4577 Because this is just a tutorial, we are only going to mention things that
4578 new LyX users will most likely be interested in.
4579 In the interests of keeping the
4583 short, we will give only minimal information here.
4588 manual, specifically the
4590 Secrets of the LaTeX Masters
4592 chapter, has a great deal of information on differences between LyX and
4593 LaTeX, and how to do various LaTeX tricks in LyX.
4596 \begin_layout Subsection
4600 \begin_layout Standard
4601 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4602 will be displayed in red on the screen.
4603 You can use TeX commands in LyX by choosing
4608 nsert\SpecialChar \menuseparator
4617 This creates a text box, and everything within it is passed straight to
4621 \begin_layout Standard
4622 In a math formula, TeX mode is handled a bit differently.
4623 Enter TeX mode by typing a backslash.
4624 The backslash is not written out, but anything you type afterwards will
4626 You exit TeX mode by typing
4630 or some other non-alphabetic character, like a number, underscore, caret,
4632 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4633 will convert it to WYSIWYM\SpecialChar \@.
4634 So if, in a formula, you type
4640 , then when you type
4644 , LyX will change the red
4645 \begin_inset Quotes eld
4649 \begin_inset Quotes erd
4653 \begin_inset Quotes eld
4657 \begin_inset Formula $\gamma$
4661 \begin_inset Quotes erd
4665 This will work for almost all, non-complicated math macros.
4666 This may be faster than using the
4671 , and will be especially convenient for experienced LaTeX users.
4674 \begin_layout Standard
4675 As a special case, if you type a brace in TeX mode, then the beginning
4679 ending braces will be inserted in red, then take you
4683 of TeX mode and place the cursor between the braces.
4684 This makes it more convenient to type commands that LyX doesn't know which
4688 \begin_layout Standard
4689 LyX can't do absolutely everything that LaTeX can do (yet?).
4690 Some fancy functions are not supported at all, while some work but aren't
4692 TeX mode allows users to get the full flexibility of LaTeX, while having
4693 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4694 LyX could never support every LaTeX package.
4701 in the preamble (see Section\InsetSpace ~
4703 \begin_inset LatexCommand ref
4704 reference "sec:preamble"
4708 ), you can use any package you want --- although you won't have WYSIWYM
4709 support for that package's features.
4712 \begin_layout Subsection
4713 Importing LaTeX Documents ---
4718 \begin_layout Standard
4719 \begin_inset LatexCommand label
4724 You can import a LaTeX file into LyX by using the
4729 ile\SpecialChar \menuseparator
4734 mport\SpecialChar \menuseparator
4746 which will create a file
4754 --- and then open that file.
4755 If the translation doesn't work, you can try calling
4759 from the command line, possibly using fancier options.
4762 \begin_layout Standard
4767 will translate most legal LaTeX, but not everything.
4768 It will leave things it doesn't understand in TeX mode, so after translating
4773 , you can look for red text and hand-edit it to look right.
4776 \begin_layout Standard
4781 has its own manpage.
4782 Read it to find out about which LaTeX commands and environments aren't
4783 supported, bugs (and how to get around them), and how to use the various
4787 \begin_layout Subsection
4788 Converting LyX Documents to LaTeX
4791 \begin_layout Standard
4792 You might wish to convert a LyX Document to a LaTeX file.
4793 For example, a co-worker or co-author who doesn't have LyX might want to
4795 This is very easy to do with LyX.
4801 ile\SpecialChar \menuseparator
4806 xport\SpecialChar \menuseparator
4814 This will create a file
4822 file you are editing.
4823 LyX always creates temporary LaTeX files when viewing or printing files,
4824 so it is very good at generating LaTeX.
4827 \begin_layout Subsection
4831 \begin_layout Subsubsection
4835 \begin_layout Standard
4841 ocument\SpecialChar \menuseparator
4848 dialog takes care of many of the options that you would input in a
4855 Change the class, default font size and paper size here.
4856 Put any extra options to the
4874 \begin_layout Subsubsection
4875 Other Preamble Matter
4878 \begin_layout Standard
4879 \begin_inset LatexCommand label
4884 If you have special commands to put in the preamble of a LaTeX file, you
4885 can use them in a LyX document as well.
4891 ocument\SpecialChar \menuseparator
4903 and type in the dialog window (or from the document settings dialog, depending
4905 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4908 \begin_layout Subsection
4912 \begin_layout Standard
4913 LyX has support for BibTeX, which allows you to build databases of bibliographic
4914 al references to be used in multiple documents.
4920 nsert\SpecialChar \menuseparator
4927 C\SpecialChar \menuseparator
4940 Click on the resulting
4941 \begin_inset Quotes eld
4945 Generated\InsetSpace ~
4947 \begin_inset Quotes erd
4950 button, and you will get a
4959 field, type what you would type inside the braces of a
4969 \begin_layout Standard
4970 Like in regular LaTeX, multiple bibliographies should be separated by commas,
4981 field, type what you would type inside the braces of a
4990 \begin_layout Standard
4991 After you've done this, you can use citations from any bibliographies you're
4997 nsert\SpecialChar \menuseparator
5004 (see Section\InsetSpace ~
5006 \begin_inset LatexCommand ref
5007 reference "sec:bibliographies"
5012 LyX will take care of running BibTeX.
5017 dialog will show a list of all the references in your
5024 \begin_layout Section
5028 \begin_layout Standard
5029 Sometimes when you LaTeX a document, there will be errors, things that LyX
5030 or LaTeX can't understand.
5031 When this happens, LyX will open a
5037 Clicking on individual errors in this dialog will take you to the place
5038 in the LyX document where the error occurs and also display the detailed
5039 LaTeX error message.