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
558 \begin_layout Itemize
559 Export the ready to print document with
561 File\SpecialChar menuseparator
569 \begin_layout Standard
570 Congratulations! You have written your first \SpecialChar LyX
572 All of the rest is just details.
573 \begin_inset Newline newline
579 \begin_layout Standard
584 You can save time by leaving the PDF viewer running in the background.
585 Under MacOS and Linux you can use
587 Document\SpecialChar menuseparator
590 or the toolbar button
596 and just click on the PDF viewer window afterwards.
597 Under Windows still use
599 Document\SpecialChar menuseparator
611 \begin_layout Subsection
615 \begin_layout Standard
617 can of course do most of the things you are used to doing with a word processor.
618 It will word-wrap and indent paragraphs automatically.
619 Here is a quick description of how to do some simple actions.
622 \begin_layout Description
623 Undo \SpecialChar LyX
624 has multiple levels of undo, which means you can undo everything you
625 have done since your current editing session started, by selecting
627 Edit\SpecialChar menuseparator
636 ) over and over again.
637 If you undo too much, just select
639 Edit\SpecialChar menuseparator
649 \begin_inset Separator latexpar
656 \begin_layout Standard
657 Currently, undo is limited to 100 steps.
661 \begin_layout Description
664 Edit\SpecialChar menuseparator
675 Edit\SpecialChar menuseparator
686 Edit\SpecialChar menuseparator
695 ) to cut, copy, and paste.
696 Or automatically paste selected text (including selections from other programs)
704 \begin_layout Description
707 Edit\SpecialChar menuseparator
721 arg "dialog-show findreplace"
725 In the dialog, search with the
737 button to replace a word you have found.
741 \begin_layout Plain Layout
742 Close the window when you are done or leave it open if you find it more
744 Most dialog boxes in \SpecialChar LyX
745 can operate like this.
746 Just be sure you have the right window in focus when you are trying to
747 type in the main \SpecialChar LyX
748 window or a \SpecialChar LyX
754 If you like, you can specify whether to make the search case-sensitive,
755 or to search for only complete words; you can also search backwards through
759 \begin_layout Description
774 , which will by default print characters in italics), set it in
784 , usually small caps, used for people's names), or use your own formatting
787 Edit\SpecialChar menuseparator
792 Style\SpecialChar menuseparator
795 dialog (toolbar button
798 arg "dialog-show character"
804 \begin_layout Description
805 Toolbar Other buttons on the toolbar allow you to do some of the more popular
833 \begin_layout Standard
834 Of course, you have not yet written enough to make most of these functions
836 As you write more, though, try undoing, pasting, etc.
839 \begin_layout Subsection
840 WYSIWYM: Whitespace in \SpecialChar LyX
844 \begin_layout Standard
845 One of the hardest things for new users to get used to is the way that \SpecialChar LyX
848 As many times as you hit
852 , you will only get one blank line.
853 As many times as you hit
857 , you will only get one space.
858 On a blank line, \SpecialChar LyX
859 will not let you type even one space.
864 key will not move you forward one tab stop; in fact there
868 no tab stops! There is no ruler at the top of the page to let you set tabs
872 \begin_layout Standard
873 Many word processors are based on the WYSIWYG principle:
874 \begin_inset Quotes eld
877 What You See Is What You Get.
878 \begin_inset Quotes erd
882 , on the other hand, is based on the principle that
883 \begin_inset Quotes eld
886 What You See Is What You
891 \begin_inset Quotes erd
894 You type what you mean and \SpecialChar LyX
895 will take care of typesetting it for you so
896 that the output looks nice.
901 grammatically separates paragraphs and a
905 grammatically separates words; so there is no reason to have several of
910 has no grammatical function at all – so \SpecialChar LyX
912 Using \SpecialChar LyX
913 , you will spend more of your time worrying about the
917 of your document and less time worrying about the
926 for more information on the WYSIWYM concept.
929 \begin_layout Standard
931 does have (many) ways to fine-tune the formatting of your document.
932 After all, \SpecialChar LyX
942 has information about all that.
943 It includes horizontal fills and vertical space — which are more powerful
944 and versatile than multiple spaces or blank lines — and ways to change
945 font sizes, character styles, and paragraph alignments by hand.
946 The idea, though, is that you can write your whole document, focusing on
947 content, and just worry about that fine-tuning at the end.
948 With standard word processors, you will be distracted by document formatting
949 throughout the writing process.
952 \begin_layout Section
956 \begin_layout Standard
957 Different parts of a document have different purposes; we call these parts
963 Most of a document is made up of regular text.
964 Section titles (chapter, subsection, etc.) let the reader know that a new
965 topic or subtopic will be discussed.
966 Certain types of documents have special environments.
967 A journal article will have an abstract and a title.
968 A letter will have neither of these, but will probably have an environment
969 that gives the writer's address.
972 \begin_layout Standard
973 Environments are a major part of the
974 \begin_inset Quotes eld
977 What You See Is What You Mean
978 \begin_inset Quotes erd
981 philosophy of \SpecialChar LyX
983 A given environment may require a certain font style, font size, indenting,
984 line spacing, and more.
985 This problem is aggravated, because the exact formatting for a given environmen
986 t may change: one journal may use boldface, 18 point, centered type for
987 section titles while another uses italicized, 15 point, left justified
988 type; different languages may have different standards for indenting; and
989 bibliography formats can vary widely.
991 lets you avoid learning all the different formatting styles.
994 \begin_layout Standard
999 choice box is located on the left end of the toolbar and looks like this:
1001 \begin_inset Graphics
1002 filename clipart/ToolbarEnvBox.png
1009 It indicates in which environment you are currently writing.
1010 While you were writing your first document, it said
1011 \begin_inset Quotes eld
1015 \begin_inset Quotes erd
1018 which is the default environment for text.
1019 Now you will put a number of environments in your new document so that
1020 you can see how they work.
1023 \begin_layout Subsection
1024 Sections and Subsections
1027 \begin_layout Standard
1032 on the first line of your new \SpecialChar LyX
1045 \begin_layout Plain Layout
1051 If nothing is selected, \SpecialChar LyX
1052 changes the paragraph you are currently in to
1053 the selected environment.
1054 Alternatively, you can change several paragraphs to a different environment
1055 by selecting them before picking an environment.
1072 , which will be covered below.
1075 \begin_inset Quotes eld
1079 \begin_inset Quotes erd
1082 and typesets the section heading (title) in a larger font.
1087 \SpecialChar endofsentence
1093 \begin_inset Quotes eld
1097 \begin_inset Quotes erd
1101 \begin_inset Quotes eld
1105 \begin_inset Quotes erd
1109 Section headings, like most environments, are assumed to end when you type
1114 \SpecialChar endofsentence
1115 Type the document introduction:
1118 \begin_layout LyX-Code
1119 This is an introduction to my first \SpecialChar LyX
1123 \begin_layout Standard
1139 \begin_inset Quotes eld
1143 \begin_inset Quotes erd
1146 and waits for you to type a title.
1148 \begin_inset Quotes eld
1154 \begin_inset space ~
1160 \begin_inset Quotes erd
1163 , and you will see that \SpecialChar LyX
1164 again sets it as a section title.
1167 \begin_layout Standard
1169 Go to the end of Section
1170 \begin_inset space ~
1174 \begin_inset Quotes eld
1177 my first \SpecialChar LyX
1179 \begin_inset Quotes erd
1195 Again, \SpecialChar LyX
1197 \begin_inset Quotes eld
1201 \begin_inset Quotes erd
1204 and waits for you to type a title.
1211 \begin_inset space ~
1215 \begin_inset Quotes eld
1219 \begin_inset Quotes erd
1223 \begin_inset space ~
1226 2, has been automatically renumbered to Section
1227 \begin_inset space ~
1230 3! In true WYSIWYM fashion, you just need to identify the text that makes
1231 up the section titles, and \SpecialChar LyX
1232 takes care of numbering the sections and typesettin
1236 \begin_layout Standard
1245 environment, and type the following five lines:
1248 \begin_layout LyX-Code
1249 Sections and subsections are described below.
1252 \begin_layout LyX-Code
1256 \begin_layout LyX-Code
1257 Sections are bigger than subsections.
1260 \begin_layout LyX-Code
1261 Subsection description
1264 \begin_layout LyX-Code
1265 Subsections are smaller than sections.
1268 \begin_layout Standard
1269 Click on the second line and select
1279 numbers the subsection
1280 \begin_inset Quotes eld
1284 \begin_inset Quotes erd
1287 , and typesets it in a font which is bigger than regular text but smaller
1288 than the section title.
1289 Change the fourth line to the
1293 environment as well.
1294 As you probably expected, \SpecialChar LyX
1295 automatically numbered the section
1296 \begin_inset Quotes eld
1300 \begin_inset Quotes erd
1304 If you put yet another section before Section
1305 \begin_inset space ~
1309 \begin_inset space ~
1312 2 will be renumbered as Section 3, and the subsections will be renumbered
1314 \begin_inset Quotes eld
1318 \begin_inset Quotes erd
1322 \begin_inset Quotes eld
1326 \begin_inset Quotes erd
1332 \begin_layout Standard
1333 Further levels of sectioning include
1346 We will let you play with these on your own.
1347 You may notice that paragraph and subparagraph headings are not numbered
1348 by default, and that subparagraphs are indented; see the
1352 for an explanation and how to change this.
1357 headings are actually the highest level of sectioning, above
1361 s, but you are only allowed to use them in certain types (text classes)
1363 documents (see Section
1364 \begin_inset space ~
1368 \begin_inset CommandInset ref
1370 reference "sec:Document-Classes"
1377 \begin_layout Standard
1378 Finally, you may want to have sections or subsections that are not numbered.
1379 There are environments for this as well.
1380 If you change one of your section headings to the
1384 environment (you may have to scroll down in the
1388 box to find it), \SpecialChar LyX
1389 will use the same font size for the heading as it uses
1390 for a regular section, but it will not number that section.
1391 There are corresponding
1392 \begin_inset Quotes eld
1396 \begin_inset Quotes erd
1399 heading environments for
1408 Try changing some of your sections or subsections to the starred environments,
1409 and note how the other section numbers are updated.
1412 \begin_layout Labeling
1413 \labelwidthstring 00.00.0000
1418 : Fix the section and subsection headings in
1419 \begin_inset Newline newline
1430 \begin_layout Subsection
1434 \begin_layout Standard
1436 has several different environments for typesetting lists.
1437 The various list environments free you from hitting
1441 a million times when writing an outline, or from renumbering a whole list
1442 when you want to add a point in the middle of the list.
1443 Different types of documents logically require different list environments:
1446 \begin_layout Itemize
1447 A slide presentation might use the
1451 environment's bulleted lists to describe different points.
1454 \begin_layout Itemize
1455 An outline would use the
1459 environment's numbered lists (and lettered sublists).
1462 \begin_layout Itemize
1463 A document describing several software packages could use the
1467 environment, where each item in the list begins with a bold-faced word.
1470 \begin_layout Itemize
1479 ) environment is a variation on the
1486 \begin_layout Standard
1487 Let us write a list of reasons why \SpecialChar LyX
1488 is better than other word processors.
1489 Somewhere in your document, type:
1492 \begin_layout Standard
1496 is better than other word processors because:
1499 \begin_layout Standard
1516 arg "layout Itemize"
1522 \begin_inset Quotes eld
1526 \begin_inset Quotes erd
1530 Type in your reasons:
1533 \begin_layout LyX-Code
1534 Typesetting is done for you.
1537 \begin_layout LyX-Code
1541 \begin_layout LyX-Code
1542 Lists are very easy to create!
1545 \begin_layout Standard
1546 List environments, unlike headings, do not end when you type
1551 Instead, \SpecialChar LyX
1552 assumes you are going on to the next item in the list.
1553 The above will therefore result in a three-item list.
1554 If you want more than one paragraph within one list
1558 , one way is to use the
1561 \begin_inset space ~
1566 , which you get by typing
1571 In order to get out of the list, you need to reselect the
1575 environment (or just use the key binding
1578 arg "layout Standard"
1584 \begin_layout Standard
1585 You now have a beautiful itemized list.
1586 You might want to run \SpecialChar LaTeX
1587 to see how the list looks when printed out.
1588 But what if you wanted to number the reasons? Well, just select the whole
1593 \begin_layout Plain Layout
1595 will not let you select the first bullet (or the actual number in a numbered
1596 section title) unless you also select the paragraph
1600 it, which you probably do not want to do.
1601 This is on purpose because the bullet or number depends on the document
1602 settings or text position, respectively.
1618 arg "layout Enumerate"
1622 Pow! As we mentioned, if you add or delete a list item, \SpecialChar LyX
1623 will fix the numbering.
1626 \begin_layout Standard
1627 While the list is still selected, you can change to the other two list environme
1635 \begin_inset space \thinspace{}
1641 \begin_inset space \thinspace{}
1651 arg "layout Description"
1660 ), in order to see what they look like.
1661 For those two environments, each list item is made up of a term, which
1662 is the item's first word, followed by a definition, which is the rest of
1663 the paragraph (until you hit
1668 The term is either typeset in boldface (
1673 \begin_inset Quotes eld
1677 \begin_inset Quotes erd
1684 \begin_layout Plain Layout
1685 But a typesetter's tab, which will change to fit the size of the largest
1686 term, not a pathetic, rigid, unchangeable typewriter
1699 ) from the rest of the paragraph.
1700 If you want to have more than one word in the definition, then separate
1704 \begin_inset space ~
1712 \begin_layout Labeling
1713 \labelwidthstring 00.00.0000
1718 : Typeset the list in
1723 \begin_layout Standard
1724 You can nest lists within each other in all sorts of interesting ways.
1725 An obvious example would be writing outlines.
1726 Numbered and bulleted lists will have different numbering and bulleting
1727 schemes for sublists.
1732 for details on the different sorts of lists and for examples of nestings.
1735 \begin_layout Subsection
1736 Other environments: Verses, Quotations, and more
1739 \begin_layout Standard
1740 There are two environments for setting quotations apart from surrounding
1745 for short quotes and
1759 \begin_layout Plain Layout
1760 used in this Tutorial for the long typing examples
1769 font; this environment is the only place in \SpecialChar LyX
1770 where you are allowed to use
1771 multiple spaces to allow code indenting.
1772 You can even write poetry using the
1780 to separate stanzas, and
1784 to separate lines within a stanza.
1789 for more complete descriptions of all of the available \SpecialChar LyX
1793 \begin_layout Labeling
1794 \labelwidthstring 00.00.0000
1799 : Correctly typeset the
1801 Quote, \SpecialChar LyX
1809 \begin_inset Newline newline
1817 \begin_layout Chapter
1821 \begin_layout Standard
1822 The previous chapter hopefully allowed you to get used to writing in \SpecialChar LyX
1824 It introduced you to the basic editing operations in \SpecialChar LyX
1825 , as well as the powerful
1826 method of writing with environments.
1827 Most people who use \SpecialChar LyX
1828 , though, will want to write documents: papers, articles,
1829 books, manuals, or letters.
1830 This chapter is meant to take you from simply writing text with \SpecialChar LyX
1832 a complete document.
1833 It will introduce you to text classes, which allow you to write different
1835 It will then describe many of the additions that turn text into a document,
1836 such as titles, footnotes, cross references, bibliographies, and tables
1840 \begin_layout Section
1842 \begin_inset CommandInset label
1844 name "sec:Document-Classes"
1851 \begin_layout Standard
1852 Different sorts of documents should be typeset differently.
1853 For example, books are generally printed double-sided, while articles are
1855 In addition, many documents contain special environments: letters contain
1856 some environments — such as the sender's address and the signature — which
1857 do not make sense in a book or article.
1858 The \SpecialChar LyX
1867 \begin_layout Plain Layout
1868 for \SpecialChar LaTeX
1869 users: this is equivalent to the \SpecialChar LaTeX
1875 takes care of these large scale differences between different sorts of
1877 This Tutorial, for example, was written in the
1882 Document classes are another major part of the WYSIWYM philosophy; they
1883 tell \SpecialChar LyX
1884 how to typeset the document, so you do not need to know how.
1887 \begin_layout Standard
1888 Your document is probably being written in the
1896 \begin_layout Plain Layout
1897 That is usually the default document class
1902 Try changing to other document classes (using the
1904 Document\SpecialChar menuseparator
1907 dialog) to see how they are typeset differently.
1908 If you change your document to the
1912 document class and look at the
1916 box, you will see that most of the allowed environments are the same.
1917 However, you can now use the
1922 If you are ever unsure about which environments you can use in a given
1923 document class, just consult the
1930 \begin_layout Standard
1931 Font sizes, one- or two-column printing, and page headings are just some
1932 of the ways journals' typesettings differ from one another.
1933 As the Computer Age continues to mature, journals have begun accepting
1934 electronic submissions, creating \SpecialChar LaTeX
1936 \begin_inset Quotes eld
1940 \begin_inset Quotes erd
1943 so that authors can submit correctly typeset articles.
1945 is set up to support this as well.
1946 For example, \SpecialChar LyX
1947 supports typesetting (and extra environments) for the American
1948 Mathematics Society journals using the
1951 \begin_inset space ~
1959 \begin_layout Standard
1960 Here is a very quick reference to some of the document classes.
1963 Special Document Classes
1969 manual for many more details.
1970 \begin_inset Separator latexpar
1976 \begin_layout Standard
1978 \begin_inset Tabular
1979 <lyxtabular version="3" rows="7" columns="2">
1980 <features tabularvalignment="middle">
1981 <column alignment="center" valignment="top" width="0pt">
1982 <column alignment="center" valignment="top" width="0pt">
1984 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1987 \begin_layout Plain Layout
1993 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1996 \begin_layout Plain Layout
2004 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2007 \begin_layout Plain Layout
2013 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2016 \begin_layout Plain Layout
2017 one-sided, no chapters
2024 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2027 \begin_layout Plain Layout
2033 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2036 \begin_layout Plain Layout
2037 layout & environments for American Math Society
2044 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2047 \begin_layout Plain Layout
2053 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2056 \begin_layout Plain Layout
2057 longer than article, two-sided
2064 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2067 \begin_layout Plain Layout
2073 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2076 \begin_layout Plain Layout
2077 report + front and back matter
2084 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2087 \begin_layout Plain Layout
2093 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2096 \begin_layout Plain Layout
2104 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
2107 \begin_layout Plain Layout
2113 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2116 \begin_layout Plain Layout
2117 lots of extra environments for address, signature\SpecialChar ldots
2131 \begin_layout Section
2132 Templates: Writing a Letter
2135 \begin_layout Standard
2136 One way to write a letter would be to open a new file, and choose a
2142 Document\SpecialChar menuseparator
2146 While this is the most obvious way to write a letter, it seems like extra
2148 Every time you write a business letter, you want to have your address,
2149 the address to which you are sending it, a body, a signature, etc.
2155 for letters, which contains a sample letter; once you have a template,
2156 you can just replace a couple of parts of the letter with your text each
2157 time you write a letter.
2160 \begin_layout Standard
2161 Open a new file with
2163 File\SpecialChar menuseparator
2165 \begin_inset space ~
2169 \begin_inset space ~
2180 Save and print the file to see how the various environments are typeset.
2183 \begin_layout Standard
2184 When you look at the
2188 box, you will see several environments, like the
2191 \begin_inset space ~
2196 environment, that do not exist in most other document classes.
2202 You can play around for a while to figure out how the various environments
2204 You will notice for example that the
2208 environment has the word
2209 \begin_inset Quotes eld
2213 \begin_inset Quotes erd
2216 in red before the actual text of the signature.
2217 This word does not show up in the actual letter, as you will see if you
2218 view/export the file.
2219 It is just there to let you know where the signature goes.
2220 Also, note that it does not matter where in the file the
2225 Remember, \SpecialChar LyX
2226 is WYSIWYM; you can put the
2230 environment anywhere you want, but \SpecialChar LyX
2231 knows that in the printout, the signature
2232 should be at the end.
2235 \begin_layout Standard
2236 A template is just a regular \SpecialChar LyX
2238 This means you can fill in your address and signature and save the file
2240 From now on, any time you want to write a letter, you can use the new template
2242 We do not have to suggest an actual
2243 \begin_inset Quotes eld
2247 \begin_inset Quotes erd
2250 here; just write a letter to someone!
2254 \begin_layout Plain Layout
2255 One warning, if you are writing from a template.
2256 If you erase all of the text in an environment — for example, if you erase
2260 \begin_inset space ~
2265 field so that you can replace it with your own — and then you move the
2266 cursor without writing any text, the environment may disappear.
2267 This is because most environments cannot exist without any text in them.
2268 Just reselect the environment from the
2280 \begin_layout Standard
2281 Templates can be a huge time-saver, and we urge you to use them whenever
2283 In addition, they can help a person learn how to use some of the fancier
2285 Finally, they may be useful for a person who is configuring \SpecialChar LyX
2287 of less computer-aware users.
2288 When they are first learning \SpecialChar LyX
2289 , it will be less intimidating if they have
2290 a letter template customized for their company, for example.
2293 \begin_layout Standard
2294 \begin_inset Newpage newpage
2300 \begin_layout Section
2304 \begin_layout Standard
2306 (like \SpecialChar LaTeX
2307 ) considers the title — which may contain the actual title, the author,
2308 the date, and even an abstract of a paper — to be a separate part of the
2312 \begin_layout Standard
2313 Go back to your first \SpecialChar LyX
2314 document and make sure it is using the
2322 \begin_layout Plain Layout
2323 You should not be using the letter any more, since the
2327 document class does not allow titles.
2332 Type a title on the first line, and change the line to the
2337 On the next line, type your name and change it to the
2342 On the next line, write the date in the
2347 Type a paragraph or two summarizing your document using the
2352 Notice how the title is presented when it is printed out.
2353 If you change the document format to Book, you will get a separate title
2354 page, like the first page of this tutorial.
2357 \begin_layout Labeling
2358 \labelwidthstring 00.00.0000
2363 : Fix the title, date, and author in
2368 \begin_layout Section
2369 Labels and Cross-References
2372 \begin_layout Standard
2373 You can label section headings, list items, formulas, footnotes, and floats
2377 \begin_layout Plain Layout
2378 Floats are explained in the
2392 Once you do so, you can refer to the element in other parts of the document,
2393 using cross-references.
2394 You can refer to a section's number, to the page on which the section begins
2396 As with section numbering, \SpecialChar LyX
2397 also takes care of cross-reference numbering
2399 Automatic management of labels and cross-references is among the most significa
2400 nt advantages of \SpecialChar LyX
2401 (and \SpecialChar LaTeX
2402 ) over conventional word processors.
2405 \begin_layout Subsection
2409 \begin_layout Standard
2410 Go to our second section, whose title is
2411 \begin_inset Quotes eld
2415 \begin_inset Quotes erd
2419 Click at the end of the section title line, and select
2421 Insert\SpecialChar menuseparator
2424 or the toolbar button
2431 A dialog asks you for a label name, and gives you a suggestion.
2436 , the label name will be placed in a box next to the section title.
2439 \begin_layout Standard
2440 So far you have not done anything — the output will look exactly the same,
2441 since labels do not show up in the printed document.
2442 However, now that you have added a label, you can refer to that label with
2444 We will do that next.
2447 \begin_layout Subsection
2448 Your first cross-reference
2451 \begin_layout Standard
2452 Place the cursor somewhere in Section
2453 \begin_inset space ~
2460 \begin_layout LyX-Code
2461 If you want to know more about this document,
2462 \begin_inset Newline newline
2468 \begin_layout Standard
2469 Now, with the cursor before the final period, select
2471 Insert\SpecialChar menuseparator
2473 \begin_inset space ~
2478 or the toolbar button
2481 arg "dialog-show-new-inset ref"
2485 The Cross-reference dialog pops up.
2486 It shows a list of the possible labels you can reference.
2487 At the moment, there should be only one,
2488 \begin_inset Quotes eld
2491 sec:About-This-Document
2492 \begin_inset Quotes erd
2496 First, select the drop-down menu labeled
2497 \begin_inset Quotes eld
2501 \begin_inset Quotes erd
2505 \begin_inset Quotes eld
2508 <reference> on page <page>
2509 \begin_inset Quotes erd
2514 \begin_inset Quotes eld
2517 sec:About-This-Document
2518 \begin_inset Quotes erd
2521 (it may be selected by default), and a reference marker will appear containing
2523 \begin_inset Quotes eld
2526 Ref+Text: sec:About-This-Document
2527 \begin_inset Quotes erd
2530 (To be really correct, you should put a
2533 \begin_inset space ~
2541 arg "command-alternatives space-insert protected ; math-space"
2544 ) in between the word
2545 \begin_inset Quotes eld
2549 \begin_inset Quotes erd
2552 and the reference.) An alternative way to reference a label is to right-click
2553 the label and select
2557 in the pop-up context menu.
2558 The cross-reference to this label is now in the clipboard and can be copied
2559 to the actual cursor position via the menu
2561 Edit\SpecialChar menuseparator
2571 In the printed document, this reference marker will be replaced with the
2572 section number and then the page number.
2573 Preview your document and you will see that \SpecialChar LaTeX
2574 has been even cleverer than
2577 \begin_inset Quotes eld
2581 \begin_inset Quotes erd
2584 and depending how much text you have between the start of Section
2585 \begin_inset space ~
2588 2 and this cross-reference you may see
2589 \begin_inset Quotes eld
2593 \begin_inset Quotes erd
2597 \begin_inset Quotes eld
2600 on the previous page
2601 \begin_inset Quotes erd
2605 \begin_inset Quotes eld
2609 \begin_inset Quotes erd
2616 is the page number).
2619 \begin_layout Standard
2620 Conveniently, a cross-reference acts as a hyperlink when you are editing
2621 a document in \SpecialChar LyX
2622 ; clicking on it will pop up the
2629 \begin_inset space ~
2633 \begin_inset space ~
2638 will move the cursor to the referenced label.
2641 \begin_layout Subsection
2642 More fun with labels
2645 \begin_layout Standard
2646 We told you that \SpecialChar LyX
2647 takes care of numbering cross-references; now you can
2649 Add a new section before Section
2650 \begin_inset space ~
2654 Update the preview, and — voilà! — the section cross-reference changed
2656 \begin_inset Quotes eld
2660 \begin_inset Quotes erd
2663 ! Change the section
2664 \begin_inset Quotes eld
2668 \begin_inset Quotes erd
2671 to a subsection, and the cross-reference will reference Subsection
2672 \begin_inset space ~
2675 2.1 instead of Section
2676 \begin_inset space ~
2680 The page reference will not change unless you add a whole page of text
2681 before the label, of course.
2685 \begin_layout Standard
2686 If you want some more practice with labels, then try putting a new label
2687 where your first cross-reference was, and refer to that label from elsewhere
2689 If you will be inserting cross-references often, it may be convenient to
2697 \begin_layout Standard
2698 If you want to confirm that the cross-referencing gets the pages right even
2699 for larger documents,
2703 a couple pages of text from the
2707 to the clipboard, and
2711 them into your document.
2715 \begin_layout Plain Layout
2716 By the way, copying a chapter title may cause an error, because chapters
2717 are not allowed in the article class, see Section
2718 \begin_inset space ~
2722 \begin_inset CommandInset ref
2724 reference "sec:Document-Classes"
2729 If this happens, just delete the chapter title.
2737 \begin_layout Labeling
2738 \labelwidthstring 00.00.0000
2743 : Fix the references in
2748 \begin_layout Section
2749 Footnotes and Margin Notes
2752 \begin_layout Standard
2753 Footnotes can be added using the toolbar button
2756 arg "footnote-insert"
2761 Insert\SpecialChar menuseparator
2765 Click at the end of the word
2766 \begin_inset Quotes eld
2771 \begin_inset Quotes erd
2774 somewhere in your document and insert a footnote.
2775 A footnote box appears where you can enter the text of the footnote.
2777 should place the cursor at the beginning of the footnote box.
2781 \begin_layout LyX-Code
2783 is a typesetting word processor.
2786 \begin_layout Standard
2787 Now click on the button labeled
2788 \begin_inset Quotes eld
2792 \begin_inset Quotes erd
2796 The footnote box is closed, leaving the button showing where the footnote
2797 marker will be in the printed text; this is called
2798 \begin_inset Quotes eld
2802 \begin_inset Quotes erd
2806 You can unfold the footnote at any time and re-edit its text by clicking
2808 \begin_inset Quotes eld
2812 \begin_inset Quotes erd
2818 \begin_layout Standard
2819 A footnote can be cut and pasted like normal text.
2820 Go ahead; try it! All you need to do is select the footnote button
2824 \begin_layout Plain Layout
2825 It may be easier to select it using the keyboard.
2826 You might accidentally open the footnote if you are trying to select the
2827 marker itself with the mouse.
2841 In addition, you can change regular text to a footnote, by selecting it
2845 arg "footnote-insert"
2848 button; change a footnote to regular text by hitting the
2852 key when the cursor is in the first position of a footnote, or by hitting
2857 key when the cursor is in the very last position of the footnote.
2860 \begin_layout Standard
2861 Margin notes can be added using the menu
2863 Insert\SpecialChar menuseparator
2865 \begin_inset space ~
2870 or the toolbar button
2873 arg "marginalnote-insert"
2876 \SpecialChar endofsentence
2877 Margin notes are like footnotes, except that:
2880 \begin_layout Itemize
2881 the on-screen boxes say
2882 \begin_inset Quotes eld
2886 \begin_inset Quotes erd
2890 \begin_inset Quotes eld
2894 \begin_inset Quotes erd
2900 \begin_layout Itemize
2901 the notes will be placed in the margin, instead of below the text
2904 \begin_layout Itemize
2905 margin notes are not numbered
2908 \begin_layout Standard
2909 Change your \SpecialChar LyX
2910 footnote back to text, then select and change it to a margin
2912 Run \SpecialChar LaTeX
2913 again to see what the margin note looks like.
2916 \begin_layout Labeling
2917 \labelwidthstring 00.00.0000
2922 : Fix the footnote in
2927 \begin_layout Section
2929 \begin_inset CommandInset label
2931 name "sec:bibliographies"
2938 \begin_layout Standard
2939 Bibliographies are similar to cross-references.
2940 The bibliography contains a list of references at the end of the document,
2941 and they can be referenced from within the document.
2942 Like section titles, \SpecialChar LyX
2943 and \SpecialChar LaTeX
2944 make your job easier by automatically numbering
2945 the bibliography items and changing citations when the item numbers change.
2948 \begin_layout Standard
2949 Go to the end of the document and switch to the
2954 Now, each paragraph you type will be a reference.
2956 \begin_inset Quotes eld
2961 The Lyx Tutorial, by the \SpecialChar LyX
2965 \begin_inset Quotes erd
2968 as your first reference.
2969 Note that \SpecialChar LyX
2970 automatically puts a number in a box before each reference.
2971 Click on the boxed reference number, and the
2974 \begin_inset space ~
2984 is to refer to this reference within the \SpecialChar LyX
2994 is set (default), you will see the number of the bibliography in the output.
3000 \begin_inset Quotes eld
3004 \begin_inset Quotes erd
3007 to make it easy to remember.
3010 \begin_layout Standard
3011 Now pick somewhere in your document that you would like to insert a reference.
3014 Insert\SpecialChar menuseparator
3017 or the toolbar button
3020 arg "dialog-show-new-inset citation"
3029 The left panel in this dialog lists all the bibliography entries, and this
3030 field allows you to choose which bibliography item you want to cite.
3032 \begin_inset Quotes eld
3036 \begin_inset Quotes erd
3039 (right now, that is the only item in the bibliography), then use the
3043 button in the center to insert it.
3044 (You can have multiple citations in the same place by transferring a number
3049 \begin_layout Plain Layout
3050 If one uses label names for references that are easy to remember it is easier
3051 to find the entry in the list of references.
3061 Now preview your file and you will see that the citation appears in brackets
3062 in the text, referring to the bibliography at the end of the document.
3065 \begin_layout Standard
3069 \begin_inset space ~
3078 dialog will put a remark (such as a reference to a page or chapter within
3079 the referenced book or article) in the brackets after the reference.
3080 If you want the references to have labels instead of numbers in the printed
3081 output (for example, some journals would use
3082 \begin_inset Quotes eld
3086 \begin_inset Quotes erd
3089 to refer to a paper written by Smith in 1995), use the
3096 \begin_inset space ~
3109 \begin_layout Labeling
3110 \labelwidthstring 00.00.0000
3115 Fix the bibliography and citation in
3120 \begin_layout Section
3124 \begin_layout Standard
3125 You may want to put a table of contents at the beginning of your document.
3127 makes this easy to do.
3132 after your document title and before your first section title and select
3135 Insert\SpecialChar menuseparator
3137 \begin_inset space ~
3141 \begin_inset space ~
3144 TOC\SpecialChar menuseparator
3146 \begin_inset space ~
3150 \begin_inset space ~
3157 \begin_inset Quotes eld
3161 \begin_inset Quotes erd
3164 will appear in a button on the first line of the document.
3168 \begin_layout Standard
3169 This may not appear to be very useful.
3170 However, if you look at your preview, you will see that a table of contents
3171 has been generated, listing the various sections and subsections in your
3173 As usual, if you reorder sections or create new ones, you will see those
3174 changes in the preview when you update it.
3178 \begin_layout Standard
3179 The table of contents is not printed in the on-screen version of the document.
3180 But you can display the table of contents in a separate window by clicking
3181 on the table of contents button, or by using
3183 View\SpecialChar menuseparator
3185 \begin_inset space ~
3190 or the toolbar button
3193 arg "dialog-toggle toc"
3197 This menu will work even if you do not have a table of contents inset in
3199 This is a very useful tool for rearranging your document parts.
3200 Clicking on a (sub)section title in the
3204 window will highlight that line and move the display (in the \SpecialChar LyX
3206 to that place in the document.
3207 You can also use the arrow keys to move up and down in the table of contents.
3208 You may therefore find it convenient to leave this window open throughout
3210 You can get similar functionality from the
3214 menu, though, where the table of contents appears automatically.
3217 \begin_layout Standard
3218 To get rid of the Table of Contents, you can delete the table of contents
3219 button just like any other text.
3222 \begin_layout Labeling
3223 \labelwidthstring 00.00.0000
3228 : Fix the table of contents in
3233 \begin_layout Chapter
3237 \begin_layout Standard
3239 is used by many scientists because it outputs great looking equations,
3240 avoiding the control characters used by word processors and their equation
3242 Many of these scientists are frustrated, however, because writing equations
3243 in \SpecialChar LaTeX
3244 is more like programming than writing.
3245 Happily, \SpecialChar LyX
3246 has WYSIWYM support for equations.
3247 If you are used to \SpecialChar LaTeX
3248 , you will find that all of the usual \SpecialChar LaTeX
3250 can be typed in normally, but they will show up in a WYSIWYM fashion.
3251 If, on the other hand, you have never written in \SpecialChar LaTeX
3255 \begin_inset space ~
3260 will allow you to write professional-looking math quickly and easily.
3263 \begin_layout Section
3267 \begin_layout Standard
3268 Somewhere in your \SpecialChar LyX
3272 \begin_layout LyX-Code
3273 I like what Einstein said, E=mc^2, because it is
3274 \begin_inset Newline linebreak
3280 \begin_layout Standard
3281 Now, that equation does not look very good in \SpecialChar LyX
3282 and in the output; there
3283 is no space between the letters and the equals sign, and you would like
3284 to write an actual superscript for the
3285 \begin_inset Quotes eld
3289 \begin_inset Quotes erd
3293 That bad typesetting happened because we did not tell \SpecialChar LyX
3294 that we were writing
3295 a mathematical expression, so it typeset the equation like regular old
3299 \begin_layout Standard
3300 But we can create a formula that will be typeset properly.
3301 Highlight the equation and click the toolbar button
3309 Insert\SpecialChar menuseparator
3310 Math\SpecialChar menuseparator
3312 \begin_inset space ~
3318 If nothing is highlighted \SpecialChar LyX
3319 inserts a little blue square, which is an empty
3321 The expression appears in blue and the blue square disappears as soon as
3322 the formula is not empty.
3327 to leave the equation.
3328 The purple markers disappear, leaving the cursor to the right of the expression.
3329 Now, if you type something, it will be regular text.
3332 \begin_layout Standard
3333 Looking at the output you will notice that the expression was typeset nicely,
3334 with spaces between the letters and the equals sign, and a superscript
3336 \begin_inset Quotes eld
3340 \begin_inset Quotes erd
3344 Letters in math mode are assumed to be variables, and come out in italics.
3345 Numbers are just numbers.
3348 \begin_layout Standard
3349 This math editor is another example of the WYSIWYM philosophy.
3350 In \SpecialChar LaTeX
3351 , you write a mathematical expression using text and commands like
3357 ; this can be frustrating, because you cannot see what an expression looks
3358 like until you run the file under \SpecialChar LaTeX
3359 and you may have to spend time, for
3360 example, finding missing brackets.
3362 does not attempt to get the expression to look perfect (WYSIWYG), but
3363 it gives you an extremely good idea of what the expression will look like.
3365 then takes care of the professional typesetting.
3368 \begin_layout Section
3369 Navigating an Equation
3372 \begin_layout Standard
3374 \begin_inset Formula $E=mc^{2}$
3378 \begin_inset Formula $E=1+mc^{2}$
3382 Use the arrow keys to move the cursor into the expression.
3383 Note that when you enter the expression, the purple markers appear to let
3384 you know you are editing math.
3393 to move the cursor past the equals sign, and just type
3394 \begin_inset Quotes eld
3398 \begin_inset Quotes erd
3402 Again, you can use the arrow keys or
3406 to leave the formula\SpecialChar endofsentence
3410 \begin_layout Standard
3411 Other than the special keys described below, typing in math mode is like
3412 editing regular text.
3422 Select text either with the arrow keys or with the mouse.
3425 Edit\SpecialChar menuseparator
3428 works in math mode as well as cut and paste.
3429 One thing to be careful of: if you are left or right outside a formula
3438 respectively, you delete the whole formula.
3439 Luckily, you can just use
3446 \begin_layout Standard
3447 What if you want to change
3448 \begin_inset Formula $E=mc^{2}$
3452 \begin_inset Formula $E=mc^{2.5}+1$
3455 ? Again, you can use the mouse to click in the right place.
3456 However, you can also use the arrow keys.
3457 If the cursor is just after the
3458 \begin_inset Quotes eld
3462 \begin_inset Quotes erd
3466 \begin_inset Quotes eld
3470 \begin_inset Quotes erd
3477 and the cursor is moved to the level of the superscript, just before the
3479 \begin_inset Quotes eld
3483 \begin_inset Quotes erd
3488 \begin_inset Quotes eld
3492 \begin_inset Quotes erd
3500 will move the cursor back to the regular level.
3509 , the cursor will be placed
3513 the superscript (so that you can then type the
3514 \begin_inset Quotes eld
3518 \begin_inset Quotes erd
3524 \begin_layout Section
3525 Exponents and Indices
3528 \begin_layout Standard
3529 An exponent can be entered from the
3532 \begin_inset space ~
3537 (see below), but it is actually simpler just to type the caret key,
3538 \begin_inset Quotes eld
3542 \begin_inset Quotes erd
3547 will place another blue rectangle in the superscript, so that whatever
3548 you write next will be superscripted, and in a smaller font size.
3549 Everything you type until you hit a
3557 to exit the formula entirely) will be in the superscript.
3560 \begin_layout Standard
3561 Writing a subscript (index) is just as easy; start one by typing the underscore
3563 \begin_inset Quotes eld
3567 \begin_inset Quotes erd
3571 You can subscript and superscript both subscripts and superscripts like
3573 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3580 \begin_layout Labeling
3581 \labelwidthstring 00.00.0000
3587 \begin_inset space ~
3597 \begin_layout Section
3601 \begin_layout Standard
3605 \begin_inset space ~
3610 is a convenient way to enter symbols and/or to perform complicated formula
3612 Many of these operations can be accomplished from the keyboard or the
3614 Insert\SpecialChar menuseparator
3619 Edit\SpecialChar menuseparator
3622 menus (the latter only appears when you are in Math mode).
3623 However, we are going to concentrate on using the
3626 \begin_inset space ~
3631 , just to let you know what is out there; you can learn keyboard shortcuts
3632 and commands later from the
3639 \begin_layout Standard
3643 \begin_inset space ~
3648 is shown when the cursor is in a formula and can also be turned on manually
3651 View\SpecialChar menuseparator
3655 When you click there on
3656 \begin_inset Quotes eld
3660 \begin_inset Quotes erd
3666 arg "toolbar-toggle math"
3669 ) the toolbar will be shown permanently at the bottom; this state is visualized
3674 menu with a checkmark.
3675 When you click in this state again on
3676 \begin_inset Quotes eld
3680 \begin_inset Quotes erd
3690 \begin_inset space ~
3695 is only shown when the cursor is within a formula; this state is visualized
3696 by the renaming of the menu entry from
3697 \begin_inset Quotes eld
3701 \begin_inset Quotes erd
3705 \begin_inset Quotes eld
3709 \begin_inset space ~
3713 \begin_inset Quotes erd
3719 \begin_layout Subsection
3723 \begin_layout Standard
3727 \begin_inset space ~
3732 allows you to choose from a large array of symbols used in math: operators,
3733 arrows, relationships, delimiters, special characters, sums and integrals.
3734 Note that subscripting and superscripting allow you to put lower and upper
3735 limits on sums and integrals.
3738 \begin_layout Subsection
3739 Roots, decorations, and delimiters
3742 \begin_layout Standard
3743 To type a square root, just click on the button
3746 arg "math-insert \\sqrt"
3750 The square root appears, and the cursor is in a new insertion point inside
3752 You can type variables, numbers, other square roots, fractions, whatever
3755 will automatically resize the square root to fit what is inside.
3758 \begin_layout Standard
3760 \begin_inset Quotes eld
3764 \begin_inset Quotes erd
3768 \begin_inset Formula $\overrightarrow{a}$
3771 ) or group of characters (
3772 \begin_inset Formula $\overrightarrow{a+b}$
3775 ) is done similarly.
3776 Decorations are available from the toolbar via the button
3779 arg "math-insert \\hat"
3783 Click on a decoration, and \SpecialChar LyX
3784 will insert that decoration with an insertion
3785 point under (or over) it.
3786 Just type what you want in the insertion point.
3787 There are two sets of decorations: those that resize with the text you
3788 type, and those that have a fixed size, and are most appropriate for a
3793 \begin_layout Standard
3794 Delimiters such as parentheses, brackets, and braces work similarly, but
3795 are a bit more complicated.
3796 Hit the delimiter button
3799 arg "dialog-show mathdelimiter"
3807 Your current selection of delimiters is displayed in a box.
3808 It is a pair of parentheses by default, but you can choose a pair of braces,
3809 a brace and a parenthesis, or choose the empty square to have something
3811 \begin_inset Quotes eld
3815 \begin_inset Formula $a=\left\langle 7\right.$
3819 \begin_inset Quotes erd
3822 (the empty delimiter is displayed as a broken line in \SpecialChar LyX
3827 \begin_layout Standard
3828 If you are lazy, you can type actual parentheses in math mode, rather than
3834 However, those parentheses will be the same size as regular text, which
3835 will look bad if you have a big fraction or matrix inside the parentheses.
3836 So it is better to use one of the three delimiter buttons that insert them
3837 directly, for example
3840 arg "math-delim ( )"
3846 \begin_layout Standard
3847 You can also put delimiters or a square root sign or a decoration on already
3848 existing formula parts.
3849 Select the portion of the formula that you want to adjust, and then click
3850 on the button you want from the
3853 \begin_inset space ~
3859 Try using this to change Newton's second law from scalar to vector form
3861 \begin_inset Formula $f=ma$
3865 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3869 Once you have learned about matrices, this is how you will put parentheses
3870 or brackets around them.
3873 \begin_layout Subsection
3877 \begin_layout Standard
3878 To create a fraction, click on the fraction button
3881 arg "math-insert \\frac-square"
3887 \begin_inset space ~
3894 writes two insertion points in a fraction.
3895 As you would expect, you can use arrow keys or the mouse to move around
3897 Click on the top square and type
3898 \begin_inset Quotes eld
3902 \begin_inset Quotes erd
3911 \begin_inset Quotes eld
3915 \begin_inset Quotes erd
3919 You have made a fraction! Of course you can type anything within each of
3920 the two boxes: variables with exponents, square roots, other fractions,
3925 \begin_layout Labeling
3926 \labelwidthstring 00.00.0000
3932 \begin_inset space ~
3942 \begin_layout Subsection
3943 Functions: lim, log, sin and others
3946 \begin_layout Standard
3947 Because letters in math mode are considered to be variables, if you type
3949 \begin_inset Quotes eld
3953 \begin_inset Quotes erd
3956 in math mode, \SpecialChar LyX
3957 thinks you are typing the product of the three variables
3959 \begin_inset Formula $s$
3963 \begin_inset Formula $i$
3967 \begin_inset Formula $n$
3971 The three letters will be typeset in italics, when what you really wanted
3973 \begin_inset Quotes eld
3977 \begin_inset Quotes erd
3981 In addition, \SpecialChar LyX
3982 will not put a space between the word
3983 \begin_inset Quotes eld
3987 \begin_inset Quotes erd
3991 \begin_inset Quotes eld
3995 \begin_inset Quotes erd
4002 will exit the formula).
4004 \begin_inset Quotes eld
4008 \begin_inset Formula $\sin(x)$
4012 \begin_inset Quotes erd
4016 \begin_inset Quotes eld
4020 \begin_inset Formula $sin(x)$
4024 \begin_inset Quotes erd
4030 \begin_layout Standard
4034 \begin_inset space ~
4042 arg "math-insert \\functions"
4046 \begin_inset Quotes eld
4050 \begin_inset Quotes erd
4053 in the pop-up function list.
4055 \begin_inset Quotes eld
4059 \begin_inset Quotes erd
4062 is displayed in \SpecialChar LyX
4063 in black, and set in upright roman type.
4064 The whole word is treated as one symbol, so if you type
4068 , it will delete the whole word.
4070 \begin_inset Quotes eld
4074 \begin_inset Quotes erd
4077 , which will be written in blue italics, like you expect in a formula.
4078 In the output, the expression will be correctly typeset.
4082 \begin_layout Standard
4083 The function list includes other trigonometric functions and their inverses,
4084 hyperbolic functions, logarithms, limits, and quite a few others.
4085 These functions can take subscripts and superscripts, important for typing
4087 \begin_inset Quotes eld
4091 \begin_inset Formula $\cos^{2}\theta$
4095 \begin_inset Quotes erd
4099 \begin_inset Quotes eld
4103 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4107 \begin_inset Quotes erd
4113 \begin_layout Labeling
4114 \labelwidthstring 00.00.0000
4120 \begin_inset space ~
4130 \begin_layout Subsection
4134 \begin_layout Standard
4135 Click on the matrix button
4138 arg "dialog-show mathmatrix"
4144 \begin_inset space ~
4150 A pop-up dialog allows you to choose how many rows and columns you want
4152 Choose 2 rows and 3 columns and hit
4158 prints 6 insertion points in a
4159 \begin_inset Formula $2\times3$
4163 As usual, you can put any sort of formula expression (a square root, another
4164 matrix, etc.) in each insertion point.
4165 You can also leave some of the insertion points empty if you want.
4168 \begin_layout Standard
4173 can be used to move horizontally between the columns of a matrix.
4174 Alternatively, you can use the arrow keys to move around - hitting
4178 at the end of one box will move to the next box,
4182 will move to the next row, etc.
4185 \begin_layout Standard
4186 If you need to change the number of rows and columns, use the menu
4188 Edit\SpecialChar menuseparator
4190 \begin_inset space \thinspace{}
4194 \begin_inset space \thinspace{}
4199 or the math toolbar buttons
4202 arg "tabular-feature append-row"
4208 arg "tabular-feature delete-row"
4214 arg "tabular-feature append-column"
4220 arg "tabular-feature delete-column"
4226 \begin_layout Standard
4231 for information on how to change the horizontal alignment of each column,
4232 and how to change the vertical position of the whole matrix.
4233 Note that if you want to write a table containing text, you should use
4235 's wonderful table support, rather than trying to write text in a matrix.
4238 \begin_layout Subsection
4242 \begin_layout Standard
4243 All of the expressions we have written so far have been on the same line
4244 as the text that came before and after them, otherwise known as inline
4246 This is fine for short, simple expressions, but if you want to write larger
4247 ones, or if you want your expressions to stand out from the text, you need
4248 to write them in display mode.
4249 In addition, only displayed expressions can be labeled and numbered (see
4254 ), and multi-line equations must be in display mode.
4257 \begin_layout Standard
4258 While being in a formula, click on the display button
4269 This centers the formula and adds a blank line before and after it.
4270 Now type in an expression and compile your file to see how it looks.
4271 The display button is actually a toggle; use it now to change a couple
4272 of your expressions to display mode and back.
4276 \begin_layout Standard
4277 Display mode has a couple differences from inline mode:
4280 \begin_layout Itemize
4281 The default font is larger for a few symbols, like
4282 \begin_inset Formula $\sum$
4286 \begin_inset Formula $\int$
4292 \begin_layout Itemize
4293 Subscripts and superscripts for limits and sums (but not integrals) are
4294 written under and over rather than next to the symbols
4297 \begin_layout Itemize
4301 \begin_layout Standard
4302 Other than these differences, though, displayed expressions and inline expressio
4303 ns are very similar.
4306 \begin_layout Standard
4307 One final note about the way displayed formulas are typeset: be careful
4308 about whether you are putting your equation into a new paragraph or not.
4309 If your formula is in the middle of a sentence or paragraph, then do not
4315 Doing so will cause the text
4319 the formula to start a new paragraph.
4320 That text will be indented or follow a blank line, depending on your document
4321 paragraph settings, which is probably not what you want.
4324 \begin_layout Labeling
4325 \labelwidthstring 00.00.0000
4330 : Put the various equations in
4334 into display mode, and see how they are typeset differently.
4337 \begin_layout Labeling
4338 \labelwidthstring 00.00.0000
4343 : Using various tools you have learned in this section, you should be able
4344 to write an equation like:
4348 \begin_layout Plain Layout
4349 After you have done it the hard way, give
4351 Insert\SpecialChar menuseparator
4352 Math\SpecialChar menuseparator
4354 \begin_inset space ~
4365 \begin_inset Formula
4367 f(x)=\left\{ \begin{array}{cc}
4370 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4379 \begin_layout Section
4383 \begin_layout Standard
4384 Now you are familiar with the basics.
4386 's math editor can do a lot more.
4387 You can refer to the
4391 manual for tips on how to:
4394 \begin_layout Itemize
4395 Label and number expressions.
4398 \begin_layout Itemize
4399 Create multi-line equations.
4402 \begin_layout Itemize
4403 Change typefaces, e.
4404 \begin_inset space \thinspace{}
4408 \begin_inset space \space{}
4411 to write bold-face text in an expression.
4414 \begin_layout Itemize
4415 Fine-tune font sizes and spacing within an expression.
4416 (Do not worry about this until your final draft!)
4419 \begin_layout Itemize
4421 These are very powerful, because you just define them once at the top of
4422 the document, and then you can use them throughout the document.
4425 \begin_layout Itemize
4426 Do almost all you can do with math.
4429 \begin_layout Chapter
4433 \begin_layout Section
4434 Other major \SpecialChar LyX
4438 \begin_layout Standard
4439 We have not gone through all the possible commands in \SpecialChar LyX
4440 , and we are not planning
4449 \begin_inset space ~
4454 manual for more information.
4455 We will just mention a couple more major things \SpecialChar LyX
4459 \begin_layout Itemize
4461 has WYSIWYM support for tables.
4464 Insert\SpecialChar menuseparator
4470 arg "tabular-insert"
4474 Click on the table with the
4481 \begin_inset space ~
4486 dialog box which allows extensive table editing.
4490 arg "toolbar-toggle table"
4493 the table toolbar will appear permanently.
4496 \begin_layout Itemize
4498 also supports including pictures in any format within documents.
4501 Insert\SpecialChar menuseparator
4507 arg "dialog-show-new-inset graphics"
4511 Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4512 can have captions, and \SpecialChar LyX
4513 will automatically generate lists of figures and/or
4517 \begin_layout Itemize
4519 is heavily configurable.
4520 Everything from how the \SpecialChar LyX
4521 window looks to how the output comes out can be
4522 configured in a number of ways.
4523 Much configuration is done through
4525 Tools\SpecialChar menuseparator
4529 For more information on this, check out
4531 Help\SpecialChar menuseparator
4532 Customization\SpecialChar endofsentence
4536 \begin_layout Itemize
4538 is being developed by a team of programmers on five continents.
4539 Therefore, \SpecialChar LyX
4540 has better support for non-English languages (such as Dutch,
4541 German, French, Greek, Czech, Turkish, \SpecialChar ldots
4542 ) than many word processors.
4543 Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4544 languages Chinese Japanese, and Korean are supported.
4545 You can write documents in other languages and you can also configure \SpecialChar LyX
4547 to show its menus and error messages in other languages.
4551 \begin_layout Itemize
4552 The \SpecialChar LyX
4553 menus feature keybindings.
4554 This means that you can do
4556 File\SpecialChar menuseparator
4567 or by using the binding which is shown next to it in the menu (
4574 Keybindings are also configurable.
4575 For information on this, check out
4577 Help\SpecialChar menuseparator
4578 Customization\SpecialChar endofsentence
4582 \begin_layout Itemize
4584 can read \SpecialChar LaTeX
4587 \begin_inset space ~
4591 \begin_inset CommandInset ref
4593 reference "sec:tex2lyx"
4600 \begin_layout Itemize
4601 Spell-checking, thesaurus, and word count facilities are available.
4604 \begin_layout Itemize
4605 Generation of indexes and nomenclatures/glossaries is supported.
4608 \begin_layout Section
4610 for \SpecialChar LaTeX
4612 \begin_inset CommandInset label
4614 name "sec:latexusers"
4621 \begin_layout Standard
4622 If you do not know anything about \SpecialChar LaTeX
4623 , you do not have to read this section.
4624 Actually, you might want to
4628 about \SpecialChar LaTeX
4629 , and then read this chapter.
4630 However, some of those who begin to use \SpecialChar LyX
4631 will be familiar with \SpecialChar LaTeX
4633 If you are such a person, you may be wondering if \SpecialChar LyX
4634 can really do everything
4637 The short answer is that \SpecialChar LyX
4638 can do pretty much everything \SpecialChar LaTeX
4640 form or another, and it definitely simplifies most parts of writing a \SpecialChar LaTeX
4645 \begin_layout Standard
4646 Because this is just a tutorial, we are only going to mention things that
4647 new \SpecialChar LyX
4648 users will most likely be interested in.
4649 In the interests of keeping the Tutorial short, we will give only minimal
4654 \begin_inset space ~
4662 \begin_inset space ~
4667 manuals have a great deal of information on differences between \SpecialChar LyX
4668 and \SpecialChar LaTeX
4670 and how to do various \SpecialChar LaTeX
4671 tricks in \SpecialChar LyX
4675 \begin_layout Subsection
4680 \begin_layout Standard
4681 Anything that you enter in \SpecialChar TeX
4682 mode will be passed straight to \SpecialChar LaTeX
4684 displayed in red on the screen.
4685 You can use \SpecialChar TeX
4686 commands in \SpecialChar LyX
4689 Insert\SpecialChar menuseparator
4691 \begin_inset space ~
4703 This creates a box where everything within it is passed straight to \SpecialChar LaTeX
4707 \begin_layout Standard
4708 In a math formula, \SpecialChar TeX
4709 mode is handled a bit differently.
4711 mode is entered there by typing a backslash.
4712 The backslash is not written out, but anything you type afterwards will
4714 You exit \SpecialChar TeX
4719 or some other non-alphabetic character, like a number, underscore, caret
4721 Once you exit \SpecialChar TeX
4722 mode, if \SpecialChar LyX
4723 knows the \SpecialChar TeX
4724 command you have typed in, it will
4725 convert it to WYSIWYM\SpecialChar endofsentence
4727 \begin_inset Quotes eld
4737 \begin_inset Quotes erd
4740 in a formula and then press
4746 \begin_inset Quotes eld
4750 \begin_inset Quotes erd
4754 \begin_inset Quotes eld
4758 \begin_inset Formula $\gamma$
4762 \begin_inset Quotes erd
4766 This will work for almost all, non-complicated math macros.
4767 This may be faster than using the
4770 \begin_inset space ~
4775 , and will be especially convenient for experienced \SpecialChar LaTeX
4779 \begin_layout Standard
4780 As a special case, if you type
4781 \begin_inset Quotes eld
4791 \begin_inset Quotes erd
4794 in a formula, the beginning
4798 ending braces will be inserted in red while the cursor is placed between
4800 This makes it more convenient to type those commands that take an argument.
4803 \begin_layout Standard
4805 cannot do absolutely everything that \SpecialChar LaTeX
4807 Some fancy functions are not supported at all, while some work but are
4810 mode allows users to get the full flexibility of \SpecialChar LaTeX
4811 , while having all the
4812 convenient features of \SpecialChar LyX
4813 , like WYSIWYM math, tables, and editing.
4815 could never support every \SpecialChar LaTeX
4823 in the preamble (see Section
4824 \begin_inset space ~
4828 \begin_inset CommandInset ref
4830 reference "sec:preamble"
4834 ), you can use any package you want — although you will not have WYSIWYM
4835 support for that package's features.
4838 \begin_layout Subsection
4839 Importing \SpecialChar LaTeX
4845 \begin_inset CommandInset label
4854 \begin_layout Standard
4855 You can import a \SpecialChar LaTeX
4856 file into \SpecialChar LyX
4859 File\SpecialChar menuseparator
4860 Import\SpecialChar menuseparator
4862 \begin_inset space ~
4867 menu in \SpecialChar LyX
4869 This will call the program
4873 which will create a file foo.lyx from the file foo.tex.
4875 will then open that file.
4876 If the translation does not work, you can try calling
4880 from the command line, possibly using fancier options.
4883 \begin_layout Standard
4884 Even when the translation does work,
4888 may not translate everything, though it does handle most legal \SpecialChar LaTeX
4890 It will leave things it does not understand in \SpecialChar TeX
4891 mode; so, after translating
4896 , you can look for the red text and manually edit it to get it right.
4899 \begin_layout Standard
4904 has its own documentation (manpage), which Unix/Linux users can access
4905 via the console command
4908 \begin_inset space ~
4914 The manpage describes which \SpecialChar LaTeX
4915 commands and environments are not supported,
4916 what bugs you might run into (and how to get around them), and how to use
4917 the various options.
4920 \begin_layout Standard
4921 It is important to understand that
4925 can only translate files whose document class is
4926 \begin_inset Quotes eld
4930 \begin_inset Quotes erd
4934 , that is, for which there is a corresponding \SpecialChar LyX
4940 If there is no layout file, then you will get an error saying that the
4941 conversion could not be performed.
4942 So, unless you have a layout for the document class of your \SpecialChar LaTeX
4947 simply will not know how to translate the \SpecialChar LaTeX
4948 that it finds there into things
4951 More about layout files and how they are created is explained in detail
4959 \begin_layout Subsection
4960 Converting \SpecialChar LyX
4961 Documents to \SpecialChar LaTeX
4965 \begin_layout Standard
4966 You might wish to convert a \SpecialChar LyX
4967 Document to a \SpecialChar LaTeX
4969 For example, a co-worker or co-author who does not have \SpecialChar LyX
4974 File\SpecialChar menuseparator
4975 Export\SpecialChar menuseparator
4979 This will create a file
4987 file you are editing.
4990 \begin_layout Subsection
4995 \begin_layout Subsubsection
4999 \begin_layout Standard
5002 Document\SpecialChar menuseparator
5005 dialog takes care of the document-wide options, such as changing the document
5006 class, default font size and paper size.
5007 Document class options and also options for \SpecialChar LaTeX
5008 packages can be entered there
5012 \begin_inset space ~
5020 \begin_layout Subsubsection
5021 Other Preamble Matter
5022 \begin_inset CommandInset label
5031 \begin_layout Standard
5032 If you have special commands to put in the preamble of a \SpecialChar LaTeX
5034 use them in a \SpecialChar LyX
5038 Document\SpecialChar menuseparator
5039 Settings\SpecialChar menuseparator
5041 \begin_inset space ~
5046 and type in the dialog window (or from the document settings dialog, depending
5048 Anything you type will (as with \SpecialChar TeX
5049 mode) be sent directly to \SpecialChar LaTeX
5053 \begin_layout Subsection
5058 \begin_layout Standard
5060 has support for Bib\SpecialChar TeX
5061 , which allows you to build databases of bibliographical
5062 references to be used in multiple documents.
5065 Insert\SpecialChar menuseparator
5067 \begin_inset space \thinspace{}
5071 \begin_inset space \thinspace{}
5074 TOC\SpecialChar menuseparator
5076 \begin_inset space ~
5091 field you load Bib\SpecialChar TeX
5096 field you can load Bib\SpecialChar TeX
5100 \begin_layout Standard
5101 After you have done this, you can use citations from any bibliographies
5102 you have included with
5104 Insert\SpecialChar menuseparator
5108 \begin_inset space ~
5112 \begin_inset CommandInset ref
5114 reference "sec:bibliographies"
5123 dialog will show a list of all the references in your
5131 \begin_layout Section
5135 \begin_layout Standard
5136 Sometimes when you try to view a document, there will be errors, things
5137 that \SpecialChar LyX
5138 or \SpecialChar LaTeX
5140 When this happens, \SpecialChar LyX
5145 \begin_inset space ~
5151 Clicking on individual errors in this dialog will take you to the place
5152 in the \SpecialChar LyX
5153 document where the error occurs and also display the detailed \SpecialChar LaTeX