]> git.lyx.org Git - lyx.git/blob - lib/doc/Tutorial.lyx
f6f77acd242bfdc392880388dab80fef815851b8
[lyx.git] / lib / doc / Tutorial.lyx
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass book
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 %This preamble is designed to ensure that the document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the document may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
18
19  % set fonts for nicer pdf view
20  \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
21
22 \fi % end if pdflatex is used
23
24 % the pages of the TOC is numbered roman
25 % and a pdf-bookmark for the TOC is added
26 \let\myTOC\tableofcontents
27 \renewcommand\tableofcontents{%
28   \frontmatter
29   \pdfbookmark[1]{\contentsname}{}
30   \myTOC
31   \mainmatter }
32 \end_preamble
33 \use_default_options false
34 \begin_modules
35 logicalmkup
36 \end_modules
37 \maintain_unincluded_children false
38 \language english
39 \language_package default
40 \inputencoding auto
41 \fontencoding global
42 \font_roman default
43 \font_sans default
44 \font_typewriter default
45 \font_default_family default
46 \use_non_tex_fonts false
47 \font_sc false
48 \font_osf false
49 \font_sf_scale 100
50 \font_tt_scale 100
51
52 \graphics default
53 \default_output_format default
54 \output_sync 0
55 \bibtex_command default
56 \index_command default
57 \paperfontsize 12
58 \spacing single
59 \use_hyperref true
60 \pdf_title "The LyX Tutorial"
61 \pdf_author "LyX Team"
62 \pdf_subject "LyX-documentation Tutorial"
63 \pdf_keywords "LyX, documentation"
64 \pdf_bookmarks true
65 \pdf_bookmarksnumbered true
66 \pdf_bookmarksopen true
67 \pdf_bookmarksopenlevel 1
68 \pdf_breaklinks false
69 \pdf_pdfborder false
70 \pdf_colorlinks true
71 \pdf_backref false
72 \pdf_pdfusetitle false
73 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
74 \papersize default
75 \use_geometry false
76 \use_amsmath 0
77 \use_esint 0
78 \use_mhchem 1
79 \use_mathdots 1
80 \cite_engine basic
81 \use_bibtopic false
82 \use_indices false
83 \paperorientation portrait
84 \suppress_date false
85 \use_refstyle 0
86 \index Index
87 \shortcut idx
88 \color #008000
89 \end_index
90 \secnumdepth 3
91 \tocdepth 2
92 \paragraph_separation indent
93 \paragraph_indentation default
94 \quotes_language english
95 \papercolumns 1
96 \papersides 2
97 \paperpagestyle headings
98 \tracking_changes false
99 \output_changes false
100 \html_math_output 0
101 \html_css_as_file 0
102 \html_be_strict false
103 \end_header
104
105 \begin_body
106
107 \begin_layout Title
108 The LyX Tutorial
109 \end_layout
110
111 \begin_layout Author
112 by the LyX Team
113 \begin_inset Foot
114 status collapsed
115
116 \begin_layout Plain Layout
117 If you have comments or error corrections, please send them to the LyX Documenta
118 tion mailing list, 
119 \family typewriter
120
121 \begin_inset CommandInset href
122 LatexCommand href
123 target "lyx-docs@lists.lyx.org"
124 type "mailto:"
125
126 \end_inset
127
128
129 \family default
130 .
131 \end_layout
132
133 \end_inset
134
135
136 \end_layout
137
138 \begin_layout Standard
139 \begin_inset CommandInset toc
140 LatexCommand tableofcontents
141
142 \end_inset
143
144
145 \end_layout
146
147 \begin_layout Chapter
148 Introduction
149 \end_layout
150
151 \begin_layout Section
152 Welcome to LyX!
153 \end_layout
154
155 \begin_layout Standard
156 This file is designed for all of you who have never heard of LaTeX, or do
157  not know it very well.
158  Now, do not panic - you will not need to learn LaTeX to use LyX.
159  That is, after all, the whole point of LyX: to provide an almost-WYSIWYG
160  interface to LaTeX.
161  There are some things you will need to learn, however, in order to use
162  LyX effectively.
163 \end_layout
164
165 \begin_layout Standard
166 Some of you probably found your way to this document because you tried to
167  put two spaces after a 
168 \begin_inset Quotes eld
169 \end_inset
170
171 .
172 \begin_inset Quotes erd
173 \end_inset
174
175  or tried to put three blank lines between paragraphs.
176  You found out you could not and in fact, you will find out that most of
177  the little tricks you are accustomed to use in other word processors will
178  not work in LyX.
179  That is because most word processors you have  used before allow you to
180  manually enter all spacings, font changes, and so on.
181  So you end up not only writing a document but typesetting it, too.
182  LyX does the typesetting for you, in a consistent fashion, letting you
183  focus on the important things, like the content of your writing.
184 \end_layout
185
186 \begin_layout Standard
187 So read on to learn more about LyX.
188  Reading this tutorial is definitely worth the time.
189 \end_layout
190
191 \begin_layout Section
192 What the Tutorial 
193 \emph on
194 is
195 \emph default
196  and what it 
197 \emph on
198 is not
199 \end_layout
200
201 \begin_layout Standard
202 Before we get started with this section, we want to make a quick note of
203  something.
204  The 
205 \emph on
206 Tutorial
207 \emph default
208  uses the notation outlined in the 
209 \emph on
210 Introduction
211 \emph default
212  manual.
213  If you came to this manual first, please read the 
214 \emph on
215 Introduction
216 \emph default
217  before you continue with the 
218 \emph on
219 Tutorial
220 \emph default
221 .
222 \end_layout
223
224 \begin_layout Standard
225 Now that you know which fonts mean what, we want to talk a bit about what
226  this 
227 \emph on
228 Tutorial
229 \emph default
230  is for.
231 \end_layout
232
233 \begin_layout Subsection
234 Getting the most out of the Tutorial
235 \end_layout
236
237 \begin_layout Standard
238 This tutorial consists of examples and exercises.
239  To get the most out of this document, you should read through the it, typing
240  all the little things we are telling you to type and trying out all of
241  the exercises to see if you get them right.
242  For convenience, you might want to print out the PDF version of this document.
243 \end_layout
244
245 \begin_layout Standard
246 If you are familiar with LaTeX, you will probably be able to read the 
247 \emph on
248 Tutorial
249 \emph default
250  somewhat faster, since many LyX ideas are just LaTeX ideas in disguise.
251  However, LyX has features you will want to learn about.
252  Even if you do not feel like reading the rest of the 
253 \emph on
254 Tutorial
255 \emph default
256 , you should definitely check out Section
257 \begin_inset space ~
258 \end_inset
259
260
261 \begin_inset CommandInset ref
262 LatexCommand ref
263 reference "sec:latexusers"
264
265 \end_inset
266
267 , which is specifically written for experienced LaTeX users.
268 \end_layout
269
270 \begin_layout Subsection
271 What you 
272 \emph on
273 will not
274 \emph default
275  find
276 \end_layout
277
278 \begin_layout Itemize
279 Detailed explanations of all of LyX's features.
280 \end_layout
281
282 \begin_deeper
283 \begin_layout Standard
284 Look in the 
285 \emph on
286 User's Guide
287 \emph default
288  when you need this.
289 \end_layout
290
291 \end_deeper
292 \begin_layout Itemize
293 Detailed explanations of LaTeX.
294 \end_layout
295
296 \begin_deeper
297 \begin_layout Standard
298 Unnecessary.
299  If you want to learn some of the neat tricks you can do with LaTeX in LyX,
300  you can have a look at the 
301 \emph on
302 Embedded
303 \begin_inset space ~
304 \end_inset
305
306 Objects
307 \emph default
308  manual.
309 \end_layout
310
311 \end_deeper
312 \begin_layout Standard
313 It is time to move onwards, time for your first document \SpecialChar \ldots{}
314
315 \end_layout
316
317 \begin_layout Chapter
318 Getting started with LyX
319 \end_layout
320
321 \begin_layout Section
322 Your first LyX document
323 \end_layout
324
325 \begin_layout Standard
326 OK\SpecialChar \@.
327  You are ready to start writing.
328  Before you do, there are a few things we need to mention, which will hopefully
329  make the Tutorial more instructive and useful.
330  
331 \end_layout
332
333 \begin_layout Standard
334 Because there is information we cannot give you in the Tutorial, the 
335 \emph on
336 first
337 \emph default
338  
339 \series medium
340 thing that you need to do is find the
341 \series default
342  other 
343 \series medium
344 help files.
345  This is very simple:
346 \series default
347  Start up LyX, Choose the 
348 \emph on
349 User's Guide
350 \emph default
351  from the 
352 \family sans
353 Help
354 \family default
355  menu.
356  You may want to load the 
357 \emph on
358 Tutorial
359 \emph default
360  as well (if you are not reading it within LyX already).
361  This way, you can read them while you are writing your own file.
362 \begin_inset Foot
363 status collapsed
364
365 \begin_layout Plain Layout
366 They can also serve as good examples of how to use the many features of
367  LyX.
368 \end_layout
369
370 \end_inset
371
372  Note that once you have got more than one document open, you can use the
373  
374 \family sans
375 View
376 \family default
377  menu or the document tabs to switch between them.
378 \end_layout
379
380 \begin_layout Standard
381 In this Tutorial, we are going to assume that you have a fully working version
382  of LyX, as well as a LaTeX-distribution and a PDF-viewer.
383  This should be the case on all major Linux- and BSD-distributions, as well
384  as on Windows, where this is setup by the LyX installers.
385 \end_layout
386
387 \begin_layout Standard
388 Finally, we have written a file called 
389 \family typewriter
390 example_raw.lyx
391 \family default
392  to let you practice your LyX skills.
393  Imagine that it was typed by someone who did not know about any of LyX's
394  great features.
395  As you learn new LyX functions, we will suggest that you fix those parts
396  of 
397 \family typewriter
398 example_raw.lyx
399 \family default
400 .
401  It also contains `subtle' hints about how to fix things.
402 \begin_inset Foot
403 status collapsed
404
405 \begin_layout Plain Layout
406 The hints are located in yellow 
407 \begin_inset Quotes eld
408 \end_inset
409
410 Notes
411 \begin_inset Quotes erd
412 \end_inset
413
414 .
415  Access the text in a note by clicking on it.
416 \end_layout
417
418 \end_inset
419
420  If you want to cheat, or check what you have done, there is also a file
421  called 
422 \family typewriter
423 example_lyxified.lyx
424 \family default
425  which contains the same text written and typeset by a LyX master.
426 \end_layout
427
428 \begin_layout Standard
429 The example files can be found in the 
430 \family typewriter
431 examples
432 \family default
433  directory of LyX's installation folder.
434  Open the raw document, and use 
435 \family sans
436 File\SpecialChar \menuseparator
437 Save
438 \begin_inset space ~
439 \end_inset
440
441 As
442 \family default
443  to save a copy in your own directory for you to work on.
444  As you fix parts of the raw document, check to see how those changes affect
445  the DVI output.
446 \end_layout
447
448 \begin_layout Standard
449 By the way, the 
450 \family typewriter
451 examples
452 \family default
453  directory contains lots of other examples files.
454  They will show you how to do various fancy things with LyX.
455  After you have read the Tutorial, or when you are confused about how to
456  do something fancy in LyX, take a look at these files.
457 \end_layout
458
459 \begin_layout Subsection
460 Typing, Viewing, and Exporting
461 \end_layout
462
463 \begin_layout Itemize
464 Open a new file with 
465 \family sans
466 File\SpecialChar \menuseparator
467 New
468 \end_layout
469
470 \begin_layout Itemize
471 Type a sentence like: 
472 \family typewriter
473 This is my first LyX document!
474 \end_layout
475
476 \begin_layout Itemize
477 Save your document with 
478 \family sans
479 File\SpecialChar \menuseparator
480 Save
481 \begin_inset space ~
482 \end_inset
483
484 As\SpecialChar \@.
485
486 \end_layout
487
488 \begin_layout Itemize
489 Create a PDF file, with 
490 \family sans
491 View\SpecialChar \menuseparator
492 View
493 \family default
494  or the toolbar button 
495 \family sans
496
497 \begin_inset Info
498 type  "icon"
499 arg   "buffer-view"
500 \end_inset
501
502
503 \family default
504 .
505  LyX will open a PDF-viewer program displaying your document as it will
506  look when printed.
507 \begin_inset Foot
508 status collapsed
509
510 \begin_layout Plain Layout
511 You can save time by leaving the PDF-viewer running in the background.
512  Then, you can use 
513 \family sans
514 View\SpecialChar \menuseparator
515 Update
516 \family default
517  or the toolbar button 
518 \family sans
519
520 \begin_inset Info
521 type  "icon"
522 arg   "buffer-update"
523 \end_inset
524
525
526 \family default
527  and just click on the PDF-viewer window (or unminimize it) afterwards.
528 \end_layout
529
530 \end_inset
531
532
533 \end_layout
534
535 \begin_layout Itemize
536 Export the ready to print document with 
537 \family sans
538 File\SpecialChar \menuseparator
539 Export
540 \family default
541  to a format you want
542 \family sans
543 .
544 \end_layout
545
546 \begin_layout Standard
547 Congratulations! You have written your first LyX document.
548  All of the rest is just details, which are covered in the other manuals.
549 \end_layout
550
551 \begin_layout Subsection
552 Simple Operations
553 \end_layout
554
555 \begin_layout Standard
556 LyX can of course do most of the things you are used to doing with a word
557  processor.
558  It will word-wrap and indent paragraphs automatically.
559  Here is a quick description of how to do some simple actions.
560 \end_layout
561
562 \begin_layout Description
563 Undo LyX has multiple levels of undo, which means you can undo everything
564  you have done since your current editing session started, by selecting
565  
566 \family sans
567 Edit\SpecialChar \menuseparator
568 Undo
569 \family default
570  (toolbar button 
571 \family sans
572
573 \begin_inset Info
574 type  "icon"
575 arg   "undo"
576 \end_inset
577
578
579 \family default
580 ) over and over again.
581  If you undo too much, just select 
582 \family sans
583 Edit\SpecialChar \menuseparator
584 Redo
585 \family default
586  (toolbar button 
587 \family sans
588
589 \begin_inset Info
590 type  "icon"
591 arg   "redo"
592 \end_inset
593
594
595 \family default
596 ) to get it back.
597 \end_layout
598
599 \begin_deeper
600 \begin_layout Standard
601 Currently, undo is limited to 100 steps.
602 \end_layout
603
604 \end_deeper
605 \begin_layout Description
606 Cut/Paste/Copy Use 
607 \family sans
608 Edit\SpecialChar \menuseparator
609 Cut
610 \family default
611  (toolbar button 
612 \family sans
613
614 \begin_inset Info
615 type  "icon"
616 arg   "cut"
617 \end_inset
618
619
620 \family default
621 ), 
622 \family sans
623 Edit\SpecialChar \menuseparator
624 Copy
625 \family default
626  (toolbar button 
627 \family sans
628
629 \begin_inset Info
630 type  "icon"
631 arg   "copy"
632 \end_inset
633
634
635 \family default
636 ), and 
637 \family sans
638 Edit\SpecialChar \menuseparator
639 Paste
640 \family default
641  (toolbar button 
642 \family sans
643
644 \begin_inset Info
645 type  "icon"
646 arg   "paste"
647 \end_inset
648
649
650 \family default
651
652 \begin_inset Graphics
653         filename ../images/paste.png
654         scale 75
655
656 \end_inset
657
658 ) to cut, copy, and paste.
659  Or automatically paste selected text (including selections from other programs)
660  with the 
661 \emph on
662 middle mouse button
663 \emph default
664 .
665 \end_layout
666
667 \begin_layout Description
668 Find/Replace Use 
669 \family sans
670 Edit\SpecialChar \menuseparator
671 Find
672 \begin_inset space ~
673 \end_inset
674
675 &
676 \begin_inset space ~
677 \end_inset
678
679 Replace
680 \family default
681  (toolbar button 
682 \family sans
683
684 \begin_inset Info
685 type  "icon"
686 arg   "dialog-show findreplace"
687 \end_inset
688
689
690 \family default
691 ) to search.
692  In the dialog, search with the 
693 \family sans
694 Find
695 \begin_inset space ~
696 \end_inset
697
698 Next
699 \family default
700  button, and use the 
701 \family sans
702 Replace
703 \family default
704  button to replace a word you have found.
705 \begin_inset Foot
706 status collapsed
707
708 \begin_layout Plain Layout
709 Close the window when you are done or leave it open if you find it more
710  convenient.
711  Most dialog boxes in LyX can operate like this.
712  Just be sure you have the right window in focus when you are trying to
713  type in the main LyX window or a LyX dialog.
714 \end_layout
715
716 \end_inset
717
718  If you like, you can specify whether to make the search case-sensitive,
719  or to search for only complete words; you can also search backwards through
720  the document.
721 \end_layout
722
723 \begin_layout Description
724 Character
725 \begin_inset space ~
726 \end_inset
727
728 Formatting You can 
729 \emph on
730 emphasize
731 \emph default
732  text (which will by default print characters in italics), set it in 
733 \series bold
734 bold face
735 \series default
736 , in 
737 \noun on
738 Noun Style
739 \noun default
740  (usually small caps, used for people's names), or use your own formatting
741  by using the 
742 \family sans
743 Edit\SpecialChar \menuseparator
744 Text
745 \begin_inset space ~
746 \end_inset
747
748 Style
749 \family default
750  dialog (toolbar button 
751 \family sans
752
753 \begin_inset Info
754 type  "icon"
755 arg   "dialog-show character"
756 \end_inset
757
758
759 \family default
760 ).
761 \end_layout
762
763 \begin_layout Description
764 Toolbar There are buttons on the toolbar (just below the menus) which allow
765  you to do some of the more popular functions, such as 
766 \family sans
767 Paste
768 \family default
769  and 
770 \family sans
771 Print
772 \family default
773 .
774 \end_layout
775
776 \begin_layout Standard
777 Of course, you have not yet written enough to make most of these functions
778  useful.
779  As you write more, though, try undoing, pasting, etc.
780 \end_layout
781
782 \begin_layout Subsection
783 WYSIWYM: Whitespace in LyX
784 \end_layout
785
786 \begin_layout Standard
787 One of the hardest things for new users to get used to is the way that LyX
788  handles whitespace.
789  As many times as you hit 
790 \family sans
791 Return
792 \family default
793 , you will only get one blank line.
794  As many times as you hit 
795 \family sans
796 Space
797 \family default
798 , you will only get one space.
799  On a blank line, LyX will not let you type even one space.
800  The 
801 \family sans
802 Tab
803 \family default
804  key will not move you forward one tab stop; in fact there 
805 \emph on
806 are
807 \emph default
808  no tab stops! There is no ruler at the top of the page to let you set tabs
809  or margins, either.
810 \end_layout
811
812 \begin_layout Standard
813 Many word processors are based on the WYSIWYG principle: 
814 \begin_inset Quotes eld
815 \end_inset
816
817 What You See Is What You Get.
818 \begin_inset Quotes erd
819 \end_inset
820
821  LyX, on the other hand, is based on the principle that 
822 \begin_inset Quotes eld
823 \end_inset
824
825 What You See Is What You 
826 \emph on
827 Mean
828 \emph default
829 .
830 \begin_inset Quotes erd
831 \end_inset
832
833  You type what you mean, and LyX will take care of typesetting it for you,
834  so that the output looks nice.
835  A 
836 \family sans
837 Return
838 \family default
839  grammatically separates paragraphs, and a 
840 \family sans
841 Space
842 \family default
843  grammatically separates words, so there is no reason to have several of
844  them in a row; a 
845 \family sans
846 Tab
847 \family default
848  has no grammatical function at all, so LyX does not support it.
849  Using LyX, you will spend more of your time worrying about the 
850 \emph on
851 content
852 \emph default
853  of your document, and less time worrying about the 
854 \emph on
855 format.
856
857 \emph default
858  See the 
859 \emph on
860 Introduction
861 \emph default
862  for more information on the WYSIWYM concept.
863 \end_layout
864
865 \begin_layout Standard
866 LyX does have (many) ways to fine-tune the formatting of your document.
867  After all, LyX might not typeset 
868 \emph on
869 exactly
870 \emph default
871  what you mean.
872  The 
873 \emph on
874 User's Guide
875 \emph default
876  has information about all that.
877  It includes horizontal fills and vertical space â€” which are more powerful
878  and versatile than multiple spaces or blank lines â€” and ways to change
879  font sizes, character styles, and paragraph alignments by hand.
880  The idea, though, is that you can write your whole document, focusing on
881  content, and just worry about that fine-tuning at the end.
882  With standard word processors, you will be distracted by document formatting
883  throughout the writing process.
884 \end_layout
885
886 \begin_layout Section
887 Environments
888 \end_layout
889
890 \begin_layout Standard
891 Different parts of a document have different purposes; we call these parts
892  
893 \emph on
894 environments
895 \emph default
896 .
897  Most of a document is made up of regular text.
898  Section titles (chapter, subsection, etc.) let the reader know that a new
899  topic or subtopic will be discussed.
900  Certain types of documents have special environments.
901  A journal article will have an abstract and a title.
902  A letter will have neither of these, but will probably have an environment
903  that gives the writer's address.
904 \end_layout
905
906 \begin_layout Standard
907 Environments are a major part of the 
908 \begin_inset Quotes eld
909 \end_inset
910
911 What You See Is What You Mean
912 \begin_inset Quotes erd
913 \end_inset
914
915  philosophy of LyX.
916  A given environment may require a certain font style, font size, indenting,
917  line spacing, and more.
918  This problem is aggravated, because the exact formatting for a given environmen
919 t may change: one journal may use boldface, 18 point, centered type for
920  section titles while another uses italicized, 15 point, left justified
921  type; different languages may have different standards for indenting; and
922  bibliography formats can vary widely.
923  LyX lets you avoid learning all the different formatting styles.
924 \end_layout
925
926 \begin_layout Standard
927 The 
928 \family sans
929 Environment
930 \family default
931  choice box is located on the left end of the toolbar and looks like this:
932  
933 \begin_inset Graphics
934         filename clipart/ToolbarEnvBox.png
935         scale 75
936         clip
937
938 \end_inset
939
940 .
941  It indicates in which environment you are currently writing.
942  While you were writing your first document, it said 
943 \begin_inset Quotes eld
944 \end_inset
945
946 Standard,
947 \begin_inset Quotes erd
948 \end_inset
949
950  which is the default environment for text.
951  Now you will put a number of environments in your new document so that
952  you can see how they work.
953 \end_layout
954
955 \begin_layout Subsection
956 Sections and Subsections
957 \end_layout
958
959 \begin_layout Standard
960 Type the word 
961 \family typewriter
962 Introduction
963 \family default
964  on the first line of your LyX file, and select 
965 \family sans
966 Section
967 \family default
968  in the 
969 \family sans
970 Environment
971 \family default
972  box.
973 \begin_inset Foot
974 status collapsed
975
976 \begin_layout Plain Layout
977 You do not have to 
978 \emph on
979 select
980 \emph default
981  the line.
982  If nothing is selected, LyX changes the paragraph you are currently in
983  to the selected environment.
984  Alternatively, you can change several paragraphs to a different environment
985  by selecting them before picking an environment.
986 \end_layout
987
988 \end_inset
989
990  Be sure to use 
991 \family sans
992 Section
993 \family default
994  and 
995 \emph on
996 not
997 \emph default
998  
999 \family sans
1000 Section*
1001 \family default
1002 , which will be covered below.
1003  LyX numbers the section 
1004 \begin_inset Quotes eld
1005 \end_inset
1006
1007 1
1008 \begin_inset Quotes erd
1009 \end_inset
1010
1011  and typesets the section heading (title) in a larger font.
1012  Now hit 
1013 \family sans
1014 Return
1015 \family default
1016 \SpecialChar \@.
1017  Note that the 
1018 \family sans
1019 Environment
1020 \family default
1021  box changes from 
1022 \begin_inset Quotes eld
1023 \end_inset
1024
1025 Section
1026 \begin_inset Quotes erd
1027 \end_inset
1028
1029  back to 
1030 \begin_inset Quotes eld
1031 \end_inset
1032
1033 Standard
1034 \begin_inset Quotes erd
1035 \end_inset
1036
1037 .
1038  Section headings, like most environments, are assumed to end when you type
1039  
1040 \family sans
1041 Return
1042 \family default
1043 \SpecialChar \@.
1044  Type the document introduction: 
1045 \end_layout
1046
1047 \begin_layout LyX-Code
1048 This is an introduction to my first LyX document.
1049 \end_layout
1050
1051 \begin_layout Standard
1052 Hit 
1053 \family sans
1054 Return
1055 \family default
1056  again, and select 
1057 \family sans
1058 Section
1059 \family default
1060  from the 
1061 \family sans
1062 Environment
1063 \family default
1064  box again.
1065  LyX writes a 
1066 \begin_inset Quotes eld
1067 \end_inset
1068
1069 2
1070 \begin_inset Quotes erd
1071 \end_inset
1072
1073  and waits for you to type a title.
1074  Type 
1075 \begin_inset Quotes eld
1076 \end_inset
1077
1078
1079 \family typewriter
1080 More
1081 \begin_inset space ~
1082 \end_inset
1083
1084 Stuff
1085 \family default
1086
1087 \begin_inset Quotes erd
1088 \end_inset
1089
1090 , and you will see that LyX again sets it as a section title.
1091 \end_layout
1092
1093 \begin_layout Standard
1094 It gets better.
1095  Go to the end of Section
1096 \begin_inset space ~
1097 \end_inset
1098
1099 1 again (after 
1100 \begin_inset Quotes eld
1101 \end_inset
1102
1103 my first LyX document
1104 \begin_inset Quotes erd
1105 \end_inset
1106
1107 ) and hit 
1108 \family sans
1109 Return
1110 \family default
1111  again, and select 
1112 \family sans
1113 Section
1114 \family default
1115  from the 
1116 \family sans
1117 Environment
1118 \family default
1119  box again.
1120  Again, LyX writes 
1121 \begin_inset Quotes eld
1122 \end_inset
1123
1124 2
1125 \begin_inset Quotes erd
1126 \end_inset
1127
1128  and waits for you to type a title.
1129  Type 
1130 \family typewriter
1131 About This Document
1132 \family default
1133 .
1134  Section
1135 \begin_inset space ~
1136 \end_inset
1137
1138
1139 \begin_inset Quotes eld
1140 \end_inset
1141
1142 More Stuff
1143 \begin_inset Quotes erd
1144 \end_inset
1145
1146 , which was Section
1147 \begin_inset space ~
1148 \end_inset
1149
1150 2, has been automatically renumbered to Section
1151 \begin_inset space ~
1152 \end_inset
1153
1154 3! In true WYSIWYM fashion, you just need to identify the text that makes
1155  up the section titles, and LyX takes care of numbering the sections and
1156  typesetting them.
1157 \end_layout
1158
1159 \begin_layout Standard
1160 Hit 
1161 \family sans
1162 Return
1163 \family default
1164  to get back to the 
1165 \family sans
1166 Standard
1167 \family default
1168  environment, and type the following five lines:
1169 \end_layout
1170
1171 \begin_layout LyX-Code
1172 Sections and subsections are described below.
1173 \end_layout
1174
1175 \begin_layout LyX-Code
1176 Section Description
1177 \end_layout
1178
1179 \begin_layout LyX-Code
1180 Sections are bigger than subsections.
1181 \end_layout
1182
1183 \begin_layout LyX-Code
1184 Subsection description
1185 \end_layout
1186
1187 \begin_layout LyX-Code
1188 Subsections are smaller than sections.
1189 \end_layout
1190
1191 \begin_layout Standard
1192 Click on the second line and select 
1193 \family sans
1194 Subsection
1195 \family default
1196  from the 
1197 \family sans
1198 Environment
1199 \family default
1200  box.
1201  LyX numbers the subsection 
1202 \begin_inset Quotes eld
1203 \end_inset
1204
1205 2.1
1206 \begin_inset Quotes erd
1207 \end_inset
1208
1209 , and typesets it in a font which is bigger than regular text but smaller
1210  than the section title.
1211  Change the fourth line to the 
1212 \family sans
1213 Subsection
1214 \family default
1215  environment as well.
1216  As you probably expected, LyX automatically numbered the section 
1217 \begin_inset Quotes eld
1218 \end_inset
1219
1220 2.2
1221 \begin_inset Quotes erd
1222 \end_inset
1223
1224 .
1225  If you put yet another section before Section
1226 \begin_inset space ~
1227 \end_inset
1228
1229 2, Section
1230 \begin_inset space ~
1231 \end_inset
1232
1233 2 will be renumbered as Section 3, and the subsections will be renumbered
1234  to 
1235 \begin_inset Quotes eld
1236 \end_inset
1237
1238 3.1
1239 \begin_inset Quotes erd
1240 \end_inset
1241
1242  and 
1243 \begin_inset Quotes eld
1244 \end_inset
1245
1246 3.2
1247 \begin_inset Quotes erd
1248 \end_inset
1249
1250 .
1251 \end_layout
1252
1253 \begin_layout Standard
1254 Further levels of sectioning include 
1255 \family sans
1256 Subsubsection
1257 \family default
1258
1259 \family sans
1260 Paragraph
1261 \family default
1262 , and 
1263 \family sans
1264 Subparagraph
1265 \family default
1266 .
1267  We will let you play with these on your own.
1268  You may notice that paragraph and subparagraph headings are not numbered
1269  by default, and that subparagraphs are indented; see the 
1270 \emph on
1271 User's Guide
1272 \emph default
1273  for an explanation and how to change this.
1274  
1275 \family sans
1276 Chapter
1277 \family default
1278  headings are actually the highest level of sectioning, above 
1279 \family sans
1280 Section
1281 \family default
1282 s, but you are only allowed to use them in certain types (text classes)
1283  of LyX documents (see Section
1284 \begin_inset space ~
1285 \end_inset
1286
1287
1288 \begin_inset CommandInset ref
1289 LatexCommand ref
1290 reference "sec:Document-Classes"
1291
1292 \end_inset
1293
1294 ).
1295  
1296 \end_layout
1297
1298 \begin_layout Standard
1299 Finally, you may want to have sections or subsections that are not numbered.
1300  There are environments for this as well.
1301  If you change one of your section headings to the 
1302 \family sans
1303 Section*
1304 \family default
1305  environment (you may have to scroll down in the 
1306 \family sans
1307 Environment
1308 \family default
1309  box to find it), LyX will use the same font size for the heading as it
1310  uses for a regular section, but it will not number that section.
1311  There are corresponding 
1312 \begin_inset Quotes eld
1313 \end_inset
1314
1315 starred
1316 \begin_inset Quotes erd
1317 \end_inset
1318
1319  heading environments for 
1320 \family sans
1321 Subsection
1322 \family default
1323  and 
1324 \family sans
1325 Subsubsection
1326 \family default
1327 .
1328  Try changing some of your sections or subsections to the starred environments,
1329  and note how the other section numbers are updated.
1330 \end_layout
1331
1332 \begin_layout Standard
1333
1334 \series bold
1335 Exercise
1336 \series default
1337 : Fix the section and subsection headings in 
1338 \family typewriter
1339 example_raw.lyx
1340 \family default
1341 .
1342  
1343 \end_layout
1344
1345 \begin_layout Subsection
1346 Lists and sublists
1347 \end_layout
1348
1349 \begin_layout Standard
1350 LyX has several different environments for typesetting lists.
1351  The various list environments free you from hitting 
1352 \family sans
1353 Tab
1354 \family default
1355  a million times when writing an outline, or from renumbering a whole list
1356  when you want to add a point in the middle of the list.
1357  Different types of documents logically require different list environments:
1358 \end_layout
1359
1360 \begin_layout Itemize
1361 A slide presentation might use the 
1362 \family sans
1363 Itemize
1364 \family default
1365  environment's bulleted lists to describe different points.
1366 \end_layout
1367
1368 \begin_layout Itemize
1369 An outline would use the 
1370 \family sans
1371 Enumerate
1372 \family default
1373  environment's numbered lists (and lettered sublists).
1374 \end_layout
1375
1376 \begin_layout Itemize
1377 A document describing several software packages could use the 
1378 \family sans
1379 Description
1380 \family default
1381  environment, where each item in the list begins with a bold-faced word.
1382 \end_layout
1383
1384 \begin_layout Itemize
1385 The 
1386 \family sans
1387 List
1388 \family default
1389  environment is a variation on the 
1390 \family sans
1391 Description
1392 \family default
1393  environment.
1394 \end_layout
1395
1396 \begin_layout Standard
1397 Let us write a list of reasons why LyX is better than other word processors.
1398  Somewhere in your document, type:
1399 \end_layout
1400
1401 \begin_layout Standard
1402
1403 \family typewriter
1404 LyX is better than other word processors because:
1405 \end_layout
1406
1407 \begin_layout Standard
1408 and hit 
1409 \family sans
1410 Return
1411 \family default
1412 .
1413  Now select 
1414 \family sans
1415 Itemize
1416 \family default
1417  from the 
1418 \family sans
1419 Environment
1420 \family default
1421  box (
1422 \family sans
1423
1424 \begin_inset Info
1425 type  "icon"
1426 arg   "layout Itemize"
1427 \end_inset
1428
1429
1430 \family default
1431 ).
1432  LyX writes a 
1433 \begin_inset Quotes eld
1434 \end_inset
1435
1436 bullet
1437 \begin_inset Quotes erd
1438 \end_inset
1439
1440  on the line.
1441  Type in your reasons:
1442 \end_layout
1443
1444 \begin_layout LyX-Code
1445 Typesetting is done for you.
1446 \end_layout
1447
1448 \begin_layout LyX-Code
1449 Math is WYSIWYG
1450 \end_layout
1451
1452 \begin_layout LyX-Code
1453 Lists are very easy to create!
1454 \end_layout
1455
1456 \begin_layout Standard
1457 List environments, unlike headings, do not end when you type 
1458 \family sans
1459 Return
1460 \family default
1461 .
1462  Instead, LyX assumes you are going on to the next item in the list.
1463  The above will therefore result in a three-item list.
1464  If you want more than one paragraph within one list 
1465 \emph on
1466 item
1467 \emph default
1468 , one way is to use the 
1469 \family sans
1470 Protected
1471 \begin_inset space ~
1472 \end_inset
1473
1474 Break
1475 \family default
1476 , which you get by typing 
1477 \family sans
1478 Ctrl+Return
1479 \family default
1480 .
1481  In order to get out of the list, you need to reselect the 
1482 \family sans
1483 Standard
1484 \family default
1485  environment (or just use the key binding, 
1486 \family sans
1487 Alt+P
1488 \begin_inset space ~
1489 \end_inset
1490
1491 S
1492 \family default
1493 ).
1494 \end_layout
1495
1496 \begin_layout Standard
1497 You have got a beautiful itemized list.
1498  You might want to run LaTeX to see how the list looks when printed out.
1499  But what if you wanted to number the reasons? Well, just select the whole
1500  list
1501 \begin_inset Foot
1502 status collapsed
1503
1504 \begin_layout Plain Layout
1505 LyX will not let you select the first bullet unless you also select the
1506  paragraph 
1507 \emph on
1508 before
1509 \emph default
1510  the list, which you probably do not want to do.
1511  Similarly, you cannot select the actual number in a numbered section title.
1512  This is on purpose because the bullet or number depends on the document
1513  settings or text position, respectively.
1514 \end_layout
1515
1516 \end_inset
1517
1518  and choose 
1519 \family sans
1520 Enumerate
1521 \family default
1522  from the 
1523 \family sans
1524 Environment
1525 \family default
1526  box (
1527 \family sans
1528
1529 \begin_inset Info
1530 type  "icon"
1531 arg   "layout Enumerate"
1532 \end_inset
1533
1534
1535 \family default
1536 ).
1537  Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1538  numbering.
1539 \end_layout
1540
1541 \begin_layout Standard
1542 While the list is still selected, you can change to the other two list environme
1543 nts, 
1544 \family sans
1545 Description
1546 \family default
1547  and 
1548 \family sans
1549 List
1550 \family default
1551  (
1552 \family sans
1553
1554 \begin_inset Info
1555 type  "icon"
1556 arg   "layout Description"
1557 \end_inset
1558
1559
1560 \family default
1561  and 
1562 \family sans
1563
1564 \begin_inset Info
1565 type  "icon"
1566 arg   "layout List"
1567 \end_inset
1568
1569
1570 \family default
1571 ), in order to see what they look like.
1572  For those two environments, each list item is made up of a term, which
1573  is the item's first word, followed by a definition, which is the rest of
1574  the paragraph (until you hit 
1575 \family sans
1576 Return
1577 \family default
1578 ).
1579  The term is either typeset in boldface (
1580 \family sans
1581 Description
1582 \family default
1583 ) or separated by a 
1584 \begin_inset Quotes eld
1585 \end_inset
1586
1587 Tab
1588 \begin_inset Quotes erd
1589 \end_inset
1590
1591
1592 \begin_inset Foot
1593 status collapsed
1594
1595 \begin_layout Plain Layout
1596 But a typesetter's tab, which will change to fit the size of the largest
1597  term, not a pathetic, rigid, unchangeable typewriter 
1598 \family sans
1599 Tab
1600 \family default
1601 .
1602 \end_layout
1603
1604 \end_inset
1605
1606  (
1607 \family sans
1608 List
1609 \family default
1610 ) from the rest of the paragraph.
1611  If you want to have more than one word in the definition, then separate
1612  the words with 
1613 \family sans
1614 Protected
1615 \begin_inset space ~
1616 \end_inset
1617
1618 Space
1619 \family default
1620 s.
1621 \end_layout
1622
1623 \begin_layout Standard
1624
1625 \series bold
1626 Exercise
1627 \series default
1628 : Typeset the list in 
1629 \family typewriter
1630 example_raw.lyx
1631 \end_layout
1632
1633 \begin_layout Standard
1634 You can nest lists within each other in all sorts of interesting ways.
1635  An obvious example would be writing outlines.
1636  Numbered and bulleted lists will have different numbering and bulleting
1637  schemes for sublists.
1638  See the 
1639 \emph on
1640 User's Guide
1641 \emph default
1642  for details on the different sorts of lists and for examples of nestings.
1643 \end_layout
1644
1645 \begin_layout Subsection
1646 Other environments: Verses, Quotations, and more
1647 \end_layout
1648
1649 \begin_layout Standard
1650 There are two environments for setting quotations apart from surrounding
1651  text: 
1652 \family sans
1653 Quote
1654 \family default
1655  for short quotes and 
1656 \family sans
1657 Quotation
1658 \family default
1659  for longer ones.
1660  Computer code (the 
1661 \family sans
1662 LyX-Code
1663 \family default
1664  environment 
1665 \begin_inset Foot
1666 status collapsed
1667
1668 \begin_layout Plain Layout
1669 used in this Tutorial for the long typing examples
1670 \end_layout
1671
1672 \end_inset
1673
1674 ) is written in a 
1675 \family typewriter
1676 typewriter
1677 \family default
1678  font; this environment is the only place in LyX where you are allowed to
1679  use multiple spaces to allow code indenting.
1680  You can even write poetry using the 
1681 \family sans
1682 Verse
1683 \family default
1684  style, using 
1685 \family sans
1686 Return
1687 \family default
1688  to separate stanzas, and 
1689 \family sans
1690 Ctrl+Return
1691 \family default
1692  to separate lines within a stanza.
1693  See the 
1694 \emph on
1695 User's Guide
1696 \emph default
1697  for more complete descriptions of all of the available LyX environments.
1698 \end_layout
1699
1700 \begin_layout Standard
1701
1702 \series bold
1703 Exercise
1704 \series default
1705 : Correctly typeset the 
1706 \family sans
1707 Quote, LyX-Code,
1708 \family default
1709  and 
1710 \family sans
1711 Verse
1712 \family default
1713  in
1714 \begin_inset Newline newline
1715 \end_inset
1716
1717
1718 \family typewriter
1719 example_raw.lyx
1720 \end_layout
1721
1722 \begin_layout Chapter
1723 Writing Documents
1724 \end_layout
1725
1726 \begin_layout Standard
1727 The previous chapter hopefully allowed you to get used to writing in LyX.
1728  It introduced you to the basic editing operations in LyX, as well as the
1729  powerful method of writing with environments.
1730  Most people who use LyX, though, will want to write documents: papers,
1731  articles, books, manuals, or letters.
1732  This chapter is meant to take you from simply writing text with LyX to
1733  writing a complete document.
1734  It will introduce you to text classes, which allow you to write different
1735  sorts of documents.
1736  It will then describe many of the additions that turn text into a document,
1737  such as titles, footnotes, cross references, bibliographies, and tables
1738  of contents.
1739 \end_layout
1740
1741 \begin_layout Section
1742 Document Classes
1743 \begin_inset CommandInset label
1744 LatexCommand label
1745 name "sec:Document-Classes"
1746
1747 \end_inset
1748
1749
1750 \end_layout
1751
1752 \begin_layout Standard
1753 Different sorts of documents should be typeset differently.
1754  For example, books are generally printed double-sided, while articles are
1755  single-sided.
1756  In addition, many documents contain special environments: letters contain
1757  some environments â€” such as the sender's address and the signature â€” which
1758  do not make sense in a book or article.
1759  The LyX 
1760 \emph on
1761 document class
1762 \emph default
1763
1764 \begin_inset Foot
1765 status collapsed
1766
1767 \begin_layout Plain Layout
1768 for LaTeX users: this is equivalent to the LaTeX document class
1769 \end_layout
1770
1771 \end_inset
1772
1773  takes care of these large scale differences between different sorts of
1774  documents.
1775  This Tutorial, for example, was written in the 
1776 \family sans
1777 Book
1778 \family default
1779  document class.
1780  Document classes are another major part of the WYSIWYM philosophy; they
1781  tell LyX how to typeset the document, so you do not need to know how.
1782 \end_layout
1783
1784 \begin_layout Standard
1785 Your document is probably being written in the 
1786 \family sans
1787 Article
1788 \family default
1789  document class.
1790 \begin_inset Foot
1791 status collapsed
1792
1793 \begin_layout Plain Layout
1794 That is usually the default document class
1795 \end_layout
1796
1797 \end_inset
1798
1799  Try changing to other document classes (using the 
1800 \family sans
1801 Document\SpecialChar \menuseparator
1802 Settings
1803 \family default
1804  dialog) to see how they are typeset differently.
1805  If you change your document to the 
1806 \family sans
1807 Book
1808 \family default
1809  document class and look at the 
1810 \family sans
1811 Environment
1812 \family default
1813  box, you will see that most of the allowed environments are the same.
1814  However, you can now use the 
1815 \family sans
1816 Chapter
1817 \family default
1818  environment.
1819  If you are ever unsure about which environments you can use in a given
1820  document class, just consult the 
1821 \family sans
1822 Environment
1823 \family default
1824  box.
1825 \end_layout
1826
1827 \begin_layout Standard
1828 Font sizes, one- or two-column printing, and page headings are just some
1829  of the ways journals' typesettings differ from one another.
1830  As the Computer Age continues to mature, journals have begun accepting
1831  electronic submissions, creating LaTeX 
1832 \begin_inset Quotes eld
1833 \end_inset
1834
1835 style files
1836 \begin_inset Quotes erd
1837 \end_inset
1838
1839  so that authors can submit correctly typeset articles.
1840  LyX is set up to support this as well.
1841  For example, LyX supports typesetting (and extra environments) for the
1842  American Mathematics Society journals using the 
1843 \family sans
1844 Article
1845 \begin_inset space ~
1846 \end_inset
1847
1848 (AMS)
1849 \family default
1850  document class.
1851 \end_layout
1852
1853 \begin_layout Standard
1854 Here is a very quick reference to some of the document classes.
1855  See the 
1856 \emph on
1857 Special Document Classes
1858 \emph default
1859  section of the 
1860 \emph on
1861 Additional Features
1862 \emph default
1863  manual for many more details.
1864 \end_layout
1865
1866 \begin_layout Standard
1867 \align center
1868 \begin_inset Tabular
1869 <lyxtabular version="3" rows="7" columns="2">
1870 <features tabularvalignment="middle">
1871 <column alignment="center" valignment="top" width="0pt">
1872 <column alignment="center" valignment="top" width="0pt">
1873 <row>
1874 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1875 \begin_inset Text
1876
1877 \begin_layout Plain Layout
1878 Name
1879 \end_layout
1880
1881 \end_inset
1882 </cell>
1883 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1884 \begin_inset Text
1885
1886 \begin_layout Plain Layout
1887 Notes
1888 \end_layout
1889
1890 \end_inset
1891 </cell>
1892 </row>
1893 <row>
1894 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1895 \begin_inset Text
1896
1897 \begin_layout Plain Layout
1898 article
1899 \end_layout
1900
1901 \end_inset
1902 </cell>
1903 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1904 \begin_inset Text
1905
1906 \begin_layout Plain Layout
1907 one-sided, no chapters
1908 \end_layout
1909
1910 \end_inset
1911 </cell>
1912 </row>
1913 <row>
1914 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1915 \begin_inset Text
1916
1917 \begin_layout Plain Layout
1918 article (AMS)
1919 \end_layout
1920
1921 \end_inset
1922 </cell>
1923 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1924 \begin_inset Text
1925
1926 \begin_layout Plain Layout
1927 layout & environments for American Math Society
1928 \end_layout
1929
1930 \end_inset
1931 </cell>
1932 </row>
1933 <row>
1934 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1935 \begin_inset Text
1936
1937 \begin_layout Plain Layout
1938 report
1939 \end_layout
1940
1941 \end_inset
1942 </cell>
1943 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1944 \begin_inset Text
1945
1946 \begin_layout Plain Layout
1947 longer than article, two-sided
1948 \end_layout
1949
1950 \end_inset
1951 </cell>
1952 </row>
1953 <row>
1954 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1955 \begin_inset Text
1956
1957 \begin_layout Plain Layout
1958 book
1959 \end_layout
1960
1961 \end_inset
1962 </cell>
1963 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1964 \begin_inset Text
1965
1966 \begin_layout Plain Layout
1967 report + front and back matter
1968 \end_layout
1969
1970 \end_inset
1971 </cell>
1972 </row>
1973 <row>
1974 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1975 \begin_inset Text
1976
1977 \begin_layout Plain Layout
1978 presentation
1979 \end_layout
1980
1981 \end_inset
1982 </cell>
1983 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
1984 \begin_inset Text
1985
1986 \begin_layout Plain Layout
1987 transparencies
1988 \end_layout
1989
1990 \end_inset
1991 </cell>
1992 </row>
1993 <row>
1994 <cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
1995 \begin_inset Text
1996
1997 \begin_layout Plain Layout
1998 letter
1999 \end_layout
2000
2001 \end_inset
2002 </cell>
2003 <cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
2004 \begin_inset Text
2005
2006 \begin_layout Plain Layout
2007 lots of extra environments for address, signature\SpecialChar \ldots{}
2008
2009 \end_layout
2010
2011 \end_inset
2012 </cell>
2013 </row>
2014 </lyxtabular>
2015
2016 \end_inset
2017
2018
2019 \end_layout
2020
2021 \begin_layout Section
2022 Templates: Writing a Letter
2023 \end_layout
2024
2025 \begin_layout Standard
2026 One way to write a letter would be to open a new file, and choose a 
2027 \family sans
2028 Letter
2029 \family default
2030  class in the 
2031 \family sans
2032 Document\SpecialChar \menuseparator
2033 Settings
2034 \family default
2035  dialog.
2036  While this is the most obvious way to write a letter, it seems like extra
2037  work.
2038  Every time you write a business letter, you want to have your address,
2039  the address to which you are sending it, a body, a signature, etc.
2040  LyX therefore has a 
2041 \emph on
2042 template
2043 \emph default
2044  for letters, which contains a sample letter; once you have a template,
2045  you can just replace a couple of parts of the letter with your text each
2046  time you write a letter.
2047 \end_layout
2048
2049 \begin_layout Standard
2050 Open a new file with 
2051 \family sans
2052 File\SpecialChar \menuseparator
2053 New
2054 \begin_inset space ~
2055 \end_inset
2056
2057 from
2058 \begin_inset space ~
2059 \end_inset
2060
2061 Template
2062 \family default
2063 .
2064  Select 
2065 \family typewriter
2066 letter.lyx
2067 \family default
2068  as the template.
2069  Save and print the file to see how the various environments are typeset.
2070 \end_layout
2071
2072 \begin_layout Standard
2073 When you look at the 
2074 \family sans
2075 Environment
2076 \family default
2077  box, you will see several environments, like the 
2078 \family sans
2079 My
2080 \begin_inset space ~
2081 \end_inset
2082
2083 Address
2084 \family default
2085  environment, that do not exist in most other document classes.
2086  Others, like 
2087 \family sans
2088 Description
2089 \family default
2090 , are familiar.
2091  You can play around for a while to figure out how the various environments
2092  work.
2093  You will notice for example that the 
2094 \family sans
2095 Signature
2096 \family default
2097  environment has the word 
2098 \begin_inset Quotes eld
2099 \end_inset
2100
2101 Signature:
2102 \begin_inset Quotes erd
2103 \end_inset
2104
2105  in red before the actual text of the signature.
2106  This word does not show up in the actual letter, as you will see if you
2107  view/export the file.
2108  It is just there to let you know where the signature goes.
2109  Also, note that it does not matter where in the file the 
2110 \family sans
2111 Signature
2112 \family default
2113  line is placed.
2114  Remember, LyX is WYSIWYM; you can put the 
2115 \family sans
2116 Signature
2117 \family default
2118  environment anywhere you want, but LyX knows that in the printout, the
2119  signature should be at the end.
2120 \end_layout
2121
2122 \begin_layout Standard
2123 A template is just a regular LyX file.
2124  This means you can fill in your address and signature and save the file
2125  as a new template.
2126  From now on, any time you want to write a letter, you can use the new template
2127  to save time.
2128  We do not have to suggest an actual 
2129 \begin_inset Quotes eld
2130 \end_inset
2131
2132 exercise
2133 \begin_inset Quotes erd
2134 \end_inset
2135
2136  here; just write a letter to someone!
2137 \begin_inset Foot
2138 status collapsed
2139
2140 \begin_layout Plain Layout
2141 One warning, if you are writing from a template.
2142  If you erase all of the text in an environment â€” for example, if you erase
2143  the whole 
2144 \family sans
2145 My
2146 \begin_inset space ~
2147 \end_inset
2148
2149 Address
2150 \family default
2151  field so that you can replace it with your own â€” and then you move the
2152  cursor without writing any text, the environment may disappear.
2153  This is because most environments cannot exist without any text in them.
2154  Just reselect the environment from the 
2155 \family sans
2156 Environment
2157 \family default
2158  box to get it back.
2159 \end_layout
2160
2161 \end_inset
2162
2163
2164 \end_layout
2165
2166 \begin_layout Standard
2167 Templates can be a huge time-saver, and we urge you to use them whenever
2168  possible.
2169  In addition, they can help a person learn how to use some of the fancier
2170  document classes.
2171  Finally, they may be useful for a person who is configuring LyX for a bunch
2172  of less computer-aware users.
2173  When they are first learning LyX, it will be less intimidating if they
2174  have a letter template customized for their company, for example.
2175 \end_layout
2176
2177 \begin_layout Section
2178 Document Titles
2179 \end_layout
2180
2181 \begin_layout Standard
2182 LyX (like LaTeX) considers the title â€” which may contain the actual title,
2183  the author, the date, and even an abstract of a paper â€” to be a separate
2184  part of the document.
2185 \end_layout
2186
2187 \begin_layout Standard
2188 Go back to your LyX document and make sure it is using the 
2189 \family sans
2190 Article
2191 \family default
2192  document class.
2193 \begin_inset Foot
2194 status collapsed
2195
2196 \begin_layout Plain Layout
2197 You should not be using the letter any more, since the 
2198 \family sans
2199 Letter
2200 \family default
2201  document class does not allow titles.
2202 \end_layout
2203
2204 \end_inset
2205
2206  Type a title on the first line, and change the line to the 
2207 \family sans
2208 Title
2209 \family default
2210  environment.
2211  On the next line, type your name and change it to the 
2212 \family sans
2213 Author
2214 \family default
2215  environment.
2216  On the next line, write the date in the 
2217 \family sans
2218 Date
2219 \family default
2220  environment.
2221  Type a paragraph or two summarizing your document using the 
2222 \family sans
2223 Abstract
2224 \family default
2225  environment.
2226  Notice how the title is presented when it is printed out.
2227  If you change the document format to Book, you will get a separate title
2228  page, like the first page of this tutorial.
2229 \end_layout
2230
2231 \begin_layout Standard
2232
2233 \series bold
2234 Exercise
2235 \series default
2236 : Fix the title, date, and author in 
2237 \family typewriter
2238 example_raw.lyx
2239 \end_layout
2240
2241 \begin_layout Section
2242 Labels and Cross-References
2243 \end_layout
2244
2245 \begin_layout Standard
2246 You can label section headings, list items, formulas, footnotes, and floats
2247 \begin_inset Foot
2248 status collapsed
2249
2250 \begin_layout Plain Layout
2251 Floats are explained in the 
2252 \emph on
2253 User's Guide
2254 \emph default
2255  and the 
2256 \emph on
2257 Embedded Objects
2258 \emph default
2259  manual.
2260 \end_layout
2261
2262 \end_inset
2263
2264  in your document.
2265  Once you do so, you can refer to this section in other parts of the document,
2266  using cross-references.
2267  You can refer either to the section's number, or to the page that the section
2268  appears on.
2269  As with section numbering, LyX also takes care of cross-reference numbering
2270  for you.
2271  Automatic management of labels and cross-references is among the most significa
2272 nt advantages of LyX (and LaTeX) over conventional word processors.
2273 \end_layout
2274
2275 \begin_layout Subsection
2276 Your first label
2277 \end_layout
2278
2279 \begin_layout Standard
2280 Go to our second section, whose title is 
2281 \begin_inset Quotes eld
2282 \end_inset
2283
2284 About This Document
2285 \begin_inset Quotes erd
2286 \end_inset
2287
2288 .
2289  Click at the end of the section title line, and select 
2290 \family sans
2291 Insert\SpecialChar \menuseparator
2292 Label
2293 \family default
2294  or the toolbar button 
2295 \family sans
2296
2297 \begin_inset Info
2298 type  "icon"
2299 arg   "label-insert"
2300 \end_inset
2301
2302
2303 \family default
2304 .
2305  A dialog asks you for a label name, and gives you a suggestion.
2306  When you click on 
2307 \family sans
2308 OK
2309 \family default
2310 , the label name will be placed in a box next to the section title.
2311 \end_layout
2312
2313 \begin_layout Standard
2314 So far you have not done anything â€” the DVI output will look exactly the
2315  same, since labels do not show up in the printed document.
2316  However, now that you have added a label, you can refer to that label with
2317  cross-references.
2318  We will do that next.
2319 \end_layout
2320
2321 \begin_layout Subsection
2322 Your first cross-reference
2323 \end_layout
2324
2325 \begin_layout Standard
2326 Place the cursor somewhere in Section
2327 \begin_inset space ~
2328 \end_inset
2329
2330 2 of your document.
2331  Type 
2332 \end_layout
2333
2334 \begin_layout LyX-Code
2335 If you want to know more about this document, then see 
2336 \begin_inset Newline newline
2337 \end_inset
2338
2339 Section, which can be found on page.
2340 \end_layout
2341
2342 \begin_layout Standard
2343 Now â€” with the cursor after the word 
2344 \begin_inset Quotes eld
2345 \end_inset
2346
2347 Section
2348 \begin_inset Quotes erd
2349 \end_inset
2350
2351  â€” choose 
2352 \family sans
2353 Insert\SpecialChar \menuseparator
2354 Cross
2355 \begin_inset space ~
2356 \end_inset
2357
2358 Reference
2359 \family default
2360  or the toolbar button 
2361 \family sans
2362
2363 \begin_inset Info
2364 type  "icon"
2365 arg   "dialog-show-new-inset ref"
2366 \end_inset
2367
2368
2369 \family default
2370 .
2371  The Cross-reference dialog pops up.
2372  It shows a list of the possible labels you can reference.
2373  At the moment, there should be only one, 
2374 \begin_inset Quotes eld
2375 \end_inset
2376
2377 sec:About-This-Document
2378 \begin_inset Quotes erd
2379 \end_inset
2380
2381 .
2382  First, select the drop-down menu labeled 
2383 \begin_inset Quotes eld
2384 \end_inset
2385
2386 Format
2387 \begin_inset Quotes erd
2388 \end_inset
2389
2390  and select 
2391 \begin_inset Quotes eld
2392 \end_inset
2393
2394 <reference> on page <page>
2395 \begin_inset Quotes erd
2396 \end_inset
2397
2398 .
2399  Then select 
2400 \begin_inset Quotes eld
2401 \end_inset
2402
2403 sec:About-This-Document
2404 \begin_inset Quotes erd
2405 \end_inset
2406
2407  (it may be selected by default), and a reference marker will appear containing
2408  
2409 \begin_inset Quotes eld
2410 \end_inset
2411
2412 Ref+Text: sec:About-This-Document
2413 \begin_inset Quotes erd
2414 \end_inset
2415
2416  (To be really correct, you should put a 
2417 \family sans
2418 Protected
2419 \begin_inset space ~
2420 \end_inset
2421
2422 Space
2423 \family default
2424  in between the word 
2425 \begin_inset Quotes eld
2426 \end_inset
2427
2428 Section
2429 \begin_inset Quotes erd
2430 \end_inset
2431
2432  and the reference).
2433  An alternative way to reference a label is to right-click the label and
2434  select 
2435 \family sans
2436 Copy as Reference
2437 \family default
2438  in the appearing context menu.
2439  The cross-reference to this label is now in the clipboard and can be copied
2440  to the actual cursor position via the menu 
2441 \family sans
2442 Edit\SpecialChar \menuseparator
2443 Paste
2444 \family default
2445  (shortcut 
2446 \family sans
2447 Ctrl+V
2448 \family default
2449 ).
2450  In the printed document, this reference marker will be replaced with the
2451  section number and then the page number.
2452  View your document as DVI, and you will see that LaTeX has been even cleverer
2453  than that.
2454  It refers to 
2455 \begin_inset Quotes eld
2456 \end_inset
2457
2458 Section 2
2459 \begin_inset Quotes erd
2460 \end_inset
2461
2462  and depending how much text you have between the start of Section
2463 \begin_inset space ~
2464 \end_inset
2465
2466 2 and this cross-reference you may see 
2467 \begin_inset Quotes eld
2468 \end_inset
2469
2470 on this page
2471 \begin_inset Quotes erd
2472 \end_inset
2473
2474
2475 \begin_inset Quotes eld
2476 \end_inset
2477
2478 on the previous page
2479 \begin_inset Quotes erd
2480 \end_inset
2481
2482  or 
2483 \begin_inset Quotes eld
2484 \end_inset
2485
2486 on page n
2487 \begin_inset Quotes erd
2488 \end_inset
2489
2490  (whereas 
2491 \emph on
2492 n
2493 \emph default
2494  is the page number).
2495 \end_layout
2496
2497 \begin_layout Standard
2498 Conveniently, a cross-reference acts as a hyperlink when you are editing
2499  a document in LyX; clicking on it will pop up the 
2500 \family sans
2501 Cross-reference
2502 \family default
2503  dialog, clicking 
2504 \family sans
2505 Go
2506 \begin_inset space ~
2507 \end_inset
2508
2509 to
2510 \begin_inset space ~
2511 \end_inset
2512
2513 Label
2514 \family default
2515  will move the cursor to the referenced label.
2516 \end_layout
2517
2518 \begin_layout Subsection
2519 More fun with labels
2520 \end_layout
2521
2522 \begin_layout Standard
2523 We told you that LyX takes careof numbering cross-references; now you can
2524  test this claim.
2525  Add a new section before Section
2526 \begin_inset space ~
2527 \end_inset
2528
2529 2.
2530  Update the DVI view, and â€” voilà! â€” the section cross-reference changed
2531  to 
2532 \begin_inset Quotes eld
2533 \end_inset
2534
2535 3
2536 \begin_inset Quotes erd
2537 \end_inset
2538
2539 ! Change the section 
2540 \begin_inset Quotes eld
2541 \end_inset
2542
2543 About this Document
2544 \begin_inset Quotes erd
2545 \end_inset
2546
2547  to a subsection, and the cross-reference will reference Subsection
2548 \begin_inset space ~
2549 \end_inset
2550
2551 2.1 instead of Section
2552 \begin_inset space ~
2553 \end_inset
2554
2555 3.
2556  The page reference will not change unless you add a whole page of text
2557  before the label, of course.
2558  
2559 \end_layout
2560
2561 \begin_layout Standard
2562 If you want some more practice with labels, then try putting a new label
2563  where your first cross-reference was, and refer to that label from elsewhere
2564  in the document.
2565  If you will be inserting cross-references often, it may be convenient to
2566  leave the 
2567 \family sans
2568 Cross-reference
2569 \family default
2570  dialog open.
2571 \end_layout
2572
2573 \begin_layout Standard
2574 If you want to confirm that the cross-referencing gets the pages right even
2575  for larger documents, 
2576 \family sans
2577 Copy
2578 \family default
2579  a couple pages of text from the 
2580 \emph on
2581 User's Guide
2582 \emph default
2583  to the clipboard, and 
2584 \family sans
2585 Paste
2586 \family default
2587  it into your document.
2588 \begin_inset Foot
2589 status collapsed
2590
2591 \begin_layout Plain Layout
2592 By the way, copying a chapter title may cause an error, because chapters
2593  are not allowed in the article class, see Section
2594 \begin_inset space ~
2595 \end_inset
2596
2597
2598 \begin_inset CommandInset ref
2599 LatexCommand ref
2600 reference "sec:Document-Classes"
2601
2602 \end_inset
2603
2604 .
2605  If this happens, just delete the chapter title.
2606 \end_layout
2607
2608 \end_inset
2609
2610
2611 \end_layout
2612
2613 \begin_layout Standard
2614
2615 \series bold
2616 Exercise
2617 \series default
2618 : Fix the references in 
2619 \family typewriter
2620 example_raw.lyx
2621 \end_layout
2622
2623 \begin_layout Section
2624 Footnotes and Margin Notes
2625 \end_layout
2626
2627 \begin_layout Standard
2628 Footnotes can be added using the toolbar button 
2629 \family sans
2630
2631 \begin_inset Info
2632 type  "icon"
2633 arg   "footnote-insert"
2634 \end_inset
2635
2636
2637 \family default
2638  or the menu 
2639 \family sans
2640 Insert\SpecialChar \menuseparator
2641 Footnote
2642 \family default
2643 .
2644  Click at the end of the word 
2645 \begin_inset Quotes eld
2646 \end_inset
2647
2648 LyX
2649 \begin_inset Quotes erd
2650 \end_inset
2651
2652  somewhere in your document and insert a footnote.
2653  A footnote box appears where you can enter the text of the footnote.
2654  LyX should place the cursor at the beginning of the footnote box.
2655  Type
2656 \end_layout
2657
2658 \begin_layout LyX-Code
2659 LyX is a typesetting word processor.
2660 \end_layout
2661
2662 \begin_layout Standard
2663 Now click on the button labeled 
2664 \begin_inset Quotes eld
2665 \end_inset
2666
2667 foot
2668 \begin_inset Quotes erd
2669 \end_inset
2670
2671 .
2672  The footnote box is closed, leaving the button showing where the footnote
2673  marker will be in the printed text; this is called 
2674 \begin_inset Quotes eld
2675 \end_inset
2676
2677 folding
2678 \begin_inset Quotes erd
2679 \end_inset
2680
2681  the footnote.
2682  You can unfold the footnote at any time and re-edit its text by clicking
2683  again on the 
2684 \begin_inset Quotes eld
2685 \end_inset
2686
2687 foot
2688 \begin_inset Quotes erd
2689 \end_inset
2690
2691  button.
2692 \end_layout
2693
2694 \begin_layout Standard
2695 A footnote can be cut and pasted like normal text.
2696  Go ahead; try it! All you need to do is select the footnote button
2697 \begin_inset Foot
2698 status collapsed
2699
2700 \begin_layout Plain Layout
2701 It may be easier to select it using the keyboard.
2702  You might accidentally open the footnote if you are trying to select the
2703  marker itself with the mouse.
2704 \end_layout
2705
2706 \end_inset
2707
2708  and 
2709 \family sans
2710 Cut
2711 \family default
2712  and 
2713 \family sans
2714 Paste
2715 \family default
2716  it.
2717  In addition, you can change regular text to a footnote, by selecting it
2718  and hitting the 
2719 \family sans
2720
2721 \begin_inset Info
2722 type  "icon"
2723 arg   "footnote-insert"
2724 \end_inset
2725
2726
2727 \family default
2728  button; change a footnote to regular text by hitting the 
2729 \family sans
2730 Backspace
2731 \family default
2732  key when the cursor is in the first position of a footnote, or by hitting
2733  the 
2734 \family sans
2735 Delete
2736 \family default
2737  key when the cursor is in the very last position of the footnote.
2738 \end_layout
2739
2740 \begin_layout Standard
2741 Margin notes can be added using the menu 
2742 \family sans
2743 Insert\SpecialChar \menuseparator
2744 Marginal
2745 \begin_inset space ~
2746 \end_inset
2747
2748 Note
2749 \family default
2750  or the toolbar button 
2751 \family sans
2752
2753 \begin_inset Info
2754 type  "icon"
2755 arg   "marginalnote-insert"
2756 \end_inset
2757
2758
2759 \family default
2760 \SpecialChar \@.
2761  Margin notes are like footnotes, except that: 
2762 \end_layout
2763
2764 \begin_layout Itemize
2765 the on-screen boxes say 
2766 \begin_inset Quotes eld
2767 \end_inset
2768
2769 margin
2770 \begin_inset Quotes erd
2771 \end_inset
2772
2773  instead of 
2774 \begin_inset Quotes eld
2775 \end_inset
2776
2777 foot
2778 \begin_inset Quotes erd
2779 \end_inset
2780
2781
2782 \end_layout
2783
2784 \begin_layout Itemize
2785 the notes will be placed in the margin, instead of below the text 
2786 \end_layout
2787
2788 \begin_layout Itemize
2789 margin notes are not numbered
2790 \end_layout
2791
2792 \begin_layout Standard
2793 Change your LyX footnote back to text, then select and change it to a margin
2794  note.
2795  Run LaTeX again to see what the margin note looks like.
2796 \end_layout
2797
2798 \begin_layout Standard
2799
2800 \series bold
2801 Exercise
2802 \series default
2803 : Fix the footnote in 
2804 \family typewriter
2805 example_raw.lyx
2806 \end_layout
2807
2808 \begin_layout Section
2809 Bibliographies
2810 \begin_inset CommandInset label
2811 LatexCommand label
2812 name "sec:bibliographies"
2813
2814 \end_inset
2815
2816
2817 \end_layout
2818
2819 \begin_layout Standard
2820 Bibliographies (at least in the exact sciences) are similar to cross-references.
2821  The bibliography contains a list of references at the end of the document,
2822  and they can be referenced from within the document.
2823  Like section titles, LyX and LaTeX make your job easier by automatically
2824  numbering the bibliography items and changing citations when the item numbers
2825  change.
2826 \end_layout
2827
2828 \begin_layout Standard
2829 Go to the end of the document and switch to the 
2830 \family sans
2831 Bibliography
2832 \family default
2833  environment.
2834  Now, each paragraph you type will be a reference.
2835  Type 
2836 \begin_inset Quotes eld
2837 \end_inset
2838
2839
2840 \family typewriter
2841 The Lyx Tutorial, by the LyX Documentation Team
2842 \family default
2843
2844 \begin_inset Quotes erd
2845 \end_inset
2846
2847  as your first reference.
2848  Note that LyX automatically puts a number in a box before each reference.
2849  Click on the boxed reference number, and the 
2850 \family sans
2851 Bibliography
2852 \begin_inset space ~
2853 \end_inset
2854
2855 item
2856 \family default
2857  dialog box appears.
2858  The 
2859 \family sans
2860 Key
2861 \family default
2862  is to refer to this reference within the LyX document, the 
2863 \family sans
2864 Label
2865 \family default
2866  appears in output.
2867  When no 
2868 \family sans
2869 Label
2870 \family default
2871  is set (default), you will see the number of the bibliography in the output.
2872  Now change the 
2873 \family sans
2874 Key
2875 \family default
2876  field to 
2877 \begin_inset Quotes eld
2878 \end_inset
2879
2880 lyxtutorial
2881 \begin_inset Quotes erd
2882 \end_inset
2883
2884  to make it easy to remember.
2885 \end_layout
2886
2887 \begin_layout Standard
2888 Now pick somewhere in your document that you would like to insert a reference.
2889  Do so with 
2890 \family sans
2891 Insert\SpecialChar \menuseparator
2892 Citation
2893 \family default
2894  or the toolbar button 
2895 \family sans
2896
2897 \begin_inset Info
2898 type  "icon"
2899 arg   "dialog-show-new-inset citation"
2900 \end_inset
2901
2902
2903 \family default
2904 .
2905  A 
2906 \family sans
2907 Citation
2908 \family default
2909  dialog appears.
2910  The right panel in this dialog lists all the bibliography entries, and
2911  this field allows you to choose which bibliography item you want to cite.
2912  Select 
2913 \begin_inset Quotes eld
2914 \end_inset
2915
2916 lyxtutorial
2917 \begin_inset Quotes erd
2918 \end_inset
2919
2920  (right now, that is the only item in the bibliography), then use the 
2921 \family sans
2922 Add
2923 \family default
2924  button in the center to insert it.
2925  (You can have multiple citations in the same place by transferring a number
2926  of keys this way.) Now view your file as DVI, and you will see that the
2927  citation appears in brackets in the text, referring to the bibliography
2928  at the end of the document.
2929 \end_layout
2930
2931 \begin_layout Standard
2932 The 
2933 \family sans
2934 Text
2935 \begin_inset space ~
2936 \end_inset
2937
2938 after
2939 \family default
2940  field in the 
2941 \family sans
2942 Citation
2943 \family default
2944  dialog will put a remark (such as a reference to a page or chapter within
2945  the referenced book or article) in the brackets after the reference.
2946  If you want the references to have labels instead of numbers in the printed
2947  output (for example, some journals would use 
2948 \begin_inset Quotes eld
2949 \end_inset
2950
2951 [Smi95]
2952 \begin_inset Quotes erd
2953 \end_inset
2954
2955  to refer to a paper written by Smith in 1995), use the 
2956 \family sans
2957 Label
2958 \family default
2959  field in the 
2960 \family sans
2961 Bibliography
2962 \begin_inset space ~
2963 \end_inset
2964
2965 item
2966 \family default
2967  dialog.
2968  As usual, see the 
2969 \emph on
2970 User's Guide
2971 \emph default
2972  for details.
2973 \end_layout
2974
2975 \begin_layout Standard
2976
2977 \series bold
2978 Exercise:
2979 \series default
2980  Fix the bibliography and citation in 
2981 \family typewriter
2982 example_raw.lyx
2983 \end_layout
2984
2985 \begin_layout Section
2986 Table of Contents
2987 \end_layout
2988
2989 \begin_layout Standard
2990 You may want to put a table of contents at the beginning of your document.
2991  LyX makes this easy to do.
2992  Just hit 
2993 \family sans
2994 Return
2995 \family default
2996  after your document title and before your first section title and choose
2997  
2998 \family sans
2999 Insert\SpecialChar \menuseparator
3000 List
3001 \begin_inset space ~
3002 \end_inset
3003
3004 /
3005 \begin_inset space ~
3006 \end_inset
3007
3008 TOC\SpecialChar \menuseparator
3009 Table
3010 \begin_inset space ~
3011 \end_inset
3012
3013 of
3014 \begin_inset space ~
3015 \end_inset
3016
3017 Contents
3018 \family default
3019 .
3020  The words 
3021 \begin_inset Quotes eld
3022 \end_inset
3023
3024 Table of Contents
3025 \begin_inset Quotes erd
3026 \end_inset
3027
3028  will appear in a button on the first line of the document.
3029  
3030 \end_layout
3031
3032 \begin_layout Standard
3033 This may not appear to be very useful.
3034  However, if you look at your DVI file, you will see that a table of contents
3035  has been generated, listing the various sections and subsections in your
3036  document.
3037  As usual, if you reorder sections or create new ones, you will see those
3038  changes in the DVI file when you update it.
3039  
3040 \end_layout
3041
3042 \begin_layout Standard
3043 The table of contents is not printed in the on-screen version of the document.
3044  But you can display the table of contents in a separate window by clicking
3045  on the table of contents button, or by using 
3046 \family sans
3047 Document\SpecialChar \menuseparator
3048 Outline
3049 \family default
3050  or the toolbar button 
3051 \family sans
3052
3053 \begin_inset Info
3054 type  "icon"
3055 arg   "dialog-toggle toc"
3056 \end_inset
3057
3058
3059 \family default
3060 .
3061  This menu will work even if you do not have a table of contents inset in
3062  your document.
3063  This is a very useful tool for rearranging your document parts.
3064  Clicking on a (sub)section title in the 
3065 \family sans
3066 Outline
3067 \family default
3068  window will highlight that line and move the display (in the LyX editing
3069  window) to that place in the document.
3070  You can also use the arrow keys to move up and down in the table of contents.
3071  You may therefore find it convenient to leave this window open throughout
3072  editing sessions.
3073  You can get similar functionality from the 
3074 \family sans
3075 Navigate
3076 \family default
3077  menu, though, where the table of contents appears automatically.
3078 \end_layout
3079
3080 \begin_layout Standard
3081 To get rid of the Table of Contents, you can delete the table of contents
3082  button just like any other text.
3083 \end_layout
3084
3085 \begin_layout Standard
3086
3087 \series bold
3088 Exercise
3089 \series default
3090 : Fix the table of contents in 
3091 \family typewriter
3092 example_raw.lyx
3093 \end_layout
3094
3095 \begin_layout Chapter
3096 Using Math
3097 \end_layout
3098
3099 \begin_layout Standard
3100 LaTeX is used by many scientists because it outputs great looking equations,
3101  avoiding the control characters used by word processors and their equation
3102  editors.
3103  Many of these scientists are frustrated, however, because writing equations
3104  in LaTeX is more like programming than writing.
3105  Happily, LyX has WYSIWYM support for equations.
3106  If you are used to LaTeX, you will find that all of the usual LaTeX math
3107  commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3108  If, on the other hand, you have  never written in LaTeX, then the 
3109 \family sans
3110 Math
3111 \begin_inset space ~
3112 \end_inset
3113
3114 Panel
3115 \family default
3116  will allow you to write professional-looking math quickly and easily.
3117 \end_layout
3118
3119 \begin_layout Section
3120 Math Mode
3121 \end_layout
3122
3123 \begin_layout Standard
3124 Somewhere in your LyX document, type: 
3125 \end_layout
3126
3127 \begin_layout LyX-Code
3128 I like what Einstein said, E=mc^2, because it is so simple.
3129  
3130 \end_layout
3131
3132 \begin_layout Standard
3133 Now, that equation does not look very good in LyX and in the output; there
3134  is no space between the letters and the equals sign, and you would like
3135  to write an actual superscript for the 
3136 \begin_inset Quotes eld
3137 \end_inset
3138
3139 2
3140 \begin_inset Quotes erd
3141 \end_inset
3142
3143 .
3144  That bad typesetting happened because we did not tell LyX that we were
3145  writing a mathematical expression, so it typeset the equation like regular
3146  old text.
3147 \end_layout
3148
3149 \begin_layout Standard
3150 Instead, we create a formula that will get typeset properly.
3151  In order to create a formula, just click the toolbar button 
3152 \family sans
3153
3154 \begin_inset Info
3155 type  "icon"
3156 arg   "math-mode"
3157 \end_inset
3158
3159
3160 \family default
3161  or use the menu 
3162 \family sans
3163 Insert\SpecialChar \menuseparator
3164 Math\SpecialChar \menuseparator
3165 Inline
3166 \begin_inset space ~
3167 \end_inset
3168
3169 Formula
3170 \family default
3171 .
3172  LyX will insert a little blue square, which is an empty math formula.
3173  Now type 
3174 \family typewriter
3175 E=mc^2
3176 \family default
3177  again.
3178  The expression is typed in blue, and the blue square disappears as soon
3179  as the formula is not empty.
3180  Now type 
3181 \family sans
3182 Esc
3183 \family default
3184  to leave the equation The purple markers disappear, leaving the cursor
3185  to the right of the expression, and now if you type something, it will
3186  be regular text.
3187 \end_layout
3188
3189 \begin_layout Standard
3190 Looking at the output you will notice that the expression was typeset nicely,
3191  with spaces between the letters and the equals sign, and a superscript
3192  
3193 \begin_inset Quotes eld
3194 \end_inset
3195
3196 2
3197 \begin_inset Quotes erd
3198 \end_inset
3199
3200 .
3201  Letters in math mode are assumed to be variables, and come out in italics.
3202  Numbers are just numbers.
3203 \end_layout
3204
3205 \begin_layout Standard
3206 This math editor is another example of the WYSIWYM philosophy.
3207  In LaTeX, you write a mathematical expression using text and commands like
3208  
3209 \family typewriter
3210
3211 \backslash
3212 sqrt
3213 \family default
3214 ; this can be frustrating, because you cannot see what an expression looks
3215  like until you run the file under LaTeX and you may have to spend time
3216  finding e.
3217 \begin_inset space \thinspace{}
3218 \end_inset
3219
3220 g.
3221 \begin_inset space \space{}
3222 \end_inset
3223
3224 missing brackets.
3225  LyX does not attempt to get the expression to look perfect (WYSIWYG), but
3226  it gives you an extremely good idea of what the expression will look like.
3227  LaTeX then takes care of the professional typesetting.
3228 \end_layout
3229
3230 \begin_layout Section
3231 Navigating an Equation
3232 \end_layout
3233
3234 \begin_layout Standard
3235 Now let us change 
3236 \begin_inset Formula $E=mc^{2}$
3237 \end_inset
3238
3239  to 
3240 \begin_inset Formula $E=1+mc^{2}$
3241 \end_inset
3242
3243 .
3244  Use the arrow keys to move the cursor into the expression.
3245  Note that when you enter the expression, the purple markers appear to let
3246  you know you are editing math.
3247  Now you can use 
3248 \family sans
3249 Left
3250 \family default
3251  and 
3252 \family sans
3253 Right
3254 \family default
3255  to move the cursor past the equals sign, and just type 
3256 \begin_inset Quotes eld
3257 \end_inset
3258
3259 1+
3260 \begin_inset Quotes erd
3261 \end_inset
3262
3263 .
3264  Again, you can use the arrow keys or 
3265 \family sans
3266 Esc
3267 \family default
3268  to leave the formula\SpecialChar \@.
3269
3270 \end_layout
3271
3272 \begin_layout Standard
3273 Other than the special keys described below, typing in math mode is like
3274  editing regular text.
3275  Use 
3276 \family sans
3277 Delete
3278 \family default
3279  (or 
3280 \family sans
3281 Backspace
3282 \family default
3283 ) to delete things.
3284  Select text either with the arrow keys or with the mouse.
3285  
3286 \family sans
3287 Edit\SpecialChar \menuseparator
3288 Undo
3289 \family default
3290  works in math mode as well as cut and paste.
3291  One thing to be careful of: if you are left or right outside a formula
3292  and you press 
3293 \family sans
3294 Delete
3295 \family default
3296  or 
3297 \family sans
3298 Backspace
3299 \family default
3300  respectively, you delete the whole formula.
3301  Luckily, you can just use 
3302 \family sans
3303 Undo
3304 \family default
3305  to get it back.
3306 \end_layout
3307
3308 \begin_layout Standard
3309 What if you want to change 
3310 \begin_inset Formula $E=mc^{2}$
3311 \end_inset
3312
3313  to 
3314 \begin_inset Formula $E=mc^{2.5}+1$
3315 \end_inset
3316
3317 ? Again, you can use the mouse to click in the right place.
3318  However, you can also use the arrow keys.
3319  If the cursor is just after the 
3320 \begin_inset Quotes eld
3321 \end_inset
3322
3323 c
3324 \begin_inset Quotes erd
3325 \end_inset
3326
3327  but before the 
3328 \begin_inset Quotes eld
3329 \end_inset
3330
3331 2
3332 \begin_inset Quotes erd
3333 \end_inset
3334
3335 , then press 
3336 \family sans
3337 Up
3338 \family default
3339  and the cursor is moved to the level of the superscript, just before the
3340  
3341 \begin_inset Quotes eld
3342 \end_inset
3343
3344 2
3345 \begin_inset Quotes erd
3346 \end_inset
3347
3348 .
3349  Add the 
3350 \begin_inset Quotes eld
3351 \end_inset
3352
3353 .5
3354 \begin_inset Quotes erd
3355 \end_inset
3356
3357 .
3358  Now, hitting 
3359 \family sans
3360 Down
3361 \family default
3362  will move the cursor back to the regular level.
3363  If you hit 
3364 \family sans
3365 Space
3366 \family default
3367  instead of 
3368 \family sans
3369 Down
3370 \family default
3371 , the cursor will be placed 
3372 \emph on
3373 after
3374 \emph default
3375  the superscript (so that you can then type the 
3376 \begin_inset Quotes eld
3377 \end_inset
3378
3379 +1
3380 \begin_inset Quotes erd
3381 \end_inset
3382
3383 ).
3384 \end_layout
3385
3386 \begin_layout Section
3387 Exponents and Indices
3388 \end_layout
3389
3390 \begin_layout Standard
3391 An exponent can be entered from the 
3392 \family sans
3393 Math
3394 \begin_inset space ~
3395 \end_inset
3396
3397 Toolbar
3398 \family default
3399  (see below), but it is actually simpler just to type the caret key, 
3400 \begin_inset Quotes eld
3401 \end_inset
3402
3403 ^
3404 \begin_inset Quotes erd
3405 \end_inset
3406
3407 .
3408  LyX will place another blue rectangle in the superscript, so that whatever
3409  you write next will be superscripted, and in a smaller font size.
3410  Everything you type until you hit a 
3411 \family sans
3412 Space
3413 \family default
3414  (or 
3415 \family sans
3416 Esc
3417 \family default
3418  to exit the formula entirely) will be in the superscript.
3419 \end_layout
3420
3421 \begin_layout Standard
3422 Writing a subscript (index) is just as easy; start one by typing the underscore
3423  key 
3424 \begin_inset Quotes eld
3425 \end_inset
3426
3427 _
3428 \begin_inset Quotes erd
3429 \end_inset
3430
3431  .
3432  You can subscript and superscript both subscripts and superscripts like
3433  this: 
3434 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3435 \end_inset
3436
3437 .
3438  
3439 \end_layout
3440
3441 \begin_layout Standard
3442
3443 \series bold
3444 Exercise
3445 \series default
3446 : Put equation 1 of 
3447 \family typewriter
3448 example_raw.lyx
3449 \family default
3450  into math mode.
3451 \end_layout
3452
3453 \begin_layout Section
3454 The Math toolbar
3455 \end_layout
3456
3457 \begin_layout Standard
3458 The 
3459 \family sans
3460 Math
3461 \begin_inset space ~
3462 \end_inset
3463
3464 toolbar
3465 \family default
3466  is a convenient way to enter symbols and/or to perform complicated formula
3467  operations.
3468  Many of these operations can be accomplished from the keyboard or the 
3469 \family sans
3470 Edit\SpecialChar \menuseparator
3471 Math
3472 \family default
3473  or 
3474 \family sans
3475 Insert\SpecialChar \menuseparator
3476 Math
3477 \family default
3478  menus.
3479  However, we are going to concentrate on using the 
3480 \family sans
3481 Math
3482 \begin_inset space ~
3483 \end_inset
3484
3485 toolbar
3486 \family default
3487 , just to let you know what is out there; you can learn keyboard shortcuts
3488  and commands later from the 
3489 \emph on
3490 Math
3491 \emph default
3492  manual.
3493 \end_layout
3494
3495 \begin_layout Standard
3496 The 
3497 \family sans
3498 Math
3499 \begin_inset space ~
3500 \end_inset
3501
3502 toolbar
3503 \family default
3504  is shown when the cursor is in a formula and can also be turned on manually
3505  in the menu 
3506 \family sans
3507 View\SpecialChar \menuseparator
3508 Toolbars
3509 \family default
3510 .
3511  When you click there on 
3512 \begin_inset Quotes eld
3513 \end_inset
3514
3515 Math
3516 \begin_inset Quotes erd
3517 \end_inset
3518
3519  (
3520 \family sans
3521
3522 \begin_inset Info
3523 type  "icon"
3524 arg   "toolbar-toggle math"
3525 \end_inset
3526
3527
3528 \family default
3529 ) the toolbar will be shown permanently at the bottom; this state is visualized
3530  in the 
3531 \family sans
3532 Toolbars
3533 \family default
3534  menu with a checkmark.
3535  When you click in this state again on 
3536 \begin_inset Quotes eld
3537 \end_inset
3538
3539 Math
3540 \begin_inset Quotes erd
3541 \end_inset
3542
3543  in the 
3544 \family sans
3545 Toolbars
3546 \family default
3547  menu, the 
3548 \family sans
3549 math toolbar
3550 \family default
3551  is only shown when the cursor is within a formula; this state is visualized
3552  by the renaming of the menu entry from 
3553 \begin_inset Quotes eld
3554 \end_inset
3555
3556 Math
3557 \begin_inset Quotes erd
3558 \end_inset
3559
3560  to 
3561 \begin_inset Quotes eld
3562 \end_inset
3563
3564 Math
3565 \begin_inset space ~
3566 \end_inset
3567
3568 (auto)
3569 \begin_inset Quotes erd
3570 \end_inset
3571
3572 .
3573 \end_layout
3574
3575 \begin_layout Subsection
3576 Greek and symbols
3577 \end_layout
3578
3579 \begin_layout Standard
3580 The 
3581 \family sans
3582 Math
3583 \begin_inset space ~
3584 \end_inset
3585
3586 toolbar
3587 \family default
3588  allows you to choose from a large array of symbols used in math: operators,
3589  arrows, relationships, delimiters, special characters, sums and integrals.
3590  Note that subscripting and superscripting allow you to put lower and upper
3591  limits on sums and integrals.
3592 \end_layout
3593
3594 \begin_layout Subsection
3595 Square roots, accents, and delimiters
3596 \end_layout
3597
3598 \begin_layout Standard
3599 To type a square root, just click on the button 
3600 \family sans
3601
3602 \begin_inset Info
3603 type  "icon"
3604 arg   "math-insert \\sqrt"
3605 \end_inset
3606
3607
3608 \family default
3609 .
3610  The square root appears, and the cursor is in a new insertion point inside
3611  the square root.
3612  You can type variables, numbers, other square roots, fractions, whatever
3613  you want.
3614  LyX will automatically resize the square root to fit what is inside.
3615 \end_layout
3616
3617 \begin_layout Standard
3618 Accenting a character (
3619 \begin_inset Formula $\overrightarrow{a}$
3620 \end_inset
3621
3622 ) or group of characters (
3623 \begin_inset Formula $\overrightarrow{a+b}$
3624 \end_inset
3625
3626 ) is done similarly, and is an example of inserting a 
3627 \begin_inset Quotes eld
3628 \end_inset
3629
3630 frame decoration
3631 \begin_inset Quotes erd
3632 \end_inset
3633
3634 .
3635  Decorations are available from the toolbar via the button 
3636 \family sans
3637
3638 \begin_inset Info
3639 type  "icon"
3640 arg   "math-insert \\hat"
3641 \end_inset
3642
3643
3644 \family default
3645 .
3646  Click on a decoration, and LyX will insert that decoration with an insertion
3647  point under (or over) it.
3648  Just type what you want in the insertion point.
3649  There are two sets of decorations: those that resize with the text you
3650  type, and those that have a fixed size, and are most appropriate for a
3651  single letter.
3652  
3653 \end_layout
3654
3655 \begin_layout Standard
3656 Delimiters such as parentheses, brackets, and braces work similarly, but
3657  are a bit more complicated.
3658  Hit the delimiter button 
3659 \family sans
3660
3661 \begin_inset Info
3662 type  "icon"
3663 arg   "dialog-show mathdelimiter"
3664 \end_inset
3665
3666
3667 \family default
3668  to pop up the 
3669 \family sans
3670 Delimiter
3671 \family default
3672  dialog.
3673  Your current selection of delimiters is displayed in a box.
3674  It is a pair of parentheses by default, but you can choose a pair of braces,
3675  a brace and a parenthesis, or choose the empty square to have something
3676  like 
3677 \begin_inset Quotes eld
3678 \end_inset
3679
3680
3681 \begin_inset Formula $a=\left\langle 7\right.$
3682 \end_inset
3683
3684
3685 \begin_inset Quotes erd
3686 \end_inset
3687
3688  (the empty delimiter is displayed as a broken line in LyX, but will not
3689  show up in the output).
3690 \end_layout
3691
3692 \begin_layout Standard
3693 If you are lazy, you can type actual parentheses in math mode, rather than
3694  using the 
3695 \family sans
3696 Delimiter
3697 \family default
3698  dialog.
3699  However, those parentheses will be the same size as regular text, which
3700  will look bad if you have a big fraction or matrix inside the parentheses.
3701  So it is better in this case to use one of the three delimiter buttons
3702  that insert directly e.
3703 \begin_inset space \thinspace{}
3704 \end_inset
3705
3706 g.
3707 \begin_inset space \space{}
3708 \end_inset
3709
3710 a (
3711 \begin_inset space \thinspace{}
3712 \end_inset
3713
3714 ) pair.
3715 \end_layout
3716
3717 \begin_layout Standard
3718 You can also put delimiters or a square root sign or a decoration on already
3719  existing formula parts.
3720  Select the portion of the formula that you want to adjust, and then click
3721  on the button you want from the 
3722 \family sans
3723 Math
3724 \begin_inset space ~
3725 \end_inset
3726
3727 Toolbar
3728 \family default
3729 .
3730  Try using this to change Newton's second law from scalar to vector form
3731  (
3732 \begin_inset Formula $f=ma$
3733 \end_inset
3734
3735  to 
3736 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3737 \end_inset
3738
3739 ).
3740  Once you have  learned about matrices, this is how you will put parentheses
3741  or brackets around them.
3742 \end_layout
3743
3744 \begin_layout Subsection
3745 Fractions
3746 \end_layout
3747
3748 \begin_layout Standard
3749 To create a fraction, click on the fraction button 
3750 \family sans
3751
3752 \begin_inset Info
3753 type  "icon"
3754 arg   "math-insert \\frac"
3755 \end_inset
3756
3757
3758 \family default
3759  or 
3760 \family sans
3761
3762 \begin_inset Info
3763 type  "icon"
3764 arg   "math-insert \\frac-square"
3765 \end_inset
3766
3767
3768 \family default
3769  in the 
3770 \family sans
3771 Math
3772 \begin_inset space ~
3773 \end_inset
3774
3775 Toolbar
3776 \family default
3777 .
3778  LyX writes two insertion points in a fraction.
3779  As you would expect, you can use arrow keys or the mouse to move around
3780  a fraction.
3781  Click on the top square and type 
3782 \begin_inset Quotes eld
3783 \end_inset
3784
3785 1
3786 \begin_inset Quotes erd
3787 \end_inset
3788
3789 .
3790  Now hit 
3791 \family sans
3792 Down
3793 \family default
3794  and type 
3795 \begin_inset Quotes eld
3796 \end_inset
3797
3798 2
3799 \begin_inset Quotes erd
3800 \end_inset
3801
3802 .
3803  You have made a fraction! Of course you can type anything within each of
3804  the two boxes: variables with exponents, square roots, other fractions,
3805  whatever.
3806  
3807 \end_layout
3808
3809 \begin_layout Standard
3810
3811 \series bold
3812 Exercise
3813 \series default
3814 : Put equation 2 of 
3815 \family typewriter
3816 example_raw.lyx
3817 \family default
3818  into math mode.
3819 \end_layout
3820
3821 \begin_layout Subsection
3822 Functions: lim, log, sin and others
3823 \end_layout
3824
3825 \begin_layout Standard
3826 Because letters in math mode are considered to be variables, if you type
3827  
3828 \begin_inset Quotes eld
3829 \end_inset
3830
3831 sin
3832 \begin_inset Quotes erd
3833 \end_inset
3834
3835  in math mode, LyX thinks you are typing the product of the three variables
3836  
3837 \begin_inset Formula $s$
3838 \end_inset
3839
3840
3841 \begin_inset Formula $i$
3842 \end_inset
3843
3844 , and 
3845 \begin_inset Formula $n$
3846 \end_inset
3847
3848 .
3849  The three letters will be typeset in italics, when what you really wanted
3850  was the word 
3851 \begin_inset Quotes eld
3852 \end_inset
3853
3854 sin
3855 \begin_inset Quotes erd
3856 \end_inset
3857
3858  typeset in Roman.
3859  In addition, LyX will not put a space between the word 
3860 \begin_inset Quotes eld
3861 \end_inset
3862
3863 sin
3864 \begin_inset Quotes erd
3865 \end_inset
3866
3867  and the 
3868 \begin_inset Quotes eld
3869 \end_inset
3870
3871 x
3872 \begin_inset Quotes erd
3873 \end_inset
3874
3875  (pressing 
3876 \family sans
3877 Space
3878 \family default
3879  will exit the formula).
3880  So how do you get 
3881 \begin_inset Quotes eld
3882 \end_inset
3883
3884
3885 \begin_inset Formula $\sin(x)$
3886 \end_inset
3887
3888
3889 \begin_inset Quotes erd
3890 \end_inset
3891
3892  instead of 
3893 \begin_inset Quotes eld
3894 \end_inset
3895
3896
3897 \begin_inset Formula $sin(x)$
3898 \end_inset
3899
3900
3901 \begin_inset Quotes erd
3902 \end_inset
3903
3904 ?
3905 \end_layout
3906
3907 \begin_layout Standard
3908 Click on the 
3909 \family sans
3910 Math
3911 \begin_inset space ~
3912 \end_inset
3913
3914 Toolbar
3915 \family default
3916  button 
3917 \family sans
3918
3919 \begin_inset Info
3920 type  "icon"
3921 arg   "math-insert \\functions"
3922 \end_inset
3923
3924
3925 \family default
3926  and then on 
3927 \begin_inset Quotes eld
3928 \end_inset
3929
3930 sin
3931 \begin_inset Quotes erd
3932 \end_inset
3933
3934  in the appearing function list.
3935  The word 
3936 \begin_inset Quotes eld
3937 \end_inset
3938
3939 sin
3940 \begin_inset Quotes erd
3941 \end_inset
3942
3943  is displayed in LyX in black, and set in upright roman type.
3944  The whole word is treated as one symbol, so if you type 
3945 \family sans
3946 Backspace
3947 \family default
3948 , it will delete the whole word.
3949  Now type 
3950 \begin_inset Quotes eld
3951 \end_inset
3952
3953 (x)
3954 \begin_inset Quotes erd
3955 \end_inset
3956
3957 , which will be written in blue italics, like you expect in a formula.
3958  In the output, the expression will be correctly typeset.
3959  Try it out.
3960 \end_layout
3961
3962 \begin_layout Standard
3963 The function list includes other trigonometric functions and their inverses,
3964  hyperbolic functions, logarithms, limits, and quite a few others.
3965  These functions can take subscripts and superscripts, important for typing
3966  
3967 \begin_inset Quotes eld
3968 \end_inset
3969
3970
3971 \begin_inset Formula $\cos^{2}\theta$
3972 \end_inset
3973
3974
3975 \begin_inset Quotes erd
3976 \end_inset
3977
3978  or 
3979 \begin_inset Quotes eld
3980 \end_inset
3981
3982
3983 \begin_inset Formula $\lim_{n\rightarrow\infty}$
3984 \end_inset
3985
3986
3987 \begin_inset Quotes erd
3988 \end_inset
3989
3990 .
3991 \end_layout
3992
3993 \begin_layout Standard
3994
3995 \series bold
3996 Exercise
3997 \series default
3998 : Put equation 3 of 
3999 \family typewriter
4000 example_raw.lyx
4001 \family default
4002  into math mode.
4003 \end_layout
4004
4005 \begin_layout Subsection
4006 Matrices
4007 \end_layout
4008
4009 \begin_layout Standard
4010 Click on the matrix button 
4011 \family sans
4012
4013 \begin_inset Info
4014 type  "icon"
4015 arg   "dialog-show mathmatrix"
4016 \end_inset
4017
4018
4019 \family default
4020  in the 
4021 \family sans
4022 Math
4023 \begin_inset space ~
4024 \end_inset
4025
4026 Toolbar
4027 \family default
4028 .
4029  The appearing dialog allows you to choose how many rows and columns you
4030  want in your matrix.
4031  Choose 2 rows and 3 columns and hit 
4032 \family sans
4033 OK
4034 \family default
4035 .
4036  LyX prints 6 insertion points in a 
4037 \begin_inset Formula $2\times3$
4038 \end_inset
4039
4040  matrix.
4041  As usual, you can put any sort of formula expression (a square root, another
4042  matrix, etc.) in each insertion point.
4043  You can also leave some of the insertion points empty if you want.
4044 \end_layout
4045
4046 \begin_layout Standard
4047
4048 \family sans
4049 Tab
4050 \family default
4051  can be used to move horizontally between the columns of a matrix.
4052  Alternatively, you can use the arrow keys to move around - hitting 
4053 \family sans
4054 Right
4055 \family default
4056  at the end of one box will move to the next box, 
4057 \family sans
4058 Down
4059 \family default
4060  will move to the next row, etc.
4061 \end_layout
4062
4063 \begin_layout Standard
4064 If you need to change the number of rows and columns, use the menu 
4065 \family sans
4066 Edit\SpecialChar \menuseparator
4067 Rows
4068 \begin_inset space \thinspace{}
4069 \end_inset
4070
4071 &
4072 \begin_inset space \thinspace{}
4073 \end_inset
4074
4075 Columns
4076 \family default
4077  or the math toolbar buttons 
4078 \family sans
4079
4080 \begin_inset Info
4081 type  "icon"
4082 arg   "inset-modify tabular append-row"
4083 \end_inset
4084
4085
4086 \family default
4087
4088 \family sans
4089
4090 \begin_inset Info
4091 type  "icon"
4092 arg   "inset-modify tabular delete-row"
4093 \end_inset
4094
4095
4096 \family default
4097
4098 \family sans
4099
4100 \begin_inset Info
4101 type  "icon"
4102 arg   "inset-modify tabular append-column"
4103 \end_inset
4104
4105
4106 \family default
4107
4108 \family sans
4109
4110 \begin_inset Info
4111 type  "icon"
4112 arg   "inset-modify tabular delete-column"
4113 \end_inset
4114
4115
4116 \family default
4117 .
4118 \end_layout
4119
4120 \begin_layout Standard
4121 See the 
4122 \emph on
4123 User's Guide
4124 \emph default
4125  for information on how to change the horizontal alignment of each column,
4126  and how to change the vertical position of the whole matrix.
4127  Note that if you want to write a table containing text, you should use
4128  LyX's wonderful table support, rather than trying to write text in a matrix.
4129 \end_layout
4130
4131 \begin_layout Subsection
4132 Display mode
4133 \end_layout
4134
4135 \begin_layout Standard
4136 All of the expressions we have written so far have been on the same line
4137  as the text that came before and after them, otherwise known as inline
4138  expressions.
4139  This is fine for short, simple expressions, but if you want to write larger
4140  ones, or if you want your expressions to stand out from the text, you need
4141  to write them in display mode.
4142  In addition, only displayed expressions can be labeled and numbered (see
4143  the 
4144 \emph on
4145 User's Guide
4146 \emph default
4147 ), and multi-line equations must be in display mode.
4148 \end_layout
4149
4150 \begin_layout Standard
4151 While being in a formula, click on the display button 
4152 \family sans
4153
4154 \begin_inset Info
4155 type  "icon"
4156 arg   "math-display"
4157 \end_inset
4158
4159
4160 \family default
4161  in the 
4162 \family sans
4163 Math
4164 \begin_inset space ~
4165 \end_inset
4166
4167 Toolbar
4168 \family default
4169 .
4170  This centers the formula and adds a blank line before and after it.
4171  Now type in an expression and compile your file to see how it looks.
4172  The display button is actually a toggle; use it now to change a couple
4173  of your expressions to display mode and back.
4174  
4175 \end_layout
4176
4177 \begin_layout Standard
4178 Display mode has a couple differences from inline mode:
4179 \end_layout
4180
4181 \begin_layout Itemize
4182 The default font is larger for a few symbols, like 
4183 \begin_inset Formula $\sum$
4184 \end_inset
4185
4186  and 
4187 \begin_inset Formula $\int$
4188 \end_inset
4189
4190
4191 \end_layout
4192
4193 \begin_layout Itemize
4194 Subscripts and superscripts for limits and sums (but not integrals) are
4195  written under and over rather than next to the symbols
4196 \end_layout
4197
4198 \begin_layout Itemize
4199 Text is centered
4200 \end_layout
4201
4202 \begin_layout Standard
4203 Other than these differences, though, displayed expressions and inline expressio
4204 ns are very similar.
4205 \end_layout
4206
4207 \begin_layout Standard
4208 One final note about the way displayed formulas are typeset: Be careful
4209  about whether you are putting your equation into a new paragraph or not.
4210  If your formula is in the middle of a sentence or paragraph, then do not
4211  press 
4212 \family sans
4213 Return
4214 \family default
4215 .
4216  Doing so will cause the text 
4217 \emph on
4218 after
4219 \emph default
4220  the formula to start a new paragraph.
4221  That text will be indented or follow a blank line, depending on your document
4222  paragraph settings, which is probably not what you want.
4223 \end_layout
4224
4225 \begin_layout Standard
4226
4227 \series bold
4228 Exercise
4229 \series default
4230 : Put the various equations in 
4231 \family typewriter
4232 example_raw.lyx
4233 \family default
4234  into display mode, and see how they are typeset differently.
4235 \end_layout
4236
4237 \begin_layout Standard
4238
4239 \series bold
4240 Exercise
4241 \series default
4242 : Using various tools you have  learned in this section, you should be able
4243  to write an equation like:
4244 \begin_inset Foot
4245 status collapsed
4246
4247 \begin_layout Plain Layout
4248 After you have  done it the hard way, give 
4249 \family sans
4250 Insert\SpecialChar \menuseparator
4251 Math\SpecialChar \menuseparator
4252 Cases
4253 \begin_inset space ~
4254 \end_inset
4255
4256 Environment
4257 \family default
4258  a try.
4259 \end_layout
4260
4261 \end_inset
4262
4263  
4264 \begin_inset Formula 
4265 \[
4266 f(x)=\left\{ \begin{array}{cc}
4267 \log_{8}x & x>0\\
4268 0 & x=0\\
4269 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0
4270 \end{array}\right.
4271 \]
4272
4273 \end_inset
4274
4275
4276 \end_layout
4277
4278 \begin_layout Section
4279 More Math Stuff
4280 \end_layout
4281
4282 \begin_layout Standard
4283 Now you are familiar with the basics.
4284  LyX's math editor can do a lot more.
4285  You can refer to the 
4286 \emph on
4287 Math
4288 \emph default
4289  manual for tips on how to:
4290 \end_layout
4291
4292 \begin_layout Itemize
4293 Label and number expressions.
4294 \end_layout
4295
4296 \begin_layout Itemize
4297 Create multi-line equations.
4298 \end_layout
4299
4300 \begin_layout Itemize
4301 Change typefaces, e.
4302 \begin_inset space \thinspace{}
4303 \end_inset
4304
4305 g.
4306 \begin_inset space \space{}
4307 \end_inset
4308
4309 to write bold-face text in an expression.
4310 \end_layout
4311
4312 \begin_layout Itemize
4313 Fine-tune font sizes and spacing within an expression.
4314  (Do not worry about this until your final draft!)
4315 \end_layout
4316
4317 \begin_layout Itemize
4318 Write macros.
4319  These are very powerful, because you just define them once at the top of
4320  the document, and then you can use them throughout the document.
4321 \end_layout
4322
4323 \begin_layout Itemize
4324 Almost all you can do with math.
4325 \end_layout
4326
4327 \begin_layout Chapter
4328 Miscellaneous
4329 \end_layout
4330
4331 \begin_layout Section
4332 Other major LyX Features
4333 \end_layout
4334
4335 \begin_layout Standard
4336 We have not gone through all the possible commands in LyX, and we are not
4337  planning on it.
4338  As usual, see the 
4339 \emph on
4340 User's Guide
4341 \emph default
4342  and the 
4343 \emph on
4344 Embedded
4345 \begin_inset space ~
4346 \end_inset
4347
4348 Objects
4349 \emph default
4350  manual for more information.
4351  We will just mention a couple more major things LyX can do:
4352 \end_layout
4353
4354 \begin_layout Itemize
4355 LyX has WYSIWYM support for tables.
4356  Use the 
4357 \family sans
4358 Insert\SpecialChar \menuseparator
4359 Table
4360 \family default
4361  (toolbar button 
4362 \family sans
4363
4364 \begin_inset Info
4365 type  "icon"
4366 arg   "tabular-insert"
4367 \end_inset
4368
4369
4370 \family default
4371 ) to get a table.
4372  Click on the table with the 
4373 \emph on
4374 right button
4375 \emph default
4376  to get a 
4377 \family sans
4378 Table
4379 \begin_inset space ~
4380 \end_inset
4381
4382 Settings
4383 \family default
4384  dialog box which allows extensive table editing.
4385  By pressing 
4386 \family sans
4387
4388 \begin_inset Info
4389 type  "icon"
4390 arg   "toolbar-toggle table"
4391 \end_inset
4392
4393
4394 \family default
4395  the table toolbar will appear permanently.
4396 \end_layout
4397
4398 \begin_layout Itemize
4399 LyX also supports including pictures in any format within documents.
4400  (You guessed it: 
4401 \family sans
4402 Insert\SpecialChar \menuseparator
4403 Graphics
4404 \family default
4405  (toolbar button 
4406 \family sans
4407
4408 \begin_inset Info
4409 type  "icon"
4410 arg   "dialog-show-new-inset graphics"
4411 \end_inset
4412
4413
4414 \family default
4415 ).
4416  Then browse for the figure file, rotate or scale it, etc.) Tables and figures
4417  can have captions, and LyX will automatically generate lists of figures
4418  and/or tables.
4419 \end_layout
4420
4421 \begin_layout Itemize
4422 LyX is heavily configurable.
4423  Everything from how the LyX window looks to how the output comes out can
4424  be configured in a number of ways.
4425  Much configuration is done through 
4426 \family sans
4427 Tools\SpecialChar \menuseparator
4428 Preferences
4429 \family default
4430 .
4431  For more information on this, check out 
4432 \family sans
4433 Help\SpecialChar \menuseparator
4434 Customization\SpecialChar \@.
4435
4436 \end_layout
4437
4438 \begin_layout Itemize
4439 LyX is being developed by a team of programmers on five continents.
4440  Therefore, LyX has better support for non-English languages (such as Dutch,
4441  German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4442 ) than many word processors.
4443  Even the right-to-left languages Arabic, Farsi, and Hebrew and the Asian
4444  languages Chinese Japanese, and Korean are supported.
4445  You can write documents in other languages and you can also configure LyX
4446  to show its menus and error messages in other languages.
4447  
4448 \end_layout
4449
4450 \begin_layout Itemize
4451 The LyX menus feature keybindings.
4452  This means that you can do 
4453 \family sans
4454 File\SpecialChar \menuseparator
4455 Open
4456 \family default
4457  by pressing 
4458 \family sans
4459 Alt+F
4460 \family default
4461  followed by 
4462 \family sans
4463 O
4464 \family default
4465  or by using the binding which is shown next to it in the menu (Ctrl+O by
4466  default).
4467  Keybindings are also configurable.
4468  For information on this, check out 
4469 \family sans
4470 Help\SpecialChar \menuseparator
4471 Customization\SpecialChar \@.
4472
4473 \end_layout
4474
4475 \begin_layout Itemize
4476 LyX can read LaTeX documents.
4477  See section
4478 \begin_inset space ~
4479 \end_inset
4480
4481
4482 \begin_inset CommandInset ref
4483 LatexCommand ref
4484 reference "sec:tex2lyx"
4485
4486 \end_inset
4487
4488 .
4489 \end_layout
4490
4491 \begin_layout Itemize
4492 Spell-checking, thesaurus, and word count facilities are available.
4493 \end_layout
4494
4495 \begin_layout Itemize
4496 Generation of indexes and nomenclatures/glossaries is supported.
4497 \end_layout
4498
4499 \begin_layout Section
4500 LyX for LaTeX Users
4501 \begin_inset CommandInset label
4502 LatexCommand label
4503 name "sec:latexusers"
4504
4505 \end_inset
4506
4507
4508 \end_layout
4509
4510 \begin_layout Standard
4511 If you do not know anything about LaTeX, you do not have to read this section.
4512  Actually, you might want to 
4513 \emph on
4514 learn
4515 \emph default
4516  about LaTeX, and then read this chapter.
4517  However, some who begin to use LyX will be familiar with LaTeX.
4518  If you are such a person, you may be wondering if LyX can really do everything
4519  LaTeX can do.
4520  The short answer is that LyX can do pretty much everything LaTeX can do
4521  in one form or another, and it definitely simplifies most parts of writing
4522  a LaTeX document.
4523 \end_layout
4524
4525 \begin_layout Standard
4526 Because this is just a tutorial, we are only going to mention things that
4527  new LyX users will most likely be interested in.
4528  In the interests of keeping the Tutorial short, we will give only minimal
4529  information here.
4530  The 
4531 \emph on
4532 Additional
4533 \begin_inset space ~
4534 \end_inset
4535
4536 Features
4537 \emph default
4538  and the 
4539 \emph on
4540 Embedded
4541 \begin_inset space ~
4542 \end_inset
4543
4544 Objects
4545 \emph default
4546  manual have a great deal of information on differences between LyX and
4547  LaTeX, and how to do various LaTeX tricks in LyX.
4548 \end_layout
4549
4550 \begin_layout Subsection
4551 TeX Mode 
4552 \end_layout
4553
4554 \begin_layout Standard
4555 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4556  will be displayed in red on the screen.
4557  You can use TeX commands in LyX by choosing 
4558 \family sans
4559 Insert\SpecialChar \menuseparator
4560 TeX
4561 \begin_inset space ~
4562 \end_inset
4563
4564 Code
4565 \family default
4566  (toolbar button 
4567 \family sans
4568
4569 \begin_inset Info
4570 type  "icon"
4571 arg   "ert-insert"
4572 \end_inset
4573
4574
4575 \family default
4576 ).
4577  This creates a box where everything within it is passed straight to LaTeX.
4578 \end_layout
4579
4580 \begin_layout Standard
4581 In a math formula, TeX mode is handled a bit differently.
4582  TeX mode is entered there by typing a backslash.
4583  The backslash is not written out, but anything you type afterwards will
4584  be in red.
4585  You exit TeX mode by typing 
4586 \family sans
4587 Space
4588 \family default
4589  or some other non-alphabetic character, like a number, underscore, caret,
4590  or parenthesis.
4591  Once you exit TeX mode, if LyX knows the TeX command you have typed in,
4592  it will convert it to WYSIWYM\SpecialChar \@.
4593  So if you type 
4594 \begin_inset Quotes eld
4595 \end_inset
4596
4597
4598 \family typewriter
4599
4600 \backslash
4601 gamma
4602 \family default
4603
4604 \begin_inset Quotes erd
4605 \end_inset
4606
4607  in a formula and then press 
4608 \family sans
4609 Space
4610 \family default
4611 , LyX will change the red 
4612 \begin_inset Quotes eld
4613 \end_inset
4614
4615 gamma
4616 \begin_inset Quotes erd
4617 \end_inset
4618
4619  to a blue 
4620 \begin_inset Quotes eld
4621 \end_inset
4622
4623
4624 \begin_inset Formula $\gamma$
4625 \end_inset
4626
4627
4628 \begin_inset Quotes erd
4629 \end_inset
4630
4631 .
4632  This will work for almost all, non-complicated math macros.
4633  This may be faster than using the 
4634 \family sans
4635 Math
4636 \begin_inset space ~
4637 \end_inset
4638
4639 Toolbar
4640 \family default
4641 , and will be especially convenient for experienced LaTeX users.
4642 \end_layout
4643
4644 \begin_layout Standard
4645 As a special case, if you type 
4646 \begin_inset Quotes eld
4647 \end_inset
4648
4649
4650 \family typewriter
4651
4652 \backslash
4653 {
4654 \family default
4655
4656 \begin_inset Quotes erd
4657 \end_inset
4658
4659  in a formula, the beginning 
4660 \emph on
4661 and
4662 \emph default
4663  ending braces will be inserted in red while the cursor is placed between
4664  the braces.
4665  This makes it more convenient to type those commands that take an argument.
4666 \end_layout
4667
4668 \begin_layout Standard
4669 LyX cannot do absolutely everything that LaTeX can do.
4670  Some fancy functions are not supported at all, while some work but are
4671  not WYSIWYM.
4672  TeX mode allows users to get the full flexibility of LaTeX, while having
4673  all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4674  LyX could never support every LaTeX package.
4675  However, by typing 
4676 \family typewriter
4677
4678 \backslash
4679 usepackage{foo}
4680 \family default
4681  in the preamble (see Section
4682 \begin_inset space ~
4683 \end_inset
4684
4685
4686 \begin_inset CommandInset ref
4687 LatexCommand ref
4688 reference "sec:preamble"
4689
4690 \end_inset
4691
4692 ), you can use any package you want â€” although you will not have WYSIWYM
4693  support for that package's features.
4694 \end_layout
4695
4696 \begin_layout Subsection
4697 Importing LaTeX Documents â€” 
4698 \family typewriter
4699 tex2lyx
4700 \family default
4701
4702 \begin_inset CommandInset label
4703 LatexCommand label
4704 name "sec:tex2lyx"
4705
4706 \end_inset
4707
4708
4709 \end_layout
4710
4711 \begin_layout Standard
4712 You can import a LaTeX file into LyX by using the 
4713 \family sans
4714 File\SpecialChar \menuseparator
4715 Import\SpecialChar \menuseparator
4716 LaTeX
4717 \begin_inset space ~
4718 \end_inset
4719
4720 (plain)
4721 \family default
4722  menu in LyX.
4723  This will call the program 
4724 \family typewriter
4725 tex2lyx
4726 \family default
4727  which will create a file foo.lyx from the file foo.tex.
4728  LyX will then open that file.
4729  If the translation does not work, you can try calling 
4730 \family typewriter
4731 tex2lyx
4732 \family default
4733  from the command line, possibly using fancier options.
4734 \end_layout
4735
4736 \begin_layout Standard
4737 Even when the translation does work, 
4738 \family typewriter
4739 tex2lyx
4740 \family default
4741  may not translate everything, though it does handle most legal LaTeX.
4742  It will leave things it does not understand in TeX mode; so, after translating
4743  a file with 
4744 \family typewriter
4745 tex2lyx
4746 \family default
4747 , you can look for the red text and manually edit it to get it right.
4748 \end_layout
4749
4750 \begin_layout Standard
4751
4752 \family typewriter
4753 tex2lyx
4754 \family default
4755  has its own documentation (manpage), which Unix/Linux users can access
4756  via the console command 
4757 \family typewriter
4758 man
4759 \begin_inset space ~
4760 \end_inset
4761
4762 tex2lyx
4763 \family default
4764 .
4765  The manpage describes which LaTeX commands and environments are not supported,
4766  what bugs you might run into (and how to get around them), and how to use
4767  the various options.
4768 \end_layout
4769
4770 \begin_layout Standard
4771 It is important to understand that 
4772 \family typewriter
4773 tex2lyx
4774 \family default
4775  can only translate files whose document class is 
4776 \begin_inset Quotes eld
4777 \end_inset
4778
4779 known
4780 \begin_inset Quotes erd
4781 \end_inset
4782
4783  to LyX, that is, for which there is a corresponding LyX 
4784 \family sans
4785 layout file
4786 \family default
4787 .
4788  If there is no layout file, then you will get an error saying that the
4789  conversion could not be performed.
4790  So, unless you have a layout for the document class of your LaTeX file,
4791  
4792 \family typewriter
4793 tex2lyx
4794 \family default
4795  simply will not know how to translate the LaTeX that it finds there into
4796  things LyX understands.
4797  More about layout files and how they are created is explained in detail
4798  in Chapter 5 of the 
4799 \emph on
4800 Customization
4801 \emph default
4802  manual.
4803 \end_layout
4804
4805 \begin_layout Subsection
4806 Converting LyX Documents to LaTeX
4807 \end_layout
4808
4809 \begin_layout Standard
4810 You might wish to convert a LyX Document to a LaTeX file.
4811  For example, a co-worker or co-author who does not have LyX might want
4812  to read it.
4813  Select 
4814 \family sans
4815 File\SpecialChar \menuseparator
4816 Export\SpecialChar \menuseparator
4817 LaTeX
4818 \family default
4819 .
4820  This will create a file 
4821 \family typewriter
4822 whatever.tex
4823 \family default
4824  from the 
4825 \family typewriter
4826 whatever.lyx
4827 \family default
4828  file you are editing.
4829 \end_layout
4830
4831 \begin_layout Subsection
4832 LaTeX Preamble
4833 \end_layout
4834
4835 \begin_layout Subsubsection
4836 Document Class
4837 \end_layout
4838
4839 \begin_layout Standard
4840 The 
4841 \family sans
4842 Document\SpecialChar \menuseparator
4843 Settings
4844 \family default
4845  dialog takes care of the document-wide options, such as changing the document
4846  class, default font size and paper size.
4847  Document class options and also options for LaTeX packages can be entered
4848  there in the 
4849 \family sans
4850 Class
4851 \begin_inset space ~
4852 \end_inset
4853
4854 options
4855 \family default
4856  area.
4857 \end_layout
4858
4859 \begin_layout Subsubsection
4860 Other Preamble Matter
4861 \begin_inset CommandInset label
4862 LatexCommand label
4863 name "sec:preamble"
4864
4865 \end_inset
4866
4867
4868 \end_layout
4869
4870 \begin_layout Standard
4871 If you have special commands to put in the preamble of a LaTeX file, you
4872  can use them in a LyX document as well.
4873  Select 
4874 \family sans
4875 Document\SpecialChar \menuseparator
4876 Settings\SpecialChar \menuseparator
4877 LaTeX
4878 \begin_inset space ~
4879 \end_inset
4880
4881 Preamble
4882 \family default
4883  and type in the dialog window (or from the document settings dialog, depending
4884  on the frontend).
4885  Anything you type will (as with TeX mode) be sent directly to LaTeX.
4886 \end_layout
4887
4888 \begin_layout Subsection
4889 BibTeX
4890 \end_layout
4891
4892 \begin_layout Standard
4893 LyX has support for BibTeX, which allows you to build databases of bibliographic
4894 al references to be used in multiple documents.
4895  Select 
4896 \family sans
4897 Insert\SpecialChar \menuseparator
4898 List
4899 \begin_inset space \thinspace{}
4900 \end_inset
4901
4902 /
4903 \begin_inset space \thinspace{}
4904 \end_inset
4905
4906 TOC\SpecialChar \menuseparator
4907 BibTeX
4908 \begin_inset space ~
4909 \end_inset
4910
4911 Bibliography
4912 \family default
4913  to include a 
4914 \family typewriter
4915 BibTeX
4916 \family default
4917  file.
4918  In the 
4919 \family sans
4920 Database
4921 \family default
4922  field you load BibTeX files, in the 
4923 \family sans
4924 Style
4925 \family default
4926  field you can load BibTeX style files.
4927 \end_layout
4928
4929 \begin_layout Standard
4930 After you have done this, you can use citations from any bibliographies
4931  you have included with 
4932 \family sans
4933 Insert\SpecialChar \menuseparator
4934 Citation
4935 \family default
4936  (see Section
4937 \begin_inset space ~
4938 \end_inset
4939
4940
4941 \begin_inset CommandInset ref
4942 LatexCommand ref
4943 reference "sec:bibliographies"
4944
4945 \end_inset
4946
4947 ).
4948  The box in the 
4949 \family sans
4950 Citation
4951 \family default
4952  dialog will show a list of all the references in your 
4953 \family typewriter
4954 BibTeX
4955 \family default
4956  file.
4957 \end_layout
4958
4959 \begin_layout Section
4960 Errors!
4961 \end_layout
4962
4963 \begin_layout Standard
4964 Sometimes when you try to view a document, there will be errors, things
4965  that LyX or LaTeX cannot understand.
4966  When this happens, LyX will open a 
4967 \family sans
4968 LaTeX
4969 \begin_inset space ~
4970 \end_inset
4971
4972 Errors
4973 \family default
4974  dialog.
4975  Clicking on individual errors in this dialog will take you to the place
4976  in the LyX document where the error occurs and also display the detailed
4977  LaTeX error message.
4978 \end_layout
4979
4980 \end_body
4981 \end_document