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
24 \paperorientation portrait
27 \paragraph_separation indent
29 \quotes_language english
32 \paperpagestyle headings
33 \tracking_changes false
48 \begin_layout Standard
49 Principal maintainer of this file is
54 If you have comments or error corrections, please send them to the LyX
55 Documentation mailing list,
57 lyx-docs@lists.lyx.org
67 \begin_layout Standard
68 \begin_inset LatexCommand \tableofcontents{}
83 \begin_layout Standard
84 This file is designed for all of you who have never heard of LaTeX, or don't
86 Now, don't panic - you won't need to learn LaTeX to use LyX.
87 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
89 There are some things you will need to learn, however, in order to use
93 \begin_layout Standard
94 Some of you probably found your way to this document because you tried to
95 put two spaces after a
96 \begin_inset Quotes eld
100 \begin_inset Quotes erd
103 or tried to put 3 blank lines between paragraphs.
104 After much frustration, you found you couldn't.
105 In fact, you'll find that most of the little tricks you're accustomed to
106 using in other word processors just won't work in LyX.
107 That's because most word processors you've used before allow you to manually
108 enter all spacings, font changes, and so on.
109 So you end up not only writing a document but typesetting it, too.
110 LyX does the typesetting for you, in a consistent fashion, letting you
111 focus on the important things, like the content of your writing.
114 \begin_layout Standard
115 So, bear with us and read on.
116 Reading this tutorial is definitely worth the time.
119 \begin_layout Section
129 \begin_layout Standard
130 Before we get started with this section, we want to make a quick note of
136 uses the notation outlined in the
141 If you came to this manual first, go read the
149 \begin_layout Standard
150 Now that you know which fonts mean what, we want to talk a bit about what
158 \begin_layout Subsection
159 Getting the Most out of the Tutorial
162 \begin_layout Standard
163 This tutorial consists of examples and exercises.
164 To get the most out of this document, you should read through the document,
165 typing all the silly little things we're telling you to type and trying
166 out all of the exercises to see if you get them right.
167 For convenience, you might want to print out the PostScript® version of
171 \begin_layout Standard
172 If you are familiar with LaTeX, you'll probably be able to read the
176 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
177 However, LyX does have idiosyncrasies
181 \begin_layout Standard
182 or, more optimistically,
183 \begin_inset Quotes eld
187 \begin_inset Quotes erd
195 you'll want to learn about.
196 Even if you don't feel like reading the rest of the
200 , you should definitely check out Section\InsetSpace ~
202 \begin_inset LatexCommand \ref{sec:latexusers}
206 , which is specifically written for experienced LaTeX users.
209 \begin_layout Subsection
217 \begin_layout Itemize
218 Detailed explanations of all of LyX's features.
222 \begin_layout Standard
230 \begin_layout Standard
231 Seriously, though, we're here to get you up and running so that all you
237 If we tried to duplicate all of the information about all of LyX's features
242 would be redundant, too long, and forever out of date.
243 All we do here is introduce things; imagine there is a
244 \begin_inset Quotes eld
252 \begin_inset Quotes erd
255 at the end of every section.
259 \begin_layout Itemize
260 Detailed explanations of LaTeX.
264 \begin_layout Standard
266 If you're really curious about learning some of the neat tricks you can
267 do with LaTeX, you can always go get a LaTeX book.
268 There are several good ones on the market.
269 No need to reinvent the wheel, after all\SpecialChar \ldots{}
274 \begin_layout Standard
275 So, brave soul, it's time to move onwards.
276 Time for your first document \SpecialChar \ldots{}
280 \begin_layout Chapter
281 Getting Started with LyX
284 \begin_layout Section
285 Your First LyX Document
288 \begin_layout Standard
289 \begin_inset LatexCommand \label{sec:first-doc-ex}
294 You're ready to start writing.
295 Before you do, though, there are a few things we need to mention, which
296 will hopefully make the
300 more instructive, useful, and fun.
304 \begin_layout Standard
305 Because there's lots of information that we won't be giving you, the
310 thing that you need to do is find the
315 Luckily, this is very simple.
331 You may want to load the
335 as well (if you're not reading it on screen already).
336 This way, you can read them while you're writing your own file
340 \begin_layout Standard
341 They can also serve as good examples of how to use the many features of
348 Note that once you've got more than one document open, you can use the
356 menu to switch between them.
361 will not cover in detail subjects which are described in the other LyX
363 This may make life a bit harder for you at the beginning, but it will keep
369 It will also get you in the habit of using the other manuals, which ---
370 in the long run --- will save you a lot of time.
373 \begin_layout Standard
378 , we're going to assume that you have a fully working version of LyX, as
383 or some other dvi viewer,
387 or some other way of converting
391 documents to PostScript® documents, and a working printer.
392 This is a lot to assume.
393 If any of this is not true, you (or a friendly system administrator) will
394 need to set up your system.
395 You can find information on setup in other manuals.
398 \begin_layout Standard
399 Finally, we've written a file to let you practice your LyX skills on.
405 Imagine that it was typed by someone who didn't know about any of LyX's
407 As you learn new LyX functions, we'll suggest that you fix those parts
414 \begin_inset Quotes eld
418 \begin_inset Quotes erd
421 hints about how to fix things
425 \begin_layout Standard
426 The hints are located in yellow
427 \begin_inset Quotes eld
431 \begin_inset Quotes erd
435 Access the text in a note by clicking on it.
441 If you want to cheat (or check what you've done), there's also a file called
446 which contains the same text as written and typeset by a LyX master.
449 \begin_layout Standard
450 The example files can be found in the
454 directory, which you can get to by selecting
459 ile\SpecialChar \menuseparator
466 and then clicking on the
474 Open the raw document, and use
479 ile\SpecialChar \menuseparator
487 to save a copy in your own directory for you to work on.
488 As you fix parts of the raw document, check to see how those changes affect
492 \begin_layout Standard
497 directory contains lots of other examples files.
498 They will show you how to do various fancy things with LyX.
499 They are especially useful to display things that (due to length or other
500 reasons) won't fit in the documentation.
505 , or when you're confused about how to do something fancy in LyX, take a
509 \begin_layout Subsection
510 Typing, Viewing, and Printing
513 \begin_layout Itemize
519 ile\SpecialChar \menuseparator
527 \begin_layout Itemize
528 Type a sentence like:
530 This is my first LyX document!
533 \begin_layout Itemize
534 Save your document with
539 ile\SpecialChar \menuseparator
549 \begin_layout Itemize
550 Run LaTeX to create a
559 iew\SpecialChar \menuseparator
567 You may see things being printed in the window you ran the
572 These are messages from LaTeX, which you can ignore for now.
581 viewer), which will pop up a new window displaying what your document will
582 look like when printed.
586 \begin_layout Standard
587 You can save time by leaving
591 running in the background.
597 iew\SpecialChar \menuseparator
602 pdate\SpecialChar \menuseparator
609 and just click on the
613 window (or unminimize it) after LaTeX finishes running.
621 \begin_layout Itemize
627 ile\SpecialChar \menuseparator
640 \begin_layout Standard
641 Congratulations! You've written and printed your first LyX document.
642 All of the rest is just details, which is covered in the rest of the
661 \begin_layout Subsection
665 \begin_layout Standard
666 LyX can of course do most of the things you're used to doing with a word
668 It will word-wrap and indent paragraphs automatically.
669 Here's a quick description of how to do some simple actions.
672 \begin_layout Description
673 Undo LyX has multiple levels of undo, which means you can undo everything
674 you've done since your current editing session started, by selecting
679 dit\SpecialChar \menuseparator
687 If you undo too much, just select
692 dit\SpecialChar \menuseparator
704 \begin_layout Standard
705 Currently, undo is limited to 100 steps.
706 Undo also doesn't work for
710 ; for instance, changes to the document layout.
711 Each of these is really a LyX bug.
715 \begin_layout Description
721 dit\SpecialChar \menuseparator
729 dit\SpecialChar \menuseparator
737 dit\SpecialChar \menuseparator
740 to cut, copy, and paste.
741 Or automatically paste selected text (including selections from other programs)
749 \begin_layout Description
755 dit\SpecialChar \menuseparator
765 In the dialog, search with the
779 button to replace a word you've found
783 \begin_layout Standard
784 Close the window when you're done.
785 Or leave it open if you find it more convenient.
786 Most dialog boxes in LyX --- including the
802 dialogs, as well as the various math dialogs can operate like this.
808 ile\SpecialChar \menuseparator
815 , won't let you type anything in the main LyX window until you actually
817 Just be sure you have the right window focus when you're trying to type
818 in the main LyX window or give a command in some other LyX dialog.
824 If you like, you can specify whether to make the search case-sensitive,
825 or to search for only complete words; you can also search backwards through
829 \begin_layout Description
830 Character\InsetSpace ~
835 text (which will generally put characters in italics), put it in
843 (usually small caps, used for people's names) from the toggle buttons in
849 dit\SpecialChar \menuseparator
860 \begin_layout Description
861 Toolbar There are buttons on the toolbar (just below the menus) which allow
862 you to do some of the more popular functions, such as
873 \begin_layout Standard
874 Of course, you haven't yet written enough to make most of these functions
876 As you write more, though, try undoing, pasting, etc.
879 \begin_layout Subsection
880 WYSIWYM: Whitespace in LyX
883 \begin_layout Standard
884 \begin_inset LatexCommand \label{sec:whitespace}
888 One of the hardest things for new users to get used to is the way that LyX
890 As many times as you hit
894 , you'll only get one blank line.
895 As many times as you hit
899 , you'll only get one space.
900 On a blank line, LyX won't let you type even one space.
905 key won't move you forward one tab stop; in fact there
909 no tab stops! There's no ruler at the top of the page to let you set tabs
913 \begin_layout Standard
914 Many commercial word processors are based on the WYSIWYG principle:
915 \begin_inset Quotes eld
918 What You See Is What You Get.
919 \begin_inset Quotes erd
922 LyX, on the other hand, is based on the principle that
923 \begin_inset Quotes eld
926 What You See Is What You
931 \begin_inset Quotes erd
934 You type what you mean, and LyX will take care of typesetting it for you,
935 so that the output looks nice.
940 grammatically separates paragraphs, and a
944 grammatically separates words, so there is no reason to have several of
949 has no grammatical function at all, so LyX does not support it.
950 Using LyX, you'll spend more of your time worrying about the
954 of your document, and less time worrying about the
963 for more information on the WYSIWYM concept.
966 \begin_layout Standard
967 LyX does have (many) ways to fine-tune the formatting of your document.
968 After all, LyX might not typeset
977 has information about all that.
982 s and vertical space --- which are more powerful and versatile than multiple
983 spaces or blank lines --- and ways to change font sizes, character styles,
984 and paragraph alignments by hand.
985 The idea, though, is that you can write your whole document, focusing on
986 content, and just worry about that fine-tuning at the end.
987 With standard word processors, you'll be distracted by document formatting
988 throughout the writing process.
991 \begin_layout Section
995 \begin_layout Standard
996 Different parts of a document have different purposes; we call these parts
1002 Most of a document is made up of regular text.
1003 Section (chapter, subsection, etc.) titles let the reader know that a new
1004 topic or subtopic will be discussed.
1005 Certain types of documents have special environments.
1006 A journal article will have an abstract, and a title.
1007 A letter will have neither of these, but will probably have an environment
1008 that gives the writer's address.
1011 \begin_layout Standard
1012 Environments are a major part of the
1013 \begin_inset Quotes eld
1016 What You See Is What You Mean
1017 \begin_inset Quotes erd
1021 A given environment may require a certain font style, font size, indenting,
1022 line spacing, and more.
1023 This problem is aggravated, because the exact formatting for a given environmen
1024 t may change: one journal may use boldface, 18 point, centered type for
1025 section titles while another uses italicized, 15 point, left justified
1026 type; different languages may have different standards for indenting; and
1027 bibliography formats can vary widely.
1028 LyX lets you avoid learning all the different formatting styles.
1031 \begin_layout Standard
1036 box is located on the left end of the toolbar (just under the
1044 It indicates which environment you're currently writing in.
1045 While you were writing your first document, it said
1046 \begin_inset Quotes eld
1050 \begin_inset Quotes erd
1053 which is the default environment for text.
1054 Now you will put a number of environments in your new document so that
1055 you can see how they work.
1056 You'll do so with the
1060 menu, which you open by clicking on the
1061 \begin_inset Quotes eld
1065 \begin_inset Quotes erd
1068 icon just to the right of the
1075 \begin_layout Subsection
1076 Sections and Subsections
1079 \begin_layout Standard
1084 on the first line of your LyX file, and select
1096 \begin_layout Standard
1102 If nothing is selected, LyX changes the paragraph you are currently in
1103 to the selected environment.
1104 Alternatively, you can change several paragraphs to a different environment
1105 by selecting them before picking an environment.
1123 , which will be covered below.
1124 LyX numbers the section
1125 \begin_inset Quotes eld
1129 \begin_inset Quotes erd
1132 and typesets the section heading (title) in a larger font.
1143 \begin_inset Quotes eld
1147 \begin_inset Quotes erd
1151 \begin_inset Quotes eld
1155 \begin_inset Quotes erd
1159 Section headings, like most environments, are assumed to end when you type
1165 Type the document introduction:
1168 \begin_layout LyX-Code
1169 This is an introduction to my first LyX document.
1172 \begin_layout Standard
1187 \begin_inset Quotes eld
1191 \begin_inset Quotes erd
1194 and waits for you to type a title.
1199 , and you'll see that LyX again sets it as a section title.
1202 \begin_layout Standard
1204 Go to the end of Section\InsetSpace ~
1206 \begin_inset Quotes eld
1209 my first LyX document
1210 \begin_inset Quotes erd
1227 \begin_inset Quotes eld
1231 \begin_inset Quotes erd
1234 and waits for you to type a title.
1240 Section\InsetSpace ~
1242 \begin_inset Quotes eld
1246 \begin_inset Quotes erd
1249 , which used to be Section\InsetSpace ~
1250 2, has been automatically renumbered to Section\InsetSpace ~
1252 In true WYSIWYM fashion, you just need to identify the text that makes
1253 up the section titles, and LyX takes care of numbering the sections and
1257 \begin_layout Standard
1266 environment, and type the following five lines:
1269 \begin_layout LyX-Code
1270 Sections and subsections are described below.
1273 \begin_layout LyX-Code
1277 \begin_layout LyX-Code
1278 Sections are bigger than subsections.
1281 \begin_layout LyX-Code
1282 Subsection description
1285 \begin_layout LyX-Code
1286 Subsections are smaller than sections.
1289 \begin_layout Standard
1290 Click on the second line and select
1299 LyX numbers the subsection
1300 \begin_inset Quotes eld
1304 \begin_inset Quotes erd
1307 , and typesets it in a font which is bigger than regular text but smaller
1308 than the section title.
1309 Change the fourth line
1313 environment as well.
1314 As you probably expected, LyX automatically numbered the section
1315 \begin_inset Quotes eld
1319 \begin_inset Quotes erd
1323 If you put yet another section before Section\InsetSpace ~
1324 2, Section\InsetSpace ~
1325 2 will be renumbered
1326 as Section 3, and the subsections will be renumbered to
1327 \begin_inset Quotes eld
1331 \begin_inset Quotes erd
1335 \begin_inset Quotes eld
1339 \begin_inset Quotes erd
1346 \begin_layout Standard
1347 Further levels of sectioning include
1360 We'll let you play with these on your own.
1361 You may notice that paragraph and subparagraph headings are not numbered
1362 by default, and that subparagraphs are indented; see the
1371 headings are actually the highest level of sectioning, above
1375 s, but you're only allowed to use them in certain types (text classes) of
1376 LyX documents (see Section\InsetSpace ~
1378 \begin_inset LatexCommand \ref{sec:textclasses}
1386 \begin_layout Standard
1387 Finally, you may want to have sections or subsections that are not numbered.
1388 There are environments for this as well.
1389 If you change one of your section headings to the
1393 environment (you may have to scroll down in the
1397 menu to find it), LyX will use the same font size for the heading as it
1398 uses for a regular section, but it won't number that section.
1399 There are corresponding
1400 \begin_inset Quotes eld
1404 \begin_inset Quotes erd
1407 heading environments for
1416 Try changing some of your sections or subsections to the starred environments,
1417 and note how the other sections' numbers are updated.
1420 \begin_layout Standard
1425 : Fix the section and subsection headings in
1433 \begin_layout Subsection
1437 \begin_layout Standard
1438 LyX has several different environments for typesetting lists.
1439 The various list environments free you from hitting
1443 a million times when writing an outline, or from renumbering a whole list
1444 when you want to add a point in the middle of the list, and lets you concentrat
1445 e on the list content.
1449 \begin_layout Standard
1450 Yes, we're overemphasizing this point throughout the
1459 the main philosophy of LyX, so please forgive us.
1464 Different types of documents logically require different list environments:
1467 \begin_layout Itemize
1468 A slide presentation might use the
1472 environment's bulleted lists to describe different points.
1476 \begin_layout Itemize
1477 An outline would use the
1481 environment's numbered lists (and lettered sublists).
1485 \begin_layout Itemize
1486 A document describing several software packages could use the
1490 environment, where each item in the list begins with a bold-faced word.
1494 \begin_layout Itemize
1499 environment --- not found in LaTeX --- is a slightly different form of
1507 \begin_layout Standard
1508 Let's write a list of reasons why LyX is better than other word processors.
1509 Somewhere in your document, type:
1512 \begin_layout Standard
1515 Lyx is better than other word processors because:
1518 \begin_layout Standard
1534 \begin_inset Quotes eld
1538 \begin_inset Quotes erd
1541 (actually, an asterisk, which will be converted to a round circle on output)
1543 Type in your reasons:
1546 \begin_layout LyX-Code
1547 Typesetting is done for you.
1550 \begin_layout LyX-Code
1554 \begin_layout LyX-Code
1555 Lists are very easy to create!
1558 \begin_layout Standard
1559 List environments, unlike headings, do not end when you type
1564 Instead, LyX assumes you're going on to the next item in the list.
1565 The above will therefore result in a three-item list.
1566 If you want more than one paragraph within one list
1570 , one way is to use the
1572 Protected\InsetSpace ~
1575 , which you get by typing
1580 In order to get out of the list, you need to reselect the
1584 environment (or just use the keybinding,
1592 \begin_layout Standard
1593 You've got a beautiful itemized list.
1594 You might want to run LaTeX to see how the list looks when printed out.
1595 But what if you wanted to number the reasons? Well, just select the whole
1600 \begin_layout Standard
1601 LyX won't let you select the first bullet unless you also select the paragraph
1606 the list, which you probably don't want to do.
1607 Similarly, you can't select the actual number in a numbered section title.
1608 Don't worry about it.
1622 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1626 \begin_layout Standard
1627 While the list is still selected, you can change to the other two list environme
1636 , in order to see what they look like.
1637 For those two environments, each list item is made up of a term, which
1638 is the item's first word, followed by a definition, which is the rest of
1639 the paragraph (until you hit
1643 .) The term is either typeset in boldface (
1648 \begin_inset Quotes eld
1652 \begin_inset Quotes erd
1659 \begin_layout Standard
1660 But a typesetter's tab, which will change to fit the size of the largest
1661 term, not a pathetic, rigid, unchangeable typewriter
1674 ) from the rest of the paragraph.
1675 If you want to have more than one word in the definition, then separate
1678 Protected\InsetSpace ~
1684 \begin_layout Standard
1689 : Typeset the list in
1694 \begin_layout Standard
1695 You can nest lists within each other in all sorts of interesting ways.
1696 An obvious example would be writing outlines.
1697 Numbered and bulleted lists will have different numbering and bulleting
1698 schemes for sublists.
1703 for details on the different sorts of lists, as well as examples which
1711 \begin_layout Subsection
1712 Other Environments: Verses, Quotations, and More
1715 \begin_layout Standard
1716 There are two environments for setting quotations apart from surrounding
1721 for short quotes and
1730 environment, also used in the
1734 for the long typing examples) is written in a
1738 font; this environment is the only place in LyX where you're allowed to
1739 use multiple spaces to allow code indenting.
1740 You can even write poetry using the
1748 to separate stanzas, and
1752 to separate lines within a stanza.
1757 for more complete descriptions of all of the available LyX environments.
1760 \begin_layout Standard
1765 : Correctly typeset the
1777 \begin_layout Standard
1791 \begin_layout Chapter
1795 \begin_layout Standard
1796 The previous chapter hopefully allowed you to get used to writing in LyX.
1797 It introduced you to the basic editing operations in LyX, as well as the
1798 powerful method of writing with environments.
1799 Most people who use LyX, though, will want to write documents: papers,
1800 articles, books, manuals, or letters.
1801 This chapter is meant to take you from simply writing text with LyX to
1802 writing a complete document.
1803 It will introduce you to text classes, which allow you to write different
1805 It will then describe many of the additions that turn text into a document,
1806 such as titles, footnotes, cross references, bibliographies, and tables
1810 \begin_layout Section
1814 \begin_layout Standard
1815 \begin_inset LatexCommand \label{sec:textclasses}
1819 Different sorts of documents should be typeset differently.
1820 For example, books are generally printed double-sided, while articles are
1822 In addition, many documents contain special environments: letters contain
1823 some environments --- such as the sender's address and the signature ---
1824 which do not make sense in a book or article.
1831 \begin_layout Standard
1832 LaTeX users: this is equivalent to the LaTeX document class
1839 takes care of these large scale differences between different sorts of documents.
1844 , for example, was written in the
1849 Text classes are another major part of the WYSIWYM philosophy; they tell
1850 LyX how to typeset the document, so you don't need to know how.
1853 \begin_layout Standard
1854 Your document is probably being written in the
1862 \begin_layout Standard
1863 That's usually the default text class
1869 Try changing to other text classes (using the
1874 ocument\SpecialChar \menuseparator
1881 dialog) to see how they are typeset differently.
1882 If you change your document to the
1886 text class and look at the
1890 menu, you'll see that most of the allowed environments are the same.
1891 However, you can now use the
1896 If you're ever unsure about which environments you can use in a given text
1897 class, just consult the
1904 \begin_layout Standard
1905 Font sizes, one- or two-column printing, and page headings are just some
1906 of the ways journals' typesettings differ from one another.
1907 As the Computer Age continues to mature, journals have begun accepting
1908 electronic submissions, creating LaTeX
1909 \begin_inset Quotes eld
1913 \begin_inset Quotes erd
1916 so that authors can submit correctly typeset articles.
1917 LyX is set up to support this as well.
1918 For example, LyX supports typesetting (and extra environments) for the
1919 American Mathematics Society journals using the
1921 Article\InsetSpace ~
1927 \begin_layout Standard
1928 Here's a very quick reference to some of the text classes.
1931 Special Document Classes
1937 manual for many more details.
1940 \begin_layout Standard
1942 \begin_inset Tabular
1943 <lyxtabular version="3" rows="7" columns="2">
1945 <column alignment="center" valignment="top" leftline="true" width="0pt">
1946 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
1947 <row topline="true" bottomline="true">
1948 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1951 \begin_layout Standard
1957 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1960 \begin_layout Standard
1967 <row topline="true">
1968 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1971 \begin_layout Standard
1977 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1980 \begin_layout Standard
1981 one-sided, no chapters
1987 <row topline="true">
1988 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1991 \begin_layout Standard
1997 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2000 \begin_layout Standard
2001 layout & environments for American Math Society
2007 <row topline="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
2021 longer than article, two-sided
2027 <row topline="true" bottomline="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 report + front and back matter
2047 <row bottomline="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 transparencies (also including FoilTeX)
2067 <row bottomline="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 lots of extra environments for address, signature\SpecialChar \ldots{}
2095 \begin_layout Section
2096 Templates: Writing a Letter
2099 \begin_layout Standard
2100 One of the most popular text classes is
2105 One way to write a letter would be to open a new
2118 ocument\SpecialChar \menuseparator
2126 While this is the most obvious way to write a letter, it seems like extra
2128 Every time you write a business letter, you want to have your address,
2129 the address you're sending to, a body, a signature, etc.
2134 for letters, which contains a sample letter; once you have a template,
2135 you can just replace a couple parts of the letter with your text each time
2139 \begin_layout Standard
2140 Open a new file with
2145 ile\SpecialChar \menuseparator
2160 Save and print the file to see how the various environments are typeset.
2163 \begin_layout Standard
2164 When you look at the
2168 menu, you'll see several environments, like the
2173 environment, which don't even exist in most other text classes.
2183 You can play around for a while to figure out how the various environments
2185 You'll notice for example that the
2189 environment has the word
2190 \begin_inset Quotes eld
2194 \begin_inset Quotes eld
2197 in red before the actual text of the signature.
2198 This word doesn't show up in the actual letter, as you'll see if you try
2200 It's just there to let you know where the signature goes.
2201 Also, note that it doesn't matter where in the file the
2206 Remember, LyX is WYSIWYM; you can put the
2210 environment anywhere you want, but LyX knows that in the printout, the
2211 signature should be at the end.
2214 \begin_layout Standard
2215 A template is just a regular LyX file.
2216 This means you can fill in your address and signature and save the file
2218 From now on, any time you want to write a letter, you can use the new template
2220 We probably don't have to suggest an actual
2221 \begin_inset Quotes eld
2225 \begin_inset Quotes erd
2228 here; just write a letter to someone!
2232 \begin_layout Standard
2233 One warning, if you're writing from a template.
2234 If you erase all of the text in an environment --- for example, if you
2240 field so that you can replace it with your own --- and then you move the
2241 cursor without writing any text, the environment may disappear.
2242 This is because most environments cannot exist without any text in them.
2243 Just reselect the environment from the
2247 menu to get it back.
2255 \begin_layout Standard
2256 Templates can be a huge time-saver, and we urge you to use them whenever
2258 In addition, they can help a person learn how to use some of the fancier
2260 Finally, they may be useful for a person who is configuring LyX for a bunch
2261 of less computer-aware users.
2262 When they're first learning LyX, it will be much less intimidating if they
2263 have a letter template customized for their company, for example.
2266 \begin_layout Section
2270 \begin_layout Standard
2271 LyX (like LaTeX) considers the title --- which may contain the actual title,
2272 the author, the date, and even an abstract of a paper --- to be a separate
2273 part of the document.
2276 \begin_layout Standard
2281 document and make sure it's using the
2289 \begin_layout Standard
2290 You should not be using the letter any more, since the
2294 textclass doesn't allow titles.
2299 Type a title on the first line, and change the line to the
2304 On the next line, type your name and change it to the
2309 On the next line, write the date in the
2314 Type a paragraph or two summarizing your document using the
2319 Notice how the title is presented when it's printed out.
2320 If you changed the document format to Book, you'll get a separate title
2321 page, like the first page of this tutorial.
2324 \begin_layout Standard
2329 : Fix the title, date, and author in
2334 \begin_layout Section
2335 Labels and Cross-References
2338 \begin_layout Standard
2339 \begin_inset LatexCommand \label{sec:labels}
2343 You can label a section (or subsubsection, or, more rarely, just a random
2344 piece of text) in your document.
2345 Once you do so, you can refer to this section in other parts of the document,
2346 using cross-references.
2347 You can refer either to the section's number, or to the page that the section
2349 As with sections and footnotes, LyX worries about the cross-references
2351 Automatic labels and cross-references are one of the best advantages of
2352 LyX (and LaTeX) over conventional word processors.
2355 \begin_layout Subsection*
2359 \begin_layout Standard
2360 Let's mark our second section, whose title is
2361 \begin_inset Quotes eld
2365 \begin_inset Quotes erd
2369 Click at the end of the section title line, and select
2374 nsert\SpecialChar \menuseparator
2382 A dialog asks you for a label name, and gives you a suggestion.
2387 , the label name will be placed in a box next to the section title.
2390 \begin_layout Standard
2391 By the way, you could have put the label right anywhere within the section
2392 as well; section references will refer to the last section or subsection
2393 whose heading comes before the label.
2394 However, putting it on the same line as the section title (or, perhaps,
2395 on the first line of the section's text) ensures that page references will
2396 reference the beginning of the section.
2399 \begin_layout Standard
2400 So far you haven't done anything --- the
2404 file will look exactly the same, since labels don't show up in the printed
2406 However, now that you've added a label, you can refer to that label with
2411 \begin_layout Subsection*
2412 Your first cross-references
2415 \begin_layout Standard
2416 Place the cursor somewhere in Section\InsetSpace ~
2421 \begin_layout LyX-Code
2422 If you want to know more about this document, then see
2428 \begin_layout Standard
2429 Now --- with the cursor after the word
2430 \begin_inset Quotes eld
2434 \begin_inset Quotes erd
2446 nsert\SpecialChar \menuseparator
2460 It shows a list of the possible labels you can reference.
2461 At the moment, there should be only one,
2462 \begin_inset Quotes eld
2466 \begin_inset Quotes erd
2470 Select it (it may be selected by default), and click
2475 Now put the cursor after the word
2476 \begin_inset Quotes eld
2480 \begin_inset Quotes erd
2483 , and change the reference type to use the page number then click
2488 (To be really correct, you should put a
2490 Protected\InsetSpace ~
2494 \begin_inset Quotes eld
2498 \begin_inset Quotes erd
2502 Same for the page reference.)
2505 \begin_layout Standard
2506 LyX puts the references in a box right where the cursor was.
2507 In the printed document, this reference marker will be replaced with either
2508 the page or section number (depending on what you selected in the
2518 iew\SpecialChar \menuseparator
2523 pdate\SpecialChar \menuseparator
2530 , and you'll see that on the last page we refer to
2531 \begin_inset Quotes eld
2534 Section\InsetSpace ~
2536 \begin_inset Quotes erd
2540 \begin_inset Quotes eld
2545 \begin_inset Quotes erd
2548 (or whatever page Section\InsetSpace ~
2552 \begin_layout Standard
2553 Conveniently, a cross-reference acts a hyperlink when you're editing a document
2554 in LyX; clicking on it will pop up the
2564 will move the cursor to the referenced label.
2567 \begin_layout Subsection*
2568 More fun with labels
2571 \begin_layout Standard
2572 We told you that LyX worries about numbering cross-references; now you can
2574 Add a new section before Section\InsetSpace ~
2576 Now rerun LaTeX, and --- voilà ! --- the section cross reference changed
2578 \begin_inset Quotes eld
2582 \begin_inset Quotes erd
2586 \begin_inset Quotes eld
2590 \begin_inset Quotes erd
2593 to a subsection, and the cross-reference will reference Subsection\InsetSpace ~
2595 of Section\InsetSpace ~
2597 The page reference won't change unless you add a whole page of text before
2598 the label, of course.
2602 \begin_layout Standard
2603 If you want some more practice with labels, then try putting a new label
2604 where your first cross-reference was, and refer to that label from elsewhere
2606 If you'll be inserting cross-references often (if, for example, you're
2607 writing a journal article), it may be convenient to leave the
2614 \begin_layout Standard
2615 If you want to make sure that the cross-referencing gets the pages right
2616 even for larger documents,
2620 a couple pages of text from the
2624 to the clipboard, and
2628 the stolen text into your document
2632 \begin_layout Standard
2633 By the way, copying a chapter title may cause an error, because chapters
2634 aren't allowed in the article class.
2635 If this happens, just delete the chapter title.
2636 If you want to know why this happens, see Section\InsetSpace ~
2638 \begin_inset LatexCommand \ref{sec:textclasses}
2651 \begin_layout Standard
2656 : Fix the references in
2661 \begin_layout Section
2662 Footnotes and Margin Notes
2665 \begin_layout Standard
2666 Footnotes can be added using the
2671 button in the toolbar
2675 \begin_layout Standard
2676 The button shows an arrow pointing to red text, which is just below some
2687 nsert\SpecialChar \menuseparator
2695 Click at the end of the word
2696 \begin_inset Quotes eld
2700 \begin_inset Quotes erd
2703 somewhere in your document and hit the
2709 A footnote box appears where you can enter the text of the footnote.
2710 LyX should place the cursor at the beginning of the footnote box.
2714 \begin_layout LyX-Code
2715 LyX is a typesetting word processor.
2718 \begin_layout Standard
2719 Now click on the button labelled
2720 \begin_inset Quotes eld
2724 \begin_inset Quotes erd
2727 The footnote box disappears, leaving the button showing where the footnote
2728 marker will be in the printed text; this is called
2729 \begin_inset Quotes eld
2733 \begin_inset Quotes erd
2737 You can unfold the footnote at any time --- and re-edit its text, if you
2738 want --- by clicking again on the
2739 \begin_inset Quotes eld
2743 \begin_inset Quotes erd
2749 \begin_layout Standard
2750 You may wonder why the footnote button is a word instead of a number.
2751 The answer is that LyX worries about the footnote numbering for you in
2753 You can see this yourself by looking at the
2758 If you add other footnotes, LyX will renumber the footnotes.
2759 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2760 there's really no need to put the numbers in the LyX file.
2763 \begin_layout Standard
2764 A footnote can be cut and pasted like normal text.
2765 Go ahead; try it! All you need to do is select the footnote button
2769 \begin_layout Standard
2770 It may be easier to select it using the keyboard.
2771 You might accidentally open the footnote if you're trying to select the
2772 marker itself with the mouse.
2786 In addition, you can change regular text to a footnote, by selecting it
2792 button; change a footnote to regular text by hitting the
2796 key when the cursor is in the first position of a footnote, or by hitting
2801 key when the cursor is in the very last position of the footnote, respectively.
2804 \begin_layout Standard
2805 Margin notes can be added using the toolbar button (the button shows an
2806 arrow pointing to red text next to (i.e., in the margin of) black text, and
2807 should be next to the
2812 button in the toolbar.) or
2817 nsert\SpecialChar \menuseparator
2822 arginal\InsetSpace ~
2826 Margin notes are like footnotes, except that:
2829 \begin_layout Itemize
2830 the on-screen boxes say
2831 \begin_inset Quotes eld
2835 \begin_inset Quotes erd
2839 \begin_inset Quotes eld
2843 \begin_inset Quotes erd
2849 \begin_layout Itemize
2850 the notes will be placed in the margin, instead of below the text
2853 \begin_layout Itemize
2854 margin notes are not numbered
2857 \begin_layout Standard
2858 Change your LyX footnote back to text, then select and change it to a margin
2860 Run LaTeX again to see what the margin note looks like.
2863 \begin_layout Standard
2868 : Fix the footnote in
2873 \begin_layout Section
2877 \begin_layout Standard
2878 \begin_inset LatexCommand \label{sec:bibliographies}
2882 Bibliographies (at least in the exact sciences) are similar to cross references.
2883 The bibliography contains a list of references at the end of the document,
2884 and they can be referenced from within the document.
2885 Like section titles, LyX and LaTeX make your job easier by automatically
2886 numbering the bibliography items and changing citations when the items'
2890 \begin_layout Standard
2891 Go to the end of the document and switch to the
2896 Now, each paragraph you type will be a reference.
2899 The Lyx Tutorial, by the LyX Documentation Team
2901 as your first reference.
2902 Note that LyX automatically puts a number in a box before each reference.
2903 Click on the boxed reference number, and a
2905 Bibliography\InsetSpace ~
2909 You use the first field, the
2913 , to refer to this reference within the LyX document.
2914 By default, it is a number.
2920 \begin_inset Quotes eld
2924 \begin_inset Quotes erd
2927 to make it easy to remember.
2930 \begin_layout Standard
2931 Now pick somewhere in your document that you would like to insert a reference.
2937 nsert\SpecialChar \menuseparator
2950 The right panel in this dialog lists all the bibliography entries, and
2951 this field allows you to choose which bibliography item you want to cite.
2953 \begin_inset Quotes eld
2957 \begin_inset Quotes erd
2960 (right now, that's the only item in the bibliography), then use the left
2961 arrow in the center to insert it.
2962 (You can have multiple citations in the same place by transferring a number
2963 of keys this way.) Now run LaTeX, and you'll see that the citation appears
2964 in brackets in the text, referring to the bibliography at the end of the
2968 \begin_layout Standard
2969 How are the other fields used? The
2981 dialog will put a remark (such as a reference to a page or chapter within
2982 the referenced book or article) in the brackets after the reference.
2983 If you want the references to have labels instead of numbers in the printed
2984 output (for example, some journals would use
2985 \begin_inset Quotes eld
2989 \begin_inset Quotes erd
2992 to refer to a paper written by Smith in 1995), use the
3001 Bibliography\InsetSpace ~
3006 As usual, you can see the
3013 \begin_layout Standard
3018 Fix the bibliography and citation in
3023 \begin_layout Section
3027 \begin_layout Standard
3028 You may want to put a table of contents at the beginning of your document.
3029 LyX makes this very easy to do.
3034 after your document title and before your first section title and choose
3040 nsert\SpecialChar \menuseparator
3047 C\SpecialChar \menuseparator
3058 \begin_inset Quotes eld
3062 \begin_inset Quotes erd
3065 will appear in a button on the first line of the document.
3069 \begin_layout Standard
3070 This may not appear to be very useful.
3071 However, if you look at your
3075 file, you will see that a table of contents has been generated, listing
3076 the various sections and subsections in your document.
3077 As usual, if you reorder sections or create new ones, you will see those
3082 file when you update it.
3086 \begin_layout Standard
3087 The table of contents is not printed in the on-screen version of the document,
3088 because you can't edit it anyway.
3089 However, you can display the table of contents in a separate window by
3090 clicking on the table of contents button, or by using
3095 ocument\SpecialChar \menuseparator
3105 The menu command will work even if you don't have a table of contents inset
3107 This is a very useful tool.
3114 window to move around your document.
3115 Clicking on a (sub)section title in the
3121 window will highlight that line and move the cursor (in the LyX editing
3122 window) to that place in the document.
3123 You can also use the arrow keys to move up and down in the table of contents.
3124 You may therefore find it convenient to leave this window open throughout
3126 You can get similar functionality from the
3133 menu, though, where the table of contents appears automatically.
3136 \begin_layout Standard
3137 To get rid of the Table of Contents, you can delete the table of contents
3138 button just like any other text.
3141 \begin_layout Standard
3146 : Fix the table of contents in
3151 \begin_layout Chapter
3155 \begin_layout Standard
3156 LaTeX is used by many scientists because it outputs great looking equations,
3157 avoiding the control characters used by word processors and their equation
3159 Many of these scientists are frustrated, however, because writing equations
3160 in LaTeX is more like programming than writing.
3161 Happily, LyX has WYSIWYM support for equations.
3162 If you are used to LaTeX, you'll find that all of the usual LaTeX math
3163 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3164 If, on the other hand, you've never written in LaTeX, then the
3169 will allow you to write professional-looking math quickly and easily
3173 \begin_layout Standard
3174 LyX can't check if the math you're writing is actually
3187 \begin_layout Section
3191 \begin_layout Standard
3192 Somewhere in your LyX document, type:
3195 \begin_layout LyX-Code
3196 I like what Einstein said, E=mc^2, because it's so simple.
3200 \begin_layout Standard
3201 Now, that equation doesn't look very good, even in the
3205 file; there's no space between the letters and the equals sign, and you'd
3206 like to write an actual superscript for the
3207 \begin_inset Quotes eld
3211 \begin_inset Quotes erd
3215 That bad typesetting happened because we didn't tell LyX that we were writing
3216 a mathematical expression, so it typeset the equation like regular old
3220 \begin_layout Standard
3221 Instead, we create a formula that will get typeset properly.
3222 In order to create a formula, just click the toolbar button with
3223 \begin_inset Formula $\frac{a+b}{c}$
3226 written on it in blue.
3227 LyX will insert a little blue square, which is an empty math formula.
3228 LyX has placed the cursor in the blue square, so just type
3233 The expression is typed in blue, and the blue square disappears as soon
3234 as the formula is not empty.
3239 to leave the equation The purple markers disappear, leaving the cursor
3240 to the right of the expression, and now if you type something, it will
3244 \begin_layout Standard
3245 Run LaTeX and look at the
3250 Notice that the expression was typeset nicely, with spaces between the
3251 letters and the equals sign, and a superscript
3252 \begin_inset Quotes eld
3256 \begin_inset Quotes erd
3260 Letters in math mode are assumed to be variables, and come out in italics.
3261 Numbers are just numbers.
3264 \begin_layout Standard
3265 This math editor is another example of the WYSIWYM philosophy.
3266 In LaTeX, you write a mathematical expression using text and commands like
3273 ; this can be frustrating, because you can't see what an expression looks
3274 like until you LaTeX the file, and may have to spend time to find missing
3276 \begin_inset Quotes eld
3280 \begin_inset Quotes erd
3284 On the other hand, LyX doesn't attempt to get the expression to look perfect
3285 (WYSIWYG), but it gives you an extremely good idea of what the expression
3287 LaTeX then takes care of the professional typesetting.
3288 99% of the time, you won't have to make any changes to the font sizes or
3289 spacing that LaTeX outputs.
3290 This way (sorry to be so repetitive) you can focus on the
3294 of your mathematical expressions, not their format.
3297 \begin_layout Section
3298 Navigating an Equation
3301 \begin_layout Standard
3303 \begin_inset Formula $E=mc^{2}$
3307 \begin_inset Formula $E=1+mc^{2}$
3311 Use the arrow keys to move the cursor into the expression.
3312 Note that when you enter the expression, the purple markers appear to let
3313 you know you're editing math.
3322 to move the cursor past the equals sign, and just type
3323 \begin_inset Quotes eld
3327 \begin_inset Quotes erd
3331 Again, you can use the arrow keys or
3335 to leave the formula\SpecialChar \@.
3339 \begin_layout Standard
3340 Other than the special keys described below, typing in math mode is like
3341 editing regular text.
3351 Select text either with the arrow keys or with the mouse.
3357 dit\SpecialChar \menuseparator
3364 works in math mode, as does cutting and pasting.
3365 One thing to be careful of: if you're right outside a formula and you type
3374 ), it will delete the whole expression.
3375 Luckily, you can just use
3382 \begin_layout Standard
3383 What if you want to change
3384 \begin_inset Formula $E=mc^{2}$
3388 \begin_inset Formula $E=mc^{2.5}+1$
3391 ? Again, you can use the mouse to click in the right place.
3392 However, you can also use the arrow keys.
3393 If the cursor is just after the
3394 \begin_inset Quotes eld
3398 \begin_inset Quotes erd
3402 \begin_inset Quotes eld
3406 \begin_inset Quotes erd
3413 will move the cursor to the level of the superscript, just before the
3414 \begin_inset Quotes eld
3418 \begin_inset Quotes erd
3423 \begin_inset Quotes eld
3427 \begin_inset Quotes erd
3435 will move the cursor back to the regular level.
3440 from anywhere within the superscript, the cursor will be placed just
3444 the superscript (so that you can then type the
3445 \begin_inset Quotes eld
3449 \begin_inset Quotes erd
3455 \begin_layout Section
3456 Exponents and Indices
3459 \begin_layout Standard
3460 An exponent can be entered from the
3465 (see below), but it's actually simpler just to type the caret key,
3466 \begin_inset Quotes eld
3470 \begin_inset Quotes erd
3474 LyX will place another blue rectangle in the superscript, so that whatever
3475 you write next will be superscripted, and in a smaller font size.
3476 Everything you type until you hit a
3484 to exit Mathed entirely) will be in the superscript.
3487 \begin_layout Standard
3488 Writing a subscript (index) is just as easy --- start one by typing the
3490 \begin_inset Quotes eld
3494 \begin_inset Quotes eld
3498 You can subscript and superscript both subscripts and superscripts like
3500 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3507 \begin_layout Standard
3519 \begin_layout Section
3525 \begin_layout Standard
3531 is a convenient way to enter symbols or to perform many complicated Mathed
3533 Many of these functions can be accomplished from the keyboard or the
3538 dit\SpecialChar \menuseparator
3552 \SpecialChar \menuseparator
3561 However, we're going to concentrate on using the
3566 , just to let you know what's out there; you can learn keyboard shortcuts
3567 later, from other manuals.
3575 \SpecialChar \menuseparator
3582 \SpecialChar \menuseparator
3589 now and leave it open while reading this section.
3592 \begin_layout Standard
3593 Right-clicking on a formula will open the
3600 \begin_layout Subsection
3604 \begin_layout Standard
3610 which allow you to choose from a large array of symbols used in math: various
3611 arrows, relations, operators, and sums and integrals.
3612 Note that subscripting and superscripting allow you to put lower and upper
3613 limits on sums and integrals.
3617 \begin_layout Standard
3618 \begin_inset Quotes eld
3621 Nothing you can do that can't be done\SpecialChar \ldots{}
3623 \begin_inset Formula $\heartsuit$
3627 \begin_inset Quotes erd
3633 \begin_layout Subsection
3634 Square roots, accents, and delimiters
3637 \begin_layout Standard
3638 To type a square root, just click on the button with a square root sign
3640 The square root appears, and the cursor is in a new insertion point inside
3642 You can type variables, numbers, other square roots, fractions, whatever
3644 LyX will automatically resize the square root to fit what's inside.
3647 \begin_layout Standard
3648 Accenting a character (
3649 \begin_inset Formula $\overrightarrow{v}$
3652 ) or group of characters (
3653 \begin_inset Formula $\overrightarrow{a+b}$
3656 ) is done the same way.
3661 types are available from the panel.
3662 Click on a decoration, and LyX will insert that decoration with an insertion
3663 point under (or over) it.
3664 Just type what you want in the insertion point.
3665 There are two sets of decorations: those that resize with the text you
3666 type, and those that have fixed size, and are most appropriate for a single
3671 \begin_layout Standard
3672 Delimiters such as parentheses, brackets, and braces work similarly, but
3673 are a bit more complicated.
3678 button, which features a blue square surrounded by brackets, to pop up
3684 Your current selection of delimiters is displayed in a box.
3685 It's a pair of parentheses by default, but you can choose a pair of braces,
3686 a brace and a parenthesis, or even choose the empty square to have something
3688 \begin_inset Quotes eld
3692 \begin_inset Formula $a=\left\langle 7\right.$
3696 \begin_inset Quotes erd
3699 (the empty delimiter is displayed as a broken line in LyX, but won't show
3703 \begin_layout Standard
3704 If you're lazy, you can type actual parentheses in math mode, rather than
3710 However, those parentheses will be the same size as regular text, which
3711 will look bad if you have a big fraction or matrix inside the parentheses.
3716 window will guarantee that the delimiters are sized based on what's inside
3720 \begin_layout Standard
3721 You can also put delimiters or a square root sign or a decoration on already
3723 Select the portion of the formula that you want to adjust, and then click
3724 on the button you want from the
3730 Try using this to change Newton's second law from scalar to vector form
3732 \begin_inset Formula $f=ma$
3736 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3740 Once you've learned about matrices, this is how you'll put parentheses
3741 or brackets around them.
3744 \begin_layout Subsection
3748 \begin_layout Standard
3749 Fractions are very simple in Mathed.
3759 , which shows a fraction with blue squares in the numerator and the denominator.
3760 LyX writes two insertion points in a fraction.
3761 As you would expect, you can use arrow keys or the mouse to move around
3763 Click on the top square and type
3764 \begin_inset Quotes eld
3768 \begin_inset Quotes erd
3777 \begin_inset Quotes eld
3781 \begin_inset Quotes erd
3785 You've made a fraction! Of course you can type anything within each of
3786 the two boxes: variables with exponents, square roots, other fractions,
3791 \begin_layout Standard
3803 \begin_layout Subsection
3804 TeX mode: Limits, log, sin and others
3807 \begin_layout Standard
3808 Because letters in math mode are considered to be variables, if you type
3810 \begin_inset Quotes eld
3814 \begin_inset Quotes erd
3817 in math mode, LyX thinks you're typing the product of the three variables
3819 \begin_inset Formula $s$
3823 \begin_inset Formula $i$
3827 \begin_inset Formula $n$
3831 The three letters will be typeset in italics, when what you really wanted
3833 \begin_inset Quotes eld
3837 \begin_inset Quotes erd
3841 In addition, LyX won't put a space between the word
3842 \begin_inset Quotes eld
3846 \begin_inset Quotes erd
3850 \begin_inset Quotes eld
3854 \begin_inset Quotes erd
3861 will just exit math mode).
3863 \begin_inset Quotes eld
3867 \begin_inset Formula $\sin x$
3871 \begin_inset Quotes erd
3875 \begin_inset Quotes eld
3879 \begin_inset Formula $sinx$
3883 \begin_inset Quotes erd
3889 \begin_layout Standard
3891 \begin_inset Quotes eld
3895 \begin_inset Quotes erd
3909 \begin_inset Quotes eld
3913 \begin_inset Quotes erd
3916 is written in black, in upright roman type.
3917 The whole word is treated as one symbol, so if you type
3921 , it will delete the whole word.
3923 \begin_inset Quotes eld
3927 \begin_inset Quotes erd
3930 , which will be written in blue italics, like you expect in Mathed.
3935 file, the expression will be correctly typeset.
3939 \begin_layout Standard
3940 Other commands you need to type in TeX mode using the
3944 box include other trigonometric functions and their inverses, hyperbolic
3945 functions, logarithms, limits, and quite a few others.
3946 These functions can take subscripts and superscripts, important for typing
3948 \begin_inset Quotes eld
3952 \begin_inset Formula $\cos^{2}\theta$
3956 \begin_inset Quotes erd
3960 \begin_inset Quotes eld
3964 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3968 \begin_inset Quotes erd
3974 \begin_layout Standard
3986 \begin_layout Subsection
3990 \begin_layout Standard
3991 \begin_inset LatexCommand \label{sec:matrices}
4005 The dialog has two sliding bars which allow you to choose how many rows
4006 and columns you want in your matrix.
4007 Choose 2 rows and 3 columns and hit
4016 LyX prints 6 insertion points in a
4017 \begin_inset Formula $2\times3$
4021 As usual, you can put any sort of Mathed expression (a square root, another
4022 matrix, etc.) in each insertion point.
4023 You can also leave some of the insertion points empty if you want.
4026 \begin_layout Standard
4031 can be used to move horizontally between the columns of a matrix.
4032 Alternatively, you can use the arrow keys to move around - hitting
4036 at the end of one box will move to the next box,
4040 will move to the next row, etc.
4043 \begin_layout Standard
4044 If you suddenly need more rows or columns, use
4049 dit\SpecialChar \menuseparator
4054 ath\SpecialChar \menuseparator
4072 They add a row or column just after the current position.
4093 \begin_layout Standard
4098 for information on how to change the horizontal alignment of each column,
4099 and how to change the vertical position of the whole matrix.
4100 Note that if you want to write a table containing text, you should use
4101 LyX' wonderful table support, rather than trying to write text in a matrix.
4104 \begin_layout Subsection
4108 \begin_layout Standard
4109 All of the expressions we have written so far have been on the same line
4110 as the text that came before and after them, otherwise known as inline
4112 This is fine for short, simple expressions, but if you want to write larger
4113 ones, or if you want your expressions to stand out from the text, you need
4114 to write them in display mode.
4115 In addition, only displayed expressions can be labeled and numbered (see
4120 ), and multi-line equations (see Sec.
4122 \begin_inset LatexCommand \ref{sec:multiline}
4126 ) must be in display mode.
4129 \begin_layout Standard
4139 , which represents a couple lines of text before and after a centered blue
4141 LyX inserts a formula, but the insertion point is on a new line, and it's
4142 centered within that line.
4143 Now type an expression and run LaTeX to see how it looks.
4148 button is actually a toggle; use it now to change a couple of your expressions
4149 to display mode and back.
4153 \begin_layout Standard
4154 Display mode has a couple differences from inline mode:
4157 \begin_layout Itemize
4158 The default font is larger for a few symbols, like
4159 \begin_inset Formula $\sum$
4163 \begin_inset Formula $\int$
4169 \begin_layout Itemize
4170 Subscripts and superscripts for limits and sums (but not integrals) are
4171 written under rather than next to the symbols
4174 \begin_layout Itemize
4178 \begin_layout Standard
4179 Other than these differences, though, displayed expressions and inline expressio
4180 ns are very similar.
4183 \begin_layout Standard
4184 One final note about the way displayed formulae are typeset: be careful
4185 about whether you're putting your equation into a new paragraph or not.
4186 If your formula is in the middle of a sentence or paragraph, then don't
4192 Doing so will cause the text
4196 the formula to start a new paragraph.
4197 That text will therefore be indented, which is probably not what you want.
4200 \begin_layout Standard
4205 : Put the various equations in
4209 into display mode, and see how they're typeset differently.
4212 \begin_layout Standard
4217 : Using various tools you've learned in this section, you should be able
4218 to write an equation like
4222 \begin_layout Standard
4223 After you've done it the hard way, why don't you give
4228 nsert\SpecialChar \menuseparator
4233 \SpecialChar \menuseparator
4247 \begin_inset Formula \[
4248 f(x)=\left\{ \begin{array}{cc}
4251 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4258 \begin_layout Section
4262 \begin_layout Standard
4263 Mathed can do plenty more.
4264 By now, you're familiar with the basics, so we'll just refer to the
4271 \begin_layout Itemize
4272 Labeling and numbering expressions
4275 \begin_layout Itemize
4276 Multi-line equations
4279 \begin_layout Itemize
4280 Change typefaces, e.g., to write bold-face text in an expression.
4283 \begin_layout Itemize
4284 Fine-tune font sizes and spacing within an expression.
4285 (Don't worry about this until your final draft!)
4288 \begin_layout Itemize
4290 These are very powerful, because you just define them once at the top of
4291 the document, and then you can use them throughout the document.
4292 If you change the macro definition, the references to the macro will be
4293 changed throughout the document.
4294 Macros can even take arguments.
4297 \begin_layout Itemize
4298 Do lots of other things we didn't have time to mention in this
4305 \begin_layout Chapter
4309 \begin_layout Section
4310 Other Major LyX Features
4313 \begin_layout Standard
4314 We haven't gone through all the possible commands in LyX, and we aren't
4320 for more information.
4321 We'll just mention a couple more major things LyX can do\SpecialChar \ldots{}
4325 \begin_layout Itemize
4326 LyX has WYSIWYM support for tables.
4332 nsert\SpecialChar \menuseparator
4340 Click on the table with the
4349 dialog box which allows extensive table editing.
4352 \begin_layout Itemize
4353 LyX also supports including pictures in a number of formats (including JPEG
4354 and other bitmap formats, PostScript® and raw LaTeX) within documents.
4360 nsert\SpecialChar \menuseparator
4368 Then click on the figure to choose the file to include, rotate or scale
4369 it, etc.) Tables and figures can have captions, and LyX will automatically
4370 generate lists of figures and/or tables.
4373 \begin_layout Itemize
4374 Version control is supported, using RCS (
4381 \begin_layout Itemize
4382 LyX is heavily configurable.
4383 Everything from how the LyX window looks to how the output comes out can
4384 be configured in a number of ways.
4385 Much configuration is done through
4390 ools\SpecialChar \menuseparator
4398 For more information on this, check out
4403 elp\SpecialChar \menuseparator
4408 ustomization\SpecialChar \@.
4412 \begin_layout Itemize
4413 LyX is being developed by a team of programmers on five continents.
4414 Therefore, LyX has better support for non-English languages (such as Dutch,
4415 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4416 ) than many word processors.
4417 Even some right-to-left languages like Hebrew or Arabic are supported.
4418 You can write documents in other languages, but you can also configure
4419 LyX to show its menus and error messages in other languages.
4423 \begin_layout Itemize
4424 The LyX menus feature keybindings.
4425 This means that you can do
4430 ile\SpecialChar \menuseparator
4445 or by using the binding which is shown next to it in the menu (C-O by default).
4446 Keybindings are also configurable.
4447 For information on this, check out
4452 elp\SpecialChar \menuseparator
4457 ustomization\SpecialChar \@.
4461 \begin_layout Itemize
4462 LyX can read in LaTeX documents.
4463 See Section\InsetSpace ~
4465 \begin_inset LatexCommand \ref{sec:tex2lyx}
4472 \begin_layout Itemize
4473 Spellchecking and thesaurus facilities are available.
4476 \begin_layout Itemize
4477 The text box near the bottom of the LyX window is called the minibuffer
4478 (after a similar feature in
4483 This gives you access to all sorts of interesting functionality, including
4484 functionality which could break your document.
4485 In other words, don't type in the minibuffer unless you know what you're
4489 \begin_layout Section
4493 \begin_layout Standard
4494 \begin_inset LatexCommand \label{sec:latexusers}
4498 If you don't know anything about LaTeX, you don't have to read this section.
4499 Actually, you might want to
4503 about LaTeX, and then read this chapter.
4504 However, many people who begin to use LyX will be familiar with LaTeX.
4505 If you are such a person, you may be wondering if LyX can really do everything
4507 The short answer is that LyX can do pretty much everything LaTeX can do
4508 in one form or another, and it definitely simplifies most parts of writing
4510 The tool that is used to convert a LaTeX document to LyX was rewritten
4511 completely for LyX\InsetSpace ~
4513 It should now be able to handle most LaTeX gracefully.
4516 \begin_layout Standard
4517 Because this is just a tutorial, we are only going to mention things that
4518 new LyX users will most likely be interested in.
4519 In the interests of keeping the
4523 short, we will give only minimal information here.
4528 manual, specifically the
4530 Secrets of the LaTeX Masters
4532 chapter, has a great deal of information on differences between LyX and
4533 LaTeX, and how to do various LaTeX tricks in LyX.
4536 \begin_layout Subsection
4540 \begin_layout Standard
4541 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4542 will be displayed in red on the screen.
4543 You can use TeX commands in LyX by choosing
4548 nsert\SpecialChar \menuseparator
4557 This creates a text box, and everything within it is passed straight to
4561 \begin_layout Standard
4562 In a math formula, TeX mode is handled a bit differently.
4563 Enter TeX mode by typing a backslash.
4564 The backslash is not written out, but anything you type afterwards will
4566 You exit TeX mode by typing
4570 or some other non-alphabetic character, like a number, underscore, caret,
4572 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4573 will convert it to WYSIWYM\SpecialChar \@.
4574 So if, in a formula, you type
4580 , then when you type
4584 , LyX will change the red
4585 \begin_inset Quotes eld
4589 \begin_inset Quotes erd
4593 \begin_inset Quotes eld
4597 \begin_inset Formula $\gamma$
4601 \begin_inset Quotes erd
4605 This will work for almost all, non-complicated math macros.
4606 This may be faster than using the
4611 , and will be especially convenient for experienced LaTeX users.
4614 \begin_layout Standard
4615 As a special case, if you type a brace in TeX mode, then the beginning
4619 ending braces will be inserted in red, then take you
4623 of TeX mode and place the cursor between the braces.
4624 This makes it more convenient to type commands that LyX doesn't know which
4628 \begin_layout Standard
4629 LyX can't do absolutely everything that LaTeX can do (yet?).
4630 Some fancy functions are not supported at all, while some work but aren't
4632 TeX mode allows users to get the full flexibility of LaTeX, while having
4633 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4634 LyX could never support every LaTeX package.
4641 in the preamble (see Section\InsetSpace ~
4643 \begin_inset LatexCommand \ref{sec:preamble}
4647 ), you can use any package you want --- although you won't have WYSIWYM
4648 support for that package's features.
4651 \begin_layout Subsection
4652 Importing LaTeX Documents ---
4657 \begin_layout Standard
4658 \begin_inset LatexCommand \label{sec:tex2lyx}
4662 You can import a LaTeX file into LyX by using the
4667 ile\SpecialChar \menuseparator
4672 mport\SpecialChar \menuseparator
4684 which will create a file
4692 --- and then open that file.
4693 If the translation doesn't work, you can try calling
4697 from the command line, possibly using fancier options.
4700 \begin_layout Standard
4705 will translate most legal LaTeX, but not everything.
4706 It will leave things it doesn't understand in TeX mode, so after translating
4711 , you can look for red text and hand-edit it to look right.
4714 \begin_layout Standard
4719 has its own manpage.
4720 Read it to find out about which LaTeX commands and environments aren't
4721 supported, bugs (and how to get around them), and how to use the various
4725 \begin_layout Subsection
4726 Converting LyX Documents to LaTeX
4729 \begin_layout Standard
4730 You might wish to convert a LyX Document to a LaTeX file.
4731 For example, a co-worker or co-author who doesn't have LyX might want to
4733 This is very easy to do with LyX.
4739 ile\SpecialChar \menuseparator
4744 xport\SpecialChar \menuseparator
4752 This will create a file
4760 file you are editing.
4761 LyX always creates temporary LaTeX files when viewing or printing files,
4762 so it is very good at generating LaTeX.
4765 \begin_layout Subsection
4769 \begin_layout Subsubsection
4773 \begin_layout Standard
4779 ocument\SpecialChar \menuseparator
4786 dialog takes care of many of the options that you would input in a
4793 Change the class, default font size and paper size here.
4794 Put any extra options to the
4812 \begin_layout Subsubsection
4813 Other Preamble Matter
4816 \begin_layout Standard
4817 \begin_inset LatexCommand \label{sec:preamble}
4821 If you have special commands to put in the preamble of a LaTeX file, you
4822 can use them in a LyX document as well.
4828 ocument\SpecialChar \menuseparator
4840 and type in the dialog window (or from the document settings dialog, depending
4842 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4845 \begin_layout Subsection
4849 \begin_layout Standard
4850 LyX has support for BibTeX, which allows you to build databases of bibliographic
4851 al references to be used in multiple documents.
4857 nsert\SpecialChar \menuseparator
4864 C\SpecialChar \menuseparator
4877 Click on the resulting
4878 \begin_inset Quotes eld
4882 Generated\InsetSpace ~
4884 \begin_inset Quotes erd
4887 button, and you will get a
4896 field, type what you would type inside the braces of a
4906 \begin_layout Standard
4907 Like in regular LaTeX, multiple bibliographies should be separated by commas,
4918 field, type what you would type inside the braces of a
4927 \begin_layout Standard
4928 After you've done this, you can use citations from any bibliographies you're
4934 nsert\SpecialChar \menuseparator
4941 (see Section\InsetSpace ~
4943 \begin_inset LatexCommand \ref{sec:bibliographies}
4948 LyX will take care of running BibTeX.
4953 dialog will show a list of all the references in your
4960 \begin_layout Section
4964 \begin_layout Standard
4965 Sometimes when you LaTeX a document, there will be errors, things that LyX
4966 or LaTeX can't understand.
4967 When this happens, LyX will open a
4973 Clicking on individual errors in this dialog will take you to the place
4974 in the LyX document where the error occurs and also display the detailed
4975 LaTeX error message.