1 #LyX 1.5.3svn 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
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 toolbar button
2721 \begin_inset Graphics
2722 filename ../images/footnote-insert.png
2730 Insert\SpecialChar \menuseparator
2734 Click at the end of the word
2735 \begin_inset Quotes eld
2739 \begin_inset Quotes erd
2742 somewhere in your document and click the
2743 \begin_inset Graphics
2744 filename ../images/footnote-insert.png
2751 A footnote box appears where you can enter the text of the footnote.
2752 LyX should place the cursor at the beginning of the footnote box.
2756 \begin_layout LyX-Code
2757 LyX is a typesetting word processor.
2760 \begin_layout Standard
2761 Now click on the button labelled
2762 \begin_inset Quotes eld
2766 \begin_inset Quotes erd
2769 The footnote box disappears, leaving the button showing where the footnote
2770 marker will be in the printed text; this is called
2771 \begin_inset Quotes eld
2775 \begin_inset Quotes erd
2779 You can unfold the footnote at any time --- and re-edit its text, if you
2780 want --- by clicking again on the
2781 \begin_inset Quotes eld
2785 \begin_inset Quotes erd
2791 \begin_layout Standard
2792 You may wonder why the footnote button is a word instead of a number.
2793 The answer is that LyX worries about the footnote numbering for you in
2795 You can see this yourself by looking at the
2800 If you add other footnotes, LyX will renumber the footnotes.
2801 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2802 there's really no need to put the numbers in the LyX file.
2805 \begin_layout Standard
2806 A footnote can be cut and pasted like normal text.
2807 Go ahead; try it! All you need to do is select the footnote button
2811 \begin_layout Standard
2812 It may be easier to select it using the keyboard.
2813 You might accidentally open the footnote if you're trying to select the
2814 marker itself with the mouse.
2828 In addition, you can change regular text to a footnote, by selecting it
2830 \begin_inset Graphics
2831 filename ../images/footnote-insert.png
2837 button; change a footnote to regular text by hitting the
2841 key when the cursor is in the first position of a footnote, or by hitting
2846 key when the cursor is in the very last position of the footnote, respectively.
2849 \begin_layout Standard
2850 Margin notes can be added using the menu
2852 Insert\SpecialChar \menuseparator
2853 Marginal\InsetSpace ~
2856 or the toolbar button
2857 \begin_inset Graphics
2858 filename ../images/marginalnote-insert.png
2865 Margin notes are like footnotes, except that:
2868 \begin_layout Itemize
2869 the on-screen boxes say
2870 \begin_inset Quotes eld
2874 \begin_inset Quotes erd
2878 \begin_inset Quotes eld
2882 \begin_inset Quotes erd
2888 \begin_layout Itemize
2889 the notes will be placed in the margin, instead of below the text
2892 \begin_layout Itemize
2893 margin notes are not numbered
2896 \begin_layout Standard
2897 Change your LyX footnote back to text, then select and change it to a margin
2899 Run LaTeX again to see what the margin note looks like.
2902 \begin_layout Standard
2907 : Fix the footnote in
2912 \begin_layout Section
2916 \begin_layout Standard
2917 \begin_inset LatexCommand label
2918 name "sec:bibliographies"
2922 Bibliographies (at least in the exact sciences) are similar to cross references.
2923 The bibliography contains a list of references at the end of the document,
2924 and they can be referenced from within the document.
2925 Like section titles, LyX and LaTeX make your job easier by automatically
2926 numbering the bibliography items and changing citations when the items'
2930 \begin_layout Standard
2931 Go to the end of the document and switch to the
2936 Now, each paragraph you type will be a reference.
2939 The Lyx Tutorial, by the LyX Documentation Team
2941 as your first reference.
2942 Note that LyX automatically puts a number in a box before each reference.
2943 Click on the boxed reference number, and a
2945 Bibliography\InsetSpace ~
2949 You use the first field, the
2953 , to refer to this reference within the LyX document.
2954 By default, it is a number.
2960 \begin_inset Quotes eld
2964 \begin_inset Quotes erd
2967 to make it easy to remember.
2970 \begin_layout Standard
2971 Now pick somewhere in your document that you would like to insert a reference.
2977 nsert\SpecialChar \menuseparator
2990 The right panel in this dialog lists all the bibliography entries, and
2991 this field allows you to choose which bibliography item you want to cite.
2993 \begin_inset Quotes eld
2997 \begin_inset Quotes erd
3000 (right now, that's the only item in the bibliography), then use the left
3001 arrow in the center to insert it.
3002 (You can have multiple citations in the same place by transferring a number
3003 of keys this way.) Now run LaTeX, and you'll see that the citation appears
3004 in brackets in the text, referring to the bibliography at the end of the
3008 \begin_layout Standard
3009 How are the other fields used? The
3021 dialog will put a remark (such as a reference to a page or chapter within
3022 the referenced book or article) in the brackets after the reference.
3023 If you want the references to have labels instead of numbers in the printed
3024 output (for example, some journals would use
3025 \begin_inset Quotes eld
3029 \begin_inset Quotes erd
3032 to refer to a paper written by Smith in 1995), use the
3041 Bibliography\InsetSpace ~
3046 As usual, you can see the
3053 \begin_layout Standard
3058 Fix the bibliography and citation in
3063 \begin_layout Section
3067 \begin_layout Standard
3068 You may want to put a table of contents at the beginning of your document.
3069 LyX makes this very easy to do.
3074 after your document title and before your first section title and choose
3080 nsert\SpecialChar \menuseparator
3087 C\SpecialChar \menuseparator
3098 \begin_inset Quotes eld
3102 \begin_inset Quotes erd
3105 will appear in a button on the first line of the document.
3109 \begin_layout Standard
3110 This may not appear to be very useful.
3111 However, if you look at your
3115 file, you will see that a table of contents has been generated, listing
3116 the various sections and subsections in your document.
3117 As usual, if you reorder sections or create new ones, you will see those
3122 file when you update it.
3126 \begin_layout Standard
3127 The table of contents is not printed in the on-screen version of the document,
3128 because you can't edit it anyway.
3129 However, you can display the table of contents in a separate window by
3130 clicking on the table of contents button, or by using
3135 ocument\SpecialChar \menuseparator
3145 The menu command will work even if you don't have a table of contents inset
3147 This is a very useful tool.
3154 window to move around your document.
3155 Clicking on a (sub)section title in the
3161 window will highlight that line and move the cursor (in the LyX editing
3162 window) to that place in the document.
3163 You can also use the arrow keys to move up and down in the table of contents.
3164 You may therefore find it convenient to leave this window open throughout
3166 You can get similar functionality from the
3173 menu, though, where the table of contents appears automatically.
3176 \begin_layout Standard
3177 To get rid of the Table of Contents, you can delete the table of contents
3178 button just like any other text.
3181 \begin_layout Standard
3186 : Fix the table of contents in
3191 \begin_layout Chapter
3195 \begin_layout Standard
3196 LaTeX is used by many scientists because it outputs great looking equations,
3197 avoiding the control characters used by word processors and their equation
3199 Many of these scientists are frustrated, however, because writing equations
3200 in LaTeX is more like programming than writing.
3201 Happily, LyX has WYSIWYM support for equations.
3202 If you are used to LaTeX, you'll find that all of the usual LaTeX math
3203 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3204 If, on the other hand, you've never written in LaTeX, then the
3209 will allow you to write professional-looking math quickly and easily
3213 \begin_layout Standard
3214 LyX can't check if the math you're writing is actually
3227 \begin_layout Section
3231 \begin_layout Standard
3232 Somewhere in your LyX document, type:
3235 \begin_layout LyX-Code
3236 I like what Einstein said, E=mc^2, because it's so simple.
3240 \begin_layout Standard
3241 Now, that equation doesn't look very good, even in the
3245 file; there's no space between the letters and the equals sign, and you'd
3246 like to write an actual superscript for the
3247 \begin_inset Quotes eld
3251 \begin_inset Quotes erd
3255 That bad typesetting happened because we didn't tell LyX that we were writing
3256 a mathematical expression, so it typeset the equation like regular old
3260 \begin_layout Standard
3261 Instead, we create a formula that will get typeset properly.
3262 In order to create a formula, just click the toolbar button with
3263 \begin_inset Formula $\frac{a+b}{c}$
3266 written on it in blue.
3267 LyX will insert a little blue square, which is an empty math formula.
3268 LyX has placed the cursor in the blue square, so just type
3273 The expression is typed in blue, and the blue square disappears as soon
3274 as the formula is not empty.
3279 to leave the equation The purple markers disappear, leaving the cursor
3280 to the right of the expression, and now if you type something, it will
3284 \begin_layout Standard
3285 Run LaTeX and look at the
3290 Notice that the expression was typeset nicely, with spaces between the
3291 letters and the equals sign, and a superscript
3292 \begin_inset Quotes eld
3296 \begin_inset Quotes erd
3300 Letters in math mode are assumed to be variables, and come out in italics.
3301 Numbers are just numbers.
3304 \begin_layout Standard
3305 This math editor is another example of the WYSIWYM philosophy.
3306 In LaTeX, you write a mathematical expression using text and commands like
3313 ; this can be frustrating, because you can't see what an expression looks
3314 like until you LaTeX the file, and may have to spend time to find missing
3316 \begin_inset Quotes eld
3320 \begin_inset Quotes erd
3324 On the other hand, LyX doesn't attempt to get the expression to look perfect
3325 (WYSIWYG), but it gives you an extremely good idea of what the expression
3327 LaTeX then takes care of the professional typesetting.
3328 99% of the time, you won't have to make any changes to the font sizes or
3329 spacing that LaTeX outputs.
3330 This way (sorry to be so repetitive) you can focus on the
3334 of your mathematical expressions, not their format.
3337 \begin_layout Section
3338 Navigating an Equation
3341 \begin_layout Standard
3343 \begin_inset Formula $E=mc^{2}$
3347 \begin_inset Formula $E=1+mc^{2}$
3351 Use the arrow keys to move the cursor into the expression.
3352 Note that when you enter the expression, the purple markers appear to let
3353 you know you're editing math.
3362 to move the cursor past the equals sign, and just type
3363 \begin_inset Quotes eld
3367 \begin_inset Quotes erd
3371 Again, you can use the arrow keys or
3375 to leave the formula\SpecialChar \@.
3379 \begin_layout Standard
3380 Other than the special keys described below, typing in math mode is like
3381 editing regular text.
3391 Select text either with the arrow keys or with the mouse.
3397 dit\SpecialChar \menuseparator
3404 works in math mode, as does cutting and pasting.
3405 One thing to be careful of: if you're right outside a formula and you type
3414 ), it will delete the whole expression.
3415 Luckily, you can just use
3422 \begin_layout Standard
3423 What if you want to change
3424 \begin_inset Formula $E=mc^{2}$
3428 \begin_inset Formula $E=mc^{2.5}+1$
3431 ? Again, you can use the mouse to click in the right place.
3432 However, you can also use the arrow keys.
3433 If the cursor is just after the
3434 \begin_inset Quotes eld
3438 \begin_inset Quotes erd
3442 \begin_inset Quotes eld
3446 \begin_inset Quotes erd
3453 will move the cursor to the level of the superscript, just before the
3454 \begin_inset Quotes eld
3458 \begin_inset Quotes erd
3463 \begin_inset Quotes eld
3467 \begin_inset Quotes erd
3475 will move the cursor back to the regular level.
3480 from anywhere within the superscript, the cursor will be placed just
3484 the superscript (so that you can then type the
3485 \begin_inset Quotes eld
3489 \begin_inset Quotes erd
3495 \begin_layout Section
3496 Exponents and Indices
3499 \begin_layout Standard
3500 An exponent can be entered from the
3505 (see below), but it's actually simpler just to type the caret key,
3506 \begin_inset Quotes eld
3510 \begin_inset Quotes erd
3514 LyX will place another blue rectangle in the superscript, so that whatever
3515 you write next will be superscripted, and in a smaller font size.
3516 Everything you type until you hit a
3524 to exit Mathed entirely) will be in the superscript.
3527 \begin_layout Standard
3528 Writing a subscript (index) is just as easy --- start one by typing the
3530 \begin_inset Quotes eld
3534 \begin_inset Quotes eld
3538 You can subscript and superscript both subscripts and superscripts like
3540 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3547 \begin_layout Standard
3559 \begin_layout Section
3563 \begin_layout Standard
3569 is a convenient way to enter symbols or to perform many complicated Mathed
3571 Many of these functions can be accomplished from the keyboard or the
3573 Edit\SpecialChar \menuseparator
3578 Insert\SpecialChar \menuseparator
3582 However, we're going to concentrate on using the
3587 , just to let you know what's out there; you can learn keyboard shortcuts
3588 later, from other manuals.
3591 \begin_layout Standard
3596 can be turned on in the menu
3598 View\SpecialChar \menuseparator
3602 When you click there on
3603 \begin_inset Quotes eld
3607 \begin_inset Quotes erd
3610 the toolbar will be shown permanently at the bottom; this state is visualized
3615 menu with a checkmark.
3616 When you click in this state again on
3617 \begin_inset Quotes eld
3621 \begin_inset Quotes erd
3632 is only shown when the cursor is within a formula; this state is visualized
3633 by the renaming of the menu entry from
3634 \begin_inset Quotes eld
3638 \begin_inset Quotes erd
3642 \begin_inset Quotes eld
3647 \begin_inset Quotes erd
3653 \begin_layout Subsection
3657 \begin_layout Standard
3663 which allow you to choose from a large array of symbols used in math: various
3664 arrows, relations, operators, and sums and integrals.
3665 Note that subscripting and superscripting allow you to put lower and upper
3666 limits on sums and integrals.
3670 \begin_layout Standard
3671 \begin_inset Quotes eld
3674 Nothing you can do that can't be done\SpecialChar \ldots{}
3676 \begin_inset Formula $\heartsuit$
3680 \begin_inset Quotes erd
3686 \begin_layout Subsection
3687 Square roots, accents, and delimiters
3690 \begin_layout Standard
3691 To type a square root, just click on the button with a square root sign
3693 The square root appears, and the cursor is in a new insertion point inside
3695 You can type variables, numbers, other square roots, fractions, whatever
3697 LyX will automatically resize the square root to fit what's inside.
3700 \begin_layout Standard
3701 Accenting a character (
3702 \begin_inset Formula $\overrightarrow{v}$
3705 ) or group of characters (
3706 \begin_inset Formula $\overrightarrow{a+b}$
3709 ) is done the same way.
3714 types are available from the toolbar.
3715 Click on a decoration, and LyX will insert that decoration with an insertion
3716 point under (or over) it.
3717 Just type what you want in the insertion point.
3718 There are two sets of decorations: those that resize with the text you
3719 type, and those that have fixed size, and are most appropriate for a single
3724 \begin_layout Standard
3725 Delimiters such as parentheses, brackets, and braces work similarly, but
3726 are a bit more complicated.
3731 button, which features a blue square surrounded by brackets, to pop up
3737 Your current selection of delimiters is displayed in a box.
3738 It's a pair of parentheses by default, but you can choose a pair of braces,
3739 a brace and a parenthesis, or even choose the empty square to have something
3741 \begin_inset Quotes eld
3745 \begin_inset Formula $a=\left\langle 7\right.$
3749 \begin_inset Quotes erd
3752 (the empty delimiter is displayed as a broken line in LyX, but won't show
3756 \begin_layout Standard
3757 If you're lazy, you can type actual parentheses in math mode, rather than
3763 However, those parentheses will be the same size as regular text, which
3764 will look bad if you have a big fraction or matrix inside the parentheses.
3769 window will guarantee that the delimiters are sized based on what's inside
3773 \begin_layout Standard
3774 You can also put delimiters or a square root sign or a decoration on already
3776 Select the portion of the formula that you want to adjust, and then click
3777 on the button you want from the
3783 Try using this to change Newton's second law from scalar to vector form
3785 \begin_inset Formula $f=ma$
3789 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3793 Once you've learned about matrices, this is how you'll put parentheses
3794 or brackets around them.
3797 \begin_layout Subsection
3801 \begin_layout Standard
3802 Fractions are very simple in Mathed.
3812 , which shows a fraction with blue squares in the numerator and the denominator.
3813 LyX writes two insertion points in a fraction.
3814 As you would expect, you can use arrow keys or the mouse to move around
3816 Click on the top square and type
3817 \begin_inset Quotes eld
3821 \begin_inset Quotes erd
3830 \begin_inset Quotes eld
3834 \begin_inset Quotes erd
3838 You've made a fraction! Of course you can type anything within each of
3839 the two boxes: variables with exponents, square roots, other fractions,
3844 \begin_layout Standard
3856 \begin_layout Subsection
3857 TeX mode: Limits, log, sin and others
3860 \begin_layout Standard
3861 Because letters in math mode are considered to be variables, if you type
3863 \begin_inset Quotes eld
3867 \begin_inset Quotes erd
3870 in math mode, LyX thinks you're typing the product of the three variables
3872 \begin_inset Formula $s$
3876 \begin_inset Formula $i$
3880 \begin_inset Formula $n$
3884 The three letters will be typeset in italics, when what you really wanted
3886 \begin_inset Quotes eld
3890 \begin_inset Quotes erd
3894 In addition, LyX won't put a space between the word
3895 \begin_inset Quotes eld
3899 \begin_inset Quotes erd
3903 \begin_inset Quotes eld
3907 \begin_inset Quotes erd
3914 will just exit math mode).
3916 \begin_inset Quotes eld
3920 \begin_inset Formula $\sin x$
3924 \begin_inset Quotes erd
3928 \begin_inset Quotes eld
3932 \begin_inset Formula $sinx$
3936 \begin_inset Quotes erd
3942 \begin_layout Standard
3944 \begin_inset Quotes eld
3948 \begin_inset Quotes erd
3962 \begin_inset Quotes eld
3966 \begin_inset Quotes erd
3969 is written in black, in upright roman type.
3970 The whole word is treated as one symbol, so if you type
3974 , it will delete the whole word.
3976 \begin_inset Quotes eld
3980 \begin_inset Quotes erd
3983 , which will be written in blue italics, like you expect in Mathed.
3988 file, the expression will be correctly typeset.
3992 \begin_layout Standard
3993 Other commands you need to type in TeX mode using the
3997 box include other trigonometric functions and their inverses, hyperbolic
3998 functions, logarithms, limits, and quite a few others.
3999 These functions can take subscripts and superscripts, important for typing
4001 \begin_inset Quotes eld
4005 \begin_inset Formula $\cos^{2}\theta$
4009 \begin_inset Quotes erd
4013 \begin_inset Quotes eld
4017 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4021 \begin_inset Quotes erd
4027 \begin_layout Standard
4039 \begin_layout Subsection
4043 \begin_layout Standard
4044 \begin_inset LatexCommand label
4059 The dialog has two sliding bars which allow you to choose how many rows
4060 and columns you want in your matrix.
4061 Choose 2 rows and 3 columns and hit
4070 LyX prints 6 insertion points in a
4071 \begin_inset Formula $2\times3$
4075 As usual, you can put any sort of Mathed expression (a square root, another
4076 matrix, etc.) in each insertion point.
4077 You can also leave some of the insertion points empty if you want.
4080 \begin_layout Standard
4085 can be used to move horizontally between the columns of a matrix.
4086 Alternatively, you can use the arrow keys to move around - hitting
4090 at the end of one box will move to the next box,
4094 will move to the next row, etc.
4097 \begin_layout Standard
4098 If you suddenly need more rows or columns, use
4103 dit\SpecialChar \menuseparator
4108 ath\SpecialChar \menuseparator
4126 They add a row or column just after the current position.
4147 \begin_layout Standard
4152 for information on how to change the horizontal alignment of each column,
4153 and how to change the vertical position of the whole matrix.
4154 Note that if you want to write a table containing text, you should use
4155 LyX' wonderful table support, rather than trying to write text in a matrix.
4158 \begin_layout Subsection
4162 \begin_layout Standard
4163 All of the expressions we have written so far have been on the same line
4164 as the text that came before and after them, otherwise known as inline
4166 This is fine for short, simple expressions, but if you want to write larger
4167 ones, or if you want your expressions to stand out from the text, you need
4168 to write them in display mode.
4169 In addition, only displayed expressions can be labeled and numbered (see
4174 ), and multi-line equations (see Sec.
4176 \begin_inset LatexCommand ref
4177 reference "sec:multiline"
4181 ) must be in display mode.
4184 \begin_layout Standard
4194 , which represents a couple lines of text before and after a centered blue
4196 LyX inserts a formula, but the insertion point is on a new line, and it's
4197 centered within that line.
4198 Now type an expression and run LaTeX to see how it looks.
4203 button is actually a toggle; use it now to change a couple of your expressions
4204 to display mode and back.
4208 \begin_layout Standard
4209 Display mode has a couple differences from inline mode:
4212 \begin_layout Itemize
4213 The default font is larger for a few symbols, like
4214 \begin_inset Formula $\sum$
4218 \begin_inset Formula $\int$
4224 \begin_layout Itemize
4225 Subscripts and superscripts for limits and sums (but not integrals) are
4226 written under rather than next to the symbols
4229 \begin_layout Itemize
4233 \begin_layout Standard
4234 Other than these differences, though, displayed expressions and inline expressio
4235 ns are very similar.
4238 \begin_layout Standard
4239 One final note about the way displayed formulae are typeset: be careful
4240 about whether you're putting your equation into a new paragraph or not.
4241 If your formula is in the middle of a sentence or paragraph, then don't
4247 Doing so will cause the text
4251 the formula to start a new paragraph.
4252 That text will therefore be indented, which is probably not what you want.
4255 \begin_layout Standard
4260 : Put the various equations in
4264 into display mode, and see how they're typeset differently.
4267 \begin_layout Standard
4272 : Using various tools you've learned in this section, you should be able
4273 to write an equation like
4277 \begin_layout Standard
4278 After you've done it the hard way, why don't you give
4283 nsert\SpecialChar \menuseparator
4288 \SpecialChar \menuseparator
4302 \begin_inset Formula \[
4303 f(x)=\left\{ \begin{array}{cc}
4306 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4313 \begin_layout Section
4317 \begin_layout Standard
4318 Mathed can do plenty more.
4319 By now, you're familiar with the basics, so we'll just refer to the
4326 \begin_layout Itemize
4327 Labeling and numbering expressions
4330 \begin_layout Itemize
4331 Multi-line equations
4334 \begin_layout Itemize
4335 Change typefaces, e.g., to write bold-face text in an expression.
4338 \begin_layout Itemize
4339 Fine-tune font sizes and spacing within an expression.
4340 (Don't worry about this until your final draft!)
4343 \begin_layout Itemize
4345 These are very powerful, because you just define them once at the top of
4346 the document, and then you can use them throughout the document.
4347 If you change the macro definition, the references to the macro will be
4348 changed throughout the document.
4349 Macros can even take arguments.
4352 \begin_layout Itemize
4353 Do lots of other things we didn't have time to mention in this
4360 \begin_layout Chapter
4364 \begin_layout Section
4365 Other Major LyX Features
4368 \begin_layout Standard
4369 We haven't gone through all the possible commands in LyX, and we aren't
4375 for more information.
4376 We'll just mention a couple more major things LyX can do\SpecialChar \ldots{}
4380 \begin_layout Itemize
4381 LyX has WYSIWYM support for tables.
4387 nsert\SpecialChar \menuseparator
4395 Click on the table with the
4404 dialog box which allows extensive table editing.
4407 \begin_layout Itemize
4408 LyX also supports including pictures in any format within documents.
4414 nsert\SpecialChar \menuseparator
4422 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4423 can have captions, and LyX will automatically generate lists of figures
4427 \begin_layout Itemize
4428 Version control is supported, using RCS (
4435 \begin_layout Itemize
4436 LyX is heavily configurable.
4437 Everything from how the LyX window looks to how the output comes out can
4438 be configured in a number of ways.
4439 Much configuration is done through
4444 ools\SpecialChar \menuseparator
4452 For more information on this, check out
4457 elp\SpecialChar \menuseparator
4462 ustomization\SpecialChar \@.
4466 \begin_layout Itemize
4467 LyX is being developed by a team of programmers on five continents.
4468 Therefore, LyX has better support for non-English languages (such as Dutch,
4469 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4470 ) than many word processors.
4471 Even some right-to-left languages like Hebrew or Arabic are supported.
4472 You can write documents in other languages, but you can also configure
4473 LyX to show its menus and error messages in other languages.
4477 \begin_layout Itemize
4478 The LyX menus feature keybindings.
4479 This means that you can do
4484 ile\SpecialChar \menuseparator
4499 or by using the binding which is shown next to it in the menu (C-O by default).
4500 Keybindings are also configurable.
4501 For information on this, check out
4506 elp\SpecialChar \menuseparator
4511 ustomization\SpecialChar \@.
4515 \begin_layout Itemize
4516 LyX can read in LaTeX documents.
4517 See Section\InsetSpace ~
4519 \begin_inset LatexCommand ref
4520 reference "sec:tex2lyx"
4527 \begin_layout Itemize
4528 Spellchecking and thesaurus facilities are available.
4531 \begin_layout Itemize
4532 The text box near the bottom of the LyX window is called the minibuffer
4533 (after a similar feature in
4538 This gives you access to all sorts of interesting functionality, including
4539 functionality which could break your document.
4540 In other words, don't type in the minibuffer unless you know what you're
4544 \begin_layout Section
4548 \begin_layout Standard
4549 \begin_inset LatexCommand label
4550 name "sec:latexusers"
4554 If you don't know anything about LaTeX, you don't have to read this section.
4555 Actually, you might want to
4559 about LaTeX, and then read this chapter.
4560 However, many people who begin to use LyX will be familiar with LaTeX.
4561 If you are such a person, you may be wondering if LyX can really do everything
4563 The short answer is that LyX can do pretty much everything LaTeX can do
4564 in one form or another, and it definitely simplifies most parts of writing
4566 The tool that is used to convert a LaTeX document to LyX was rewritten
4567 completely for LyX\InsetSpace ~
4569 It should now be able to handle most LaTeX gracefully.
4572 \begin_layout Standard
4573 Because this is just a tutorial, we are only going to mention things that
4574 new LyX users will most likely be interested in.
4575 In the interests of keeping the
4579 short, we will give only minimal information here.
4584 manual, specifically the
4586 Secrets of the LaTeX Masters
4588 chapter, has a great deal of information on differences between LyX and
4589 LaTeX, and how to do various LaTeX tricks in LyX.
4592 \begin_layout Subsection
4596 \begin_layout Standard
4597 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4598 will be displayed in red on the screen.
4599 You can use TeX commands in LyX by choosing
4604 nsert\SpecialChar \menuseparator
4613 This creates a text box, and everything within it is passed straight to
4617 \begin_layout Standard
4618 In a math formula, TeX mode is handled a bit differently.
4619 Enter TeX mode by typing a backslash.
4620 The backslash is not written out, but anything you type afterwards will
4622 You exit TeX mode by typing
4626 or some other non-alphabetic character, like a number, underscore, caret,
4628 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4629 will convert it to WYSIWYM\SpecialChar \@.
4630 So if, in a formula, you type
4636 , then when you type
4640 , LyX will change the red
4641 \begin_inset Quotes eld
4645 \begin_inset Quotes erd
4649 \begin_inset Quotes eld
4653 \begin_inset Formula $\gamma$
4657 \begin_inset Quotes erd
4661 This will work for almost all, non-complicated math macros.
4662 This may be faster than using the
4667 , and will be especially convenient for experienced LaTeX users.
4670 \begin_layout Standard
4671 As a special case, if you type a brace in TeX mode, then the beginning
4675 ending braces will be inserted in red, then take you
4679 of TeX mode and place the cursor between the braces.
4680 This makes it more convenient to type commands that LyX doesn't know which
4684 \begin_layout Standard
4685 LyX can't do absolutely everything that LaTeX can do (yet?).
4686 Some fancy functions are not supported at all, while some work but aren't
4688 TeX mode allows users to get the full flexibility of LaTeX, while having
4689 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4690 LyX could never support every LaTeX package.
4697 in the preamble (see Section\InsetSpace ~
4699 \begin_inset LatexCommand ref
4700 reference "sec:preamble"
4704 ), you can use any package you want --- although you won't have WYSIWYM
4705 support for that package's features.
4708 \begin_layout Subsection
4709 Importing LaTeX Documents ---
4714 \begin_layout Standard
4715 \begin_inset LatexCommand label
4720 You can import a LaTeX file into LyX by using the
4725 ile\SpecialChar \menuseparator
4730 mport\SpecialChar \menuseparator
4742 which will create a file
4750 --- and then open that file.
4751 If the translation doesn't work, you can try calling
4755 from the command line, possibly using fancier options.
4758 \begin_layout Standard
4763 will translate most legal LaTeX, but not everything.
4764 It will leave things it doesn't understand in TeX mode, so after translating
4769 , you can look for red text and hand-edit it to look right.
4772 \begin_layout Standard
4777 has its own manpage.
4778 Read it to find out about which LaTeX commands and environments aren't
4779 supported, bugs (and how to get around them), and how to use the various
4783 \begin_layout Subsection
4784 Converting LyX Documents to LaTeX
4787 \begin_layout Standard
4788 You might wish to convert a LyX Document to a LaTeX file.
4789 For example, a co-worker or co-author who doesn't have LyX might want to
4791 This is very easy to do with LyX.
4797 ile\SpecialChar \menuseparator
4802 xport\SpecialChar \menuseparator
4810 This will create a file
4818 file you are editing.
4819 LyX always creates temporary LaTeX files when viewing or printing files,
4820 so it is very good at generating LaTeX.
4823 \begin_layout Subsection
4827 \begin_layout Subsubsection
4831 \begin_layout Standard
4837 ocument\SpecialChar \menuseparator
4844 dialog takes care of many of the options that you would input in a
4851 Change the class, default font size and paper size here.
4852 Put any extra options to the
4870 \begin_layout Subsubsection
4871 Other Preamble Matter
4874 \begin_layout Standard
4875 \begin_inset LatexCommand label
4880 If you have special commands to put in the preamble of a LaTeX file, you
4881 can use them in a LyX document as well.
4887 ocument\SpecialChar \menuseparator
4892 ettings\SpecialChar \menuseparator
4904 and type in the dialog window (or from the document settings dialog, depending
4906 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4909 \begin_layout Subsection
4913 \begin_layout Standard
4914 LyX has support for BibTeX, which allows you to build databases of bibliographic
4915 al references to be used in multiple documents.
4921 nsert\SpecialChar \menuseparator
4928 C\SpecialChar \menuseparator
4941 Click on the resulting
4942 \begin_inset Quotes eld
4946 Generated\InsetSpace ~
4948 \begin_inset Quotes erd
4951 button, and you will get a
4960 field, type what you would type inside the braces of a
4970 \begin_layout Standard
4971 Like in regular LaTeX, multiple bibliographies should be separated by commas,
4982 field, type what you would type inside the braces of a
4991 \begin_layout Standard
4992 After you've done this, you can use citations from any bibliographies you're
4998 nsert\SpecialChar \menuseparator
5005 (see Section\InsetSpace ~
5007 \begin_inset LatexCommand ref
5008 reference "sec:bibliographies"
5013 LyX will take care of running BibTeX.
5018 dialog will show a list of all the references in your
5025 \begin_layout Section
5029 \begin_layout Standard
5030 Sometimes when you LaTeX a document, there will be errors, things that LyX
5031 or LaTeX can't understand.
5032 When this happens, LyX will open a
5038 Clicking on individual errors in this dialog will take you to the place
5039 in the LyX document where the error occurs and also display the detailed
5040 LaTeX error message.