1 #LyX 1.5.0svn created this file. For more info see http://www.lyx.org/
10 \font_typewriter default
11 \font_default_family default
17 \paperfontsize default
25 \paperorientation portrait
28 \paragraph_separation indent
30 \quotes_language english
33 \paperpagestyle headings
34 \tracking_changes false
50 \begin_layout Standard
51 Principal maintainer of this file is
56 If you have comments or error corrections, please send them to the LyX
57 Documentation mailing list,
59 lyx-docs@lists.lyx.org
69 \begin_layout Standard
70 \begin_inset LatexCommand tableofcontents
85 \begin_layout Standard
86 This file is designed for all of you who have never heard of LaTeX, or don't
88 Now, don't panic - you won't need to learn LaTeX to use LyX.
89 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
91 There are some things you will need to learn, however, in order to use
95 \begin_layout Standard
96 Some of you probably found your way to this document because you tried to
97 put two spaces after a
98 \begin_inset Quotes eld
102 \begin_inset Quotes erd
105 or tried to put 3 blank lines between paragraphs.
106 After much frustration, you found you couldn't.
107 In fact, you'll find that most of the little tricks you're accustomed to
108 using in other word processors just won't work in LyX.
109 That's because most word processors you've used before allow you to manually
110 enter all spacings, font changes, and so on.
111 So you end up not only writing a document but typesetting it, too.
112 LyX does the typesetting for you, in a consistent fashion, letting you
113 focus on the important things, like the content of your writing.
116 \begin_layout Standard
117 So, bear with us and read on.
118 Reading this tutorial is definitely worth the time.
121 \begin_layout Section
131 \begin_layout Standard
132 Before we get started with this section, we want to make a quick note of
138 uses the notation outlined in the
143 If you came to this manual first, go read the
151 \begin_layout Standard
152 Now that you know which fonts mean what, we want to talk a bit about what
160 \begin_layout Subsection
161 Getting the Most out of the Tutorial
164 \begin_layout Standard
165 This tutorial consists of examples and exercises.
166 To get the most out of this document, you should read through the document,
167 typing all the silly little things we're telling you to type and trying
168 out all of the exercises to see if you get them right.
169 For convenience, you might want to print out the PostScript® version of
173 \begin_layout Standard
174 If you are familiar with LaTeX, you'll probably be able to read the
178 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
179 However, LyX does have idiosyncrasies
183 \begin_layout Standard
184 or, more optimistically,
185 \begin_inset Quotes eld
189 \begin_inset Quotes erd
197 you'll want to learn about.
198 Even if you don't feel like reading the rest of the
202 , you should definitely check out Section\InsetSpace ~
204 \begin_inset LatexCommand ref
205 reference "sec:latexusers"
209 , which is specifically written for experienced LaTeX users.
212 \begin_layout Subsection
220 \begin_layout Itemize
221 Detailed explanations of all of LyX's features.
225 \begin_layout Standard
233 \begin_layout Standard
234 Seriously, though, we're here to get you up and running so that all you
240 If we tried to duplicate all of the information about all of LyX's features
245 would be redundant, too long, and forever out of date.
246 All we do here is introduce things; imagine there is a
247 \begin_inset Quotes eld
255 \begin_inset Quotes erd
258 at the end of every section.
262 \begin_layout Itemize
263 Detailed explanations of LaTeX.
267 \begin_layout Standard
269 If you're really curious about learning some of the neat tricks you can
270 do with LaTeX, you can always go get a LaTeX book.
271 There are several good ones on the market.
272 No need to reinvent the wheel, after all\SpecialChar \ldots{}
277 \begin_layout Standard
278 So, brave soul, it's time to move onwards.
279 Time for your first document \SpecialChar \ldots{}
283 \begin_layout Chapter
284 Getting Started with LyX
287 \begin_layout Section
288 Your First LyX Document
291 \begin_layout Standard
292 \begin_inset LatexCommand label
293 name "sec:first-doc-ex"
298 You're ready to start writing.
299 Before you do, though, there are a few things we need to mention, which
300 will hopefully make the
304 more instructive, useful, and fun.
308 \begin_layout Standard
309 Because there's lots of information that we won't be giving you, the
315 thing that you need to do is find the
320 Luckily, this is very simple.
336 You may want to load the
340 as well (if you're not reading it on screen already).
341 This way, you can read them while you're writing your own file
345 \begin_layout Standard
346 They can also serve as good examples of how to use the many features of
353 Note that once you've got more than one document open, you can use the
361 menu or the document tabs to switch between them.
366 will not cover in detail subjects which are described in the other LyX
368 This may make life a bit harder for you at the beginning, but it will keep
374 It will also get you in the habit of using the other manuals, which ---
375 in the long run --- will save you a lot of time.
378 \begin_layout Standard
383 , we're going to assume that you have a fully working version of LyX, as
388 or some other dvi viewer,
392 or some other way of converting
396 documents to PostScript® documents, and a working printer.
397 This is a lot to assume.
398 If any of this is not true, you (or a friendly system administrator) will
399 need to set up your system.
400 You can find information on setup in other manuals.
403 \begin_layout Standard
404 Finally, we've written a file to let you practice your LyX skills on.
410 Imagine that it was typed by someone who didn't know about any of LyX's
412 As you learn new LyX functions, we'll suggest that you fix those parts
419 \begin_inset Quotes eld
423 \begin_inset Quotes erd
426 hints about how to fix things
430 \begin_layout Standard
431 The hints are located in yellow
432 \begin_inset Quotes eld
436 \begin_inset Quotes erd
440 Access the text in a note by clicking on it.
446 If you want to cheat (or check what you've done), there's also a file called
451 which contains the same text as written and typeset by a LyX master.
454 \begin_layout Standard
455 The example files can be found in the
459 directory, which you can get to by selecting
464 ile\SpecialChar \menuseparator
471 and then clicking on the
479 Open the raw document, and use
484 ile\SpecialChar \menuseparator
492 to save a copy in your own directory for you to work on.
493 As you fix parts of the raw document, check to see how those changes affect
497 \begin_layout Standard
502 directory contains lots of other examples files.
503 They will show you how to do various fancy things with LyX.
504 They are especially useful to display things that (due to length or other
505 reasons) won't fit in the documentation.
510 , or when you're confused about how to do something fancy in LyX, take a
514 \begin_layout Subsection
515 Typing, Viewing, and Printing
518 \begin_layout Itemize
524 ile\SpecialChar \menuseparator
532 \begin_layout Itemize
533 Type a sentence like:
535 This is my first LyX document!
538 \begin_layout Itemize
539 Save your document with
544 ile\SpecialChar \menuseparator
554 \begin_layout Itemize
555 Run LaTeX to create a
564 iew\SpecialChar \menuseparator
572 You may see things being printed in the window you ran the
577 These are messages from LaTeX, which you can ignore for now.
586 viewer), which will pop up a new window displaying what your document will
587 look like when printed.
591 \begin_layout Standard
592 You can save time by leaving
596 running in the background.
602 iew\SpecialChar \menuseparator
607 pdate\SpecialChar \menuseparator
614 and just click on the
618 window (or unminimize it) after LaTeX finishes running.
626 \begin_layout Itemize
632 ile\SpecialChar \menuseparator
645 \begin_layout Standard
646 Congratulations! You've written and printed your first LyX document.
647 All of the rest is just details, which is covered in the rest of the
666 \begin_layout Subsection
670 \begin_layout Standard
671 LyX can of course do most of the things you're used to doing with a word
673 It will word-wrap and indent paragraphs automatically.
674 Here's a quick description of how to do some simple actions.
677 \begin_layout Description
678 Undo LyX has multiple levels of undo, which means you can undo everything
679 you've done since your current editing session started, by selecting
684 dit\SpecialChar \menuseparator
692 If you undo too much, just select
697 dit\SpecialChar \menuseparator
709 \begin_layout Standard
710 Currently, undo is limited to 100 steps.
711 Undo also doesn't work for
715 ; for instance, changes to the document layout.
716 Each of these is really a LyX bug.
720 \begin_layout Description
726 dit\SpecialChar \menuseparator
734 dit\SpecialChar \menuseparator
742 dit\SpecialChar \menuseparator
745 to cut, copy, and paste.
746 Or automatically paste selected text (including selections from other programs)
754 \begin_layout Description
760 dit\SpecialChar \menuseparator
770 In the dialog, search with the
784 button to replace a word you've found
788 \begin_layout Standard
789 Close the window when you're done.
790 Or leave it open if you find it more convenient.
791 Most dialog boxes in LyX --- including the
807 dialogs, as well as the various math dialogs can operate like this.
813 ile\SpecialChar \menuseparator
820 , won't let you type anything in the main LyX window until you actually
822 Just be sure you have the right window focus when you're trying to type
823 in the main LyX window or give a command in some other LyX dialog.
829 If you like, you can specify whether to make the search case-sensitive,
830 or to search for only complete words; you can also search backwards through
834 \begin_layout Description
835 Character\InsetSpace ~
840 text (which will generally put characters in italics), put it in
848 (usually small caps, used for people's names) from the toggle buttons in
854 dit\SpecialChar \menuseparator
865 \begin_layout Description
866 Toolbar There are buttons on the toolbar (just below the menus) which allow
867 you to do some of the more popular functions, such as
878 \begin_layout Standard
879 Of course, you haven't yet written enough to make most of these functions
881 As you write more, though, try undoing, pasting, etc.
884 \begin_layout Subsection
885 WYSIWYM: Whitespace in LyX
888 \begin_layout Standard
889 \begin_inset LatexCommand label
890 name "sec:whitespace"
894 One of the hardest things for new users to get used to is the way that LyX
896 As many times as you hit
900 , you'll only get one blank line.
901 As many times as you hit
905 , you'll only get one space.
906 On a blank line, LyX won't let you type even one space.
911 key won't move you forward one tab stop; in fact there
915 no tab stops! There's no ruler at the top of the page to let you set tabs
919 \begin_layout Standard
920 Many commercial word processors are based on the WYSIWYG principle:
921 \begin_inset Quotes eld
924 What You See Is What You Get.
925 \begin_inset Quotes erd
928 LyX, on the other hand, is based on the principle that
929 \begin_inset Quotes eld
932 What You See Is What You
937 \begin_inset Quotes erd
940 You type what you mean, and LyX will take care of typesetting it for you,
941 so that the output looks nice.
946 grammatically separates paragraphs, and a
950 grammatically separates words, so there is no reason to have several of
955 has no grammatical function at all, so LyX does not support it.
956 Using LyX, you'll spend more of your time worrying about the
960 of your document, and less time worrying about the
969 for more information on the WYSIWYM concept.
972 \begin_layout Standard
973 LyX does have (many) ways to fine-tune the formatting of your document.
974 After all, LyX might not typeset
983 has information about all that.
988 s and vertical space --- which are more powerful and versatile than multiple
989 spaces or blank lines --- and ways to change font sizes, character styles,
990 and paragraph alignments by hand.
991 The idea, though, is that you can write your whole document, focusing on
992 content, and just worry about that fine-tuning at the end.
993 With standard word processors, you'll be distracted by document formatting
994 throughout the writing process.
997 \begin_layout Section
1001 \begin_layout Standard
1002 Different parts of a document have different purposes; we call these parts
1008 Most of a document is made up of regular text.
1009 Section (chapter, subsection, etc.) titles let the reader know that a new
1010 topic or subtopic will be discussed.
1011 Certain types of documents have special environments.
1012 A journal article will have an abstract, and a title.
1013 A letter will have neither of these, but will probably have an environment
1014 that gives the writer's address.
1017 \begin_layout Standard
1018 Environments are a major part of the
1019 \begin_inset Quotes eld
1022 What You See Is What You Mean
1023 \begin_inset Quotes erd
1027 A given environment may require a certain font style, font size, indenting,
1028 line spacing, and more.
1029 This problem is aggravated, because the exact formatting for a given environmen
1030 t may change: one journal may use boldface, 18 point, centered type for
1031 section titles while another uses italicized, 15 point, left justified
1032 type; different languages may have different standards for indenting; and
1033 bibliography formats can vary widely.
1034 LyX lets you avoid learning all the different formatting styles.
1037 \begin_layout Standard
1042 box is located on the left end of the toolbar (just under the
1050 It indicates which environment you're currently writing in.
1051 While you were writing your first document, it said
1052 \begin_inset Quotes eld
1056 \begin_inset Quotes erd
1059 which is the default environment for text.
1060 Now you will put a number of environments in your new document so that
1061 you can see how they work.
1062 You'll do so with the
1066 menu, which you open by clicking on the
1067 \begin_inset Quotes eld
1071 \begin_inset Quotes erd
1074 icon just to the right of the
1081 \begin_layout Subsection
1082 Sections and Subsections
1085 \begin_layout Standard
1090 on the first line of your LyX file, and select
1102 \begin_layout Standard
1108 If nothing is selected, LyX changes the paragraph you are currently in
1109 to the selected environment.
1110 Alternatively, you can change several paragraphs to a different environment
1111 by selecting them before picking an environment.
1129 , which will be covered below.
1130 LyX numbers the section
1131 \begin_inset Quotes eld
1135 \begin_inset Quotes erd
1138 and typesets the section heading (title) in a larger font.
1149 \begin_inset Quotes eld
1153 \begin_inset Quotes erd
1157 \begin_inset Quotes eld
1161 \begin_inset Quotes erd
1165 Section headings, like most environments, are assumed to end when you type
1171 Type the document introduction:
1174 \begin_layout LyX-Code
1175 This is an introduction to my first LyX document.
1178 \begin_layout Standard
1193 \begin_inset Quotes eld
1197 \begin_inset Quotes erd
1200 and waits for you to type a title.
1205 , and you'll see that LyX again sets it as a section title.
1208 \begin_layout Standard
1210 Go to the end of Section\InsetSpace ~
1212 \begin_inset Quotes eld
1215 my first LyX document
1216 \begin_inset Quotes erd
1233 \begin_inset Quotes eld
1237 \begin_inset Quotes erd
1240 and waits for you to type a title.
1246 Section\InsetSpace ~
1248 \begin_inset Quotes eld
1252 \begin_inset Quotes erd
1255 , which used to be Section\InsetSpace ~
1256 2, has been automatically renumbered to Section\InsetSpace ~
1258 In true WYSIWYM fashion, you just need to identify the text that makes
1259 up the section titles, and LyX takes care of numbering the sections and
1263 \begin_layout Standard
1272 environment, and type the following five lines:
1275 \begin_layout LyX-Code
1276 Sections and subsections are described below.
1279 \begin_layout LyX-Code
1283 \begin_layout LyX-Code
1284 Sections are bigger than subsections.
1287 \begin_layout LyX-Code
1288 Subsection description
1291 \begin_layout LyX-Code
1292 Subsections are smaller than sections.
1295 \begin_layout Standard
1296 Click on the second line and select
1305 LyX numbers the subsection
1306 \begin_inset Quotes eld
1310 \begin_inset Quotes erd
1313 , and typesets it in a font which is bigger than regular text but smaller
1314 than the section title.
1315 Change the fourth line
1319 environment as well.
1320 As you probably expected, LyX automatically numbered the section
1321 \begin_inset Quotes eld
1325 \begin_inset Quotes erd
1329 If you put yet another section before Section\InsetSpace ~
1330 2, Section\InsetSpace ~
1331 2 will be renumbered
1332 as Section 3, and the subsections will be renumbered to
1333 \begin_inset Quotes eld
1337 \begin_inset Quotes erd
1341 \begin_inset Quotes eld
1345 \begin_inset Quotes erd
1352 \begin_layout Standard
1353 Further levels of sectioning include
1366 We'll let you play with these on your own.
1367 You may notice that paragraph and subparagraph headings are not numbered
1368 by default, and that subparagraphs are indented; see the
1377 headings are actually the highest level of sectioning, above
1381 s, but you're only allowed to use them in certain types (text classes) of
1382 LyX documents (see Section\InsetSpace ~
1384 \begin_inset LatexCommand ref
1385 reference "sec:textclasses"
1393 \begin_layout Standard
1394 Finally, you may want to have sections or subsections that are not numbered.
1395 There are environments for this as well.
1396 If you change one of your section headings to the
1400 environment (you may have to scroll down in the
1404 menu to find it), LyX will use the same font size for the heading as it
1405 uses for a regular section, but it won't number that section.
1406 There are corresponding
1407 \begin_inset Quotes eld
1411 \begin_inset Quotes erd
1414 heading environments for
1423 Try changing some of your sections or subsections to the starred environments,
1424 and note how the other sections' numbers are updated.
1427 \begin_layout Standard
1432 : Fix the section and subsection headings in
1440 \begin_layout Subsection
1444 \begin_layout Standard
1445 LyX has several different environments for typesetting lists.
1446 The various list environments free you from hitting
1450 a million times when writing an outline, or from renumbering a whole list
1451 when you want to add a point in the middle of the list, and lets you concentrat
1452 e on the list content.
1456 \begin_layout Standard
1457 Yes, we're overemphasizing this point throughout the
1466 the main philosophy of LyX, so please forgive us.
1471 Different types of documents logically require different list environments:
1474 \begin_layout Itemize
1475 A slide presentation might use the
1479 environment's bulleted lists to describe different points.
1483 \begin_layout Itemize
1484 An outline would use the
1488 environment's numbered lists (and lettered sublists).
1492 \begin_layout Itemize
1493 A document describing several software packages could use the
1497 environment, where each item in the list begins with a bold-faced word.
1501 \begin_layout Itemize
1506 environment --- not found in LaTeX --- is a slightly different form of
1514 \begin_layout Standard
1515 Let's write a list of reasons why LyX is better than other word processors.
1516 Somewhere in your document, type:
1519 \begin_layout Standard
1522 Lyx is better than other word processors because:
1525 \begin_layout Standard
1541 \begin_inset Quotes eld
1545 \begin_inset Quotes erd
1548 (actually, an asterisk, which will be converted to a round circle on output)
1550 Type in your reasons:
1553 \begin_layout LyX-Code
1554 Typesetting is done for you.
1557 \begin_layout LyX-Code
1561 \begin_layout LyX-Code
1562 Lists are very easy to create!
1565 \begin_layout Standard
1566 List environments, unlike headings, do not end when you type
1571 Instead, LyX assumes you're going on to the next item in the list.
1572 The above will therefore result in a three-item list.
1573 If you want more than one paragraph within one list
1577 , one way is to use the
1579 Protected\InsetSpace ~
1582 , which you get by typing
1587 In order to get out of the list, you need to reselect the
1591 environment (or just use the keybinding,
1599 \begin_layout Standard
1600 You've got a beautiful itemized list.
1601 You might want to run LaTeX to see how the list looks when printed out.
1602 But what if you wanted to number the reasons? Well, just select the whole
1607 \begin_layout Standard
1608 LyX won't let you select the first bullet unless you also select the paragraph
1613 the list, which you probably don't want to do.
1614 Similarly, you can't select the actual number in a numbered section title.
1615 Don't worry about it.
1629 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1633 \begin_layout Standard
1634 While the list is still selected, you can change to the other two list environme
1643 , in order to see what they look like.
1644 For those two environments, each list item is made up of a term, which
1645 is the item's first word, followed by a definition, which is the rest of
1646 the paragraph (until you hit
1650 .) The term is either typeset in boldface (
1655 \begin_inset Quotes eld
1659 \begin_inset Quotes erd
1666 \begin_layout Standard
1667 But a typesetter's tab, which will change to fit the size of the largest
1668 term, not a pathetic, rigid, unchangeable typewriter
1681 ) from the rest of the paragraph.
1682 If you want to have more than one word in the definition, then separate
1685 Protected\InsetSpace ~
1691 \begin_layout Standard
1696 : Typeset the list in
1701 \begin_layout Standard
1702 You can nest lists within each other in all sorts of interesting ways.
1703 An obvious example would be writing outlines.
1704 Numbered and bulleted lists will have different numbering and bulleting
1705 schemes for sublists.
1710 for details on the different sorts of lists, as well as examples which
1718 \begin_layout Subsection
1719 Other Environments: Verses, Quotations, and More
1722 \begin_layout Standard
1723 There are two environments for setting quotations apart from surrounding
1728 for short quotes and
1737 environment, also used in the
1741 for the long typing examples) is written in a
1745 font; this environment is the only place in LyX where you're allowed to
1746 use multiple spaces to allow code indenting.
1747 You can even write poetry using the
1755 to separate stanzas, and
1759 to separate lines within a stanza.
1764 for more complete descriptions of all of the available LyX environments.
1767 \begin_layout Standard
1772 : Correctly typeset the
1784 \begin_layout Standard
1798 \begin_layout Chapter
1802 \begin_layout Standard
1803 The previous chapter hopefully allowed you to get used to writing in LyX.
1804 It introduced you to the basic editing operations in LyX, as well as the
1805 powerful method of writing with environments.
1806 Most people who use LyX, though, will want to write documents: papers,
1807 articles, books, manuals, or letters.
1808 This chapter is meant to take you from simply writing text with LyX to
1809 writing a complete document.
1810 It will introduce you to text classes, which allow you to write different
1812 It will then describe many of the additions that turn text into a document,
1813 such as titles, footnotes, cross references, bibliographies, and tables
1817 \begin_layout Section
1821 \begin_layout Standard
1822 \begin_inset LatexCommand label
1823 name "sec:textclasses"
1827 Different sorts of documents should be typeset differently.
1828 For example, books are generally printed double-sided, while articles are
1830 In addition, many documents contain special environments: letters contain
1831 some environments --- such as the sender's address and the signature ---
1832 which do not make sense in a book or article.
1839 \begin_layout Standard
1840 LaTeX users: this is equivalent to the LaTeX document class
1847 takes care of these large scale differences between different sorts of
1853 , for example, was written in the
1858 Text classes are another major part of the WYSIWYM philosophy; they tell
1859 LyX how to typeset the document, so you don't need to know how.
1862 \begin_layout Standard
1863 Your document is probably being written in the
1871 \begin_layout Standard
1872 That's usually the default text class
1878 Try changing to other text classes (using the
1883 ocument\SpecialChar \menuseparator
1890 dialog) to see how they are typeset differently.
1891 If you change your document to the
1895 text class and look at the
1899 menu, you'll see that most of the allowed environments are the same.
1900 However, you can now use the
1905 If you're ever unsure about which environments you can use in a given text
1906 class, just consult the
1913 \begin_layout Standard
1914 Font sizes, one- or two-column printing, and page headings are just some
1915 of the ways journals' typesettings differ from one another.
1916 As the Computer Age continues to mature, journals have begun accepting
1917 electronic submissions, creating LaTeX
1918 \begin_inset Quotes eld
1922 \begin_inset Quotes erd
1925 so that authors can submit correctly typeset articles.
1926 LyX is set up to support this as well.
1927 For example, LyX supports typesetting (and extra environments) for the
1928 American Mathematics Society journals using the
1930 Article\InsetSpace ~
1936 \begin_layout Standard
1937 Here's a very quick reference to some of the text classes.
1940 Special Document Classes
1946 manual for many more details.
1949 \begin_layout Standard
1951 \begin_inset Tabular
1952 <lyxtabular version="3" rows="7" columns="2">
1954 <column alignment="center" valignment="top" leftline="true" width="0pt">
1955 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
1956 <row topline="true" bottomline="true">
1957 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1960 \begin_layout Standard
1966 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1969 \begin_layout Standard
1976 <row topline="true">
1977 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1980 \begin_layout Standard
1986 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1989 \begin_layout Standard
1990 one-sided, no chapters
1996 <row topline="true">
1997 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2000 \begin_layout Standard
2006 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2009 \begin_layout Standard
2010 layout & environments for American Math Society
2016 <row topline="true">
2017 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2020 \begin_layout Standard
2026 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2029 \begin_layout Standard
2030 longer than article, two-sided
2036 <row topline="true" bottomline="true">
2037 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2040 \begin_layout Standard
2046 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2049 \begin_layout Standard
2050 report + front and back matter
2056 <row bottomline="true">
2057 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2060 \begin_layout Standard
2066 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2069 \begin_layout Standard
2070 transparencies (also including FoilTeX)
2076 <row bottomline="true">
2077 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2080 \begin_layout Standard
2086 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2089 \begin_layout Standard
2090 lots of extra environments for address, signature\SpecialChar \ldots{}
2104 \begin_layout Section
2105 Templates: Writing a Letter
2108 \begin_layout Standard
2109 One of the most popular text classes is
2114 One way to write a letter would be to open a new file, and choose
2123 ocument\SpecialChar \menuseparator
2131 While this is the most obvious way to write a letter, it seems like extra
2133 Every time you write a business letter, you want to have your address,
2134 the address you're sending to, a body, a signature, etc.
2139 for letters, which contains a sample letter; once you have a template,
2140 you can just replace a couple parts of the letter with your text each time
2144 \begin_layout Standard
2145 Open a new file with
2150 ile\SpecialChar \menuseparator
2165 Save and print the file to see how the various environments are typeset.
2168 \begin_layout Standard
2169 When you look at the
2173 menu, you'll see several environments, like the
2178 environment, which don't even exist in most other text classes.
2188 You can play around for a while to figure out how the various environments
2190 You'll notice for example that the
2194 environment has the word
2195 \begin_inset Quotes eld
2199 \begin_inset Quotes eld
2202 in red before the actual text of the signature.
2203 This word doesn't show up in the actual letter, as you'll see if you try
2205 It's just there to let you know where the signature goes.
2206 Also, note that it doesn't matter where in the file the
2211 Remember, LyX is WYSIWYM; you can put the
2215 environment anywhere you want, but LyX knows that in the printout, the
2216 signature should be at the end.
2219 \begin_layout Standard
2220 A template is just a regular LyX file.
2221 This means you can fill in your address and signature and save the file
2223 From now on, any time you want to write a letter, you can use the new template
2225 We probably don't have to suggest an actual
2226 \begin_inset Quotes eld
2230 \begin_inset Quotes erd
2233 here; just write a letter to someone!
2237 \begin_layout Standard
2238 One warning, if you're writing from a template.
2239 If you erase all of the text in an environment --- for example, if you
2245 field so that you can replace it with your own --- and then you move the
2246 cursor without writing any text, the environment may disappear.
2247 This is because most environments cannot exist without any text in them.
2248 Just reselect the environment from the
2252 menu to get it back.
2260 \begin_layout Standard
2261 Templates can be a huge time-saver, and we urge you to use them whenever
2263 In addition, they can help a person learn how to use some of the fancier
2265 Finally, they may be useful for a person who is configuring LyX for a bunch
2266 of less computer-aware users.
2267 When they're first learning LyX, it will be much less intimidating if they
2268 have a letter template customized for their company, for example.
2271 \begin_layout Section
2275 \begin_layout Standard
2276 LyX (like LaTeX) considers the title --- which may contain the actual title,
2277 the author, the date, and even an abstract of a paper --- to be a separate
2278 part of the document.
2281 \begin_layout Standard
2286 document and make sure it's using the
2294 \begin_layout Standard
2295 You should not be using the letter any more, since the
2299 textclass doesn't allow titles.
2304 Type a title on the first line, and change the line to the
2309 On the next line, type your name and change it to the
2314 On the next line, write the date in the
2319 Type a paragraph or two summarizing your document using the
2324 Notice how the title is presented when it's printed out.
2325 If you changed the document format to Book, you'll get a separate title
2326 page, like the first page of this tutorial.
2329 \begin_layout Standard
2334 : Fix the title, date, and author in
2339 \begin_layout Section
2340 Labels and Cross-References
2343 \begin_layout Standard
2344 \begin_inset LatexCommand label
2349 You can label a section (or subsubsection, or, more rarely, just a random
2350 piece of text) in your document.
2351 Once you do so, you can refer to this section in other parts of the document,
2352 using cross-references.
2353 You can refer either to the section's number, or to the page that the section
2355 As with sections and footnotes, LyX worries about the cross-references
2357 Automatic labels and cross-references are one of the best advantages of
2358 LyX (and LaTeX) over conventional word processors.
2361 \begin_layout Subsection*
2365 \begin_layout Standard
2366 Let's mark our second section, whose title is
2367 \begin_inset Quotes eld
2371 \begin_inset Quotes erd
2375 Click at the end of the section title line, and select
2380 nsert\SpecialChar \menuseparator
2388 A dialog asks you for a label name, and gives you a suggestion.
2393 , the label name will be placed in a box next to the section title.
2396 \begin_layout Standard
2397 By the way, you could have put the label right anywhere within the section
2398 as well; section references will refer to the last section or subsection
2399 whose heading comes before the label.
2400 However, putting it on the same line as the section title (or, perhaps,
2401 on the first line of the section's text) ensures that page references will
2402 reference the beginning of the section.
2405 \begin_layout Standard
2406 So far you haven't done anything --- the
2410 file will look exactly the same, since labels don't show up in the printed
2412 However, now that you've added a label, you can refer to that label with
2417 \begin_layout Subsection*
2418 Your first cross-references
2421 \begin_layout Standard
2422 Place the cursor somewhere in Section\InsetSpace ~
2427 \begin_layout LyX-Code
2428 If you want to know more about this document, then see
2434 \begin_layout Standard
2435 Now --- with the cursor after the word
2436 \begin_inset Quotes eld
2440 \begin_inset Quotes erd
2448 nsert\SpecialChar \menuseparator
2462 It shows a list of the possible labels you can reference.
2463 At the moment, there should be only one,
2464 \begin_inset Quotes eld
2468 \begin_inset Quotes erd
2472 Select it (it may be selected by default), and click
2477 Now put the cursor after the word
2478 \begin_inset Quotes eld
2482 \begin_inset Quotes erd
2485 , and change the reference type to use the page number then click
2490 (To be really correct, you should put a
2492 Protected\InsetSpace ~
2496 \begin_inset Quotes eld
2500 \begin_inset Quotes erd
2504 Same for the page reference.)
2507 \begin_layout Standard
2508 LyX puts the references in a box right where the cursor was.
2509 In the printed document, this reference marker will be replaced with either
2510 the page or section number (depending on what you selected in the
2520 iew\SpecialChar \menuseparator
2525 pdate\SpecialChar \menuseparator
2532 , and you'll see that on the last page we refer to
2533 \begin_inset Quotes eld
2536 Section\InsetSpace ~
2538 \begin_inset Quotes erd
2542 \begin_inset Quotes eld
2547 \begin_inset Quotes erd
2550 (or whatever page Section\InsetSpace ~
2554 \begin_layout Standard
2555 Conveniently, a cross-reference acts as a hyperlink when you're editing
2556 a document in LyX; clicking on it will pop up the
2566 will move the cursor to the referenced label.
2569 \begin_layout Subsection*
2570 More fun with labels
2573 \begin_layout Standard
2574 We told you that LyX worries about numbering cross-references; now you can
2576 Add a new section before Section\InsetSpace ~
2578 Now rerun LaTeX, and --- voilà ! --- the section cross reference changed
2580 \begin_inset Quotes eld
2584 \begin_inset Quotes erd
2588 \begin_inset Quotes eld
2592 \begin_inset Quotes erd
2595 to a subsection, and the cross-reference will reference Subsection\InsetSpace ~
2597 of Section\InsetSpace ~
2599 The page reference won't change unless you add a whole page of text before
2600 the label, of course.
2604 \begin_layout Standard
2605 If you want some more practice with labels, then try putting a new label
2606 where your first cross-reference was, and refer to that label from elsewhere
2608 If you'll be inserting cross-references often (if, for example, you're
2609 writing a journal article), it may be convenient to leave the
2616 \begin_layout Standard
2617 If you want to make sure that the cross-referencing gets the pages right
2618 even for larger documents,
2622 a couple pages of text from the
2626 to the clipboard, and
2630 the stolen text into your document
2634 \begin_layout Standard
2635 By the way, copying a chapter title may cause an error, because chapters
2636 aren't allowed in the article class.
2637 If this happens, just delete the chapter title.
2638 If you want to know why this happens, see Section\InsetSpace ~
2640 \begin_inset LatexCommand ref
2641 reference "sec:textclasses"
2654 \begin_layout Standard
2659 : Fix the references in
2664 \begin_layout Section
2665 Footnotes and Margin Notes
2668 \begin_layout Standard
2669 Footnotes can be added using the
2674 button in the toolbar
2678 \begin_layout Standard
2679 The button shows an arrow pointing to red text, which is just below some
2690 nsert\SpecialChar \menuseparator
2698 Click at the end of the word
2699 \begin_inset Quotes eld
2703 \begin_inset Quotes erd
2706 somewhere in your document and hit the
2712 A footnote box appears where you can enter the text of the footnote.
2713 LyX should place the cursor at the beginning of the footnote box.
2717 \begin_layout LyX-Code
2718 LyX is a typesetting word processor.
2721 \begin_layout Standard
2722 Now click on the button labelled
2723 \begin_inset Quotes eld
2727 \begin_inset Quotes erd
2730 The footnote box disappears, leaving the button showing where the footnote
2731 marker will be in the printed text; this is called
2732 \begin_inset Quotes eld
2736 \begin_inset Quotes erd
2740 You can unfold the footnote at any time --- and re-edit its text, if you
2741 want --- by clicking again on the
2742 \begin_inset Quotes eld
2746 \begin_inset Quotes erd
2752 \begin_layout Standard
2753 You may wonder why the footnote button is a word instead of a number.
2754 The answer is that LyX worries about the footnote numbering for you in
2756 You can see this yourself by looking at the
2761 If you add other footnotes, LyX will renumber the footnotes.
2762 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2763 there's really no need to put the numbers in the LyX file.
2766 \begin_layout Standard
2767 A footnote can be cut and pasted like normal text.
2768 Go ahead; try it! All you need to do is select the footnote button
2772 \begin_layout Standard
2773 It may be easier to select it using the keyboard.
2774 You might accidentally open the footnote if you're trying to select the
2775 marker itself with the mouse.
2789 In addition, you can change regular text to a footnote, by selecting it
2795 button; change a footnote to regular text by hitting the
2799 key when the cursor is in the first position of a footnote, or by hitting
2804 key when the cursor is in the very last position of the footnote, respectively.
2807 \begin_layout Standard
2808 Margin notes can be added using the toolbar button (the button shows an
2809 arrow pointing to red text next to (i.e., in the margin of) black text, and
2810 should be next to the
2815 button in the toolbar.) or
2820 nsert\SpecialChar \menuseparator
2825 arginal\InsetSpace ~
2829 Margin notes are like footnotes, except that:
2832 \begin_layout Itemize
2833 the on-screen boxes say
2834 \begin_inset Quotes eld
2838 \begin_inset Quotes erd
2842 \begin_inset Quotes eld
2846 \begin_inset Quotes erd
2852 \begin_layout Itemize
2853 the notes will be placed in the margin, instead of below the text
2856 \begin_layout Itemize
2857 margin notes are not numbered
2860 \begin_layout Standard
2861 Change your LyX footnote back to text, then select and change it to a margin
2863 Run LaTeX again to see what the margin note looks like.
2866 \begin_layout Standard
2871 : Fix the footnote in
2876 \begin_layout Section
2880 \begin_layout Standard
2881 \begin_inset LatexCommand label
2882 name "sec:bibliographies"
2886 Bibliographies (at least in the exact sciences) are similar to cross references.
2887 The bibliography contains a list of references at the end of the document,
2888 and they can be referenced from within the document.
2889 Like section titles, LyX and LaTeX make your job easier by automatically
2890 numbering the bibliography items and changing citations when the items'
2894 \begin_layout Standard
2895 Go to the end of the document and switch to the
2900 Now, each paragraph you type will be a reference.
2903 The Lyx Tutorial, by the LyX Documentation Team
2905 as your first reference.
2906 Note that LyX automatically puts a number in a box before each reference.
2907 Click on the boxed reference number, and a
2909 Bibliography\InsetSpace ~
2913 You use the first field, the
2917 , to refer to this reference within the LyX document.
2918 By default, it is a number.
2924 \begin_inset Quotes eld
2928 \begin_inset Quotes erd
2931 to make it easy to remember.
2934 \begin_layout Standard
2935 Now pick somewhere in your document that you would like to insert a reference.
2941 nsert\SpecialChar \menuseparator
2954 The right panel in this dialog lists all the bibliography entries, and
2955 this field allows you to choose which bibliography item you want to cite.
2957 \begin_inset Quotes eld
2961 \begin_inset Quotes erd
2964 (right now, that's the only item in the bibliography), then use the left
2965 arrow in the center to insert it.
2966 (You can have multiple citations in the same place by transferring a number
2967 of keys this way.) Now run LaTeX, and you'll see that the citation appears
2968 in brackets in the text, referring to the bibliography at the end of the
2972 \begin_layout Standard
2973 How are the other fields used? The
2985 dialog will put a remark (such as a reference to a page or chapter within
2986 the referenced book or article) in the brackets after the reference.
2987 If you want the references to have labels instead of numbers in the printed
2988 output (for example, some journals would use
2989 \begin_inset Quotes eld
2993 \begin_inset Quotes erd
2996 to refer to a paper written by Smith in 1995), use the
3005 Bibliography\InsetSpace ~
3010 As usual, you can see the
3017 \begin_layout Standard
3022 Fix the bibliography and citation in
3027 \begin_layout Section
3031 \begin_layout Standard
3032 You may want to put a table of contents at the beginning of your document.
3033 LyX makes this very easy to do.
3038 after your document title and before your first section title and choose
3044 nsert\SpecialChar \menuseparator
3051 C\SpecialChar \menuseparator
3062 \begin_inset Quotes eld
3066 \begin_inset Quotes erd
3069 will appear in a button on the first line of the document.
3073 \begin_layout Standard
3074 This may not appear to be very useful.
3075 However, if you look at your
3079 file, you will see that a table of contents has been generated, listing
3080 the various sections and subsections in your document.
3081 As usual, if you reorder sections or create new ones, you will see those
3086 file when you update it.
3090 \begin_layout Standard
3091 The table of contents is not printed in the on-screen version of the document,
3092 because you can't edit it anyway.
3093 However, you can display the table of contents in a separate window by
3094 clicking on the table of contents button, or by using
3099 ocument\SpecialChar \menuseparator
3109 The menu command will work even if you don't have a table of contents inset
3111 This is a very useful tool.
3118 window to move around your document.
3119 Clicking on a (sub)section title in the
3125 window will highlight that line and move the cursor (in the LyX editing
3126 window) to that place in the document.
3127 You can also use the arrow keys to move up and down in the table of contents.
3128 You may therefore find it convenient to leave this window open throughout
3130 You can get similar functionality from the
3137 menu, though, where the table of contents appears automatically.
3140 \begin_layout Standard
3141 To get rid of the Table of Contents, you can delete the table of contents
3142 button just like any other text.
3145 \begin_layout Standard
3150 : Fix the table of contents in
3155 \begin_layout Chapter
3159 \begin_layout Standard
3160 LaTeX is used by many scientists because it outputs great looking equations,
3161 avoiding the control characters used by word processors and their equation
3163 Many of these scientists are frustrated, however, because writing equations
3164 in LaTeX is more like programming than writing.
3165 Happily, LyX has WYSIWYM support for equations.
3166 If you are used to LaTeX, you'll find that all of the usual LaTeX math
3167 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3168 If, on the other hand, you've never written in LaTeX, then the
3173 will allow you to write professional-looking math quickly and easily
3177 \begin_layout Standard
3178 LyX can't check if the math you're writing is actually
3191 \begin_layout Section
3195 \begin_layout Standard
3196 Somewhere in your LyX document, type:
3199 \begin_layout LyX-Code
3200 I like what Einstein said, E=mc^2, because it's so simple.
3204 \begin_layout Standard
3205 Now, that equation doesn't look very good, even in the
3209 file; there's no space between the letters and the equals sign, and you'd
3210 like to write an actual superscript for the
3211 \begin_inset Quotes eld
3215 \begin_inset Quotes erd
3219 That bad typesetting happened because we didn't tell LyX that we were writing
3220 a mathematical expression, so it typeset the equation like regular old
3224 \begin_layout Standard
3225 Instead, we create a formula that will get typeset properly.
3226 In order to create a formula, just click the toolbar button with
3227 \begin_inset Formula $\frac{a+b}{c}$
3230 written on it in blue.
3231 LyX will insert a little blue square, which is an empty math formula.
3232 LyX has placed the cursor in the blue square, so just type
3237 The expression is typed in blue, and the blue square disappears as soon
3238 as the formula is not empty.
3243 to leave the equation The purple markers disappear, leaving the cursor
3244 to the right of the expression, and now if you type something, it will
3248 \begin_layout Standard
3249 Run LaTeX and look at the
3254 Notice that the expression was typeset nicely, with spaces between the
3255 letters and the equals sign, and a superscript
3256 \begin_inset Quotes eld
3260 \begin_inset Quotes erd
3264 Letters in math mode are assumed to be variables, and come out in italics.
3265 Numbers are just numbers.
3268 \begin_layout Standard
3269 This math editor is another example of the WYSIWYM philosophy.
3270 In LaTeX, you write a mathematical expression using text and commands like
3277 ; this can be frustrating, because you can't see what an expression looks
3278 like until you LaTeX the file, and may have to spend time to find missing
3280 \begin_inset Quotes eld
3284 \begin_inset Quotes erd
3288 On the other hand, LyX doesn't attempt to get the expression to look perfect
3289 (WYSIWYG), but it gives you an extremely good idea of what the expression
3291 LaTeX then takes care of the professional typesetting.
3292 99% of the time, you won't have to make any changes to the font sizes or
3293 spacing that LaTeX outputs.
3294 This way (sorry to be so repetitive) you can focus on the
3298 of your mathematical expressions, not their format.
3301 \begin_layout Section
3302 Navigating an Equation
3305 \begin_layout Standard
3307 \begin_inset Formula $E=mc^{2}$
3311 \begin_inset Formula $E=1+mc^{2}$
3315 Use the arrow keys to move the cursor into the expression.
3316 Note that when you enter the expression, the purple markers appear to let
3317 you know you're editing math.
3326 to move the cursor past the equals sign, and just type
3327 \begin_inset Quotes eld
3331 \begin_inset Quotes erd
3335 Again, you can use the arrow keys or
3339 to leave the formula\SpecialChar \@.
3343 \begin_layout Standard
3344 Other than the special keys described below, typing in math mode is like
3345 editing regular text.
3355 Select text either with the arrow keys or with the mouse.
3361 dit\SpecialChar \menuseparator
3368 works in math mode, as does cutting and pasting.
3369 One thing to be careful of: if you're right outside a formula and you type
3378 ), it will delete the whole expression.
3379 Luckily, you can just use
3386 \begin_layout Standard
3387 What if you want to change
3388 \begin_inset Formula $E=mc^{2}$
3392 \begin_inset Formula $E=mc^{2.5}+1$
3395 ? Again, you can use the mouse to click in the right place.
3396 However, you can also use the arrow keys.
3397 If the cursor is just after the
3398 \begin_inset Quotes eld
3402 \begin_inset Quotes erd
3406 \begin_inset Quotes eld
3410 \begin_inset Quotes erd
3417 will move the cursor to the level of the superscript, just before the
3418 \begin_inset Quotes eld
3422 \begin_inset Quotes erd
3427 \begin_inset Quotes eld
3431 \begin_inset Quotes erd
3439 will move the cursor back to the regular level.
3444 from anywhere within the superscript, the cursor will be placed just
3448 the superscript (so that you can then type the
3449 \begin_inset Quotes eld
3453 \begin_inset Quotes erd
3459 \begin_layout Section
3460 Exponents and Indices
3463 \begin_layout Standard
3464 An exponent can be entered from the
3469 (see below), but it's actually simpler just to type the caret key,
3470 \begin_inset Quotes eld
3474 \begin_inset Quotes erd
3478 LyX will place another blue rectangle in the superscript, so that whatever
3479 you write next will be superscripted, and in a smaller font size.
3480 Everything you type until you hit a
3488 to exit Mathed entirely) will be in the superscript.
3491 \begin_layout Standard
3492 Writing a subscript (index) is just as easy --- start one by typing the
3494 \begin_inset Quotes eld
3498 \begin_inset Quotes eld
3502 You can subscript and superscript both subscripts and superscripts like
3504 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3511 \begin_layout Standard
3523 \begin_layout Section
3529 \begin_layout Standard
3535 is a convenient way to enter symbols or to perform many complicated Mathed
3537 Many of these functions can be accomplished from the keyboard or the
3542 dit\SpecialChar \menuseparator
3556 \SpecialChar \menuseparator
3565 However, we're going to concentrate on using the
3570 , just to let you know what's out there; you can learn keyboard shortcuts
3571 later, from other manuals.
3579 \SpecialChar \menuseparator
3586 \SpecialChar \menuseparator
3593 now and leave it open while reading this section.
3596 \begin_layout Standard
3597 Right-clicking on a formula will open the
3604 \begin_layout Subsection
3608 \begin_layout Standard
3614 which allow you to choose from a large array of symbols used in math: various
3615 arrows, relations, operators, and sums and integrals.
3616 Note that subscripting and superscripting allow you to put lower and upper
3617 limits on sums and integrals.
3621 \begin_layout Standard
3622 \begin_inset Quotes eld
3625 Nothing you can do that can't be done\SpecialChar \ldots{}
3627 \begin_inset Formula $\heartsuit$
3631 \begin_inset Quotes erd
3637 \begin_layout Subsection
3638 Square roots, accents, and delimiters
3641 \begin_layout Standard
3642 To type a square root, just click on the button with a square root sign
3644 The square root appears, and the cursor is in a new insertion point inside
3646 You can type variables, numbers, other square roots, fractions, whatever
3648 LyX will automatically resize the square root to fit what's inside.
3651 \begin_layout Standard
3652 Accenting a character (
3653 \begin_inset Formula $\overrightarrow{v}$
3656 ) or group of characters (
3657 \begin_inset Formula $\overrightarrow{a+b}$
3660 ) is done the same way.
3665 types are available from the panel.
3666 Click on a decoration, and LyX will insert that decoration with an insertion
3667 point under (or over) it.
3668 Just type what you want in the insertion point.
3669 There are two sets of decorations: those that resize with the text you
3670 type, and those that have fixed size, and are most appropriate for a single
3675 \begin_layout Standard
3676 Delimiters such as parentheses, brackets, and braces work similarly, but
3677 are a bit more complicated.
3682 button, which features a blue square surrounded by brackets, to pop up
3688 Your current selection of delimiters is displayed in a box.
3689 It's a pair of parentheses by default, but you can choose a pair of braces,
3690 a brace and a parenthesis, or even choose the empty square to have something
3692 \begin_inset Quotes eld
3696 \begin_inset Formula $a=\left\langle 7\right.$
3700 \begin_inset Quotes erd
3703 (the empty delimiter is displayed as a broken line in LyX, but won't show
3707 \begin_layout Standard
3708 If you're lazy, you can type actual parentheses in math mode, rather than
3714 However, those parentheses will be the same size as regular text, which
3715 will look bad if you have a big fraction or matrix inside the parentheses.
3720 window will guarantee that the delimiters are sized based on what's inside
3724 \begin_layout Standard
3725 You can also put delimiters or a square root sign or a decoration on already
3727 Select the portion of the formula that you want to adjust, and then click
3728 on the button you want from the
3734 Try using this to change Newton's second law from scalar to vector form
3736 \begin_inset Formula $f=ma$
3740 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3744 Once you've learned about matrices, this is how you'll put parentheses
3745 or brackets around them.
3748 \begin_layout Subsection
3752 \begin_layout Standard
3753 Fractions are very simple in Mathed.
3763 , which shows a fraction with blue squares in the numerator and the denominator.
3764 LyX writes two insertion points in a fraction.
3765 As you would expect, you can use arrow keys or the mouse to move around
3767 Click on the top square and type
3768 \begin_inset Quotes eld
3772 \begin_inset Quotes erd
3781 \begin_inset Quotes eld
3785 \begin_inset Quotes erd
3789 You've made a fraction! Of course you can type anything within each of
3790 the two boxes: variables with exponents, square roots, other fractions,
3795 \begin_layout Standard
3807 \begin_layout Subsection
3808 TeX mode: Limits, log, sin and others
3811 \begin_layout Standard
3812 Because letters in math mode are considered to be variables, if you type
3814 \begin_inset Quotes eld
3818 \begin_inset Quotes erd
3821 in math mode, LyX thinks you're typing the product of the three variables
3823 \begin_inset Formula $s$
3827 \begin_inset Formula $i$
3831 \begin_inset Formula $n$
3835 The three letters will be typeset in italics, when what you really wanted
3837 \begin_inset Quotes eld
3841 \begin_inset Quotes erd
3845 In addition, LyX won't put a space between the word
3846 \begin_inset Quotes eld
3850 \begin_inset Quotes erd
3854 \begin_inset Quotes eld
3858 \begin_inset Quotes erd
3865 will just exit math mode).
3867 \begin_inset Quotes eld
3871 \begin_inset Formula $\sin x$
3875 \begin_inset Quotes erd
3879 \begin_inset Quotes eld
3883 \begin_inset Formula $sinx$
3887 \begin_inset Quotes erd
3893 \begin_layout Standard
3895 \begin_inset Quotes eld
3899 \begin_inset Quotes erd
3913 \begin_inset Quotes eld
3917 \begin_inset Quotes erd
3920 is written in black, in upright roman type.
3921 The whole word is treated as one symbol, so if you type
3925 , it will delete the whole word.
3927 \begin_inset Quotes eld
3931 \begin_inset Quotes erd
3934 , which will be written in blue italics, like you expect in Mathed.
3939 file, the expression will be correctly typeset.
3943 \begin_layout Standard
3944 Other commands you need to type in TeX mode using the
3948 box include other trigonometric functions and their inverses, hyperbolic
3949 functions, logarithms, limits, and quite a few others.
3950 These functions can take subscripts and superscripts, important for typing
3952 \begin_inset Quotes eld
3956 \begin_inset Formula $\cos^{2}\theta$
3960 \begin_inset Quotes erd
3964 \begin_inset Quotes eld
3968 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3972 \begin_inset Quotes erd
3978 \begin_layout Standard
3990 \begin_layout Subsection
3994 \begin_layout Standard
3995 \begin_inset LatexCommand label
4010 The dialog has two sliding bars which allow you to choose how many rows
4011 and columns you want in your matrix.
4012 Choose 2 rows and 3 columns and hit
4021 LyX prints 6 insertion points in a
4022 \begin_inset Formula $2\times3$
4026 As usual, you can put any sort of Mathed expression (a square root, another
4027 matrix, etc.) in each insertion point.
4028 You can also leave some of the insertion points empty if you want.
4031 \begin_layout Standard
4036 can be used to move horizontally between the columns of a matrix.
4037 Alternatively, you can use the arrow keys to move around - hitting
4041 at the end of one box will move to the next box,
4045 will move to the next row, etc.
4048 \begin_layout Standard
4049 If you suddenly need more rows or columns, use
4054 dit\SpecialChar \menuseparator
4059 ath\SpecialChar \menuseparator
4077 They add a row or column just after the current position.
4098 \begin_layout Standard
4103 for information on how to change the horizontal alignment of each column,
4104 and how to change the vertical position of the whole matrix.
4105 Note that if you want to write a table containing text, you should use
4106 LyX' wonderful table support, rather than trying to write text in a matrix.
4109 \begin_layout Subsection
4113 \begin_layout Standard
4114 All of the expressions we have written so far have been on the same line
4115 as the text that came before and after them, otherwise known as inline
4117 This is fine for short, simple expressions, but if you want to write larger
4118 ones, or if you want your expressions to stand out from the text, you need
4119 to write them in display mode.
4120 In addition, only displayed expressions can be labeled and numbered (see
4125 ), and multi-line equations (see Sec.
4127 \begin_inset LatexCommand ref
4128 reference "sec:multiline"
4132 ) must be in display mode.
4135 \begin_layout Standard
4145 , which represents a couple lines of text before and after a centered blue
4147 LyX inserts a formula, but the insertion point is on a new line, and it's
4148 centered within that line.
4149 Now type an expression and run LaTeX to see how it looks.
4154 button is actually a toggle; use it now to change a couple of your expressions
4155 to display mode and back.
4159 \begin_layout Standard
4160 Display mode has a couple differences from inline mode:
4163 \begin_layout Itemize
4164 The default font is larger for a few symbols, like
4165 \begin_inset Formula $\sum$
4169 \begin_inset Formula $\int$
4175 \begin_layout Itemize
4176 Subscripts and superscripts for limits and sums (but not integrals) are
4177 written under rather than next to the symbols
4180 \begin_layout Itemize
4184 \begin_layout Standard
4185 Other than these differences, though, displayed expressions and inline expressio
4186 ns are very similar.
4189 \begin_layout Standard
4190 One final note about the way displayed formulae are typeset: be careful
4191 about whether you're putting your equation into a new paragraph or not.
4192 If your formula is in the middle of a sentence or paragraph, then don't
4198 Doing so will cause the text
4202 the formula to start a new paragraph.
4203 That text will therefore be indented, which is probably not what you want.
4206 \begin_layout Standard
4211 : Put the various equations in
4215 into display mode, and see how they're typeset differently.
4218 \begin_layout Standard
4223 : Using various tools you've learned in this section, you should be able
4224 to write an equation like
4228 \begin_layout Standard
4229 After you've done it the hard way, why don't you give
4234 nsert\SpecialChar \menuseparator
4239 \SpecialChar \menuseparator
4253 \begin_inset Formula \[
4254 f(x)=\left\{ \begin{array}{cc}
4257 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4264 \begin_layout Section
4268 \begin_layout Standard
4269 Mathed can do plenty more.
4270 By now, you're familiar with the basics, so we'll just refer to the
4277 \begin_layout Itemize
4278 Labeling and numbering expressions
4281 \begin_layout Itemize
4282 Multi-line equations
4285 \begin_layout Itemize
4286 Change typefaces, e.g., to write bold-face text in an expression.
4289 \begin_layout Itemize
4290 Fine-tune font sizes and spacing within an expression.
4291 (Don't worry about this until your final draft!)
4294 \begin_layout Itemize
4296 These are very powerful, because you just define them once at the top of
4297 the document, and then you can use them throughout the document.
4298 If you change the macro definition, the references to the macro will be
4299 changed throughout the document.
4300 Macros can even take arguments.
4303 \begin_layout Itemize
4304 Do lots of other things we didn't have time to mention in this
4311 \begin_layout Chapter
4315 \begin_layout Section
4316 Other Major LyX Features
4319 \begin_layout Standard
4320 We haven't gone through all the possible commands in LyX, and we aren't
4326 for more information.
4327 We'll just mention a couple more major things LyX can do\SpecialChar \ldots{}
4331 \begin_layout Itemize
4332 LyX has WYSIWYM support for tables.
4338 nsert\SpecialChar \menuseparator
4346 Click on the table with the
4355 dialog box which allows extensive table editing.
4358 \begin_layout Itemize
4359 LyX also supports including pictures in a number of formats (including JPEG
4360 and other bitmap formats, PostScript® and raw LaTeX) within documents.
4366 nsert\SpecialChar \menuseparator
4374 Then click on the figure to choose the file to include, rotate or scale
4375 it, etc.) Tables and figures can have captions, and LyX will automatically
4376 generate lists of figures and/or tables.
4379 \begin_layout Itemize
4380 Version control is supported, using RCS (
4387 \begin_layout Itemize
4388 LyX is heavily configurable.
4389 Everything from how the LyX window looks to how the output comes out can
4390 be configured in a number of ways.
4391 Much configuration is done through
4396 ools\SpecialChar \menuseparator
4404 For more information on this, check out
4409 elp\SpecialChar \menuseparator
4414 ustomization\SpecialChar \@.
4418 \begin_layout Itemize
4419 LyX is being developed by a team of programmers on five continents.
4420 Therefore, LyX has better support for non-English languages (such as Dutch,
4421 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4422 ) than many word processors.
4423 Even some right-to-left languages like Hebrew or Arabic are supported.
4424 You can write documents in other languages, but you can also configure
4425 LyX to show its menus and error messages in other languages.
4429 \begin_layout Itemize
4430 The LyX menus feature keybindings.
4431 This means that you can do
4436 ile\SpecialChar \menuseparator
4451 or by using the binding which is shown next to it in the menu (C-O by default).
4452 Keybindings are also configurable.
4453 For information on this, check out
4458 elp\SpecialChar \menuseparator
4463 ustomization\SpecialChar \@.
4467 \begin_layout Itemize
4468 LyX can read in LaTeX documents.
4469 See Section\InsetSpace ~
4471 \begin_inset LatexCommand ref
4472 reference "sec:tex2lyx"
4479 \begin_layout Itemize
4480 Spellchecking and thesaurus facilities are available.
4483 \begin_layout Itemize
4484 The text box near the bottom of the LyX window is called the minibuffer
4485 (after a similar feature in
4490 This gives you access to all sorts of interesting functionality, including
4491 functionality which could break your document.
4492 In other words, don't type in the minibuffer unless you know what you're
4496 \begin_layout Section
4500 \begin_layout Standard
4501 \begin_inset LatexCommand label
4502 name "sec:latexusers"
4506 If you don't know anything about LaTeX, you don't have to read this section.
4507 Actually, you might want to
4511 about LaTeX, and then read this chapter.
4512 However, many people who begin to use LyX will be familiar with LaTeX.
4513 If you are such a person, you may be wondering if LyX can really do everything
4515 The short answer is that LyX can do pretty much everything LaTeX can do
4516 in one form or another, and it definitely simplifies most parts of writing
4518 The tool that is used to convert a LaTeX document to LyX was rewritten
4519 completely for LyX\InsetSpace ~
4521 It should now be able to handle most LaTeX gracefully.
4524 \begin_layout Standard
4525 Because this is just a tutorial, we are only going to mention things that
4526 new LyX users will most likely be interested in.
4527 In the interests of keeping the
4531 short, we will give only minimal information here.
4536 manual, specifically the
4538 Secrets of the LaTeX Masters
4540 chapter, has a great deal of information on differences between LyX and
4541 LaTeX, and how to do various LaTeX tricks in LyX.
4544 \begin_layout Subsection
4548 \begin_layout Standard
4549 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4550 will be displayed in red on the screen.
4551 You can use TeX commands in LyX by choosing
4556 nsert\SpecialChar \menuseparator
4565 This creates a text box, and everything within it is passed straight to
4569 \begin_layout Standard
4570 In a math formula, TeX mode is handled a bit differently.
4571 Enter TeX mode by typing a backslash.
4572 The backslash is not written out, but anything you type afterwards will
4574 You exit TeX mode by typing
4578 or some other non-alphabetic character, like a number, underscore, caret,
4580 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4581 will convert it to WYSIWYM\SpecialChar \@.
4582 So if, in a formula, you type
4588 , then when you type
4592 , LyX will change the red
4593 \begin_inset Quotes eld
4597 \begin_inset Quotes erd
4601 \begin_inset Quotes eld
4605 \begin_inset Formula $\gamma$
4609 \begin_inset Quotes erd
4613 This will work for almost all, non-complicated math macros.
4614 This may be faster than using the
4619 , and will be especially convenient for experienced LaTeX users.
4622 \begin_layout Standard
4623 As a special case, if you type a brace in TeX mode, then the beginning
4627 ending braces will be inserted in red, then take you
4631 of TeX mode and place the cursor between the braces.
4632 This makes it more convenient to type commands that LyX doesn't know which
4636 \begin_layout Standard
4637 LyX can't do absolutely everything that LaTeX can do (yet?).
4638 Some fancy functions are not supported at all, while some work but aren't
4640 TeX mode allows users to get the full flexibility of LaTeX, while having
4641 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4642 LyX could never support every LaTeX package.
4649 in the preamble (see Section\InsetSpace ~
4651 \begin_inset LatexCommand ref
4652 reference "sec:preamble"
4656 ), you can use any package you want --- although you won't have WYSIWYM
4657 support for that package's features.
4660 \begin_layout Subsection
4661 Importing LaTeX Documents ---
4666 \begin_layout Standard
4667 \begin_inset LatexCommand label
4672 You can import a LaTeX file into LyX by using the
4677 ile\SpecialChar \menuseparator
4682 mport\SpecialChar \menuseparator
4694 which will create a file
4702 --- and then open that file.
4703 If the translation doesn't work, you can try calling
4707 from the command line, possibly using fancier options.
4710 \begin_layout Standard
4715 will translate most legal LaTeX, but not everything.
4716 It will leave things it doesn't understand in TeX mode, so after translating
4721 , you can look for red text and hand-edit it to look right.
4724 \begin_layout Standard
4729 has its own manpage.
4730 Read it to find out about which LaTeX commands and environments aren't
4731 supported, bugs (and how to get around them), and how to use the various
4735 \begin_layout Subsection
4736 Converting LyX Documents to LaTeX
4739 \begin_layout Standard
4740 You might wish to convert a LyX Document to a LaTeX file.
4741 For example, a co-worker or co-author who doesn't have LyX might want to
4743 This is very easy to do with LyX.
4749 ile\SpecialChar \menuseparator
4754 xport\SpecialChar \menuseparator
4762 This will create a file
4770 file you are editing.
4771 LyX always creates temporary LaTeX files when viewing or printing files,
4772 so it is very good at generating LaTeX.
4775 \begin_layout Subsection
4779 \begin_layout Subsubsection
4783 \begin_layout Standard
4789 ocument\SpecialChar \menuseparator
4796 dialog takes care of many of the options that you would input in a
4803 Change the class, default font size and paper size here.
4804 Put any extra options to the
4822 \begin_layout Subsubsection
4823 Other Preamble Matter
4826 \begin_layout Standard
4827 \begin_inset LatexCommand label
4832 If you have special commands to put in the preamble of a LaTeX file, you
4833 can use them in a LyX document as well.
4839 ocument\SpecialChar \menuseparator
4851 and type in the dialog window (or from the document settings dialog, depending
4853 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4856 \begin_layout Subsection
4860 \begin_layout Standard
4861 LyX has support for BibTeX, which allows you to build databases of bibliographic
4862 al references to be used in multiple documents.
4868 nsert\SpecialChar \menuseparator
4875 C\SpecialChar \menuseparator
4888 Click on the resulting
4889 \begin_inset Quotes eld
4893 Generated\InsetSpace ~
4895 \begin_inset Quotes erd
4898 button, and you will get a
4907 field, type what you would type inside the braces of a
4917 \begin_layout Standard
4918 Like in regular LaTeX, multiple bibliographies should be separated by commas,
4929 field, type what you would type inside the braces of a
4938 \begin_layout Standard
4939 After you've done this, you can use citations from any bibliographies you're
4945 nsert\SpecialChar \menuseparator
4952 (see Section\InsetSpace ~
4954 \begin_inset LatexCommand ref
4955 reference "sec:bibliographies"
4960 LyX will take care of running BibTeX.
4965 dialog will show a list of all the references in your
4972 \begin_layout Section
4976 \begin_layout Standard
4977 Sometimes when you LaTeX a document, there will be errors, things that LyX
4978 or LaTeX can't understand.
4979 When this happens, LyX will open a
4985 Clicking on individual errors in this dialog will take you to the place
4986 in the LyX document where the error occurs and also display the detailed
4987 LaTeX error message.