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