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 User's Guide},pdfsubject={LyX-documentation Intro},
33 pdfkeywords={LyX}]{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
101 \begin_layout Standard
102 Principal maintainer of this file is
107 If you have comments or error corrections, please send them to the LyX
108 Documentation mailing list,
110 lyx-docs@lists.lyx.org
120 \begin_layout Standard
121 \begin_inset LatexCommand tableofcontents
128 \begin_layout Chapter
132 \begin_layout Section
136 \begin_layout Standard
137 This file is designed for all of you who have never heard of LaTeX, or don't
139 Now, don't panic - you won't need to learn LaTeX to use LyX.
140 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
142 There are some things you will need to learn, however, in order to use
146 \begin_layout Standard
147 Some of you probably found your way to this document because you tried to
148 put two spaces after a
149 \begin_inset Quotes eld
153 \begin_inset Quotes erd
156 or tried to put 3 blank lines between paragraphs.
157 After much frustration, you found you couldn't.
158 In fact, you'll find that most of the little tricks you're accustomed to
159 using in other word processors just won't work in LyX.
160 That's because most word processors you've used before allow you to manually
161 enter all spacings, font changes, and so on.
162 So you end up not only writing a document but typesetting it, too.
163 LyX does the typesetting for you, in a consistent fashion, letting you
164 focus on the important things, like the content of your writing.
167 \begin_layout Standard
168 So, bear with us and read on.
169 Reading this tutorial is definitely worth the time.
172 \begin_layout Section
182 \begin_layout Standard
183 Before we get started with this section, we want to make a quick note of
189 uses the notation outlined in the
194 If you came to this manual first, go read the
202 \begin_layout Standard
203 Now that you know which fonts mean what, we want to talk a bit about what
211 \begin_layout Subsection
212 Getting the Most out of the Tutorial
215 \begin_layout Standard
216 This tutorial consists of examples and exercises.
217 To get the most out of this document, you should read through the document,
218 typing all the silly little things we're telling you to type and trying
219 out all of the exercises to see if you get them right.
220 For convenience, you might want to print out the PostScript® version of
224 \begin_layout Standard
225 If you are familiar with LaTeX, you'll probably be able to read the
229 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
230 However, LyX does have idiosyncrasies
234 \begin_layout Standard
235 or, more optimistically,
236 \begin_inset Quotes eld
240 \begin_inset Quotes erd
248 you'll want to learn about.
249 Even if you don't feel like reading the rest of the
253 , you should definitely check out Section\InsetSpace ~
255 \begin_inset LatexCommand ref
256 reference "sec:latexusers"
260 , which is specifically written for experienced LaTeX users.
263 \begin_layout Subsection
271 \begin_layout Itemize
272 Detailed explanations of all of LyX's features.
276 \begin_layout Standard
284 \begin_layout Standard
285 Seriously, though, we're here to get you up and running so that all you
291 If we tried to duplicate all of the information about all of LyX's features
296 would be redundant, too long, and forever out of date.
297 All we do here is introduce things; imagine there is a
298 \begin_inset Quotes eld
306 \begin_inset Quotes erd
309 at the end of every section.
313 \begin_layout Itemize
314 Detailed explanations of LaTeX.
318 \begin_layout Standard
320 If you're really curious about learning some of the neat tricks you can
321 do with LaTeX, you can always go get a LaTeX book.
322 There are several good ones on the market.
323 No need to reinvent the wheel, after all\SpecialChar \ldots{}
328 \begin_layout Standard
329 So, brave soul, it's time to move onwards.
330 Time for your first document \SpecialChar \ldots{}
334 \begin_layout Chapter
335 Getting Started with LyX
338 \begin_layout Section
339 Your First LyX Document
342 \begin_layout Standard
343 \begin_inset LatexCommand label
344 name "sec:first-doc-ex"
349 You're ready to start writing.
350 Before you do, though, there are a few things we need to mention, which
351 will hopefully make the
355 more instructive, useful, and fun.
359 \begin_layout Standard
360 Because there's lots of information that we won't be giving you, the
366 thing that you need to do is find the
371 Luckily, this is very simple.
387 You may want to load the
391 as well (if you're not reading it on screen already).
392 This way, you can read them while you're writing your own file
396 \begin_layout Standard
397 They can also serve as good examples of how to use the many features of
404 Note that once you've got more than one document open, you can use the
412 menu or the document tabs to switch between them.
417 will not cover in detail subjects which are described in the other LyX
419 This may make life a bit harder for you at the beginning, but it will keep
425 It will also get you in the habit of using the other manuals, which ---
426 in the long run --- will save you a lot of time.
429 \begin_layout Standard
434 , we're going to assume that you have a fully working version of LyX, as
439 or some other dvi viewer,
443 or some other way of converting
447 documents to PostScript® documents, and a working printer.
448 This is a lot to assume.
449 If any of this is not true, you (or a friendly system administrator) will
450 need to set up your system.
451 You can find information on setup in other manuals.
454 \begin_layout Standard
455 Finally, we've written a file to let you practice your LyX skills on.
461 Imagine that it was typed by someone who didn't know about any of LyX's
463 As you learn new LyX functions, we'll suggest that you fix those parts
470 \begin_inset Quotes eld
474 \begin_inset Quotes erd
477 hints about how to fix things
481 \begin_layout Standard
482 The hints are located in yellow
483 \begin_inset Quotes eld
487 \begin_inset Quotes erd
491 Access the text in a note by clicking on it.
497 If you want to cheat (or check what you've done), there's also a file called
502 which contains the same text as written and typeset by a LyX master.
505 \begin_layout Standard
506 The example files can be found in the
510 directory, which you can get to by selecting
515 ile\SpecialChar \menuseparator
522 and then clicking on the
530 Open the raw document, and use
535 ile\SpecialChar \menuseparator
543 to save a copy in your own directory for you to work on.
544 As you fix parts of the raw document, check to see how those changes affect
548 \begin_layout Standard
553 directory contains lots of other examples files.
554 They will show you how to do various fancy things with LyX.
555 They are especially useful to display things that (due to length or other
556 reasons) won't fit in the documentation.
561 , or when you're confused about how to do something fancy in LyX, take a
565 \begin_layout Subsection
566 Typing, Viewing, and Printing
569 \begin_layout Itemize
575 ile\SpecialChar \menuseparator
583 \begin_layout Itemize
584 Type a sentence like:
586 This is my first LyX document!
589 \begin_layout Itemize
590 Save your document with
595 ile\SpecialChar \menuseparator
605 \begin_layout Itemize
606 Run LaTeX to create a
615 iew\SpecialChar \menuseparator
623 You may see things being printed in the window you ran the
628 These are messages from LaTeX, which you can ignore for now.
637 viewer), which will pop up a new window displaying what your document will
638 look like when printed.
642 \begin_layout Standard
643 You can save time by leaving
647 running in the background.
653 iew\SpecialChar \menuseparator
658 pdate\SpecialChar \menuseparator
665 and just click on the
669 window (or unminimize it) after LaTeX finishes running.
677 \begin_layout Itemize
683 ile\SpecialChar \menuseparator
696 \begin_layout Standard
697 Congratulations! You've written and printed your first LyX document.
698 All of the rest is just details, which is covered in the rest of the
717 \begin_layout Subsection
721 \begin_layout Standard
722 LyX can of course do most of the things you're used to doing with a word
724 It will word-wrap and indent paragraphs automatically.
725 Here's a quick description of how to do some simple actions.
728 \begin_layout Description
729 Undo LyX has multiple levels of undo, which means you can undo everything
730 you've done since your current editing session started, by selecting
735 dit\SpecialChar \menuseparator
743 If you undo too much, just select
748 dit\SpecialChar \menuseparator
760 \begin_layout Standard
761 Currently, undo is limited to 100 steps.
762 Undo also doesn't work for
766 ; for instance, changes to the document layout.
767 Each of these is really a LyX bug.
771 \begin_layout Description
777 dit\SpecialChar \menuseparator
785 dit\SpecialChar \menuseparator
793 dit\SpecialChar \menuseparator
796 to cut, copy, and paste.
797 Or automatically paste selected text (including selections from other programs)
805 \begin_layout Description
811 dit\SpecialChar \menuseparator
821 In the dialog, search with the
835 button to replace a word you've found
839 \begin_layout Standard
840 Close the window when you're done.
841 Or leave it open if you find it more convenient.
842 Most dialog boxes in LyX --- including the
858 dialogs, as well as the various math dialogs can operate like this.
864 ile\SpecialChar \menuseparator
871 , won't let you type anything in the main LyX window until you actually
873 Just be sure you have the right window focus when you're trying to type
874 in the main LyX window or give a command in some other LyX dialog.
880 If you like, you can specify whether to make the search case-sensitive,
881 or to search for only complete words; you can also search backwards through
885 \begin_layout Description
886 Character\InsetSpace ~
891 text (which will generally put characters in italics), put it in
899 (usually small caps, used for people's names) from the toggle buttons in
905 dit\SpecialChar \menuseparator
916 \begin_layout Description
917 Toolbar There are buttons on the toolbar (just below the menus) which allow
918 you to do some of the more popular functions, such as
929 \begin_layout Standard
930 Of course, you haven't yet written enough to make most of these functions
932 As you write more, though, try undoing, pasting, etc.
935 \begin_layout Subsection
936 WYSIWYM: Whitespace in LyX
939 \begin_layout Standard
940 \begin_inset LatexCommand label
941 name "sec:whitespace"
945 One of the hardest things for new users to get used to is the way that LyX
947 As many times as you hit
951 , you'll only get one blank line.
952 As many times as you hit
956 , you'll only get one space.
957 On a blank line, LyX won't let you type even one space.
962 key won't move you forward one tab stop; in fact there
966 no tab stops! There's no ruler at the top of the page to let you set tabs
970 \begin_layout Standard
971 Many commercial word processors are based on the WYSIWYG principle:
972 \begin_inset Quotes eld
975 What You See Is What You Get.
976 \begin_inset Quotes erd
979 LyX, on the other hand, is based on the principle that
980 \begin_inset Quotes eld
983 What You See Is What You
988 \begin_inset Quotes erd
991 You type what you mean, and LyX will take care of typesetting it for you,
992 so that the output looks nice.
997 grammatically separates paragraphs, and a
1001 grammatically separates words, so there is no reason to have several of
1006 has no grammatical function at all, so LyX does not support it.
1007 Using LyX, you'll spend more of your time worrying about the
1011 of your document, and less time worrying about the
1020 for more information on the WYSIWYM concept.
1023 \begin_layout Standard
1024 LyX does have (many) ways to fine-tune the formatting of your document.
1025 After all, LyX might not typeset
1034 has information about all that.
1039 s and vertical space --- which are more powerful and versatile than multiple
1040 spaces or blank lines --- and ways to change font sizes, character styles,
1041 and paragraph alignments by hand.
1042 The idea, though, is that you can write your whole document, focusing on
1043 content, and just worry about that fine-tuning at the end.
1044 With standard word processors, you'll be distracted by document formatting
1045 throughout the writing process.
1048 \begin_layout Section
1052 \begin_layout Standard
1053 Different parts of a document have different purposes; we call these parts
1059 Most of a document is made up of regular text.
1060 Section (chapter, subsection, etc.) titles let the reader know that a new
1061 topic or subtopic will be discussed.
1062 Certain types of documents have special environments.
1063 A journal article will have an abstract, and a title.
1064 A letter will have neither of these, but will probably have an environment
1065 that gives the writer's address.
1068 \begin_layout Standard
1069 Environments are a major part of the
1070 \begin_inset Quotes eld
1073 What You See Is What You Mean
1074 \begin_inset Quotes erd
1078 A given environment may require a certain font style, font size, indenting,
1079 line spacing, and more.
1080 This problem is aggravated, because the exact formatting for a given environmen
1081 t may change: one journal may use boldface, 18 point, centered type for
1082 section titles while another uses italicized, 15 point, left justified
1083 type; different languages may have different standards for indenting; and
1084 bibliography formats can vary widely.
1085 LyX lets you avoid learning all the different formatting styles.
1088 \begin_layout Standard
1093 box is located on the left end of the toolbar (just under the
1101 It indicates which environment you're currently writing in.
1102 While you were writing your first document, it said
1103 \begin_inset Quotes eld
1107 \begin_inset Quotes erd
1110 which is the default environment for text.
1111 Now you will put a number of environments in your new document so that
1112 you can see how they work.
1113 You'll do so with the
1117 menu, which you open by clicking on the
1118 \begin_inset Quotes eld
1122 \begin_inset Quotes erd
1125 icon just to the right of the
1132 \begin_layout Subsection
1133 Sections and Subsections
1136 \begin_layout Standard
1141 on the first line of your LyX file, and select
1153 \begin_layout Standard
1159 If nothing is selected, LyX changes the paragraph you are currently in
1160 to the selected environment.
1161 Alternatively, you can change several paragraphs to a different environment
1162 by selecting them before picking an environment.
1180 , which will be covered below.
1181 LyX numbers the section
1182 \begin_inset Quotes eld
1186 \begin_inset Quotes erd
1189 and typesets the section heading (title) in a larger font.
1200 \begin_inset Quotes eld
1204 \begin_inset Quotes erd
1208 \begin_inset Quotes eld
1212 \begin_inset Quotes erd
1216 Section headings, like most environments, are assumed to end when you type
1222 Type the document introduction:
1225 \begin_layout LyX-Code
1226 This is an introduction to my first LyX document.
1229 \begin_layout Standard
1244 \begin_inset Quotes eld
1248 \begin_inset Quotes erd
1251 and waits for you to type a title.
1256 , and you'll see that LyX again sets it as a section title.
1259 \begin_layout Standard
1261 Go to the end of Section\InsetSpace ~
1263 \begin_inset Quotes eld
1266 my first LyX document
1267 \begin_inset Quotes erd
1284 \begin_inset Quotes eld
1288 \begin_inset Quotes erd
1291 and waits for you to type a title.
1297 Section\InsetSpace ~
1299 \begin_inset Quotes eld
1303 \begin_inset Quotes erd
1306 , which used to be Section\InsetSpace ~
1307 2, has been automatically renumbered to Section\InsetSpace ~
1309 In true WYSIWYM fashion, you just need to identify the text that makes
1310 up the section titles, and LyX takes care of numbering the sections and
1314 \begin_layout Standard
1323 environment, and type the following five lines:
1326 \begin_layout LyX-Code
1327 Sections and subsections are described below.
1330 \begin_layout LyX-Code
1334 \begin_layout LyX-Code
1335 Sections are bigger than subsections.
1338 \begin_layout LyX-Code
1339 Subsection description
1342 \begin_layout LyX-Code
1343 Subsections are smaller than sections.
1346 \begin_layout Standard
1347 Click on the second line and select
1356 LyX numbers the subsection
1357 \begin_inset Quotes eld
1361 \begin_inset Quotes erd
1364 , and typesets it in a font which is bigger than regular text but smaller
1365 than the section title.
1366 Change the fourth line
1370 environment as well.
1371 As you probably expected, LyX automatically numbered the section
1372 \begin_inset Quotes eld
1376 \begin_inset Quotes erd
1380 If you put yet another section before Section\InsetSpace ~
1381 2, Section\InsetSpace ~
1382 2 will be renumbered
1383 as Section 3, and the subsections will be renumbered to
1384 \begin_inset Quotes eld
1388 \begin_inset Quotes erd
1392 \begin_inset Quotes eld
1396 \begin_inset Quotes erd
1403 \begin_layout Standard
1404 Further levels of sectioning include
1417 We'll let you play with these on your own.
1418 You may notice that paragraph and subparagraph headings are not numbered
1419 by default, and that subparagraphs are indented; see the
1428 headings are actually the highest level of sectioning, above
1432 s, but you're only allowed to use them in certain types (text classes) of
1433 LyX documents (see Section\InsetSpace ~
1435 \begin_inset LatexCommand ref
1436 reference "sec:textclasses"
1444 \begin_layout Standard
1445 Finally, you may want to have sections or subsections that are not numbered.
1446 There are environments for this as well.
1447 If you change one of your section headings to the
1451 environment (you may have to scroll down in the
1455 menu to find it), LyX will use the same font size for the heading as it
1456 uses for a regular section, but it won't number that section.
1457 There are corresponding
1458 \begin_inset Quotes eld
1462 \begin_inset Quotes erd
1465 heading environments for
1474 Try changing some of your sections or subsections to the starred environments,
1475 and note how the other sections' numbers are updated.
1478 \begin_layout Standard
1483 : Fix the section and subsection headings in
1491 \begin_layout Subsection
1495 \begin_layout Standard
1496 LyX has several different environments for typesetting lists.
1497 The various list environments free you from hitting
1501 a million times when writing an outline, or from renumbering a whole list
1502 when you want to add a point in the middle of the list, and lets you concentrat
1503 e on the list content.
1507 \begin_layout Standard
1508 Yes, we're overemphasizing this point throughout the
1517 the main philosophy of LyX, so please forgive us.
1522 Different types of documents logically require different list environments:
1525 \begin_layout Itemize
1526 A slide presentation might use the
1530 environment's bulleted lists to describe different points.
1534 \begin_layout Itemize
1535 An outline would use the
1539 environment's numbered lists (and lettered sublists).
1543 \begin_layout Itemize
1544 A document describing several software packages could use the
1548 environment, where each item in the list begins with a bold-faced word.
1552 \begin_layout Itemize
1557 environment --- not found in LaTeX --- is a slightly different form of
1565 \begin_layout Standard
1566 Let's write a list of reasons why LyX is better than other word processors.
1567 Somewhere in your document, type:
1570 \begin_layout Standard
1573 Lyx is better than other word processors because:
1576 \begin_layout Standard
1592 \begin_inset Quotes eld
1596 \begin_inset Quotes erd
1599 (actually, an asterisk, which will be converted to a round circle on output)
1601 Type in your reasons:
1604 \begin_layout LyX-Code
1605 Typesetting is done for you.
1608 \begin_layout LyX-Code
1612 \begin_layout LyX-Code
1613 Lists are very easy to create!
1616 \begin_layout Standard
1617 List environments, unlike headings, do not end when you type
1622 Instead, LyX assumes you're going on to the next item in the list.
1623 The above will therefore result in a three-item list.
1624 If you want more than one paragraph within one list
1628 , one way is to use the
1630 Protected\InsetSpace ~
1633 , which you get by typing
1638 In order to get out of the list, you need to reselect the
1642 environment (or just use the keybinding,
1650 \begin_layout Standard
1651 You've got a beautiful itemized list.
1652 You might want to run LaTeX to see how the list looks when printed out.
1653 But what if you wanted to number the reasons? Well, just select the whole
1658 \begin_layout Standard
1659 LyX won't let you select the first bullet unless you also select the paragraph
1664 the list, which you probably don't want to do.
1665 Similarly, you can't select the actual number in a numbered section title.
1666 Don't worry about it.
1680 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1684 \begin_layout Standard
1685 While the list is still selected, you can change to the other two list environme
1694 , in order to see what they look like.
1695 For those two environments, each list item is made up of a term, which
1696 is the item's first word, followed by a definition, which is the rest of
1697 the paragraph (until you hit
1701 .) The term is either typeset in boldface (
1706 \begin_inset Quotes eld
1710 \begin_inset Quotes erd
1717 \begin_layout Standard
1718 But a typesetter's tab, which will change to fit the size of the largest
1719 term, not a pathetic, rigid, unchangeable typewriter
1732 ) from the rest of the paragraph.
1733 If you want to have more than one word in the definition, then separate
1736 Protected\InsetSpace ~
1742 \begin_layout Standard
1747 : Typeset the list in
1752 \begin_layout Standard
1753 You can nest lists within each other in all sorts of interesting ways.
1754 An obvious example would be writing outlines.
1755 Numbered and bulleted lists will have different numbering and bulleting
1756 schemes for sublists.
1761 for details on the different sorts of lists, as well as examples which
1769 \begin_layout Subsection
1770 Other Environments: Verses, Quotations, and More
1773 \begin_layout Standard
1774 There are two environments for setting quotations apart from surrounding
1779 for short quotes and
1788 environment, also used in the
1792 for the long typing examples) is written in a
1796 font; this environment is the only place in LyX where you're allowed to
1797 use multiple spaces to allow code indenting.
1798 You can even write poetry using the
1806 to separate stanzas, and
1810 to separate lines within a stanza.
1815 for more complete descriptions of all of the available LyX environments.
1818 \begin_layout Standard
1823 : Correctly typeset the
1835 \begin_layout Standard
1849 \begin_layout Chapter
1853 \begin_layout Standard
1854 The previous chapter hopefully allowed you to get used to writing in LyX.
1855 It introduced you to the basic editing operations in LyX, as well as the
1856 powerful method of writing with environments.
1857 Most people who use LyX, though, will want to write documents: papers,
1858 articles, books, manuals, or letters.
1859 This chapter is meant to take you from simply writing text with LyX to
1860 writing a complete document.
1861 It will introduce you to text classes, which allow you to write different
1863 It will then describe many of the additions that turn text into a document,
1864 such as titles, footnotes, cross references, bibliographies, and tables
1868 \begin_layout Section
1872 \begin_layout Standard
1873 \begin_inset LatexCommand label
1874 name "sec:textclasses"
1878 Different sorts of documents should be typeset differently.
1879 For example, books are generally printed double-sided, while articles are
1881 In addition, many documents contain special environments: letters contain
1882 some environments --- such as the sender's address and the signature ---
1883 which do not make sense in a book or article.
1890 \begin_layout Standard
1891 LaTeX users: this is equivalent to the LaTeX document class
1898 takes care of these large scale differences between different sorts of
1904 , for example, was written in the
1909 Text classes are another major part of the WYSIWYM philosophy; they tell
1910 LyX how to typeset the document, so you don't need to know how.
1913 \begin_layout Standard
1914 Your document is probably being written in the
1922 \begin_layout Standard
1923 That's usually the default text class
1929 Try changing to other text classes (using the
1934 ocument\SpecialChar \menuseparator
1941 dialog) to see how they are typeset differently.
1942 If you change your document to the
1946 text class and look at the
1950 menu, you'll see that most of the allowed environments are the same.
1951 However, you can now use the
1956 If you're ever unsure about which environments you can use in a given text
1957 class, just consult the
1964 \begin_layout Standard
1965 Font sizes, one- or two-column printing, and page headings are just some
1966 of the ways journals' typesettings differ from one another.
1967 As the Computer Age continues to mature, journals have begun accepting
1968 electronic submissions, creating LaTeX
1969 \begin_inset Quotes eld
1973 \begin_inset Quotes erd
1976 so that authors can submit correctly typeset articles.
1977 LyX is set up to support this as well.
1978 For example, LyX supports typesetting (and extra environments) for the
1979 American Mathematics Society journals using the
1981 Article\InsetSpace ~
1987 \begin_layout Standard
1988 Here's a very quick reference to some of the text classes.
1991 Special Document Classes
1997 manual for many more details.
2000 \begin_layout Standard
2002 \begin_inset Tabular
2003 <lyxtabular version="3" rows="7" columns="2">
2005 <column alignment="center" valignment="top" leftline="true" width="0pt">
2006 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
2007 <row topline="true" bottomline="true">
2008 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2011 \begin_layout Standard
2017 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2020 \begin_layout Standard
2027 <row topline="true">
2028 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2031 \begin_layout Standard
2037 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2040 \begin_layout Standard
2041 one-sided, no chapters
2047 <row topline="true">
2048 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2051 \begin_layout Standard
2057 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2060 \begin_layout Standard
2061 layout & environments for American Math Society
2067 <row topline="true">
2068 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2071 \begin_layout Standard
2077 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2080 \begin_layout Standard
2081 longer than article, two-sided
2087 <row topline="true" bottomline="true">
2088 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2091 \begin_layout Standard
2097 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2100 \begin_layout Standard
2101 report + front and back matter
2107 <row bottomline="true">
2108 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2111 \begin_layout Standard
2117 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2120 \begin_layout Standard
2121 transparencies (also including FoilTeX)
2127 <row bottomline="true">
2128 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2131 \begin_layout Standard
2137 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2140 \begin_layout Standard
2141 lots of extra environments for address, signature\SpecialChar \ldots{}
2155 \begin_layout Section
2156 Templates: Writing a Letter
2159 \begin_layout Standard
2160 One of the most popular text classes is
2165 One way to write a letter would be to open a new file, and choose
2174 ocument\SpecialChar \menuseparator
2182 While this is the most obvious way to write a letter, it seems like extra
2184 Every time you write a business letter, you want to have your address,
2185 the address you're sending to, a body, a signature, etc.
2190 for letters, which contains a sample letter; once you have a template,
2191 you can just replace a couple parts of the letter with your text each time
2195 \begin_layout Standard
2196 Open a new file with
2201 ile\SpecialChar \menuseparator
2216 Save and print the file to see how the various environments are typeset.
2219 \begin_layout Standard
2220 When you look at the
2224 menu, you'll see several environments, like the
2229 environment, which don't even exist in most other text classes.
2239 You can play around for a while to figure out how the various environments
2241 You'll notice for example that the
2245 environment has the word
2246 \begin_inset Quotes eld
2250 \begin_inset Quotes eld
2253 in red before the actual text of the signature.
2254 This word doesn't show up in the actual letter, as you'll see if you try
2256 It's just there to let you know where the signature goes.
2257 Also, note that it doesn't matter where in the file the
2262 Remember, LyX is WYSIWYM; you can put the
2266 environment anywhere you want, but LyX knows that in the printout, the
2267 signature should be at the end.
2270 \begin_layout Standard
2271 A template is just a regular LyX file.
2272 This means you can fill in your address and signature and save the file
2274 From now on, any time you want to write a letter, you can use the new template
2276 We probably don't have to suggest an actual
2277 \begin_inset Quotes eld
2281 \begin_inset Quotes erd
2284 here; just write a letter to someone!
2288 \begin_layout Standard
2289 One warning, if you're writing from a template.
2290 If you erase all of the text in an environment --- for example, if you
2296 field so that you can replace it with your own --- and then you move the
2297 cursor without writing any text, the environment may disappear.
2298 This is because most environments cannot exist without any text in them.
2299 Just reselect the environment from the
2303 menu to get it back.
2311 \begin_layout Standard
2312 Templates can be a huge time-saver, and we urge you to use them whenever
2314 In addition, they can help a person learn how to use some of the fancier
2316 Finally, they may be useful for a person who is configuring LyX for a bunch
2317 of less computer-aware users.
2318 When they're first learning LyX, it will be much less intimidating if they
2319 have a letter template customized for their company, for example.
2322 \begin_layout Section
2326 \begin_layout Standard
2327 LyX (like LaTeX) considers the title --- which may contain the actual title,
2328 the author, the date, and even an abstract of a paper --- to be a separate
2329 part of the document.
2332 \begin_layout Standard
2337 document and make sure it's using the
2345 \begin_layout Standard
2346 You should not be using the letter any more, since the
2350 textclass doesn't allow titles.
2355 Type a title on the first line, and change the line to the
2360 On the next line, type your name and change it to the
2365 On the next line, write the date in the
2370 Type a paragraph or two summarizing your document using the
2375 Notice how the title is presented when it's printed out.
2376 If you changed the document format to Book, you'll get a separate title
2377 page, like the first page of this tutorial.
2380 \begin_layout Standard
2385 : Fix the title, date, and author in
2390 \begin_layout Section
2391 Labels and Cross-References
2394 \begin_layout Standard
2395 \begin_inset LatexCommand label
2400 You can label a section (or subsubsection, or, more rarely, just a random
2401 piece of text) in your document.
2402 Once you do so, you can refer to this section in other parts of the document,
2403 using cross-references.
2404 You can refer either to the section's number, or to the page that the section
2406 As with sections and footnotes, LyX worries about the cross-references
2408 Automatic labels and cross-references are one of the best advantages of
2409 LyX (and LaTeX) over conventional word processors.
2412 \begin_layout Subsection*
2416 \begin_layout Standard
2417 Let's mark our second section, whose title is
2418 \begin_inset Quotes eld
2422 \begin_inset Quotes erd
2426 Click at the end of the section title line, and select
2431 nsert\SpecialChar \menuseparator
2439 A dialog asks you for a label name, and gives you a suggestion.
2444 , the label name will be placed in a box next to the section title.
2447 \begin_layout Standard
2448 By the way, you could have put the label right anywhere within the section
2449 as well; section references will refer to the last section or subsection
2450 whose heading comes before the label.
2451 However, putting it on the same line as the section title (or, perhaps,
2452 on the first line of the section's text) ensures that page references will
2453 reference the beginning of the section.
2456 \begin_layout Standard
2457 So far you haven't done anything --- the
2461 file will look exactly the same, since labels don't show up in the printed
2463 However, now that you've added a label, you can refer to that label with
2468 \begin_layout Subsection*
2469 Your first cross-references
2472 \begin_layout Standard
2473 Place the cursor somewhere in Section\InsetSpace ~
2478 \begin_layout LyX-Code
2479 If you want to know more about this document, then see
2485 \begin_layout Standard
2486 Now --- with the cursor after the word
2487 \begin_inset Quotes eld
2491 \begin_inset Quotes erd
2499 nsert\SpecialChar \menuseparator
2513 It shows a list of the possible labels you can reference.
2514 At the moment, there should be only one,
2515 \begin_inset Quotes eld
2519 \begin_inset Quotes erd
2523 Select it (it may be selected by default), and click
2528 Now put the cursor after the word
2529 \begin_inset Quotes eld
2533 \begin_inset Quotes erd
2536 , and change the reference type to use the page number then click
2541 (To be really correct, you should put a
2543 Protected\InsetSpace ~
2547 \begin_inset Quotes eld
2551 \begin_inset Quotes erd
2555 Same for the page reference.)
2558 \begin_layout Standard
2559 LyX puts the references in a box right where the cursor was.
2560 In the printed document, this reference marker will be replaced with either
2561 the page or section number (depending on what you selected in the
2571 iew\SpecialChar \menuseparator
2576 pdate\SpecialChar \menuseparator
2583 , and you'll see that on the last page we refer to
2584 \begin_inset Quotes eld
2587 Section\InsetSpace ~
2589 \begin_inset Quotes erd
2593 \begin_inset Quotes eld
2598 \begin_inset Quotes erd
2601 (or whatever page Section\InsetSpace ~
2605 \begin_layout Standard
2606 Conveniently, a cross-reference acts as a hyperlink when you're editing
2607 a document in LyX; clicking on it will pop up the
2617 will move the cursor to the referenced label.
2620 \begin_layout Subsection*
2621 More fun with labels
2624 \begin_layout Standard
2625 We told you that LyX worries about numbering cross-references; now you can
2627 Add a new section before Section\InsetSpace ~
2629 Now rerun LaTeX, and --- voilà ! --- the section cross reference changed
2631 \begin_inset Quotes eld
2635 \begin_inset Quotes erd
2639 \begin_inset Quotes eld
2643 \begin_inset Quotes erd
2646 to a subsection, and the cross-reference will reference Subsection\InsetSpace ~
2648 of Section\InsetSpace ~
2650 The page reference won't change unless you add a whole page of text before
2651 the label, of course.
2655 \begin_layout Standard
2656 If you want some more practice with labels, then try putting a new label
2657 where your first cross-reference was, and refer to that label from elsewhere
2659 If you'll be inserting cross-references often (if, for example, you're
2660 writing a journal article), it may be convenient to leave the
2667 \begin_layout Standard
2668 If you want to make sure that the cross-referencing gets the pages right
2669 even for larger documents,
2673 a couple pages of text from the
2677 to the clipboard, and
2681 the stolen text into your document
2685 \begin_layout Standard
2686 By the way, copying a chapter title may cause an error, because chapters
2687 aren't allowed in the article class.
2688 If this happens, just delete the chapter title.
2689 If you want to know why this happens, see Section\InsetSpace ~
2691 \begin_inset LatexCommand ref
2692 reference "sec:textclasses"
2705 \begin_layout Standard
2710 : Fix the references in
2715 \begin_layout Section
2716 Footnotes and Margin Notes
2719 \begin_layout Standard
2720 Footnotes can be added using the
2725 button in the toolbar
2729 \begin_layout Standard
2730 The button shows an arrow pointing to red text, which is just below some
2741 nsert\SpecialChar \menuseparator
2749 Click at the end of the word
2750 \begin_inset Quotes eld
2754 \begin_inset Quotes erd
2757 somewhere in your document and hit the
2763 A footnote box appears where you can enter the text of the footnote.
2764 LyX should place the cursor at the beginning of the footnote box.
2768 \begin_layout LyX-Code
2769 LyX is a typesetting word processor.
2772 \begin_layout Standard
2773 Now click on the button labelled
2774 \begin_inset Quotes eld
2778 \begin_inset Quotes erd
2781 The footnote box disappears, leaving the button showing where the footnote
2782 marker will be in the printed text; this is called
2783 \begin_inset Quotes eld
2787 \begin_inset Quotes erd
2791 You can unfold the footnote at any time --- and re-edit its text, if you
2792 want --- by clicking again on the
2793 \begin_inset Quotes eld
2797 \begin_inset Quotes erd
2803 \begin_layout Standard
2804 You may wonder why the footnote button is a word instead of a number.
2805 The answer is that LyX worries about the footnote numbering for you in
2807 You can see this yourself by looking at the
2812 If you add other footnotes, LyX will renumber the footnotes.
2813 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2814 there's really no need to put the numbers in the LyX file.
2817 \begin_layout Standard
2818 A footnote can be cut and pasted like normal text.
2819 Go ahead; try it! All you need to do is select the footnote button
2823 \begin_layout Standard
2824 It may be easier to select it using the keyboard.
2825 You might accidentally open the footnote if you're trying to select the
2826 marker itself with the mouse.
2840 In addition, you can change regular text to a footnote, by selecting it
2846 button; change a footnote to regular text by hitting the
2850 key when the cursor is in the first position of a footnote, or by hitting
2855 key when the cursor is in the very last position of the footnote, respectively.
2858 \begin_layout Standard
2859 Margin notes can be added using the toolbar button (the button shows an
2860 arrow pointing to red text next to (i.e., in the margin of) black text, and
2861 should be next to the
2866 button in the toolbar.) or
2871 nsert\SpecialChar \menuseparator
2876 arginal\InsetSpace ~
2880 Margin notes are like footnotes, except that:
2883 \begin_layout Itemize
2884 the on-screen boxes say
2885 \begin_inset Quotes eld
2889 \begin_inset Quotes erd
2893 \begin_inset Quotes eld
2897 \begin_inset Quotes erd
2903 \begin_layout Itemize
2904 the notes will be placed in the margin, instead of below the text
2907 \begin_layout Itemize
2908 margin notes are not numbered
2911 \begin_layout Standard
2912 Change your LyX footnote back to text, then select and change it to a margin
2914 Run LaTeX again to see what the margin note looks like.
2917 \begin_layout Standard
2922 : Fix the footnote in
2927 \begin_layout Section
2931 \begin_layout Standard
2932 \begin_inset LatexCommand label
2933 name "sec:bibliographies"
2937 Bibliographies (at least in the exact sciences) are similar to cross references.
2938 The bibliography contains a list of references at the end of the document,
2939 and they can be referenced from within the document.
2940 Like section titles, LyX and LaTeX make your job easier by automatically
2941 numbering the bibliography items and changing citations when the items'
2945 \begin_layout Standard
2946 Go to the end of the document and switch to the
2951 Now, each paragraph you type will be a reference.
2954 The Lyx Tutorial, by the LyX Documentation Team
2956 as your first reference.
2957 Note that LyX automatically puts a number in a box before each reference.
2958 Click on the boxed reference number, and a
2960 Bibliography\InsetSpace ~
2964 You use the first field, the
2968 , to refer to this reference within the LyX document.
2969 By default, it is a number.
2975 \begin_inset Quotes eld
2979 \begin_inset Quotes erd
2982 to make it easy to remember.
2985 \begin_layout Standard
2986 Now pick somewhere in your document that you would like to insert a reference.
2992 nsert\SpecialChar \menuseparator
3005 The right panel in this dialog lists all the bibliography entries, and
3006 this field allows you to choose which bibliography item you want to cite.
3008 \begin_inset Quotes eld
3012 \begin_inset Quotes erd
3015 (right now, that's the only item in the bibliography), then use the left
3016 arrow in the center to insert it.
3017 (You can have multiple citations in the same place by transferring a number
3018 of keys this way.) Now run LaTeX, and you'll see that the citation appears
3019 in brackets in the text, referring to the bibliography at the end of the
3023 \begin_layout Standard
3024 How are the other fields used? The
3036 dialog will put a remark (such as a reference to a page or chapter within
3037 the referenced book or article) in the brackets after the reference.
3038 If you want the references to have labels instead of numbers in the printed
3039 output (for example, some journals would use
3040 \begin_inset Quotes eld
3044 \begin_inset Quotes erd
3047 to refer to a paper written by Smith in 1995), use the
3056 Bibliography\InsetSpace ~
3061 As usual, you can see the
3068 \begin_layout Standard
3073 Fix the bibliography and citation in
3078 \begin_layout Section
3082 \begin_layout Standard
3083 You may want to put a table of contents at the beginning of your document.
3084 LyX makes this very easy to do.
3089 after your document title and before your first section title and choose
3095 nsert\SpecialChar \menuseparator
3102 C\SpecialChar \menuseparator
3113 \begin_inset Quotes eld
3117 \begin_inset Quotes erd
3120 will appear in a button on the first line of the document.
3124 \begin_layout Standard
3125 This may not appear to be very useful.
3126 However, if you look at your
3130 file, you will see that a table of contents has been generated, listing
3131 the various sections and subsections in your document.
3132 As usual, if you reorder sections or create new ones, you will see those
3137 file when you update it.
3141 \begin_layout Standard
3142 The table of contents is not printed in the on-screen version of the document,
3143 because you can't edit it anyway.
3144 However, you can display the table of contents in a separate window by
3145 clicking on the table of contents button, or by using
3150 ocument\SpecialChar \menuseparator
3160 The menu command will work even if you don't have a table of contents inset
3162 This is a very useful tool.
3169 window to move around your document.
3170 Clicking on a (sub)section title in the
3176 window will highlight that line and move the cursor (in the LyX editing
3177 window) to that place in the document.
3178 You can also use the arrow keys to move up and down in the table of contents.
3179 You may therefore find it convenient to leave this window open throughout
3181 You can get similar functionality from the
3188 menu, though, where the table of contents appears automatically.
3191 \begin_layout Standard
3192 To get rid of the Table of Contents, you can delete the table of contents
3193 button just like any other text.
3196 \begin_layout Standard
3201 : Fix the table of contents in
3206 \begin_layout Chapter
3210 \begin_layout Standard
3211 LaTeX is used by many scientists because it outputs great looking equations,
3212 avoiding the control characters used by word processors and their equation
3214 Many of these scientists are frustrated, however, because writing equations
3215 in LaTeX is more like programming than writing.
3216 Happily, LyX has WYSIWYM support for equations.
3217 If you are used to LaTeX, you'll find that all of the usual LaTeX math
3218 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3219 If, on the other hand, you've never written in LaTeX, then the
3224 will allow you to write professional-looking math quickly and easily
3228 \begin_layout Standard
3229 LyX can't check if the math you're writing is actually
3242 \begin_layout Section
3246 \begin_layout Standard
3247 Somewhere in your LyX document, type:
3250 \begin_layout LyX-Code
3251 I like what Einstein said, E=mc^2, because it's so simple.
3255 \begin_layout Standard
3256 Now, that equation doesn't look very good, even in the
3260 file; there's no space between the letters and the equals sign, and you'd
3261 like to write an actual superscript for the
3262 \begin_inset Quotes eld
3266 \begin_inset Quotes erd
3270 That bad typesetting happened because we didn't tell LyX that we were writing
3271 a mathematical expression, so it typeset the equation like regular old
3275 \begin_layout Standard
3276 Instead, we create a formula that will get typeset properly.
3277 In order to create a formula, just click the toolbar button with
3278 \begin_inset Formula $\frac{a+b}{c}$
3281 written on it in blue.
3282 LyX will insert a little blue square, which is an empty math formula.
3283 LyX has placed the cursor in the blue square, so just type
3288 The expression is typed in blue, and the blue square disappears as soon
3289 as the formula is not empty.
3294 to leave the equation The purple markers disappear, leaving the cursor
3295 to the right of the expression, and now if you type something, it will
3299 \begin_layout Standard
3300 Run LaTeX and look at the
3305 Notice that the expression was typeset nicely, with spaces between the
3306 letters and the equals sign, and a superscript
3307 \begin_inset Quotes eld
3311 \begin_inset Quotes erd
3315 Letters in math mode are assumed to be variables, and come out in italics.
3316 Numbers are just numbers.
3319 \begin_layout Standard
3320 This math editor is another example of the WYSIWYM philosophy.
3321 In LaTeX, you write a mathematical expression using text and commands like
3328 ; this can be frustrating, because you can't see what an expression looks
3329 like until you LaTeX the file, and may have to spend time to find missing
3331 \begin_inset Quotes eld
3335 \begin_inset Quotes erd
3339 On the other hand, LyX doesn't attempt to get the expression to look perfect
3340 (WYSIWYG), but it gives you an extremely good idea of what the expression
3342 LaTeX then takes care of the professional typesetting.
3343 99% of the time, you won't have to make any changes to the font sizes or
3344 spacing that LaTeX outputs.
3345 This way (sorry to be so repetitive) you can focus on the
3349 of your mathematical expressions, not their format.
3352 \begin_layout Section
3353 Navigating an Equation
3356 \begin_layout Standard
3358 \begin_inset Formula $E=mc^{2}$
3362 \begin_inset Formula $E=1+mc^{2}$
3366 Use the arrow keys to move the cursor into the expression.
3367 Note that when you enter the expression, the purple markers appear to let
3368 you know you're editing math.
3377 to move the cursor past the equals sign, and just type
3378 \begin_inset Quotes eld
3382 \begin_inset Quotes erd
3386 Again, you can use the arrow keys or
3390 to leave the formula\SpecialChar \@.
3394 \begin_layout Standard
3395 Other than the special keys described below, typing in math mode is like
3396 editing regular text.
3406 Select text either with the arrow keys or with the mouse.
3412 dit\SpecialChar \menuseparator
3419 works in math mode, as does cutting and pasting.
3420 One thing to be careful of: if you're right outside a formula and you type
3429 ), it will delete the whole expression.
3430 Luckily, you can just use
3437 \begin_layout Standard
3438 What if you want to change
3439 \begin_inset Formula $E=mc^{2}$
3443 \begin_inset Formula $E=mc^{2.5}+1$
3446 ? Again, you can use the mouse to click in the right place.
3447 However, you can also use the arrow keys.
3448 If the cursor is just after the
3449 \begin_inset Quotes eld
3453 \begin_inset Quotes erd
3457 \begin_inset Quotes eld
3461 \begin_inset Quotes erd
3468 will move the cursor to the level of the superscript, just before the
3469 \begin_inset Quotes eld
3473 \begin_inset Quotes erd
3478 \begin_inset Quotes eld
3482 \begin_inset Quotes erd
3490 will move the cursor back to the regular level.
3495 from anywhere within the superscript, the cursor will be placed just
3499 the superscript (so that you can then type the
3500 \begin_inset Quotes eld
3504 \begin_inset Quotes erd
3510 \begin_layout Section
3511 Exponents and Indices
3514 \begin_layout Standard
3515 An exponent can be entered from the
3520 (see below), but it's actually simpler just to type the caret key,
3521 \begin_inset Quotes eld
3525 \begin_inset Quotes erd
3529 LyX will place another blue rectangle in the superscript, so that whatever
3530 you write next will be superscripted, and in a smaller font size.
3531 Everything you type until you hit a
3539 to exit Mathed entirely) will be in the superscript.
3542 \begin_layout Standard
3543 Writing a subscript (index) is just as easy --- start one by typing the
3545 \begin_inset Quotes eld
3549 \begin_inset Quotes eld
3553 You can subscript and superscript both subscripts and superscripts like
3555 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3562 \begin_layout Standard
3574 \begin_layout Section
3580 \begin_layout Standard
3586 is a convenient way to enter symbols or to perform many complicated Mathed
3588 Many of these functions can be accomplished from the keyboard or the
3593 dit\SpecialChar \menuseparator
3607 \SpecialChar \menuseparator
3616 However, we're going to concentrate on using the
3621 , just to let you know what's out there; you can learn keyboard shortcuts
3622 later, from other manuals.
3630 \SpecialChar \menuseparator
3637 \SpecialChar \menuseparator
3644 now and leave it open while reading this section.
3647 \begin_layout Standard
3648 Right-clicking on a formula will open the
3655 \begin_layout Subsection
3659 \begin_layout Standard
3665 which allow you to choose from a large array of symbols used in math: various
3666 arrows, relations, operators, and sums and integrals.
3667 Note that subscripting and superscripting allow you to put lower and upper
3668 limits on sums and integrals.
3672 \begin_layout Standard
3673 \begin_inset Quotes eld
3676 Nothing you can do that can't be done\SpecialChar \ldots{}
3678 \begin_inset Formula $\heartsuit$
3682 \begin_inset Quotes erd
3688 \begin_layout Subsection
3689 Square roots, accents, and delimiters
3692 \begin_layout Standard
3693 To type a square root, just click on the button with a square root sign
3695 The square root appears, and the cursor is in a new insertion point inside
3697 You can type variables, numbers, other square roots, fractions, whatever
3699 LyX will automatically resize the square root to fit what's inside.
3702 \begin_layout Standard
3703 Accenting a character (
3704 \begin_inset Formula $\overrightarrow{v}$
3707 ) or group of characters (
3708 \begin_inset Formula $\overrightarrow{a+b}$
3711 ) is done the same way.
3716 types are available from the panel.
3717 Click on a decoration, and LyX will insert that decoration with an insertion
3718 point under (or over) it.
3719 Just type what you want in the insertion point.
3720 There are two sets of decorations: those that resize with the text you
3721 type, and those that have fixed size, and are most appropriate for a single
3726 \begin_layout Standard
3727 Delimiters such as parentheses, brackets, and braces work similarly, but
3728 are a bit more complicated.
3733 button, which features a blue square surrounded by brackets, to pop up
3739 Your current selection of delimiters is displayed in a box.
3740 It's a pair of parentheses by default, but you can choose a pair of braces,
3741 a brace and a parenthesis, or even choose the empty square to have something
3743 \begin_inset Quotes eld
3747 \begin_inset Formula $a=\left\langle 7\right.$
3751 \begin_inset Quotes erd
3754 (the empty delimiter is displayed as a broken line in LyX, but won't show
3758 \begin_layout Standard
3759 If you're lazy, you can type actual parentheses in math mode, rather than
3765 However, those parentheses will be the same size as regular text, which
3766 will look bad if you have a big fraction or matrix inside the parentheses.
3771 window will guarantee that the delimiters are sized based on what's inside
3775 \begin_layout Standard
3776 You can also put delimiters or a square root sign or a decoration on already
3778 Select the portion of the formula that you want to adjust, and then click
3779 on the button you want from the
3785 Try using this to change Newton's second law from scalar to vector form
3787 \begin_inset Formula $f=ma$
3791 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3795 Once you've learned about matrices, this is how you'll put parentheses
3796 or brackets around them.
3799 \begin_layout Subsection
3803 \begin_layout Standard
3804 Fractions are very simple in Mathed.
3814 , which shows a fraction with blue squares in the numerator and the denominator.
3815 LyX writes two insertion points in a fraction.
3816 As you would expect, you can use arrow keys or the mouse to move around
3818 Click on the top square and type
3819 \begin_inset Quotes eld
3823 \begin_inset Quotes erd
3832 \begin_inset Quotes eld
3836 \begin_inset Quotes erd
3840 You've made a fraction! Of course you can type anything within each of
3841 the two boxes: variables with exponents, square roots, other fractions,
3846 \begin_layout Standard
3858 \begin_layout Subsection
3859 TeX mode: Limits, log, sin and others
3862 \begin_layout Standard
3863 Because letters in math mode are considered to be variables, if you type
3865 \begin_inset Quotes eld
3869 \begin_inset Quotes erd
3872 in math mode, LyX thinks you're typing the product of the three variables
3874 \begin_inset Formula $s$
3878 \begin_inset Formula $i$
3882 \begin_inset Formula $n$
3886 The three letters will be typeset in italics, when what you really wanted
3888 \begin_inset Quotes eld
3892 \begin_inset Quotes erd
3896 In addition, LyX won't put a space between the word
3897 \begin_inset Quotes eld
3901 \begin_inset Quotes erd
3905 \begin_inset Quotes eld
3909 \begin_inset Quotes erd
3916 will just exit math mode).
3918 \begin_inset Quotes eld
3922 \begin_inset Formula $\sin x$
3926 \begin_inset Quotes erd
3930 \begin_inset Quotes eld
3934 \begin_inset Formula $sinx$
3938 \begin_inset Quotes erd
3944 \begin_layout Standard
3946 \begin_inset Quotes eld
3950 \begin_inset Quotes erd
3964 \begin_inset Quotes eld
3968 \begin_inset Quotes erd
3971 is written in black, in upright roman type.
3972 The whole word is treated as one symbol, so if you type
3976 , it will delete the whole word.
3978 \begin_inset Quotes eld
3982 \begin_inset Quotes erd
3985 , which will be written in blue italics, like you expect in Mathed.
3990 file, the expression will be correctly typeset.
3994 \begin_layout Standard
3995 Other commands you need to type in TeX mode using the
3999 box include other trigonometric functions and their inverses, hyperbolic
4000 functions, logarithms, limits, and quite a few others.
4001 These functions can take subscripts and superscripts, important for typing
4003 \begin_inset Quotes eld
4007 \begin_inset Formula $\cos^{2}\theta$
4011 \begin_inset Quotes erd
4015 \begin_inset Quotes eld
4019 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4023 \begin_inset Quotes erd
4029 \begin_layout Standard
4041 \begin_layout Subsection
4045 \begin_layout Standard
4046 \begin_inset LatexCommand label
4061 The dialog has two sliding bars which allow you to choose how many rows
4062 and columns you want in your matrix.
4063 Choose 2 rows and 3 columns and hit
4072 LyX prints 6 insertion points in a
4073 \begin_inset Formula $2\times3$
4077 As usual, you can put any sort of Mathed expression (a square root, another
4078 matrix, etc.) in each insertion point.
4079 You can also leave some of the insertion points empty if you want.
4082 \begin_layout Standard
4087 can be used to move horizontally between the columns of a matrix.
4088 Alternatively, you can use the arrow keys to move around - hitting
4092 at the end of one box will move to the next box,
4096 will move to the next row, etc.
4099 \begin_layout Standard
4100 If you suddenly need more rows or columns, use
4105 dit\SpecialChar \menuseparator
4110 ath\SpecialChar \menuseparator
4128 They add a row or column just after the current position.
4149 \begin_layout Standard
4154 for information on how to change the horizontal alignment of each column,
4155 and how to change the vertical position of the whole matrix.
4156 Note that if you want to write a table containing text, you should use
4157 LyX' wonderful table support, rather than trying to write text in a matrix.
4160 \begin_layout Subsection
4164 \begin_layout Standard
4165 All of the expressions we have written so far have been on the same line
4166 as the text that came before and after them, otherwise known as inline
4168 This is fine for short, simple expressions, but if you want to write larger
4169 ones, or if you want your expressions to stand out from the text, you need
4170 to write them in display mode.
4171 In addition, only displayed expressions can be labeled and numbered (see
4176 ), and multi-line equations (see Sec.
4178 \begin_inset LatexCommand ref
4179 reference "sec:multiline"
4183 ) must be in display mode.
4186 \begin_layout Standard
4196 , which represents a couple lines of text before and after a centered blue
4198 LyX inserts a formula, but the insertion point is on a new line, and it's
4199 centered within that line.
4200 Now type an expression and run LaTeX to see how it looks.
4205 button is actually a toggle; use it now to change a couple of your expressions
4206 to display mode and back.
4210 \begin_layout Standard
4211 Display mode has a couple differences from inline mode:
4214 \begin_layout Itemize
4215 The default font is larger for a few symbols, like
4216 \begin_inset Formula $\sum$
4220 \begin_inset Formula $\int$
4226 \begin_layout Itemize
4227 Subscripts and superscripts for limits and sums (but not integrals) are
4228 written under rather than next to the symbols
4231 \begin_layout Itemize
4235 \begin_layout Standard
4236 Other than these differences, though, displayed expressions and inline expressio
4237 ns are very similar.
4240 \begin_layout Standard
4241 One final note about the way displayed formulae are typeset: be careful
4242 about whether you're putting your equation into a new paragraph or not.
4243 If your formula is in the middle of a sentence or paragraph, then don't
4249 Doing so will cause the text
4253 the formula to start a new paragraph.
4254 That text will therefore be indented, which is probably not what you want.
4257 \begin_layout Standard
4262 : Put the various equations in
4266 into display mode, and see how they're typeset differently.
4269 \begin_layout Standard
4274 : Using various tools you've learned in this section, you should be able
4275 to write an equation like
4279 \begin_layout Standard
4280 After you've done it the hard way, why don't you give
4285 nsert\SpecialChar \menuseparator
4290 \SpecialChar \menuseparator
4304 \begin_inset Formula \[
4305 f(x)=\left\{ \begin{array}{cc}
4308 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4315 \begin_layout Section
4319 \begin_layout Standard
4320 Mathed can do plenty more.
4321 By now, you're familiar with the basics, so we'll just refer to the
4328 \begin_layout Itemize
4329 Labeling and numbering expressions
4332 \begin_layout Itemize
4333 Multi-line equations
4336 \begin_layout Itemize
4337 Change typefaces, e.g., to write bold-face text in an expression.
4340 \begin_layout Itemize
4341 Fine-tune font sizes and spacing within an expression.
4342 (Don't worry about this until your final draft!)
4345 \begin_layout Itemize
4347 These are very powerful, because you just define them once at the top of
4348 the document, and then you can use them throughout the document.
4349 If you change the macro definition, the references to the macro will be
4350 changed throughout the document.
4351 Macros can even take arguments.
4354 \begin_layout Itemize
4355 Do lots of other things we didn't have time to mention in this
4362 \begin_layout Chapter
4366 \begin_layout Section
4367 Other Major LyX Features
4370 \begin_layout Standard
4371 We haven't gone through all the possible commands in LyX, and we aren't
4377 for more information.
4378 We'll just mention a couple more major things LyX can do\SpecialChar \ldots{}
4382 \begin_layout Itemize
4383 LyX has WYSIWYM support for tables.
4389 nsert\SpecialChar \menuseparator
4397 Click on the table with the
4406 dialog box which allows extensive table editing.
4409 \begin_layout Itemize
4410 LyX also supports including pictures in a number of formats (including JPEG
4411 and other bitmap formats, PostScript® and raw LaTeX) within documents.
4417 nsert\SpecialChar \menuseparator
4425 Then click on the figure to choose the file to include, rotate or scale
4426 it, etc.) Tables and figures can have captions, and LyX will automatically
4427 generate lists of figures and/or tables.
4430 \begin_layout Itemize
4431 Version control is supported, using RCS (
4438 \begin_layout Itemize
4439 LyX is heavily configurable.
4440 Everything from how the LyX window looks to how the output comes out can
4441 be configured in a number of ways.
4442 Much configuration is done through
4447 ools\SpecialChar \menuseparator
4455 For more information on this, check out
4460 elp\SpecialChar \menuseparator
4465 ustomization\SpecialChar \@.
4469 \begin_layout Itemize
4470 LyX is being developed by a team of programmers on five continents.
4471 Therefore, LyX has better support for non-English languages (such as Dutch,
4472 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4473 ) than many word processors.
4474 Even some right-to-left languages like Hebrew or Arabic are supported.
4475 You can write documents in other languages, but you can also configure
4476 LyX to show its menus and error messages in other languages.
4480 \begin_layout Itemize
4481 The LyX menus feature keybindings.
4482 This means that you can do
4487 ile\SpecialChar \menuseparator
4502 or by using the binding which is shown next to it in the menu (C-O by default).
4503 Keybindings are also configurable.
4504 For information on this, check out
4509 elp\SpecialChar \menuseparator
4514 ustomization\SpecialChar \@.
4518 \begin_layout Itemize
4519 LyX can read in LaTeX documents.
4520 See Section\InsetSpace ~
4522 \begin_inset LatexCommand ref
4523 reference "sec:tex2lyx"
4530 \begin_layout Itemize
4531 Spellchecking and thesaurus facilities are available.
4534 \begin_layout Itemize
4535 The text box near the bottom of the LyX window is called the minibuffer
4536 (after a similar feature in
4541 This gives you access to all sorts of interesting functionality, including
4542 functionality which could break your document.
4543 In other words, don't type in the minibuffer unless you know what you're
4547 \begin_layout Section
4551 \begin_layout Standard
4552 \begin_inset LatexCommand label
4553 name "sec:latexusers"
4557 If you don't know anything about LaTeX, you don't have to read this section.
4558 Actually, you might want to
4562 about LaTeX, and then read this chapter.
4563 However, many people who begin to use LyX will be familiar with LaTeX.
4564 If you are such a person, you may be wondering if LyX can really do everything
4566 The short answer is that LyX can do pretty much everything LaTeX can do
4567 in one form or another, and it definitely simplifies most parts of writing
4569 The tool that is used to convert a LaTeX document to LyX was rewritten
4570 completely for LyX\InsetSpace ~
4572 It should now be able to handle most LaTeX gracefully.
4575 \begin_layout Standard
4576 Because this is just a tutorial, we are only going to mention things that
4577 new LyX users will most likely be interested in.
4578 In the interests of keeping the
4582 short, we will give only minimal information here.
4587 manual, specifically the
4589 Secrets of the LaTeX Masters
4591 chapter, has a great deal of information on differences between LyX and
4592 LaTeX, and how to do various LaTeX tricks in LyX.
4595 \begin_layout Subsection
4599 \begin_layout Standard
4600 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4601 will be displayed in red on the screen.
4602 You can use TeX commands in LyX by choosing
4607 nsert\SpecialChar \menuseparator
4616 This creates a text box, and everything within it is passed straight to
4620 \begin_layout Standard
4621 In a math formula, TeX mode is handled a bit differently.
4622 Enter TeX mode by typing a backslash.
4623 The backslash is not written out, but anything you type afterwards will
4625 You exit TeX mode by typing
4629 or some other non-alphabetic character, like a number, underscore, caret,
4631 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4632 will convert it to WYSIWYM\SpecialChar \@.
4633 So if, in a formula, you type
4639 , then when you type
4643 , LyX will change the red
4644 \begin_inset Quotes eld
4648 \begin_inset Quotes erd
4652 \begin_inset Quotes eld
4656 \begin_inset Formula $\gamma$
4660 \begin_inset Quotes erd
4664 This will work for almost all, non-complicated math macros.
4665 This may be faster than using the
4670 , and will be especially convenient for experienced LaTeX users.
4673 \begin_layout Standard
4674 As a special case, if you type a brace in TeX mode, then the beginning
4678 ending braces will be inserted in red, then take you
4682 of TeX mode and place the cursor between the braces.
4683 This makes it more convenient to type commands that LyX doesn't know which
4687 \begin_layout Standard
4688 LyX can't do absolutely everything that LaTeX can do (yet?).
4689 Some fancy functions are not supported at all, while some work but aren't
4691 TeX mode allows users to get the full flexibility of LaTeX, while having
4692 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4693 LyX could never support every LaTeX package.
4700 in the preamble (see Section\InsetSpace ~
4702 \begin_inset LatexCommand ref
4703 reference "sec:preamble"
4707 ), you can use any package you want --- although you won't have WYSIWYM
4708 support for that package's features.
4711 \begin_layout Subsection
4712 Importing LaTeX Documents ---
4717 \begin_layout Standard
4718 \begin_inset LatexCommand label
4723 You can import a LaTeX file into LyX by using the
4728 ile\SpecialChar \menuseparator
4733 mport\SpecialChar \menuseparator
4745 which will create a file
4753 --- and then open that file.
4754 If the translation doesn't work, you can try calling
4758 from the command line, possibly using fancier options.
4761 \begin_layout Standard
4766 will translate most legal LaTeX, but not everything.
4767 It will leave things it doesn't understand in TeX mode, so after translating
4772 , you can look for red text and hand-edit it to look right.
4775 \begin_layout Standard
4780 has its own manpage.
4781 Read it to find out about which LaTeX commands and environments aren't
4782 supported, bugs (and how to get around them), and how to use the various
4786 \begin_layout Subsection
4787 Converting LyX Documents to LaTeX
4790 \begin_layout Standard
4791 You might wish to convert a LyX Document to a LaTeX file.
4792 For example, a co-worker or co-author who doesn't have LyX might want to
4794 This is very easy to do with LyX.
4800 ile\SpecialChar \menuseparator
4805 xport\SpecialChar \menuseparator
4813 This will create a file
4821 file you are editing.
4822 LyX always creates temporary LaTeX files when viewing or printing files,
4823 so it is very good at generating LaTeX.
4826 \begin_layout Subsection
4830 \begin_layout Subsubsection
4834 \begin_layout Standard
4840 ocument\SpecialChar \menuseparator
4847 dialog takes care of many of the options that you would input in a
4854 Change the class, default font size and paper size here.
4855 Put any extra options to the
4873 \begin_layout Subsubsection
4874 Other Preamble Matter
4877 \begin_layout Standard
4878 \begin_inset LatexCommand label
4883 If you have special commands to put in the preamble of a LaTeX file, you
4884 can use them in a LyX document as well.
4890 ocument\SpecialChar \menuseparator
4902 and type in the dialog window (or from the document settings dialog, depending
4904 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4907 \begin_layout Subsection
4911 \begin_layout Standard
4912 LyX has support for BibTeX, which allows you to build databases of bibliographic
4913 al references to be used in multiple documents.
4919 nsert\SpecialChar \menuseparator
4926 C\SpecialChar \menuseparator
4939 Click on the resulting
4940 \begin_inset Quotes eld
4944 Generated\InsetSpace ~
4946 \begin_inset Quotes erd
4949 button, and you will get a
4958 field, type what you would type inside the braces of a
4968 \begin_layout Standard
4969 Like in regular LaTeX, multiple bibliographies should be separated by commas,
4980 field, type what you would type inside the braces of a
4989 \begin_layout Standard
4990 After you've done this, you can use citations from any bibliographies you're
4996 nsert\SpecialChar \menuseparator
5003 (see Section\InsetSpace ~
5005 \begin_inset LatexCommand ref
5006 reference "sec:bibliographies"
5011 LyX will take care of running BibTeX.
5016 dialog will show a list of all the references in your
5023 \begin_layout Section
5027 \begin_layout Standard
5028 Sometimes when you LaTeX a document, there will be errors, things that LyX
5029 or LaTeX can't understand.
5030 When this happens, LyX will open a
5036 Clicking on individual errors in this dialog will take you to the place
5037 in the LyX document where the error occurs and also display the detailed
5038 LaTeX error message.