1 #LyX 1.4.3svn 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,
50 lyx-docs@lists.lyx.org
60 \begin_layout Standard
61 \begin_inset LatexCommand \tableofcontents{}
76 \begin_layout Standard
77 This file is designed for all of you who have never heard of LaTeX, or don't
79 Now, don't panic - you won't need to learn LaTeX to use LyX.
80 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
82 There are some things you will need to learn, however, in order to use
86 \begin_layout Standard
87 Some of you probably found your way to this document because you tried to
88 put two spaces after a
89 \begin_inset Quotes eld
93 \begin_inset Quotes erd
96 or tried to put 3 blank lines between paragraphs.
97 After much frustration, you found you couldn't.
98 In fact, you'll find that most of the little tricks you're accustomed to
99 using in other word processors just won't work in LyX.
100 That's because most word processors you've used before allow you to manually
101 enter all spacings, font changes, and so on.
102 So you end up not only writing a document but typesetting it, too.
103 LyX does the typesetting for you, in a consistent fashion, letting you
104 focus on the important things, like the content of your writing.
107 \begin_layout Standard
108 So, bear with us and read on.
109 Reading this tutorial is definitely worth the time.
112 \begin_layout Section
122 \begin_layout Standard
123 Before we get started with this section, we want to make a quick note of
129 uses the notation outlined in the
134 If you came to this manual first, go read the
142 \begin_layout Standard
143 Now that you know which fonts mean what, we want to talk a bit about what
151 \begin_layout Subsection
152 Getting the Most out of the Tutorial
155 \begin_layout Standard
156 This tutorial consists of examples and exercises.
157 To get the most out of this document, you should read through the document,
158 typing all the silly little things we're telling you to type and trying
159 out all of the exercises to see if you get them right.
160 For convenience, you might want to print out the PostScript® version of
164 \begin_layout Standard
165 If you are familiar with LaTeX, you'll probably be able to read the
169 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
170 However, LyX does have idiosyncrasies
174 \begin_layout Standard
175 or, more optimistically,
176 \begin_inset Quotes eld
180 \begin_inset Quotes erd
188 you'll want to learn about.
189 Even if you don't feel like reading the rest of the
193 , you should definitely check out Section\InsetSpace ~
195 \begin_inset LatexCommand \ref{sec:latexusers}
199 , which is specifically written for experienced LaTeX users.
202 \begin_layout Subsection
210 \begin_layout Itemize
211 Detailed explanations of all of LyX's features.
215 \begin_layout Standard
223 \begin_layout Standard
224 Seriously, though, we're here to get you up and running so that all you
230 If we tried to duplicate all of the information about all of LyX's features
235 would be redundant, too long, and forever out of date.
236 All we do here is introduce things; imagine there is a
237 \begin_inset Quotes eld
245 \begin_inset Quotes erd
248 at the end of every section.
252 \begin_layout Itemize
253 Detailed explanations of LaTeX.
257 \begin_layout Standard
259 If you're really curious about learning some of the neat tricks you can
260 do with LaTeX, you can always go get a LaTeX book.
261 There are several good ones on the market.
262 No need to reinvent the wheel, after all\SpecialChar \ldots{}
267 \begin_layout Standard
268 So, brave soul, it's time to move onwards.
269 Time for your first document \SpecialChar \ldots{}
273 \begin_layout Chapter
274 Getting Started with LyX
277 \begin_layout Section
278 Your First LyX Document
281 \begin_layout Standard
282 \begin_inset LatexCommand \label{sec:first-doc-ex}
287 You're ready to start writing.
288 Before you do, though, there are a few things we need to mention, which
289 will hopefully make the
293 more instructive, useful, and fun.
297 \begin_layout Standard
298 Because there's lots of information that we won't be giving you, the
303 thing that you need to do is find the
308 Luckily, this is very simple.
324 You may want to load the
328 as well (if you're not reading it on screen already).
329 This way, you can read them while you're writing your own file
333 \begin_layout Standard
334 They can also serve as good examples of how to use the many features of
341 Note that once you've got more than one document open, you can use the
349 menu to switch between them.
354 will not cover in detail subjects which are described in the other LyX
356 This may make life a bit harder for you at the beginning, but it will keep
362 It will also get you in the habit of using the other manuals, which ---
363 in the long run --- will save you a lot of time.
366 \begin_layout Standard
371 , we're going to assume that you have a fully working version of LyX, as
376 or some other dvi viewer,
380 or some other way of converting
384 documents to PostScript® documents, and a working printer.
385 This is a lot to assume.
386 If any of this is not true, you (or a friendly system administrator) will
387 need to set up your system.
388 You can find information on setup in other manuals.
391 \begin_layout Standard
392 Finally, we've written a file to let you practice your LyX skills on.
398 Imagine that it was typed by someone who didn't know about any of LyX's
400 As you learn new LyX functions, we'll suggest that you fix those parts
407 \begin_inset Quotes eld
411 \begin_inset Quotes erd
414 hints about how to fix things
418 \begin_layout Standard
419 The hints are located in yellow
420 \begin_inset Quotes eld
424 \begin_inset Quotes erd
428 Access the text in a note by clicking on it.
434 If you want to cheat (or check what you've done), there's also a file called
439 which contains the same text as written and typeset by a LyX master.
442 \begin_layout Standard
443 The example files can be found in the
447 directory, which you can get to by selecting
452 ile\SpecialChar \menuseparator
459 and then clicking on the
467 Open the raw document, and use
472 ile\SpecialChar \menuseparator
480 to save a copy in your own directory for you to work on.
481 As you fix parts of the raw document, check to see how those changes affect
485 \begin_layout Standard
490 directory contains lots of other examples files.
491 They will show you how to do various fancy things with LyX.
492 They are especially useful to display things that (due to length or other
493 reasons) won't fit in the documentation.
498 , or when you're confused about how to do something fancy in LyX, take a
502 \begin_layout Subsection
503 Typing, Viewing, and Printing
506 \begin_layout Itemize
512 ile\SpecialChar \menuseparator
520 \begin_layout Itemize
521 Type a sentence like:
523 This is my first LyX document!
526 \begin_layout Itemize
527 Save your document with
532 ile\SpecialChar \menuseparator
542 \begin_layout Itemize
543 Run LaTeX to create a
552 iew\SpecialChar \menuseparator
560 You may see things being printed in the window you ran the
565 These are messages from LaTeX, which you can ignore for now.
574 viewer), which will pop up a new window displaying what your document will
575 look like when printed.
579 \begin_layout Standard
580 You can save time by leaving
584 running in the background.
590 iew\SpecialChar \menuseparator
595 pdate\SpecialChar \menuseparator
602 and just click on the
606 window (or unminimize it) after LaTeX finishes running.
614 \begin_layout Itemize
620 ile\SpecialChar \menuseparator
633 \begin_layout Standard
634 Congratulations! You've written and printed your first LyX document.
635 All of the rest is just details, which is covered in the rest of the
654 \begin_layout Subsection
658 \begin_layout Standard
659 LyX can of course do most of the things you're used to doing with a word
661 It will word-wrap and indent paragraphs automatically.
662 Here's a quick description of how to do some simple actions.
665 \begin_layout Description
666 Undo LyX has multiple levels of undo, which means you can undo everything
667 you've done since your current editing session started, by selecting
672 dit\SpecialChar \menuseparator
680 If you undo too much, just select
685 dit\SpecialChar \menuseparator
697 \begin_layout Standard
698 Currently, undo is limited to 100 steps.
699 Undo also doesn't work for
703 ; for instance, changes to the document layout.
704 Each of these is really a LyX bug.
708 \begin_layout Description
714 dit\SpecialChar \menuseparator
722 dit\SpecialChar \menuseparator
730 dit\SpecialChar \menuseparator
733 to cut, copy, and paste.
734 Or automatically paste selected text (including selections from other programs)
742 \begin_layout Description
748 dit\SpecialChar \menuseparator
758 In the dialog, search with the
772 button to replace a word you've found
776 \begin_layout Standard
777 Close the window when you're done.
778 Or leave it open if you find it more convenient.
779 Most dialog boxes in LyX --- including the
795 dialogs, as well as the various math dialogs can operate like this.
801 ile\SpecialChar \menuseparator
808 , won't let you type anything in the main LyX window until you actually
810 Just be sure you have the right window focus when you're trying to type
811 in the main LyX window or give a command in some other LyX dialog.
817 If you like, you can specify whether to make the search case-sensitive,
818 or to search for only complete words; you can also search backwards through
822 \begin_layout Description
823 Character\InsetSpace ~
828 text (which will generally put characters in italics), put it in
836 (usually small caps, used for people's names) from the toggle buttons in
842 dit\SpecialChar \menuseparator
853 \begin_layout Description
854 Toolbar There are buttons on the toolbar (just below the menus) which allow
855 you to do some of the more popular functions, such as
866 \begin_layout Standard
867 Of course, you haven't yet written enough to make most of these functions
869 As you write more, though, try undoing, pasting, etc.
872 \begin_layout Subsection
873 WYSIWYM: Whitespace in LyX
876 \begin_layout Standard
877 \begin_inset LatexCommand \label{sec:whitespace}
881 One of the hardest things for new users to get used to is the way that LyX
883 As many times as you hit
887 , you'll only get one blank line.
888 As many times as you hit
892 , you'll only get one space.
893 On a blank line, LyX won't let you type even one space.
898 key won't move you forward one tab stop; in fact there
902 no tab stops! There's no ruler at the top of the page to let you set tabs
906 \begin_layout Standard
907 Many commercial word processors are based on the WYSIWYG principle:
908 \begin_inset Quotes eld
911 What You See Is What You Get.
912 \begin_inset Quotes erd
915 LyX, on the other hand, is based on the principle that
916 \begin_inset Quotes eld
919 What You See Is What You
924 \begin_inset Quotes erd
927 You type what you mean, and LyX will take care of typesetting it for you,
928 so that the output looks nice.
933 grammatically separates paragraphs, and a
937 grammatically separates words, so there is no reason to have several of
942 has no grammatical function at all, so LyX does not support it.
943 Using LyX, you'll spend more of your time worrying about the
947 of your document, and less time worrying about the
956 for more information on the WYSIWYM concept.
959 \begin_layout Standard
960 LyX does have (many) ways to fine-tune the formatting of your document.
961 After all, LyX might not typeset
970 has information about all that.
975 s and vertical space --- which are more powerful and versatile than multiple
976 spaces or blank lines --- and ways to change font sizes, character styles,
977 and paragraph alignments by hand.
978 The idea, though, is that you can write your whole document, focusing on
979 content, and just worry about that fine-tuning at the end.
980 With standard word processors, you'll be distracted by document formatting
981 throughout the writing process.
984 \begin_layout Section
988 \begin_layout Standard
989 Different parts of a document have different purposes; we call these parts
995 Most of a document is made up of regular text.
996 Section (chapter, subsection, etc.) titles let the reader know that a new
997 topic or subtopic will be discussed.
998 Certain types of documents have special environments.
999 A journal article will have an abstract, and a title.
1000 A letter will have neither of these, but will probably have an environment
1001 that gives the writer's address.
1004 \begin_layout Standard
1005 Environments are a major part of the
1006 \begin_inset Quotes eld
1009 What You See Is What You Mean
1010 \begin_inset Quotes erd
1014 A given environment may require a certain font style, font size, indenting,
1015 line spacing, and more.
1016 This problem is aggravated, because the exact formatting for a given environmen
1017 t may change: one journal may use boldface, 18 point, centered type for
1018 section titles while another uses italicized, 15 point, left justified
1019 type; different languages may have different standards for indenting; and
1020 bibliography formats can vary widely.
1021 LyX lets you avoid learning all the different formatting styles.
1024 \begin_layout Standard
1029 box is located on the left end of the toolbar (just under the
1037 It indicates which environment you're currently writing in.
1038 While you were writing your first document, it said
1039 \begin_inset Quotes eld
1043 \begin_inset Quotes erd
1046 which is the default environment for text.
1047 Now you will put a number of environments in your new document so that
1048 you can see how they work.
1049 You'll do so with the
1053 menu, which you open by clicking on the
1054 \begin_inset Quotes eld
1058 \begin_inset Quotes erd
1061 icon just to the right of the
1068 \begin_layout Subsection
1069 Sections and Subsections
1072 \begin_layout Standard
1077 on the first line of your LyX file, and select
1089 \begin_layout Standard
1095 If nothing is selected, LyX changes the paragraph you are currently in
1096 to the selected environment.
1097 Alternatively, you can change several paragraphs to a different environment
1098 by selecting them before picking an environment.
1116 , which will be covered below.
1117 LyX numbers the section
1118 \begin_inset Quotes eld
1122 \begin_inset Quotes erd
1125 and typesets the section heading (title) in a larger font.
1136 \begin_inset Quotes eld
1140 \begin_inset Quotes erd
1144 \begin_inset Quotes eld
1148 \begin_inset Quotes erd
1152 Section headings, like most environments, are assumed to end when you type
1158 Type the document introduction:
1161 \begin_layout LyX-Code
1162 This is an introduction to my first LyX document.
1165 \begin_layout Standard
1180 \begin_inset Quotes eld
1184 \begin_inset Quotes erd
1187 and waits for you to type a title.
1192 , and you'll see that LyX again sets it as a section title.
1195 \begin_layout Standard
1197 Go to the end of Section\InsetSpace ~
1199 \begin_inset Quotes eld
1202 my first LyX document
1203 \begin_inset Quotes erd
1220 \begin_inset Quotes eld
1224 \begin_inset Quotes erd
1227 and waits for you to type a title.
1233 Section\InsetSpace ~
1235 \begin_inset Quotes eld
1239 \begin_inset Quotes erd
1242 , which used to be Section\InsetSpace ~
1243 2, has been automatically renumbered to Section\InsetSpace ~
1245 In true WYSIWYM fashion, you just need to identify the text that makes
1246 up the section titles, and LyX takes care of numbering the sections and
1250 \begin_layout Standard
1259 environment, and type the following five lines:
1262 \begin_layout LyX-Code
1263 Sections and subsections are described below.
1266 \begin_layout LyX-Code
1270 \begin_layout LyX-Code
1271 Sections are bigger than subsections.
1274 \begin_layout LyX-Code
1275 Subsection description
1278 \begin_layout LyX-Code
1279 Subsections are smaller than sections.
1282 \begin_layout Standard
1283 Click on the second line and select
1292 LyX numbers the subsection
1293 \begin_inset Quotes eld
1297 \begin_inset Quotes erd
1300 , and typesets it in a font which is bigger than regular text but smaller
1301 than the section title.
1302 Change the fourth line
1306 environment as well.
1307 As you probably expected, LyX automatically numbered the section
1308 \begin_inset Quotes eld
1312 \begin_inset Quotes erd
1316 If you put yet another section before Section\InsetSpace ~
1317 2, Section\InsetSpace ~
1318 2 will be renumbered
1319 as Section 3, and the subsections will be renumbered to
1320 \begin_inset Quotes eld
1324 \begin_inset Quotes erd
1328 \begin_inset Quotes eld
1332 \begin_inset Quotes erd
1339 \begin_layout Standard
1340 Further levels of sectioning include
1353 We'll let you play with these on your own.
1354 You may notice that paragraph and subparagraph headings are not numbered
1355 by default, and that subparagraphs are indented; see the
1364 headings are actually the highest level of sectioning, above
1368 s, but you're only allowed to use them in certain types (text classes) of
1369 LyX documents (see Section\InsetSpace ~
1371 \begin_inset LatexCommand \ref{sec:textclasses}
1379 \begin_layout Standard
1380 Finally, you may want to have sections or subsections that are not numbered.
1381 There are environments for this as well.
1382 If you change one of your section headings to the
1386 environment (you may have to scroll down in the
1390 menu to find it), LyX will use the same font size for the heading as it
1391 uses for a regular section, but it won't number that section.
1392 There are corresponding
1393 \begin_inset Quotes eld
1397 \begin_inset Quotes erd
1400 heading environments for
1409 Try changing some of your sections or subsections to the starred environments,
1410 and note how the other sections' numbers are updated.
1413 \begin_layout Standard
1418 : Fix the section and subsection headings in
1426 \begin_layout Subsection
1430 \begin_layout Standard
1431 LyX has several different environments for typesetting lists.
1432 The various list environments free you from hitting
1436 a million times when writing an outline, or from renumbering a whole list
1437 when you want to add a point in the middle of the list, and lets you concentrat
1438 e on the list content.
1442 \begin_layout Standard
1443 Yes, we're overemphasizing this point throughout the
1452 the main philosophy of LyX, so please forgive us.
1457 Different types of documents logically require different list environments:
1460 \begin_layout Itemize
1461 A slide presentation might use the
1465 environment's bulleted lists to describe different points.
1469 \begin_layout Itemize
1470 An outline would use the
1474 environment's numbered lists (and lettered sublists).
1478 \begin_layout Itemize
1479 A document describing several software packages could use the
1483 environment, where each item in the list begins with a bold-faced word.
1487 \begin_layout Itemize
1492 environment --- not found in LaTeX --- is a slightly different form of
1500 \begin_layout Standard
1501 Let's write a list of reasons why LyX is better than other word processors.
1502 Somewhere in your document, type:
1505 \begin_layout Standard
1508 Lyx is better than other word processors because:
1511 \begin_layout Standard
1527 \begin_inset Quotes eld
1531 \begin_inset Quotes erd
1534 (actually, an asterisk, which will be converted to a round circle on output)
1536 Type in your reasons:
1539 \begin_layout LyX-Code
1540 Typesetting is done for you.
1543 \begin_layout LyX-Code
1547 \begin_layout LyX-Code
1548 Lists are very easy to create!
1551 \begin_layout Standard
1552 List environments, unlike headings, do not end when you type
1557 Instead, LyX assumes you're going on to the next item in the list.
1558 The above will therefore result in a three-item list.
1559 If you want more than one paragraph within one list
1563 , one way is to use the
1565 Protected\InsetSpace ~
1568 , which you get by typing
1573 In order to get out of the list, you need to reselect the
1577 environment (or just use the keybinding,
1585 \begin_layout Standard
1586 You've got a beautiful itemized list.
1587 You might want to run LaTeX to see how the list looks when printed out.
1588 But what if you wanted to number the reasons? Well, just select the whole
1593 \begin_layout Standard
1594 LyX won't let you select the first bullet unless you also select the paragraph
1599 the list, which you probably don't want to do.
1600 Similarly, you can't select the actual number in a numbered section title.
1601 Don't worry about it.
1615 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1619 \begin_layout Standard
1620 While the list is still selected, you can change to the other two list environme
1629 , in order to see what they look like.
1630 For those two environments, each list item is made up of a term, which
1631 is the item's first word, followed by a definition, which is the rest of
1632 the paragraph (until you hit
1636 .) The term is either typeset in boldface (
1641 \begin_inset Quotes eld
1645 \begin_inset Quotes erd
1652 \begin_layout Standard
1653 But a typesetter's tab, which will change to fit the size of the largest
1654 term, not a pathetic, rigid, unchangeable typewriter
1667 ) from the rest of the paragraph.
1668 If you want to have more than one word in the definition, then separate
1671 Protected\InsetSpace ~
1677 \begin_layout Standard
1682 : Typeset the list in
1687 \begin_layout Standard
1688 You can nest lists within each other in all sorts of interesting ways.
1689 An obvious example would be writing outlines.
1690 Numbered and bulleted lists will have different numbering and bulleting
1691 schemes for sublists.
1696 for details on the different sorts of lists, as well as examples which
1704 \begin_layout Subsection
1705 Other Environments: Verses, Quotations, and More
1708 \begin_layout Standard
1709 There are two environments for setting quotations apart from surrounding
1714 for short quotes and
1723 environment, also used in the
1727 for the long typing examples) is written in a
1731 font; this environment is the only place in LyX where you're allowed to
1732 use multiple spaces to allow code indenting.
1733 You can even write poetry using the
1741 to separate stanzas, and
1745 to separate lines within a stanza.
1750 for more complete descriptions of all of the available LyX environments.
1753 \begin_layout Standard
1758 : Correctly typeset the
1770 \begin_layout Standard
1784 \begin_layout Chapter
1788 \begin_layout Standard
1789 The previous chapter hopefully allowed you to get used to writing in LyX.
1790 It introduced you to the basic editing operations in LyX, as well as the
1791 powerful method of writing with environments.
1792 Most people who use LyX, though, will want to write documents: papers,
1793 articles, books, manuals, or letters.
1794 This chapter is meant to take you from simply writing text with LyX to
1795 writing a complete document.
1796 It will introduce you to text classes, which allow you to write different
1798 It will then describe many of the additions that turn text into a document,
1799 such as titles, footnotes, cross references, bibliographies, and tables
1803 \begin_layout Section
1807 \begin_layout Standard
1808 \begin_inset LatexCommand \label{sec:textclasses}
1812 Different sorts of documents should be typeset differently.
1813 For example, books are generally printed double-sided, while articles are
1815 In addition, many documents contain special environments: letters contain
1816 some environments --- such as the sender's address and the signature ---
1817 which do not make sense in a book or article.
1824 \begin_layout Standard
1825 LaTeX users: this is equivalent to the LaTeX document class
1832 takes care of these large scale differences between different sorts of documents.
1837 , for example, was written in the
1842 Text classes are another major part of the WYSIWYM philosophy; they tell
1843 LyX how to typeset the document, so you don't need to know how.
1846 \begin_layout Standard
1847 Your document is probably being written in the
1855 \begin_layout Standard
1856 That's usually the default text class
1862 Try changing to other text classes (using the
1867 ocument\SpecialChar \menuseparator
1874 dialog) to see how they are typeset differently.
1875 If you change your document to the
1879 text class and look at the
1883 menu, you'll see that most of the allowed environments are the same.
1884 However, you can now use the
1889 If you're ever unsure about which environments you can use in a given text
1890 class, just consult the
1897 \begin_layout Standard
1898 Font sizes, one- or two-column printing, and page headings are just some
1899 of the ways journals' typesettings differ from one another.
1900 As the Computer Age continues to mature, journals have begun accepting
1901 electronic submissions, creating LaTeX
1902 \begin_inset Quotes eld
1906 \begin_inset Quotes erd
1909 so that authors can submit correctly typeset articles.
1910 LyX is set up to support this as well.
1911 For example, LyX supports typesetting (and extra environments) for the
1912 American Mathematics Society journals using the
1914 Article\InsetSpace ~
1920 \begin_layout Standard
1921 Here's a very quick reference to some of the text classes.
1924 Special Document Classes
1930 manual for many more details.
1933 \begin_layout Standard
1935 \begin_inset Tabular
1936 <lyxtabular version="3" rows="7" columns="2">
1938 <column alignment="center" valignment="top" leftline="true" width="0pt">
1939 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
1940 <row topline="true" bottomline="true">
1941 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1944 \begin_layout Standard
1950 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1953 \begin_layout Standard
1960 <row topline="true">
1961 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1964 \begin_layout Standard
1970 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1973 \begin_layout Standard
1974 one-sided, no chapters
1980 <row topline="true">
1981 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1984 \begin_layout Standard
1990 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1993 \begin_layout Standard
1994 layout & environments for American Math Society
2000 <row topline="true">
2001 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2004 \begin_layout Standard
2010 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2013 \begin_layout Standard
2014 longer than article, two-sided
2020 <row topline="true" bottomline="true">
2021 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2024 \begin_layout Standard
2030 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2033 \begin_layout Standard
2034 report + front and back matter
2040 <row bottomline="true">
2041 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2044 \begin_layout Standard
2050 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2053 \begin_layout Standard
2054 transparencies (also including FoilTeX)
2060 <row bottomline="true">
2061 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2064 \begin_layout Standard
2070 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2073 \begin_layout Standard
2074 lots of extra environments for address, signature\SpecialChar \ldots{}
2088 \begin_layout Section
2089 Templates: Writing a Letter
2092 \begin_layout Standard
2093 One of the most popular text classes is
2098 One way to write a letter would be to open a new
2111 ocument\SpecialChar \menuseparator
2119 While this is the most obvious way to write a letter, it seems like extra
2121 Every time you write a business letter, you want to have your address,
2122 the address you're sending to, a body, a signature, etc.
2127 for letters, which contains a sample letter; once you have a template,
2128 you can just replace a couple parts of the letter with your text each time
2132 \begin_layout Standard
2133 Open a new file with
2138 ile\SpecialChar \menuseparator
2153 Save and print the file to see how the various environments are typeset.
2156 \begin_layout Standard
2157 When you look at the
2161 menu, you'll see several environments, like the
2166 environment, which don't even exist in most other text classes.
2176 You can play around for a while to figure out how the various environments
2178 You'll notice for example that the
2182 environment has the word
2183 \begin_inset Quotes eld
2187 \begin_inset Quotes eld
2190 in red before the actual text of the signature.
2191 This word doesn't show up in the actual letter, as you'll see if you try
2193 It's just there to let you know where the signature goes.
2194 Also, note that it doesn't matter where in the file the
2199 Remember, LyX is WYSIWYM; you can put the
2203 environment anywhere you want, but LyX knows that in the printout, the
2204 signature should be at the end.
2207 \begin_layout Standard
2208 A template is just a regular LyX file.
2209 This means you can fill in your address and signature and save the file
2211 From now on, any time you want to write a letter, you can use the new template
2213 We probably don't have to suggest an actual
2214 \begin_inset Quotes eld
2218 \begin_inset Quotes erd
2221 here; just write a letter to someone!
2225 \begin_layout Standard
2226 One warning, if you're writing from a template.
2227 If you erase all of the text in an environment --- for example, if you
2233 field so that you can replace it with your own --- and then you move the
2234 cursor without writing any text, the environment may disappear.
2235 This is because most environments cannot exist without any text in them.
2236 Just reselect the environment from the
2240 menu to get it back.
2248 \begin_layout Standard
2249 Templates can be a huge time-saver, and we urge you to use them whenever
2251 In addition, they can help a person learn how to use some of the fancier
2253 Finally, they may be useful for a person who is configuring LyX for a bunch
2254 of less computer-aware users.
2255 When they're first learning LyX, it will be much less intimidating if they
2256 have a letter template customized for their company, for example.
2259 \begin_layout Section
2263 \begin_layout Standard
2264 LyX (like LaTeX) considers the title --- which may contain the actual title,
2265 the author, the date, and even an abstract of a paper --- to be a separate
2266 part of the document.
2269 \begin_layout Standard
2274 document and make sure it's using the
2282 \begin_layout Standard
2283 You should not be using the letter any more, since the
2287 textclass doesn't allow titles.
2292 Type a title on the first line, and change the line to the
2297 On the next line, type your name and change it to the
2302 On the next line, write the date in the
2307 Type a paragraph or two summarizing your document using the
2312 Notice how the title is presented when it's printed out.
2313 If you changed the document format to Book, you'll get a separate title
2314 page, like the first page of this tutorial.
2317 \begin_layout Standard
2322 : Fix the title, date, and author in
2327 \begin_layout Section
2328 Labels and Cross-References
2331 \begin_layout Standard
2332 \begin_inset LatexCommand \label{sec:labels}
2336 You can label a section (or subsubsection, or, more rarely, just a random
2337 piece of text) in your document.
2338 Once you do so, you can refer to this section in other parts of the document,
2339 using cross-references.
2340 You can refer either to the section's number, or to the page that the section
2342 As with sections and footnotes, LyX worries about the cross-references
2344 Automatic labels and cross-references are one of the best advantages of
2345 LyX (and LaTeX) over conventional word processors.
2348 \begin_layout Subsection*
2352 \begin_layout Standard
2353 Let's mark our second section, whose title is
2354 \begin_inset Quotes eld
2358 \begin_inset Quotes erd
2362 Click at the end of the section title line, and select
2367 nsert\SpecialChar \menuseparator
2375 A dialog asks you for a label name, and gives you a suggestion.
2380 , the label name will be placed in a box next to the section title.
2383 \begin_layout Standard
2384 By the way, you could have put the label right anywhere within the section
2385 as well; section references will refer to the last section or subsection
2386 whose heading comes before the label.
2387 However, putting it on the same line as the section title (or, perhaps,
2388 on the first line of the section's text) ensures that page references will
2389 reference the beginning of the section.
2392 \begin_layout Standard
2393 So far you haven't done anything --- the
2397 file will look exactly the same, since labels don't show up in the printed
2399 However, now that you've added a label, you can refer to that label with
2404 \begin_layout Subsection*
2405 Your first cross-references
2408 \begin_layout Standard
2409 Place the cursor somewhere in Section\InsetSpace ~
2414 \begin_layout LyX-Code
2415 If you want to know more about this document, then see
2421 \begin_layout Standard
2422 Now --- with the cursor after the word
2423 \begin_inset Quotes eld
2427 \begin_inset Quotes erd
2439 nsert\SpecialChar \menuseparator
2453 It shows a list of the possible labels you can reference.
2454 At the moment, there should be only one,
2455 \begin_inset Quotes eld
2459 \begin_inset Quotes erd
2463 Select it (it may be selected by default), and click
2468 Now put the cursor after the word
2469 \begin_inset Quotes eld
2473 \begin_inset Quotes erd
2476 , and change the reference type to use the page number then click
2481 (To be really correct, you should put a
2483 Protected\InsetSpace ~
2487 \begin_inset Quotes eld
2491 \begin_inset Quotes erd
2495 Same for the page reference.)
2498 \begin_layout Standard
2499 LyX puts the references in a box right where the cursor was.
2500 In the printed document, this reference marker will be replaced with either
2501 the page or section number (depending on what you selected in the
2511 iew\SpecialChar \menuseparator
2516 pdate\SpecialChar \menuseparator
2523 , and you'll see that on the last page we refer to
2524 \begin_inset Quotes eld
2527 Section\InsetSpace ~
2529 \begin_inset Quotes erd
2533 \begin_inset Quotes eld
2538 \begin_inset Quotes erd
2541 (or whatever page Section\InsetSpace ~
2545 \begin_layout Standard
2546 Conveniently, a cross-reference acts a hyperlink when you're editing a document
2547 in LyX; clicking on it will pop up the
2557 will move the cursor to the referenced label.
2560 \begin_layout Subsection*
2561 More fun with labels
2564 \begin_layout Standard
2565 We told you that LyX worries about numbering cross-references; now you can
2567 Add a new section before Section\InsetSpace ~
2569 Now rerun LaTeX, and --- voilà ! --- the section cross reference changed
2571 \begin_inset Quotes eld
2575 \begin_inset Quotes erd
2579 \begin_inset Quotes eld
2583 \begin_inset Quotes erd
2586 to a subsection, and the cross-reference will reference Subsection\InsetSpace ~
2588 of Section\InsetSpace ~
2590 The page reference won't change unless you add a whole page of text before
2591 the label, of course.
2595 \begin_layout Standard
2596 If you want some more practice with labels, then try putting a new label
2597 where your first cross-reference was, and refer to that label from elsewhere
2599 If you'll be inserting cross-references often (if, for example, you're
2600 writing a journal article), it may be convenient to leave the
2607 \begin_layout Standard
2608 If you want to make sure that the cross-referencing gets the pages right
2609 even for larger documents,
2613 a couple pages of text from the
2617 to the clipboard, and
2621 the stolen text into your document
2625 \begin_layout Standard
2626 By the way, copying a chapter title may cause an error, because chapters
2627 aren't allowed in the article class.
2628 If this happens, just delete the chapter title.
2629 If you want to know why this happens, see Section\InsetSpace ~
2631 \begin_inset LatexCommand \ref{sec:textclasses}
2644 \begin_layout Standard
2649 : Fix the references in
2654 \begin_layout Section
2655 Footnotes and Margin Notes
2658 \begin_layout Standard
2659 Footnotes can be added using the
2664 button in the toolbar
2668 \begin_layout Standard
2669 The button shows an arrow pointing to red text, which is just below some
2680 nsert\SpecialChar \menuseparator
2688 Click at the end of the word
2689 \begin_inset Quotes eld
2693 \begin_inset Quotes erd
2696 somewhere in your document and hit the
2702 A footnote box appears where you can enter the text of the footnote.
2703 LyX should place the cursor at the beginning of the footnote box.
2707 \begin_layout LyX-Code
2708 LyX is a typesetting word processor.
2711 \begin_layout Standard
2712 Now click on the button labelled
2713 \begin_inset Quotes eld
2717 \begin_inset Quotes erd
2720 The footnote box disappears, leaving the button showing where the footnote
2721 marker will be in the printed text; this is called
2722 \begin_inset Quotes eld
2726 \begin_inset Quotes erd
2730 You can unfold the footnote at any time --- and re-edit its text, if you
2731 want --- by clicking again on the
2732 \begin_inset Quotes eld
2736 \begin_inset Quotes erd
2742 \begin_layout Standard
2743 You may wonder why the footnote button is a word instead of a number.
2744 The answer is that LyX worries about the footnote numbering for you in
2746 You can see this yourself by looking at the
2751 If you add other footnotes, LyX will renumber the footnotes.
2752 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2753 there's really no need to put the numbers in the LyX file.
2756 \begin_layout Standard
2757 A footnote can be cut and pasted like normal text.
2758 Go ahead; try it! All you need to do is select the footnote button
2762 \begin_layout Standard
2763 It may be easier to select it using the keyboard.
2764 You might accidentally open the footnote if you're trying to select the
2765 marker itself with the mouse.
2779 In addition, you can change regular text to a footnote, by selecting it
2785 button; change a footnote to regular text by hitting the
2789 key when the cursor is in the first position of a footnote, or by hitting
2794 key when the cursor is in the very last position of the footnote, respectively.
2797 \begin_layout Standard
2798 Margin notes can be added using the toolbar button (the button shows an
2799 arrow pointing to red text next to (i.e., in the margin of) black text, and
2800 should be next to the
2805 button in the toolbar.) or
2810 nsert\SpecialChar \menuseparator
2815 arginal\InsetSpace ~
2819 Margin notes are like footnotes, except that:
2822 \begin_layout Itemize
2823 the on-screen boxes say
2824 \begin_inset Quotes eld
2828 \begin_inset Quotes erd
2832 \begin_inset Quotes eld
2836 \begin_inset Quotes erd
2842 \begin_layout Itemize
2843 the notes will be placed in the margin, instead of below the text
2846 \begin_layout Itemize
2847 margin notes are not numbered
2850 \begin_layout Standard
2851 Change your LyX footnote back to text, then select and change it to a margin
2853 Run LaTeX again to see what the margin note looks like.
2856 \begin_layout Standard
2861 : Fix the footnote in
2866 \begin_layout Section
2870 \begin_layout Standard
2871 \begin_inset LatexCommand \label{sec:bibliographies}
2875 Bibliographies (at least in the exact sciences) are similar to cross references.
2876 The bibliography contains a list of references at the end of the document,
2877 and they can be referenced from within the document.
2878 Like section titles, LyX and LaTeX make your job easier by automatically
2879 numbering the bibliography items and changing citations when the items'
2883 \begin_layout Standard
2884 Go to the end of the document and switch to the
2889 Now, each paragraph you type will be a reference.
2892 The Lyx Tutorial, by the LyX Documentation Team
2894 as your first reference.
2895 Note that LyX automatically puts a number in a box before each reference.
2896 Click on the boxed reference number, and a
2898 Bibliography\InsetSpace ~
2902 You use the first field, the
2906 , to refer to this reference within the LyX document.
2907 By default, it is a number.
2913 \begin_inset Quotes eld
2917 \begin_inset Quotes erd
2920 to make it easy to remember.
2923 \begin_layout Standard
2924 Now pick somewhere in your document that you would like to insert a reference.
2930 nsert\SpecialChar \menuseparator
2943 The right panel in this dialog lists all the bibliography entries, and
2944 this field allows you to choose which bibliography item you want to cite.
2946 \begin_inset Quotes eld
2950 \begin_inset Quotes erd
2953 (right now, that's the only item in the bibliography), then use the left
2954 arrow in the center to insert it.
2955 (You can have multiple citations in the same place by transferring a number
2956 of keys this way.) Now run LaTeX, and you'll see that the citation appears
2957 in brackets in the text, referring to the bibliography at the end of the
2961 \begin_layout Standard
2962 How are the other fields used? The
2974 dialog will put a remark (such as a reference to a page or chapter within
2975 the referenced book or article) in the brackets after the reference.
2976 If you want the references to have labels instead of numbers in the printed
2977 output (for example, some journals would use
2978 \begin_inset Quotes eld
2982 \begin_inset Quotes erd
2985 to refer to a paper written by Smith in 1995), use the
2994 Bibliography\InsetSpace ~
2999 As usual, you can see the
3006 \begin_layout Standard
3011 Fix the bibliography and citation in
3016 \begin_layout Section
3020 \begin_layout Standard
3021 You may want to put a table of contents at the beginning of your document.
3022 LyX makes this very easy to do.
3027 after your document title and before your first section title and choose
3033 nsert\SpecialChar \menuseparator
3040 C\SpecialChar \menuseparator
3051 \begin_inset Quotes eld
3055 \begin_inset Quotes erd
3058 will appear in a button on the first line of the document.
3062 \begin_layout Standard
3063 This may not appear to be very useful.
3064 However, if you look at your
3068 file, you will see that a table of contents has been generated, listing
3069 the various sections and subsections in your document.
3070 As usual, if you reorder sections or create new ones, you will see those
3075 file when you update it.
3079 \begin_layout Standard
3080 The table of contents is not printed in the on-screen version of the document,
3081 because you can't edit it anyway.
3082 However, you can display the table of contents in a separate window by
3083 clicking on the table of contents button, or by using
3088 ocument\SpecialChar \menuseparator
3098 The menu command will work even if you don't have a table of contents inset
3100 This is a very useful tool.
3107 window to move around your document.
3108 Clicking on a (sub)section title in the
3114 window will highlight that line and move the cursor (in the LyX editing
3115 window) to that place in the document.
3116 You can also use the arrow keys to move up and down in the table of contents.
3117 You may therefore find it convenient to leave this window open throughout
3119 You can get similar functionality from the
3126 menu, though, where the table of contents appears automatically.
3129 \begin_layout Standard
3130 To get rid of the Table of Contents, you can delete the table of contents
3131 button just like any other text.
3134 \begin_layout Standard
3139 : Fix the table of contents in
3144 \begin_layout Chapter
3148 \begin_layout Standard
3149 LaTeX is used by many scientists because it outputs great looking equations,
3150 avoiding the control characters used by word processors and their equation
3152 Many of these scientists are frustrated, however, because writing equations
3153 in LaTeX is more like programming than writing.
3154 Happily, LyX has WYSIWYM support for equations.
3155 If you are used to LaTeX, you'll find that all of the usual LaTeX math
3156 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3157 If, on the other hand, you've never written in LaTeX, then the
3162 will allow you to write professional-looking math quickly and easily
3166 \begin_layout Standard
3167 LyX can't check if the math you're writing is actually
3180 \begin_layout Section
3184 \begin_layout Standard
3185 Somewhere in your LyX document, type:
3188 \begin_layout LyX-Code
3189 I like what Einstein said, E=mc^2, because it's so simple.
3193 \begin_layout Standard
3194 Now, that equation doesn't look very good, even in the
3198 file; there's no space between the letters and the equals sign, and you'd
3199 like to write an actual superscript for the
3200 \begin_inset Quotes eld
3204 \begin_inset Quotes erd
3208 That bad typesetting happened because we didn't tell LyX that we were writing
3209 a mathematical expression, so it typeset the equation like regular old
3213 \begin_layout Standard
3214 Instead, we create a formula that will get typeset properly.
3215 In order to create a formula, just click the toolbar button with
3216 \begin_inset Formula $\frac{a+b}{c}$
3219 written on it in blue.
3220 LyX will insert a little blue square, which is an empty math formula.
3221 LyX has placed the cursor in the blue square, so just type
3226 The expression is typed in blue, and the blue square disappears as soon
3227 as the formula is not empty.
3232 to leave the equation The purple markers disappear, leaving the cursor
3233 to the right of the expression, and now if you type something, it will
3237 \begin_layout Standard
3238 Run LaTeX and look at the
3243 Notice that the expression was typeset nicely, with spaces between the
3244 letters and the equals sign, and a superscript
3245 \begin_inset Quotes eld
3249 \begin_inset Quotes erd
3253 Letters in math mode are assumed to be variables, and come out in italics.
3254 Numbers are just numbers.
3257 \begin_layout Standard
3258 This math editor is another example of the WYSIWYM philosophy.
3259 In LaTeX, you write a mathematical expression using text and commands like
3266 ; this can be frustrating, because you can't see what an expression looks
3267 like until you LaTeX the file, and may have to spend time to find missing
3269 \begin_inset Quotes eld
3273 \begin_inset Quotes erd
3277 On the other hand, LyX doesn't attempt to get the expression to look perfect
3278 (WYSIWYG), but it gives you an extremely good idea of what the expression
3280 LaTeX then takes care of the professional typesetting.
3281 99% of the time, you won't have to make any changes to the font sizes or
3282 spacing that LaTeX outputs.
3283 This way (sorry to be so repetitive) you can focus on the
3287 of your mathematical expressions, not their format.
3290 \begin_layout Section
3291 Navigating an Equation
3294 \begin_layout Standard
3296 \begin_inset Formula $E=mc^{2}$
3300 \begin_inset Formula $E=1+mc^{2}$
3304 Use the arrow keys to move the cursor into the expression.
3305 Note that when you enter the expression, the purple markers appear to let
3306 you know you're editing math.
3315 to move the cursor past the equals sign, and just type
3316 \begin_inset Quotes eld
3320 \begin_inset Quotes erd
3324 Again, you can use the arrow keys or
3328 to leave the formula\SpecialChar \@.
3332 \begin_layout Standard
3333 Other than the special keys described below, typing in math mode is like
3334 editing regular text.
3344 Select text either with the arrow keys or with the mouse.
3350 dit\SpecialChar \menuseparator
3357 works in math mode, as does cutting and pasting.
3358 One thing to be careful of: if you're right outside a formula and you type
3367 ), it will delete the whole expression.
3368 Luckily, you can just use
3375 \begin_layout Standard
3376 What if you want to change
3377 \begin_inset Formula $E=mc^{2}$
3381 \begin_inset Formula $E=mc^{2.5}+1$
3384 ? Again, you can use the mouse to click in the right place.
3385 However, you can also use the arrow keys.
3386 If the cursor is just after the
3387 \begin_inset Quotes eld
3391 \begin_inset Quotes erd
3395 \begin_inset Quotes eld
3399 \begin_inset Quotes erd
3406 will move the cursor to the level of the superscript, just before the
3407 \begin_inset Quotes eld
3411 \begin_inset Quotes erd
3416 \begin_inset Quotes eld
3420 \begin_inset Quotes erd
3428 will move the cursor back to the regular level.
3433 from anywhere within the superscript, the cursor will be placed just
3437 the superscript (so that you can then type the
3438 \begin_inset Quotes eld
3442 \begin_inset Quotes erd
3448 \begin_layout Section
3449 Exponents and Indices
3452 \begin_layout Standard
3453 An exponent can be entered from the
3458 (see below), but it's actually simpler just to type the caret key,
3459 \begin_inset Quotes eld
3463 \begin_inset Quotes erd
3467 LyX will place another blue rectangle in the superscript, so that whatever
3468 you write next will be superscripted, and in a smaller font size.
3469 Everything you type until you hit a
3477 to exit Mathed entirely) will be in the superscript.
3480 \begin_layout Standard
3481 Writing a subscript (index) is just as easy --- start one by typing the
3483 \begin_inset Quotes eld
3487 \begin_inset Quotes eld
3491 You can subscript and superscript both subscripts and superscripts like
3493 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3500 \begin_layout Standard
3512 \begin_layout Section
3518 \begin_layout Standard
3524 is a convenient way to enter symbols or to perform many complicated Mathed
3526 Many of these functions can be accomplished from the keyboard or the
3531 dit\SpecialChar \menuseparator
3545 \SpecialChar \menuseparator
3554 However, we're going to concentrate on using the
3559 , just to let you know what's out there; you can learn keyboard shortcuts
3560 later, from other manuals.
3568 \SpecialChar \menuseparator
3575 \SpecialChar \menuseparator
3582 now and leave it open while reading this section.
3585 \begin_layout Standard
3586 Right-clicking on a formula will open the
3593 \begin_layout Subsection
3597 \begin_layout Standard
3603 which allow you to choose from a large array of symbols used in math: various
3604 arrows, relations, operators, and sums and integrals.
3605 Note that subscripting and superscripting allow you to put lower and upper
3606 limits on sums and integrals.
3610 \begin_layout Standard
3611 \begin_inset Quotes eld
3614 Nothing you can do that can't be done\SpecialChar \ldots{}
3616 \begin_inset Formula $\heartsuit$
3620 \begin_inset Quotes erd
3626 \begin_layout Subsection
3627 Square roots, accents, and delimiters
3630 \begin_layout Standard
3631 To type a square root, just click on the button with a square root sign
3633 The square root appears, and the cursor is in a new insertion point inside
3635 You can type variables, numbers, other square roots, fractions, whatever
3637 LyX will automatically resize the square root to fit what's inside.
3640 \begin_layout Standard
3641 Accenting a character (
3642 \begin_inset Formula $\overrightarrow{v}$
3645 ) or group of characters (
3646 \begin_inset Formula $\overrightarrow{a+b}$
3649 ) is done the same way.
3654 types are available from the panel.
3655 Click on a decoration, and LyX will insert that decoration with an insertion
3656 point under (or over) it.
3657 Just type what you want in the insertion point.
3658 There are two sets of decorations: those that resize with the text you
3659 type, and those that have fixed size, and are most appropriate for a single
3664 \begin_layout Standard
3665 Delimiters such as parentheses, brackets, and braces work similarly, but
3666 are a bit more complicated.
3671 button, which features a blue square surrounded by brackets, to pop up
3677 Your current selection of delimiters is displayed in a box.
3678 It's a pair of parentheses by default, but you can choose a pair of braces,
3679 a brace and a parenthesis, or even choose the empty square to have something
3681 \begin_inset Quotes eld
3685 \begin_inset Formula $a=\left\langle 7\right.$
3689 \begin_inset Quotes erd
3692 (the empty delimiter is displayed as a broken line in LyX, but won't show
3696 \begin_layout Standard
3697 If you're lazy, you can type actual parentheses in math mode, rather than
3703 However, those parentheses will be the same size as regular text, which
3704 will look bad if you have a big fraction or matrix inside the parentheses.
3709 window will guarantee that the delimiters are sized based on what's inside
3713 \begin_layout Standard
3714 You can also put delimiters or a square root sign or a decoration on already
3716 Select the portion of the formula that you want to adjust, and then click
3717 on the button you want from the
3723 Try using this to change Newton's second law from scalar to vector form
3725 \begin_inset Formula $f=ma$
3729 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3733 Once you've learned about matrices, this is how you'll put parentheses
3734 or brackets around them.
3737 \begin_layout Subsection
3741 \begin_layout Standard
3742 Fractions are very simple in Mathed.
3752 , which shows a fraction with blue squares in the numerator and the denominator.
3753 LyX writes two insertion points in a fraction.
3754 As you would expect, you can use arrow keys or the mouse to move around
3756 Click on the top square and type
3757 \begin_inset Quotes eld
3761 \begin_inset Quotes erd
3770 \begin_inset Quotes eld
3774 \begin_inset Quotes erd
3778 You've made a fraction! Of course you can type anything within each of
3779 the two boxes: variables with exponents, square roots, other fractions,
3784 \begin_layout Standard
3796 \begin_layout Subsection
3797 TeX mode: Limits, log, sin and others
3800 \begin_layout Standard
3801 Because letters in math mode are considered to be variables, if you type
3803 \begin_inset Quotes eld
3807 \begin_inset Quotes erd
3810 in math mode, LyX thinks you're typing the product of the three variables
3812 \begin_inset Formula $s$
3816 \begin_inset Formula $i$
3820 \begin_inset Formula $n$
3824 The three letters will be typeset in italics, when what you really wanted
3826 \begin_inset Quotes eld
3830 \begin_inset Quotes erd
3834 In addition, LyX won't put a space between the word
3835 \begin_inset Quotes eld
3839 \begin_inset Quotes erd
3843 \begin_inset Quotes eld
3847 \begin_inset Quotes erd
3854 will just exit math mode).
3856 \begin_inset Quotes eld
3860 \begin_inset Formula $\sin x$
3864 \begin_inset Quotes erd
3868 \begin_inset Quotes eld
3872 \begin_inset Formula $sinx$
3876 \begin_inset Quotes erd
3882 \begin_layout Standard
3884 \begin_inset Quotes eld
3888 \begin_inset Quotes erd
3902 \begin_inset Quotes eld
3906 \begin_inset Quotes erd
3909 is written in black, in upright roman type.
3910 The whole word is treated as one symbol, so if you type
3914 , it will delete the whole word.
3916 \begin_inset Quotes eld
3920 \begin_inset Quotes erd
3923 , which will be written in blue italics, like you expect in Mathed.
3928 file, the expression will be correctly typeset.
3932 \begin_layout Standard
3933 Other commands you need to type in TeX mode using the
3937 box include other trigonometric functions and their inverses, hyperbolic
3938 functions, logarithms, limits, and quite a few others.
3939 These functions can take subscripts and superscripts, important for typing
3941 \begin_inset Quotes eld
3945 \begin_inset Formula $\cos^{2}\theta$
3949 \begin_inset Quotes erd
3953 \begin_inset Quotes eld
3957 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3961 \begin_inset Quotes erd
3967 \begin_layout Standard
3979 \begin_layout Subsection
3983 \begin_layout Standard
3984 \begin_inset LatexCommand \label{sec:matrices}
3998 The dialog has two sliding bars which allow you to choose how many rows
3999 and columns you want in your matrix.
4000 Choose 2 rows and 3 columns and hit
4009 LyX prints 6 insertion points in a
4010 \begin_inset Formula $2\times3$
4014 As usual, you can put any sort of Mathed expression (a square root, another
4015 matrix, etc.) in each insertion point.
4016 You can also leave some of the insertion points empty if you want.
4019 \begin_layout Standard
4024 can be used to move horizontally between the columns of a matrix.
4025 Alternatively, you can use the arrow keys to move around - hitting
4029 at the end of one box will move to the next box,
4033 will move to the next row, etc.
4036 \begin_layout Standard
4037 If you suddenly need more rows or columns, use
4042 dit\SpecialChar \menuseparator
4047 ath\SpecialChar \menuseparator
4065 They add a row or column just after the current position.
4086 \begin_layout Standard
4091 for information on how to change the horizontal alignment of each column,
4092 and how to change the vertical position of the whole matrix.
4093 Note that if you want to write a table containing text, you should use
4094 LyX' wonderful table support, rather than trying to write text in a matrix.
4097 \begin_layout Subsection
4101 \begin_layout Standard
4102 All of the expressions we have written so far have been on the same line
4103 as the text that came before and after them, otherwise known as inline
4105 This is fine for short, simple expressions, but if you want to write larger
4106 ones, or if you want your expressions to stand out from the text, you need
4107 to write them in display mode.
4108 In addition, only displayed expressions can be labeled and numbered (see
4113 ), and multi-line equations (see Sec.
4115 \begin_inset LatexCommand \ref{sec:multiline}
4119 ) must be in display mode.
4122 \begin_layout Standard
4132 , which represents a couple lines of text before and after a centered blue
4134 LyX inserts a formula, but the insertion point is on a new line, and it's
4135 centered within that line.
4136 Now type an expression and run LaTeX to see how it looks.
4141 button is actually a toggle; use it now to change a couple of your expressions
4142 to display mode and back.
4146 \begin_layout Standard
4147 Display mode has a couple differences from inline mode:
4150 \begin_layout Itemize
4151 The default font is larger for a few symbols, like
4152 \begin_inset Formula $\sum$
4156 \begin_inset Formula $\int$
4162 \begin_layout Itemize
4163 Subscripts and superscripts for limits and sums (but not integrals) are
4164 written under rather than next to the symbols
4167 \begin_layout Itemize
4171 \begin_layout Standard
4172 Other than these differences, though, displayed expressions and inline expressio
4173 ns are very similar.
4176 \begin_layout Standard
4177 One final note about the way displayed formulae are typeset: be careful
4178 about whether you're putting your equation into a new paragraph or not.
4179 If your formula is in the middle of a sentence or paragraph, then don't
4185 Doing so will cause the text
4189 the formula to start a new paragraph.
4190 That text will therefore be indented, which is probably not what you want.
4193 \begin_layout Standard
4198 : Put the various equations in
4202 into display mode, and see how they're typeset differently.
4205 \begin_layout Standard
4210 : Using various tools you've learned in this section, you should be able
4211 to write an equation like
4215 \begin_layout Standard
4216 After you've done it the hard way, why don't you give
4221 nsert\SpecialChar \menuseparator
4226 \SpecialChar \menuseparator
4240 \begin_inset Formula \[
4241 f(x)=\left\{ \begin{array}{cc}
4244 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4251 \begin_layout Section
4255 \begin_layout Standard
4256 Mathed can do plenty more.
4257 By now, you're familiar with the basics, so we'll just refer to the
4264 \begin_layout Itemize
4265 Labeling and numbering expressions
4268 \begin_layout Itemize
4269 Multi-line equations
4272 \begin_layout Itemize
4273 Change typefaces, e.g., to write bold-face text in an expression.
4276 \begin_layout Itemize
4277 Fine-tune font sizes and spacing within an expression.
4278 (Don't worry about this until your final draft!)
4281 \begin_layout Itemize
4283 These are very powerful, because you just define them once at the top of
4284 the document, and then you can use them throughout the document.
4285 If you change the macro definition, the references to the macro will be
4286 changed throughout the document.
4287 Macros can even take arguments.
4290 \begin_layout Itemize
4291 Do lots of other things we didn't have time to mention in this
4298 \begin_layout Chapter
4302 \begin_layout Section
4303 Other Major LyX Features
4306 \begin_layout Standard
4307 We haven't gone through all the possible commands in LyX, and we aren't
4313 for more information.
4314 We'll just mention a couple more major things LyX can do\SpecialChar \ldots{}
4318 \begin_layout Itemize
4319 LyX has WYSIWYM support for tables.
4325 nsert\SpecialChar \menuseparator
4333 Click on the table with the
4342 dialog box which allows extensive table editing.
4345 \begin_layout Itemize
4346 LyX also supports including pictures in a number of formats (including JPEG
4347 and other bitmap formats, PostScript® and raw LaTeX) within documents.
4353 nsert\SpecialChar \menuseparator
4361 Then click on the figure to choose the file to include, rotate or scale
4362 it, etc.) Tables and figures can have captions, and LyX will automatically
4363 generate lists of figures and/or tables.
4366 \begin_layout Itemize
4367 Version control is supported, using RCS (
4374 \begin_layout Itemize
4375 LyX is heavily configurable.
4376 Everything from how the LyX window looks to how the output comes out can
4377 be configured in a number of ways.
4378 Much configuration is done through
4383 ools\SpecialChar \menuseparator
4391 For more information on this, check out
4396 elp\SpecialChar \menuseparator
4401 ustomization\SpecialChar \@.
4405 \begin_layout Itemize
4406 LyX is being developed by a team of programmers on five continents.
4407 Therefore, LyX has better support for non-English languages (such as Dutch,
4408 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4409 ) than many word processors.
4410 Even some right-to-left languages like Hebrew or Arabic are supported.
4411 You can write documents in other languages, but you can also configure
4412 LyX to show its menus and error messages in other languages.
4416 \begin_layout Itemize
4417 The LyX menus feature keybindings.
4418 This means that you can do
4423 ile\SpecialChar \menuseparator
4438 or by using the binding which is shown next to it in the menu (C-O by default).
4439 Keybindings are also configurable.
4440 For information on this, check out
4445 elp\SpecialChar \menuseparator
4450 ustomization\SpecialChar \@.
4454 \begin_layout Itemize
4455 LyX can read in LaTeX documents.
4456 See Section\InsetSpace ~
4458 \begin_inset LatexCommand \ref{sec:tex2lyx}
4465 \begin_layout Itemize
4466 Spellchecking and thesaurus facilities are available.
4469 \begin_layout Itemize
4470 The text box near the bottom of the LyX window is called the minibuffer
4471 (after a similar feature in
4476 This gives you access to all sorts of interesting functionality, including
4477 functionality which could break your document.
4478 In other words, don't type in the minibuffer unless you know what you're
4482 \begin_layout Section
4486 \begin_layout Standard
4487 \begin_inset LatexCommand \label{sec:latexusers}
4491 If you don't know anything about LaTeX, you don't have to read this section.
4492 Actually, you might want to
4496 about LaTeX, and then read this chapter.
4497 However, many people who begin to use LyX will be familiar with LaTeX.
4498 If you are such a person, you may be wondering if LyX can really do everything
4500 The short answer is that LyX can do pretty much everything LaTeX can do
4501 in one form or another, and it definitely simplifies most parts of writing
4503 The tool that is used to convert a LaTeX document to LyX was rewritten
4504 completely for LyX\InsetSpace ~
4506 It should now be able to handle most LaTeX gracefully.
4509 \begin_layout Standard
4510 Because this is just a tutorial, we are only going to mention things that
4511 new LyX users will most likely be interested in.
4512 In the interests of keeping the
4516 short, we will give only minimal information here.
4521 manual, specifically the
4523 Secrets of the LaTeX Masters
4525 chapter, has a great deal of information on differences between LyX and
4526 LaTeX, and how to do various LaTeX tricks in LyX.
4529 \begin_layout Subsection
4533 \begin_layout Standard
4534 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4535 will be displayed in red on the screen.
4536 You can use TeX commands in LyX by choosing
4541 nsert\SpecialChar \menuseparator
4550 This creates a text box, and everything within it is passed straight to
4554 \begin_layout Standard
4555 In a math formula, TeX mode is handled a bit differently.
4556 Enter TeX mode by typing a backslash.
4557 The backslash is not written out, but anything you type afterwards will
4559 You exit TeX mode by typing
4563 or some other non-alphabetic character, like a number, underscore, caret,
4565 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4566 will convert it to WYSIWYM\SpecialChar \@.
4567 So if, in a formula, you type
4573 , then when you type
4577 , LyX will change the red
4578 \begin_inset Quotes eld
4582 \begin_inset Quotes erd
4586 \begin_inset Quotes eld
4590 \begin_inset Formula $\gamma$
4594 \begin_inset Quotes erd
4598 This will work for almost all, non-complicated math macros.
4599 This may be faster than using the
4604 , and will be especially convenient for experienced LaTeX users.
4607 \begin_layout Standard
4608 As a special case, if you type a brace in TeX mode, then the beginning
4612 ending braces will be inserted in red, then take you
4616 of TeX mode and place the cursor between the braces.
4617 This makes it more convenient to type commands that LyX doesn't know which
4621 \begin_layout Standard
4622 LyX can't do absolutely everything that LaTeX can do (yet?).
4623 Some fancy functions are not supported at all, while some work but aren't
4625 TeX mode allows users to get the full flexibility of LaTeX, while having
4626 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4627 LyX could never support every LaTeX package.
4634 in the preamble (see Section\InsetSpace ~
4636 \begin_inset LatexCommand \ref{sec:preamble}
4640 ), you can use any package you want --- although you won't have WYSIWYM
4641 support for that package's features.
4644 \begin_layout Subsection
4645 Importing LaTeX Documents ---
4650 \begin_layout Standard
4651 \begin_inset LatexCommand \label{sec:tex2lyx}
4655 You can import a LaTeX file into LyX by using the
4660 ile\SpecialChar \menuseparator
4665 mport\SpecialChar \menuseparator
4677 which will create a file
4685 --- and then open that file.
4686 If the translation doesn't work, you can try calling
4690 from the command line, possibly using fancier options.
4693 \begin_layout Standard
4698 will translate most legal LaTeX, but not everything.
4699 It will leave things it doesn't understand in TeX mode, so after translating
4704 , you can look for red text and hand-edit it to look right.
4707 \begin_layout Standard
4712 has its own manpage.
4713 Read it to find out about which LaTeX commands and environments aren't
4714 supported, bugs (and how to get around them), and how to use the various
4718 \begin_layout Subsection
4719 Converting LyX Documents to LaTeX
4722 \begin_layout Standard
4723 You might wish to convert a LyX Document to a LaTeX file.
4724 For example, a co-worker or co-author who doesn't have LyX might want to
4726 This is very easy to do with LyX.
4732 ile\SpecialChar \menuseparator
4737 xport\SpecialChar \menuseparator
4745 This will create a file
4753 file you are editing.
4754 LyX always creates temporary LaTeX files when viewing or printing files,
4755 so it is very good at generating LaTeX.
4758 \begin_layout Subsection
4762 \begin_layout Subsubsection
4766 \begin_layout Standard
4772 ocument\SpecialChar \menuseparator
4779 dialog takes care of many of the options that you would input in a
4786 Change the class, default font size and paper size here.
4787 Put any extra options to the
4805 \begin_layout Subsubsection
4806 Other Preamble Matter
4809 \begin_layout Standard
4810 \begin_inset LatexCommand \label{sec:preamble}
4814 If you have special commands to put in the preamble of a LaTeX file, you
4815 can use them in a LyX document as well.
4821 ocument\SpecialChar \menuseparator
4833 and type in the dialog window (or from the document settings dialog, depending
4835 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4838 \begin_layout Subsection
4842 \begin_layout Standard
4843 LyX has support for BibTeX, which allows you to build databases of bibliographic
4844 al references to be used in multiple documents.
4850 nsert\SpecialChar \menuseparator
4857 C\SpecialChar \menuseparator
4870 Click on the resulting
4871 \begin_inset Quotes eld
4875 Generated\InsetSpace ~
4877 \begin_inset Quotes erd
4880 button, and you will get a
4889 field, type what you would type inside the braces of a
4899 \begin_layout Standard
4900 Like in regular LaTeX, multiple bibliographies should be separated by commas,
4911 field, type what you would type inside the braces of a
4920 \begin_layout Standard
4921 After you've done this, you can use citations from any bibliographies you're
4927 nsert\SpecialChar \menuseparator
4934 (see Section\InsetSpace ~
4936 \begin_inset LatexCommand \ref{sec:bibliographies}
4941 LyX will take care of running BibTeX.
4946 dialog will show a list of all the references in your
4953 \begin_layout Section
4957 \begin_layout Standard
4958 Sometimes when you LaTeX a document, there will be errors, things that LyX
4959 or LaTeX can't understand.
4960 When this happens, LyX will open a
4966 Clicking on individual errors in this dialog will take you to the place
4967 in the LyX document where the error occurs and also display the detailed
4968 LaTeX error message.