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