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
25 \paperpagestyle headings
26 \tracking_changes false
41 \begin_layout Standard
42 Principal maintainer of this file is
47 If you have comments or error corrections, please send them to the LyX
48 Documentation mailing list, <lyx-docs@lists.lyx.org>.
56 \begin_layout Standard
57 \begin_inset LatexCommand \tableofcontents{}
72 \begin_layout Standard
73 This file is designed for all of you who have never heard of LaTeX, or don't
75 Now, don't panic - you won't need to learn LaTeX to use LyX.
76 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
78 There are some things you will need to learn, however, in order to use
82 \begin_layout Standard
83 Some of you probably found your way to this document because you tried to
84 put two spaces after a
85 \begin_inset Quotes eld
89 \begin_inset Quotes erd
92 or tried to put 3 blank lines between paragraphs.
93 After much frustration, you found you couldn't.
94 In fact, you'll find that most of the little tricks you're accustomed to
95 using in other word processors just won't work in LyX.
96 That's because most word processors you've used before allow you to manually
97 enter all spacings, font changes, and so on.
98 So you end up not only writing a document but typesetting it, too.
99 LyX does the typesetting for you, in a consistent fashion, letting you
100 focus on the important things, like the content of your writing.
103 \begin_layout Standard
104 So, bear with us and read on.
105 Reading this tutorial is definitely worth the time.
108 \begin_layout Section
118 \begin_layout Standard
119 Before we get started with this section, we want to make a quick note of
125 uses the notation outlined in the
130 If you came to this manual first, go read the
138 \begin_layout Standard
139 Now that you know which fonts mean what, we want to talk a bit about what
147 \begin_layout Subsection
148 Getting the Most out of the Tutorial
151 \begin_layout Standard
152 This tutorial consists of examples and exercises.
153 To get the most out of this document, you should read through the document,
154 typing all the silly little things we're telling you to type and trying
155 out all of the exercises to see if you get them right.
156 For convenience, you might want to print out the PostScript® version of
160 \begin_layout Standard
161 If you are familiar with LaTeX, you'll probably be able to read the
165 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
166 However, LyX does have idiosyncrasies
170 \begin_layout Standard
171 or, more optimistically,
172 \begin_inset Quotes eld
176 \begin_inset Quotes erd
184 you'll want to learn about.
185 Even if you don't feel like reading the rest of the
189 , you should definitely check out Section\InsetSpace ~
191 \begin_inset LatexCommand \ref{sec:latexusers}
195 , which is specifically written for experienced LaTeX users.
198 \begin_layout Subsection
206 \begin_layout Itemize
207 Detailed explanations of all of LyX's features.
211 \begin_layout Standard
219 \begin_layout Standard
220 Seriously, though, we're here to get you up and running so that all you
226 If we tried to duplicate all of the information about all of LyX's features
231 would be redundant, too long, and forever out of date.
232 All we do here is introduce things; imagine there is a
233 \begin_inset Quotes eld
241 \begin_inset Quotes erd
244 at the end of every section.
248 \begin_layout Itemize
249 Detailed explanations of LaTeX.
253 \begin_layout Standard
255 If you're really curious about learning some of the neat tricks you can
256 do with LaTeX, you can always go get a LaTeX book.
257 There are several good ones on the market.
258 No need to reinvent the wheel, after all\SpecialChar \ldots{}
263 \begin_layout Standard
264 So, brave soul, it's time to move onwards.
265 Time for your first document \SpecialChar \ldots{}
269 \begin_layout Chapter
270 Getting Started with LyX
273 \begin_layout Section
274 Your First LyX Document
277 \begin_layout Standard
278 \begin_inset LatexCommand \label{sec:first-doc-ex}
283 You're ready to start writing.
284 Before you do, though, there are a few things we need to mention, which
285 will hopefully make the
289 more instructive, useful, and fun.
293 \begin_layout Standard
294 Because there's lots of information that we won't be giving you, the
299 thing that you need to do is find the
304 Luckily, this is very simple.
320 You may want to load the
324 as well (if you're not reading it on screen already).
325 This way, you can read them while you're writing your own file
329 \begin_layout Standard
330 They can also serve as good examples of how to use the many features of
337 Note that once you've got more than one document open, you can use the
345 menu to switch between them.
350 will not cover in detail subjects which are described in the other LyX
352 This may make life a bit harder for you at the beginning, but it will keep
358 It will also get you in the habit of using the other manuals, which ---
359 in the long run --- will save you a lot of time.
362 \begin_layout Standard
367 , we're going to assume that you have a fully working version of LyX, as
372 or some other dvi viewer,
376 or some other way of converting
380 documents to PostScript® documents, and a working printer.
381 This is a lot to assume.
382 If any of this is not true, you (or a friendly system administrator) will
383 need to set up your system.
384 You can find information on setup in other manuals.
387 \begin_layout Standard
388 Finally, we've written a file to let you practice your LyX skills on.
394 Imagine that it was typed by someone who didn't know about any of LyX's
396 As you learn new LyX functions, we'll suggest that you fix those parts
403 \begin_inset Quotes eld
407 \begin_inset Quotes erd
410 hints about how to fix things
414 \begin_layout Standard
415 The hints are located in yellow
416 \begin_inset Quotes eld
420 \begin_inset Quotes erd
424 Access the text in a note by clicking on it.
430 If you want to cheat (or check what you've done), there's also a file called
435 which contains the same text as written and typeset by a LyX master.
438 \begin_layout Standard
439 The example files can be found in the
443 directory, which you can get to by selecting
448 ile\SpecialChar \menuseparator
455 and then clicking on the
463 Open the raw document, and use
468 ile\SpecialChar \menuseparator
476 to save a copy in your own directory for you to work on.
477 As you fix parts of the raw document, check to see how those changes affect
481 \begin_layout Standard
486 directory contains lots of other examples files.
487 They will show you how to do various fancy things with LyX.
488 They are especially useful to display things that (due to length or other
489 reasons) won't fit in the documentation.
494 , or when you're confused about how to do something fancy in LyX, take a
498 \begin_layout Subsection
499 Typing, Viewing, and Printing
502 \begin_layout Itemize
508 ile\SpecialChar \menuseparator
516 \begin_layout Itemize
517 Type a sentence like:
519 This is my first LyX document!
522 \begin_layout Itemize
523 Save your document with
528 ile\SpecialChar \menuseparator
538 \begin_layout Itemize
539 Run LaTeX to create a
548 iew\SpecialChar \menuseparator
556 You may see things being printed in the window you ran the
561 These are messages from LaTeX, which you can ignore for now.
570 viewer), which will pop up a new window displaying what your document will
571 look like when printed.
575 \begin_layout Standard
576 You can save time by leaving
580 running in the background.
586 iew\SpecialChar \menuseparator
591 pdate\SpecialChar \menuseparator
598 and just click on the
602 window (or unminimize it) after LaTeX finishes running.
610 \begin_layout Itemize
616 ile\SpecialChar \menuseparator
629 \begin_layout Standard
630 Congratulations! You've written and printed your first LyX document.
631 All of the rest is just details, which is covered in the rest of the
650 \begin_layout Subsection
654 \begin_layout Standard
655 LyX can of course do most of the things you're used to doing with a word
657 It will word-wrap and indent paragraphs automatically.
658 Here's a quick description of how to do some simple actions.
661 \begin_layout Description
662 Undo LyX has multiple levels of undo, which means you can undo everything
663 you've done since your current editing session started, by selecting
668 dit\SpecialChar \menuseparator
676 If you undo too much, just select
681 dit\SpecialChar \menuseparator
693 \begin_layout Standard
694 Currently, undo is limited to 100 steps.
695 Undo also doesn't work for
699 ; for instance, changes to the document layout.
700 Each of these is really a LyX bug.
704 \begin_layout Description
710 dit\SpecialChar \menuseparator
718 dit\SpecialChar \menuseparator
726 dit\SpecialChar \menuseparator
729 to cut, copy, and paste.
730 Or automatically paste selected text (including selections from other programs)
738 \begin_layout Description
744 dit\SpecialChar \menuseparator
754 In the dialog, search with the
768 button to replace a word you've found
772 \begin_layout Standard
773 Close the window when you're done.
774 Or leave it open if you find it more convenient.
775 Most dialog boxes in LyX --- including the
791 dialogs, as well as the various math dialogs can operate like this.
797 ile\SpecialChar \menuseparator
804 , won't let you type anything in the main LyX window until you actually
806 Just be sure you have the right window focus when you're trying to type
807 in the main LyX window or give a command in some other LyX dialog.
813 If you like, you can specify whether to make the search case-sensitive,
814 or to search for only complete words; you can also search backwards through
818 \begin_layout Description
819 Character\InsetSpace ~
824 text (which will generally put characters in italics), put it in
832 (usually small caps, used for people's names) from the toggle buttons in
838 dit\SpecialChar \menuseparator
849 \begin_layout Description
850 Toolbar There are buttons on the toolbar (just below the menus) which allow
851 you to do some of the more popular functions, such as
862 \begin_layout Standard
863 Of course, you haven't yet written enough to make most of these functions
865 As you write more, though, try undoing, pasting, etc.
868 \begin_layout Subsection
869 WYSIWYM: Whitespace in LyX
872 \begin_layout Standard
873 \begin_inset LatexCommand \label{sec:whitespace}
877 One of the hardest things for new users to get used to is the way that LyX
879 As many times as you hit
883 , you'll only get one blank line.
884 As many times as you hit
888 , you'll only get one space.
889 On a blank line, LyX won't let you type even one space.
894 key won't move you forward one tab stop; in fact there
898 no tab stops! There's no ruler at the top of the page to let you set tabs
902 \begin_layout Standard
903 Many commercial word processors are based on the WYSIWYG principle:
904 \begin_inset Quotes eld
907 What You See Is What You Get.
908 \begin_inset Quotes erd
911 LyX, on the other hand, is based on the principle that
912 \begin_inset Quotes eld
915 What You See Is What You
920 \begin_inset Quotes erd
923 You type what you mean, and LyX will take care of typesetting it for you,
924 so that the output looks nice.
929 grammatically separates paragraphs, and a
933 grammatically separates words, so there is no reason to have several of
938 has no grammatical function at all, so LyX does not support it.
939 Using LyX, you'll spend more of your time worrying about the
943 of your document, and less time worrying about the
952 for more information on the WYSIWYM concept.
955 \begin_layout Standard
956 LyX does have (many) ways to fine-tune the formatting of your document.
957 After all, LyX might not typeset
966 has information about all that.
971 s and vertical space --- which are more powerful and versatile than multiple
972 spaces or blank lines --- and ways to change font sizes, character styles,
973 and paragraph alignments by hand.
974 The idea, though, is that you can write your whole document, focusing on
975 content, and just worry about that fine-tuning at the end.
976 With standard word processors, you'll be distracted by document formatting
977 throughout the writing process.
980 \begin_layout Section
984 \begin_layout Standard
985 Different parts of a document have different purposes; we call these parts
991 Most of a document is made up of regular text.
992 Section (chapter, subsection, etc.) titles let the reader know that a new
993 topic or subtopic will be discussed.
994 Certain types of documents have special environments.
995 A journal article will have an abstract, and a title.
996 A letter will have neither of these, but will probably have an environment
997 that gives the writer's address.
1000 \begin_layout Standard
1001 Environments are a major part of the
1002 \begin_inset Quotes eld
1005 What You See Is What You Mean
1006 \begin_inset Quotes erd
1010 A given environment may require a certain font style, font size, indenting,
1011 line spacing, and more.
1012 This problem is aggravated, because the exact formatting for a given environmen
1013 t may change: one journal may use boldface, 18 point, centered type for
1014 section titles while another uses italicized, 15 point, left justified
1015 type; different languages may have different standards for indenting; and
1016 bibliography formats can vary widely.
1017 LyX lets you avoid learning all the different formatting styles.
1020 \begin_layout Standard
1025 box is located on the left end of the toolbar (just under the
1033 It indicates which environment you're currently writing in.
1034 While you were writing your first document, it said
1035 \begin_inset Quotes eld
1039 \begin_inset Quotes erd
1042 which is the default environment for text.
1043 Now you will put a number of environments in your new document so that
1044 you can see how they work.
1045 You'll do so with the
1049 menu, which you open by clicking on the
1050 \begin_inset Quotes eld
1054 \begin_inset Quotes erd
1057 icon just to the right of the
1064 \begin_layout Subsection
1065 Sections and Subsections
1068 \begin_layout Standard
1073 on the first line of your LyX file, and select
1085 \begin_layout Standard
1091 If nothing is selected, LyX changes the paragraph you are currently in
1092 to the selected environment.
1093 Alternatively, you can change several paragraphs to a different environment
1094 by selecting them before picking an environment.
1112 , which will be covered below.
1113 LyX numbers the section
1114 \begin_inset Quotes eld
1118 \begin_inset Quotes erd
1121 and typesets the section heading (title) in a larger font.
1132 \begin_inset Quotes eld
1136 \begin_inset Quotes erd
1140 \begin_inset Quotes eld
1144 \begin_inset Quotes erd
1148 Section headings, like most environments, are assumed to end when you type
1154 Type the document introduction:
1157 \begin_layout LyX-Code
1158 This is an introduction to my first LyX document.
1161 \begin_layout Standard
1176 \begin_inset Quotes eld
1180 \begin_inset Quotes erd
1183 and waits for you to type a title.
1188 , and you'll see that LyX again sets it as a section title.
1191 \begin_layout Standard
1193 Go to the end of Section\InsetSpace ~
1195 \begin_inset Quotes eld
1198 my first LyX document
1199 \begin_inset Quotes erd
1216 \begin_inset Quotes eld
1220 \begin_inset Quotes erd
1223 and waits for you to type a title.
1229 Section\InsetSpace ~
1231 \begin_inset Quotes eld
1235 \begin_inset Quotes erd
1238 , which used to be Section\InsetSpace ~
1239 2, has been automatically renumbered to Section\InsetSpace ~
1241 In true WYSIWYM fashion, you just need to identify the text that makes
1242 up the section titles, and LyX takes care of numbering the sections and
1246 \begin_layout Standard
1255 environment, and type the following five lines:
1258 \begin_layout LyX-Code
1259 Sections and subsections are described below.
1262 \begin_layout LyX-Code
1266 \begin_layout LyX-Code
1267 Sections are bigger than subsections.
1270 \begin_layout LyX-Code
1271 Subsection description
1274 \begin_layout LyX-Code
1275 Subsections are smaller than sections.
1278 \begin_layout Standard
1279 Click on the second line and select
1288 LyX numbers the subsection
1289 \begin_inset Quotes eld
1293 \begin_inset Quotes erd
1296 , and typesets it in a font which is bigger than regular text but smaller
1297 than the section title.
1298 Change the fourth line
1302 environment as well.
1303 As you probably expected, LyX automatically numbered the section
1304 \begin_inset Quotes eld
1308 \begin_inset Quotes erd
1312 If you put yet another section before Section\InsetSpace ~
1313 2, Section\InsetSpace ~
1314 2 will be renumbered
1315 as Section 3, and the subsections will be renumbered to
1316 \begin_inset Quotes eld
1320 \begin_inset Quotes erd
1324 \begin_inset Quotes eld
1328 \begin_inset Quotes erd
1335 \begin_layout Standard
1336 Further levels of sectioning include
1349 We'll let you play with these on your own.
1350 You may notice that paragraph and subparagraph headings are not numbered
1351 by default, and that subparagraphs are indented; see the
1360 headings are actually the highest level of sectioning, above
1364 s, but you're only allowed to use them in certain types (text classes) of
1365 LyX documents (see Section\InsetSpace ~
1367 \begin_inset LatexCommand \ref{sec:textclasses}
1375 \begin_layout Standard
1376 Finally, you may want to have sections or subsections that are not numbered.
1377 There are environments for this as well.
1378 If you change one of your section headings to the
1382 environment (you may have to scroll down in the
1386 menu to find it), LyX will use the same font size for the heading as it
1387 uses for a regular section, but it won't number that section.
1388 There are corresponding
1389 \begin_inset Quotes eld
1393 \begin_inset Quotes erd
1396 heading environments for
1405 Try changing some of your sections or subsections to the starred environments,
1406 and note how the other sections' numbers are updated.
1409 \begin_layout Standard
1414 : Fix the section and subsection headings in
1422 \begin_layout Subsection
1426 \begin_layout Standard
1427 LyX has several different environments for typesetting lists.
1428 The various list environments free you from hitting
1432 a million times when writing an outline, or from renumbering a whole list
1433 when you want to add a point in the middle of the list, and lets you concentrat
1434 e on the list content.
1438 \begin_layout Standard
1439 Yes, we're overemphasizing this point throughout the
1448 the main philosophy of LyX, so please forgive us.
1453 Different types of documents logically require different list environments:
1456 \begin_layout Itemize
1457 A slide presentation might use the
1461 environment's bulleted lists to describe different points.
1465 \begin_layout Itemize
1466 An outline would use the
1470 environment's numbered lists (and lettered sublists).
1474 \begin_layout Itemize
1475 A document describing several software packages could use the
1479 environment, where each item in the list begins with a bold-faced word.
1483 \begin_layout Itemize
1488 environment --- not found in LaTeX --- is a slightly different form of
1496 \begin_layout Standard
1497 Let's write a list of reasons why LyX is better than other word processors.
1498 Somewhere in your document, type:
1501 \begin_layout Standard
1504 Lyx is better than other word processors because:
1507 \begin_layout Standard
1523 \begin_inset Quotes eld
1527 \begin_inset Quotes erd
1530 (actually, an asterisk, which will be converted to a round circle on output)
1532 Type in your reasons:
1535 \begin_layout LyX-Code
1536 Typesetting is done for you.
1539 \begin_layout LyX-Code
1543 \begin_layout LyX-Code
1544 Lists are very easy to create!
1547 \begin_layout Standard
1548 List environments, unlike headings, do not end when you type
1553 Instead, LyX assumes you're going on to the next item in the list.
1554 The above will therefore result in a three-item list.
1555 If you want more than one paragraph within one list
1559 , one way is to use the
1561 Protected\InsetSpace ~
1564 , which you get by typing
1569 In order to get out of the list, you need to reselect the
1573 environment (or just use the keybinding,
1581 \begin_layout Standard
1582 You've got a beautiful itemized list.
1583 You might want to run LaTeX to see how the list looks when printed out.
1584 But what if you wanted to number the reasons? Well, just select the whole
1589 \begin_layout Standard
1590 LyX won't let you select the first bullet unless you also select the paragraph
1595 the list, which you probably don't want to do.
1596 Similarly, you can't select the actual number in a numbered section title.
1597 Don't worry about it.
1611 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1615 \begin_layout Standard
1616 While the list is still selected, you can change to the other two list environme
1625 , in order to see what they look like.
1626 For those two environments, each list item is made up of a term, which
1627 is the item's first word, followed by a definition, which is the rest of
1628 the paragraph (until you hit
1632 .) The term is either typeset in boldface (
1637 \begin_inset Quotes eld
1641 \begin_inset Quotes erd
1648 \begin_layout Standard
1649 But a typesetter's tab, which will change to fit the size of the largest
1650 term, not a pathetic, rigid, unchangeable typewriter
1663 ) from the rest of the paragraph.
1664 If you want to have more than one word in the definition, then separate
1667 Protected\InsetSpace ~
1673 \begin_layout Standard
1678 : Typeset the list in
1683 \begin_layout Standard
1684 You can nest lists within each other in all sorts of interesting ways.
1685 An obvious example would be writing outlines.
1686 Numbered and bulleted lists will have different numbering and bulleting
1687 schemes for sublists.
1692 for details on the different sorts of lists, as well as examples which
1700 \begin_layout Subsection
1701 Other Environments: Verses, Quotations, and More
1704 \begin_layout Standard
1705 There are two environments for setting quotations apart from surrounding
1710 for short quotes and
1719 environment, also used in the
1723 for the long typing examples) is written in a
1727 font; this environment is the only place in LyX where you're allowed to
1728 use multiple spaces to allow code indenting.
1729 You can even write poetry using the
1737 to separate stanzas, and
1741 to separate lines within a stanza.
1746 for more complete descriptions of all of the available LyX environments.
1749 \begin_layout Standard
1754 : Correctly typeset the
1766 \begin_layout Standard
1779 \begin_layout Chapter
1783 \begin_layout Standard
1784 The previous chapter hopefully allowed you to get used to writing in LyX.
1785 It introduced you to the basic editing operations in LyX, as well as the
1786 powerful method of writing with environments.
1787 Most people who use LyX, though, will want to write documents: papers,
1788 articles, books, manuals, or letters.
1789 This chapter is meant to take you from simply writing text with LyX to
1790 writing a complete document.
1791 It will introduce you to text classes, which allow you to write different
1793 It will then describe many of the additions that turn text into a document,
1794 such as titles, footnotes, cross references, bibliographies, and tables
1798 \begin_layout Section
1802 \begin_layout Standard
1803 \begin_inset LatexCommand \label{sec:textclasses}
1807 Different sorts of documents should be typeset differently.
1808 For example, books are generally printed double-sided, while articles are
1810 In addition, many documents contain special environments: letters contain
1811 some environments --- such as the sender's address and the signature ---
1812 which do not make sense in a book or article.
1819 \begin_layout Standard
1820 LaTeX users: this is equivalent to the LaTeX document class
1827 takes care of these large scale differences between different sorts of documents.
1832 , for example, was written in the
1837 Text classes are another major part of the WYSIWYM philosophy; they tell
1838 LyX how to typeset the document, so you don't need to know how.
1841 \begin_layout Standard
1842 Your document is probably being written in the
1850 \begin_layout Standard
1851 That's usually the default text class
1857 Try changing to other text classes (using the
1862 ocument\SpecialChar \menuseparator
1869 dialog) to see how they are typeset differently.
1870 If you change your document to the
1874 text class and look at the
1878 menu, you'll see that most of the allowed environments are the same.
1879 However, you can now use the
1884 If you're ever unsure about which environments you can use in a given text
1885 class, just consult the
1892 \begin_layout Standard
1893 Font sizes, one- or two-column printing, and page headings are just some
1894 of the ways journals' typesettings differ from one another.
1895 As the Computer Age continues to mature, journals have begun accepting
1896 electronic submissions, creating LaTeX
1897 \begin_inset Quotes eld
1901 \begin_inset Quotes erd
1904 so that authors can submit correctly typeset articles.
1905 LyX is set up to support this as well.
1906 For example, LyX supports typesetting (and extra environments) for the
1907 American Mathematics Society journals using the
1909 Article\InsetSpace ~
1915 \begin_layout Standard
1916 Here's a very quick reference to some of the text classes.
1919 Special Document Classes
1925 manual for many more details.
1928 \begin_layout Standard
1930 \begin_inset Tabular
1931 <lyxtabular version="3" rows="7" columns="2">
1933 <column alignment="center" valignment="top" leftline="true" width="0pt">
1934 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
1935 <row topline="true" bottomline="true">
1936 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1939 \begin_layout Standard
1945 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1948 \begin_layout Standard
1955 <row topline="true">
1956 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1959 \begin_layout Standard
1965 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1968 \begin_layout Standard
1969 one-sided, no chapters
1975 <row topline="true">
1976 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1979 \begin_layout Standard
1985 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1988 \begin_layout Standard
1989 layout & environments for American Math Society
1995 <row topline="true">
1996 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1999 \begin_layout Standard
2005 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2008 \begin_layout Standard
2009 longer than article, two-sided
2015 <row topline="true" bottomline="true">
2016 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2019 \begin_layout Standard
2025 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2028 \begin_layout Standard
2029 report + front and back matter
2035 <row bottomline="true">
2036 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2039 \begin_layout Standard
2045 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2048 \begin_layout Standard
2049 transparencies (also including FoilTeX)
2055 <row bottomline="true">
2056 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2059 \begin_layout Standard
2065 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2068 \begin_layout Standard
2069 lots of extra environments for address, signature\SpecialChar \ldots{}
2083 \begin_layout Section
2084 Templates: Writing a Letter
2087 \begin_layout Standard
2088 One of the most popular text classes is
2093 One way to write a letter would be to open a new
2106 ocument\SpecialChar \menuseparator
2114 While this is the most obvious way to write a letter, it seems like extra
2116 Every time you write a business letter, you want to have your address,
2117 the address you're sending to, a body, a signature, etc.
2122 for letters, which contains a sample letter; once you have a template,
2123 you can just replace a couple parts of the letter with your text each time
2127 \begin_layout Standard
2128 Open a new file with
2133 ile\SpecialChar \menuseparator
2148 Save and print the file to see how the various environments are typeset.
2151 \begin_layout Standard
2152 When you look at the
2156 menu, you'll see several environments, like the
2161 environment, which don't even exist in most other text classes.
2171 You can play around for a while to figure out how the various environments
2173 You'll notice for example that the
2177 environment has the word
2178 \begin_inset Quotes eld
2182 \begin_inset Quotes eld
2185 in red before the actual text of the signature.
2186 This word doesn't show up in the actual letter, as you'll see if you try
2188 It's just there to let you know where the signature goes.
2189 Also, note that it doesn't matter where in the file the
2194 Remember, LyX is WYSIWYM; you can put the
2198 environment anywhere you want, but LyX knows that in the printout, the
2199 signature should be at the end.
2202 \begin_layout Standard
2203 A template is just a regular LyX file.
2204 This means you can fill in your address and signature and save the file
2206 From now on, any time you want to write a letter, you can use the new template
2208 We probably don't have to suggest an actual
2209 \begin_inset Quotes eld
2213 \begin_inset Quotes erd
2216 here; just write a letter to someone
2220 \begin_layout Standard
2221 One warning, if you're writing from a template.
2222 If you erase all of the text in an environment --- for example, if you
2228 field so that you can replace it with your own --- and then you move the
2229 cursor without writing any text, the environment may disappear.
2230 This is because most environments cannot exist without any text in them.
2231 Just reselect the environment from the
2235 menu to get it back.
2243 \begin_layout Standard
2244 Templates can be a huge time-saver, and we urge you to use them whenever
2246 In addition, they can help a person learn how to use some of the fancier
2248 Finally, they may be useful for a person who is configuring LyX for a bunch
2249 of less computer-aware users.
2250 When they're first learning LyX, it will be much less intimidating if they
2251 have a letter template customized for their company, for example.
2254 \begin_layout Section
2258 \begin_layout Standard
2259 LyX (like LaTeX) considers the title --- which may contain the actual title,
2260 the author, the date, and even an abstract of a paper --- to be a separate
2261 part of the document.
2264 \begin_layout Standard
2269 document and make sure it's using the
2277 \begin_layout Standard
2278 You should not be using the letter any more, since the
2282 textclass doesn't allow titles.
2287 Type a title on the first line, and change the line to the
2292 On the next line, type your name and change it to the
2297 On the next line, write the date in the
2302 Type a paragraph or two summarizing your document using the
2307 Now see how it looks when printed.
2310 \begin_layout Standard
2315 : Fix the title, date, and author in
2320 \begin_layout Section
2321 Labels and Cross-References
2324 \begin_layout Standard
2325 \begin_inset LatexCommand \label{sec:labels}
2329 You can label a section (or subsubsection, or, more rarely, just a random
2330 piece of text) in your document.
2331 Once you do so, you can refer to this section in other parts of the document,
2332 using cross-references.
2333 You can refer either to the section's number, or to the page that the section
2335 As with sections and footnotes, LyX worries about the cross-references
2337 Automatic labels and cross-references are one of the best advantages of
2338 LyX (and LaTeX) over conventional word processors.
2341 \begin_layout Subsection*
2345 \begin_layout Standard
2346 Let's mark our second section, whose title is
2347 \begin_inset Quotes eld
2351 \begin_inset Quotes erd
2355 Click at the end of the section title line, and select
2360 nsert\SpecialChar \menuseparator
2368 A dialog asks you for a label name, and gives you a suggestion.
2373 , the label name will be placed in a box next to the section title.
2376 \begin_layout Standard
2377 By the way, you could have put the label right anywhere within the section
2378 as well; section references will refer to the last section or subsection
2379 whose heading comes before the label.
2380 However, putting it on the same line as the section title (or, perhaps,
2381 on the first line of the section's text) ensures that page references will
2382 reference the beginning of the section.
2385 \begin_layout Standard
2386 So far you haven't done anything --- the
2390 file will look exactly the same, since labels don't show up in the printed
2392 However, now that you've added a label, you can refer to that label with
2397 \begin_layout Subsection*
2398 Your first cross-references
2401 \begin_layout Standard
2402 Place the cursor somewhere in Section\InsetSpace ~
2407 \begin_layout LyX-Code
2408 If you want to know more about this document, then see
2414 \begin_layout Standard
2415 Now --- with the cursor after the word
2416 \begin_inset Quotes eld
2420 \begin_inset Quotes erd
2432 nsert\SpecialChar \menuseparator
2446 It shows a list of the possible labels you can reference.
2447 At the moment, there should be only one,
2448 \begin_inset Quotes eld
2452 \begin_inset Quotes erd
2456 Select it (it may be selected by default), and click
2461 Now put the cursor after the word
2462 \begin_inset Quotes eld
2466 \begin_inset Quotes erd
2469 , and change the reference type to use the page number then click
2474 (To be really correct, you should put a
2476 Protected\InsetSpace ~
2480 \begin_inset Quotes eld
2484 \begin_inset Quotes erd
2488 Same for the page reference.)
2491 \begin_layout Standard
2492 LyX puts the references in a box right where the cursor was.
2493 In the printed document, this reference marker will be replaced with either
2494 the page or section number (depending on what you selected in the
2505 iew\SpecialChar \menuseparator
2510 pdate\SpecialChar \menuseparator
2517 , and you'll see that on the last page we refer to
2518 \begin_inset Quotes eld
2521 Section\InsetSpace ~
2523 \begin_inset Quotes erd
2527 \begin_inset Quotes eld
2532 \begin_inset Quotes erd
2535 (or whatever page Section\InsetSpace ~
2539 \begin_layout Standard
2540 Conveniently, a cross-reference acts a hyperlink when you're editing a document
2541 in LyX; clicking on it will pop up the
2551 will move the cursor to the referenced label.
2554 \begin_layout Subsection*
2555 More fun with labels
2558 \begin_layout Standard
2559 We told you that LyX worries about numbering cross-references; now you can
2561 Add a new section before Section\InsetSpace ~
2563 Now rerun LaTeX, and --- voilà ! --- the section cross reference changed
2565 \begin_inset Quotes eld
2569 \begin_inset Quotes erd
2573 \begin_inset Quotes eld
2577 \begin_inset Quotes erd
2580 to a subsection, and the cross-reference will reference Subsection\InsetSpace ~
2582 of Section\InsetSpace ~
2584 The page reference won't change unless you add a whole page of text before
2585 the label, of course.
2589 \begin_layout Standard
2590 If you want some more practice with labels, then try putting a new label
2591 where your first cross-reference was, and refer to that label from elsewhere
2593 If you'll be inserting cross-references often (if, for example, you're
2594 writing a journal article), it may be convenient to leave the
2602 \begin_layout Standard
2603 If you want to make sure that the cross-referencing gets the pages right
2604 even for larger documents,
2608 a couple pages of text from the
2612 to the clipboard, and
2616 the stolen text into your document
2620 \begin_layout Standard
2621 By the way, copying a chapter title may cause an error, because chapters
2622 aren't allowed in the article class.
2623 If this happens, just delete the chapter title.
2624 If you want to know why this happens, see Section\InsetSpace ~
2626 \begin_inset LatexCommand \ref{sec:textclasses}
2639 \begin_layout Standard
2644 : Fix the references in
2649 \begin_layout Section
2650 Footnotes and Margin Notes
2653 \begin_layout Standard
2654 Footnotes can be added using the
2659 button in the toolbar
2663 \begin_layout Standard
2664 The button shows an arrow pointing to red text, which is just below some
2675 nsert\SpecialChar \menuseparator
2683 Click at the end of the word
2684 \begin_inset Quotes eld
2688 \begin_inset Quotes erd
2691 somewhere in your document and hit the
2697 A footnote box appears where you can enter the text of the footnote.
2698 LyX should place the cursor at the beginning of the footnote box.
2702 \begin_layout LyX-Code
2703 LyX is a typesetting word processor.
2706 \begin_layout Standard
2707 Now click on the button labelled
2708 \begin_inset Quotes eld
2712 \begin_inset Quotes erd
2715 The footnote box disappears, leaving the button showing where the footnote
2716 marker will be in the printed text; this is called
2717 \begin_inset Quotes eld
2721 \begin_inset Quotes erd
2725 You can unfold the footnote at any time --- and re-edit its text, if you
2726 want --- by clicking again on the
2727 \begin_inset Quotes eld
2731 \begin_inset Quotes erd
2737 \begin_layout Standard
2738 You may wonder why the footnote button is a word instead of a number.
2739 The answer is that LyX worries about the footnote numbering for you in
2741 You can see this yourself by looking at the
2746 If you add other footnotes, LyX will renumber the footnotes.
2747 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2748 there's really no need to put the numbers in the LyX file.
2751 \begin_layout Standard
2752 A footnote can be cut and pasted like normal text.
2753 Go ahead; try it! All you need to do is select the footnote button
2757 \begin_layout Standard
2758 It may be easier to select it using the keyboard.
2759 You might accidentally open the footnote if you're trying to select the
2760 marker itself with the mouse.
2774 In addition, you can change regular text to a footnote, by selecting it
2780 button; change a footnote to regular text by clicking the
2785 button when the cursor is in a footnote.
2788 \begin_layout Standard
2789 Margin notes can be added using the toolbar button (the button shows an
2790 arrow pointing to red text next to (i.e., in the margin of) black text, and
2791 should be next to the
2796 button in the toolbar.) or
2801 nsert\SpecialChar \menuseparator
2806 arginal\InsetSpace ~
2810 Margin notes are like footnotes, except that:
2813 \begin_layout Itemize
2814 the on-screen boxes say
2815 \begin_inset Quotes eld
2819 \begin_inset Quotes erd
2823 \begin_inset Quotes eld
2827 \begin_inset Quotes erd
2833 \begin_layout Itemize
2834 the notes will be placed in the margin, instead of below the text
2837 \begin_layout Itemize
2838 margin notes are not numbered
2841 \begin_layout Standard
2842 Change your LyX footnote back to text, then select and change it to a margin
2844 Run LaTeX again to see what the margin note looks like.
2847 \begin_layout Standard
2852 : Fix the footnote in
2857 \begin_layout Section
2861 \begin_layout Standard
2862 \begin_inset LatexCommand \label{sec:bibliographies}
2866 Bibliographies (at least in the exact sciences) are similar to cross references.
2867 The bibliography contains a list of references at the end of the document,
2868 and they can be referenced from within the document.
2869 Like section titles, LyX and LaTeX make your job easier by automatically
2870 numbering the bibliography items and changing citations when the items'
2874 \begin_layout Standard
2875 Go to the end of the document and switch to the
2880 Now, each paragraph you type will be a reference.
2883 The Lyx Tutorial, by the LyX Documentation Team
2885 as your first reference.
2886 Note that LyX automatically puts a number in a box before each reference.
2887 Click on the boxed reference number, and a
2889 Bibliography\InsetSpace ~
2893 You use the first field, the
2897 , to refer to this reference within the LyX document.
2898 By default, it is a number.
2904 \begin_inset Quotes eld
2908 \begin_inset Quotes erd
2911 to make it easy to remember.
2914 \begin_layout Standard
2915 Now pick somewhere in your document that you would like to insert a reference.
2921 nsert\SpecialChar \menuseparator
2926 itation\InsetSpace ~
2927 Reference\SpecialChar \@.
2935 The right panel in this dialog lists all the bibliography entries, and
2936 this field allows you to choose which bibliography item you want to cite.
2938 \begin_inset Quotes eld
2942 \begin_inset Quotes erd
2945 (right now, that's the only item in the bibliography), then use the left
2946 arrow in the center to insert it.
2947 (You can have multiple citations in the same place by transferring a number
2948 of keys this way.) Now run LaTeX, and you'll see that the citation appears
2949 in brackets in the text, referring to the bibliography at the end of the
2953 \begin_layout Standard
2954 How are the other fields used? The
2967 dialog will put a remark (such as a reference to a page or chapter within
2968 the referenced book or article) in the brackets after the reference.
2969 If you want the references to have labels instead of numbers in the printed
2970 output (for example, some journals would use
2971 \begin_inset Quotes eld
2975 \begin_inset Quotes erd
2978 to refer to a paper written by Smith in 1995), use the
2987 Bibliography\InsetSpace ~
2991 As usual, you can see the
2998 \begin_layout Standard
3003 Fix the bibliography and citation in
3008 \begin_layout Section
3012 \begin_layout Standard
3013 You may want to put a table of contents at the beginning of your document.
3014 LyX makes this very easy to do.
3019 after your document title and before your first section title and choose
3025 nsert\SpecialChar \menuseparator
3032 C\SpecialChar \menuseparator
3043 \begin_inset Quotes eld
3047 \begin_inset Quotes erd
3050 will appear in a button on the first line of the document.
3054 \begin_layout Standard
3055 This may not appear to be very useful.
3056 However, if you look at your
3060 file, you will see that a table of contents has been generated, listing
3061 the various sections and subsections in your document.
3062 As usual, if you reorder sections or create new ones, you will see those
3067 file when you update it.
3071 \begin_layout Standard
3072 The table of contents is not printed in the on-screen version of the document,
3073 because you can't edit it anyway.
3074 However, you can display the table of contents in a separate window by
3075 clicking on the table of contents button, or by using
3080 ocument\SpecialChar \menuseparator
3090 The menu command will work even if you don't have a table of contents inset
3092 This is a very useful tool.
3099 window to move around your document.
3100 Clicking on a (sub)section title in the
3106 window will highlight that line and move the cursor (in the LyX editing
3107 window) to that place in the document.
3108 You can also use the arrow keys to move up and down in the table of contents.
3109 You may therefore find it convenient to leave this window open throughout
3111 You can get similar functionality from the
3118 menu, though, where the table of contents appears automatically.
3121 \begin_layout Standard
3122 To get rid of the Table of Contents, you can delete the table of contents
3123 button just like any other text.
3126 \begin_layout Standard
3131 : Fix the table of contents in
3136 \begin_layout Chapter
3140 \begin_layout Standard
3141 LaTeX is used by many scientists because it outputs great looking equations,
3142 avoiding the control characters used by word processors and their equation
3144 Many of these scientists are frustrated, however, because writing equations
3145 in LaTeX is more like programming than writing.
3146 Happily, LyX has WYSIWYM support for equations.
3147 If you are used to LaTeX, you'll find that all of the usual LaTeX math
3148 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3149 If, on the other hand, you've never written in LaTeX, then the
3154 will allow you to write professional-looking math quickly and easily
3158 \begin_layout Standard
3159 LyX can't check if the math you're writing is actually
3172 \begin_layout Section
3176 \begin_layout Standard
3177 Somewhere in your LyX document, type:
3180 \begin_layout LyX-Code
3181 I like what Einstein said, E=mc^2, because it's so simple.
3185 \begin_layout Standard
3186 Now, that equation doesn't look very good, even in the
3190 file; there's no space between the letters and the equals sign, and you'd
3191 like to write an actual superscript for the
3192 \begin_inset Quotes eld
3196 \begin_inset Quotes erd
3200 That bad typesetting happened because we didn't tell LyX that we were writing
3201 a mathematical expression, so it typeset the equation like regular old
3205 \begin_layout Standard
3206 Instead, we create a formula that will get typeset properly.
3207 In order to create a formula, just click the toolbar button with
3208 \begin_inset Formula $\frac{a+b}{c}$
3211 written on it in blue.
3212 LyX will insert a little blue square, which is an empty math formula.
3213 LyX has placed the cursor in the blue square, so just type
3218 The expression is typed in blue, and the blue square disappears as soon
3219 as the formula is not empty.
3224 to leave the equation The purple markers disappear, leaving the cursor
3225 to the right of the expression, and now if you type something, it will
3229 \begin_layout Standard
3230 Run LaTeX and look at the
3235 Notice that the expression was typeset nicely, with spaces between the
3236 letters and the equals sign, and a superscript
3237 \begin_inset Quotes eld
3241 \begin_inset Quotes erd
3245 Letters in math mode are assumed to be variables, and come out in italics.
3246 Numbers are just numbers.
3249 \begin_layout Standard
3250 This math editor is another example of the WYSIWYM philosophy.
3251 In LaTeX, you write a mathematical expression using text and commands like
3258 ; this can be frustrating, because you can't see what an expression looks
3259 like until you LaTeX the file, and may have to spend time to find missing
3261 \begin_inset Quotes eld
3265 \begin_inset Quotes erd
3269 On the other hand, LyX doesn't attempt to get the expression to look perfect
3270 (WYSIWYG), but it gives you an extremely good idea of what the expression
3272 LaTeX then takes care of the professional typesetting.
3273 99% of the time, you won't have to make any changes to the font sizes or
3274 spacing that LaTeX outputs.
3275 This way (sorry to be so repetitive) you can focus on the
3279 of your mathematical expressions, not their format.
3282 \begin_layout Section
3283 Navigating an Equation
3286 \begin_layout Standard
3288 \begin_inset Formula $E=mc^{2}$
3292 \begin_inset Formula $E=1+mc^{2}$
3296 Use the arrow keys to move the cursor into the expression.
3297 Note that when you enter the expression, the purple markers appear to let
3298 you know you're editing math.
3307 to move the cursor past the equals sign, and just type
3308 \begin_inset Quotes eld
3312 \begin_inset Quotes erd
3316 Again, you can use the arrow keys or
3320 to leave the formula\SpecialChar \@.
3324 \begin_layout Standard
3325 Other than the special keys described below, typing in math mode is like
3326 editing regular text.
3336 Select text either with the arrow keys or with the mouse.
3342 dit\SpecialChar \menuseparator
3349 works in math mode, as does cutting and pasting.
3350 One thing to be careful of: if you're right outside a formula and you type
3359 ), it will delete the whole expression.
3360 Luckily, you can just use
3367 \begin_layout Standard
3368 What if you want to change
3369 \begin_inset Formula $E=mc^{2}$
3373 \begin_inset Formula $E=mc^{2.5}+1$
3376 ? Again, you can use the mouse to click in the right place.
3377 However, you can also use the arrow keys.
3378 If the cursor is just after the
3379 \begin_inset Quotes eld
3383 \begin_inset Quotes erd
3387 \begin_inset Quotes eld
3391 \begin_inset Quotes erd
3398 will move the cursor to the level of the superscript, just before the
3399 \begin_inset Quotes eld
3403 \begin_inset Quotes erd
3408 \begin_inset Quotes eld
3412 \begin_inset Quotes erd
3420 will move the cursor back to the regular level.
3425 from anywhere within the superscript, the cursor will be placed just
3429 the superscript (so that you can then type the
3430 \begin_inset Quotes eld
3434 \begin_inset Quotes erd
3440 \begin_layout Section
3441 Exponents and Indices
3444 \begin_layout Standard
3445 An exponent can be entered from the
3450 (see below), but it's actually simpler just to type the caret key,
3451 \begin_inset Quotes eld
3455 \begin_inset Quotes erd
3459 LyX will place another blue rectangle in the superscript, so that whatever
3460 you write next will be superscripted, and in a smaller font size.
3461 Everything you type until you hit a
3469 to exit Mathed entirely) will be in the superscript.
3472 \begin_layout Standard
3473 Writing a subscript (index) is just as easy --- start one by typing the
3475 \begin_inset Quotes eld
3479 \begin_inset Quotes eld
3483 You can subscript and superscript both subscripts and superscripts like
3485 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3492 \begin_layout Standard
3504 \begin_layout Section
3510 \begin_layout Standard
3516 is a convenient way to enter symbols or to perform many complicated Mathed
3518 Many of these functions can be accomplished from the keyboard or the
3523 dit\SpecialChar \menuseparator
3537 \SpecialChar \menuseparator
3546 However, we're going to concentrate on using the
3551 , just to let you know what's out there; you can learn keyboard shortcuts
3552 later, from other manuals.
3560 \SpecialChar \menuseparator
3567 \SpecialChar \menuseparator
3574 now and leave it open while reading this section.
3577 \begin_layout Standard
3578 Right-clicking on a formula will open the
3585 \begin_layout Subsection
3589 \begin_layout Standard
3595 which allow you to choose from a large array of symbols used in math: various
3596 arrows, relations, operators, and sums and integrals.
3597 Note that subscripting and superscripting allow you to put lower and upper
3598 limits on sums and integrals.
3602 \begin_layout Standard
3603 \begin_inset Quotes eld
3606 Nothing you can do that can't be done\SpecialChar \ldots{}
3608 \begin_inset Formula $\heartsuit$
3612 \begin_inset Quotes erd
3618 \begin_layout Subsection
3619 Square roots, accents, and delimiters
3622 \begin_layout Standard
3623 To type a square root, just click on the button with a square root sign
3625 The square root appears, and the cursor is in a new insertion point inside
3627 You can type variables, numbers, other square roots, fractions, whatever
3629 LyX will automatically resize the square root to fit what's inside.
3632 \begin_layout Standard
3633 Accenting a character (
3634 \begin_inset Formula $\overrightarrow{v}$
3637 ) or group of characters (
3638 \begin_inset Formula $\overrightarrow{a+b}$
3641 ) is done the same way.
3646 types are available from the panel.
3647 Click on a decoration, and LyX will insert that decoration with an insertion
3648 point under (or over) it.
3649 Just type what you want in the insertion point.
3650 There are two sets of decorations: those that resize with the text you
3651 type, and those that have fixed size, and are most appropriate for a single
3656 \begin_layout Standard
3657 Delimiters such as parentheses, brackets, and braces work similarly, but
3658 are a bit more complicated.
3663 button, which features a blue square surrounded by brackets, to pop up
3669 Your current selection of delimiters is displayed in a box.
3670 It's a pair of parentheses by default, but you can choose a pair of braces,
3671 a brace and a parenthesis, or even choose the empty square to have something
3673 \begin_inset Quotes eld
3677 \begin_inset Formula $a=\left\langle 7\right.$
3681 \begin_inset Quotes erd
3684 (the empty delimiter is displayed as a broken line in LyX, but won't show
3688 \begin_layout Standard
3689 If you're lazy, you can type actual parentheses in math mode, rather than
3695 However, those parentheses will be the same size as regular text, which
3696 will look bad if you have a big fraction or matrix inside the parentheses.
3701 window will guarantee that the delimiters are sized based on what's inside
3705 \begin_layout Standard
3706 You can also put delimiters or a square root sign or a decoration on already
3708 Select the portion of the formula that you want to adjust, and then click
3709 on the button you want from the
3715 Try using this to change Newton's second law from scalar to vector form
3717 \begin_inset Formula $f=ma$
3721 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3725 Once you've learned about matrices, this is how you'll put parentheses
3726 or brackets around them.
3729 \begin_layout Subsection
3733 \begin_layout Standard
3734 Fractions are very simple in Mathed.
3744 , which shows a fraction with blue squares in the numerator and the denominator.
3745 LyX writes two insertion points in a fraction.
3746 As you would expect, you can use arrow keys or the mouse to move around
3748 Click on the top square and type
3749 \begin_inset Quotes eld
3753 \begin_inset Quotes erd
3762 \begin_inset Quotes eld
3766 \begin_inset Quotes erd
3770 You've made a fraction! Of course you can type anything within each of
3771 the two boxes: variables with exponents, square roots, other fractions,
3776 \begin_layout Standard
3788 \begin_layout Subsection
3789 TeX mode: Limits, log, sin and others
3792 \begin_layout Standard
3793 Because letters in math mode are considered to be variables, if you type
3795 \begin_inset Quotes eld
3799 \begin_inset Quotes erd
3802 in math mode, LyX thinks you're typing the product of the three variables
3804 \begin_inset Formula $s$
3808 \begin_inset Formula $i$
3812 \begin_inset Formula $n$
3816 The three letters will be typeset in italics, when what you really wanted
3818 \begin_inset Quotes eld
3822 \begin_inset Quotes erd
3826 In addition, LyX won't put a space between the word
3827 \begin_inset Quotes eld
3831 \begin_inset Quotes erd
3835 \begin_inset Quotes eld
3839 \begin_inset Quotes erd
3846 will just exit math mode).
3848 \begin_inset Quotes eld
3852 \begin_inset Formula $\sin x$
3856 \begin_inset Quotes erd
3860 \begin_inset Quotes eld
3864 \begin_inset Formula $sinx$
3868 \begin_inset Quotes erd
3874 \begin_layout Standard
3876 \begin_inset Quotes eld
3880 \begin_inset Quotes erd
3894 \begin_inset Quotes eld
3898 \begin_inset Quotes erd
3901 is written in black, in upright roman type.
3902 The whole word is treated as one symbol, so if you type
3906 , it will delete the whole word.
3908 \begin_inset Quotes eld
3912 \begin_inset Quotes erd
3915 , which will be written in blue italics, like you expect in Mathed.
3920 file, the expression will be correctly typeset.
3924 \begin_layout Standard
3925 Other commands you need to type in TeX mode using the
3929 box include other trigonometric functions and their inverses, hyperbolic
3930 functions, logarithms, limits, and quite a few others.
3931 These functions can take subscripts and superscripts, important for typing
3933 \begin_inset Quotes eld
3937 \begin_inset Formula $\cos^{2}\theta$
3941 \begin_inset Quotes erd
3945 \begin_inset Quotes eld
3949 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3953 \begin_inset Quotes erd
3959 \begin_layout Standard
3971 \begin_layout Subsection
3975 \begin_layout Standard
3976 \begin_inset LatexCommand \label{sec:matrices}
3990 The dialog has two sliding bars which allow you to choose how many rows
3991 and columns you want in your matrix.
3992 Choose 2 rows and 3 columns and hit
4001 LyX prints 6 insertion points in a
4002 \begin_inset Formula $2\times3$
4006 As usual, you can put any sort of Mathed expression (a square root, another
4007 matrix, etc.) in each insertion point.
4008 You can also leave some of the insertion points empty if you want.
4011 \begin_layout Standard
4016 can be used to move horizontally between the columns of a matrix.
4017 Alternatively, you can use the arrow keys to move around - hitting
4021 at the end of one box will move to the next box,
4025 will move to the next row, etc.
4028 \begin_layout Standard
4029 If you suddenly need more rows or columns, use
4034 dit\SpecialChar \menuseparator
4039 ath\SpecialChar \menuseparator
4057 They add a row or column just after the current position.
4078 \begin_layout Standard
4083 for information on how to change the horizontal alignment of each column,
4084 and how to change the vertical position of the whole matrix.
4085 Note that if you want to write a table containing text, you should use
4086 LyX' wonderful table support, rather than trying to write text in a matrix.
4089 \begin_layout Subsection
4093 \begin_layout Standard
4094 All of the expressions we have written so far have been on the same line
4095 as the text that came before and after them, otherwise known as inline
4097 This is fine for short, simple expressions, but if you want to write larger
4098 ones, or if you want your expressions to stand out from the text, you need
4099 to write them in display mode.
4100 In addition, only displayed expressions can be labeled and numbered (see
4105 ), and multi-line equations (see Sec.
4107 \begin_inset LatexCommand \ref{sec:multiline}
4111 ) must be in display mode.
4114 \begin_layout Standard
4124 , which represents a couple lines of text before and after a centered blue
4126 LyX inserts a formula, but the insertion point is on a new line, and it's
4127 centered within that line.
4128 Now type an expression and run LaTeX to see how it looks.
4133 button is actually a toggle; use it now to change a couple of your expressions
4134 to display mode and back.
4138 \begin_layout Standard
4139 Display mode has a couple differences from inline mode:
4142 \begin_layout Itemize
4143 The default font is larger for a few symbols, like
4144 \begin_inset Formula $\sum$
4148 \begin_inset Formula $\int$
4154 \begin_layout Itemize
4155 Subscripts and superscripts for limits and sums (but not integrals) are
4156 written under rather than next to the symbols
4159 \begin_layout Itemize
4163 \begin_layout Standard
4164 Other than these differences, though, displayed expressions and inline expressio
4165 ns are very similar.
4168 \begin_layout Standard
4169 One final note about the way displayed formulae are typeset: be careful
4170 about whether you're putting your equation into a new paragraph or not.
4171 If your formula is in the middle of a sentence or paragraph, then don't
4177 Doing so will cause the text
4181 the formula to start a new paragraph.
4182 That text will therefore be indented, which is probably not what you want.
4185 \begin_layout Standard
4190 : Put the various equations in
4194 into display mode, and see how they're typeset differently.
4197 \begin_layout Standard
4202 : Using various tools you've learned in this section, you should be able
4203 to write an equation like
4207 \begin_layout Standard
4208 After you've done it the hard way, why don't you give
4213 nsert\SpecialChar \menuseparator
4218 \SpecialChar \menuseparator
4232 \begin_inset Formula \[
4233 f(x)=\left\{ \begin{array}{cc}
4236 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4243 \begin_layout Section
4247 \begin_layout Standard
4248 Mathed can do plenty more.
4249 By now, you're familiar with the basics, so we'll just refer to the
4256 \begin_layout Itemize
4257 Labeling and numbering expressions
4260 \begin_layout Itemize
4261 Multi-line equations
4264 \begin_layout Itemize
4265 Change typefaces, e.g., to write bold-face text in an expression.
4268 \begin_layout Itemize
4269 Fine-tune font sizes and spacing within an expression.
4270 (Don't worry about this until your final draft!)
4273 \begin_layout Itemize
4275 These are very powerful, because you just define them once at the top of
4276 the document, and then you can use them throughout the document.
4277 If you change the macro definition, the references to the macro will be
4278 changed throughout the document.
4279 Macros can even take arguments.
4282 \begin_layout Itemize
4283 Do lots of other things we didn't have time to mention in this
4290 \begin_layout Chapter
4294 \begin_layout Section
4295 Other Major LyX Features
4298 \begin_layout Standard
4299 We haven't gone through all the possible commands in LyX, and we aren't
4305 for more information.
4306 We'll just mention a couple more major things LyX can do\SpecialChar \ldots{}
4310 \begin_layout Itemize
4311 LyX has WYSIWYM support for tables.
4317 nsert\SpecialChar \menuseparator
4325 Click on the table with the
4334 dialog box which allows extensive table editing.
4337 \begin_layout Itemize
4338 LyX also supports including pictures in a number of formats (including JPEG
4339 and other bitmap formats, PostScript® and raw LaTeX) within documents.
4345 nsert\SpecialChar \menuseparator
4353 Then click on the figure to choose the file to include, rotate or scale
4354 it, etc.) Tables and figures can have captions, and LyX will automatically
4355 generate lists of figures and/or tables.
4358 \begin_layout Itemize
4359 Version control is supported, using RCS (
4366 \begin_layout Itemize
4367 LyX is heavily configurable.
4368 Everything from how the LyX window looks to how the output comes out can
4369 be configured in a number of ways.
4370 Much configuration is done through
4375 ools\SpecialChar \menuseparator
4383 For more information on this, check out
4388 elp\SpecialChar \menuseparator
4393 ustomization\SpecialChar \@.
4397 \begin_layout Itemize
4398 LyX is being developed by a team of programmers on five continents.
4399 Therefore, LyX has better support for non-English languages (such as Dutch,
4400 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4401 ) than many word processors.
4402 Even some right-to-left languages like Hebrew or Arabic are supported.
4403 You can write documents in other languages, but you can also configure
4404 LyX to show its menus and error messages in other languages.
4408 \begin_layout Itemize
4409 The LyX menus feature keybindings.
4410 This means that you can do
4415 ile\SpecialChar \menuseparator
4430 or by using the binding which is shown next to it in the menu (C-O by default).
4431 Keybindings are also configurable.
4432 For information on this, check out
4437 elp\SpecialChar \menuseparator
4442 ustomization\SpecialChar \@.
4446 \begin_layout Itemize
4447 LyX can read in LaTeX documents.
4448 See Section\InsetSpace ~
4450 \begin_inset LatexCommand \ref{sec:relyx}
4457 \begin_layout Itemize
4458 Spellchecking and thesaurus facilities are available.
4461 \begin_layout Itemize
4462 The text box near the bottom of the LyX window is called the minibuffer
4463 (after a similar feature in
4468 This gives you access to all sorts of interesting functionality, including
4469 functionality which could break your document.
4470 In other words, don't type in the minibuffer unless you know what you're
4474 \begin_layout Section
4478 \begin_layout Standard
4479 \begin_inset LatexCommand \label{sec:latexusers}
4483 If you don't know anything about LaTeX, you don't have to read this section.
4484 Actually, you might want to
4488 about LaTeX, and then read this chapter.
4489 However, many people who begin to use LyX will be familiar with LaTeX.
4490 If you are such a person, you may be wondering if LyX can really do everything
4492 The short answer is that LyX can do pretty much everything LaTeX can do
4493 in one form or another, and it definitely simplifies most parts of writing
4495 Currently, there may be some annoyance in converting old LaTeX documents
4496 and in a couple other areas, but later releases of LyX will get rid of
4500 \begin_layout Standard
4501 Because this is just a tutorial, we are only going to mention things that
4502 new LyX users will most likely be interested in.
4503 In the interests of keeping the
4507 short, we will give only minimal information here.
4512 manual, specifically the
4514 Secrets of the LaTeX Masters
4516 chapter, has a great deal of information on differences between LyX and
4517 LaTeX, and how to do various LaTeX tricks in LyX.
4520 \begin_layout Subsection
4524 \begin_layout Standard
4525 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4526 will be displayed in red on the screen.
4527 You can use TeX commands in LyX by choosing
4532 nsert\SpecialChar \menuseparator
4539 This creates a text box, and everything within it is passed straight to
4543 \begin_layout Standard
4544 In a math formula, TeX mode is handled a bit differently.
4545 Enter TeX mode by typing a backslash.
4546 The backslash is not written out, but anything you type afterwards will
4548 You exit TeX mode by typing
4552 or some other non-alphabetic character, like a number, underscore, caret,
4554 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4555 will convert it to WYSIWYM\SpecialChar \@.
4556 So if, in a formula, you type
4562 , then when you type
4566 , LyX will change the red
4567 \begin_inset Quotes eld
4571 \begin_inset Quotes erd
4575 \begin_inset Quotes eld
4579 \begin_inset Formula $\gamma$
4583 \begin_inset Quotes erd
4587 This will work for almost all, non-complicated math macros.
4588 This may be faster than using the
4593 , and will be especially convenient for experienced LaTeX users.
4596 \begin_layout Standard
4597 As a special case, if you type a brace in TeX mode, then the beginning
4601 ending braces will be inserted in red, then take you
4605 of TeX mode and place the cursor between the braces.
4606 This makes it more convenient to type commands that LyX doesn't know which
4610 \begin_layout Standard
4611 LyX can't do absolutely everything that LaTeX can do (yet?).
4612 Some fancy functions are not supported at all, while some work but aren't
4614 TeX mode allows users to get the full flexibility of LaTeX, while having
4615 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4616 LyX could never support every LaTeX package.
4623 in the preamble (see Section\InsetSpace ~
4625 \begin_inset LatexCommand \ref{sec:preamble}
4629 ), you can use any package you want --- although you won't have WYSIWYM
4630 support for that package's features.
4633 \begin_layout Subsection
4634 Importing LaTeX Documents---
4639 \begin_layout Standard
4640 \begin_inset LatexCommand \label{sec:relyx}
4644 You can import a LaTeX file into LyX by using the
4649 ile\SpecialChar \menuseparator
4654 mport\SpecialChar \menuseparator
4662 This will call a Perl script called
4666 ---which will create a file
4674 ---and then open that file.
4675 If the translation doesn't work, you can try calling
4679 from the command line
4683 \begin_layout Standard
4684 When LyX is installed, a separate executable called
4688 will be placed in the same folder as the
4694 /usr/local/bin/reLyX
4701 requires Perl (version 5.002 as of this writing).
4706 , possibly using fancier options.
4709 \begin_layout Standard
4714 will translate most legal LaTeX, but not everything.
4715 It will leave things it doesn't understand in TeX mode, so after translating
4720 , you can look for red text and hand-edit it to look right.
4723 \begin_layout Standard
4728 has its own manpage.
4729 Read it to find out about which LaTeX commands and environments aren't
4730 supported, bugs (and how to get around them), and how to use the various
4734 \begin_layout Subsection
4735 Converting LyX Documents to LaTeX
4738 \begin_layout Standard
4739 You might wish to convert a LyX Document to a LaTeX file.
4740 For example, a co-worker or co-author who doesn't have LyX might want to
4742 This is very easy to do with LyX.
4748 ile\SpecialChar \menuseparator
4753 xport\SpecialChar \menuseparator
4761 This will create a file
4769 file you are editing.
4770 LyX always creates temporary LaTeX files when viewing or printing files,
4771 so it is very good at generating LaTeX.
4774 \begin_layout Subsection
4778 \begin_layout Subsubsection
4782 \begin_layout Standard
4788 ocument\SpecialChar \menuseparator
4795 dialog takes care of many of the options that you would input in a
4802 Change the class, default font size and paper size here.
4803 Put any extra options to the
4821 \begin_layout Subsubsection
4822 Other Preamble Matter
4825 \begin_layout Standard
4826 \begin_inset LatexCommand \label{sec:preamble}
4830 If you have special commands to put in the preamble of a LaTeX file, you
4831 can use them in a LyX document as well.
4837 ocument\SpecialChar \menuseparator
4849 and type in the dialog window (or from the document settings dialog, depending
4851 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4854 \begin_layout Subsection
4858 \begin_layout Standard
4859 LyX has support for BibTeX, which allows you to build databases of bibliographic
4860 al references to be used in multiple documents.
4866 nsert\SpecialChar \menuseparator
4873 C\SpecialChar \menuseparator
4886 Click on the resulting
4887 \begin_inset Quotes eld
4891 Generated\InsetSpace ~
4893 \begin_inset Quotes erd
4896 button, and you will get a
4905 field, type what you would type inside the braces of a
4915 \begin_layout Standard
4916 Like in regular LaTeX, multiple bibliographies should be separated by commas,
4927 field, type what you would type inside the braces of a
4936 \begin_layout Standard
4937 After you've done this, you can use citations from any bibliographies you're
4943 nsert\SpecialChar \menuseparator
4948 itation\InsetSpace ~
4951 (see Section\InsetSpace ~
4953 \begin_inset LatexCommand \ref{sec:bibliographies}
4958 LyX will take care of running BibTeX.
4963 dialog will show a list of all the references in your
4970 \begin_layout Section
4974 \begin_layout Standard
4975 Sometimes when you LaTeX a document, there will be errors, things that LyX
4976 or LaTeX can't understand.
4977 When this happens, LyX will create an error box (a box with the word
4978 \begin_inset Quotes eld
4982 \begin_inset Quotes erd
4986 Clicking on this box will pop up a window showing what the error was.
4987 LyX will just include the error message that LaTeX gave.
4988 Note that the placement of these errors in often not accurate.