1 #LyX 1.3 created this file. For more info see http://www.lyx.org/
15 \use_numerical_citations 0
16 \paperorientation portrait
19 \paragraph_separation indent
21 \quotes_language english
25 \paperpagestyle headings
38 Principal maintainer of this file is
43 If you have comments or error corrections, please send them to the LyX
44 Documentation mailing list, <lyx-docs@lists.lyx.org>.
51 \begin_inset LatexCommand \tableofcontents{}
64 This file is designed for all of you who have never heard of LaTeX, or don't
66 Now, don't panic - you won't need to learn LaTeX to use LyX.
67 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
69 There are some things you will need to learn, however, in order to use
73 Some of you probably found your way to this document because you tried to
74 put two spaces after a
75 \begin_inset Quotes eld
79 \begin_inset Quotes erd
82 or tried to put 3 blank lines between paragraphs.
83 After much frustration, you found you couldn't.
84 In fact, you'll find that most of the little tricks you're accustomed to
85 using in other word processors just won't work in LyX.
86 That's because most word processors you've used before allow you to manually
87 enter all spacings, font changes, and so on.
88 So you end up not only writing a document but typesetting it, too.
89 LyX does the typesetting for you, in a consistent fashion, letting you
90 focus on the important things, like the content of your writing.
93 So, bear with us and read on.
94 Reading this tutorial is definitely worth the time.
106 Before we get started with this section, we want to make a quick note of
112 uses the notation outlined in the
117 If you came to this manual first, go read the
125 Now that you know which fonts mean what, we want to talk a bit about what
133 Getting the Most out of the Tutorial
136 This tutorial consists of examples and exercises.
137 To get the most out of this document, you should read through the document,
138 typing all the silly little things we're telling you to type and trying
139 out all of the exercises to see if you get them right.
140 For convenience, you might want to print out the PostScript® version of
144 If you are familiar with LaTeX, you'll probably be able to read the
148 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
149 However, LyX does have idiosyncrasies
155 or, more optimistically,
156 \begin_inset Quotes eld
160 \begin_inset Quotes erd
166 you'll want to learn about.
167 Even if you don't feel like reading the rest of the
171 , you should definitely check out Section\SpecialChar ~
173 \begin_inset LatexCommand \ref{sec:latexusers}
177 , which is specifically written for experienced LaTeX users.
187 Detailed explanations of all of LyX's features.
198 Seriously, though, we're here to get you up and running so that all you
204 If we tried to duplicate all of the information about all of LyX's features
209 would be redundant, too long, and forever out of date.
210 All we do here is introduce things; imagine there is a
211 \begin_inset Quotes eld
219 \begin_inset Quotes erd
222 at the end of every section.
226 Detailed explanations of LaTeX.
231 If you're really curious about learning some of the neat tricks you can
232 do with LaTeX, you can always go get a LaTeX book.
233 There are several good ones on the market.
234 No need to reinvent the wheel, after all\SpecialChar \ldots{}
239 So, brave soul, it's time to move onwards.
240 Time for your first document \SpecialChar \ldots{}
244 Getting Started with LyX
247 Your First LyX Document
251 \begin_inset LatexCommand \label{sec:first-doc-ex}
256 You're ready to start writing.
257 Before you do, though, there are a few things we need to mention, which
258 will hopefully make the
262 more instructive, useful, and fun.
266 Because there's lots of information that we won't be giving you, the
271 thing that you need to do is find the
276 Luckily, this is very simple.
292 You may want to load the
296 as well (if you're not reading it on screen already).
297 This way, you can read them while you're writing your own file
303 They can also serve as good examples of how to use the many features of
308 Note that once you've got more than one document open, you can use the
316 menu to switch between them.
321 will not cover in detail subjects which are described in the other LyX
323 This may make life a bit harder for you at the beginning, but it will keep
329 It will also get you in the habit of using the other manuals, which ---
330 in the long run --- will save you a lot of time.
337 , we're going to assume that you have a fully working version of LyX, as
342 or some other dvi viewer,
346 or some other way of converting
350 documents to PostScript® documents, and a working printer.
351 This is a lot to assume.
352 If any of this is not true, you (or a friendly system administrator) will
353 need to set up your system.
354 You can find information on setup in other manuals.
357 Finally, we've written a file to let you practice your LyX skills on.
363 Imagine that it was typed by someone who didn't know about any of LyX's
365 As you learn new LyX functions, we'll suggest that you fix those parts
372 \begin_inset Quotes eld
376 \begin_inset Quotes erd
379 hints about how to fix things
385 The hints are located in yellow
386 \begin_inset Quotes eld
390 \begin_inset Quotes erd
394 Access the text in a note by clicking on it.
398 If you want to cheat (or check what you've done), there's also a file called
403 which contains the same text as written and typeset by a LyX master.
406 The example files can be found in the
410 directory, which you can get to by selecting
415 ile\SpecialChar \menuseparator
422 and then clicking on the
430 Open the raw document, and use
435 ile\SpecialChar \menuseparator
443 to save a copy in your own directory for you to work on.
444 As you fix parts of the raw document, check to see how those changes affect
452 directory contains lots of other examples files.
453 They will show you how to do various fancy things with LyX.
454 They are especially useful to display things that (due to length or other
455 reasons) won't fit in the documentation.
460 , or when you're confused about how to do something fancy in LyX, take a
464 Typing, Viewing, and Printing
472 ile\SpecialChar \menuseparator
480 Type a sentence like:
482 This is my first LyX document!
485 Save your document with
490 ile\SpecialChar \menuseparator
500 Run LaTeX to create a
509 iew\SpecialChar \menuseparator
517 You may see things being printed in the window you ran the
522 These are messages from LaTeX, which you can ignore for now.
531 viewer), which will pop up a new window displaying what your document will
532 look like when printed.
538 You can save time by leaving
542 running in the background.
548 iew\SpecialChar \menuseparator
553 pdate\SpecialChar \menuseparator
560 and just click on the
564 window (or unminimize it) after LaTeX finishes running.
575 ile\SpecialChar \menuseparator
588 Congratulations! You've written and printed your first LyX document.
589 All of the rest is just details, which is covered in the rest of the
611 LyX can of course do most of the things you're used to doing with a word
613 It will word-wrap and indent paragraphs automatically.
614 Here's a quick description of how to do some simple actions.
617 Undo LyX has multiple levels of undo, which means you can undo everything
618 you've done since your current editing session started, by selecting
623 dit\SpecialChar \menuseparator
631 If you undo too much, just select
636 dit\SpecialChar \menuseparator
648 Currently, undo is limited to 100 steps.
649 Undo also doesn't work for
653 ; for instance, changes to the document layout.
654 Each of these is really a LyX bug.
663 dit\SpecialChar \menuseparator
671 dit\SpecialChar \menuseparator
679 dit\SpecialChar \menuseparator
682 to cut, copy, and paste.
683 Or automatically paste selected text (including selections from other programs)
696 dit\SpecialChar \menuseparator
706 In the dialog, search with the
720 button to replace a word you've found
726 Close the window when you're done.
727 Or leave it open if you find it more convenient.
728 Most dialog boxes in LyX --- including the
744 dialogs, as well as the various math dialogs can operate like this.
750 ile\SpecialChar \menuseparator
757 , won't let you type anything in the main LyX window until you actually
759 Just be sure you have the right window focus when you're trying to type
760 in the main LyX window or give a command in some other LyX dialog.
764 If you like, you can specify whether to make the search case-sensitive,
765 or to search for only complete words; you can also search backwards through
769 Character\SpecialChar ~
774 text (which will generally put characters in italics), put it in
782 (usually small caps, used for people's names) from the toggle buttons in
788 dit\SpecialChar \menuseparator
799 Toolbar There are buttons on the toolbar (just below the menus) which allow
800 you to do some of the more popular functions, such as
811 Of course, you haven't yet written enough to make most of these functions
813 As you write more, though, try undoing, pasting, etc.
816 WYSIWYM: Whitespace in LyX
820 \begin_inset LatexCommand \label{sec:whitespace}
824 One of the hardest things for new users to get used to is the way that LyX
826 As many times as you hit
830 , you'll only get one blank line.
831 As many times as you hit
835 , you'll only get one space.
836 On a blank line, LyX won't let you type even one space.
841 key won't move you forward one tab stop; in fact there
845 no tab stops! There's no ruler at the top of the page to let you set tabs
849 Many commercial word processors are based on the WYSIWYG principle:
850 \begin_inset Quotes eld
853 What You See Is What You Get.
854 \begin_inset Quotes erd
857 LyX, on the other hand, is based on the principle that
858 \begin_inset Quotes eld
861 What You See Is What You
866 \begin_inset Quotes erd
869 You type what you mean, and LyX will take care of typesetting it for you,
870 so that the output looks nice.
875 grammatically separates paragraphs, and a
879 grammatically separates words, so there is no reason to have several of
884 has no grammatical function at all, so LyX does not support it.
885 Using LyX, you'll spend more of your time worrying about the
889 of your document, and less time worrying about the
898 for more information on the WYSIWYM concept.
901 LyX does have (many) ways to fine-tune the formatting of your document.
902 After all, LyX might not typeset
911 has information about all that.
916 s and vertical space --- which are more powerful and versatile than multiple
917 spaces or blank lines --- and ways to change font sizes, character styles,
918 and paragraph alignments by hand.
919 The idea, though, is that you can write your whole document, focusing on
920 content, and just worry about that fine-tuning at the end.
921 With standard word processors, you'll be distracted by document formatting
922 throughout the writing process.
928 Different parts of a document have different purposes; we call these parts
934 Most of a document is made up of regular text.
935 Section (chapter, subsection, etc.) titles let the reader know that a new
936 topic or subtopic will be discussed.
937 Certain types of documents have special environments.
938 A journal article will have an abstract, and a title.
939 A letter will have neither of these, but will probably have an environment
940 that gives the writer's address.
943 Environments are a major part of the
944 \begin_inset Quotes eld
947 What You See Is What You Mean
948 \begin_inset Quotes erd
952 A given environment may require a certain font style, font size, indenting,
953 line spacing, and more.
954 This problem is aggravated, because the exact formatting for a given environmen
955 t may change: one journal may use boldface, 18 point, centered type for
956 section titles while another uses italicized, 15 point, left justified
957 type; different languages may have different standards for indenting; and
958 bibliography formats can vary widely.
959 LyX lets you avoid learning all the different formatting styles.
966 box is located on the left end of the toolbar (just under the
974 It indicates which environment you're currently writing in.
975 While you were writing your first document, it said
976 \begin_inset Quotes eld
980 \begin_inset Quotes erd
983 which is the default environment for text.
984 Now you will put a number of environments in your new document so that
985 you can see how they work.
986 You'll do so with the
990 menu, which you open by clicking on the
991 \begin_inset Quotes eld
995 \begin_inset Quotes erd
998 icon just to the right of the
1005 Sections and Subsections
1012 on the first line of your LyX file, and select
1031 If nothing is selected, LyX changes the paragraph you are currently in
1032 to the selected environment.
1033 Alternatively, you can change several paragraphs to a different environment
1034 by selecting them before picking an environment.
1050 , which will be covered below.
1051 LyX numbers the section
1052 \begin_inset Quotes eld
1056 \begin_inset Quotes erd
1059 and typesets the section heading (title) in a larger font.
1070 \begin_inset Quotes eld
1074 \begin_inset Quotes erd
1078 \begin_inset Quotes eld
1082 \begin_inset Quotes erd
1086 Section headings, like most environments, are assumed to end when you type
1092 Type the document introduction:
1095 This is an introduction to my first LyX document.
1112 \begin_inset Quotes eld
1116 \begin_inset Quotes erd
1119 and waits for you to type a title.
1124 , and you'll see that LyX again sets it as a section title.
1128 Go to the end of Section\SpecialChar ~
1130 \begin_inset Quotes eld
1133 my first LyX document
1134 \begin_inset Quotes erd
1151 \begin_inset Quotes eld
1155 \begin_inset Quotes erd
1158 and waits for you to type a title.
1164 Section\SpecialChar ~
1166 \begin_inset Quotes eld
1170 \begin_inset Quotes erd
1173 , which used to be Section\SpecialChar ~
1174 2, has been automatically renumbered to Section\SpecialChar ~
1176 In true WYSIWYM fashion, you just need to identify the text that makes
1177 up the section titles, and LyX takes care of numbering the sections and
1189 environment, and type the following five lines:
1192 Sections and subsections are described below.
1198 Sections are bigger than subsections.
1201 Subsection description
1204 Subsections are smaller than sections.
1207 Click on the second line and select
1216 LyX numbers the subsection
1217 \begin_inset Quotes eld
1221 \begin_inset Quotes erd
1224 , and typesets it in a font which is bigger than regular text but smaller
1225 than the section title.
1226 Change the fourth line
1230 environment as well.
1231 As you probably expected, LyX automatically numbered the section
1232 \begin_inset Quotes eld
1236 \begin_inset Quotes erd
1240 If you put yet another section before Section\SpecialChar ~
1241 2, Section\SpecialChar ~
1242 2 will be renumbered
1243 as Section 3, and the subsections will be renumbered to
1244 \begin_inset Quotes eld
1248 \begin_inset Quotes erd
1252 \begin_inset Quotes eld
1256 \begin_inset Quotes erd
1263 Further levels of sectioning include
1276 We'll let you play with these on your own.
1277 You may notice that paragraph and subparagraph headings are not numbered
1278 by default, and that subparagraphs are indented; see the
1287 headings are actually the highest level of sectioning, above
1291 s, but you're only allowed to use them in certain types (text classes) of
1292 LyX documents (see Section\SpecialChar ~
1294 \begin_inset LatexCommand \ref{sec:textclasses}
1302 Finally, you may want to have sections or subsections that are not numbered.
1303 There are environments for this as well.
1304 If you change one of your section headings to the
1308 environment (you may have to scroll down in the
1312 menu to find it), LyX will use the same font size for the heading as it
1313 uses for a regular section, but it won't number that section.
1314 There are corresponding
1315 \begin_inset Quotes eld
1319 \begin_inset Quotes erd
1322 heading environments for
1331 Try changing some of your sections or subsections to the starred environments,
1332 and note how the other sections' numbers are updated.
1339 : Fix the section and subsection headings in
1350 LyX has several different environments for typesetting lists.
1351 The various list environments free you from hitting
1355 a million times when writing an outline, or from renumbering a whole list
1356 when you want to add a point in the middle of the list, and lets you concentrat
1357 e on the list content.
1363 Yes, we're overemphasizing this point throughout the
1372 the main philosophy of LyX, so please forgive us.
1375 Different types of documents logically require different list environments:
1378 A slide presentation might use the
1382 environment's bulleted lists to describe different points.
1386 An outline would use the
1390 environment's numbered lists (and lettered sublists).
1394 A document describing several software packages could use the
1398 environment, where each item in the list begins with a bold-faced word.
1406 environment --- not found in LaTeX --- is a slightly different form of
1414 Let's write a list of reasons why LyX is better than other word processors.
1415 Somewhere in your document, type:
1420 Lyx is better than other word processors because:
1438 \begin_inset Quotes eld
1442 \begin_inset Quotes erd
1445 (actually, an asterisk, which will be converted to a round circle on output)
1447 Type in your reasons:
1450 Typesetting is done for you.
1456 Lists are very easy to create!
1459 List environments, unlike headings, do not end when you type
1464 Instead, LyX assumes you're going on to the next item in the list.
1465 The above will therefore result in a three-item list.
1466 If you want more than one paragraph within one list
1470 , one way is to use the
1472 Protected\SpecialChar ~
1475 , which you get by typing
1480 In order to get out of the list, you need to reselect the
1484 environment (or just use the keybinding,
1492 You've got a beautiful itemized list.
1493 You might want to run LaTeX to see how the list looks when printed out.
1494 But what if you wanted to number the reasons? Well, just select the whole
1501 LyX won't let you select the first bullet unless you also select the paragraph
1506 the list, which you probably don't want to do.
1507 Similarly, you can't select the actual number in a numbered section title.
1508 Don't worry about it.
1520 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1524 While the list is still selected, you can change to the other two list environme
1533 , in order to see what they look like.
1534 For those two environments, each list item is made up of a term, which
1535 is the item's first word, followed by a definition, which is the rest of
1536 the paragraph (until you hit
1540 .) The term is either typeset in boldface (
1545 \begin_inset Quotes eld
1549 \begin_inset Quotes erd
1558 But a typesetter's tab, which will change to fit the size of the largest
1559 term, not a pathetic, rigid, unchangeable typewriter
1570 ) from the rest of the paragraph.
1571 If you want to have more than one word in the definition, then separate
1574 Protected\SpecialChar ~
1584 : Typeset the list in
1589 You can nest lists within each other in all sorts of interesting ways.
1590 An obvious example would be writing outlines.
1591 Numbered and bulleted lists will have different numbering and bulleting
1592 schemes for sublists.
1597 for details on the different sorts of lists, as well as examples which
1605 Other Environments: Verses, Quotations, and More
1608 There are two environments for setting quotations apart from surrounding
1613 for short quotes and
1622 environment, also used in the
1626 for the long typing examples) is written in a
1630 font; this environment is the only place in LyX where you're allowed to
1631 use multiple spaces to allow code indenting.
1632 You can even write poetry using the
1640 to separate stanzas, and
1644 to separate lines within a stanza.
1649 for more complete descriptions of all of the available LyX environments.
1656 : Correctly typeset the
1682 The previous chapter hopefully allowed you to get used to writing in LyX.
1683 It introduced you to the basic editing operations in LyX, as well as the
1684 powerful method of writing with environments.
1685 Most people who use LyX, though, will want to write documents: papers,
1686 articles, books, manuals, or letters.
1687 This chapter is meant to take you from simply writing text with LyX to
1688 writing a complete document.
1689 It will introduce you to text classes, which allow you to write different
1691 It will then describe many of the additions that turn text into a document,
1692 such as titles, footnotes, cross references, bibliographies, and tables
1700 \begin_inset LatexCommand \label{sec:textclasses}
1704 Different sorts of documents should be typeset differently.
1705 For example, books are generally printed double-sided, while articles are
1707 In addition, many documents contain special environments: letters contain
1708 some environments --- such as the sender's address and the signature ---
1709 which do not make sense in a book or article.
1718 LaTeX users: this is equivalent to the LaTeX document class
1723 takes care of these large scale differences between different sorts of documents.
1728 , for example, was written in the
1733 Text classes are another major part of the WYSIWYM philosophy; they tell
1734 LyX how to typeset the document, so you don't need to know how.
1737 Your document is probably being written in the
1747 That's usually the default text class
1751 Try changing to other text classes (using the
1756 ocument\SpecialChar \menuseparator
1763 dialog) to see how they are typeset differently.
1764 If you change your document to the
1768 text class and look at the
1772 menu, you'll see that most of the allowed environments are the same.
1773 However, you can now use the
1778 If you're ever unsure about which environments you can use in a given text
1779 class, just consult the
1786 Font sizes, one- or two-column printing, and page headings are just some
1787 of the ways journals' typesettings differ from one another.
1788 As the Computer Age continues to mature, journals have begun accepting
1789 electronic submissions, creating LaTeX
1790 \begin_inset Quotes eld
1794 \begin_inset Quotes erd
1797 so that authors can submit correctly typeset articles.
1798 LyX is set up to support this as well.
1799 For example, LyX supports typesetting (and extra environments) for the
1800 American Mathematics Society journals using the
1802 Article\SpecialChar ~
1808 Here's a very quick reference to some of the text classes.
1811 Special Document Classes
1817 manual for many more details.
1821 \begin_inset Tabular
1822 <lyxtabular version="3" rows="7" columns="2">
1824 <column alignment="center" valignment="top" leftline="true" width="0pt">
1825 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
1826 <row topline="true" bottomline="true">
1827 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1835 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1844 <row topline="true">
1845 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1853 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1858 one-sided, no chapters
1862 <row topline="true">
1863 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1871 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1876 layout & environments for American Math Society
1880 <row topline="true">
1881 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1889 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1894 longer than article, two-sided
1898 <row topline="true" bottomline="true">
1899 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1907 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1912 report + front and back matter
1916 <row bottomline="true">
1917 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1925 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1930 transparencies (also including FoilTeX)
1934 <row bottomline="true">
1935 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1943 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1948 lots of extra environments for address, signature\SpecialChar \ldots{}
1960 Templates: Writing a Letter
1963 One of the most popular text classes is
1968 One way to write a letter would be to open a new
1981 ocument\SpecialChar \menuseparator
1989 While this is the most obvious way to write a letter, it seems like extra
1991 Every time you write a business letter, you want to have your address,
1992 the address you're sending to, a body, a signature, etc.
1997 for letters, which contains a sample letter; once you have a template,
1998 you can just replace a couple parts of the letter with your text each time
2002 Open a new file with
2007 ile\SpecialChar \menuseparator
2022 Save and print the file to see how the various environments are typeset.
2025 When you look at the
2029 menu, you'll see several environments, like the
2034 environment, which don't even exist in most other text classes.
2044 You can play around for a while to figure out how the various environments
2046 You'll notice for example that the
2050 environment has the word
2051 \begin_inset Quotes eld
2055 \begin_inset Quotes eld
2058 in red before the actual text of the signature.
2059 This word doesn't show up in the actual letter, as you'll see if you try
2061 It's just there to let you know where the signature goes.
2062 Also, note that it doesn't matter where in the file the
2067 Remember, LyX is WYSIWYM; you can put the
2071 environment anywhere you want, but LyX knows that in the printout, the
2072 signature should be at the end.
2075 A template is just a regular LyX file.
2076 This means you can fill in your address and signature and save the file
2078 From now on, any time you want to write a letter, you can use the new template
2080 We probably don't have to suggest an actual
2081 \begin_inset Quotes eld
2085 \begin_inset Quotes erd
2088 here; just write a letter to someone
2094 One warning, if you're writing from a template.
2095 If you erase all of the text in an environment --- for example, if you
2101 field so that you can replace it with your own --- and then you move the
2102 cursor without writing any text, the environment may disappear.
2103 This is because most environments cannot exist without any text in them.
2104 Just reselect the environment from the
2108 menu to get it back.
2114 Templates can be a huge time-saver, and we urge you to use them whenever
2116 In addition, they can help a person learn how to use some of the fancier
2118 Finally, they may be useful for a person who is configuring LyX for a bunch
2119 of less computer-aware users.
2120 When they're first learning LyX, it will be much less intimidating if they
2121 have a letter template customized for their company, for example.
2127 LyX (like LaTeX) considers the title --- which may contain the actual title,
2128 the author, the date, and even an abstract of a paper --- to be a separate
2129 part of the document.
2136 document and make sure it's using the
2146 You should not be using the letter any more, since the
2150 textclass doesn't allow titles.
2153 Type a title on the first line, and change the line to the
2158 On the next line, type your name and change it to the
2163 On the next line, write the date in the
2168 Type a paragraph or two summarizing your document using the
2173 Now see how it looks when printed.
2180 : Fix the title, date, and author in
2185 Labels and Cross-References
2189 \begin_inset LatexCommand \label{sec:labels}
2193 You can label a section (or subsubsection, or, more rarely, just a random
2194 piece of text) in your document.
2195 Once you do so, you can refer to this section in other parts of the document,
2196 using cross-references.
2197 You can refer either to the section's number, or to the page that the section
2199 As with sections and footnotes, LyX worries about the cross-references
2201 Automatic labels and cross-references are one of the best advantages of
2202 LyX (and LaTeX) over conventional word processors.
2208 Let's mark our second section, whose title is
2209 \begin_inset Quotes eld
2213 \begin_inset Quotes erd
2217 Click at the end of the section title line, and select
2222 nsert\SpecialChar \menuseparator
2230 A dialog asks you for a label name, and gives you a suggestion.
2235 , the label name will be placed in a box next to the section title.
2238 By the way, you could have put the label right anywhere within the section
2239 as well; section references will refer to the last section or subsection
2240 whose heading comes before the label.
2241 However, putting it on the same line as the section title (or, perhaps,
2242 on the first line of the section's text) ensures that page references will
2243 reference the beginning of the section.
2246 So far you haven't done anything --- the
2250 file will look exactly the same, since labels don't show up in the printed
2252 However, now that you've added a label, you can refer to that label with
2257 Your first cross-references
2260 Place the cursor somewhere in Section\SpecialChar ~
2265 If you want to know more about this document, then see
2267 Section , which can be found on page .
2270 Now --- with the cursor after the word
2271 \begin_inset Quotes eld
2275 \begin_inset Quotes erd
2287 nsert\SpecialChar \menuseparator
2301 It shows a list of the possible labels you can reference.
2302 At the moment, there should be only one,
2303 \begin_inset Quotes eld
2307 \begin_inset Quotes erd
2311 Select it (it may be selected by default), and click
2316 Now put the cursor after the word
2317 \begin_inset Quotes eld
2321 \begin_inset Quotes erd
2324 , and change the reference type to use the page number then click
2329 (To be really correct, you should put a
2331 Protected\SpecialChar ~
2335 \begin_inset Quotes eld
2339 \begin_inset Quotes erd
2343 Same for the page reference.)
2346 LyX puts the references in a box right where the cursor was.
2347 In the printed document, this reference marker will be replaced with either
2348 the page or section number (depending on what you selected in the
2350 Insert\SpecialChar ~
2359 iew\SpecialChar \menuseparator
2364 pdate\SpecialChar \menuseparator
2371 , and you'll see that on the last page we refer to
2372 \begin_inset Quotes eld
2375 Section\SpecialChar ~
2377 \begin_inset Quotes erd
2381 \begin_inset Quotes eld
2386 \begin_inset Quotes erd
2389 (or whatever page Section\SpecialChar ~
2393 Conveniently, a cross-reference acts a hyperlink when you're editing a document
2394 in LyX; clicking on it will pop up the
2404 will move the cursor to the referenced label.
2407 More fun with labels
2410 We told you that LyX worries about numbering cross-references; now you can
2412 Add a new section before Section\SpecialChar ~
2414 Now rerun LaTeX, and --- voilà ! --- the section cross reference changed
2416 \begin_inset Quotes eld
2420 \begin_inset Quotes erd
2424 \begin_inset Quotes eld
2428 \begin_inset Quotes erd
2431 to a subsection, and the cross-reference will reference Subsection\SpecialChar ~
2433 of Section\SpecialChar ~
2435 The page reference won't change unless you add a whole page of text before
2436 the label, of course.
2440 If you want some more practice with labels, then try putting a new label
2441 where your first cross-reference was, and refer to that label from elsewhere
2443 If you'll be inserting cross-references often (if, for example, you're
2444 writing a journal article), it may be convenient to leave the
2446 Insert\SpecialChar ~
2452 If you want to make sure that the cross-referencing gets the pages right
2453 even for larger documents,
2457 a couple pages of text from the
2461 to the clipboard, and
2465 the stolen text into your document
2471 By the way, copying a chapter title may cause an error, because chapters
2472 aren't allowed in the article class.
2473 If this happens, just delete the chapter title.
2474 If you want to know why this happens, see Section\SpecialChar ~
2476 \begin_inset LatexCommand \ref{sec:textclasses}
2491 : Fix the references in
2496 Footnotes and Margin Notes
2499 Footnotes can be added using the
2501 Insert\SpecialChar ~
2504 button in the toolbar
2510 The button shows an arrow pointing to red text, which is just below some
2519 nsert\SpecialChar \menuseparator
2527 Click at the end of the word
2528 \begin_inset Quotes eld
2532 \begin_inset Quotes erd
2535 somewhere in your document and hit the
2537 Insert\SpecialChar ~
2541 A footnote box appears where you can enter the text of the footnote.
2542 LyX should place the cursor at the beginning of the footnote box.
2546 LyX is a typesetting word processor.
2549 Now click on the button labelled
2550 \begin_inset Quotes eld
2554 \begin_inset Quotes erd
2557 The footnote box disappears, leaving the button showing where the footnote
2558 marker will be in the printed text; this is called
2559 \begin_inset Quotes eld
2563 \begin_inset Quotes erd
2567 You can unfold the footnote at any time --- and re-edit its text, if you
2568 want --- by clicking again on the
2569 \begin_inset Quotes eld
2573 \begin_inset Quotes erd
2579 You may wonder why the footnote button is a word instead of a number.
2580 The answer is that LyX worries about the footnote numbering for you in
2582 You can see this yourself by looking at the
2587 If you add other footnotes, LyX will renumber the footnotes.
2588 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2589 there's really no need to put the numbers in the LyX file.
2592 A footnote can be cut and pasted like normal text.
2593 Go ahead; try it! All you need to do is select the footnote button
2599 It may be easier to select it using the keyboard.
2600 You might accidentally open the footnote if you're trying to select the
2601 marker itself with the mouse.
2613 In addition, you can change regular text to a footnote, by selecting it
2616 Insert\SpecialChar ~
2619 button; change a footnote to regular text by clicking the
2621 Insert\SpecialChar ~
2624 button when the cursor is in a footnote.
2627 Margin notes can be added using the toolbar button (the button shows an
2628 arrow pointing to red text next to (i.e., in the margin of) black text, and
2629 should be next to the
2631 Insert\SpecialChar ~
2634 button in the toolbar.) or
2639 nsert\SpecialChar \menuseparator
2644 arginal\SpecialChar ~
2648 Margin notes are like footnotes, except that:
2651 the on-screen boxes say
2652 \begin_inset Quotes eld
2656 \begin_inset Quotes erd
2660 \begin_inset Quotes eld
2664 \begin_inset Quotes erd
2670 the notes will be placed in the margin, instead of below the text
2673 margin notes are not numbered
2676 Change your LyX footnote back to text, then select and change it to a margin
2678 Run LaTeX again to see what the margin note looks like.
2685 : Fix the footnote in
2694 \begin_inset LatexCommand \label{sec:bibliographies}
2698 Bibliographies (at least in the exact sciences) are similar to cross references.
2699 The bibliography contains a list of references at the end of the document,
2700 and they can be referenced from within the document.
2701 Like section titles, LyX and LaTeX make your job easier by automatically
2702 numbering the bibliography items and changing citations when the items'
2706 Go to the end of the document and switch to the
2711 Now, each paragraph you type will be a reference.
2714 The Lyx Tutorial, by the LyX Documentation Team
2716 as your first reference.
2717 Note that LyX automatically puts a number in a box before each reference.
2718 Click on the boxed reference number, and a
2720 Bibliography\SpecialChar ~
2724 You use the first field, the
2728 , to refer to this reference within the LyX document.
2729 By default, it is a number.
2735 \begin_inset Quotes eld
2739 \begin_inset Quotes erd
2742 to make it easy to remember.
2745 Now pick somewhere in your document that you would like to insert a reference.
2751 nsert\SpecialChar \menuseparator
2756 itation\SpecialChar ~
2757 Reference\SpecialChar \@.
2765 The right panel in this dialog lists all the bibliography entries, and
2766 this field allows you to choose which bibliography item you want to cite.
2768 \begin_inset Quotes eld
2772 \begin_inset Quotes erd
2775 (right now, that's the only item in the bibliography), then use the left
2776 arrow in the center to insert it.
2777 (You can have multiple citations in the same place by transferring a number
2778 of keys this way.) Now run LaTeX, and you'll see that the citation appears
2779 in brackets in the text, referring to the bibliography at the end of the
2783 How are the other fields used? The
2796 dialog will put a remark (such as a reference to a page or chapter within
2797 the referenced book or article) in the brackets after the reference.
2798 If you want the references to have labels instead of numbers in the printed
2799 output (for example, some journals would use
2800 \begin_inset Quotes eld
2804 \begin_inset Quotes erd
2807 to refer to a paper written by Smith in 1995), use the
2816 Bibliography\SpecialChar ~
2820 As usual, you can see the
2831 Fix the bibliography and citation in
2839 You may want to put a table of contents at the beginning of your document.
2840 LyX makes this very easy to do.
2845 after your document title and before your first section title and choose
2851 nsert\SpecialChar \menuseparator
2858 C\SpecialChar \menuseparator
2869 \begin_inset Quotes eld
2873 \begin_inset Quotes erd
2876 will appear in a button on the first line of the document.
2880 This may not appear to be very useful.
2881 However, if you look at your
2885 file, you will see that a table of contents has been generated, listing
2886 the various sections and subsections in your document.
2887 As usual, if you reorder sections or create new ones, you will see those
2892 file when you update it.
2896 The table of contents is not printed in the on-screen version of the document,
2897 because you can't edit it anyway.
2898 However, you can display the table of contents in a separate window by
2899 clicking on the table of contents button, or by using
2904 ocument\SpecialChar \menuseparator
2914 The menu command will work even if you don't have a table of contents inset
2916 This is a very useful tool.
2923 window to move around your document.
2924 Clicking on a (sub)section title in the
2930 window will highlight that line and move the cursor (in the LyX editing
2931 window) to that place in the document.
2932 You can also use the arrow keys to move up and down in the table of contents.
2933 You may therefore find it convenient to leave this window open throughout
2935 You can get similar functionality from the
2942 menu, though, where the table of contents appears automatically.
2945 To get rid of the Table of Contents, you can delete the table of contents
2946 button just like any other text.
2953 : Fix the table of contents in
2961 LaTeX is used by many scientists because it outputs great looking equations,
2962 avoiding the control characters used by word processors and their equation
2964 Many of these scientists are frustrated, however, because writing equations
2965 in LaTeX is more like programming than writing.
2966 Happily, LyX has WYSIWYM support for equations.
2967 If you are used to LaTeX, you'll find that all of the usual LaTeX math
2968 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
2969 If, on the other hand, you've never written in LaTeX, then the
2974 will allow you to write professional-looking math quickly and easily
2980 LyX can't check if the math you're writing is actually
2994 Somewhere in your LyX document, type:
2997 I like what Einstein said, E=mc^2, because it's so simple.
3001 Now, that equation doesn't look very good, even in the
3005 file; there's no space between the letters and the equals sign, and you'd
3006 like to write an actual superscript for the
3007 \begin_inset Quotes eld
3011 \begin_inset Quotes erd
3015 That bad typesetting happened because we didn't tell LyX that we were writing
3016 a mathematical expression, so it typeset the equation like regular old
3020 Instead, we create a formula that will get typeset properly.
3021 In order to create a formula, just click the toolbar button with
3022 \begin_inset Formula $\frac{a+b}{c}$
3025 written on it in blue.
3026 LyX will insert a little blue square, which is an empty math formula.
3027 LyX has placed the cursor in the blue square, so just type
3032 The expression is typed in blue, and the blue square disappears as soon
3033 as the formula is not empty.
3038 to leave the equation The purple markers disappear, leaving the cursor
3039 to the right of the expression, and now if you type something, it will
3043 Run LaTeX and look at the
3048 Notice that the expression was typeset nicely, with spaces between the
3049 letters and the equals sign, and a superscript
3050 \begin_inset Quotes eld
3054 \begin_inset Quotes erd
3058 Letters in math mode are assumed to be variables, and come out in italics.
3059 Numbers are just numbers.
3062 This math editor is another example of the WYSIWYM philosophy.
3063 In LaTeX, you write a mathematical expression using text and commands like
3070 ; this can be frustrating, because you can't see what an expression looks
3071 like until you LaTeX the file, and may have to spend time to find missing
3073 \begin_inset Quotes eld
3077 \begin_inset Quotes erd
3081 On the other hand, LyX doesn't attempt to get the expression to look perfect
3082 (WYSIWYG), but it gives you an extremely good idea of what the expression
3084 LaTeX then takes care of the professional typesetting.
3085 99% of the time, you won't have to make any changes to the font sizes or
3086 spacing that LaTeX outputs.
3087 This way (sorry to be so repetitive) you can focus on the
3091 of your mathematical expressions, not their format.
3094 Navigating an Equation
3098 \begin_inset Formula $E=mc^{2}$
3102 \begin_inset Formula $E=1+mc^{2}$
3106 Use the arrow keys to move the cursor into the expression.
3107 Note that when you enter the expression, the purple markers appear to let
3108 you know you're editing math.
3117 to move the cursor past the equals sign, and just type
3118 \begin_inset Quotes eld
3122 \begin_inset Quotes erd
3126 Again, you can use the arrow keys or
3130 to leave the formula\SpecialChar \@.
3134 Other than the special keys described below, typing in math mode is like
3135 editing regular text.
3145 Select text either with the arrow keys or with the mouse.
3151 dit\SpecialChar \menuseparator
3158 works in math mode, as does cutting and pasting.
3159 One thing to be careful of: if you're right outside a formula and you type
3168 ), it will delete the whole expression.
3169 Luckily, you can just use
3176 What if you want to change
3177 \begin_inset Formula $E=mc^{2}$
3181 \begin_inset Formula $E=mc^{2.5}+1$
3184 ? Again, you can use the mouse to click in the right place.
3185 However, you can also use the arrow keys.
3186 If the cursor is just after the
3187 \begin_inset Quotes eld
3191 \begin_inset Quotes erd
3195 \begin_inset Quotes eld
3199 \begin_inset Quotes erd
3206 will move the cursor to the level of the superscript, just before the
3207 \begin_inset Quotes eld
3211 \begin_inset Quotes erd
3216 \begin_inset Quotes eld
3220 \begin_inset Quotes erd
3228 will move the cursor back to the regular level.
3233 from anywhere within the superscript, the cursor will be placed just
3237 the superscript (so that you can then type the
3238 \begin_inset Quotes eld
3242 \begin_inset Quotes erd
3248 Exponents and Indices
3251 An exponent can be entered from the
3256 (see below), but it's actually simpler just to type the caret key,
3257 \begin_inset Quotes eld
3261 \begin_inset Quotes erd
3265 LyX will place another blue rectangle in the superscript, so that whatever
3266 you write next will be superscripted, and in a smaller font size.
3267 Everything you type until you hit a
3275 to exit Mathed entirely) will be in the superscript.
3278 Writing a subscript (index) is just as easy --- start one by typing the
3280 \begin_inset Quotes eld
3284 \begin_inset Quotes eld
3288 You can subscript and superscript both subscripts and superscripts like
3290 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3318 is a convenient way to enter symbols or to perform many complicated Mathed
3320 Many of these functions can be accomplished from the keyboard or the
3325 dit\SpecialChar \menuseparator
3339 \SpecialChar \menuseparator
3348 However, we're going to concentrate on using the
3353 , just to let you know what's out there; you can learn keyboard shortcuts
3354 later, from other manuals.
3362 \SpecialChar \menuseparator
3369 \SpecialChar \menuseparator
3376 now and leave it open while reading this section.
3379 Right-clicking on a formula will open the
3394 which allow you to choose from a large array of symbols used in math: various
3395 arrows, relations, operators, and sums and integrals.
3396 Note that subscripting and superscripting allow you to put lower and upper
3397 limits on sums and integrals.
3402 \begin_inset Quotes eld
3405 Nothing you can do that can't be done\SpecialChar \ldots{}
3407 \begin_inset Formula $\heartsuit$
3411 \begin_inset Quotes erd
3417 Square roots, accents, and delimiters
3420 To type a square root, just click on the button with a square root sign
3422 The square root appears, and the cursor is in a new insertion point inside
3424 You can type variables, numbers, other square roots, fractions, whatever
3426 LyX will automatically resize the square root to fit what's inside.
3429 Accenting a character (
3430 \begin_inset Formula $\overrightarrow{v}$
3433 ) or group of characters (
3434 \begin_inset Formula $\overrightarrow{a+b}$
3437 ) is done the same way.
3442 types are available from the panel.
3443 Click on a decoration, and LyX will insert that decoration with an insertion
3444 point under (or over) it.
3445 Just type what you want in the insertion point.
3446 There are two sets of decorations: those that resize with the text you
3447 type, and those that have fixed size, and are most appropriate for a single
3452 Delimiters such as parentheses, brackets, and braces work similarly, but
3453 are a bit more complicated.
3458 button, which features a blue square surrounded by brackets, to pop up
3464 Your current selection of delimiters is displayed in a box.
3465 It's a pair of parentheses by default, but you can choose a pair of braces,
3466 a brace and a parenthesis, or even choose the empty square to have something
3468 \begin_inset Quotes eld
3472 \begin_inset Formula $a=\left\langle 7\right.$
3476 \begin_inset Quotes erd
3479 (the empty delimiter is displayed as a broken line in LyX, but won't show
3483 If you're lazy, you can type actual parentheses in math mode, rather than
3489 However, those parentheses will be the same size as regular text, which
3490 will look bad if you have a big fraction or matrix inside the parentheses.
3495 window will guarantee that the delimiters are sized based on what's inside
3499 You can also put delimiters or a square root sign or a decoration on already
3501 Select the portion of the formula that you want to adjust, and then click
3502 on the button you want from the
3508 Try using this to change Newton's second law from scalar to vector form
3510 \begin_inset Formula $f=ma$
3514 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3518 Once you've learned about matrices, this is how you'll put parentheses
3519 or brackets around them.
3525 Fractions are very simple in Mathed.
3535 , which shows a fraction with blue squares in the numerator and the denominator.
3536 LyX writes two insertion points in a fraction.
3537 As you would expect, you can use arrow keys or the mouse to move around
3539 Click on the top square and type
3540 \begin_inset Quotes eld
3544 \begin_inset Quotes erd
3553 \begin_inset Quotes eld
3557 \begin_inset Quotes erd
3561 You've made a fraction! Of course you can type anything within each of
3562 the two boxes: variables with exponents, square roots, other fractions,
3578 TeX mode: Limits, log, sin and others
3581 Because letters in math mode are considered to be variables, if you type
3583 \begin_inset Quotes eld
3587 \begin_inset Quotes erd
3590 in math mode, LyX thinks you're typing the product of the three variables
3592 \begin_inset Formula $s$
3596 \begin_inset Formula $i$
3600 \begin_inset Formula $n$
3604 The three letters will be typeset in italics, when what you really wanted
3606 \begin_inset Quotes eld
3610 \begin_inset Quotes erd
3614 In addition, LyX won't put a space between the word
3615 \begin_inset Quotes eld
3619 \begin_inset Quotes erd
3623 \begin_inset Quotes eld
3627 \begin_inset Quotes erd
3634 will just exit math mode).
3636 \begin_inset Quotes eld
3640 \begin_inset Formula $\sin x$
3644 \begin_inset Quotes erd
3648 \begin_inset Quotes eld
3652 \begin_inset Formula $sinx$
3656 \begin_inset Quotes erd
3663 \begin_inset Quotes eld
3667 \begin_inset Quotes erd
3681 \begin_inset Quotes eld
3685 \begin_inset Quotes erd
3688 is written in black, in upright roman type.
3689 The whole word is treated as one symbol, so if you type
3693 , it will delete the whole word.
3695 \begin_inset Quotes eld
3699 \begin_inset Quotes erd
3702 , which will be written in blue italics, like you expect in Mathed.
3707 file, the expression will be correctly typeset.
3711 Other commands you need to type in TeX mode using the
3715 box include other trigonometric functions and their inverses, hyperbolic
3716 functions, logarithms, limits, and quite a few others.
3717 These functions can take subscripts and superscripts, important for typing
3719 \begin_inset Quotes eld
3723 \begin_inset Formula $\cos^{2}\theta$
3727 \begin_inset Quotes erd
3731 \begin_inset Quotes eld
3735 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3739 \begin_inset Quotes erd
3760 \begin_inset LatexCommand \label{sec:matrices}
3774 The dialog has two sliding bars which allow you to choose how many rows
3775 and columns you want in your matrix.
3776 Choose 2 rows and 3 columns and hit
3785 LyX prints 6 insertion points in a
3786 \begin_inset Formula $2\times3$
3790 As usual, you can put any sort of Mathed expression (a square root, another
3791 matrix, etc.) in each insertion point.
3792 You can also leave some of the insertion points empty if you want.
3799 can be used to move horizontally between the columns of a matrix.
3800 Alternatively, you can use the arrow keys to move around - hitting
3804 at the end of one box will move to the next box,
3808 will move to the next row, etc.
3811 If you suddenly need more rows or columns, use
3816 dit\SpecialChar \menuseparator
3821 ath\SpecialChar \menuseparator
3839 They add a row or column just after the current position.
3864 for information on how to change the horizontal alignment of each column,
3865 and how to change the vertical position of the whole matrix.
3866 Note that if you want to write a table containing text, you should use
3867 LyX' wonderful table support, rather than trying to write text in a matrix.
3873 All of the expressions we have written so far have been on the same line
3874 as the text that came before and after them, otherwise known as inline
3876 This is fine for short, simple expressions, but if you want to write larger
3877 ones, or if you want your expressions to stand out from the text, you need
3878 to write them in display mode.
3879 In addition, only displayed expressions can be labeled and numbered (see
3884 ), and multi-line equations (see Sec.
3886 \begin_inset LatexCommand \ref{sec:multiline}
3890 ) must be in display mode.
3902 , which represents a couple lines of text before and after a centered blue
3904 LyX inserts a formula, but the insertion point is on a new line, and it's
3905 centered within that line.
3906 Now type an expression and run LaTeX to see how it looks.
3911 button is actually a toggle; use it now to change a couple of your expressions
3912 to display mode and back.
3916 Display mode has a couple differences from inline mode:
3919 The default font is larger for a few symbols, like
3920 \begin_inset Formula $\sum$
3924 \begin_inset Formula $\int$
3930 Subscripts and superscripts for limits and sums (but not integrals) are
3931 written under rather than next to the symbols
3937 Other than these differences, though, displayed expressions and inline expressio
3938 ns are very similar.
3941 One final note about the way displayed formulae are typeset: be careful
3942 about whether you're putting your equation into a new paragraph or not.
3943 If your formula is in the middle of a sentence or paragraph, then don't
3949 Doing so will cause the text
3953 the formula to start a new paragraph.
3954 That text will therefore be indented, which is probably not what you want.
3961 : Put the various equations in
3965 into display mode, and see how they're typeset differently.
3972 : Using various tools you've learned in this section, you should be able
3973 to write an equation like
3979 After you've done it the hard way, why don't you give
3984 nsert\SpecialChar \menuseparator
3989 \SpecialChar \menuseparator
4001 \begin_inset Formula \[
4002 f(x)=\left\{ \begin{array}{cc}
4005 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4015 Mathed can do plenty more.
4016 By now, you're familiar with the basics, so we'll just refer to the
4023 Labeling and numbering expressions
4026 Multi-line equations
4029 Change typefaces, e.g., to write bold-face text in an expression.
4032 Fine-tune font sizes and spacing within an expression.
4033 (Don't worry about this until your final draft!)
4037 These are very powerful, because you just define them once at the top of
4038 the document, and then you can use them throughout the document.
4039 If you change the macro definition, the references to the macro will be
4040 changed throughout the document.
4041 Macros can even take arguments.
4044 Do lots of other things we didn't have time to mention in this
4054 Other Major LyX Features
4057 We haven't gone through all the possible commands in LyX, and we aren't
4063 for more information.
4064 We'll just mention a couple more major things LyX can do\SpecialChar \ldots{}
4068 LyX has WYSIWYM support for tables.
4074 nsert\SpecialChar \menuseparator
4082 Click on the table with the
4091 dialog box which allows extensive table editing.
4094 LyX also supports including pictures in a number of formats (including JPEG
4095 and other bitmap formats, PostScript® and raw LaTeX) within documents.
4101 nsert\SpecialChar \menuseparator
4109 Then click on the figure to choose the file to include, rotate or scale
4110 it, etc.) Tables and figures can have captions, and LyX will automatically
4111 generate lists of figures and/or tables.
4114 Version control is supported, using RCS (
4121 LyX is heavily configurable.
4122 Everything from how the LyX window looks to how the output comes out can
4123 be configured in a number of ways.
4124 Much configuration is done through
4129 ools\SpecialChar \menuseparator
4137 For more information on this, check out
4142 elp\SpecialChar \menuseparator
4147 ustomization\SpecialChar \@.
4151 LyX is being developed by a team of programmers on five continents.
4152 Therefore, LyX has better support for non-English languages (such as Dutch,
4153 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4154 ) than many word processors.
4155 Even some right-to-left languages like Hebrew or Arabic are supported.
4156 You can write documents in other languages, but you can also configure
4157 LyX to show its menus and error messages in other languages.
4161 The LyX menus feature keybindings.
4162 This means that you can do
4167 ile\SpecialChar \menuseparator
4182 or by using the binding which is shown next to it in the menu (C-O by default).
4183 Keybindings are also configurable.
4184 For information on this, check out
4189 elp\SpecialChar \menuseparator
4194 ustomization\SpecialChar \@.
4198 LyX can read in LaTeX documents.
4199 See Section\SpecialChar ~
4201 \begin_inset LatexCommand \ref{sec:relyx}
4208 Spellchecking and thesaurus facilities are available.
4211 The text box near the bottom of the LyX window is called the minibuffer
4212 (after a similar feature in
4217 This gives you access to all sorts of interesting functionality, including
4218 functionality which could break your document.
4219 In other words, don't type in the minibuffer unless you know what you're
4227 \begin_inset LatexCommand \label{sec:latexusers}
4231 If you don't know anything about LaTeX, you don't have to read this section.
4232 Actually, you might want to
4236 about LaTeX, and then read this chapter.
4237 However, many people who begin to use LyX will be familiar with LaTeX.
4238 If you are such a person, you may be wondering if LyX can really do everything
4240 The short answer is that LyX can do pretty much everything LaTeX can do
4241 in one form or another, and it definitely simplifies most parts of writing
4243 Currently, there may be some annoyance in converting old LaTeX documents
4244 and in a couple other areas, but later releases of LyX will get rid of
4248 Because this is just a tutorial, we are only going to mention things that
4249 new LyX users will most likely be interested in.
4250 In the interests of keeping the
4254 short, we will give only minimal information here.
4259 manual, specifically the
4261 Secrets of the LaTeX Masters
4263 chapter, has a great deal of information on differences between LyX and
4264 LaTeX, and how to do various LaTeX tricks in LyX.
4270 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4271 will be displayed in red on the screen.
4272 You can use TeX commands in LyX by choosing
4277 nsert\SpecialChar \menuseparator
4284 This creates a text box, and everything within it is passed straight to
4288 In a math formula, TeX mode is handled a bit differently.
4289 Enter TeX mode by typing a backslash.
4290 The backslash is not written out, but anything you type afterwards will
4292 You exit TeX mode by typing
4296 or some other non-alphabetic character, like a number, underscore, caret,
4298 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4299 will convert it to WYSIWYM\SpecialChar \@.
4300 So if, in a formula, you type
4306 , then when you type
4310 , LyX will change the red
4311 \begin_inset Quotes eld
4315 \begin_inset Quotes erd
4319 \begin_inset Quotes eld
4323 \begin_inset Formula $\gamma$
4327 \begin_inset Quotes erd
4331 This will work for almost all, non-complicated math macros.
4332 This may be faster than using the
4337 , and will be especially convenient for experienced LaTeX users.
4340 As a special case, if you type a brace in TeX mode, then the beginning
4344 ending braces will be inserted in red, then take you
4348 of TeX mode and place the cursor between the braces.
4349 This makes it more convenient to type commands that LyX doesn't know which
4353 LyX can't do absolutely everything that LaTeX can do (yet?).
4354 Some fancy functions are not supported at all, while some work but aren't
4356 TeX mode allows users to get the full flexibility of LaTeX, while having
4357 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4358 LyX could never support every LaTeX package.
4365 in the preamble (see Section\SpecialChar ~
4367 \begin_inset LatexCommand \ref{sec:preamble}
4371 ), you can use any package you want --- although you won't have WYSIWYM
4372 support for that package's features.
4375 Importing LaTeX Documents---
4381 \begin_inset LatexCommand \label{sec:relyx}
4385 You can import a LaTeX file into LyX by using the
4390 ile\SpecialChar \menuseparator
4395 mport\SpecialChar \menuseparator
4403 This will call a Perl script called
4407 ---which will create a file
4415 ---and then open that file.
4416 If the translation doesn't work, you can try calling
4420 from the command line
4426 When LyX is installed, a separate executable called
4430 will be placed in the same folder as the
4436 /usr/local/bin/reLyX
4443 requires Perl (version 5.002 as of this writing).
4446 , possibly using fancier options.
4453 will translate most legal LaTeX, but not everything.
4454 It will leave things it doesn't understand in TeX mode, so after translating
4459 , you can look for red text and hand-edit it to look right.
4466 has its own manpage.
4467 Read it to find out about which LaTeX commands and environments aren't
4468 supported, bugs (and how to get around them), and how to use the various
4472 Converting LyX Documents to LaTeX
4475 You might wish to convert a LyX Document to a LaTeX file.
4476 For example, a co-worker or co-author who doesn't have LyX might want to
4478 This is very easy to do with LyX.
4484 ile\SpecialChar \menuseparator
4489 xport\SpecialChar \menuseparator
4497 This will create a file
4505 file you are editing.
4506 LyX always creates temporary LaTeX files when viewing or printing files,
4507 so it is very good at generating LaTeX.
4511 \layout Subsubsection
4521 ocument\SpecialChar \menuseparator
4528 dialog takes care of many of the options that you would input in a
4535 Change the class, default font size and paper size here.
4536 Put any extra options to the
4552 \layout Subsubsection
4554 Other Preamble Matter
4558 \begin_inset LatexCommand \label{sec:preamble}
4562 If you have special commands to put in the preamble of a LaTeX file, you
4563 can use them in a LyX document as well.
4569 ocument\SpecialChar \menuseparator
4581 and type in the dialog window (or from the document settings dialog, depending
4583 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4589 LyX has support for BibTeX, which allows you to build databases of bibliographic
4590 al references to be used in multiple documents.
4596 nsert\SpecialChar \menuseparator
4603 C\SpecialChar \menuseparator
4616 Click on the resulting
4617 \begin_inset Quotes eld
4620 BibTeX\SpecialChar ~
4621 Generated\SpecialChar ~
4623 \begin_inset Quotes erd
4626 button, and you will get a
4635 field, type what you would type inside the braces of a
4647 Like in regular LaTeX, multiple bibliographies should be separated by commas,
4656 field, type what you would type inside the braces of a
4665 After you've done this, you can use citations from any bibliographies you're
4671 nsert\SpecialChar \menuseparator
4676 itation\SpecialChar ~
4679 (see Section\SpecialChar ~
4681 \begin_inset LatexCommand \ref{sec:bibliographies}
4686 LyX will take care of running BibTeX.
4691 dialog will show a list of all the references in your
4701 Sometimes when you LaTeX a document, there will be errors, things that LyX
4702 or LaTeX can't understand.
4703 When this happens, LyX will create an error box (a box with the word
4704 \begin_inset Quotes eld
4708 \begin_inset Quotes erd
4712 Clicking on this box will pop up a window showing what the error was.
4713 LyX will just include the error message that LaTeX gave.
4714 Note that the placement of these errors in often not accurate.