1 #LyX 1.4.0cvs created this file. For more info see http://www.lyx.org/
10 \paperfontsize default
17 \paperorientation portrait
20 \paragraph_separation indent
22 \quotes_language english
26 \paperpagestyle headings
27 \tracking_changes false
44 \begin_layout Standard
46 Principal maintainer of this file is
51 If you have comments or error corrections, please send them to the LyX
52 Documentation mailing list, <lyx-docs@lists.lyx.org>.
60 \begin_layout Standard
63 \begin_inset LatexCommand \tableofcontents{}
80 \begin_layout Standard
82 This file is designed for all of you who have never heard of LaTeX, or don't
84 Now, don't panic - you won't need to learn LaTeX to use LyX.
85 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
87 There are some things you will need to learn, however, in order to use
91 \begin_layout Standard
93 Some of you probably found your way to this document because you tried to
94 put two spaces after a
95 \begin_inset Quotes eld
99 \begin_inset Quotes erd
102 or tried to put 3 blank lines between paragraphs.
103 After much frustration, you found you couldn't.
104 In fact, you'll find that most of the little tricks you're accustomed to
105 using in other word processors just won't work in LyX.
106 That's because most word processors you've used before allow you to manually
107 enter all spacings, font changes, and so on.
108 So you end up not only writing a document but typesetting it, too.
109 LyX does the typesetting for you, in a consistent fashion, letting you
110 focus on the important things, like the content of your writing.
113 \begin_layout Standard
115 So, bear with us and read on.
116 Reading this tutorial is definitely worth the time.
119 \begin_layout Section
130 \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
153 Now that you know which fonts mean what, we want to talk a bit about what
161 \begin_layout Subsection
163 Getting the Most out of the Tutorial
166 \begin_layout Standard
168 This tutorial consists of examples and exercises.
169 To get the most out of this document, you should read through the document,
170 typing all the silly little things we're telling you to type and trying
171 out all of the exercises to see if you get them right.
172 For convenience, you might want to print out the PostScript® version of
176 \begin_layout Standard
178 If you are familiar with LaTeX, you'll probably be able to read the
182 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
183 However, LyX does have idiosyncrasies
187 \begin_layout Standard
189 or, more optimistically,
190 \begin_inset Quotes eld
194 \begin_inset Quotes erd
202 you'll want to learn about.
203 Even if you don't feel like reading the rest of the
207 , you should definitely check out Section\InsetSpace ~
209 \begin_inset LatexCommand \ref{sec:latexusers}
213 , which is specifically written for experienced LaTeX users.
216 \begin_layout Subsection
225 \begin_layout Itemize
227 Detailed explanations of all of LyX's features.
231 \begin_layout Standard
240 \begin_layout Standard
242 Seriously, though, we're here to get you up and running so that all you
248 If we tried to duplicate all of the information about all of LyX's features
253 would be redundant, too long, and forever out of date.
254 All we do here is introduce things; imagine there is a
255 \begin_inset Quotes eld
263 \begin_inset Quotes erd
266 at the end of every section.
269 \begin_layout Itemize
271 Detailed explanations of LaTeX.
275 \begin_layout Standard
278 If you're really curious about learning some of the neat tricks you can
279 do with LaTeX, you can always go get a LaTeX book.
280 There are several good ones on the market.
281 No need to reinvent the wheel, after all\SpecialChar \ldots{}
285 \begin_layout Standard
287 So, brave soul, it's time to move onwards.
288 Time for your first document \SpecialChar \ldots{}
292 \begin_layout Chapter
294 Getting Started with LyX
297 \begin_layout Section
299 Your First LyX Document
302 \begin_layout Standard
305 \begin_inset LatexCommand \label{sec:first-doc-ex}
310 You're ready to start writing.
311 Before you do, though, there are a few things we need to mention, which
312 will hopefully make the
316 more instructive, useful, and fun.
320 \begin_layout Standard
322 Because there's lots of information that we won't be giving you, the
327 thing that you need to do is find the
332 Luckily, this is very simple.
348 You may want to load the
352 as well (if you're not reading it on screen already).
353 This way, you can read them while you're writing your own file
357 \begin_layout Standard
359 They can also serve as good examples of how to use the many features of
366 Note that once you've got more than one document open, you can use the
374 menu to switch between them.
379 will not cover in detail subjects which are described in the other LyX
381 This may make life a bit harder for you at the beginning, but it will keep
387 It will also get you in the habit of using the other manuals, which ---
388 in the long run --- will save you a lot of time.
391 \begin_layout Standard
397 , we're going to assume that you have a fully working version of LyX, as
402 or some other dvi viewer,
406 or some other way of converting
410 documents to PostScript® documents, and a working printer.
411 This is a lot to assume.
412 If any of this is not true, you (or a friendly system administrator) will
413 need to set up your system.
414 You can find information on setup in other manuals.
417 \begin_layout Standard
419 Finally, we've written a file to let you practice your LyX skills on.
425 Imagine that it was typed by someone who didn't know about any of LyX's
427 As you learn new LyX functions, we'll suggest that you fix those parts
434 \begin_inset Quotes eld
438 \begin_inset Quotes erd
441 hints about how to fix things
445 \begin_layout Standard
447 The hints are located in yellow
448 \begin_inset Quotes eld
452 \begin_inset Quotes erd
456 Access the text in a note by clicking on it.
462 If you want to cheat (or check what you've done), there's also a file called
467 which contains the same text as written and typeset by a LyX master.
470 \begin_layout Standard
472 The example files can be found in the
476 directory, which you can get to by selecting
481 ile\SpecialChar \menuseparator
488 and then clicking on the
496 Open the raw document, and use
501 ile\SpecialChar \menuseparator
509 to save a copy in your own directory for you to work on.
510 As you fix parts of the raw document, check to see how those changes affect
514 \begin_layout Standard
520 directory contains lots of other examples files.
521 They will show you how to do various fancy things with LyX.
522 They are especially useful to display things that (due to length or other
523 reasons) won't fit in the documentation.
528 , or when you're confused about how to do something fancy in LyX, take a
532 \begin_layout Subsection
534 Typing, Viewing, and Printing
537 \begin_layout Itemize
544 ile\SpecialChar \menuseparator
552 \begin_layout Itemize
554 Type a sentence like:
556 This is my first LyX document!
559 \begin_layout Itemize
561 Save your document with
566 ile\SpecialChar \menuseparator
576 \begin_layout Itemize
578 Run LaTeX to create a
587 iew\SpecialChar \menuseparator
595 You may see things being printed in the window you ran the
600 These are messages from LaTeX, which you can ignore for now.
609 viewer), which will pop up a new window displaying what your document will
610 look like when printed.
614 \begin_layout Standard
616 You can save time by leaving
620 running in the background.
626 iew\SpecialChar \menuseparator
631 pdate\SpecialChar \menuseparator
638 and just click on the
642 window (or unminimize it) after LaTeX finishes running.
650 \begin_layout Itemize
657 ile\SpecialChar \menuseparator
670 \begin_layout Standard
672 Congratulations! You've written and printed your first LyX document.
673 All of the rest is just details, which is covered in the rest of the
692 \begin_layout Subsection
697 \begin_layout Standard
699 LyX can of course do most of the things you're used to doing with a word
701 It will word-wrap and indent paragraphs automatically.
702 Here's a quick description of how to do some simple actions.
705 \begin_layout Description
707 Undo LyX has multiple levels of undo, which means you can undo everything
708 you've done since your current editing session started, by selecting
713 dit\SpecialChar \menuseparator
721 If you undo too much, just select
726 dit\SpecialChar \menuseparator
738 \begin_layout Standard
740 Currently, undo is limited to 100 steps.
741 Undo also doesn't work for
745 ; for instance, changes to the document layout.
746 Each of these is really a LyX bug.
749 \begin_layout Description
756 dit\SpecialChar \menuseparator
764 dit\SpecialChar \menuseparator
772 dit\SpecialChar \menuseparator
775 to cut, copy, and paste.
776 Or automatically paste selected text (including selections from other programs)
784 \begin_layout Description
791 dit\SpecialChar \menuseparator
801 In the dialog, search with the
815 button to replace a word you've found
819 \begin_layout Standard
821 Close the window when you're done.
822 Or leave it open if you find it more convenient.
823 Most dialog boxes in LyX --- including the
839 dialogs, as well as the various math dialogs can operate like this.
845 ile\SpecialChar \menuseparator
852 , won't let you type anything in the main LyX window until you actually
854 Just be sure you have the right window focus when you're trying to type
855 in the main LyX window or give a command in some other LyX dialog.
861 If you like, you can specify whether to make the search case-sensitive,
862 or to search for only complete words; you can also search backwards through
866 \begin_layout Description
868 Character\InsetSpace ~
873 text (which will generally put characters in italics), put it in
881 (usually small caps, used for people's names) from the toggle buttons in
887 dit\SpecialChar \menuseparator
898 \begin_layout Description
900 Toolbar There are buttons on the toolbar (just below the menus) which allow
901 you to do some of the more popular functions, such as
912 \begin_layout Standard
914 Of course, you haven't yet written enough to make most of these functions
916 As you write more, though, try undoing, pasting, etc.
919 \begin_layout Subsection
921 WYSIWYM: Whitespace in LyX
924 \begin_layout Standard
927 \begin_inset LatexCommand \label{sec:whitespace}
931 One of the hardest things for new users to get used to is the way that LyX
933 As many times as you hit
937 , you'll only get one blank line.
938 As many times as you hit
942 , you'll only get one space.
943 On a blank line, LyX won't let you type even one space.
948 key won't move you forward one tab stop; in fact there
952 no tab stops! There's no ruler at the top of the page to let you set tabs
956 \begin_layout Standard
958 Many commercial word processors are based on the WYSIWYG principle:
959 \begin_inset Quotes eld
962 What You See Is What You Get.
963 \begin_inset Quotes erd
966 LyX, on the other hand, is based on the principle that
967 \begin_inset Quotes eld
970 What You See Is What You
975 \begin_inset Quotes erd
978 You type what you mean, and LyX will take care of typesetting it for you,
979 so that the output looks nice.
984 grammatically separates paragraphs, and a
988 grammatically separates words, so there is no reason to have several of
993 has no grammatical function at all, so LyX does not support it.
994 Using LyX, you'll spend more of your time worrying about the
998 of your document, and less time worrying about the
1007 for more information on the WYSIWYM concept.
1010 \begin_layout Standard
1012 LyX does have (many) ways to fine-tune the formatting of your document.
1013 After all, LyX might not typeset
1022 has information about all that.
1027 s and vertical space --- which are more powerful and versatile than multiple
1028 spaces or blank lines --- and ways to change font sizes, character styles,
1029 and paragraph alignments by hand.
1030 The idea, though, is that you can write your whole document, focusing on
1031 content, and just worry about that fine-tuning at the end.
1032 With standard word processors, you'll be distracted by document formatting
1033 throughout the writing process.
1036 \begin_layout Section
1041 \begin_layout Standard
1043 Different parts of a document have different purposes; we call these parts
1049 Most of a document is made up of regular text.
1050 Section (chapter, subsection, etc.) titles let the reader know that a new
1051 topic or subtopic will be discussed.
1052 Certain types of documents have special environments.
1053 A journal article will have an abstract, and a title.
1054 A letter will have neither of these, but will probably have an environment
1055 that gives the writer's address.
1058 \begin_layout Standard
1060 Environments are a major part of the
1061 \begin_inset Quotes eld
1064 What You See Is What You Mean
1065 \begin_inset Quotes erd
1069 A given environment may require a certain font style, font size, indenting,
1070 line spacing, and more.
1071 This problem is aggravated, because the exact formatting for a given environmen
1072 t may change: one journal may use boldface, 18 point, centered type for
1073 section titles while another uses italicized, 15 point, left justified
1074 type; different languages may have different standards for indenting; and
1075 bibliography formats can vary widely.
1076 LyX lets you avoid learning all the different formatting styles.
1079 \begin_layout Standard
1085 box is located on the left end of the toolbar (just under the
1093 It indicates which environment you're currently writing in.
1094 While you were writing your first document, it said
1095 \begin_inset Quotes eld
1099 \begin_inset Quotes erd
1102 which is the default environment for text.
1103 Now you will put a number of environments in your new document so that
1104 you can see how they work.
1105 You'll do so with the
1109 menu, which you open by clicking on the
1110 \begin_inset Quotes eld
1114 \begin_inset Quotes erd
1117 icon just to the right of the
1124 \begin_layout Subsection
1126 Sections and Subsections
1129 \begin_layout Standard
1135 on the first line of your LyX file, and select
1147 \begin_layout Standard
1154 If nothing is selected, LyX changes the paragraph you are currently in
1155 to the selected environment.
1156 Alternatively, you can change several paragraphs to a different environment
1157 by selecting them before picking an environment.
1175 , which will be covered below.
1176 LyX numbers the section
1177 \begin_inset Quotes eld
1181 \begin_inset Quotes erd
1184 and typesets the section heading (title) in a larger font.
1195 \begin_inset Quotes eld
1199 \begin_inset Quotes erd
1203 \begin_inset Quotes eld
1207 \begin_inset Quotes erd
1211 Section headings, like most environments, are assumed to end when you type
1217 Type the document introduction:
1220 \begin_layout LyX-Code
1222 This is an introduction to my first LyX document.
1225 \begin_layout Standard
1241 \begin_inset Quotes eld
1245 \begin_inset Quotes erd
1248 and waits for you to type a title.
1253 , and you'll see that LyX again sets it as a section title.
1256 \begin_layout Standard
1259 Go to the end of Section\InsetSpace ~
1261 \begin_inset Quotes eld
1264 my first LyX document
1265 \begin_inset Quotes erd
1282 \begin_inset Quotes eld
1286 \begin_inset Quotes erd
1289 and waits for you to type a title.
1295 Section\InsetSpace ~
1297 \begin_inset Quotes eld
1301 \begin_inset Quotes erd
1304 , which used to be Section\InsetSpace ~
1305 2, has been automatically renumbered to Section\InsetSpace ~
1307 In true WYSIWYM fashion, you just need to identify the text that makes
1308 up the section titles, and LyX takes care of numbering the sections and
1312 \begin_layout Standard
1322 environment, and type the following five lines:
1325 \begin_layout LyX-Code
1327 Sections and subsections are described below.
1330 \begin_layout LyX-Code
1335 \begin_layout LyX-Code
1337 Sections are bigger than subsections.
1340 \begin_layout LyX-Code
1342 Subsection description
1345 \begin_layout LyX-Code
1347 Subsections are smaller than sections.
1350 \begin_layout Standard
1352 Click on the second line and select
1361 LyX numbers the subsection
1362 \begin_inset Quotes eld
1366 \begin_inset Quotes erd
1369 , and typesets it in a font which is bigger than regular text but smaller
1370 than the section title.
1371 Change the fourth line
1375 environment as well.
1376 As you probably expected, LyX automatically numbered the section
1377 \begin_inset Quotes eld
1381 \begin_inset Quotes erd
1385 If you put yet another section before Section\InsetSpace ~
1386 2, Section\InsetSpace ~
1387 2 will be renumbered
1388 as Section 3, and the subsections will be renumbered to
1389 \begin_inset Quotes eld
1393 \begin_inset Quotes erd
1397 \begin_inset Quotes eld
1401 \begin_inset Quotes erd
1408 \begin_layout Standard
1410 Further levels of sectioning include
1423 We'll let you play with these on your own.
1424 You may notice that paragraph and subparagraph headings are not numbered
1425 by default, and that subparagraphs are indented; see the
1434 headings are actually the highest level of sectioning, above
1438 s, but you're only allowed to use them in certain types (text classes) of
1439 LyX documents (see Section\InsetSpace ~
1441 \begin_inset LatexCommand \ref{sec:textclasses}
1449 \begin_layout Standard
1451 Finally, you may want to have sections or subsections that are not numbered.
1452 There are environments for this as well.
1453 If you change one of your section headings to the
1457 environment (you may have to scroll down in the
1461 menu to find it), LyX will use the same font size for the heading as it
1462 uses for a regular section, but it won't number that section.
1463 There are corresponding
1464 \begin_inset Quotes eld
1468 \begin_inset Quotes erd
1471 heading environments for
1480 Try changing some of your sections or subsections to the starred environments,
1481 and note how the other sections' numbers are updated.
1484 \begin_layout Standard
1490 : Fix the section and subsection headings in
1498 \begin_layout Subsection
1503 \begin_layout Standard
1505 LyX has several different environments for typesetting lists.
1506 The various list environments free you from hitting
1510 a million times when writing an outline, or from renumbering a whole list
1511 when you want to add a point in the middle of the list, and lets you concentrat
1512 e on the list content.
1516 \begin_layout Standard
1518 Yes, we're overemphasizing this point throughout the
1527 the main philosophy of LyX, so please forgive us.
1532 Different types of documents logically require different list environments:
1535 \begin_layout Itemize
1537 A slide presentation might use the
1541 environment's bulleted lists to describe different points.
1545 \begin_layout Itemize
1547 An outline would use the
1551 environment's numbered lists (and lettered sublists).
1555 \begin_layout Itemize
1557 A document describing several software packages could use the
1561 environment, where each item in the list begins with a bold-faced word.
1565 \begin_layout Itemize
1571 environment --- not found in LaTeX --- is a slightly different form of
1579 \begin_layout Standard
1581 Let's write a list of reasons why LyX is better than other word processors.
1582 Somewhere in your document, type:
1585 \begin_layout Standard
1589 Lyx is better than other word processors because:
1592 \begin_layout Standard
1609 \begin_inset Quotes eld
1613 \begin_inset Quotes erd
1616 (actually, an asterisk, which will be converted to a round circle on output)
1618 Type in your reasons:
1621 \begin_layout LyX-Code
1623 Typesetting is done for you.
1626 \begin_layout LyX-Code
1631 \begin_layout LyX-Code
1633 Lists are very easy to create!
1636 \begin_layout Standard
1638 List environments, unlike headings, do not end when you type
1643 Instead, LyX assumes you're going on to the next item in the list.
1644 The above will therefore result in a three-item list.
1645 If you want more than one paragraph within one list
1649 , one way is to use the
1651 Protected\InsetSpace ~
1654 , which you get by typing
1659 In order to get out of the list, you need to reselect the
1663 environment (or just use the keybinding,
1671 \begin_layout Standard
1673 You've got a beautiful itemized list.
1674 You might want to run LaTeX to see how the list looks when printed out.
1675 But what if you wanted to number the reasons? Well, just select the whole
1680 \begin_layout Standard
1682 LyX won't let you select the first bullet unless you also select the paragraph
1687 the list, which you probably don't want to do.
1688 Similarly, you can't select the actual number in a numbered section title.
1689 Don't worry about it.
1703 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1707 \begin_layout Standard
1709 While the list is still selected, you can change to the other two list environme
1718 , in order to see what they look like.
1719 For those two environments, each list item is made up of a term, which
1720 is the item's first word, followed by a definition, which is the rest of
1721 the paragraph (until you hit
1725 .) The term is either typeset in boldface (
1730 \begin_inset Quotes eld
1734 \begin_inset Quotes erd
1741 \begin_layout Standard
1743 But a typesetter's tab, which will change to fit the size of the largest
1744 term, not a pathetic, rigid, unchangeable typewriter
1757 ) from the rest of the paragraph.
1758 If you want to have more than one word in the definition, then separate
1761 Protected\InsetSpace ~
1767 \begin_layout Standard
1773 : Typeset the list in
1778 \begin_layout Standard
1780 You can nest lists within each other in all sorts of interesting ways.
1781 An obvious example would be writing outlines.
1782 Numbered and bulleted lists will have different numbering and bulleting
1783 schemes for sublists.
1788 for details on the different sorts of lists, as well as examples which
1796 \begin_layout Subsection
1798 Other Environments: Verses, Quotations, and More
1801 \begin_layout Standard
1803 There are two environments for setting quotations apart from surrounding
1808 for short quotes and
1817 environment, also used in the
1821 for the long typing examples) is written in a
1825 font; this environment is the only place in LyX where you're allowed to
1826 use multiple spaces to allow code indenting.
1827 You can even write poetry using the
1835 to separate stanzas, and
1839 to separate lines within a stanza.
1844 for more complete descriptions of all of the available LyX environments.
1847 \begin_layout Standard
1853 : Correctly typeset the
1865 \begin_layout Standard
1878 \begin_layout Chapter
1883 \begin_layout Standard
1885 The previous chapter hopefully allowed you to get used to writing in LyX.
1886 It introduced you to the basic editing operations in LyX, as well as the
1887 powerful method of writing with environments.
1888 Most people who use LyX, though, will want to write documents: papers,
1889 articles, books, manuals, or letters.
1890 This chapter is meant to take you from simply writing text with LyX to
1891 writing a complete document.
1892 It will introduce you to text classes, which allow you to write different
1894 It will then describe many of the additions that turn text into a document,
1895 such as titles, footnotes, cross references, bibliographies, and tables
1899 \begin_layout Section
1904 \begin_layout Standard
1907 \begin_inset LatexCommand \label{sec:textclasses}
1911 Different sorts of documents should be typeset differently.
1912 For example, books are generally printed double-sided, while articles are
1914 In addition, many documents contain special environments: letters contain
1915 some environments --- such as the sender's address and the signature ---
1916 which do not make sense in a book or article.
1923 \begin_layout Standard
1925 LaTeX users: this is equivalent to the LaTeX document class
1932 takes care of these large scale differences between different sorts of documents.
1937 , for example, was written in the
1942 Text classes are another major part of the WYSIWYM philosophy; they tell
1943 LyX how to typeset the document, so you don't need to know how.
1946 \begin_layout Standard
1948 Your document is probably being written in the
1956 \begin_layout Standard
1958 That's usually the default text class
1964 Try changing to other text classes (using the
1969 ocument\SpecialChar \menuseparator
1976 dialog) to see how they are typeset differently.
1977 If you change your document to the
1981 text class and look at the
1985 menu, you'll see that most of the allowed environments are the same.
1986 However, you can now use the
1991 If you're ever unsure about which environments you can use in a given text
1992 class, just consult the
1999 \begin_layout Standard
2001 Font sizes, one- or two-column printing, and page headings are just some
2002 of the ways journals' typesettings differ from one another.
2003 As the Computer Age continues to mature, journals have begun accepting
2004 electronic submissions, creating LaTeX
2005 \begin_inset Quotes eld
2009 \begin_inset Quotes erd
2012 so that authors can submit correctly typeset articles.
2013 LyX is set up to support this as well.
2014 For example, LyX supports typesetting (and extra environments) for the
2015 American Mathematics Society journals using the
2017 Article\InsetSpace ~
2023 \begin_layout Standard
2025 Here's a very quick reference to some of the text classes.
2028 Special Document Classes
2034 manual for many more details.
2037 \begin_layout Standard
2040 \begin_inset Tabular
2041 <lyxtabular version="3" rows="7" columns="2">
2043 <column alignment="center" valignment="top" leftline="true" width="0pt">
2044 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
2045 <row topline="true" bottomline="true">
2046 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2049 \begin_layout Standard
2056 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2059 \begin_layout Standard
2067 <row topline="true">
2068 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2071 \begin_layout Standard
2078 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2081 \begin_layout Standard
2083 one-sided, no chapters
2089 <row topline="true">
2090 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2093 \begin_layout Standard
2100 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2103 \begin_layout Standard
2105 layout & environments for American Math Society
2111 <row topline="true">
2112 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2115 \begin_layout Standard
2122 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2125 \begin_layout Standard
2127 longer than article, two-sided
2133 <row topline="true" bottomline="true">
2134 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2137 \begin_layout Standard
2144 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2147 \begin_layout Standard
2149 report + front and back matter
2155 <row bottomline="true">
2156 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2159 \begin_layout Standard
2166 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2169 \begin_layout Standard
2171 transparencies (also including FoilTeX)
2177 <row bottomline="true">
2178 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2181 \begin_layout Standard
2188 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2191 \begin_layout Standard
2193 lots of extra environments for address, signature\SpecialChar \ldots{}
2207 \begin_layout Section
2209 Templates: Writing a Letter
2212 \begin_layout Standard
2214 One of the most popular text classes is
2219 One way to write a letter would be to open a new
2232 ocument\SpecialChar \menuseparator
2240 While this is the most obvious way to write a letter, it seems like extra
2242 Every time you write a business letter, you want to have your address,
2243 the address you're sending to, a body, a signature, etc.
2248 for letters, which contains a sample letter; once you have a template,
2249 you can just replace a couple parts of the letter with your text each time
2253 \begin_layout Standard
2255 Open a new file with
2260 ile\SpecialChar \menuseparator
2275 Save and print the file to see how the various environments are typeset.
2278 \begin_layout Standard
2280 When you look at the
2284 menu, you'll see several environments, like the
2289 environment, which don't even exist in most other text classes.
2299 You can play around for a while to figure out how the various environments
2301 You'll notice for example that the
2305 environment has the word
2306 \begin_inset Quotes eld
2310 \begin_inset Quotes eld
2313 in red before the actual text of the signature.
2314 This word doesn't show up in the actual letter, as you'll see if you try
2316 It's just there to let you know where the signature goes.
2317 Also, note that it doesn't matter where in the file the
2322 Remember, LyX is WYSIWYM; you can put the
2326 environment anywhere you want, but LyX knows that in the printout, the
2327 signature should be at the end.
2330 \begin_layout Standard
2332 A template is just a regular LyX file.
2333 This means you can fill in your address and signature and save the file
2335 From now on, any time you want to write a letter, you can use the new template
2337 We probably don't have to suggest an actual
2338 \begin_inset Quotes eld
2342 \begin_inset Quotes erd
2345 here; just write a letter to someone
2349 \begin_layout Standard
2351 One warning, if you're writing from a template.
2352 If you erase all of the text in an environment --- for example, if you
2358 field so that you can replace it with your own --- and then you move the
2359 cursor without writing any text, the environment may disappear.
2360 This is because most environments cannot exist without any text in them.
2361 Just reselect the environment from the
2365 menu to get it back.
2373 \begin_layout Standard
2375 Templates can be a huge time-saver, and we urge you to use them whenever
2377 In addition, they can help a person learn how to use some of the fancier
2379 Finally, they may be useful for a person who is configuring LyX for a bunch
2380 of less computer-aware users.
2381 When they're first learning LyX, it will be much less intimidating if they
2382 have a letter template customized for their company, for example.
2385 \begin_layout Section
2390 \begin_layout Standard
2392 LyX (like LaTeX) considers the title --- which may contain the actual title,
2393 the author, the date, and even an abstract of a paper --- to be a separate
2394 part of the document.
2397 \begin_layout Standard
2403 document and make sure it's using the
2411 \begin_layout Standard
2413 You should not be using the letter any more, since the
2417 textclass doesn't allow titles.
2422 Type a title on the first line, and change the line to the
2427 On the next line, type your name and change it to the
2432 On the next line, write the date in the
2437 Type a paragraph or two summarizing your document using the
2442 Now see how it looks when printed.
2445 \begin_layout Standard
2451 : Fix the title, date, and author in
2456 \begin_layout Section
2458 Labels and Cross-References
2461 \begin_layout Standard
2464 \begin_inset LatexCommand \label{sec:labels}
2468 You can label a section (or subsubsection, or, more rarely, just a random
2469 piece of text) in your document.
2470 Once you do so, you can refer to this section in other parts of the document,
2471 using cross-references.
2472 You can refer either to the section's number, or to the page that the section
2474 As with sections and footnotes, LyX worries about the cross-references
2476 Automatic labels and cross-references are one of the best advantages of
2477 LyX (and LaTeX) over conventional word processors.
2480 \begin_layout Subsection*
2485 \begin_layout Standard
2487 Let's mark our second section, whose title is
2488 \begin_inset Quotes eld
2492 \begin_inset Quotes erd
2496 Click at the end of the section title line, and select
2501 nsert\SpecialChar \menuseparator
2509 A dialog asks you for a label name, and gives you a suggestion.
2514 , the label name will be placed in a box next to the section title.
2517 \begin_layout Standard
2519 By the way, you could have put the label right anywhere within the section
2520 as well; section references will refer to the last section or subsection
2521 whose heading comes before the label.
2522 However, putting it on the same line as the section title (or, perhaps,
2523 on the first line of the section's text) ensures that page references will
2524 reference the beginning of the section.
2527 \begin_layout Standard
2529 So far you haven't done anything --- the
2533 file will look exactly the same, since labels don't show up in the printed
2535 However, now that you've added a label, you can refer to that label with
2540 \begin_layout Subsection*
2542 Your first cross-references
2545 \begin_layout Standard
2547 Place the cursor somewhere in Section\InsetSpace ~
2552 \begin_layout LyX-Code
2554 If you want to know more about this document, then see
2556 Section , which can be found on page .
2559 \begin_layout Standard
2561 Now --- with the cursor after the word
2562 \begin_inset Quotes eld
2566 \begin_inset Quotes erd
2578 nsert\SpecialChar \menuseparator
2592 It shows a list of the possible labels you can reference.
2593 At the moment, there should be only one,
2594 \begin_inset Quotes eld
2598 \begin_inset Quotes erd
2602 Select it (it may be selected by default), and click
2607 Now put the cursor after the word
2608 \begin_inset Quotes eld
2612 \begin_inset Quotes erd
2615 , and change the reference type to use the page number then click
2620 (To be really correct, you should put a
2622 Protected\InsetSpace ~
2626 \begin_inset Quotes eld
2630 \begin_inset Quotes erd
2634 Same for the page reference.)
2637 \begin_layout Standard
2639 LyX puts the references in a box right where the cursor was.
2640 In the printed document, this reference marker will be replaced with either
2641 the page or section number (depending on what you selected in the
2652 iew\SpecialChar \menuseparator
2657 pdate\SpecialChar \menuseparator
2664 , and you'll see that on the last page we refer to
2665 \begin_inset Quotes eld
2668 Section\InsetSpace ~
2670 \begin_inset Quotes erd
2674 \begin_inset Quotes eld
2679 \begin_inset Quotes erd
2682 (or whatever page Section\InsetSpace ~
2686 \begin_layout Standard
2688 Conveniently, a cross-reference acts a hyperlink when you're editing a document
2689 in LyX; clicking on it will pop up the
2699 will move the cursor to the referenced label.
2702 \begin_layout Subsection*
2704 More fun with labels
2707 \begin_layout Standard
2709 We told you that LyX worries about numbering cross-references; now you can
2711 Add a new section before Section\InsetSpace ~
2713 Now rerun LaTeX, and --- voilà ! --- the section cross reference changed
2715 \begin_inset Quotes eld
2719 \begin_inset Quotes erd
2723 \begin_inset Quotes eld
2727 \begin_inset Quotes erd
2730 to a subsection, and the cross-reference will reference Subsection\InsetSpace ~
2732 of Section\InsetSpace ~
2734 The page reference won't change unless you add a whole page of text before
2735 the label, of course.
2739 \begin_layout Standard
2741 If you want some more practice with labels, then try putting a new label
2742 where your first cross-reference was, and refer to that label from elsewhere
2744 If you'll be inserting cross-references often (if, for example, you're
2745 writing a journal article), it may be convenient to leave the
2753 \begin_layout Standard
2755 If you want to make sure that the cross-referencing gets the pages right
2756 even for larger documents,
2760 a couple pages of text from the
2764 to the clipboard, and
2768 the stolen text into your document
2772 \begin_layout Standard
2774 By the way, copying a chapter title may cause an error, because chapters
2775 aren't allowed in the article class.
2776 If this happens, just delete the chapter title.
2777 If you want to know why this happens, see Section\InsetSpace ~
2779 \begin_inset LatexCommand \ref{sec:textclasses}
2792 \begin_layout Standard
2798 : Fix the references in
2803 \begin_layout Section
2805 Footnotes and Margin Notes
2808 \begin_layout Standard
2810 Footnotes can be added using the
2815 button in the toolbar
2819 \begin_layout Standard
2821 The button shows an arrow pointing to red text, which is just below some
2832 nsert\SpecialChar \menuseparator
2840 Click at the end of the word
2841 \begin_inset Quotes eld
2845 \begin_inset Quotes erd
2848 somewhere in your document and hit the
2854 A footnote box appears where you can enter the text of the footnote.
2855 LyX should place the cursor at the beginning of the footnote box.
2859 \begin_layout LyX-Code
2861 LyX is a typesetting word processor.
2864 \begin_layout Standard
2866 Now click on the button labelled
2867 \begin_inset Quotes eld
2871 \begin_inset Quotes erd
2874 The footnote box disappears, leaving the button showing where the footnote
2875 marker will be in the printed text; this is called
2876 \begin_inset Quotes eld
2880 \begin_inset Quotes erd
2884 You can unfold the footnote at any time --- and re-edit its text, if you
2885 want --- by clicking again on the
2886 \begin_inset Quotes eld
2890 \begin_inset Quotes erd
2896 \begin_layout Standard
2898 You may wonder why the footnote button is a word instead of a number.
2899 The answer is that LyX worries about the footnote numbering for you in
2901 You can see this yourself by looking at the
2906 If you add other footnotes, LyX will renumber the footnotes.
2907 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2908 there's really no need to put the numbers in the LyX file.
2911 \begin_layout Standard
2913 A footnote can be cut and pasted like normal text.
2914 Go ahead; try it! All you need to do is select the footnote button
2918 \begin_layout Standard
2920 It may be easier to select it using the keyboard.
2921 You might accidentally open the footnote if you're trying to select the
2922 marker itself with the mouse.
2936 In addition, you can change regular text to a footnote, by selecting it
2942 button; change a footnote to regular text by clicking the
2947 button when the cursor is in a footnote.
2950 \begin_layout Standard
2952 Margin notes can be added using the toolbar button (the button shows an
2953 arrow pointing to red text next to (i.e., in the margin of) black text, and
2954 should be next to the
2959 button in the toolbar.) or
2964 nsert\SpecialChar \menuseparator
2969 arginal\InsetSpace ~
2973 Margin notes are like footnotes, except that:
2976 \begin_layout Itemize
2978 the on-screen boxes say
2979 \begin_inset Quotes eld
2983 \begin_inset Quotes erd
2987 \begin_inset Quotes eld
2991 \begin_inset Quotes erd
2997 \begin_layout Itemize
2999 the notes will be placed in the margin, instead of below the text
3002 \begin_layout Itemize
3004 margin notes are not numbered
3007 \begin_layout Standard
3009 Change your LyX footnote back to text, then select and change it to a margin
3011 Run LaTeX again to see what the margin note looks like.
3014 \begin_layout Standard
3020 : Fix the footnote in
3025 \begin_layout Section
3030 \begin_layout Standard
3033 \begin_inset LatexCommand \label{sec:bibliographies}
3037 Bibliographies (at least in the exact sciences) are similar to cross references.
3038 The bibliography contains a list of references at the end of the document,
3039 and they can be referenced from within the document.
3040 Like section titles, LyX and LaTeX make your job easier by automatically
3041 numbering the bibliography items and changing citations when the items'
3045 \begin_layout Standard
3047 Go to the end of the document and switch to the
3052 Now, each paragraph you type will be a reference.
3055 The Lyx Tutorial, by the LyX Documentation Team
3057 as your first reference.
3058 Note that LyX automatically puts a number in a box before each reference.
3059 Click on the boxed reference number, and a
3061 Bibliography\InsetSpace ~
3065 You use the first field, the
3069 , to refer to this reference within the LyX document.
3070 By default, it is a number.
3076 \begin_inset Quotes eld
3080 \begin_inset Quotes erd
3083 to make it easy to remember.
3086 \begin_layout Standard
3088 Now pick somewhere in your document that you would like to insert a reference.
3094 nsert\SpecialChar \menuseparator
3099 itation\InsetSpace ~
3100 Reference\SpecialChar \@.
3108 The right panel in this dialog lists all the bibliography entries, and
3109 this field allows you to choose which bibliography item you want to cite.
3111 \begin_inset Quotes eld
3115 \begin_inset Quotes erd
3118 (right now, that's the only item in the bibliography), then use the left
3119 arrow in the center to insert it.
3120 (You can have multiple citations in the same place by transferring a number
3121 of keys this way.) Now run LaTeX, and you'll see that the citation appears
3122 in brackets in the text, referring to the bibliography at the end of the
3126 \begin_layout Standard
3128 How are the other fields used? The
3141 dialog will put a remark (such as a reference to a page or chapter within
3142 the referenced book or article) in the brackets after the reference.
3143 If you want the references to have labels instead of numbers in the printed
3144 output (for example, some journals would use
3145 \begin_inset Quotes eld
3149 \begin_inset Quotes erd
3152 to refer to a paper written by Smith in 1995), use the
3161 Bibliography\InsetSpace ~
3165 As usual, you can see the
3172 \begin_layout Standard
3178 Fix the bibliography and citation in
3183 \begin_layout Section
3188 \begin_layout Standard
3190 You may want to put a table of contents at the beginning of your document.
3191 LyX makes this very easy to do.
3196 after your document title and before your first section title and choose
3202 nsert\SpecialChar \menuseparator
3209 C\SpecialChar \menuseparator
3220 \begin_inset Quotes eld
3224 \begin_inset Quotes erd
3227 will appear in a button on the first line of the document.
3231 \begin_layout Standard
3233 This may not appear to be very useful.
3234 However, if you look at your
3238 file, you will see that a table of contents has been generated, listing
3239 the various sections and subsections in your document.
3240 As usual, if you reorder sections or create new ones, you will see those
3245 file when you update it.
3249 \begin_layout Standard
3251 The table of contents is not printed in the on-screen version of the document,
3252 because you can't edit it anyway.
3253 However, you can display the table of contents in a separate window by
3254 clicking on the table of contents button, or by using
3259 ocument\SpecialChar \menuseparator
3269 The menu command will work even if you don't have a table of contents inset
3271 This is a very useful tool.
3278 window to move around your document.
3279 Clicking on a (sub)section title in the
3285 window will highlight that line and move the cursor (in the LyX editing
3286 window) to that place in the document.
3287 You can also use the arrow keys to move up and down in the table of contents.
3288 You may therefore find it convenient to leave this window open throughout
3290 You can get similar functionality from the
3297 menu, though, where the table of contents appears automatically.
3300 \begin_layout Standard
3302 To get rid of the Table of Contents, you can delete the table of contents
3303 button just like any other text.
3306 \begin_layout Standard
3312 : Fix the table of contents in
3317 \begin_layout Chapter
3322 \begin_layout Standard
3324 LaTeX is used by many scientists because it outputs great looking equations,
3325 avoiding the control characters used by word processors and their equation
3327 Many of these scientists are frustrated, however, because writing equations
3328 in LaTeX is more like programming than writing.
3329 Happily, LyX has WYSIWYM support for equations.
3330 If you are used to LaTeX, you'll find that all of the usual LaTeX math
3331 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3332 If, on the other hand, you've never written in LaTeX, then the
3337 will allow you to write professional-looking math quickly and easily
3341 \begin_layout Standard
3343 LyX can't check if the math you're writing is actually
3356 \begin_layout Section
3361 \begin_layout Standard
3363 Somewhere in your LyX document, type:
3366 \begin_layout LyX-Code
3368 I like what Einstein said, E=mc^2, because it's so simple.
3372 \begin_layout Standard
3374 Now, that equation doesn't look very good, even in the
3378 file; there's no space between the letters and the equals sign, and you'd
3379 like to write an actual superscript for the
3380 \begin_inset Quotes eld
3384 \begin_inset Quotes erd
3388 That bad typesetting happened because we didn't tell LyX that we were writing
3389 a mathematical expression, so it typeset the equation like regular old
3393 \begin_layout Standard
3395 Instead, we create a formula that will get typeset properly.
3396 In order to create a formula, just click the toolbar button with
3397 \begin_inset Formula $\frac{a+b}{c}$
3400 written on it in blue.
3401 LyX will insert a little blue square, which is an empty math formula.
3402 LyX has placed the cursor in the blue square, so just type
3407 The expression is typed in blue, and the blue square disappears as soon
3408 as the formula is not empty.
3413 to leave the equation The purple markers disappear, leaving the cursor
3414 to the right of the expression, and now if you type something, it will
3418 \begin_layout Standard
3420 Run LaTeX and look at the
3425 Notice that the expression was typeset nicely, with spaces between the
3426 letters and the equals sign, and a superscript
3427 \begin_inset Quotes eld
3431 \begin_inset Quotes erd
3435 Letters in math mode are assumed to be variables, and come out in italics.
3436 Numbers are just numbers.
3439 \begin_layout Standard
3441 This math editor is another example of the WYSIWYM philosophy.
3442 In LaTeX, you write a mathematical expression using text and commands like
3449 ; this can be frustrating, because you can't see what an expression looks
3450 like until you LaTeX the file, and may have to spend time to find missing
3452 \begin_inset Quotes eld
3456 \begin_inset Quotes erd
3460 On the other hand, LyX doesn't attempt to get the expression to look perfect
3461 (WYSIWYG), but it gives you an extremely good idea of what the expression
3463 LaTeX then takes care of the professional typesetting.
3464 99% of the time, you won't have to make any changes to the font sizes or
3465 spacing that LaTeX outputs.
3466 This way (sorry to be so repetitive) you can focus on the
3470 of your mathematical expressions, not their format.
3473 \begin_layout Section
3475 Navigating an Equation
3478 \begin_layout Standard
3481 \begin_inset Formula $E=mc^{2}$
3485 \begin_inset Formula $E=1+mc^{2}$
3489 Use the arrow keys to move the cursor into the expression.
3490 Note that when you enter the expression, the purple markers appear to let
3491 you know you're editing math.
3500 to move the cursor past the equals sign, and just type
3501 \begin_inset Quotes eld
3505 \begin_inset Quotes erd
3509 Again, you can use the arrow keys or
3513 to leave the formula\SpecialChar \@.
3517 \begin_layout Standard
3519 Other than the special keys described below, typing in math mode is like
3520 editing regular text.
3530 Select text either with the arrow keys or with the mouse.
3536 dit\SpecialChar \menuseparator
3543 works in math mode, as does cutting and pasting.
3544 One thing to be careful of: if you're right outside a formula and you type
3553 ), it will delete the whole expression.
3554 Luckily, you can just use
3561 \begin_layout Standard
3563 What if you want to change
3564 \begin_inset Formula $E=mc^{2}$
3568 \begin_inset Formula $E=mc^{2.5}+1$
3571 ? Again, you can use the mouse to click in the right place.
3572 However, you can also use the arrow keys.
3573 If the cursor is just after the
3574 \begin_inset Quotes eld
3578 \begin_inset Quotes erd
3582 \begin_inset Quotes eld
3586 \begin_inset Quotes erd
3593 will move the cursor to the level of the superscript, just before the
3594 \begin_inset Quotes eld
3598 \begin_inset Quotes erd
3603 \begin_inset Quotes eld
3607 \begin_inset Quotes erd
3615 will move the cursor back to the regular level.
3620 from anywhere within the superscript, the cursor will be placed just
3624 the superscript (so that you can then type the
3625 \begin_inset Quotes eld
3629 \begin_inset Quotes erd
3635 \begin_layout Section
3637 Exponents and Indices
3640 \begin_layout Standard
3642 An exponent can be entered from the
3647 (see below), but it's actually simpler just to type the caret key,
3648 \begin_inset Quotes eld
3652 \begin_inset Quotes erd
3656 LyX will place another blue rectangle in the superscript, so that whatever
3657 you write next will be superscripted, and in a smaller font size.
3658 Everything you type until you hit a
3666 to exit Mathed entirely) will be in the superscript.
3669 \begin_layout Standard
3671 Writing a subscript (index) is just as easy --- start one by typing the
3673 \begin_inset Quotes eld
3677 \begin_inset Quotes eld
3681 You can subscript and superscript both subscripts and superscripts like
3683 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3690 \begin_layout Standard
3703 \begin_layout Section
3710 \begin_layout Standard
3717 is a convenient way to enter symbols or to perform many complicated Mathed
3719 Many of these functions can be accomplished from the keyboard or the
3724 dit\SpecialChar \menuseparator
3738 \SpecialChar \menuseparator
3747 However, we're going to concentrate on using the
3752 , just to let you know what's out there; you can learn keyboard shortcuts
3753 later, from other manuals.
3761 \SpecialChar \menuseparator
3768 \SpecialChar \menuseparator
3775 now and leave it open while reading this section.
3778 \begin_layout Standard
3780 Right-clicking on a formula will open the
3787 \begin_layout Subsection
3792 \begin_layout Standard
3799 which allow you to choose from a large array of symbols used in math: various
3800 arrows, relations, operators, and sums and integrals.
3801 Note that subscripting and superscripting allow you to put lower and upper
3802 limits on sums and integrals.
3806 \begin_layout Standard
3809 \begin_inset Quotes eld
3812 Nothing you can do that can't be done\SpecialChar \ldots{}
3814 \begin_inset Formula $\heartsuit$
3818 \begin_inset Quotes erd
3824 \begin_layout Subsection
3826 Square roots, accents, and delimiters
3829 \begin_layout Standard
3831 To type a square root, just click on the button with a square root sign
3833 The square root appears, and the cursor is in a new insertion point inside
3835 You can type variables, numbers, other square roots, fractions, whatever
3837 LyX will automatically resize the square root to fit what's inside.
3840 \begin_layout Standard
3842 Accenting a character (
3843 \begin_inset Formula $\overrightarrow{v}$
3846 ) or group of characters (
3847 \begin_inset Formula $\overrightarrow{a+b}$
3850 ) is done the same way.
3855 types are available from the panel.
3856 Click on a decoration, and LyX will insert that decoration with an insertion
3857 point under (or over) it.
3858 Just type what you want in the insertion point.
3859 There are two sets of decorations: those that resize with the text you
3860 type, and those that have fixed size, and are most appropriate for a single
3865 \begin_layout Standard
3867 Delimiters such as parentheses, brackets, and braces work similarly, but
3868 are a bit more complicated.
3873 button, which features a blue square surrounded by brackets, to pop up
3879 Your current selection of delimiters is displayed in a box.
3880 It's a pair of parentheses by default, but you can choose a pair of braces,
3881 a brace and a parenthesis, or even choose the empty square to have something
3883 \begin_inset Quotes eld
3887 \begin_inset Formula $a=\left\langle 7\right.$
3891 \begin_inset Quotes erd
3894 (the empty delimiter is displayed as a broken line in LyX, but won't show
3898 \begin_layout Standard
3900 If you're lazy, you can type actual parentheses in math mode, rather than
3906 However, those parentheses will be the same size as regular text, which
3907 will look bad if you have a big fraction or matrix inside the parentheses.
3912 window will guarantee that the delimiters are sized based on what's inside
3916 \begin_layout Standard
3918 You can also put delimiters or a square root sign or a decoration on already
3920 Select the portion of the formula that you want to adjust, and then click
3921 on the button you want from the
3927 Try using this to change Newton's second law from scalar to vector form
3929 \begin_inset Formula $f=ma$
3933 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3937 Once you've learned about matrices, this is how you'll put parentheses
3938 or brackets around them.
3941 \begin_layout Subsection
3946 \begin_layout Standard
3948 Fractions are very simple in Mathed.
3958 , which shows a fraction with blue squares in the numerator and the denominator.
3959 LyX writes two insertion points in a fraction.
3960 As you would expect, you can use arrow keys or the mouse to move around
3962 Click on the top square and type
3963 \begin_inset Quotes eld
3967 \begin_inset Quotes erd
3976 \begin_inset Quotes eld
3980 \begin_inset Quotes erd
3984 You've made a fraction! Of course you can type anything within each of
3985 the two boxes: variables with exponents, square roots, other fractions,
3990 \begin_layout Standard
4003 \begin_layout Subsection
4005 TeX mode: Limits, log, sin and others
4008 \begin_layout Standard
4010 Because letters in math mode are considered to be variables, if you type
4012 \begin_inset Quotes eld
4016 \begin_inset Quotes erd
4019 in math mode, LyX thinks you're typing the product of the three variables
4021 \begin_inset Formula $s$
4025 \begin_inset Formula $i$
4029 \begin_inset Formula $n$
4033 The three letters will be typeset in italics, when what you really wanted
4035 \begin_inset Quotes eld
4039 \begin_inset Quotes erd
4043 In addition, LyX won't put a space between the word
4044 \begin_inset Quotes eld
4048 \begin_inset Quotes erd
4052 \begin_inset Quotes eld
4056 \begin_inset Quotes erd
4063 will just exit math mode).
4065 \begin_inset Quotes eld
4069 \begin_inset Formula $\sin x$
4073 \begin_inset Quotes erd
4077 \begin_inset Quotes eld
4081 \begin_inset Formula $sinx$
4085 \begin_inset Quotes erd
4091 \begin_layout Standard
4094 \begin_inset Quotes eld
4098 \begin_inset Quotes erd
4112 \begin_inset Quotes eld
4116 \begin_inset Quotes erd
4119 is written in black, in upright roman type.
4120 The whole word is treated as one symbol, so if you type
4124 , it will delete the whole word.
4126 \begin_inset Quotes eld
4130 \begin_inset Quotes erd
4133 , which will be written in blue italics, like you expect in Mathed.
4138 file, the expression will be correctly typeset.
4142 \begin_layout Standard
4144 Other commands you need to type in TeX mode using the
4148 box include other trigonometric functions and their inverses, hyperbolic
4149 functions, logarithms, limits, and quite a few others.
4150 These functions can take subscripts and superscripts, important for typing
4152 \begin_inset Quotes eld
4156 \begin_inset Formula $\cos^{2}\theta$
4160 \begin_inset Quotes erd
4164 \begin_inset Quotes eld
4168 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4172 \begin_inset Quotes erd
4178 \begin_layout Standard
4191 \begin_layout Subsection
4196 \begin_layout Standard
4199 \begin_inset LatexCommand \label{sec:matrices}
4213 The dialog has two sliding bars which allow you to choose how many rows
4214 and columns you want in your matrix.
4215 Choose 2 rows and 3 columns and hit
4224 LyX prints 6 insertion points in a
4225 \begin_inset Formula $2\times3$
4229 As usual, you can put any sort of Mathed expression (a square root, another
4230 matrix, etc.) in each insertion point.
4231 You can also leave some of the insertion points empty if you want.
4234 \begin_layout Standard
4240 can be used to move horizontally between the columns of a matrix.
4241 Alternatively, you can use the arrow keys to move around - hitting
4245 at the end of one box will move to the next box,
4249 will move to the next row, etc.
4252 \begin_layout Standard
4254 If you suddenly need more rows or columns, use
4259 dit\SpecialChar \menuseparator
4264 ath\SpecialChar \menuseparator
4282 They add a row or column just after the current position.
4303 \begin_layout Standard
4309 for information on how to change the horizontal alignment of each column,
4310 and how to change the vertical position of the whole matrix.
4311 Note that if you want to write a table containing text, you should use
4312 LyX' wonderful table support, rather than trying to write text in a matrix.
4315 \begin_layout Subsection
4320 \begin_layout Standard
4322 All of the expressions we have written so far have been on the same line
4323 as the text that came before and after them, otherwise known as inline
4325 This is fine for short, simple expressions, but if you want to write larger
4326 ones, or if you want your expressions to stand out from the text, you need
4327 to write them in display mode.
4328 In addition, only displayed expressions can be labeled and numbered (see
4333 ), and multi-line equations (see Sec.
4335 \begin_inset LatexCommand \ref{sec:multiline}
4339 ) must be in display mode.
4342 \begin_layout Standard
4353 , which represents a couple lines of text before and after a centered blue
4355 LyX inserts a formula, but the insertion point is on a new line, and it's
4356 centered within that line.
4357 Now type an expression and run LaTeX to see how it looks.
4362 button is actually a toggle; use it now to change a couple of your expressions
4363 to display mode and back.
4367 \begin_layout Standard
4369 Display mode has a couple differences from inline mode:
4372 \begin_layout Itemize
4374 The default font is larger for a few symbols, like
4375 \begin_inset Formula $\sum$
4379 \begin_inset Formula $\int$
4385 \begin_layout Itemize
4387 Subscripts and superscripts for limits and sums (but not integrals) are
4388 written under rather than next to the symbols
4391 \begin_layout Itemize
4396 \begin_layout Standard
4398 Other than these differences, though, displayed expressions and inline expressio
4399 ns are very similar.
4402 \begin_layout Standard
4404 One final note about the way displayed formulae are typeset: be careful
4405 about whether you're putting your equation into a new paragraph or not.
4406 If your formula is in the middle of a sentence or paragraph, then don't
4412 Doing so will cause the text
4416 the formula to start a new paragraph.
4417 That text will therefore be indented, which is probably not what you want.
4420 \begin_layout Standard
4426 : Put the various equations in
4430 into display mode, and see how they're typeset differently.
4433 \begin_layout Standard
4439 : Using various tools you've learned in this section, you should be able
4440 to write an equation like
4444 \begin_layout Standard
4446 After you've done it the hard way, why don't you give
4451 nsert\SpecialChar \menuseparator
4456 \SpecialChar \menuseparator
4470 \begin_inset Formula \[
4471 f(x)=\left\{ \begin{array}{cc}
4474 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4481 \begin_layout Section
4486 \begin_layout Standard
4488 Mathed can do plenty more.
4489 By now, you're familiar with the basics, so we'll just refer to the
4496 \begin_layout Itemize
4498 Labeling and numbering expressions
4501 \begin_layout Itemize
4503 Multi-line equations
4506 \begin_layout Itemize
4508 Change typefaces, e.g., to write bold-face text in an expression.
4511 \begin_layout Itemize
4513 Fine-tune font sizes and spacing within an expression.
4514 (Don't worry about this until your final draft!)
4517 \begin_layout Itemize
4520 These are very powerful, because you just define them once at the top of
4521 the document, and then you can use them throughout the document.
4522 If you change the macro definition, the references to the macro will be
4523 changed throughout the document.
4524 Macros can even take arguments.
4527 \begin_layout Itemize
4529 Do lots of other things we didn't have time to mention in this
4536 \begin_layout Chapter
4541 \begin_layout Section
4543 Other Major LyX Features
4546 \begin_layout Standard
4548 We haven't gone through all the possible commands in LyX, and we aren't
4554 for more information.
4555 We'll just mention a couple more major things LyX can do\SpecialChar \ldots{}
4559 \begin_layout Itemize
4561 LyX has WYSIWYM support for tables.
4567 nsert\SpecialChar \menuseparator
4575 Click on the table with the
4584 dialog box which allows extensive table editing.
4587 \begin_layout Itemize
4589 LyX also supports including pictures in a number of formats (including JPEG
4590 and other bitmap formats, PostScript® and raw LaTeX) within documents.
4596 nsert\SpecialChar \menuseparator
4604 Then click on the figure to choose the file to include, rotate or scale
4605 it, etc.) Tables and figures can have captions, and LyX will automatically
4606 generate lists of figures and/or tables.
4609 \begin_layout Itemize
4611 Version control is supported, using RCS (
4618 \begin_layout Itemize
4620 LyX is heavily configurable.
4621 Everything from how the LyX window looks to how the output comes out can
4622 be configured in a number of ways.
4623 Much configuration is done through
4628 ools\SpecialChar \menuseparator
4636 For more information on this, check out
4641 elp\SpecialChar \menuseparator
4646 ustomization\SpecialChar \@.
4650 \begin_layout Itemize
4652 LyX is being developed by a team of programmers on five continents.
4653 Therefore, LyX has better support for non-English languages (such as Dutch,
4654 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4655 ) than many word processors.
4656 Even some right-to-left languages like Hebrew or Arabic are supported.
4657 You can write documents in other languages, but you can also configure
4658 LyX to show its menus and error messages in other languages.
4662 \begin_layout Itemize
4664 The LyX menus feature keybindings.
4665 This means that you can do
4670 ile\SpecialChar \menuseparator
4685 or by using the binding which is shown next to it in the menu (C-O by default).
4686 Keybindings are also configurable.
4687 For information on this, check out
4692 elp\SpecialChar \menuseparator
4697 ustomization\SpecialChar \@.
4701 \begin_layout Itemize
4703 LyX can read in LaTeX documents.
4704 See Section\InsetSpace ~
4706 \begin_inset LatexCommand \ref{sec:relyx}
4713 \begin_layout Itemize
4715 Spellchecking and thesaurus facilities are available.
4718 \begin_layout Itemize
4720 The text box near the bottom of the LyX window is called the minibuffer
4721 (after a similar feature in
4726 This gives you access to all sorts of interesting functionality, including
4727 functionality which could break your document.
4728 In other words, don't type in the minibuffer unless you know what you're
4732 \begin_layout Section
4737 \begin_layout Standard
4740 \begin_inset LatexCommand \label{sec:latexusers}
4744 If you don't know anything about LaTeX, you don't have to read this section.
4745 Actually, you might want to
4749 about LaTeX, and then read this chapter.
4750 However, many people who begin to use LyX will be familiar with LaTeX.
4751 If you are such a person, you may be wondering if LyX can really do everything
4753 The short answer is that LyX can do pretty much everything LaTeX can do
4754 in one form or another, and it definitely simplifies most parts of writing
4756 Currently, there may be some annoyance in converting old LaTeX documents
4757 and in a couple other areas, but later releases of LyX will get rid of
4761 \begin_layout Standard
4763 Because this is just a tutorial, we are only going to mention things that
4764 new LyX users will most likely be interested in.
4765 In the interests of keeping the
4769 short, we will give only minimal information here.
4774 manual, specifically the
4776 Secrets of the LaTeX Masters
4778 chapter, has a great deal of information on differences between LyX and
4779 LaTeX, and how to do various LaTeX tricks in LyX.
4782 \begin_layout Subsection
4787 \begin_layout Standard
4789 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4790 will be displayed in red on the screen.
4791 You can use TeX commands in LyX by choosing
4796 nsert\SpecialChar \menuseparator
4803 This creates a text box, and everything within it is passed straight to
4807 \begin_layout Standard
4809 In a math formula, TeX mode is handled a bit differently.
4810 Enter TeX mode by typing a backslash.
4811 The backslash is not written out, but anything you type afterwards will
4813 You exit TeX mode by typing
4817 or some other non-alphabetic character, like a number, underscore, caret,
4819 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4820 will convert it to WYSIWYM\SpecialChar \@.
4821 So if, in a formula, you type
4827 , then when you type
4831 , LyX will change the red
4832 \begin_inset Quotes eld
4836 \begin_inset Quotes erd
4840 \begin_inset Quotes eld
4844 \begin_inset Formula $\gamma$
4848 \begin_inset Quotes erd
4852 This will work for almost all, non-complicated math macros.
4853 This may be faster than using the
4858 , and will be especially convenient for experienced LaTeX users.
4861 \begin_layout Standard
4863 As a special case, if you type a brace in TeX mode, then the beginning
4867 ending braces will be inserted in red, then take you
4871 of TeX mode and place the cursor between the braces.
4872 This makes it more convenient to type commands that LyX doesn't know which
4876 \begin_layout Standard
4878 LyX can't do absolutely everything that LaTeX can do (yet?).
4879 Some fancy functions are not supported at all, while some work but aren't
4881 TeX mode allows users to get the full flexibility of LaTeX, while having
4882 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4883 LyX could never support every LaTeX package.
4890 in the preamble (see Section\InsetSpace ~
4892 \begin_inset LatexCommand \ref{sec:preamble}
4896 ), you can use any package you want --- although you won't have WYSIWYM
4897 support for that package's features.
4900 \begin_layout Subsection
4902 Importing LaTeX Documents---
4907 \begin_layout Standard
4910 \begin_inset LatexCommand \label{sec:relyx}
4914 You can import a LaTeX file into LyX by using the
4919 ile\SpecialChar \menuseparator
4924 mport\SpecialChar \menuseparator
4932 This will call a Perl script called
4936 ---which will create a file
4944 ---and then open that file.
4945 If the translation doesn't work, you can try calling
4949 from the command line
4953 \begin_layout Standard
4955 When LyX is installed, a separate executable called
4959 will be placed in the same folder as the
4965 /usr/local/bin/reLyX
4972 requires Perl (version 5.002 as of this writing).
4977 , possibly using fancier options.
4980 \begin_layout Standard
4986 will translate most legal LaTeX, but not everything.
4987 It will leave things it doesn't understand in TeX mode, so after translating
4992 , you can look for red text and hand-edit it to look right.
4995 \begin_layout Standard
5001 has its own manpage.
5002 Read it to find out about which LaTeX commands and environments aren't
5003 supported, bugs (and how to get around them), and how to use the various
5007 \begin_layout Subsection
5009 Converting LyX Documents to LaTeX
5012 \begin_layout Standard
5014 You might wish to convert a LyX Document to a LaTeX file.
5015 For example, a co-worker or co-author who doesn't have LyX might want to
5017 This is very easy to do with LyX.
5023 ile\SpecialChar \menuseparator
5028 xport\SpecialChar \menuseparator
5036 This will create a file
5044 file you are editing.
5045 LyX always creates temporary LaTeX files when viewing or printing files,
5046 so it is very good at generating LaTeX.
5049 \begin_layout Subsection
5054 \begin_layout Subsubsection
5059 \begin_layout Standard
5066 ocument\SpecialChar \menuseparator
5073 dialog takes care of many of the options that you would input in a
5080 Change the class, default font size and paper size here.
5081 Put any extra options to the
5099 \begin_layout Subsubsection
5101 Other Preamble Matter
5104 \begin_layout Standard
5107 \begin_inset LatexCommand \label{sec:preamble}
5111 If you have special commands to put in the preamble of a LaTeX file, you
5112 can use them in a LyX document as well.
5118 ocument\SpecialChar \menuseparator
5130 and type in the dialog window (or from the document settings dialog, depending
5132 Anything you type will (like with TeX mode) be sent directly to LaTeX.
5135 \begin_layout Subsection
5140 \begin_layout Standard
5142 LyX has support for BibTeX, which allows you to build databases of bibliographic
5143 al references to be used in multiple documents.
5149 nsert\SpecialChar \menuseparator
5156 C\SpecialChar \menuseparator
5169 Click on the resulting
5170 \begin_inset Quotes eld
5174 Generated\InsetSpace ~
5176 \begin_inset Quotes erd
5179 button, and you will get a
5188 field, type what you would type inside the braces of a
5198 \begin_layout Standard
5200 Like in regular LaTeX, multiple bibliographies should be separated by commas,
5211 field, type what you would type inside the braces of a
5220 \begin_layout Standard
5222 After you've done this, you can use citations from any bibliographies you're
5228 nsert\SpecialChar \menuseparator
5233 itation\InsetSpace ~
5236 (see Section\InsetSpace ~
5238 \begin_inset LatexCommand \ref{sec:bibliographies}
5243 LyX will take care of running BibTeX.
5248 dialog will show a list of all the references in your
5255 \begin_layout Section
5260 \begin_layout Standard
5262 Sometimes when you LaTeX a document, there will be errors, things that LyX
5263 or LaTeX can't understand.
5264 When this happens, LyX will create an error box (a box with the word
5265 \begin_inset Quotes eld
5269 \begin_inset Quotes erd
5273 Clicking on this box will pop up a window showing what the error was.
5274 LyX will just include the error message that LaTeX gave.
5275 Note that the placement of these errors in often not accurate.