1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/doc/
9 % DO NOT ALTER THIS PREAMBLE!!!
11 %This preamble is designed to ensure that the document prints
12 % out as advertised. If you mess with this preamble,
13 % parts of the document may not print out as expected. If you
14 % have problems LaTeXing this file, please contact
15 % the documentation team
16 % email: lyx-docs@lists.lyx.org
18 % the pages of the TOC is numbered roman
19 % and a pdf-bookmark for the TOC is added
20 \let\myTOC\tableofcontents
21 \renewcommand\tableofcontents{%
23 \pdfbookmark[1]{\contentsname}{}
27 \use_default_options false
31 \maintain_unincluded_children false
33 \language_package default
36 \font_roman "palatino" "default"
37 \font_sans "helvet" "default"
38 \font_typewriter "courier" "default"
39 \font_math "auto" "auto"
40 \font_default_family default
41 \use_non_tex_fonts false
44 \font_sf_scale 100 100
45 \font_tt_scale 100 100
47 \default_output_format pdf2
49 \bibtex_command default
50 \index_command default
54 \pdf_title "The LyX Tutorial"
55 \pdf_author "LyX Team"
56 \pdf_subject "LyX-documentation Tutorial"
57 \pdf_keywords "LyX, documentation"
59 \pdf_bookmarksnumbered true
60 \pdf_bookmarksopen true
61 \pdf_bookmarksopenlevel 1
66 \pdf_pdfusetitle false
67 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
70 \use_package amsmath 0
71 \use_package amssymb 0
74 \use_package mathdots 1
75 \use_package mathtools 0
77 \use_package stackrel 0
78 \use_package stmaryrd 0
79 \use_package undertilde 0
81 \cite_engine_type default
85 \paperorientation portrait
95 \paragraph_separation indent
96 \paragraph_indentation default
97 \quotes_language english
100 \paperpagestyle headings
101 \tracking_changes false
102 \output_changes false
105 \html_be_strict false
116 by the \SpecialChar LyX
121 \begin_layout Plain Layout
123 If you have comments on or corrections to this documentation, please send
124 them to the \SpecialChar LyX
125 Documentation mailing list:
126 \begin_inset CommandInset href
128 target "lyx-docs@lists.lyx.org"
141 \begin_layout Standard
142 \begin_inset CommandInset toc
143 LatexCommand tableofcontents
150 \begin_layout Chapter
154 \begin_layout Section
155 Welcome to \SpecialChar LyX
159 \begin_layout Standard
160 This manual is designed for all of you who have never heard of \SpecialChar LaTeX
163 Now, do not panic – you will not need to learn \SpecialChar LaTeX
164 to use \SpecialChar LyX
166 That is, after all, the whole point of \SpecialChar LyX
167 : to provide an almost-WYSIWYG interface
168 to \SpecialChar LaTeX
170 There are some things you will need to learn, however, in order to use
175 \begin_layout Standard
176 Some of you probably found your way to this document because you tried to
177 put two spaces after a
178 \begin_inset Quotes eld
182 \begin_inset Quotes erd
185 or tried to put three blank lines between paragraphs.
186 You found out you could not and, in fact, you will find out that most of
187 the little tricks you are accustomed to use in word processors will not
188 work in \SpecialChar LyX
190 That is because most word processors you have used before allow you manually
191 to enter all spacings, font changes, and so on.
192 So you end up not only writing a document but typesetting it, too.
194 does the typesetting for you, in a consistent fashion, letting you focus
195 on the important things, like the content of your writing.
198 \begin_layout Standard
199 So read on to learn more about \SpecialChar LyX
201 Reading this tutorial is definitely worth the time.
204 \begin_layout Section
214 \begin_layout Standard
215 Before we get started with this section, you need to know that this
219 uses the notation outlined in the
224 If you came to this manual first, please read the
228 before you continue with the
235 \begin_layout Standard
236 Now that you know which fonts mean what in the documentation, we want to
237 talk a bit about what this
244 \begin_layout Subsection
245 Getting the most out of the Tutorial
248 \begin_layout Standard
249 This tutorial consists of examples and exercises.
250 To get the most out of this document, you should read through it, typing
251 all the little things we are telling you to type and trying out all of
252 the exercises to see if you get them right.
253 For convenience, you might want to print out the PDF version of this document.
256 \begin_layout Standard
257 If you are familiar with \SpecialChar LaTeX
258 , you will probably be able to read the
262 somewhat faster, since many \SpecialChar LyX
263 ideas are just \SpecialChar LaTeX
265 However, \SpecialChar LyX
266 has features you will want to learn about.
267 Even if you do not feel like reading the rest of the
271 , you should definitely check out Section
276 \begin_inset CommandInset ref
278 reference "sec:latexusers"
282 , which is specifically written for experienced \SpecialChar LaTeX
286 \begin_layout Subsection
294 \begin_layout Itemize
295 Detailed explanations of all of \SpecialChar LyX
297 \begin_inset Separator latexpar
304 \begin_layout Standard
313 \begin_layout Itemize
314 Detailed explanations of \SpecialChar LaTeX
316 \begin_inset Separator latexpar
323 \begin_layout Standard
325 If you want to learn some of the neat tricks you can do with \SpecialChar LaTeX
328 can have a look at the
340 \begin_layout Standard
341 It is time to move on, time for your first document \SpecialChar ldots
345 \begin_layout Chapter
346 Getting started with \SpecialChar LyX
350 \begin_layout Section
351 Your first \SpecialChar LyX
355 \begin_layout Standard
356 OK\SpecialChar endofsentence
357 You are ready to start writing.
358 Before you do, there are a few things we need to mention, which will hopefully
359 make the Tutorial more instructive and useful.
363 \begin_layout Standard
364 Because there is information we cannot give you in the Tutorial, the
370 thing that you need to do is find the
377 Start up \SpecialChar LyX
387 You may want to load the
391 as well (if you are not reading it within \SpecialChar LyX
393 This way, you can read them while you are writing your own file.
397 \begin_layout Plain Layout
398 They can also serve as good examples of how to use the many features of
405 Note that once you have got more than one document open, you can use the
410 menu or the document tabs to switch between them.
413 \begin_layout Standard
414 In this Tutorial, we are going to assume that you have a fully working version
416 , as well as a \SpecialChar LaTeX
417 -distribution and a PDF-viewer.
418 This should be the case on all major Linux- and BSD-distributions, as well
419 as on Windows, where this is setup by the \SpecialChar LyX
423 \begin_layout Standard
424 Finally, we have written a file called
428 to let you practice your \SpecialChar LyX
430 Imagine that it was typed by someone who did not know about any of \SpecialChar LyX
433 As you learn new \SpecialChar LyX
434 functions, we will suggest that you fix those parts of
440 It also contains `subtle' hints about how to fix things.
444 \begin_layout Plain Layout
445 The hints are located in yellow
446 \begin_inset Quotes eld
450 \begin_inset Quotes erd
454 Access the text in a note by clicking on it.
459 If you want to cheat, or check what you have done, there is also a file
461 \begin_inset Newline newline
468 which contains the same text written and typeset by a \SpecialChar LyX
472 \begin_layout Standard
473 The example files can be found in the
477 directory of \SpecialChar LyX
478 's installation folder.
485 File\SpecialChar menuseparator
492 to save a copy in your own directory for you to work on.
493 As you fix parts of the raw document, check to see how those changes affect
497 \begin_layout Standard
502 directory contains lots of other examples files.
503 They will show you how to do various fancy things with \SpecialChar LyX
505 After you have read the Tutorial, or when you are confused about how to
506 do something fancy in \SpecialChar LyX
507 , take a look at these files.
510 \begin_layout Subsection
511 Typing, Viewing, and Exporting
514 \begin_layout Itemize
517 File\SpecialChar menuseparator
521 \begin_layout Itemize
522 Type a sentence like:
524 This is my first \SpecialChar LyX
528 \begin_layout Itemize
529 Save your document with
531 File\SpecialChar menuseparator
536 As\SpecialChar endofsentence
540 \begin_layout Itemize
541 Create a PDF file, with
543 Document\SpecialChar menuseparator
546 or the toolbar button
554 will open a PDF-viewer program displaying your document as it will look
559 \begin_layout Plain Layout
560 You can save time by leaving the PDF-viewer running in the background.
563 Document\SpecialChar menuseparator
566 or the toolbar button
572 and just click on the PDF-viewer window (or unminimize it) afterwards.
580 \begin_layout Itemize
581 Export the ready to print document with
583 File\SpecialChar menuseparator
591 \begin_layout Standard
592 Congratulations! You have written your first \SpecialChar LyX
594 All of the rest is just details.
597 \begin_layout Subsection
601 \begin_layout Standard
603 can of course do most of the things you are used to doing with a word processor.
604 It will word-wrap and indent paragraphs automatically.
605 Here is a quick description of how to do some simple actions.
608 \begin_layout Description
609 Undo \SpecialChar LyX
610 has multiple levels of undo, which means you can undo everything you
611 have done since your current editing session started, by selecting
613 Edit\SpecialChar menuseparator
622 ) over and over again.
623 If you undo too much, just select
625 Edit\SpecialChar menuseparator
635 \begin_inset Separator latexpar
642 \begin_layout Standard
643 Currently, undo is limited to 100 steps.
647 \begin_layout Description
650 Edit\SpecialChar menuseparator
661 Edit\SpecialChar menuseparator
672 Edit\SpecialChar menuseparator
681 ) to cut, copy, and paste.
682 Or automatically paste selected text (including selections from other programs)
690 \begin_layout Description
693 Edit\SpecialChar menuseparator
707 arg "dialog-show findreplace"
711 In the dialog, search with the
723 button to replace a word you have found.
727 \begin_layout Plain Layout
728 Close the window when you are done or leave it open if you find it more
730 Most dialog boxes in \SpecialChar LyX
731 can operate like this.
732 Just be sure you have the right window in focus when you are trying to
733 type in the main \SpecialChar LyX
734 window or a \SpecialChar LyX
740 If you like, you can specify whether to make the search case-sensitive,
741 or to search for only complete words; you can also search backwards through
745 \begin_layout Description
760 , which will by default print characters in italics), set it in
770 , usually small caps, used for people's names), or use your own formatting
773 Edit\SpecialChar menuseparator
778 Style\SpecialChar menuseparator
781 dialog (toolbar button
784 arg "dialog-show character"
790 \begin_layout Description
791 Toolbar Other buttons on the toolbar allow you to do some of the more popular
819 \begin_layout Standard
820 Of course, you have not yet written enough to make most of these functions
822 As you write more, though, try undoing, pasting, etc.
825 \begin_layout Subsection
826 WYSIWYM: Whitespace in \SpecialChar LyX
830 \begin_layout Standard
831 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
834 As many times as you hit
838 , you will only get one blank line.
839 As many times as you hit
843 , you will only get one space.
844 On a blank line, \SpecialChar LyX
845 will not let you type even one space.
850 key will not move you forward one tab stop; in fact there
854 no tab stops! There is no ruler at the top of the page to let you set tabs
858 \begin_layout Standard
859 Many word processors are based on the WYSIWYG principle:
860 \begin_inset Quotes eld
863 What You See Is What You Get.
864 \begin_inset Quotes erd
868 , on the other hand, is based on the principle that
869 \begin_inset Quotes eld
872 What You See Is What You
877 \begin_inset Quotes erd
880 You type what you mean and \SpecialChar LyX
881 will take care of typesetting it for you so
882 that the output looks nice.
887 grammatically separates paragraphs and a
891 grammatically separates words; so there is no reason to have several of
896 has no grammatical function at all – so \SpecialChar LyX
898 Using \SpecialChar LyX
899 , you will spend more of your time worrying about the
903 of your document and less time worrying about the
912 for more information on the WYSIWYM concept.
915 \begin_layout Standard
917 does have (many) ways to fine-tune the formatting of your document.
918 After all, \SpecialChar LyX
928 has information about all that.
929 It includes horizontal fills and vertical space — which are more powerful
930 and versatile than multiple spaces or blank lines — and ways to change
931 font sizes, character styles, and paragraph alignments by hand.
932 The idea, though, is that you can write your whole document, focusing on
933 content, and just worry about that fine-tuning at the end.
934 With standard word processors, you will be distracted by document formatting
935 throughout the writing process.
938 \begin_layout Section
942 \begin_layout Standard
943 Different parts of a document have different purposes; we call these parts
949 Most of a document is made up of regular text.
950 Section titles (chapter, subsection, etc.) let the reader know that a new
951 topic or subtopic will be discussed.
952 Certain types of documents have special environments.
953 A journal article will have an abstract and a title.
954 A letter will have neither of these, but will probably have an environment
955 that gives the writer's address.
958 \begin_layout Standard
959 Environments are a major part of the
960 \begin_inset Quotes eld
963 What You See Is What You Mean
964 \begin_inset Quotes erd
967 philosophy of \SpecialChar LyX
969 A given environment may require a certain font style, font size, indenting,
970 line spacing, and more.
971 This problem is aggravated, because the exact formatting for a given environmen
972 t may change: one journal may use boldface, 18 point, centered type for
973 section titles while another uses italicized, 15 point, left justified
974 type; different languages may have different standards for indenting; and
975 bibliography formats can vary widely.
977 lets you avoid learning all the different formatting styles.
980 \begin_layout Standard
985 choice box is located on the left end of the toolbar and looks like this:
987 \begin_inset Graphics
988 filename clipart/ToolbarEnvBox.png
995 It indicates in which environment you are currently writing.
996 While you were writing your first document, it said
997 \begin_inset Quotes eld
1001 \begin_inset Quotes erd
1004 which is the default environment for text.
1005 Now you will put a number of environments in your new document so that
1006 you can see how they work.
1009 \begin_layout Subsection
1010 Sections and Subsections
1013 \begin_layout Standard
1018 on the first line of your new \SpecialChar LyX
1031 \begin_layout Plain Layout
1037 If nothing is selected, \SpecialChar LyX
1038 changes the paragraph you are currently in to
1039 the selected environment.
1040 Alternatively, you can change several paragraphs to a different environment
1041 by selecting them before picking an environment.
1058 , which will be covered below.
1061 \begin_inset Quotes eld
1065 \begin_inset Quotes erd
1068 and typesets the section heading (title) in a larger font.
1073 \SpecialChar endofsentence
1079 \begin_inset Quotes eld
1083 \begin_inset Quotes erd
1087 \begin_inset Quotes eld
1091 \begin_inset Quotes erd
1095 Section headings, like most environments, are assumed to end when you type
1100 \SpecialChar endofsentence
1101 Type the document introduction:
1104 \begin_layout LyX-Code
1105 This is an introduction to my first \SpecialChar LyX
1109 \begin_layout Standard
1125 \begin_inset Quotes eld
1129 \begin_inset Quotes erd
1132 and waits for you to type a title.
1134 \begin_inset Quotes eld
1140 \begin_inset space ~
1146 \begin_inset Quotes erd
1149 , and you will see that \SpecialChar LyX
1150 again sets it as a section title.
1153 \begin_layout Standard
1155 Go to the end of Section
1156 \begin_inset space ~
1160 \begin_inset Quotes eld
1163 my first \SpecialChar LyX
1165 \begin_inset Quotes erd
1181 Again, \SpecialChar LyX
1183 \begin_inset Quotes eld
1187 \begin_inset Quotes erd
1190 and waits for you to type a title.
1197 \begin_inset space ~
1201 \begin_inset Quotes eld
1205 \begin_inset Quotes erd
1209 \begin_inset space ~
1212 2, has been automatically renumbered to Section
1213 \begin_inset space ~
1216 3! In true WYSIWYM fashion, you just need to identify the text that makes
1217 up the section titles, and \SpecialChar LyX
1218 takes care of numbering the sections and typesettin
1222 \begin_layout Standard
1231 environment, and type the following five lines:
1234 \begin_layout LyX-Code
1235 Sections and subsections are described below.
1238 \begin_layout LyX-Code
1242 \begin_layout LyX-Code
1243 Sections are bigger than subsections.
1246 \begin_layout LyX-Code
1247 Subsection description
1250 \begin_layout LyX-Code
1251 Subsections are smaller than sections.
1254 \begin_layout Standard
1255 Click on the second line and select
1265 numbers the subsection
1266 \begin_inset Quotes eld
1270 \begin_inset Quotes erd
1273 , and typesets it in a font which is bigger than regular text but smaller
1274 than the section title.
1275 Change the fourth line to the
1279 environment as well.
1280 As you probably expected, \SpecialChar LyX
1281 automatically numbered the section
1282 \begin_inset Quotes eld
1286 \begin_inset Quotes erd
1290 If you put yet another section before Section
1291 \begin_inset space ~
1295 \begin_inset space ~
1298 2 will be renumbered as Section 3, and the subsections will be renumbered
1300 \begin_inset Quotes eld
1304 \begin_inset Quotes erd
1308 \begin_inset Quotes eld
1312 \begin_inset Quotes erd
1318 \begin_layout Standard
1319 Further levels of sectioning include
1332 We will let you play with these on your own.
1333 You may notice that paragraph and subparagraph headings are not numbered
1334 by default, and that subparagraphs are indented; see the
1338 for an explanation and how to change this.
1343 headings are actually the highest level of sectioning, above
1347 s, but you are only allowed to use them in certain types (text classes)
1349 documents (see Section
1350 \begin_inset space ~
1354 \begin_inset CommandInset ref
1356 reference "sec:Document-Classes"
1363 \begin_layout Standard
1364 Finally, you may want to have sections or subsections that are not numbered.
1365 There are environments for this as well.
1366 If you change one of your section headings to the
1370 environment (you may have to scroll down in the
1374 box to find it), \SpecialChar LyX
1375 will use the same font size for the heading as it uses
1376 for a regular section, but it will not number that section.
1377 There are corresponding
1378 \begin_inset Quotes eld
1382 \begin_inset Quotes erd
1385 heading environments for
1394 Try changing some of your sections or subsections to the starred environments,
1395 and note how the other section numbers are updated.
1398 \begin_layout Labeling
1399 \labelwidthstring 00.00.0000
1404 : Fix the section and subsection headings in
1405 \begin_inset Newline newline
1416 \begin_layout Subsection
1420 \begin_layout Standard
1422 has several different environments for typesetting lists.
1423 The various list environments free you from hitting
1427 a million times when writing an outline, or from renumbering a whole list
1428 when you want to add a point in the middle of the list.
1429 Different types of documents logically require different list environments:
1432 \begin_layout Itemize
1433 A slide presentation might use the
1437 environment's bulleted lists to describe different points.
1440 \begin_layout Itemize
1441 An outline would use the
1445 environment's numbered lists (and lettered sublists).
1448 \begin_layout Itemize
1449 A document describing several software packages could use the
1453 environment, where each item in the list begins with a bold-faced word.
1456 \begin_layout Itemize
1465 ) environment is a variation on the
1472 \begin_layout Standard
1473 Let us write a list of reasons why \SpecialChar LyX
1474 is better than other word processors.
1475 Somewhere in your document, type:
1478 \begin_layout Standard
1482 is better than other word processors because:
1485 \begin_layout Standard
1502 arg "layout Itemize"
1508 \begin_inset Quotes eld
1512 \begin_inset Quotes erd
1516 Type in your reasons:
1519 \begin_layout LyX-Code
1520 Typesetting is done for you.
1523 \begin_layout LyX-Code
1527 \begin_layout LyX-Code
1528 Lists are very easy to create!
1531 \begin_layout Standard
1532 List environments, unlike headings, do not end when you type
1537 Instead, \SpecialChar LyX
1538 assumes you are going on to the next item in the list.
1539 The above will therefore result in a three-item list.
1540 If you want more than one paragraph within one list
1544 , one way is to use the
1547 \begin_inset space ~
1552 , which you get by typing
1557 In order to get out of the list, you need to reselect the
1561 environment (or just use the key binding
1564 arg "layout Standard"
1570 \begin_layout Standard
1571 You now have a beautiful itemized list.
1572 You might want to run \SpecialChar LaTeX
1573 to see how the list looks when printed out.
1574 But what if you wanted to number the reasons? Well, just select the whole
1579 \begin_layout Plain Layout
1581 will not let you select the first bullet (or the actual number in a numbered
1582 section title) unless you also select the paragraph
1586 it, which you probably do not want to do.
1587 This is on purpose because the bullet or number depends on the document
1588 settings or text position, respectively.
1604 arg "layout Enumerate"
1608 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1609 will fix the numbering.
1612 \begin_layout Standard
1613 While the list is still selected, you can change to the other two list environme
1621 \begin_inset space \thinspace{}
1627 \begin_inset space \thinspace{}
1637 arg "layout Description"
1646 ), in order to see what they look like.
1647 For those two environments, each list item is made up of a term, which
1648 is the item's first word, followed by a definition, which is the rest of
1649 the paragraph (until you hit
1654 The term is either typeset in boldface (
1659 \begin_inset Quotes eld
1663 \begin_inset Quotes erd
1670 \begin_layout Plain Layout
1671 But a typesetter's tab, which will change to fit the size of the largest
1672 term, not a pathetic, rigid, unchangeable typewriter
1685 ) from the rest of the paragraph.
1686 If you want to have more than one word in the definition, then separate
1690 \begin_inset space ~
1698 \begin_layout Labeling
1699 \labelwidthstring 00.00.0000
1704 : Typeset the list in
1709 \begin_layout Standard
1710 You can nest lists within each other in all sorts of interesting ways.
1711 An obvious example would be writing outlines.
1712 Numbered and bulleted lists will have different numbering and bulleting
1713 schemes for sublists.
1718 for details on the different sorts of lists and for examples of nestings.
1721 \begin_layout Subsection
1722 Other environments: Verses, Quotations, and more
1725 \begin_layout Standard
1726 There are two environments for setting quotations apart from surrounding
1731 for short quotes and
1745 \begin_layout Plain Layout
1746 used in this Tutorial for the long typing examples
1755 font; this environment is the only place in \SpecialChar LyX
1756 where you are allowed to use
1757 multiple spaces to allow code indenting.
1758 You can even write poetry using the
1766 to separate stanzas, and
1770 to separate lines within a stanza.
1775 for more complete descriptions of all of the available \SpecialChar LyX
1779 \begin_layout Labeling
1780 \labelwidthstring 00.00.0000
1785 : Correctly typeset the
1787 Quote, \SpecialChar LyX
1795 \begin_inset Newline newline
1803 \begin_layout Chapter
1807 \begin_layout Standard
1808 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1810 It introduced you to the basic editing operations in \SpecialChar LyX
1811 , as well as the powerful
1812 method of writing with environments.
1813 Most people who use \SpecialChar LyX
1814 , though, will want to write documents: papers, articles,
1815 books, manuals, or letters.
1816 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1818 a complete document.
1819 It will introduce you to text classes, which allow you to write different
1821 It will then describe many of the additions that turn text into a document,
1822 such as titles, footnotes, cross references, bibliographies, and tables
1826 \begin_layout Section
1828 \begin_inset CommandInset label
1830 name "sec:Document-Classes"
1837 \begin_layout Standard
1838 Different sorts of documents should be typeset differently.
1839 For example, books are generally printed double-sided, while articles are
1841 In addition, many documents contain special environments: letters contain
1842 some environments — such as the sender's address and the signature — which
1843 do not make sense in a book or article.
1844 The \SpecialChar LyX
1853 \begin_layout Plain Layout
1854 for \SpecialChar LaTeX
1855 users: this is equivalent to the \SpecialChar LaTeX
1861 takes care of these large scale differences between different sorts of
1863 This Tutorial, for example, was written in the
1868 Document classes are another major part of the WYSIWYM philosophy; they
1869 tell \SpecialChar LyX
1870 how to typeset the document, so you do not need to know how.
1873 \begin_layout Standard
1874 Your document is probably being written in the
1882 \begin_layout Plain Layout
1883 That is usually the default document class
1888 Try changing to other document classes (using the
1890 Document\SpecialChar menuseparator
1893 dialog) to see how they are typeset differently.
1894 If you change your document to the
1898 document class and look at the
1902 box, you will see that most of the allowed environments are the same.
1903 However, you can now use the
1908 If you are ever unsure about which environments you can use in a given
1909 document class, just consult the
1916 \begin_layout Standard
1917 Font sizes, one- or two-column printing, and page headings are just some
1918 of the ways journals' typesettings differ from one another.
1919 As the Computer Age continues to mature, journals have begun accepting
1920 electronic submissions, creating \SpecialChar LaTeX
1922 \begin_inset Quotes eld
1926 \begin_inset Quotes erd
1929 so that authors can submit correctly typeset articles.
1931 is set up to support this as well.
1932 For example, \SpecialChar LyX
1933 supports typesetting (and extra environments) for the American
1934 Mathematics Society journals using the
1937 \begin_inset space ~
1945 \begin_layout Standard
1946 Here is a very quick reference to some of the document classes.
1949 Special Document Classes
1955 manual for many more details.
1956 \begin_inset Separator latexpar
1962 \begin_layout Standard
1964 \begin_inset Tabular
1965 <lyxtabular version="3" rows="7" columns="2">
1966 <features tabularvalignment="middle">
1967 <column alignment="center" valignment="top" width="0pt">
1968 <column alignment="center" valignment="top" width="0pt">
1970 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1973 \begin_layout Plain Layout
1979 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1982 \begin_layout Plain Layout
1990 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1993 \begin_layout Plain Layout
1999 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2002 \begin_layout Plain Layout
2003 one-sided, no chapters
2010 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2013 \begin_layout Plain Layout
2019 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2022 \begin_layout Plain Layout
2023 layout & environments for American Math Society
2030 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2033 \begin_layout Plain Layout
2039 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2042 \begin_layout Plain Layout
2043 longer than article, two-sided
2050 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2053 \begin_layout Plain Layout
2059 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2062 \begin_layout Plain Layout
2063 report + front and back matter
2070 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2073 \begin_layout Plain Layout
2079 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2082 \begin_layout Plain Layout
2090 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2093 \begin_layout Plain Layout
2099 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2102 \begin_layout Plain Layout
2103 lots of extra environments for address, signature\SpecialChar ldots
2117 \begin_layout Section
2118 Templates: Writing a Letter
2121 \begin_layout Standard
2122 One way to write a letter would be to open a new file, and choose a
2128 Document\SpecialChar menuseparator
2132 While this is the most obvious way to write a letter, it seems like extra
2134 Every time you write a business letter, you want to have your address,
2135 the address to which you are sending it, a body, a signature, etc.
2141 for letters, which contains a sample letter; once you have a template,
2142 you can just replace a couple of parts of the letter with your text each
2143 time you write a letter.
2146 \begin_layout Standard
2147 Open a new file with
2149 File\SpecialChar menuseparator
2151 \begin_inset space ~
2155 \begin_inset space ~
2166 Save and print the file to see how the various environments are typeset.
2169 \begin_layout Standard
2170 When you look at the
2174 box, you will see several environments, like the
2177 \begin_inset space ~
2182 environment, that do not exist in most other document classes.
2188 You can play around for a while to figure out how the various environments
2190 You will notice for example that the
2194 environment has the word
2195 \begin_inset Quotes eld
2199 \begin_inset Quotes erd
2202 in red before the actual text of the signature.
2203 This word does not show up in the actual letter, as you will see if you
2204 view/export the file.
2205 It is just there to let you know where the signature goes.
2206 Also, note that it does not matter where in the file the
2211 Remember, \SpecialChar LyX
2212 is WYSIWYM; you can put the
2216 environment anywhere you want, but \SpecialChar LyX
2217 knows that in the printout, the signature
2218 should be at the end.
2221 \begin_layout Standard
2222 A template is just a regular \SpecialChar LyX
2224 This means you can fill in your address and signature and save the file
2226 From now on, any time you want to write a letter, you can use the new template
2228 We do not have to suggest an actual
2229 \begin_inset Quotes eld
2233 \begin_inset Quotes erd
2236 here; just write a letter to someone!
2240 \begin_layout Plain Layout
2241 One warning, if you are writing from a template.
2242 If you erase all of the text in an environment — for example, if you erase
2246 \begin_inset space ~
2251 field so that you can replace it with your own — and then you move the
2252 cursor without writing any text, the environment may disappear.
2253 This is because most environments cannot exist without any text in them.
2254 Just reselect the environment from the
2266 \begin_layout Standard
2267 Templates can be a huge time-saver, and we urge you to use them whenever
2269 In addition, they can help a person learn how to use some of the fancier
2271 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2273 of less computer-aware users.
2274 When they are first learning \SpecialChar LyX
2275 , it will be less intimidating if they have
2276 a letter template customized for their company, for example.
2279 \begin_layout Standard
2280 \begin_inset Newpage newpage
2286 \begin_layout Section
2290 \begin_layout Standard
2292 (like \SpecialChar LaTeX
2293 ) considers the title — which may contain the actual title, the author,
2294 the date, and even an abstract of a paper — to be a separate part of the
2298 \begin_layout Standard
2299 Go back to your first \SpecialChar LyX
2300 document and make sure it is using the
2308 \begin_layout Plain Layout
2309 You should not be using the letter any more, since the
2313 document class does not allow titles.
2318 Type a title on the first line, and change the line to the
2323 On the next line, type your name and change it to the
2328 On the next line, write the date in the
2333 Type a paragraph or two summarizing your document using the
2338 Notice how the title is presented when it is printed out.
2339 If you change the document format to Book, you will get a separate title
2340 page, like the first page of this tutorial.
2343 \begin_layout Labeling
2344 \labelwidthstring 00.00.0000
2349 : Fix the title, date, and author in
2354 \begin_layout Section
2355 Labels and Cross-References
2358 \begin_layout Standard
2359 You can label section headings, list items, formulas, footnotes, and floats
2363 \begin_layout Plain Layout
2364 Floats are explained in the
2378 Once you do so, you can refer to the element in other parts of the document,
2379 using cross-references.
2380 You can refer to a section's number, to the page on which the section begins
2382 As with section numbering, \SpecialChar LyX
2383 also takes care of cross-reference numbering
2385 Automatic management of labels and cross-references is among the most significa
2386 nt advantages of \SpecialChar LyX
2387 (and \SpecialChar LaTeX
2388 ) over conventional word processors.
2391 \begin_layout Subsection
2395 \begin_layout Standard
2396 Go to our second section, whose title is
2397 \begin_inset Quotes eld
2401 \begin_inset Quotes erd
2405 Click at the end of the section title line, and select
2407 Insert\SpecialChar menuseparator
2410 or the toolbar button
2417 A dialog asks you for a label name, and gives you a suggestion.
2422 , the label name will be placed in a box next to the section title.
2425 \begin_layout Standard
2426 So far you have not done anything — the output will look exactly the same,
2427 since labels do not show up in the printed document.
2428 However, now that you have added a label, you can refer to that label with
2430 We will do that next.
2433 \begin_layout Subsection
2434 Your first cross-reference
2437 \begin_layout Standard
2438 Place the cursor somewhere in Section
2439 \begin_inset space ~
2446 \begin_layout LyX-Code
2447 If you want to know more about this document,
2448 \begin_inset Newline newline
2454 \begin_layout Standard
2455 Now, with the cursor before the final period, select
2457 Insert\SpecialChar menuseparator
2459 \begin_inset space ~
2464 or the toolbar button
2467 arg "dialog-show-new-inset ref"
2471 The Cross-reference dialog pops up.
2472 It shows a list of the possible labels you can reference.
2473 At the moment, there should be only one,
2474 \begin_inset Quotes eld
2477 sec:About-This-Document
2478 \begin_inset Quotes erd
2482 First, select the drop-down menu labeled
2483 \begin_inset Quotes eld
2487 \begin_inset Quotes erd
2491 \begin_inset Quotes eld
2494 <reference> on page <page>
2495 \begin_inset Quotes erd
2500 \begin_inset Quotes eld
2503 sec:About-This-Document
2504 \begin_inset Quotes erd
2507 (it may be selected by default), and a reference marker will appear containing
2509 \begin_inset Quotes eld
2512 Ref+Text: sec:About-This-Document
2513 \begin_inset Quotes erd
2516 (To be really correct, you should put a
2519 \begin_inset space ~
2527 arg "command-alternatives space-insert protected ; math-space"
2530 ) in between the word
2531 \begin_inset Quotes eld
2535 \begin_inset Quotes erd
2538 and the reference.) An alternative way to reference a label is to right-click
2539 the label and select
2543 in the pop-up context menu.
2544 The cross-reference to this label is now in the clipboard and can be copied
2545 to the actual cursor position via the menu
2547 Edit\SpecialChar menuseparator
2557 In the printed document, this reference marker will be replaced with the
2558 section number and then the page number.
2559 Preview your document and you will see that \SpecialChar LaTeX
2560 has been even cleverer than
2563 \begin_inset Quotes eld
2567 \begin_inset Quotes erd
2570 and depending how much text you have between the start of Section
2571 \begin_inset space ~
2574 2 and this cross-reference you may see
2575 \begin_inset Quotes eld
2579 \begin_inset Quotes erd
2583 \begin_inset Quotes eld
2586 on the previous page
2587 \begin_inset Quotes erd
2591 \begin_inset Quotes eld
2595 \begin_inset Quotes erd
2602 is the page number).
2605 \begin_layout Standard
2606 Conveniently, a cross-reference acts as a hyperlink when you are editing
2607 a document in \SpecialChar LyX
2608 ; clicking on it will pop up the
2615 \begin_inset space ~
2619 \begin_inset space ~
2624 will move the cursor to the referenced label.
2627 \begin_layout Subsection
2628 More fun with labels
2631 \begin_layout Standard
2632 We told you that \SpecialChar LyX
2633 takes care of numbering cross-references; now you can
2635 Add a new section before Section
2636 \begin_inset space ~
2640 Update the preview, and — voilà! — the section cross-reference changed
2642 \begin_inset Quotes eld
2646 \begin_inset Quotes erd
2649 ! Change the section
2650 \begin_inset Quotes eld
2654 \begin_inset Quotes erd
2657 to a subsection, and the cross-reference will reference Subsection
2658 \begin_inset space ~
2661 2.1 instead of Section
2662 \begin_inset space ~
2666 The page reference will not change unless you add a whole page of text
2667 before the label, of course.
2671 \begin_layout Standard
2672 If you want some more practice with labels, then try putting a new label
2673 where your first cross-reference was, and refer to that label from elsewhere
2675 If you will be inserting cross-references often, it may be convenient to
2683 \begin_layout Standard
2684 If you want to confirm that the cross-referencing gets the pages right even
2685 for larger documents,
2689 a couple pages of text from the
2693 to the clipboard, and
2697 them into your document.
2701 \begin_layout Plain Layout
2702 By the way, copying a chapter title may cause an error, because chapters
2703 are not allowed in the article class, see Section
2704 \begin_inset space ~
2708 \begin_inset CommandInset ref
2710 reference "sec:Document-Classes"
2715 If this happens, just delete the chapter title.
2723 \begin_layout Labeling
2724 \labelwidthstring 00.00.0000
2729 : Fix the references in
2734 \begin_layout Section
2735 Footnotes and Margin Notes
2738 \begin_layout Standard
2739 Footnotes can be added using the toolbar button
2742 arg "footnote-insert"
2747 Insert\SpecialChar menuseparator
2751 Click at the end of the word
2752 \begin_inset Quotes eld
2757 \begin_inset Quotes erd
2760 somewhere in your document and insert a footnote.
2761 A footnote box appears where you can enter the text of the footnote.
2763 should place the cursor at the beginning of the footnote box.
2767 \begin_layout LyX-Code
2769 is a typesetting word processor.
2772 \begin_layout Standard
2773 Now click on the button labeled
2774 \begin_inset Quotes eld
2778 \begin_inset Quotes erd
2782 The footnote box is closed, leaving the button showing where the footnote
2783 marker will be in the printed text; this is called
2784 \begin_inset Quotes eld
2788 \begin_inset Quotes erd
2792 You can unfold the footnote at any time and re-edit its text by clicking
2794 \begin_inset Quotes eld
2798 \begin_inset Quotes erd
2804 \begin_layout Standard
2805 A footnote can be cut and pasted like normal text.
2806 Go ahead; try it! All you need to do is select the footnote button
2810 \begin_layout Plain Layout
2811 It may be easier to select it using the keyboard.
2812 You might accidentally open the footnote if you are trying to select the
2813 marker itself with the mouse.
2827 In addition, you can change regular text to a footnote, by selecting it
2831 arg "footnote-insert"
2834 button; change a footnote to regular text by hitting the
2838 key when the cursor is in the first position of a footnote, or by hitting
2843 key when the cursor is in the very last position of the footnote.
2846 \begin_layout Standard
2847 Margin notes can be added using the menu
2849 Insert\SpecialChar menuseparator
2851 \begin_inset space ~
2856 or the toolbar button
2859 arg "marginalnote-insert"
2862 \SpecialChar endofsentence
2863 Margin notes are like footnotes, except that:
2866 \begin_layout Itemize
2867 the on-screen boxes say
2868 \begin_inset Quotes eld
2872 \begin_inset Quotes erd
2876 \begin_inset Quotes eld
2880 \begin_inset Quotes erd
2886 \begin_layout Itemize
2887 the notes will be placed in the margin, instead of below the text
2890 \begin_layout Itemize
2891 margin notes are not numbered
2894 \begin_layout Standard
2895 Change your \SpecialChar LyX
2896 footnote back to text, then select and change it to a margin
2898 Run \SpecialChar LaTeX
2899 again to see what the margin note looks like.
2902 \begin_layout Labeling
2903 \labelwidthstring 00.00.0000
2908 : Fix the footnote in
2913 \begin_layout Section
2915 \begin_inset CommandInset label
2917 name "sec:bibliographies"
2924 \begin_layout Standard
2925 Bibliographies are similar to cross-references.
2926 The bibliography contains a list of references at the end of the document,
2927 and they can be referenced from within the document.
2928 Like section titles, \SpecialChar LyX
2929 and \SpecialChar LaTeX
2930 make your job easier by automatically numbering
2931 the bibliography items and changing citations when the item numbers change.
2934 \begin_layout Standard
2935 Go to the end of the document and switch to the
2940 Now, each paragraph you type will be a reference.
2942 \begin_inset Quotes eld
2947 The Lyx Tutorial, by the \SpecialChar LyX
2951 \begin_inset Quotes erd
2954 as your first reference.
2955 Note that \SpecialChar LyX
2956 automatically puts a number in a box before each reference.
2957 Click on the boxed reference number, and the
2960 \begin_inset space ~
2970 is to refer to this reference within the \SpecialChar LyX
2980 is set (default), you will see the number of the bibliography in the output.
2986 \begin_inset Quotes eld
2990 \begin_inset Quotes erd
2993 to make it easy to remember.
2996 \begin_layout Standard
2997 Now pick somewhere in your document that you would like to insert a reference.
3000 Insert\SpecialChar menuseparator
3003 or the toolbar button
3006 arg "dialog-show-new-inset citation"
3015 The left panel in this dialog lists all the bibliography entries, and this
3016 field allows you to choose which bibliography item you want to cite.
3018 \begin_inset Quotes eld
3022 \begin_inset Quotes erd
3025 (right now, that is the only item in the bibliography), then use the
3029 button in the center to insert it.
3030 (You can have multiple citations in the same place by transferring a number
3035 \begin_layout Plain Layout
3036 If one uses label names for references that are easy to remember it is easier
3037 to find the entry in the list of references.
3047 Now preview your file and you will see that the citation appears in brackets
3048 in the text, referring to the bibliography at the end of the document.
3051 \begin_layout Standard
3055 \begin_inset space ~
3064 dialog will put a remark (such as a reference to a page or chapter within
3065 the referenced book or article) in the brackets after the reference.
3066 If you want the references to have labels instead of numbers in the printed
3067 output (for example, some journals would use
3068 \begin_inset Quotes eld
3072 \begin_inset Quotes erd
3075 to refer to a paper written by Smith in 1995), use the
3082 \begin_inset space ~
3095 \begin_layout Labeling
3096 \labelwidthstring 00.00.0000
3101 Fix the bibliography and citation in
3106 \begin_layout Section
3110 \begin_layout Standard
3111 You may want to put a table of contents at the beginning of your document.
3113 makes this easy to do.
3118 after your document title and before your first section title and select
3121 Insert\SpecialChar menuseparator
3123 \begin_inset space ~
3127 \begin_inset space ~
3130 TOC\SpecialChar menuseparator
3132 \begin_inset space ~
3136 \begin_inset space ~
3143 \begin_inset Quotes eld
3147 \begin_inset Quotes erd
3150 will appear in a button on the first line of the document.
3154 \begin_layout Standard
3155 This may not appear to be very useful.
3156 However, if you look at your preview, you will see that a table of contents
3157 has been generated, listing the various sections and subsections in your
3159 As usual, if you reorder sections or create new ones, you will see those
3160 changes in the preview when you update it.
3164 \begin_layout Standard
3165 The table of contents is not printed in the on-screen version of the document.
3166 But you can display the table of contents in a separate window by clicking
3167 on the table of contents button, or by using
3169 View\SpecialChar menuseparator
3171 \begin_inset space ~
3176 or the toolbar button
3179 arg "dialog-toggle toc"
3183 This menu will work even if you do not have a table of contents inset in
3185 This is a very useful tool for rearranging your document parts.
3186 Clicking on a (sub)section title in the
3190 window will highlight that line and move the display (in the \SpecialChar LyX
3192 to that place in the document.
3193 You can also use the arrow keys to move up and down in the table of contents.
3194 You may therefore find it convenient to leave this window open throughout
3196 You can get similar functionality from the
3200 menu, though, where the table of contents appears automatically.
3203 \begin_layout Standard
3204 To get rid of the Table of Contents, you can delete the table of contents
3205 button just like any other text.
3208 \begin_layout Labeling
3209 \labelwidthstring 00.00.0000
3214 : Fix the table of contents in
3219 \begin_layout Chapter
3223 \begin_layout Standard
3225 is used by many scientists because it outputs great looking equations,
3226 avoiding the control characters used by word processors and their equation
3228 Many of these scientists are frustrated, however, because writing equations
3229 in \SpecialChar LaTeX
3230 is more like programming than writing.
3231 Happily, \SpecialChar LyX
3232 has WYSIWYM support for equations.
3233 If you are used to \SpecialChar LaTeX
3234 , you will find that all of the usual \SpecialChar LaTeX
3236 can be typed in normally, but they will show up in a WYSIWYM fashion.
3237 If, on the other hand, you have never written in \SpecialChar LaTeX
3241 \begin_inset space ~
3246 will allow you to write professional-looking math quickly and easily.
3249 \begin_layout Section
3253 \begin_layout Standard
3254 Somewhere in your \SpecialChar LyX
3258 \begin_layout LyX-Code
3259 I like what Einstein said, E=mc^2, because it is
3260 \begin_inset Newline linebreak
3266 \begin_layout Standard
3267 Now, that equation does not look very good in \SpecialChar LyX
3268 and in the output; there
3269 is no space between the letters and the equals sign, and you would like
3270 to write an actual superscript for the
3271 \begin_inset Quotes eld
3275 \begin_inset Quotes erd
3279 That bad typesetting happened because we did not tell \SpecialChar LyX
3280 that we were writing
3281 a mathematical expression, so it typeset the equation like regular old
3285 \begin_layout Standard
3286 But we can create a formula that will be typeset properly.
3287 Highlight the equation and click the toolbar button
3295 Insert\SpecialChar menuseparator
3296 Math\SpecialChar menuseparator
3298 \begin_inset space ~
3304 If nothing is highlighted \SpecialChar LyX
3305 inserts a little blue square, which is an empty
3307 The expression appears in blue and the blue square disappears as soon as
3308 the formula is not empty.
3313 to leave the equation.
3314 The purple markers disappear, leaving the cursor to the right of the expression.
3315 Now, if you type something, it will be regular text.
3318 \begin_layout Standard
3319 Looking at the output you will notice that the expression was typeset nicely,
3320 with spaces between the letters and the equals sign, and a superscript
3322 \begin_inset Quotes eld
3326 \begin_inset Quotes erd
3330 Letters in math mode are assumed to be variables, and come out in italics.
3331 Numbers are just numbers.
3334 \begin_layout Standard
3335 This math editor is another example of the WYSIWYM philosophy.
3336 In \SpecialChar LaTeX
3337 , you write a mathematical expression using text and commands like
3343 ; this can be frustrating, because you cannot see what an expression looks
3344 like until you run the file under \SpecialChar LaTeX
3345 and you may have to spend time, for
3346 example, finding missing brackets.
3348 does not attempt to get the expression to look perfect (WYSIWYG), but
3349 it gives you an extremely good idea of what the expression will look like.
3351 then takes care of the professional typesetting.
3354 \begin_layout Section
3355 Navigating an Equation
3358 \begin_layout Standard
3360 \begin_inset Formula $E=mc^{2}$
3364 \begin_inset Formula $E=1+mc^{2}$
3368 Use the arrow keys to move the cursor into the expression.
3369 Note that when you enter the expression, the purple markers appear to let
3370 you know you are editing math.
3379 to move the cursor past the equals sign, and just type
3380 \begin_inset Quotes eld
3384 \begin_inset Quotes erd
3388 Again, you can use the arrow keys or
3392 to leave the formula\SpecialChar endofsentence
3396 \begin_layout Standard
3397 Other than the special keys described below, typing in math mode is like
3398 editing regular text.
3408 Select text either with the arrow keys or with the mouse.
3411 Edit\SpecialChar menuseparator
3414 works in math mode as well as cut and paste.
3415 One thing to be careful of: if you are left or right outside a formula
3424 respectively, you delete the whole formula.
3425 Luckily, you can just use
3432 \begin_layout Standard
3433 What if you want to change
3434 \begin_inset Formula $E=mc^{2}$
3438 \begin_inset Formula $E=mc^{2.5}+1$
3441 ? Again, you can use the mouse to click in the right place.
3442 However, you can also use the arrow keys.
3443 If the cursor is just after the
3444 \begin_inset Quotes eld
3448 \begin_inset Quotes erd
3452 \begin_inset Quotes eld
3456 \begin_inset Quotes erd
3463 and the cursor is moved to the level of the superscript, just before the
3465 \begin_inset Quotes eld
3469 \begin_inset Quotes erd
3474 \begin_inset Quotes eld
3478 \begin_inset Quotes erd
3486 will move the cursor back to the regular level.
3495 , the cursor will be placed
3499 the superscript (so that you can then type the
3500 \begin_inset Quotes eld
3504 \begin_inset Quotes erd
3510 \begin_layout Section
3511 Exponents and Indices
3514 \begin_layout Standard
3515 An exponent can be entered from the
3518 \begin_inset space ~
3523 (see below), but it is actually simpler just to type the caret key,
3524 \begin_inset Quotes eld
3528 \begin_inset Quotes erd
3533 will place another blue rectangle in the superscript, so that whatever
3534 you write next will be superscripted, and in a smaller font size.
3535 Everything you type until you hit a
3543 to exit the formula entirely) will be in the superscript.
3546 \begin_layout Standard
3547 Writing a subscript (index) is just as easy; start one by typing the underscore
3549 \begin_inset Quotes eld
3553 \begin_inset Quotes erd
3557 You can subscript and superscript both subscripts and superscripts like
3559 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3566 \begin_layout Labeling
3567 \labelwidthstring 00.00.0000
3573 \begin_inset space ~
3583 \begin_layout Section
3587 \begin_layout Standard
3591 \begin_inset space ~
3596 is a convenient way to enter symbols and/or to perform complicated formula
3598 Many of these operations can be accomplished from the keyboard or the
3600 Insert\SpecialChar menuseparator
3605 Edit\SpecialChar menuseparator
3608 menus (the latter only appears when you are in Math mode).
3609 However, we are going to concentrate on using the
3612 \begin_inset space ~
3617 , just to let you know what is out there; you can learn keyboard shortcuts
3618 and commands later from the
3625 \begin_layout Standard
3629 \begin_inset space ~
3634 is shown when the cursor is in a formula and can also be turned on manually
3637 View\SpecialChar menuseparator
3641 When you click there on
3642 \begin_inset Quotes eld
3646 \begin_inset Quotes erd
3652 arg "toolbar-toggle math"
3655 ) the toolbar will be shown permanently at the bottom; this state is visualized
3660 menu with a checkmark.
3661 When you click in this state again on
3662 \begin_inset Quotes eld
3666 \begin_inset Quotes erd
3676 \begin_inset space ~
3681 is only shown when the cursor is within a formula; this state is visualized
3682 by the renaming of the menu entry from
3683 \begin_inset Quotes eld
3687 \begin_inset Quotes erd
3691 \begin_inset Quotes eld
3695 \begin_inset space ~
3699 \begin_inset Quotes erd
3705 \begin_layout Subsection
3709 \begin_layout Standard
3713 \begin_inset space ~
3718 allows you to choose from a large array of symbols used in math: operators,
3719 arrows, relationships, delimiters, special characters, sums and integrals.
3720 Note that subscripting and superscripting allow you to put lower and upper
3721 limits on sums and integrals.
3724 \begin_layout Subsection
3725 Roots, decorations, and delimiters
3728 \begin_layout Standard
3729 To type a square root, just click on the button
3732 arg "math-insert \\sqrt"
3736 The square root appears, and the cursor is in a new insertion point inside
3738 You can type variables, numbers, other square roots, fractions, whatever
3741 will automatically resize the square root to fit what is inside.
3744 \begin_layout Standard
3746 \begin_inset Quotes eld
3750 \begin_inset Quotes erd
3754 \begin_inset Formula $\overrightarrow{a}$
3757 ) or group of characters (
3758 \begin_inset Formula $\overrightarrow{a+b}$
3761 ) is done similarly.
3762 Decorations are available from the toolbar via the button
3765 arg "math-insert \\hat"
3769 Click on a decoration, and \SpecialChar LyX
3770 will insert that decoration with an insertion
3771 point under (or over) it.
3772 Just type what you want in the insertion point.
3773 There are two sets of decorations: those that resize with the text you
3774 type, and those that have a fixed size, and are most appropriate for a
3779 \begin_layout Standard
3780 Delimiters such as parentheses, brackets, and braces work similarly, but
3781 are a bit more complicated.
3782 Hit the delimiter button
3785 arg "dialog-show mathdelimiter"
3793 Your current selection of delimiters is displayed in a box.
3794 It is a pair of parentheses by default, but you can choose a pair of braces,
3795 a brace and a parenthesis, or choose the empty square to have something
3797 \begin_inset Quotes eld
3801 \begin_inset Formula $a=\left\langle 7\right.$
3805 \begin_inset Quotes erd
3808 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3813 \begin_layout Standard
3814 If you are lazy, you can type actual parentheses in math mode, rather than
3820 However, those parentheses will be the same size as regular text, which
3821 will look bad if you have a big fraction or matrix inside the parentheses.
3822 So it is better to use one of the three delimiter buttons that insert them
3823 directly, for example
3826 arg "math-delim ( )"
3832 \begin_layout Standard
3833 You can also put delimiters or a square root sign or a decoration on already
3834 existing formula parts.
3835 Select the portion of the formula that you want to adjust, and then click
3836 on the button you want from the
3839 \begin_inset space ~
3845 Try using this to change Newton's second law from scalar to vector form
3847 \begin_inset Formula $f=ma$
3851 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3855 Once you have learned about matrices, this is how you will put parentheses
3856 or brackets around them.
3859 \begin_layout Subsection
3863 \begin_layout Standard
3864 To create a fraction, click on the fraction button
3867 arg "math-insert \\frac-square"
3873 \begin_inset space ~
3880 writes two insertion points in a fraction.
3881 As you would expect, you can use arrow keys or the mouse to move around
3883 Click on the top square and type
3884 \begin_inset Quotes eld
3888 \begin_inset Quotes erd
3897 \begin_inset Quotes eld
3901 \begin_inset Quotes erd
3905 You have made a fraction! Of course you can type anything within each of
3906 the two boxes: variables with exponents, square roots, other fractions,
3911 \begin_layout Labeling
3912 \labelwidthstring 00.00.0000
3918 \begin_inset space ~
3928 \begin_layout Subsection
3929 Functions: lim, log, sin and others
3932 \begin_layout Standard
3933 Because letters in math mode are considered to be variables, if you type
3935 \begin_inset Quotes eld
3939 \begin_inset Quotes erd
3942 in math mode, \SpecialChar LyX
3943 thinks you are typing the product of the three variables
3945 \begin_inset Formula $s$
3949 \begin_inset Formula $i$
3953 \begin_inset Formula $n$
3957 The three letters will be typeset in italics, when what you really wanted
3959 \begin_inset Quotes eld
3963 \begin_inset Quotes erd
3967 In addition, \SpecialChar LyX
3968 will not put a space between the word
3969 \begin_inset Quotes eld
3973 \begin_inset Quotes erd
3977 \begin_inset Quotes eld
3981 \begin_inset Quotes erd
3988 will exit the formula).
3990 \begin_inset Quotes eld
3994 \begin_inset Formula $\sin(x)$
3998 \begin_inset Quotes erd
4002 \begin_inset Quotes eld
4006 \begin_inset Formula $sin(x)$
4010 \begin_inset Quotes erd
4016 \begin_layout Standard
4020 \begin_inset space ~
4028 arg "math-insert \\functions"
4032 \begin_inset Quotes eld
4036 \begin_inset Quotes erd
4039 in the pop-up function list.
4041 \begin_inset Quotes eld
4045 \begin_inset Quotes erd
4048 is displayed in \SpecialChar LyX
4049 in black, and set in upright roman type.
4050 The whole word is treated as one symbol, so if you type
4054 , it will delete the whole word.
4056 \begin_inset Quotes eld
4060 \begin_inset Quotes erd
4063 , which will be written in blue italics, like you expect in a formula.
4064 In the output, the expression will be correctly typeset.
4068 \begin_layout Standard
4069 The function list includes other trigonometric functions and their inverses,
4070 hyperbolic functions, logarithms, limits, and quite a few others.
4071 These functions can take subscripts and superscripts, important for typing
4073 \begin_inset Quotes eld
4077 \begin_inset Formula $\cos^{2}\theta$
4081 \begin_inset Quotes erd
4085 \begin_inset Quotes eld
4089 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4093 \begin_inset Quotes erd
4099 \begin_layout Labeling
4100 \labelwidthstring 00.00.0000
4106 \begin_inset space ~
4116 \begin_layout Subsection
4120 \begin_layout Standard
4121 Click on the matrix button
4124 arg "dialog-show mathmatrix"
4130 \begin_inset space ~
4136 A pop-up dialog allows you to choose how many rows and columns you want
4138 Choose 2 rows and 3 columns and hit
4144 prints 6 insertion points in a
4145 \begin_inset Formula $2\times3$
4149 As usual, you can put any sort of formula expression (a square root, another
4150 matrix, etc.) in each insertion point.
4151 You can also leave some of the insertion points empty if you want.
4154 \begin_layout Standard
4159 can be used to move horizontally between the columns of a matrix.
4160 Alternatively, you can use the arrow keys to move around - hitting
4164 at the end of one box will move to the next box,
4168 will move to the next row, etc.
4171 \begin_layout Standard
4172 If you need to change the number of rows and columns, use the menu
4174 Edit\SpecialChar menuseparator
4176 \begin_inset space \thinspace{}
4180 \begin_inset space \thinspace{}
4185 or the math toolbar buttons
4188 arg "tabular-feature append-row"
4194 arg "tabular-feature delete-row"
4200 arg "tabular-feature append-column"
4206 arg "tabular-feature delete-column"
4212 \begin_layout Standard
4217 for information on how to change the horizontal alignment of each column,
4218 and how to change the vertical position of the whole matrix.
4219 Note that if you want to write a table containing text, you should use
4221 's wonderful table support, rather than trying to write text in a matrix.
4224 \begin_layout Subsection
4228 \begin_layout Standard
4229 All of the expressions we have written so far have been on the same line
4230 as the text that came before and after them, otherwise known as inline
4232 This is fine for short, simple expressions, but if you want to write larger
4233 ones, or if you want your expressions to stand out from the text, you need
4234 to write them in display mode.
4235 In addition, only displayed expressions can be labeled and numbered (see
4240 ), and multi-line equations must be in display mode.
4243 \begin_layout Standard
4244 While being in a formula, click on the display button
4255 This centers the formula and adds a blank line before and after it.
4256 Now type in an expression and compile your file to see how it looks.
4257 The display button is actually a toggle; use it now to change a couple
4258 of your expressions to display mode and back.
4262 \begin_layout Standard
4263 Display mode has a couple differences from inline mode:
4266 \begin_layout Itemize
4267 The default font is larger for a few symbols, like
4268 \begin_inset Formula $\sum$
4272 \begin_inset Formula $\int$
4278 \begin_layout Itemize
4279 Subscripts and superscripts for limits and sums (but not integrals) are
4280 written under and over rather than next to the symbols
4283 \begin_layout Itemize
4287 \begin_layout Standard
4288 Other than these differences, though, displayed expressions and inline expressio
4289 ns are very similar.
4292 \begin_layout Standard
4293 One final note about the way displayed formulas are typeset: be careful
4294 about whether you are putting your equation into a new paragraph or not.
4295 If your formula is in the middle of a sentence or paragraph, then do not
4301 Doing so will cause the text
4305 the formula to start a new paragraph.
4306 That text will be indented or follow a blank line, depending on your document
4307 paragraph settings, which is probably not what you want.
4310 \begin_layout Labeling
4311 \labelwidthstring 00.00.0000
4316 : Put the various equations in
4320 into display mode, and see how they are typeset differently.
4323 \begin_layout Labeling
4324 \labelwidthstring 00.00.0000
4329 : Using various tools you have learned in this section, you should be able
4330 to write an equation like:
4334 \begin_layout Plain Layout
4335 After you have done it the hard way, give
4337 Insert\SpecialChar menuseparator
4338 Math\SpecialChar menuseparator
4340 \begin_inset space ~
4351 \begin_inset Formula
4353 f(x)=\left\{ \begin{array}{cc}
4356 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4365 \begin_layout Section
4369 \begin_layout Standard
4370 Now you are familiar with the basics.
4372 's math editor can do a lot more.
4373 You can refer to the
4377 manual for tips on how to:
4380 \begin_layout Itemize
4381 Label and number expressions.
4384 \begin_layout Itemize
4385 Create multi-line equations.
4388 \begin_layout Itemize
4389 Change typefaces, e.
4390 \begin_inset space \thinspace{}
4394 \begin_inset space \space{}
4397 to write bold-face text in an expression.
4400 \begin_layout Itemize
4401 Fine-tune font sizes and spacing within an expression.
4402 (Do not worry about this until your final draft!)
4405 \begin_layout Itemize
4407 These are very powerful, because you just define them once at the top of
4408 the document, and then you can use them throughout the document.
4411 \begin_layout Itemize
4412 Do almost all you can do with math.
4415 \begin_layout Chapter
4419 \begin_layout Section
4420 Other major \SpecialChar LyX
4424 \begin_layout Standard
4425 We have not gone through all the possible commands in \SpecialChar LyX
4426 , and we are not planning
4435 \begin_inset space ~
4440 manual for more information.
4441 We will just mention a couple more major things \SpecialChar LyX
4445 \begin_layout Itemize
4447 has WYSIWYM support for tables.
4450 Insert\SpecialChar menuseparator
4456 arg "tabular-insert"
4460 Click on the table with the
4467 \begin_inset space ~
4472 dialog box which allows extensive table editing.
4476 arg "toolbar-toggle table"
4479 the table toolbar will appear permanently.
4482 \begin_layout Itemize
4484 also supports including pictures in any format within documents.
4487 Insert\SpecialChar menuseparator
4493 arg "dialog-show-new-inset graphics"
4497 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4498 can have captions, and \SpecialChar LyX
4499 will automatically generate lists of figures and/or
4503 \begin_layout Itemize
4505 is heavily configurable.
4506 Everything from how the \SpecialChar LyX
4507 window looks to how the output comes out can be
4508 configured in a number of ways.
4509 Much configuration is done through
4511 Tools\SpecialChar menuseparator
4515 For more information on this, check out
4517 Help\SpecialChar menuseparator
4518 Customization\SpecialChar endofsentence
4522 \begin_layout Itemize
4524 is being developed by a team of programmers on five continents.
4525 Therefore, \SpecialChar LyX
4526 has better support for non-English languages (such as Dutch,
4527 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4528 ) than many word processors.
4529 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4530 languages Chinese Japanese, and Korean are supported.
4531 You can write documents in other languages and you can also configure \SpecialChar LyX
4533 to show its menus and error messages in other languages.
4537 \begin_layout Itemize
4538 The \SpecialChar LyX
4539 menus feature keybindings.
4540 This means that you can do
4542 File\SpecialChar menuseparator
4553 or by using the binding which is shown next to it in the menu (
4560 Keybindings are also configurable.
4561 For information on this, check out
4563 Help\SpecialChar menuseparator
4564 Customization\SpecialChar endofsentence
4568 \begin_layout Itemize
4570 can read \SpecialChar LaTeX
4573 \begin_inset space ~
4577 \begin_inset CommandInset ref
4579 reference "sec:tex2lyx"
4586 \begin_layout Itemize
4587 Spell-checking, thesaurus, and word count facilities are available.
4590 \begin_layout Itemize
4591 Generation of indexes and nomenclatures/glossaries is supported.
4594 \begin_layout Section
4596 for \SpecialChar LaTeX
4598 \begin_inset CommandInset label
4600 name "sec:latexusers"
4607 \begin_layout Standard
4608 If you do not know anything about \SpecialChar LaTeX
4609 , you do not have to read this section.
4610 Actually, you might want to
4614 about \SpecialChar LaTeX
4615 , and then read this chapter.
4616 However, some of those who begin to use \SpecialChar LyX
4617 will be familiar with \SpecialChar LaTeX
4619 If you are such a person, you may be wondering if \SpecialChar LyX
4620 can really do everything
4623 The short answer is that \SpecialChar LyX
4624 can do pretty much everything \SpecialChar LaTeX
4626 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4631 \begin_layout Standard
4632 Because this is just a tutorial, we are only going to mention things that
4633 new \SpecialChar LyX
4634 users will most likely be interested in.
4635 In the interests of keeping the Tutorial short, we will give only minimal
4640 \begin_inset space ~
4648 \begin_inset space ~
4653 manuals have a great deal of information on differences between \SpecialChar LyX
4654 and \SpecialChar LaTeX
4656 and how to do various \SpecialChar LaTeX
4657 tricks in \SpecialChar LyX
4661 \begin_layout Subsection
4666 \begin_layout Standard
4667 Anything that you enter in \SpecialChar TeX
4668 mode will be passed straight to \SpecialChar LaTeX
4670 displayed in red on the screen.
4671 You can use \SpecialChar TeX
4672 commands in \SpecialChar LyX
4675 Insert\SpecialChar menuseparator
4677 \begin_inset space ~
4689 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4693 \begin_layout Standard
4694 In a math formula, \SpecialChar TeX
4695 mode is handled a bit differently.
4697 mode is entered there by typing a backslash.
4698 The backslash is not written out, but anything you type afterwards will
4700 You exit \SpecialChar TeX
4705 or some other non-alphabetic character, like a number, underscore, caret
4707 Once you exit \SpecialChar TeX
4708 mode, if \SpecialChar LyX
4709 knows the \SpecialChar TeX
4710 command you have typed in, it will
4711 convert it to WYSIWYM\SpecialChar endofsentence
4713 \begin_inset Quotes eld
4723 \begin_inset Quotes erd
4726 in a formula and then press
4732 \begin_inset Quotes eld
4736 \begin_inset Quotes erd
4740 \begin_inset Quotes eld
4744 \begin_inset Formula $\gamma$
4748 \begin_inset Quotes erd
4752 This will work for almost all, non-complicated math macros.
4753 This may be faster than using the
4756 \begin_inset space ~
4761 , and will be especially convenient for experienced \SpecialChar LaTeX
4765 \begin_layout Standard
4766 As a special case, if you type
4767 \begin_inset Quotes eld
4777 \begin_inset Quotes erd
4780 in a formula, the beginning
4784 ending braces will be inserted in red while the cursor is placed between
4786 This makes it more convenient to type those commands that take an argument.
4789 \begin_layout Standard
4791 cannot do absolutely everything that \SpecialChar LaTeX
4793 Some fancy functions are not supported at all, while some work but are
4796 mode allows users to get the full flexibility of \SpecialChar LaTeX
4797 , while having all the
4798 convenient features of \SpecialChar LyX
4799 , like WYSIWYM math, tables, and editing.
4801 could never support every \SpecialChar LaTeX
4809 in the preamble (see Section
4810 \begin_inset space ~
4814 \begin_inset CommandInset ref
4816 reference "sec:preamble"
4820 ), you can use any package you want — although you will not have WYSIWYM
4821 support for that package's features.
4824 \begin_layout Subsection
4825 Importing \SpecialChar LaTeX
4831 \begin_inset CommandInset label
4840 \begin_layout Standard
4841 You can import a \SpecialChar LaTeX
4842 file into \SpecialChar LyX
4845 File\SpecialChar menuseparator
4846 Import\SpecialChar menuseparator
4848 \begin_inset space ~
4853 menu in \SpecialChar LyX
4855 This will call the program
4859 which will create a file foo.lyx from the file foo.tex.
4861 will then open that file.
4862 If the translation does not work, you can try calling
4866 from the command line, possibly using fancier options.
4869 \begin_layout Standard
4870 Even when the translation does work,
4874 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4876 It will leave things it does not understand in \SpecialChar TeX
4877 mode; so, after translating
4882 , you can look for the red text and manually edit it to get it right.
4885 \begin_layout Standard
4890 has its own documentation (manpage), which Unix/Linux users can access
4891 via the console command
4894 \begin_inset space ~
4900 The manpage describes which \SpecialChar LaTeX
4901 commands and environments are not supported,
4902 what bugs you might run into (and how to get around them), and how to use
4903 the various options.
4906 \begin_layout Standard
4907 It is important to understand that
4911 can only translate files whose document class is
4912 \begin_inset Quotes eld
4916 \begin_inset Quotes erd
4920 , that is, for which there is a corresponding \SpecialChar LyX
4926 If there is no layout file, then you will get an error saying that the
4927 conversion could not be performed.
4928 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4933 simply will not know how to translate the \SpecialChar LaTeX
4934 that it finds there into things
4937 More about layout files and how they are created is explained in detail
4945 \begin_layout Subsection
4946 Converting \SpecialChar LyX
4947 Documents to \SpecialChar LaTeX
4951 \begin_layout Standard
4952 You might wish to convert a \SpecialChar LyX
4953 Document to a \SpecialChar LaTeX
4955 For example, a co-worker or co-author who does not have \SpecialChar LyX
4960 File\SpecialChar menuseparator
4961 Export\SpecialChar menuseparator
4965 This will create a file
4973 file you are editing.
4976 \begin_layout Subsection
4981 \begin_layout Subsubsection
4985 \begin_layout Standard
4988 Document\SpecialChar menuseparator
4991 dialog takes care of the document-wide options, such as changing the document
4992 class, default font size and paper size.
4993 Document class options and also options for \SpecialChar LaTeX
4994 packages can be entered there
4998 \begin_inset space ~
5006 \begin_layout Subsubsection
5007 Other Preamble Matter
5008 \begin_inset CommandInset label
5017 \begin_layout Standard
5018 If you have special commands to put in the preamble of a \SpecialChar LaTeX
5020 use them in a \SpecialChar LyX
5024 Document\SpecialChar menuseparator
5025 Settings\SpecialChar menuseparator
5027 \begin_inset space ~
5032 and type in the dialog window (or from the document settings dialog, depending
5034 Anything you type will (as with \SpecialChar TeX
5035 mode) be sent directly to \SpecialChar LaTeX
5039 \begin_layout Subsection
5044 \begin_layout Standard
5046 has support for Bib\SpecialChar TeX
5047 , which allows you to build databases of bibliographical
5048 references to be used in multiple documents.
5051 Insert\SpecialChar menuseparator
5053 \begin_inset space \thinspace{}
5057 \begin_inset space \thinspace{}
5060 TOC\SpecialChar menuseparator
5062 \begin_inset space ~
5077 field you load Bib\SpecialChar TeX
5082 field you can load Bib\SpecialChar TeX
5086 \begin_layout Standard
5087 After you have done this, you can use citations from any bibliographies
5088 you have included with
5090 Insert\SpecialChar menuseparator
5094 \begin_inset space ~
5098 \begin_inset CommandInset ref
5100 reference "sec:bibliographies"
5109 dialog will show a list of all the references in your
5117 \begin_layout Section
5121 \begin_layout Standard
5122 Sometimes when you try to view a document, there will be errors, things
5123 that \SpecialChar LyX
5124 or \SpecialChar LaTeX
5126 When this happens, \SpecialChar LyX
5131 \begin_inset space ~
5137 Clicking on individual errors in this dialog will take you to the place
5138 in the \SpecialChar LyX
5139 document where the error occurs and also display the detailed \SpecialChar LaTeX