1 #LyX 1.6.0svn created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 %This preamble is designed to ensure that the document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the document may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
22 \fi % end if pdflatex is used
24 % the pages of the TOC is numbered roman
25 % and a pdf-bookmark for the TOC is added
26 \let\myTOC\tableofcontents
27 \renewcommand\tableofcontents{%
29 \pdfbookmark[1]{\contentsname}{}
33 % redefine the \LyX macro for PDF bookmarks
34 \def\LyX{\texorpdfstring{%
35 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
42 \font_typewriter default
43 \font_default_family default
53 \pdf_title "The LyX Tutorial"
54 \pdf_author "LyX Team"
55 \pdf_subject "LyX-documentation Tutorial"
56 \pdf_keywords "LyX, documentation"
58 \pdf_bookmarksnumbered true
59 \pdf_bookmarksopen true
60 \pdf_bookmarksopenlevel 2
65 \pdf_pagebackref false
66 \pdf_pdfusetitle false
67 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true,pdfstartview=XYZ, plainpages=false, pdfpagelabels"
74 \paperorientation portrait
77 \paragraph_separation indent
79 \quotes_language english
82 \paperpagestyle headings
83 \tracking_changes false
100 \begin_layout Plain Layout
101 If you have comments or error corrections, please send them to the LyX Documenta
105 \begin_inset CommandInset href
107 target "lyx-docs@lists.lyx.org"
122 \begin_layout Standard
123 \begin_inset CommandInset toc
124 LatexCommand tableofcontents
131 \begin_layout Chapter
135 \begin_layout Section
139 \begin_layout Standard
140 This file is designed for all of you who have never heard of LaTeX, or don't
142 Now, don't panic - you won't need to learn LaTeX to use LyX.
143 That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
145 There are some things you will need to learn, however, in order to use
149 \begin_layout Standard
150 Some of you probably found your way to this document because you tried to
151 put two spaces after a
152 \begin_inset Quotes eld
156 \begin_inset Quotes erd
159 or tried to put 3 blank lines between paragraphs.
160 You found out you couldn't and in fact, you'll find out that most of the
161 little tricks you're accustomed to use in other word processors won't work
163 That's because most word processors you've used before allow you to manually
164 enter all spacings, font changes, and so on.
165 So you end up not only writing a document but typesetting it, too.
166 LyX does the typesetting for you, in a consistent fashion, letting you
167 focus on the important things, like the content of your writing.
170 \begin_layout Standard
171 So read on to learn more about LyX.
172 Reading this tutorial is definitely worth the time.
175 \begin_layout Section
185 \begin_layout Standard
186 Before we get started with this section, we want to make a quick note of
192 uses the notation outlined in the
197 If you came to this manual first, please read the
201 before you continue with the
208 \begin_layout Standard
209 Now that you know which fonts mean what, we want to talk a bit about what
217 \begin_layout Subsection
218 Getting the most out of the Tutorial
221 \begin_layout Standard
222 This tutorial consists of examples and exercises.
223 To get the most out of this document, you should read through the document,
224 typing all the little things we're telling you to type and trying out all
225 of the exercises to see if you get them right.
226 For convenience, you might want to print out the PDF version of this document.
229 \begin_layout Standard
230 If you are familiar with LaTeX, you'll probably be able to read the
234 somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
235 However, LyX have features you'll want to learn about.
236 Even if you don't feel like reading the rest of the
240 , you should definitely check out Section
245 \begin_inset CommandInset ref
247 reference "sec:latexusers"
251 , which is specifically written for experienced LaTeX users.
254 \begin_layout Subsection
262 \begin_layout Itemize
263 Detailed explanations of all of LyX's features.
267 \begin_layout Standard
276 \begin_layout Itemize
277 Detailed explanations of LaTeX.
281 \begin_layout Standard
283 If you want to learn some of the neat tricks you can do with LaTeX in LyX,
284 you can have a look at the
296 \begin_layout Standard
297 It's time to move onwards, time for your first document \SpecialChar \ldots{}
301 \begin_layout Chapter
302 Getting started with LyX
305 \begin_layout Section
306 Your first LyX document
307 \begin_inset CommandInset label
309 name "sec:Your-first-LyX"
316 \begin_layout Standard
318 You're ready to start writing.
319 Before you do, there are a few things we need to mention, which will hopefully
320 make the Tutorial more instructive and useful.
324 \begin_layout Standard
325 Because there are informations we can't give you in the Tutorial, the
331 thing that you need to do is find the
338 Start up LyX, Choose the
347 You may want to load the
351 as well (if you're not reading it within LyX already).
352 This way, you can read them while you're writing your own file.
356 \begin_layout Plain Layout
357 They can also serve as good examples of how to use the many features of
363 Note that once you've got more than one document open, you can use the
368 menu or the document tabs to switch between them.
371 \begin_layout Standard
372 In this Tutorial, we're going to assume that you have a fully working version
373 of LyX, as well as a LaTeX-distribution, a DVI-, and a PDF-viewer.
374 This should be the case on all major Linux- and BSD-distribution, as well
375 as on Windows, where this is setup by the LyX installer.
378 \begin_layout Standard
379 Finally, we've written a file to let you practice your LyX skills on, it's
385 Imagine that it was typed by someone who didn't know about any of LyX's
387 As you learn new LyX functions, we'll suggest that you fix those parts
394 \begin_inset Quotes eld
398 \begin_inset Quotes erd
401 hints about how to fix things
405 \begin_layout Plain Layout
406 The hints are located in yellow
407 \begin_inset Quotes eld
411 \begin_inset Quotes erd
415 Access the text in a note by clicking on it.
421 If you want to cheat, or check what you've done, there's also a file called
426 which contains the same text written and typeset by a LyX master.
429 \begin_layout Standard
430 The example files can be found in the
434 directory of LyX's installation folder.
435 Open the raw document, and use
437 File\SpecialChar \menuseparator
444 to save a copy in your own directory for you to work on.
445 As you fix parts of the raw document, check to see how those changes affect
449 \begin_layout Standard
454 directory contains lots of other examples files.
455 They will show you how to do various fancy things with LyX.
456 After you read the Tutorial, or when you're confused about how to do something
457 fancy in LyX, take a look at these files.
460 \begin_layout Subsection
461 Typing, Viewing, and Exporting
464 \begin_layout Itemize
467 File\SpecialChar \menuseparator
471 \begin_layout Itemize
472 Type a sentence like:
474 This is my first LyX document!
477 \begin_layout Itemize
478 Save your document with
480 File\SpecialChar \menuseparator
489 \begin_layout Itemize
490 Run LaTeX to create a DVI file, with
492 View\SpecialChar \menuseparator
495 or the toolbar button
496 \begin_inset Graphics
497 filename ../images/buffer-view_dvi.png
503 LyX will open a DVI-viewer program displaying your document looking like
508 \begin_layout Plain Layout
509 You can save time by leaving the DVI-viewer running in the background.
512 View\SpecialChar \menuseparator
513 Update\SpecialChar \menuseparator
516 or the toolbar button
517 \begin_inset Graphics
518 filename ../images/buffer-update_dvi.png
523 and just click on the DVI-viewer window (or unminimize it) after LaTeX
532 \begin_layout Itemize
533 Export the ready to print document with
535 File\SpecialChar \menuseparator
543 \begin_layout Standard
544 Congratulations! You've written your first LyX document.
545 All of the rest is just details, which is covered in the other manuals.
548 \begin_layout Subsection
552 \begin_layout Standard
553 LyX can of course do most of the things you're used to do with a word processor.
554 It will word-wrap and indent paragraphs automatically.
555 Here's a quick description of how to do some simple actions.
558 \begin_layout Description
559 Undo LyX has multiple levels of undo, which means you can undo everything
560 you've done since your current editing session started, by selecting
562 Edit\SpecialChar \menuseparator
566 \begin_inset Graphics
567 filename ../images/undo.png
572 ) over and over again.
573 If you undo too much, just select
575 Edit\SpecialChar \menuseparator
579 \begin_inset Graphics
580 filename ../images/redo.png
590 \begin_layout Standard
591 Currently, undo is limited to 100 steps.
592 Undo also doesn't work for
596 ; for instance, not for changes to the document layout what is really a
601 \begin_layout Description
604 Edit\SpecialChar \menuseparator
608 \begin_inset Graphics
609 filename ../images/cut.png
616 Edit\SpecialChar \menuseparator
620 \begin_inset Graphics
621 filename ../images/copy.png
628 Edit\SpecialChar \menuseparator
632 \begin_inset Graphics
633 filename ../images/paste.png
638 ) to cut, copy, and paste.
639 Or automatically paste selected text (including selections from other programs)
647 \begin_layout Description
650 Edit\SpecialChar \menuseparator
662 \begin_inset Graphics
663 filename ../images/dialog-show_findreplace.png
669 In the dialog, search with the
681 button to replace a word you've found
685 \begin_layout Plain Layout
686 Close the window when you're done or leave it open if you find it more convenien
688 Most dialog boxes in LyX can operate like this.
689 Just be sure you have the right window focus when you're trying to type
690 in the main LyX window or a LyX dialog.
696 If you like, you can specify whether to make the search case-sensitive,
697 or to search for only complete words; you can also search backwards through
701 \begin_layout Description
710 text (which will by default print characters in italics), set it in
718 (usually small caps, used for people's names) from the toggle buttons in
721 Edit\SpecialChar \menuseparator
728 dialog (toolbar button
729 \begin_inset Graphics
730 filename ../images/dialog-show_character.png
738 \begin_layout Description
739 Toolbar There are buttons on the toolbar (just below the menus) which allow
740 you to do some of the more popular functions, such as
751 \begin_layout Standard
752 Of course, you haven't yet written enough to make most of these functions
754 As you write more, though, try undoing, pasting, etc.
757 \begin_layout Subsection
758 WYSIWYM: Whitespace in LyX
759 \begin_inset CommandInset label
761 name "sec:whitespace"
768 \begin_layout Standard
769 One of the hardest things for new users to get used to is the way that LyX
771 As many times as you hit
775 , you'll only get one blank line.
776 As many times as you hit
780 , you'll only get one space.
781 On a blank line, LyX won't let you type even one space.
786 key won't move you forward one tab stop; in fact there
790 no tab stops! There's no ruler at the top of the page to let you set tabs
794 \begin_layout Standard
795 Many word processors are based on the WYSIWYG principle:
796 \begin_inset Quotes eld
799 What You See Is What You Get.
800 \begin_inset Quotes erd
803 LyX, on the other hand, is based on the principle that
804 \begin_inset Quotes eld
807 What You See Is What You
812 \begin_inset Quotes erd
815 You type what you mean, and LyX will take care of typesetting it for you,
816 so that the output looks nice.
821 grammatically separates paragraphs, and a
825 grammatically separates words, so there is no reason to have several of
830 has no grammatical function at all, so LyX does not support it.
831 Using LyX, you'll spend more of your time worrying about the
835 of your document, and less time worrying about the
844 for more information on the WYSIWYM concept.
847 \begin_layout Standard
848 LyX does have (many) ways to fine-tune the formatting of your document.
849 After all, LyX might not typeset
858 has information about all that.
863 s and vertical space --- which are more powerful and versatile than multiple
864 spaces or blank lines --- and ways to change font sizes, character styles,
865 and paragraph alignments by hand.
866 The idea, though, is that you can write your whole document, focusing on
867 content, and just worry about that fine-tuning at the end.
868 With standard word processors, you'll be distracted by document formatting
869 throughout the writing process.
872 \begin_layout Section
876 \begin_layout Standard
877 Different parts of a document have different purposes; we call these parts
883 Most of a document is made up of regular text.
884 Section titles (chapter, subsection, etc.) let the reader know that a new
885 topic or subtopic will be discussed.
886 Certain types of documents have special environments.
887 A journal article will have an abstract and a title.
888 A letter will have neither of these, but will probably have an environment
889 that gives the writer's address.
892 \begin_layout Standard
893 Environments are a major part of the
894 \begin_inset Quotes eld
897 What You See Is What You Mean
898 \begin_inset Quotes erd
902 A given environment may require a certain font style, font size, indenting,
903 line spacing, and more.
904 This problem is aggravated, because the exact formatting for a given environmen
905 t may change: one journal may use boldface, 18 point, centered type for
906 section titles while another uses italicized, 15 point, left justified
907 type; different languages may have different standards for indenting; and
908 bibliography formats can vary widely.
909 LyX lets you avoid learning all the different formatting styles.
912 \begin_layout Standard
917 choice box is located on the left end of the toolbar and looks like this:
919 \begin_inset Graphics
920 filename clipart/ToolbarEnvBox.png
927 It indicates which environment you're currently writing in.
928 While you were writing your first document, it said
929 \begin_inset Quotes eld
933 \begin_inset Quotes erd
936 which is the default environment for text.
937 Now you will put a number of environments in your new document so that
938 you can see how they work.
941 \begin_layout Subsection
942 Sections and Subsections
945 \begin_layout Standard
950 on the first line of your LyX file, and select
962 \begin_layout Plain Layout
968 If nothing is selected, LyX changes the paragraph you are currently in
969 to the selected environment.
970 Alternatively, you can change several paragraphs to a different environment
971 by selecting them before picking an environment.
988 , which will be covered below.
989 LyX numbers the section
990 \begin_inset Quotes eld
994 \begin_inset Quotes erd
997 and typesets the section heading (title) in a larger font.
1008 \begin_inset Quotes eld
1012 \begin_inset Quotes erd
1016 \begin_inset Quotes eld
1020 \begin_inset Quotes erd
1024 Section headings, like most environments, are assumed to end when you type
1030 Type the document introduction:
1033 \begin_layout LyX-Code
1034 This is an introduction to my first LyX document.
1037 \begin_layout Standard
1052 \begin_inset Quotes eld
1056 \begin_inset Quotes erd
1059 and waits for you to type a title.
1061 \begin_inset Quotes eld
1067 \begin_inset space ~
1073 \begin_inset Quotes erd
1076 , and you'll see that LyX again sets it as a section title.
1079 \begin_layout Standard
1081 Go to the end of Section
1082 \begin_inset space ~
1086 \begin_inset Quotes eld
1089 my first LyX document
1090 \begin_inset Quotes erd
1107 \begin_inset Quotes eld
1111 \begin_inset Quotes erd
1114 and waits for you to type a title.
1121 \begin_inset space ~
1125 \begin_inset Quotes eld
1129 \begin_inset Quotes erd
1132 , which used to be Section
1133 \begin_inset space ~
1136 2, has been automatically renumbered to Section
1137 \begin_inset space ~
1140 3! In true WYSIWYM fashion, you just need to identify the text that makes
1141 up the section titles, and LyX takes care of numbering the sections and
1145 \begin_layout Standard
1154 environment, and type the following five lines:
1157 \begin_layout LyX-Code
1158 Sections and subsections are described below.
1161 \begin_layout LyX-Code
1165 \begin_layout LyX-Code
1166 Sections are bigger than subsections.
1169 \begin_layout LyX-Code
1170 Subsection description
1173 \begin_layout LyX-Code
1174 Subsections are smaller than sections.
1177 \begin_layout Standard
1178 Click on the second line and select
1187 LyX numbers the subsection
1188 \begin_inset Quotes eld
1192 \begin_inset Quotes erd
1195 , and typesets it in a font which is bigger than regular text but smaller
1196 than the section title.
1197 Change the fourth line
1201 environment as well.
1202 As you probably expected, LyX automatically numbered the section
1203 \begin_inset Quotes eld
1207 \begin_inset Quotes erd
1211 If you put yet another section before Section
1212 \begin_inset space ~
1216 \begin_inset space ~
1219 2 will be renumbered as Section 3, and the subsections will be renumbered
1221 \begin_inset Quotes eld
1225 \begin_inset Quotes erd
1229 \begin_inset Quotes eld
1233 \begin_inset Quotes erd
1240 \begin_layout Standard
1241 Further levels of sectioning include
1254 We'll let you play with these on your own.
1255 You may notice that paragraph and subparagraph headings are not numbered
1256 by default, and that subparagraphs are indented; see the
1260 for an explanation and how to change this.
1265 headings are actually the highest level of sectioning, above
1269 s, but you're only allowed to use them in certain types (text classes) of
1270 LyX documents (see Section
1271 \begin_inset space ~
1275 \begin_inset CommandInset ref
1277 reference "sec:Document-Classes"
1285 \begin_layout Standard
1286 Finally, you may want to have sections or subsections that are not numbered.
1287 There are environments for this as well.
1288 If you change one of your section headings to the
1292 environment (you may have to scroll down in the
1296 box to find it), LyX will use the same font size for the heading as it
1297 uses for a regular section, but it won't number that section.
1298 There are corresponding
1299 \begin_inset Quotes eld
1303 \begin_inset Quotes erd
1306 heading environments for
1315 Try changing some of your sections or subsections to the starred environments,
1316 and note how the other sections' numbers are updated.
1319 \begin_layout Standard
1324 : Fix the section and subsection headings in
1332 \begin_layout Subsection
1336 \begin_layout Standard
1337 LyX has several different environments for typesetting lists.
1338 The various list environments free you from hitting
1342 a million times when writing an outline, or from renumbering a whole list
1343 when you want to add a point in the middle of the list.
1344 Different types of documents logically require different list environments:
1347 \begin_layout Itemize
1348 A slide presentation might use the
1352 environment's bulleted lists to describe different points.
1356 \begin_layout Itemize
1357 An outline would use the
1361 environment's numbered lists (and lettered sublists).
1365 \begin_layout Itemize
1366 A document describing several software packages could use the
1370 environment, where each item in the list begins with a bold-faced word.
1374 \begin_layout Itemize
1379 environment --- not found in LaTeX --- is a slightly different form of
1387 \begin_layout Standard
1388 Let's write a list of reasons why LyX is better than other word processors.
1389 Somewhere in your document, type:
1392 \begin_layout Standard
1395 LyX is better than other word processors because:
1398 \begin_layout Standard
1414 \begin_inset Quotes eld
1418 \begin_inset Quotes erd
1422 Type in your reasons:
1425 \begin_layout LyX-Code
1426 Typesetting is done for you.
1429 \begin_layout LyX-Code
1433 \begin_layout LyX-Code
1434 Lists are very easy to create!
1437 \begin_layout Standard
1438 List environments, unlike headings, do not end when you type
1443 Instead, LyX assumes you're going on to the next item in the list.
1444 The above will therefore result in a three-item list.
1445 If you want more than one paragraph within one list
1449 , one way is to use the
1452 \begin_inset space ~
1457 , which you get by typing
1462 In order to get out of the list, you need to reselect the
1466 environment (or just use the keybinding,
1469 \begin_inset space ~
1477 \begin_layout Standard
1478 You've got a beautiful itemized list.
1479 You might want to run LaTeX to see how the list looks when printed out.
1480 But what if you wanted to number the reasons? Well, just select the whole
1485 \begin_layout Plain Layout
1486 LyX won't let you select the first bullet unless you also select the paragraph
1491 the list, which you probably don't want to do.
1492 Similarly, you can't select the actual number in a numbered section title.
1493 This is on purpose because the bullet or number depends on the document
1494 settings or text position, respectively.
1508 Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1512 \begin_layout Standard
1513 While the list is still selected, you can change to the other two list environme
1522 , in order to see what they look like.
1523 For those two environments, each list item is made up of a term, which
1524 is the item's first word, followed by a definition, which is the rest of
1525 the paragraph (until you hit
1529 .) The term is either typeset in boldface (
1534 \begin_inset Quotes eld
1538 \begin_inset Quotes erd
1545 \begin_layout Plain Layout
1546 But a typesetter's tab, which will change to fit the size of the largest
1547 term, not a pathetic, rigid, unchangeable typewriter
1560 ) from the rest of the paragraph.
1561 If you want to have more than one word in the definition, then separate
1565 \begin_inset space ~
1573 \begin_layout Standard
1578 : Typeset the list in
1583 \begin_layout Standard
1584 You can nest lists within each other in all sorts of interesting ways.
1585 An obvious example would be writing outlines.
1586 Numbered and bulleted lists will have different numbering and bulleting
1587 schemes for sublists.
1592 for details on the different sorts of lists and for examples of nestings.
1595 \begin_layout Subsection
1596 Other environments: Verses, Quotations, and more
1599 \begin_layout Standard
1600 There are two environments for setting quotations apart from surrounding
1605 for short quotes and
1618 \begin_layout Plain Layout
1619 used in this Tutorial for the long typing examples
1628 font; this environment is the only place in LyX where you're allowed to
1629 use multiple spaces to allow code indenting.
1630 You can even write poetry using the
1638 to separate stanzas, and
1642 to separate lines within a stanza.
1647 for more complete descriptions of all of the available LyX environments.
1650 \begin_layout Standard
1655 : Correctly typeset the
1664 \begin_inset Newline newline
1672 \begin_layout Chapter
1676 \begin_layout Standard
1677 The previous chapter hopefully allowed you to get used to writing in LyX.
1678 It introduced you to the basic editing operations in LyX, as well as the
1679 powerful method of writing with environments.
1680 Most people who use LyX, though, will want to write documents: papers,
1681 articles, books, manuals, or letters.
1682 This chapter is meant to take you from simply writing text with LyX to
1683 writing a complete document.
1684 It will introduce you to text classes, which allow you to write different
1686 It will then describe many of the additions that turn text into a document,
1687 such as titles, footnotes, cross references, bibliographies, and tables
1691 \begin_layout Section
1693 \begin_inset CommandInset label
1695 name "sec:Document-Classes"
1702 \begin_layout Standard
1703 Different sorts of documents should be typeset differently.
1704 For example, books are generally printed double-sided, while articles are
1706 In addition, many documents contain special environments: letters contain
1707 some environments --- such as the sender's address and the signature ---
1708 which do not make sense in a book or article.
1717 \begin_layout Plain Layout
1718 for LaTeX users: this is equivalent to the LaTeX document class
1723 takes care of these large scale differences between different sorts of
1725 This Tutorial, for example, was written in the
1730 Document classes are another major part of the WYSIWYM philosophy; they
1731 tell LyX how to typeset the document, so you don't need to know how.
1734 \begin_layout Standard
1735 Your document is probably being written in the
1743 \begin_layout Plain Layout
1744 That's usually the default document class
1749 Try changing to other document classes (using the
1751 Document\SpecialChar \menuseparator
1754 dialog) to see how they are typeset differently.
1755 If you change your document to the
1759 document class and look at the
1763 box, you'll see that most of the allowed environments are the same.
1764 However, you can now use the
1769 If you are ever unsure about which environments you can use in a given
1770 document class, just consult the
1777 \begin_layout Standard
1778 Font sizes, one- or two-column printing, and page headings are just some
1779 of the ways journals' typesettings differ from one another.
1780 As the Computer Age continues to mature, journals have begun accepting
1781 electronic submissions, creating LaTeX
1782 \begin_inset Quotes eld
1786 \begin_inset Quotes erd
1789 so that authors can submit correctly typeset articles.
1790 LyX is set up to support this as well.
1791 For example, LyX supports typesetting (and extra environments) for the
1792 American Mathematics Society journals using the
1795 \begin_inset space ~
1803 \begin_layout Standard
1804 Here is a very quick reference to some of the document classes.
1807 Special Document Classes
1813 manual for many more details.
1816 \begin_layout Standard
1818 \begin_inset Tabular
1819 <lyxtabular version="3" rows="7" columns="2">
1821 <column alignment="center" valignment="top" width="0pt">
1822 <column alignment="center" valignment="top" width="0pt">
1824 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1827 \begin_layout Plain Layout
1833 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1836 \begin_layout Plain Layout
1844 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1847 \begin_layout Plain Layout
1853 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1856 \begin_layout Plain Layout
1857 one-sided, no chapters
1864 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1867 \begin_layout Plain Layout
1873 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1876 \begin_layout Plain Layout
1877 layout & environments for American Math Society
1884 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1887 \begin_layout Plain Layout
1893 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1896 \begin_layout Plain Layout
1897 longer than article, two-sided
1904 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1907 \begin_layout Plain Layout
1913 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1916 \begin_layout Plain Layout
1917 report + front and back matter
1924 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1927 \begin_layout Plain Layout
1933 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1936 \begin_layout Plain Layout
1944 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1947 \begin_layout Plain Layout
1953 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1956 \begin_layout Plain Layout
1957 lots of extra environments for address, signature\SpecialChar \ldots{}
1971 \begin_layout Section
1972 Templates: Writing a Letter
1975 \begin_layout Standard
1976 One way to write a letter would be to open a new file, and choose a
1982 Document\SpecialChar \menuseparator
1986 While this is the most obvious way to write a letter, it seems like extra
1988 Every time you write a business letter, you want to have your address,
1989 the address you're sending to, a body, a signature, etc.
1994 for letters, which contains a sample letter; once you have a template,
1995 you can just replace a couple parts of the letter with your text each time
1999 \begin_layout Standard
2000 Open a new file with
2002 File\SpecialChar \menuseparator
2004 \begin_inset space ~
2008 \begin_inset space ~
2019 Save and print the file to see how the various environments are typeset.
2022 \begin_layout Standard
2023 When you look at the
2027 box, you'll see several environments, like the
2030 \begin_inset space ~
2035 environment, which don't even exist in most other document classes.
2045 You can play around for a while to figure out how the various environments
2047 You'll notice for example that the
2051 environment has the word
2052 \begin_inset Quotes eld
2056 \begin_inset Quotes eld
2059 in red before the actual text of the signature.
2060 This word doesn't show up in the actual letter, as you'll see if you view/expor
2062 It's just there to let you know where the signature goes.
2063 Also, note that it doesn't matter where in the file the
2068 Remember, LyX is WYSIWYM; you can put the
2072 environment anywhere you want, but LyX knows that in the printout, the
2073 signature should be at the end.
2076 \begin_layout Standard
2077 A template is just a regular LyX file.
2078 This means you can fill in your address and signature and save the file
2080 From now on, any time you want to write a letter, you can use the new template
2082 We don't have to suggest an actual
2083 \begin_inset Quotes eld
2087 \begin_inset Quotes erd
2090 here; just write a letter to someone!
2094 \begin_layout Plain Layout
2095 One warning, if you're writing from a template.
2096 If you erase all of the text in an environment --- for example, if you
2100 \begin_inset space ~
2105 field so that you can replace it with your own --- and then you move the
2106 cursor without writing any text, the environment may disappear.
2107 This is because most environments cannot exist without any text in them.
2108 Just reselect the environment from the
2120 \begin_layout Standard
2121 Templates can be a huge time-saver, and we urge you to use them whenever
2123 In addition, they can help a person learn how to use some of the fancier
2125 Finally, they may be useful for a person who is configuring LyX for a bunch
2126 of less computer-aware users.
2127 When they're first learning LyX, it will be much less intimidating if they
2128 have a letter template customized for their company, for example.
2131 \begin_layout Section
2135 \begin_layout Standard
2136 LyX (like LaTeX) considers the title --- which may contain the actual title,
2137 the author, the date, and even an abstract of a paper --- to be a separate
2138 part of the document.
2141 \begin_layout Standard
2142 Go back to your LyX document and make sure it's using the
2150 \begin_layout Plain Layout
2151 You should not be using the letter any more, since the
2155 document class doesn't allow titles.
2160 Type a title on the first line, and change the line to the
2165 On the next line, type your name and change it to the
2170 On the next line, write the date in the
2175 Type a paragraph or two summarizing your document using the
2180 Notice how the title is presented when it's printed out.
2181 If you changed the document format to Book, you'll get a separate title
2182 page, like the first page of this tutorial.
2185 \begin_layout Standard
2190 : Fix the title, date, and author in
2195 \begin_layout Section
2196 Labels and Cross-References
2197 \begin_inset CommandInset label
2206 \begin_layout Standard
2207 You can label section headings, list items, formulas, footnotes, and floats
2211 \begin_layout Plain Layout
2212 Floats are explained in the
2226 Once you do so, you can refer to this section in other parts of the document,
2227 using cross-references.
2228 You can refer either to the section's number, or to the page that the section
2230 As with section numbering, LyX also takes care about cross-reference numbering
2232 Automatic labels and cross-references are one of the best advantages of
2233 LyX (and LaTeX) over conventional word processors.
2236 \begin_layout Subsection*
2240 \begin_layout Standard
2241 Go to our second section, whose title is
2242 \begin_inset Quotes eld
2246 \begin_inset Quotes erd
2250 Click at the end of the section title line, and select
2252 Insert\SpecialChar \menuseparator
2255 or the toolbar button
2256 \begin_inset Graphics
2257 filename ../images/label-insert.png
2264 A dialog asks you for a label name, and gives you a suggestion.
2269 , the label name will be placed in a box next to the section title.
2272 \begin_layout Standard
2273 By the way, you could have put the label right anywhere within the section
2274 as well; section references will refer to the last section or subsection
2275 whose heading comes before the label.
2276 However, putting it on the same line as the section title (or, perhaps,
2277 on the first line of the section's text) ensures that page references will
2278 reference the beginning of the section.
2281 \begin_layout Standard
2282 So far you haven't done anything --- the DVI output will look exactly the
2283 same, since labels don't show up in the printed document.
2284 However, now that you have added a label, you can refer to that label with
2289 \begin_layout Subsection*
2290 Your first cross-reference
2293 \begin_layout Standard
2294 Place the cursor somewhere in Section
2295 \begin_inset space ~
2302 \begin_layout LyX-Code
2303 If you want to know more about this document, then see
2304 \begin_inset Newline newline
2307 Section , which can be found on page .
2310 \begin_layout Standard
2311 Now --- with the cursor after the word
2312 \begin_inset Quotes eld
2316 \begin_inset Quotes erd
2321 Insert\SpecialChar \menuseparator
2323 \begin_inset space ~
2328 or the toolbar button
2329 \begin_inset Graphics
2330 filename ../images/dialog-show-new-inset_ref.png
2342 It shows a list of the possible labels you can reference.
2343 At the moment, there should be only one,
2344 \begin_inset Quotes eld
2347 sec:About-This-Document
2348 \begin_inset Quotes erd
2352 Select it (it may be selected by default), and click
2357 Now put the cursor after the word
2358 \begin_inset Quotes eld
2362 \begin_inset Quotes erd
2365 , and change the reference format to use the page number then click
2370 (To be really correct, you should put a
2373 \begin_inset space ~
2379 \begin_inset Quotes eld
2383 \begin_inset Quotes erd
2387 Same for the page reference.)
2390 \begin_layout Standard
2391 LyX puts the references in a box right where the cursor was.
2392 In the printed document, this reference marker will be replaced with either
2393 the page or section number (depending on what you selected in the
2398 View your document as DVI, and you'll see that on the last page we refer
2400 \begin_inset Quotes eld
2404 \begin_inset space ~
2408 \begin_inset Quotes erd
2412 \begin_inset Quotes eld
2416 \begin_inset space ~
2420 \begin_inset Quotes erd
2423 (or whatever page Section
2424 \begin_inset space ~
2430 \begin_layout Standard
2431 Conveniently, a cross-reference acts as a hyperlink when you are editing
2432 a document in LyX; clicking on it will pop up the
2439 \begin_inset space ~
2443 \begin_inset space ~
2448 will move the cursor to the referenced label.
2451 \begin_layout Subsection*
2452 More fun with labels
2455 \begin_layout Standard
2456 We told you that LyX takes care about numbering cross-references; now you
2458 Add a new section before Section
2459 \begin_inset space ~
2463 Update the DVI view, and --- voilà ! --- the section cross reference changed
2465 \begin_inset Quotes eld
2469 \begin_inset Quotes erd
2472 ! Change the section
2473 \begin_inset Quotes eld
2477 \begin_inset Quotes erd
2480 to a subsection, and the cross-reference will reference Subsection
2481 \begin_inset space ~
2484 2.1 instead of Section
2485 \begin_inset space ~
2489 The page reference won't change unless you add a whole page of text before
2490 the label, of course.
2494 \begin_layout Standard
2495 If you want some more practice with labels, then try putting a new label
2496 where your first cross-reference was, and refer to that label from elsewhere
2498 If you'll be inserting cross-references often, it may be convenient to
2506 \begin_layout Standard
2507 If you want to make sure that the cross-referencing gets the pages right
2508 even for larger documents,
2512 a couple pages of text from the
2516 to the clipboard, and
2520 the stolen text into your document.
2524 \begin_layout Plain Layout
2525 By the way, copying a chapter title may cause an error, because chapters
2526 aren't allowed in the article class, see section
2527 \begin_inset space ~
2531 \begin_inset CommandInset ref
2533 reference "sec:Document-Classes"
2538 If this happens, just delete the chapter title.
2546 \begin_layout Standard
2551 : Fix the references in
2556 \begin_layout Section
2557 Footnotes and Margin Notes
2560 \begin_layout Standard
2561 Footnotes can be added using the toolbar button
2562 \begin_inset Graphics
2563 filename ../images/footnote-insert.png
2571 Insert\SpecialChar \menuseparator
2575 Click at the end of the word
2576 \begin_inset Quotes eld
2580 \begin_inset Quotes erd
2583 somewhere in your document and click the
2584 \begin_inset Graphics
2585 filename ../images/footnote-insert.png
2592 A footnote box appears where you can enter the text of the footnote.
2593 LyX should place the cursor at the beginning of the footnote box.
2597 \begin_layout LyX-Code
2598 LyX is a typesetting word processor.
2601 \begin_layout Standard
2602 Now click on the button labelled
2603 \begin_inset Quotes eld
2607 \begin_inset Quotes erd
2611 The footnote box is closed, leaving the button showing where the footnote
2612 marker will be in the printed text; this is called
2613 \begin_inset Quotes eld
2617 \begin_inset Quotes erd
2621 You can unfold the footnote at any time --- and re-edit its text, if you
2622 want --- by clicking again on the
2623 \begin_inset Quotes eld
2627 \begin_inset Quotes erd
2633 \begin_layout Standard
2634 You may wonder why the footnote button is a word instead of a number.
2635 The answer is that LyX takes care about the footnote numbering for you
2636 in the printed text.
2637 You can see this yourself by looking at the DVI file (or printout).
2638 If you add other footnotes, LyX will renumber the footnotes.
2639 Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2640 there's really no need to put the numbers in the LyX file.
2643 \begin_layout Standard
2644 A footnote can be cut and pasted like normal text.
2645 Go ahead; try it! All you need to do is select the footnote button
2649 \begin_layout Plain Layout
2650 It may be easier to select it using the keyboard.
2651 You might accidentally open the footnote if you're trying to select the
2652 marker itself with the mouse.
2666 In addition, you can change regular text to a footnote, by selecting it
2668 \begin_inset Graphics
2669 filename ../images/footnote-insert.png
2675 button; change a footnote to regular text by hitting the
2679 key when the cursor is in the first position of a footnote, or by hitting
2684 key when the cursor is in the very last position of the footnote, respectively.
2687 \begin_layout Standard
2688 Margin notes can be added using the menu
2690 Insert\SpecialChar \menuseparator
2692 \begin_inset space ~
2697 or the toolbar button
2698 \begin_inset Graphics
2699 filename ../images/marginalnote-insert.png
2706 Margin notes are like footnotes, except that:
2709 \begin_layout Itemize
2710 the on-screen boxes say
2711 \begin_inset Quotes eld
2715 \begin_inset Quotes erd
2719 \begin_inset Quotes eld
2723 \begin_inset Quotes erd
2729 \begin_layout Itemize
2730 the notes will be placed in the margin, instead of below the text
2733 \begin_layout Itemize
2734 margin notes are not numbered
2737 \begin_layout Standard
2738 Change your LyX footnote back to text, then select and change it to a margin
2740 Run LaTeX again to see what the margin note looks like.
2743 \begin_layout Standard
2748 : Fix the footnote in
2753 \begin_layout Section
2755 \begin_inset CommandInset label
2757 name "sec:bibliographies"
2764 \begin_layout Standard
2765 Bibliographies (at least in the exact sciences) are similar to cross references.
2766 The bibliography contains a list of references at the end of the document,
2767 and they can be referenced from within the document.
2768 Like section titles, LyX and LaTeX make your job easier by automatically
2769 numbering the bibliography items and changing citations when the item numbers
2773 \begin_layout Standard
2774 Go to the end of the document and switch to the
2779 Now, each paragraph you type will be a reference.
2781 \begin_inset Quotes eld
2786 The Lyx Tutorial, by the LyX Documentation Team
2789 \begin_inset Quotes erd
2792 as your first reference.
2793 Note that LyX automatically puts a number in a box before each reference.
2794 Click on the boxed reference number, and the
2797 \begin_inset space ~
2807 is to refer to this reference within the LyX document, the
2816 is set (default), you will see the number of the bibliography in the output.
2822 \begin_inset Quotes eld
2826 \begin_inset Quotes erd
2829 to make it easy to remember.
2832 \begin_layout Standard
2833 Now pick somewhere in your document that you would like to insert a reference.
2836 Insert\SpecialChar \menuseparator
2839 or the toolbar button
2840 \begin_inset Graphics
2841 filename ../images/dialog-show-new-inset_citation.png
2853 The right panel in this dialog lists all the bibliography entries, and
2854 this field allows you to choose which bibliography item you want to cite.
2856 \begin_inset Quotes eld
2860 \begin_inset Quotes erd
2863 (right now, that's the only item in the bibliography), then use the
2867 button in the center to insert it.
2868 (You can have multiple citations in the same place by transferring a number
2869 of keys this way.) Now view your file as DVI, and you'll see that the citation
2870 appears in brackets in the text, referring to the bibliography at the end
2874 \begin_layout Standard
2878 \begin_inset space ~
2887 dialog will put a remark (such as a reference to a page or chapter within
2888 the referenced book or article) in the brackets after the reference.
2889 If you want the references to have labels instead of numbers in the printed
2890 output (for example, some journals would use
2891 \begin_inset Quotes eld
2895 \begin_inset Quotes erd
2898 to refer to a paper written by Smith in 1995), use the
2905 \begin_inset space ~
2918 \begin_layout Standard
2923 Fix the bibliography and citation in
2928 \begin_layout Section
2932 \begin_layout Standard
2933 You may want to put a table of contents at the beginning of your document.
2934 LyX makes this very easy to do.
2939 after your document title and before your first section title and choose
2942 Insert\SpecialChar \menuseparator
2944 \begin_inset space ~
2948 \begin_inset space ~
2951 TOC\SpecialChar \menuseparator
2953 \begin_inset space ~
2957 \begin_inset space ~
2964 \begin_inset Quotes eld
2968 \begin_inset Quotes erd
2971 will appear in a button on the first line of the document.
2975 \begin_layout Standard
2976 This may not appear to be very useful.
2977 However, if you look at your DVI file, you will see that a table of contents
2978 has been generated, listing the various sections and subsections in your
2980 As usual, if you reorder sections or create new ones, you will see those
2981 changes in the DVI file when you update it.
2985 \begin_layout Standard
2986 The table of contents is not printed in the on-screen version of the document
2987 to keep the overview in your file.
2988 But you can display the table of contents in a separate window by clicking
2989 on the table of contents button, or by using
2991 Document\SpecialChar \menuseparator
2994 or the toolbar button
2995 \begin_inset Graphics
2996 filename ../images/dialog-toggle_toc.png
3003 This menu will work even if you don't have a table of contents inset in
3005 This is a very useful tool where you can move around your document parts.
3006 Clicking on a (sub)section title in the
3010 window will highlight that line and move the display (in the LyX editing
3011 window) to that place in the document.
3012 You can also use the arrow keys to move up and down in the table of contents.
3013 You may therefore find it convenient to leave this window open throughout
3015 You can get similar functionality from the
3019 menu, though, where the table of contents appears automatically.
3022 \begin_layout Standard
3023 To get rid of the Table of Contents, you can delete the table of contents
3024 button just like any other text.
3027 \begin_layout Standard
3032 : Fix the table of contents in
3037 \begin_layout Chapter
3041 \begin_layout Standard
3042 LaTeX is used by many scientists because it outputs great looking equations,
3043 avoiding the control characters used by word processors and their equation
3045 Many of these scientists are frustrated, however, because writing equations
3046 in LaTeX is more like programming than writing.
3047 Happily, LyX has WYSIWYM support for equations.
3048 If you are used to LaTeX, you'll find that all of the usual LaTeX math
3049 commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3050 If, on the other hand, you've never written in LaTeX, then the
3053 \begin_inset space ~
3058 will allow you to write professional-looking math quickly and easily.
3061 \begin_layout Section
3065 \begin_layout Standard
3066 Somewhere in your LyX document, type:
3069 \begin_layout LyX-Code
3070 I like what Einstein said, E=mc^2, because it's so simple.
3074 \begin_layout Standard
3075 Now, that equation doesn't look very good in LyX and in the output; there's
3076 no space between the letters and the equals sign, and you'd like to write
3077 an actual superscript for the
3078 \begin_inset Quotes eld
3082 \begin_inset Quotes erd
3086 That bad typesetting happened because we didn't tell LyX that we were writing
3087 a mathematical expression, so it typeset the equation like regular old
3091 \begin_layout Standard
3092 Instead, we create a formula that will get typeset properly.
3093 In order to create a formula, just click the toolbar button
3094 \begin_inset Graphics
3095 filename ../images/math-mode.png
3103 Insert\SpecialChar \menuseparator
3104 Math\SpecialChar \menuseparator
3106 \begin_inset space ~
3112 LyX will insert a little blue square, which is an empty math formula.
3118 The expression is typed in blue, and the blue square disappears as soon
3119 as the formula is not empty.
3124 to leave the equation The purple markers disappear, leaving the cursor
3125 to the right of the expression, and now if you type something, it will
3129 \begin_layout Standard
3130 Run LaTeX and look at the output.
3131 Notice that the expression was typeset nicely, with spaces between the
3132 letters and the equals sign, and a superscript
3133 \begin_inset Quotes eld
3137 \begin_inset Quotes erd
3141 Letters in math mode are assumed to be variables, and come out in italics.
3142 Numbers are just numbers.
3145 \begin_layout Standard
3146 This math editor is another example of the WYSIWYM philosophy.
3147 In LaTeX, you write a mathematical expression using text and commands like
3154 ; this can be frustrating, because you can't see what an expression looks
3155 like until you LaTeX the file, and may have to spend time to find e.
3156 \begin_inset space \thinspace{}
3160 \begin_inset space ~
3164 LyX doesn't attempt to get the expression to look perfect (WYSIWYG), but
3165 it gives you an extremely good idea of what the expression will look like.
3166 LaTeX then takes care of the professional typesetting.
3169 \begin_layout Section
3170 Navigating an Equation
3173 \begin_layout Standard
3175 \begin_inset Formula $E=mc^{2}$
3179 \begin_inset Formula $E=1+mc^{2}$
3183 Use the arrow keys to move the cursor into the expression.
3184 Note that when you enter the expression, the purple markers appear to let
3185 you know you're editing math.
3194 to move the cursor past the equals sign, and just type
3195 \begin_inset Quotes eld
3199 \begin_inset Quotes erd
3203 Again, you can use the arrow keys or
3207 to leave the formula\SpecialChar \@.
3211 \begin_layout Standard
3212 Other than the special keys described below, typing in math mode is like
3213 editing regular text.
3223 Select text either with the arrow keys or with the mouse.
3226 Edit\SpecialChar \menuseparator
3229 works in math mode as well as cut and paste.
3230 One thing to be careful of: If you are left or right outside a formula
3239 , respectively, you delete the whole formula.
3240 Luckily, you can just use
3247 \begin_layout Standard
3248 What if you want to change
3249 \begin_inset Formula $E=mc^{2}$
3253 \begin_inset Formula $E=mc^{2.5}+1$
3256 ? Again, you can use the mouse to click in the right place.
3257 However, you can also use the arrow keys.
3258 If the cursor is just after the
3259 \begin_inset Quotes eld
3263 \begin_inset Quotes erd
3267 \begin_inset Quotes eld
3271 \begin_inset Quotes erd
3278 and the cursor is moved to the level of the superscript, just before the
3280 \begin_inset Quotes eld
3284 \begin_inset Quotes erd
3289 \begin_inset Quotes eld
3293 \begin_inset Quotes erd
3301 will move the cursor back to the regular level.
3310 , the cursor will be placed
3314 the superscript (so that you can then type the
3315 \begin_inset Quotes eld
3319 \begin_inset Quotes erd
3325 \begin_layout Section
3326 Exponents and Indices
3329 \begin_layout Standard
3330 An exponent can be entered from the
3333 \begin_inset space ~
3338 (see below), but it's actually simpler just to type the caret key,
3339 \begin_inset Quotes eld
3343 \begin_inset Quotes erd
3347 LyX will place another blue rectangle in the superscript, so that whatever
3348 you write next will be superscripted, and in a smaller font size.
3349 Everything you type until you hit a
3357 to exit the formula entirely) will be in the superscript.
3360 \begin_layout Standard
3361 Writing a subscript (index) is just as easy --- start one by typing the
3363 \begin_inset Quotes eld
3367 \begin_inset Quotes eld
3371 You can subscript and superscript both subscripts and superscripts like
3373 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3380 \begin_layout Standard
3392 \begin_layout Section
3396 \begin_layout Standard
3400 \begin_inset space ~
3405 is a convenient way to enter symbols or to perform complicated formula
3407 Many of these operations can be accomplished from the keyboard or the
3409 Edit\SpecialChar \menuseparator
3414 Insert\SpecialChar \menuseparator
3418 However, we're going to concentrate on using the
3421 \begin_inset space ~
3426 , just to let you know what's out there; you can learn keyboard shortcuts
3427 later, from other manuals.
3430 \begin_layout Standard
3435 is shown when the cursor is in a formula and can also be turned on manually
3438 View\SpecialChar \menuseparator
3442 When you click there on
3443 \begin_inset Quotes eld
3447 \begin_inset Quotes erd
3450 the toolbar will be shown permanently at the bottom; this state is visualized
3455 menu with a checkmark.
3456 When you click in this state again on
3457 \begin_inset Quotes eld
3461 \begin_inset Quotes erd
3472 is only shown when the cursor is within a formula; this state is visualized
3473 by the renaming of the menu entry from
3474 \begin_inset Quotes eld
3478 \begin_inset Quotes erd
3482 \begin_inset Quotes eld
3486 \begin_inset space ~
3490 \begin_inset Quotes erd
3496 \begin_layout Subsection
3500 \begin_layout Standard
3504 \begin_inset space ~
3509 which allow you to choose from a large array of symbols used in math: various
3510 arrows, relations, operators, and sums and integrals.
3511 Note that subscripting and superscripting allow you to put lower and upper
3512 limits on sums and integrals.
3516 \begin_layout Standard
3517 \begin_inset Quotes eld
3520 Nothing you can do that can't be done\SpecialChar \ldots{}
3522 \begin_inset Formula $\heartsuit$
3526 \begin_inset Quotes erd
3532 \begin_layout Subsection
3533 Square roots, accents, and delimiters
3536 \begin_layout Standard
3537 To type a square root, just click on the button
3538 \begin_inset Graphics
3539 filename ../images/math/sqrt.png
3546 The square root appears, and the cursor is in a new insertion point inside
3548 You can type variables, numbers, other square roots, fractions, whatever
3550 LyX will automatically resize the square root to fit what's inside.
3553 \begin_layout Standard
3554 Accenting a character (
3555 \begin_inset Formula $\overrightarrow{v}$
3558 ) or group of characters (
3559 \begin_inset Formula $\overrightarrow{a+b}$
3562 ) is done the same way.
3563 Decorations are available from the toolbar via the button
3564 \begin_inset Graphics
3565 filename ../images/math/hat.png
3572 Click on a decoration, and LyX will insert that decoration with an insertion
3573 point under (or over) it.
3574 Just type what you want in the insertion point.
3575 There are two sets of decorations: those that resize with the text you
3576 type, and those that have fixed size, and are most appropriate for a single
3581 \begin_layout Standard
3582 Delimiters such as parentheses, brackets, and braces work similarly, but
3583 are a bit more complicated.
3584 Hit the delimiter button
3585 \begin_inset Graphics
3586 filename ../images/dialog-show_mathdelimiter.png
3597 Your current selection of delimiters is displayed in a box.
3598 It's a pair of parentheses by default, but you can choose a pair of braces,
3599 a brace and a parenthesis, or choose the empty square to have something
3601 \begin_inset Quotes eld
3605 \begin_inset Formula $a=\left\langle 7\right.$
3609 \begin_inset Quotes erd
3612 (the empty delimiter is displayed as a broken line in LyX, but won't show
3616 \begin_layout Standard
3617 If you're lazy, you can type actual parentheses in math mode, rather than
3623 However, those parentheses will be the same size as regular text, which
3624 will look bad if you have a big fraction or matrix inside the parentheses.
3625 So better use in this case one of the three delimiter buttons that insert
3627 \begin_inset space \thinspace{}
3631 \begin_inset space ~
3635 \begin_inset space \thinspace{}
3641 \begin_layout Standard
3642 You can also put delimiters or a square root sign or a decoration on already
3643 existing formula parts.
3644 Select the portion of the formula that you want to adjust, and then click
3645 on the button you want from the
3648 \begin_inset space ~
3654 Try using this to change Newton's second law from scalar to vector form
3656 \begin_inset Formula $f=ma$
3660 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3664 Once you've learned about matrices, this is how you'll put parentheses
3665 or brackets around them.
3668 \begin_layout Subsection
3672 \begin_layout Standard
3673 To create a fraction, click on the fraction button
3674 \begin_inset Graphics
3675 filename ../images/math/frac.png
3685 \begin_inset space ~
3691 LyX writes two insertion points in a fraction.
3692 As you would expect, you can use arrow keys or the mouse to move around
3694 Click on the top square and type
3695 \begin_inset Quotes eld
3699 \begin_inset Quotes erd
3708 \begin_inset Quotes eld
3712 \begin_inset Quotes erd
3716 You've made a fraction! Of course you can type anything within each of
3717 the two boxes: variables with exponents, square roots, other fractions,
3722 \begin_layout Standard
3734 \begin_layout Subsection
3735 TeX mode: Limits, log, sin and others
3738 \begin_layout Standard
3739 Because letters in math mode are considered to be variables, if you type
3741 \begin_inset Quotes eld
3745 \begin_inset Quotes erd
3748 in math mode, LyX thinks you are typing the product of the three variables
3750 \begin_inset Formula $s$
3754 \begin_inset Formula $i$
3758 \begin_inset Formula $n$
3762 The three letters will be typeset in italics, when what you really wanted
3764 \begin_inset Quotes eld
3768 \begin_inset Quotes erd
3772 In addition, LyX won't put a space between the word
3773 \begin_inset Quotes eld
3777 \begin_inset Quotes erd
3781 \begin_inset Quotes eld
3785 \begin_inset Quotes erd
3792 will exit the formula).
3794 \begin_inset Quotes eld
3798 \begin_inset Formula $\sin(x)$
3802 \begin_inset Quotes erd
3806 \begin_inset Quotes eld
3810 \begin_inset Formula $sin(x)$
3814 \begin_inset Quotes erd
3820 \begin_layout Standard
3824 \begin_inset space ~
3830 \begin_inset Graphics
3831 filename ../images/math/functions.png
3838 \begin_inset Quotes eld
3842 \begin_inset Quotes erd
3845 in the appearing function list.
3847 \begin_inset Quotes eld
3851 \begin_inset Quotes erd
3854 is displayed in LyX in black, and set in upright roman type.
3855 The whole word is treated as one symbol, so if you type
3859 , it will delete the whole word.
3861 \begin_inset Quotes eld
3865 \begin_inset Quotes erd
3868 , which will be written in blue italics, like you expect in a formula.
3869 In the output, the expression will be correctly typeset.
3873 \begin_layout Standard
3874 The function list include other trigonometric functions and their inverses,
3875 hyperbolic functions, logarithms, limits, and quite a few others.
3876 These functions can take subscripts and superscripts, important for typing
3878 \begin_inset Quotes eld
3882 \begin_inset Formula $\cos^{2}\theta$
3886 \begin_inset Quotes erd
3890 \begin_inset Quotes eld
3894 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3898 \begin_inset Quotes erd
3904 \begin_layout Standard
3916 \begin_layout Subsection
3918 \begin_inset CommandInset label
3927 \begin_layout Standard
3928 Click on the matrix button
3929 \begin_inset Graphics
3930 filename ../images/dialog-show_mathmatrix.png
3939 \begin_inset space ~
3945 The appearing dialog allows you to choose how many rows and columns you
3946 want in your matrix.
3947 Choose 2 rows and 3 columns and hit
3952 LyX prints 6 insertion points in a
3953 \begin_inset Formula $2\times3$
3957 As usual, you can put any sort of formula expression (a square root, another
3958 matrix, etc.) in each insertion point.
3959 You can also leave some of the insertion points empty if you want.
3962 \begin_layout Standard
3967 can be used to move horizontally between the columns of a matrix.
3968 Alternatively, you can use the arrow keys to move around - hitting
3972 at the end of one box will move to the next box,
3976 will move to the next row, etc.
3979 \begin_layout Standard
3980 If you need to change the number of rows and columns, use the menu
3982 Edit\SpecialChar \menuseparator
3983 Math\SpecialChar \menuseparator
3985 \begin_inset space \thinspace{}
3989 \begin_inset space \thinspace{}
3994 or the math toolbar buttons
3995 \begin_inset Graphics
3996 filename ../images/tabular-feature_append-row.png
4003 \begin_inset Graphics
4004 filename ../images/tabular-feature_delete-row.png
4011 \begin_inset Graphics
4012 filename ../images/tabular-feature_append-column.png
4019 \begin_inset Graphics
4020 filename ../images/tabular-feature_delete-column.png
4029 \begin_layout Standard
4034 for information on how to change the horizontal alignment of each column,
4035 and how to change the vertical position of the whole matrix.
4036 Note that if you want to write a table containing text, you should use
4037 LyX's wonderful table support, rather than trying to write text in a matrix.
4040 \begin_layout Subsection
4044 \begin_layout Standard
4045 All of the expressions we have written so far have been on the same line
4046 as the text that came before and after them, otherwise known as inline
4048 This is fine for short, simple expressions, but if you want to write larger
4049 ones, or if you want your expressions to stand out from the text, you need
4050 to write them in display mode.
4051 In addition, only displayed expressions can be labeled and numbered (see
4056 ), and multi-line equations must be in display mode.
4059 \begin_layout Standard
4060 Click on the display button
4061 \begin_inset Graphics
4062 filename ../images/math-display.png
4071 \begin_inset space ~
4076 , which represents a couple lines of text before and after a centered blue
4078 LyX inserts a formula, but the insertion point is on a new line, and it's
4079 centered within that line.
4080 Now type an expression and run LaTeX to see how it looks.
4081 The display button is actually a toggle; use it now to change a couple
4082 of your expressions to display mode and back.
4086 \begin_layout Standard
4087 Display mode has a couple differences from inline mode:
4090 \begin_layout Itemize
4091 The default font is larger for a few symbols, like
4092 \begin_inset Formula $\sum$
4096 \begin_inset Formula $\int$
4102 \begin_layout Itemize
4103 Subscripts and superscripts for limits and sums (but not integrals) are
4104 written under rather than next to the symbols
4107 \begin_layout Itemize
4111 \begin_layout Standard
4112 Other than these differences, though, displayed expressions and inline expressio
4113 ns are very similar.
4116 \begin_layout Standard
4117 One final note about the way displayed formulas are typeset: Be careful
4118 about whether you're putting your equation into a new paragraph or not.
4119 If your formula is in the middle of a sentence or paragraph, then don't
4125 Doing so will cause the text
4129 the formula to start a new paragraph.
4130 That text will therefore eventually be indented, depending on your document
4131 paragraph settings, which is probably not what you want.
4134 \begin_layout Standard
4139 : Put the various equations in
4143 into display mode, and see how they're typeset differently.
4146 \begin_layout Standard
4151 : Using various tools you've learned in this section, you should be able
4152 to write an equation like
4156 \begin_layout Plain Layout
4157 After you've done it the hard way, give
4159 Insert\SpecialChar \menuseparator
4160 Math\SpecialChar \menuseparator
4162 \begin_inset space ~
4173 \begin_inset Formula \[
4174 f(x)=\left\{ \begin{array}{cc}
4177 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4184 \begin_layout Section
4188 \begin_layout Standard
4189 LyX's math editor can do plenty more.
4190 By now, you're familiar with the basics, so we refer to the
4197 \begin_layout Itemize
4198 Labeling and numbering expressions
4201 \begin_layout Itemize
4202 Multi-line equations
4205 \begin_layout Itemize
4206 Change typefaces, e.g., to write bold-face text in an expression.
4209 \begin_layout Itemize
4210 Fine-tune font sizes and spacing within an expression.
4211 (Don't worry about this until your final draft!)
4214 \begin_layout Itemize
4216 These are very powerful, because you just define them once at the top of
4217 the document, and then you can use them throughout the document.
4220 \begin_layout Itemize
4221 Do lots of other things that can't be mentioned in this Tutorial.
4224 \begin_layout Chapter
4228 \begin_layout Section
4229 Other major LyX Features
4232 \begin_layout Standard
4233 We haven't gone through all the possible commands in LyX, and we aren't
4242 \begin_inset space ~
4247 manual for more information.
4248 We'll just mention a couple more major things LyX can do:
4251 \begin_layout Itemize
4252 LyX has WYSIWYM support for tables.
4255 Insert\SpecialChar \menuseparator
4259 \begin_inset Graphics
4260 filename ../images/tabular-insert.png
4267 Click on the table with the
4274 \begin_inset space ~
4279 dialog box which allows extensive table editing.
4282 \begin_layout Itemize
4283 LyX also supports including pictures in any format within documents.
4286 Insert\SpecialChar \menuseparator
4290 \begin_inset Graphics
4291 filename ../images/dialog-show-new-inset_graphics.png
4298 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4299 can have captions, and LyX will automatically generate lists of figures
4303 \begin_layout Itemize
4304 LyX is heavily configurable.
4305 Everything from how the LyX window looks to how the output comes out can
4306 be configured in a number of ways.
4307 Much configuration is done through
4309 Tools\SpecialChar \menuseparator
4313 For more information on this, check out
4315 Help\SpecialChar \menuseparator
4316 Customization\SpecialChar \@.
4320 \begin_layout Itemize
4321 LyX is being developed by a team of programmers on five continents.
4322 Therefore, LyX has better support for non-English languages (such as Dutch,
4323 German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4324 ) than many word processors.
4325 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4326 languages Chinese Japanese, and Korean are supported.
4327 You can write documents in other languages and you can also configure LyX
4328 to show its menus and error messages in other languages.
4332 \begin_layout Itemize
4333 The LyX menus feature keybindings.
4334 This means that you can do
4336 File\SpecialChar \menuseparator
4347 or by using the binding which is shown next to it in the menu (C-O by default).
4348 Keybindings are also configurable.
4349 For information on this, check out
4351 Help\SpecialChar \menuseparator
4352 Customization\SpecialChar \@.
4356 \begin_layout Itemize
4357 LyX can read LaTeX documents.
4359 \begin_inset space ~
4363 \begin_inset CommandInset ref
4365 reference "sec:tex2lyx"
4372 \begin_layout Itemize
4373 Spellchecking, thesaurus, and word count facilities are available.
4376 \begin_layout Itemize
4377 Generation of indexes and nomenclatures/glossaries is supported.
4380 \begin_layout Section
4382 \begin_inset CommandInset label
4384 name "sec:latexusers"
4391 \begin_layout Standard
4392 If you don't know anything about LaTeX, you don't have to read this section.
4393 Actually, you might want to
4397 about LaTeX, and then read this chapter.
4398 However, some who begin to use LyX will be familiar with LaTeX.
4399 If you are such a person, you may be wondering if LyX can really do everything
4401 The short answer is that LyX can do pretty much everything LaTeX can do
4402 in one form or another, and it definitely simplifies most parts of writing
4406 \begin_layout Standard
4407 Because this is just a tutorial, we are only going to mention things that
4408 new LyX users will most likely be interested in.
4409 In the interests of keeping the Tutorial short, we will give only minimal
4414 \begin_inset space ~
4422 \begin_inset space ~
4427 manual have a great deal of information on differences between LyX and
4428 LaTeX, and how to do various LaTeX tricks in LyX.
4431 \begin_layout Subsection
4435 \begin_layout Standard
4436 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4437 will be displayed in red on the screen.
4438 You can use TeX commands in LyX by choosing
4440 Insert\SpecialChar \menuseparator
4442 \begin_inset space ~
4448 \begin_inset Graphics
4449 filename ../images/ert-insert.png
4456 This creates a box where everything within it is passed straight to LaTeX.
4459 \begin_layout Standard
4460 In a math formula, TeX mode is handled a bit differently.
4461 TeX mode is there entered by typing a backslash.
4462 The backslash is not written out, but anything you type afterwards will
4464 You exit TeX mode by typing
4468 or some other non-alphabetic character, like a number, underscore, caret,
4470 Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4471 will convert it to WYSIWYM\SpecialChar \@.
4473 \begin_inset Quotes eld
4483 \begin_inset Quotes erd
4486 in a formula and then press
4490 , LyX will change the red
4491 \begin_inset Quotes eld
4495 \begin_inset Quotes erd
4499 \begin_inset Quotes eld
4503 \begin_inset Formula $\gamma$
4507 \begin_inset Quotes erd
4511 This will work for almost all, non-complicated math macros.
4512 This may be faster than using the
4515 \begin_inset space ~
4520 , and will be especially convenient for experienced LaTeX users.
4523 \begin_layout Standard
4524 As a special case, if you type a brace in TeX mode, then the beginning
4528 ending braces will be inserted in red, then take you
4532 of TeX mode and place the cursor between the braces.
4533 This makes it more convenient to type commands that LyX doesn't know which
4537 \begin_layout Standard
4538 LyX can't do absolutely everything that LaTeX can do.
4539 Some fancy functions are not supported at all, while some work but aren't
4541 TeX mode allows users to get the full flexibility of LaTeX, while having
4542 all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4543 LyX could never support every LaTeX package.
4550 in the preamble (see section
4551 \begin_inset space ~
4555 \begin_inset CommandInset ref
4557 reference "sec:preamble"
4561 ), you can use any package you want --- although you won't have WYSIWYM
4562 support for that package's features.
4565 \begin_layout Subsection
4566 Importing LaTeX Documents ---
4571 \begin_inset CommandInset label
4580 \begin_layout Standard
4581 You can import a LaTeX file into LyX by using the
4583 File\SpecialChar \menuseparator
4584 Import\SpecialChar \menuseparator
4586 \begin_inset space ~
4592 This will call the program
4596 which will create a file
4604 and then open that file.
4605 If the translation doesn't work, you can try calling
4609 from the command line, possibly using fancier options.
4612 \begin_layout Standard
4617 will translate most legal LaTeX, but not everything.
4618 It will leave things it doesn't understand in TeX mode, so after translating
4623 , you can look for red text and hand-edit it to look right.
4626 \begin_layout Standard
4631 has its own manpage.
4632 Read it to find out about which LaTeX commands and environments aren't
4633 supported, bugs (and how to get around them), and how to use the various
4637 \begin_layout Subsection
4638 Converting LyX Documents to LaTeX
4641 \begin_layout Standard
4642 You might wish to convert a LyX Document to a LaTeX file.
4643 For example, a co-worker or co-author who doesn't have LyX might want to
4647 File\SpecialChar \menuseparator
4648 Export\SpecialChar \menuseparator
4652 This will create a file
4660 file you are editing.
4661 LyX always creates temporary LaTeX files when viewing or printing files.
4664 \begin_layout Subsection
4668 \begin_layout Subsubsection
4672 \begin_layout Standard
4675 Document\SpecialChar \menuseparator
4678 dialog takes care of many of the options that you would input in a
4685 Change the class, default font size and paper size here.
4686 Put any extra options to the
4699 \begin_inset space ~
4707 \begin_layout Subsubsection
4708 Other Preamble Matter
4709 \begin_inset CommandInset label
4718 \begin_layout Standard
4719 If you have special commands to put in the preamble of a LaTeX file, you
4720 can use them in a LyX document as well.
4723 Document\SpecialChar \menuseparator
4724 Settings\SpecialChar \menuseparator
4726 \begin_inset space ~
4731 and type in the dialog window (or from the document settings dialog, depending
4733 Anything you type will (like with TeX mode) be sent directly to LaTeX.
4736 \begin_layout Subsection
4740 \begin_layout Standard
4741 LyX has support for BibTeX, which allows you to build databases of bibliographic
4742 al references to be used in multiple documents.
4748 nsert\SpecialChar \menuseparator
4750 \begin_inset space ~
4754 \begin_inset space ~
4761 C\SpecialChar \menuseparator
4767 \begin_inset space ~
4781 field you load BibTeX files, in the
4785 field you can load BibTeX style files.
4788 \begin_layout Standard
4789 After you've done this, you can use citations from any bibliographies you're
4792 Insert\SpecialChar \menuseparator
4796 \begin_inset space ~
4800 \begin_inset CommandInset ref
4802 reference "sec:bibliographies"
4807 LyX will take care of running BibTeX.
4812 dialog will show a list of all the references in your
4819 \begin_layout Section
4823 \begin_layout Standard
4824 Sometimes when you LaTeX a document, there will be errors, things that LyX
4825 or LaTeX can't understand.
4826 When this happens, LyX will open a
4829 \begin_inset space ~
4835 Clicking on individual errors in this dialog will take you to the place
4836 in the LyX document where the error occurs and also display the detailed
4837 LaTeX error message.