]> git.lyx.org Git - lyx.git/blob - lib/doc/Tutorial.lyx
adjust
[lyx.git] / lib / doc / Tutorial.lyx
1 #LyX 1.5.2svn 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 latin1
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 none
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  (actually, an asterisk, which will be converted to a round circle on output)
1601  on the line.
1602  Type in your reasons: 
1603 \end_layout
1604
1605 \begin_layout LyX-Code
1606 Typesetting is done for you.
1607 \end_layout
1608
1609 \begin_layout LyX-Code
1610 Math is WYSIWYG
1611 \end_layout
1612
1613 \begin_layout LyX-Code
1614 Lists are very easy to create!
1615 \end_layout
1616
1617 \begin_layout Standard
1618 List environments, unlike headings, do not end when you type 
1619 \family sans
1620 Return
1621 \family default
1622 .
1623  Instead, LyX assumes you're going on to the next item in the list.
1624  The above will therefore result in a three-item list.
1625  If you want more than one paragraph within one list 
1626 \emph on
1627 item
1628 \emph default
1629 , one way is to use the 
1630 \family sans
1631 Protected\InsetSpace ~
1632 Break
1633 \family default
1634 , which you get by typing 
1635 \family sans
1636 C-Return
1637 \family default
1638 .
1639  In order to get out of the list, you need to reselect the 
1640 \family sans
1641 Standard
1642 \family default
1643  environment (or just use the keybinding, 
1644 \family sans
1645 M-p\InsetSpace ~
1646 s
1647 \family default
1648 ).
1649 \end_layout
1650
1651 \begin_layout Standard
1652 You've got a beautiful itemized list.
1653  You might want to run LaTeX to see how the list looks when printed out.
1654  But what if you wanted to number the reasons? Well, just select the whole
1655  list
1656 \begin_inset Foot
1657 status collapsed
1658
1659 \begin_layout Standard
1660 LyX won't let you select the first bullet unless you also select the paragraph
1661  
1662 \emph on
1663 before
1664 \emph default
1665  the list, which you probably don't want to do.
1666  Similarly, you can't select the actual number in a numbered section title.
1667  Don't worry about it.
1668 \end_layout
1669
1670 \end_inset
1671
1672  and choose 
1673 \family sans
1674 Enumerate
1675 \family default
1676  from the 
1677 \family sans
1678 Environment
1679 \family default
1680  menu.
1681  Pow! As we mentioned, if you add or delete a list item, LyX will fix the
1682  numbering.
1683 \end_layout
1684
1685 \begin_layout Standard
1686 While the list is still selected, you can change to the other two list environme
1687 nts, 
1688 \family sans
1689 Description
1690 \family default
1691  and 
1692 \family sans
1693 List
1694 \family default
1695 , in order to see what they look like.
1696  For those two environments, each list item is made up of a term, which
1697  is the item's first word, followed by a definition, which is the rest of
1698  the paragraph (until you hit 
1699 \family sans
1700 Return
1701 \family default
1702 .) The term is either typeset in boldface (
1703 \family sans
1704 Description
1705 \family default
1706 ) or separated by a 
1707 \begin_inset Quotes eld
1708 \end_inset
1709
1710 Tab
1711 \begin_inset Quotes erd
1712 \end_inset
1713
1714
1715 \begin_inset Foot
1716 status collapsed
1717
1718 \begin_layout Standard
1719 But a typesetter's tab, which will change to fit the size of the largest
1720  term, not a pathetic, rigid, unchangeable typewriter 
1721 \family sans
1722 Tab
1723 \family default
1724 .
1725 \end_layout
1726
1727 \end_inset
1728
1729  (
1730 \family sans
1731 List
1732 \family default
1733 ) from the rest of the paragraph.
1734  If you want to have more than one word in the definition, then separate
1735  the words with 
1736 \family sans
1737 Protected\InsetSpace ~
1738 Blank
1739 \family default
1740 s.
1741 \end_layout
1742
1743 \begin_layout Standard
1744
1745 \series bold
1746 Exercise
1747 \series default
1748 : Typeset the list in 
1749 \family typewriter
1750 example_raw.lyx
1751 \end_layout
1752
1753 \begin_layout Standard
1754 You can nest lists within each other in all sorts of interesting ways.
1755  An obvious example would be writing outlines.
1756  Numbered and bulleted lists will have different numbering and bulleting
1757  schemes for sublists.
1758  See the 
1759 \emph on
1760 User's Guide
1761 \emph default
1762  for details on the different sorts of lists, as well as examples which
1763  use 
1764 \emph on
1765 a lot
1766 \emph default
1767  of nesting.
1768 \end_layout
1769
1770 \begin_layout Subsection
1771 Other Environments: Verses, Quotations, and More
1772 \end_layout
1773
1774 \begin_layout Standard
1775 There are two environments for setting quotations apart from surrounding
1776  text: 
1777 \family sans
1778 Quote
1779 \family default
1780  for short quotes and 
1781 \family sans
1782 Quotation
1783 \family default
1784  for longer ones.
1785  Computer code (the 
1786 \family sans
1787 LyX-Code
1788 \family default
1789  environment, also used in the 
1790 \emph on
1791 Tutorial
1792 \emph default
1793  for the long typing examples) is written in a 
1794 \family typewriter
1795 typewriter
1796 \family default
1797  font; this environment is the only place in LyX where you're allowed to
1798  use multiple spaces to allow code indenting.
1799  You can even write poetry using the 
1800 \family sans
1801 Verse
1802 \family default
1803  style, using 
1804 \family sans
1805 Return
1806 \family default
1807  to separate stanzas, and 
1808 \family sans
1809 C-Return
1810 \family default
1811  to separate lines within a stanza.
1812  See the 
1813 \emph on
1814 User's Guide
1815 \emph default
1816  for more complete descriptions of all of the available LyX environments.
1817 \end_layout
1818
1819 \begin_layout Standard
1820
1821 \series bold
1822 Exercise
1823 \series default
1824 : Correctly typeset the 
1825 \family sans
1826 Quote, LyX-Code,
1827 \family default
1828  and 
1829 \family sans
1830 Verse
1831 \family default
1832  in
1833 \begin_inset ERT
1834 status inlined
1835
1836 \begin_layout Standard
1837
1838
1839 \backslash
1840 linebreak
1841 \end_layout
1842
1843 \end_inset
1844
1845  
1846 \family typewriter
1847 example_raw.lyx
1848 \end_layout
1849
1850 \begin_layout Chapter
1851 Writing Documents
1852 \end_layout
1853
1854 \begin_layout Standard
1855 The previous chapter hopefully allowed you to get used to writing in LyX.
1856  It introduced you to the basic editing operations in LyX, as well as the
1857  powerful method of writing with environments.
1858  Most people who use LyX, though, will want to write documents: papers,
1859  articles, books, manuals, or letters.
1860  This chapter is meant to take you from simply writing text with LyX to
1861  writing a complete document.
1862  It will introduce you to text classes, which allow you to write different
1863  sorts of documents.
1864  It will then describe many of the additions that turn text into a document,
1865  such as titles, footnotes, cross references, bibliographies, and tables
1866  of contents.
1867 \end_layout
1868
1869 \begin_layout Section
1870 Text classes
1871 \end_layout
1872
1873 \begin_layout Standard
1874 \begin_inset LatexCommand label
1875 name "sec:textclasses"
1876
1877 \end_inset
1878
1879 Different sorts of documents should be typeset differently.
1880  For example, books are generally printed double-sided, while articles are
1881  single-sided.
1882  In addition, many documents contain special environments: letters contain
1883  some environments --- such as the sender's address and the signature ---
1884  which do not make sense in a book or article.
1885  The LyX 
1886 \emph on
1887 text class
1888 \begin_inset Foot
1889 status collapsed
1890
1891 \begin_layout Standard
1892 LaTeX users: this is equivalent to the LaTeX document class
1893 \end_layout
1894
1895 \end_inset
1896
1897
1898 \emph default
1899  takes care of these large scale differences between different sorts of
1900  documents.
1901  This 
1902 \emph on
1903 Tutorial
1904 \emph default
1905 , for example, was written in the 
1906 \family sans
1907 Book
1908 \family default
1909  text class.
1910  Text classes are another major part of the WYSIWYM philosophy; they tell
1911  LyX how to typeset the document, so you don't need to know how.
1912 \end_layout
1913
1914 \begin_layout Standard
1915 Your document is probably being written in the 
1916 \family sans
1917 Article
1918 \family default
1919  text class
1920 \begin_inset Foot
1921 status collapsed
1922
1923 \begin_layout Standard
1924 That's usually the default text class
1925 \end_layout
1926
1927 \end_inset
1928
1929 .
1930  Try changing to other text classes (using the 
1931 \family sans
1932 \bar under
1933 D
1934 \bar default
1935 ocument\SpecialChar \menuseparator
1936
1937 \bar under
1938 S
1939 \bar default
1940 ettings
1941 \family default
1942  dialog) to see how they are typeset differently.
1943  If you change your document to the 
1944 \family sans
1945 Book
1946 \family default
1947  text class and look at the 
1948 \family sans
1949 Environment
1950 \family default
1951  menu, you'll see that most of the allowed environments are the same.
1952  However, you can now use the 
1953 \family sans
1954 Chapter
1955 \family default
1956  environment.
1957  If you're ever unsure about which environments you can use in a given text
1958  class, just consult the 
1959 \family sans
1960 Environment
1961 \family default
1962  menu.
1963 \end_layout
1964
1965 \begin_layout Standard
1966 Font sizes, one- or two-column printing, and page headings are just some
1967  of the ways journals' typesettings differ from one another.
1968  As the Computer Age continues to mature, journals have begun accepting
1969  electronic submissions, creating LaTeX 
1970 \begin_inset Quotes eld
1971 \end_inset
1972
1973 style files
1974 \begin_inset Quotes erd
1975 \end_inset
1976
1977  so that authors can submit correctly typeset articles.
1978  LyX is set up to support this as well.
1979  For example, LyX supports typesetting (and extra environments) for the
1980  American Mathematics Society journals using the 
1981 \family sans
1982 Article\InsetSpace ~
1983 (AMS)
1984 \family default
1985  text class.
1986 \end_layout
1987
1988 \begin_layout Standard
1989 Here's a very quick reference to some of the text classes.
1990  See the 
1991 \emph on
1992 Special Document Classes
1993 \emph default
1994  section of the 
1995 \emph on
1996 Extended Features
1997 \emph default
1998  manual for many more details.
1999 \end_layout
2000
2001 \begin_layout Standard
2002 \align center
2003 \begin_inset Tabular
2004 <lyxtabular version="3" rows="7" columns="2">
2005 <features>
2006 <column alignment="center" valignment="top" leftline="true" width="0pt">
2007 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
2008 <row topline="true" bottomline="true">
2009 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2010 \begin_inset Text
2011
2012 \begin_layout Standard
2013 Name
2014 \end_layout
2015
2016 \end_inset
2017 </cell>
2018 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2019 \begin_inset Text
2020
2021 \begin_layout Standard
2022 Notes
2023 \end_layout
2024
2025 \end_inset
2026 </cell>
2027 </row>
2028 <row topline="true">
2029 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2030 \begin_inset Text
2031
2032 \begin_layout Standard
2033 article
2034 \end_layout
2035
2036 \end_inset
2037 </cell>
2038 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2039 \begin_inset Text
2040
2041 \begin_layout Standard
2042 one-sided, no chapters
2043 \end_layout
2044
2045 \end_inset
2046 </cell>
2047 </row>
2048 <row topline="true">
2049 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2050 \begin_inset Text
2051
2052 \begin_layout Standard
2053 article (AMS)
2054 \end_layout
2055
2056 \end_inset
2057 </cell>
2058 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2059 \begin_inset Text
2060
2061 \begin_layout Standard
2062 layout & environments for American Math Society
2063 \end_layout
2064
2065 \end_inset
2066 </cell>
2067 </row>
2068 <row topline="true">
2069 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2070 \begin_inset Text
2071
2072 \begin_layout Standard
2073 report
2074 \end_layout
2075
2076 \end_inset
2077 </cell>
2078 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2079 \begin_inset Text
2080
2081 \begin_layout Standard
2082 longer than article, two-sided
2083 \end_layout
2084
2085 \end_inset
2086 </cell>
2087 </row>
2088 <row topline="true" bottomline="true">
2089 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2090 \begin_inset Text
2091
2092 \begin_layout Standard
2093 book
2094 \end_layout
2095
2096 \end_inset
2097 </cell>
2098 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2099 \begin_inset Text
2100
2101 \begin_layout Standard
2102 report + front and back matter
2103 \end_layout
2104
2105 \end_inset
2106 </cell>
2107 </row>
2108 <row bottomline="true">
2109 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2110 \begin_inset Text
2111
2112 \begin_layout Standard
2113 slides
2114 \end_layout
2115
2116 \end_inset
2117 </cell>
2118 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2119 \begin_inset Text
2120
2121 \begin_layout Standard
2122 transparencies (also including FoilTeX)
2123 \end_layout
2124
2125 \end_inset
2126 </cell>
2127 </row>
2128 <row bottomline="true">
2129 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2130 \begin_inset Text
2131
2132 \begin_layout Standard
2133 letter
2134 \end_layout
2135
2136 \end_inset
2137 </cell>
2138 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2139 \begin_inset Text
2140
2141 \begin_layout Standard
2142 lots of extra environments for address, signature\SpecialChar \ldots{}
2143
2144 \end_layout
2145
2146 \end_inset
2147 </cell>
2148 </row>
2149 </lyxtabular>
2150
2151 \end_inset
2152
2153
2154 \end_layout
2155
2156 \begin_layout Section
2157 Templates: Writing a Letter
2158 \end_layout
2159
2160 \begin_layout Standard
2161 One of the most popular text classes is 
2162 \family sans
2163 Letter
2164 \family default
2165 \SpecialChar \@.
2166  One way to write a letter would be to open a new file, and choose 
2167 \family sans
2168 Letter
2169 \family default
2170  class in the 
2171 \family sans
2172 \bar under
2173 D
2174 \bar default
2175 ocument\SpecialChar \menuseparator
2176
2177 \bar under
2178 S
2179 \bar default
2180 ettings
2181 \family default
2182  dialog.
2183  While this is the most obvious way to write a letter, it seems like extra
2184  work.
2185  Every time you write a business letter, you want to have your address,
2186  the address you're sending to, a body, a signature, etc.
2187  LyX therefore has a 
2188 \emph on
2189 template
2190 \emph default
2191  for letters, which contains a sample letter; once you have a template,
2192  you can just replace a couple parts of the letter with your text each time
2193  you write a letter.
2194 \end_layout
2195
2196 \begin_layout Standard
2197 Open a new file with 
2198 \family sans
2199 \bar under
2200 F
2201 \bar default
2202 ile\SpecialChar \menuseparator
2203 New\InsetSpace ~
2204 from\InsetSpace ~
2205
2206 \bar under
2207 T
2208 \bar default
2209 emplate
2210 \family default
2211 .
2212  Select 
2213 \family typewriter
2214 letter.lyx
2215 \family default
2216  as the template.
2217  Save and print the file to see how the various environments are typeset.
2218 \end_layout
2219
2220 \begin_layout Standard
2221 When you look at the 
2222 \family sans
2223 Environment
2224 \family default
2225  menu, you'll see several environments, like the 
2226 \family sans
2227 My\InsetSpace ~
2228 Address
2229 \family default
2230  environment, which don't even exist in most other text classes.
2231  Others, like 
2232 \family sans
2233 Quote
2234 \family default
2235  and 
2236 \family sans
2237 Description
2238 \family default
2239 , are familiar.
2240  You can play around for a while to figure out how the various environments
2241  work.
2242  You'll notice for example that the 
2243 \family sans
2244 Signature
2245 \family default
2246  environment has the word 
2247 \begin_inset Quotes eld
2248 \end_inset
2249
2250 Signature:
2251 \begin_inset Quotes eld
2252 \end_inset
2253
2254  in red before the actual text of the signature.
2255  This word doesn't show up in the actual letter, as you'll see if you try
2256  printing the file.
2257  It's just there to let you know where the signature goes.
2258  Also, note that it doesn't matter where in the file the 
2259 \family sans
2260 Signature
2261 \family default
2262  line is placed.
2263  Remember, LyX is WYSIWYM; you can put the 
2264 \family sans
2265 Signature
2266 \family default
2267  environment anywhere you want, but LyX knows that in the printout, the
2268  signature should be at the end.
2269 \end_layout
2270
2271 \begin_layout Standard
2272 A template is just a regular LyX file.
2273  This means you can fill in your address and signature and save the file
2274  as a new template.
2275  From now on, any time you want to write a letter, you can use the new template
2276  to save time.
2277  We probably don't have to suggest an actual 
2278 \begin_inset Quotes eld
2279 \end_inset
2280
2281 exercise
2282 \begin_inset Quotes erd
2283 \end_inset
2284
2285  here; just write a letter to someone!
2286 \begin_inset Foot
2287 status collapsed
2288
2289 \begin_layout Standard
2290 One warning, if you're writing from a template.
2291  If you erase all of the text in an environment --- for example, if you
2292  erase the whole 
2293 \family sans
2294 My\InsetSpace ~
2295 Address
2296 \family default
2297  field so that you can replace it with your own --- and then you move the
2298  cursor without writing any text, the environment may disappear.
2299  This is because most environments cannot exist without any text in them.
2300  Just reselect the environment from the 
2301 \family sans
2302 Environment
2303 \family default
2304  menu to get it back.
2305 \end_layout
2306
2307 \end_inset
2308
2309
2310 \end_layout
2311
2312 \begin_layout Standard
2313 Templates can be a huge time-saver, and we urge you to use them whenever
2314  possible.
2315  In addition, they can help a person learn how to use some of the fancier
2316  text classes.
2317  Finally, they may be useful for a person who is configuring LyX for a bunch
2318  of less computer-aware users.
2319  When they're first learning LyX, it will be much less intimidating if they
2320  have a letter template customized for their company, for example.
2321 \end_layout
2322
2323 \begin_layout Section
2324 Document Titles
2325 \end_layout
2326
2327 \begin_layout Standard
2328 LyX (like LaTeX) considers the title --- which may contain the actual title,
2329  the author, the date, and even an abstract of a paper --- to be a separate
2330  part of the document.
2331 \end_layout
2332
2333 \begin_layout Standard
2334 Go back to your 
2335 \family typewriter
2336 newfile.lyx
2337 \family default
2338  document and make sure it's using the 
2339 \family sans
2340 Article
2341 \family default
2342  text class.
2343 \begin_inset Foot
2344 status collapsed
2345
2346 \begin_layout Standard
2347 You should not be using the letter any more, since the 
2348 \family sans
2349 Letter
2350 \family default
2351  textclass doesn't allow titles.
2352 \end_layout
2353
2354 \end_inset
2355
2356  Type a title on the first line, and change the line to the 
2357 \family sans
2358 Title
2359 \family default
2360  environment.
2361  On the next line, type your name and change it to the 
2362 \family sans
2363 Author
2364 \family default
2365  environment.
2366  On the next line, write the date in the 
2367 \family sans
2368 Date
2369 \family default
2370  environment.
2371  Type a paragraph or two summarizing your document using the 
2372 \family sans
2373 Abstract
2374 \family default
2375  environment.
2376  Notice how the title is presented when it's printed out.
2377  If you changed the document format to Book, you'll get a separate title
2378  page, like the first page of this tutorial.
2379 \end_layout
2380
2381 \begin_layout Standard
2382
2383 \series bold
2384 Exercise
2385 \series default
2386 : Fix the title, date, and author in 
2387 \family typewriter
2388 example_raw.lyx
2389 \end_layout
2390
2391 \begin_layout Section
2392 Labels and Cross-References
2393 \end_layout
2394
2395 \begin_layout Standard
2396 \begin_inset LatexCommand label
2397 name "sec:labels"
2398
2399 \end_inset
2400
2401 You can label a section (or subsubsection, or, more rarely, just a random
2402  piece of text) in your document.
2403  Once you do so, you can refer to this section in other parts of the document,
2404  using cross-references.
2405  You can refer either to the section's number, or to the page that the section
2406  appears on.
2407  As with sections and footnotes, LyX worries about the cross-references
2408  for you.
2409  Automatic labels and cross-references are one of the best advantages of
2410  LyX (and LaTeX) over conventional word processors.
2411 \end_layout
2412
2413 \begin_layout Subsection*
2414 Your first label
2415 \end_layout
2416
2417 \begin_layout Standard
2418 Let's mark our second section, whose title is 
2419 \begin_inset Quotes eld
2420 \end_inset
2421
2422 About This Document
2423 \begin_inset Quotes erd
2424 \end_inset
2425
2426 .
2427  Click at the end of the section title line, and select 
2428 \family sans
2429 \bar under
2430 I
2431 \bar default
2432 nsert\SpecialChar \menuseparator
2433
2434 \bar under
2435 L
2436 \bar default
2437 abel
2438 \family default
2439 .
2440  A dialog asks you for a label name, and gives you a suggestion.
2441  When you click on 
2442 \family sans
2443 OK
2444 \family default
2445 , the label name will be placed in a box next to the section title.
2446 \end_layout
2447
2448 \begin_layout Standard
2449 By the way, you could have put the label right anywhere within the section
2450  as well; section references will refer to the last section or subsection
2451  whose heading comes before the label.
2452  However, putting it on the same line as the section title (or, perhaps,
2453  on the first line of the section's text) ensures that page references will
2454  reference the beginning of the section.
2455 \end_layout
2456
2457 \begin_layout Standard
2458 So far you haven't done anything --- the 
2459 \family typewriter
2460 dvi
2461 \family default
2462  file will look exactly the same, since labels don't show up in the printed
2463  document.
2464  However, now that you've added a label, you can refer to that label with
2465  cross-references.
2466  We'll do that next.
2467 \end_layout
2468
2469 \begin_layout Subsection*
2470 Your first cross-references
2471 \end_layout
2472
2473 \begin_layout Standard
2474 Place the cursor somewhere in Section\InsetSpace ~
2475 2 of your document.
2476  Type 
2477 \end_layout
2478
2479 \begin_layout LyX-Code
2480 If you want to know more about this document, then see 
2481 \newline
2482 Section , which can
2483  be found on page .
2484 \end_layout
2485
2486 \begin_layout Standard
2487 Now --- with the cursor after the word 
2488 \begin_inset Quotes eld
2489 \end_inset
2490
2491 section
2492 \begin_inset Quotes erd
2493 \end_inset
2494
2495  --- choose 
2496 \family sans
2497 \bar under
2498 I
2499 \bar default
2500 nsert\SpecialChar \menuseparator
2501 Cross\InsetSpace ~
2502
2503 \bar under
2504 R
2505 \bar default
2506 eference
2507 \family default
2508 .
2509  The 
2510 \family sans
2511 Reference
2512 \family default
2513  dialog pops up.
2514  It shows a list of the possible labels you can reference.
2515  At the moment, there should be only one, 
2516 \begin_inset Quotes eld
2517 \end_inset
2518
2519 sec:aboutdocument
2520 \begin_inset Quotes erd
2521 \end_inset
2522
2523 .
2524  Select it (it may be selected by default), and click 
2525 \family sans
2526 Apply
2527 \family default
2528 .
2529  Now put the cursor after the word 
2530 \begin_inset Quotes eld
2531 \end_inset
2532
2533 page
2534 \begin_inset Quotes erd
2535 \end_inset
2536
2537 , and change the reference type to use the page number then click 
2538 \family sans
2539 Apply
2540 \family default
2541 .
2542  (To be really correct, you should put a 
2543 \family sans
2544 Protected\InsetSpace ~
2545 Blank
2546 \family default
2547  in between the word 
2548 \begin_inset Quotes eld
2549 \end_inset
2550
2551 Section
2552 \begin_inset Quotes erd
2553 \end_inset
2554
2555  and the reference.
2556  Same for the page reference.)
2557 \end_layout
2558
2559 \begin_layout Standard
2560 LyX puts the references in a box right where the cursor was.
2561  In the printed document, this reference marker will be replaced with either
2562  the page or section number (depending on what you selected in the 
2563 \family sans
2564 Reference
2565 \family default
2566  dialog).
2567  Use 
2568 \family sans
2569 \bar under
2570 V
2571 \bar default
2572 iew\SpecialChar \menuseparator
2573
2574 \bar under
2575 U
2576 \bar default
2577 pdate\SpecialChar \menuseparator
2578
2579 \bar under
2580 D
2581 \bar default
2582 VI
2583 \family default
2584 , and you'll see that on the last page we refer to 
2585 \begin_inset Quotes eld
2586 \end_inset
2587
2588 Section\InsetSpace ~
2589 2
2590 \begin_inset Quotes erd
2591 \end_inset
2592
2593  and 
2594 \begin_inset Quotes eld
2595 \end_inset
2596
2597 Page\InsetSpace ~
2598 1
2599 \begin_inset Quotes erd
2600 \end_inset
2601
2602  (or whatever page Section\InsetSpace ~
2603 2's title is on).
2604 \end_layout
2605
2606 \begin_layout Standard
2607 Conveniently, a cross-reference acts as a hyperlink when you're editing
2608  a document in LyX; clicking on it will pop up the 
2609 \family sans
2610 Reference
2611 \family default
2612  dialog, clicking 
2613 \family sans
2614 Go\InsetSpace ~
2615 to\InsetSpace ~
2616 Label
2617 \family default
2618  will move the cursor to the referenced label.
2619 \end_layout
2620
2621 \begin_layout Subsection*
2622 More fun with labels
2623 \end_layout
2624
2625 \begin_layout Standard
2626 We told you that LyX worries about numbering cross-references; now you can
2627  test that.
2628  Add a new section before Section\InsetSpace ~
2629 2.
2630  Now rerun LaTeX, and --- voilà! --- the section cross reference changed
2631  to 
2632 \begin_inset Quotes eld
2633 \end_inset
2634
2635 3
2636 \begin_inset Quotes erd
2637 \end_inset
2638
2639 ! Change 
2640 \begin_inset Quotes eld
2641 \end_inset
2642
2643 About this Document
2644 \begin_inset Quotes erd
2645 \end_inset
2646
2647  to a subsection, and the cross-reference will reference Subsection\InsetSpace ~
2648 2.1 instead
2649  of Section\InsetSpace ~
2650 3.
2651  The page reference won't change unless you add a whole page of text before
2652  the label, of course.
2653  
2654 \end_layout
2655
2656 \begin_layout Standard
2657 If you want some more practice with labels, then try putting a new label
2658  where your first cross-reference was, and refer to that label from elsewhere
2659  in the document.
2660  If you'll be inserting cross-references often (if, for example, you're
2661  writing a journal article), it may be convenient to leave the 
2662 \family sans
2663 Reference
2664 \family default
2665  dialog open.
2666 \end_layout
2667
2668 \begin_layout Standard
2669 If you want to make sure that the cross-referencing gets the pages right
2670  even for larger documents, 
2671 \family sans
2672 Copy
2673 \family default
2674  a couple pages of text from the 
2675 \emph on
2676 User's Guide
2677 \emph default
2678  to the clipboard, and 
2679 \family sans
2680 Paste
2681 \family default
2682  the stolen text into your document
2683 \begin_inset Foot
2684 status collapsed
2685
2686 \begin_layout Standard
2687 By the way, copying a chapter title may cause an error, because chapters
2688  aren't allowed in the article class.
2689  If this happens, just delete the chapter title.
2690  If you want to know why this happens, see Section\InsetSpace ~
2691
2692 \begin_inset LatexCommand ref
2693 reference "sec:textclasses"
2694
2695 \end_inset
2696
2697 .
2698  
2699 \end_layout
2700
2701 \end_inset
2702
2703 .
2704 \end_layout
2705
2706 \begin_layout Standard
2707
2708 \series bold
2709 Exercise
2710 \series default
2711 : Fix the references in 
2712 \family typewriter
2713 example_raw.lyx
2714 \end_layout
2715
2716 \begin_layout Section
2717 Footnotes and Margin Notes
2718 \end_layout
2719
2720 \begin_layout Standard
2721 Footnotes can be added using the 
2722 \family sans
2723 Insert\InsetSpace ~
2724 Footnote
2725 \family default
2726  button in the toolbar
2727 \begin_inset Foot
2728 status collapsed
2729
2730 \begin_layout Standard
2731 The button shows an arrow pointing to red text, which is just below some
2732  black text.
2733 \end_layout
2734
2735 \end_inset
2736
2737  or 
2738 \family sans
2739 \bar under
2740 I
2741 \bar default
2742 nsert\SpecialChar \menuseparator
2743
2744 \bar under
2745 F
2746 \bar default
2747 ootnote
2748 \family default
2749 \SpecialChar \@.
2750  Click at the end of the word 
2751 \begin_inset Quotes eld
2752 \end_inset
2753
2754 LyX
2755 \begin_inset Quotes erd
2756 \end_inset
2757
2758  somewhere in your document and hit the 
2759 \family sans
2760 Insert\InsetSpace ~
2761 Footnote
2762 \family default
2763  button.
2764  A footnote box appears where you can enter the text of the footnote.
2765  LyX should place the cursor at the beginning of the footnote box.
2766  Type
2767 \end_layout
2768
2769 \begin_layout LyX-Code
2770 LyX is a typesetting word processor.
2771 \end_layout
2772
2773 \begin_layout Standard
2774 Now click on the button labelled 
2775 \begin_inset Quotes eld
2776 \end_inset
2777
2778 foot.
2779 \begin_inset Quotes erd
2780 \end_inset
2781
2782  The footnote box disappears, leaving the button showing where the footnote
2783  marker will be in the printed text; this is called 
2784 \begin_inset Quotes eld
2785 \end_inset
2786
2787 folding
2788 \begin_inset Quotes erd
2789 \end_inset
2790
2791  the footnote.
2792  You can unfold the footnote at any time --- and re-edit its text, if you
2793  want --- by clicking again on the 
2794 \begin_inset Quotes eld
2795 \end_inset
2796
2797 foot
2798 \begin_inset Quotes erd
2799 \end_inset
2800
2801  button.
2802 \end_layout
2803
2804 \begin_layout Standard
2805 You may wonder why the footnote button is a word instead of a number.
2806  The answer is that LyX worries about the footnote numbering for you in
2807  the printed text.
2808  You can see this yourself by looking at the 
2809 \family typewriter
2810 dvi
2811 \family default
2812  file (or printout).
2813  If you add other footnotes, LyX will renumber the footnotes.
2814  Since LyX (well, LaTeX, actually) takes care of the footnote numbering,
2815  there's really no need to put the numbers in the LyX file.
2816 \end_layout
2817
2818 \begin_layout Standard
2819 A footnote can be cut and pasted like normal text.
2820  Go ahead; try it! All you need to do is select the footnote button
2821 \begin_inset Foot
2822 status collapsed
2823
2824 \begin_layout Standard
2825 It may be easier to select it using the keyboard.
2826  You might accidentally open the footnote if you're trying to select the
2827  marker itself with the mouse.
2828 \end_layout
2829
2830 \end_inset
2831
2832  and 
2833 \family sans
2834 Cut
2835 \family default
2836  and 
2837 \family sans
2838 Paste
2839 \family default
2840  it.
2841  In addition, you can change regular text to a footnote, by selecting it
2842  and hitting the 
2843 \family sans
2844 Insert\InsetSpace ~
2845 Footnote
2846 \family default
2847  button; change a footnote to regular text by hitting the 
2848 \family sans
2849 Backspace
2850 \family default
2851  key when the cursor is in the first position of a footnote, or by hitting
2852  the 
2853 \family sans
2854 Delete
2855 \family default
2856  key when the cursor is in the very last position of the footnote, respectively.
2857 \end_layout
2858
2859 \begin_layout Standard
2860 Margin notes can be added using the toolbar button (the button shows an
2861  arrow pointing to red text next to (i.e., in the margin of) black text, and
2862  should be next to the 
2863 \family sans
2864 Insert\InsetSpace ~
2865 Footnote
2866 \family default
2867  button in the toolbar.) or 
2868 \family sans
2869 \bar under
2870 I
2871 \bar default
2872 nsert\SpecialChar \menuseparator
2873
2874 \bar under
2875 M
2876 \bar default
2877 arginal\InsetSpace ~
2878 Note
2879 \family default
2880 \SpecialChar \@.
2881  Margin notes are like footnotes, except that: 
2882 \end_layout
2883
2884 \begin_layout Itemize
2885 the on-screen boxes say 
2886 \begin_inset Quotes eld
2887 \end_inset
2888
2889 margin
2890 \begin_inset Quotes erd
2891 \end_inset
2892
2893  instead of 
2894 \begin_inset Quotes eld
2895 \end_inset
2896
2897 foot
2898 \begin_inset Quotes erd
2899 \end_inset
2900
2901
2902 \end_layout
2903
2904 \begin_layout Itemize
2905 the notes will be placed in the margin, instead of below the text 
2906 \end_layout
2907
2908 \begin_layout Itemize
2909 margin notes are not numbered
2910 \end_layout
2911
2912 \begin_layout Standard
2913 Change your LyX footnote back to text, then select and change it to a margin
2914  note.
2915  Run LaTeX again to see what the margin note looks like.
2916 \end_layout
2917
2918 \begin_layout Standard
2919
2920 \series bold
2921 Exercise
2922 \series default
2923 : Fix the footnote in 
2924 \family typewriter
2925 example_raw.lyx
2926 \end_layout
2927
2928 \begin_layout Section
2929 Bibliographies
2930 \end_layout
2931
2932 \begin_layout Standard
2933 \begin_inset LatexCommand label
2934 name "sec:bibliographies"
2935
2936 \end_inset
2937
2938 Bibliographies (at least in the exact sciences) are similar to cross references.
2939  The bibliography contains a list of references at the end of the document,
2940  and they can be referenced from within the document.
2941  Like section titles, LyX and LaTeX make your job easier by automatically
2942  numbering the bibliography items and changing citations when the items'
2943  numbers change.
2944 \end_layout
2945
2946 \begin_layout Standard
2947 Go to the end of the document and switch to the 
2948 \family sans
2949 Bibliography
2950 \family default
2951  environment.
2952  Now, each paragraph you type will be a reference.
2953  Type 
2954 \family typewriter
2955 The Lyx Tutorial, by the LyX Documentation Team
2956 \family default
2957  as your first reference.
2958  Note that LyX automatically puts a number in a box before each reference.
2959  Click on the boxed reference number, and a 
2960 \family sans
2961 Bibliography\InsetSpace ~
2962 item
2963 \family default
2964  dialog box appears.
2965  You use the first field, the 
2966 \family sans
2967 Key
2968 \family default
2969 , to refer to this reference within the LyX document.
2970  By default, it is a number.
2971  Change the 
2972 \family sans
2973 Key
2974 \family default
2975  field to 
2976 \begin_inset Quotes eld
2977 \end_inset
2978
2979 lyxtutorial
2980 \begin_inset Quotes erd
2981 \end_inset
2982
2983  to make it easy to remember.
2984 \end_layout
2985
2986 \begin_layout Standard
2987 Now pick somewhere in your document that you would like to insert a reference.
2988  Do so with 
2989 \family sans
2990 \bar under
2991 I
2992 \bar default
2993 nsert\SpecialChar \menuseparator
2994
2995 \bar under
2996 C
2997 \bar default
2998 itation
2999 \family default
3000 .
3001  A 
3002 \family sans
3003 Citation
3004 \family default
3005  dialog appears.
3006  The right panel in this dialog lists all the bibliography entries, and
3007  this field allows you to choose which bibliography item you want to cite.
3008  Select 
3009 \begin_inset Quotes eld
3010 \end_inset
3011
3012 lyxtutorial
3013 \begin_inset Quotes erd
3014 \end_inset
3015
3016  (right now, that's the only item in the bibliography), then use the left
3017  arrow in the center to insert it.
3018  (You can have multiple citations in the same place by transferring a number
3019  of keys this way.) Now run LaTeX, and you'll see that the citation appears
3020  in brackets in the text, referring to the bibliography at the end of the
3021  document.
3022 \end_layout
3023
3024 \begin_layout Standard
3025 How are the other fields used? The 
3026 \family sans
3027 \bar under
3028 T
3029 \bar default
3030 ext\InsetSpace ~
3031 after
3032 \family default
3033  field in the 
3034 \family sans
3035 Citation
3036 \family default
3037  dialog will put a remark (such as a reference to a page or chapter within
3038  the referenced book or article) in the brackets after the reference.
3039  If you want the references to have labels instead of numbers in the printed
3040  output (for example, some journals would use 
3041 \begin_inset Quotes eld
3042 \end_inset
3043
3044 [Smi95]
3045 \begin_inset Quotes erd
3046 \end_inset
3047
3048  to refer to a paper written by Smith in 1995), use the 
3049 \family sans
3050 \bar under
3051 L
3052 \bar default
3053 abel
3054 \family default
3055  field in the 
3056 \family sans
3057 Bibliography\InsetSpace ~
3058 Entry\InsetSpace ~
3059 Settings
3060 \family default
3061  dialog.
3062  As usual, you can see the 
3063 \emph on
3064 User's Guide
3065 \emph default
3066  for details.
3067 \end_layout
3068
3069 \begin_layout Standard
3070
3071 \series bold
3072 Exercise:
3073 \series default
3074  Fix the bibliography and citation in 
3075 \family typewriter
3076 example_raw.lyx
3077 \end_layout
3078
3079 \begin_layout Section
3080 Table of Contents
3081 \end_layout
3082
3083 \begin_layout Standard
3084 You may want to put a table of contents at the beginning of your document.
3085  LyX makes this very easy to do.
3086  Just hit 
3087 \family sans
3088 Return
3089 \family default
3090  after your document title and before your first section title and choose
3091  
3092 \family sans
3093 \bar under
3094 I
3095 \bar default
3096 nsert\SpecialChar \menuseparator
3097 List\InsetSpace ~
3098 /\InsetSpace ~
3099 T
3100 \bar under
3101 O
3102 \bar default
3103 C\SpecialChar \menuseparator
3104 Table\InsetSpace ~
3105 of\InsetSpace ~
3106
3107 \bar under
3108 C
3109 \bar default
3110 ontents
3111 \family default
3112 .
3113  The words 
3114 \begin_inset Quotes eld
3115 \end_inset
3116
3117 Table of Contents
3118 \begin_inset Quotes erd
3119 \end_inset
3120
3121  will appear in a button on the first line of the document.
3122  
3123 \end_layout
3124
3125 \begin_layout Standard
3126 This may not appear to be very useful.
3127  However, if you look at your 
3128 \family typewriter
3129 dvi
3130 \family default
3131  file, you will see that a table of contents has been generated, listing
3132  the various sections and subsections in your document.
3133  As usual, if you reorder sections or create new ones, you will see those
3134  changes in the 
3135 \family typewriter
3136 dvi
3137 \family default
3138  file when you update it.
3139  
3140 \end_layout
3141
3142 \begin_layout Standard
3143 The table of contents is not printed in the on-screen version of the document,
3144  because you can't edit it anyway.
3145  However, you can display the table of contents in a separate window by
3146  clicking on the table of contents button, or by using 
3147 \family sans
3148 \bar under
3149 D
3150 \bar default
3151 ocument\SpecialChar \menuseparator
3152
3153 \bar under
3154 T
3155 \bar default
3156 able\InsetSpace ~
3157 of\InsetSpace ~
3158 Contents
3159 \family default
3160 .
3161  The menu command will work even if you don't have a table of contents inset
3162  in your document.
3163  This is a very useful tool.
3164  You can use the 
3165 \family sans
3166 Table\InsetSpace ~
3167 of\InsetSpace ~
3168 Contents
3169 \family default
3170  window to move around your document.
3171  Clicking on a (sub)section title in the 
3172 \family sans
3173 Table\InsetSpace ~
3174 of\InsetSpace ~
3175 Contents
3176 \family default
3177  window will highlight that line and move the cursor (in the LyX editing
3178  window) to that place in the document.
3179  You can also use the arrow keys to move up and down in the table of contents.
3180  You may therefore find it convenient to leave this window open throughout
3181  editing sessions.
3182  You can get similar functionality from the 
3183 \family sans
3184 \bar under
3185 N
3186 \bar default
3187 avigate
3188 \family default
3189  menu, though, where the table of contents appears automatically.
3190 \end_layout
3191
3192 \begin_layout Standard
3193 To get rid of the Table of Contents, you can delete the table of contents
3194  button just like any other text.
3195 \end_layout
3196
3197 \begin_layout Standard
3198
3199 \series bold
3200 Exercise
3201 \series default
3202 : Fix the table of contents in 
3203 \family typewriter
3204 example_raw.lyx
3205 \end_layout
3206
3207 \begin_layout Chapter
3208 Using Math
3209 \end_layout
3210
3211 \begin_layout Standard
3212 LaTeX is used by many scientists because it outputs great looking equations,
3213  avoiding the control characters used by word processors and their equation
3214  editors.
3215  Many of these scientists are frustrated, however, because writing equations
3216  in LaTeX is more like programming than writing.
3217  Happily, LyX has WYSIWYM support for equations.
3218  If you are used to LaTeX, you'll find that all of the usual LaTeX math
3219  commands can be typed in normally, but they will show up in a WYSIWYM fashion.
3220  If, on the other hand, you've never written in LaTeX, then the 
3221 \family sans
3222 Math\InsetSpace ~
3223 Panel
3224 \family default
3225  will allow you to write professional-looking math quickly and easily
3226 \begin_inset Foot
3227 status collapsed
3228
3229 \begin_layout Standard
3230 LyX can't check if the math you're writing is actually 
3231 \emph on
3232 correct
3233 \emph default
3234 .
3235  Sorry.
3236 \end_layout
3237
3238 \end_inset
3239
3240 .
3241 \end_layout
3242
3243 \begin_layout Section
3244 Math Mode
3245 \end_layout
3246
3247 \begin_layout Standard
3248 Somewhere in your LyX document, type: 
3249 \end_layout
3250
3251 \begin_layout LyX-Code
3252 I like what Einstein said, E=mc^2, because it's so simple.
3253  
3254 \end_layout
3255
3256 \begin_layout Standard
3257 Now, that equation doesn't look very good, even in the 
3258 \family typewriter
3259 dvi
3260 \family default
3261  file; there's no space between the letters and the equals sign, and you'd
3262  like to write an actual superscript for the 
3263 \begin_inset Quotes eld
3264 \end_inset
3265
3266 2
3267 \begin_inset Quotes erd
3268 \end_inset
3269
3270 .
3271  That bad typesetting happened because we didn't tell LyX that we were writing
3272  a mathematical expression, so it typeset the equation like regular old
3273  text.
3274 \end_layout
3275
3276 \begin_layout Standard
3277 Instead, we create a formula that will get typeset properly.
3278  In order to create a formula, just click the toolbar button with 
3279 \begin_inset Formula $\frac{a+b}{c}$
3280 \end_inset
3281
3282  written on it in blue.
3283  LyX will insert a little blue square, which is an empty math formula.
3284  LyX has placed the cursor in the blue square, so just type 
3285 \family typewriter
3286 E=mc^2
3287 \family default
3288  again.
3289  The expression is typed in blue, and the blue square disappears as soon
3290  as the formula is not empty.
3291  Now type 
3292 \family sans
3293 Esc
3294 \family default
3295  to leave the equation The purple markers disappear, leaving the cursor
3296  to the right of the expression, and now if you type something, it will
3297  be regular text.
3298 \end_layout
3299
3300 \begin_layout Standard
3301 Run LaTeX and look at the 
3302 \family typewriter
3303 dvi
3304 \family default
3305  file.
3306  Notice that the expression was typeset nicely, with spaces between the
3307  letters and the equals sign, and a superscript 
3308 \begin_inset Quotes eld
3309 \end_inset
3310
3311 2
3312 \begin_inset Quotes erd
3313 \end_inset
3314
3315 .
3316  Letters in math mode are assumed to be variables, and come out in italics.
3317  Numbers are just numbers.
3318 \end_layout
3319
3320 \begin_layout Standard
3321 This math editor is another example of the WYSIWYM philosophy.
3322  In LaTeX, you write a mathematical expression using text and commands like
3323  
3324 \family typewriter
3325
3326 \backslash
3327 sqrt
3328 \family default
3329 ; this can be frustrating, because you can't see what an expression looks
3330  like until you LaTeX the file, and may have to spend time to find missing
3331  brackets or other 
3332 \begin_inset Quotes eld
3333 \end_inset
3334
3335 bugs
3336 \begin_inset Quotes erd
3337 \end_inset
3338
3339 .
3340  On the other hand, LyX doesn't attempt to get the expression to look perfect
3341  (WYSIWYG), but it gives you an extremely good idea of what the expression
3342  will look like.
3343  LaTeX then takes care of the professional typesetting.
3344  99% of the time, you won't have to make any changes to the font sizes or
3345  spacing that LaTeX outputs.
3346  This way (sorry to be so repetitive) you can focus on the 
3347 \emph on
3348 content
3349 \emph default
3350  of your mathematical expressions, not their format.
3351 \end_layout
3352
3353 \begin_layout Section
3354 Navigating an Equation
3355 \end_layout
3356
3357 \begin_layout Standard
3358 Now let's change 
3359 \begin_inset Formula $E=mc^{2}$
3360 \end_inset
3361
3362  to 
3363 \begin_inset Formula $E=1+mc^{2}$
3364 \end_inset
3365
3366 .
3367  Use the arrow keys to move the cursor into the expression.
3368  Note that when you enter the expression, the purple markers appear to let
3369  you know you're editing math.
3370  Now you can use 
3371 \family sans
3372 Left
3373 \family default
3374  and 
3375 \family sans
3376 Right
3377 \family default
3378  to move the cursor past the equals sign, and just type 
3379 \begin_inset Quotes eld
3380 \end_inset
3381
3382 1+
3383 \begin_inset Quotes erd
3384 \end_inset
3385
3386 .
3387  Again, you can use the arrow keys or 
3388 \family sans
3389 Esc
3390 \family default
3391  to leave the formula\SpecialChar \@.
3392
3393 \end_layout
3394
3395 \begin_layout Standard
3396 Other than the special keys described below, typing in math mode is like
3397  editing regular text.
3398  Use 
3399 \family sans
3400 Delete
3401 \family default
3402  (or 
3403 \family sans
3404 Backspace
3405 \family default
3406 ) to delete things.
3407  Select text either with the arrow keys or with the mouse.
3408  
3409 \family sans
3410 \bar under
3411 E
3412 \bar default
3413 dit\SpecialChar \menuseparator
3414
3415 \bar under
3416 U
3417 \bar default
3418 ndo
3419 \family default
3420  works in math mode, as does cutting and pasting.
3421  One thing to be careful of: if you're right outside a formula and you type
3422  
3423 \family sans
3424 Delete
3425 \family default
3426  (or 
3427 \family sans
3428 Backspace
3429 \family default
3430 ), it will delete the whole expression.
3431  Luckily, you can just use 
3432 \family sans
3433 Undo
3434 \family default
3435  to get it back.
3436 \end_layout
3437
3438 \begin_layout Standard
3439 What if you want to change 
3440 \begin_inset Formula $E=mc^{2}$
3441 \end_inset
3442
3443  to 
3444 \begin_inset Formula $E=mc^{2.5}+1$
3445 \end_inset
3446
3447 ? Again, you can use the mouse to click in the right place.
3448  However, you can also use the arrow keys.
3449  If the cursor is just after the 
3450 \begin_inset Quotes eld
3451 \end_inset
3452
3453 c
3454 \begin_inset Quotes erd
3455 \end_inset
3456
3457  but before the 
3458 \begin_inset Quotes eld
3459 \end_inset
3460
3461 2
3462 \begin_inset Quotes erd
3463 \end_inset
3464
3465 , then typing 
3466 \family sans
3467 Up
3468 \family default
3469  will move the cursor to the level of the superscript, just before the 
3470 \begin_inset Quotes eld
3471 \end_inset
3472
3473 2
3474 \begin_inset Quotes erd
3475 \end_inset
3476
3477 .
3478  Add the 
3479 \begin_inset Quotes eld
3480 \end_inset
3481
3482 .5
3483 \begin_inset Quotes erd
3484 \end_inset
3485
3486 .
3487  Now, hitting 
3488 \family sans
3489 Down
3490 \family default
3491  will move the cursor back to the regular level.
3492  In fact, if you hit 
3493 \family sans
3494 Down
3495 \family default
3496  from anywhere within the superscript, the cursor will be placed just 
3497 \emph on
3498 after
3499 \emph default
3500  the superscript (so that you can then type the 
3501 \begin_inset Quotes eld
3502 \end_inset
3503
3504 +1
3505 \begin_inset Quotes erd
3506 \end_inset
3507
3508 ).
3509 \end_layout
3510
3511 \begin_layout Section
3512 Exponents and Indices
3513 \end_layout
3514
3515 \begin_layout Standard
3516 An exponent can be entered from the 
3517 \family sans
3518 Math\InsetSpace ~
3519 Panel
3520 \family default
3521  (see below), but it's actually simpler just to type the caret key, 
3522 \begin_inset Quotes eld
3523 \end_inset
3524
3525 ^
3526 \begin_inset Quotes erd
3527 \end_inset
3528
3529 .
3530  LyX will place another blue rectangle in the superscript, so that whatever
3531  you write next will be superscripted, and in a smaller font size.
3532  Everything you type until you hit a 
3533 \family sans
3534 Space
3535 \family default
3536  (or 
3537 \family sans
3538 Esc
3539 \family default
3540  to exit Mathed entirely) will be in the superscript.
3541 \end_layout
3542
3543 \begin_layout Standard
3544 Writing a subscript (index) is just as easy --- start one by typing the
3545  underscore key, 
3546 \begin_inset Quotes eld
3547 \end_inset
3548
3549 _
3550 \begin_inset Quotes eld
3551 \end_inset
3552
3553 .
3554  You can subscript and superscript both subscripts and superscripts like
3555  this: 
3556 \begin_inset Formula $A_{a_{0}+b^{2}}+C^{a_{0}+b^{2}}$
3557 \end_inset
3558
3559 .
3560  
3561 \end_layout
3562
3563 \begin_layout Standard
3564
3565 \series bold
3566 Exercise
3567 \series default
3568 : Put equation 1 of 
3569 \family typewriter
3570 example_raw.lyx
3571 \family default
3572  into math mode.
3573 \end_layout
3574
3575 \begin_layout Section
3576 The 
3577 \family sans
3578 Math Panel
3579 \end_layout
3580
3581 \begin_layout Standard
3582 The 
3583 \family sans
3584 Math\InsetSpace ~
3585 Panel
3586 \family default
3587  is a convenient way to enter symbols or to perform many complicated Mathed
3588  functions.
3589  Many of these functions can be accomplished from the keyboard or the 
3590 \family sans
3591 \bar under
3592 E
3593 \bar default
3594 dit\SpecialChar \menuseparator
3595
3596 \bar under
3597 M
3598 \bar default
3599 ath
3600 \family default
3601  or 
3602 \family sans
3603 \bar under
3604 I
3605 \bar default
3606 nsert
3607 \bar under
3608 \SpecialChar \menuseparator
3609
3610 \bar default
3611 Mat
3612 \bar under
3613 h
3614 \family default
3615 \bar default
3616  menus.
3617  However, we're going to concentrate on using the 
3618 \family sans
3619 Math\InsetSpace ~
3620 Panel
3621 \family default
3622 , just to let you know what's out there; you can learn keyboard shortcuts
3623  later, from other manuals.
3624  So open it using 
3625 \family sans
3626 \bar under
3627 I
3628 \bar default
3629 nsert
3630 \bar under
3631 \SpecialChar \menuseparator
3632
3633 \bar default
3634 Mat
3635 \bar under
3636 h
3637 \bar default
3638 \SpecialChar \menuseparator
3639 Math\InsetSpace ~
3640 Pane
3641 \bar under
3642 l
3643 \family default
3644 \bar default
3645  now and leave it open while reading this section.
3646 \end_layout
3647
3648 \begin_layout Standard
3649 Right-clicking on a formula will open the 
3650 \family sans
3651 Math Panel
3652 \family default
3653  for you.
3654 \end_layout
3655
3656 \begin_layout Subsection
3657 Greek and symbols
3658 \end_layout
3659
3660 \begin_layout Standard
3661 The 
3662 \family sans
3663 Math\InsetSpace ~
3664 Panel
3665 \family default
3666  which allow you to choose from a large array of symbols used in math: various
3667  arrows, relations, operators, and sums and integrals.
3668  Note that subscripting and superscripting allow you to put lower and upper
3669  limits on sums and integrals.
3670  
3671 \end_layout
3672
3673 \begin_layout Standard
3674 \begin_inset Quotes eld
3675 \end_inset
3676
3677 Nothing you can do that can't be done\SpecialChar \ldots{}
3678  All you need is 
3679 \begin_inset Formula $\heartsuit$
3680 \end_inset
3681
3682 .
3683 \begin_inset Quotes erd
3684 \end_inset
3685
3686  
3687 \end_layout
3688
3689 \begin_layout Subsection
3690 Square roots, accents, and delimiters
3691 \end_layout
3692
3693 \begin_layout Standard
3694 To type a square root, just click on the button with a square root sign
3695  on it.
3696  The square root appears, and the cursor is in a new insertion point inside
3697  the square root.
3698  You can type variables, numbers, other square roots, fractions, whatever
3699  you want.
3700  LyX will automatically resize the square root to fit what's inside.
3701 \end_layout
3702
3703 \begin_layout Standard
3704 Accenting a character (
3705 \begin_inset Formula $\overrightarrow{v}$
3706 \end_inset
3707
3708 ) or group of characters (
3709 \begin_inset Formula $\overrightarrow{a+b}$
3710 \end_inset
3711
3712 ) is done the same way.
3713  The 
3714 \family sans
3715 Decoration
3716 \family default
3717  types are available from the panel.
3718  Click on a decoration, and LyX will insert that decoration with an insertion
3719  point under (or over) it.
3720  Just type what you want in the insertion point.
3721  There are two sets of decorations: those that resize with the text you
3722  type, and those that have fixed size, and are most appropriate for a single
3723  letter.
3724  
3725 \end_layout
3726
3727 \begin_layout Standard
3728 Delimiters such as parentheses, brackets, and braces work similarly, but
3729  are a bit more complicated.
3730  Hit the 
3731 \family sans
3732 Delimiter
3733 \family default
3734  button, which features a blue square surrounded by brackets, to pop up
3735  the 
3736 \family sans
3737 Delimiter
3738 \family default
3739  dialog.
3740  Your current selection of delimiters is displayed in a box.
3741  It's a pair of parentheses by default, but you can choose a pair of braces,
3742  a brace and a parenthesis, or even choose the empty square to have something
3743  like 
3744 \begin_inset Quotes eld
3745 \end_inset
3746
3747
3748 \begin_inset Formula $a=\left\langle 7\right.$
3749 \end_inset
3750
3751
3752 \begin_inset Quotes erd
3753 \end_inset
3754
3755  (the empty delimiter is displayed as a broken line in LyX, but won't show
3756  up in the output).
3757 \end_layout
3758
3759 \begin_layout Standard
3760 If you're lazy, you can type actual parentheses in math mode, rather than
3761  using the 
3762 \family sans
3763 Delimiter
3764 \family default
3765  window.
3766  However, those parentheses will be the same size as regular text, which
3767  will look bad if you have a big fraction or matrix inside the parentheses.
3768  Using the 
3769 \family sans
3770 Delimiter
3771 \family default
3772  window will guarantee that the delimiters are sized based on what's inside
3773  them.
3774 \end_layout
3775
3776 \begin_layout Standard
3777 You can also put delimiters or a square root sign or a decoration on already
3778  existing text.
3779  Select the portion of the formula that you want to adjust, and then click
3780  on the button you want from the 
3781 \family sans
3782 Math\InsetSpace ~
3783 Panel
3784 \family default
3785 .
3786  Try using this to change Newton's second law from scalar to vector form
3787  (
3788 \begin_inset Formula $f=ma$
3789 \end_inset
3790
3791  to 
3792 \begin_inset Formula $\overrightarrow{f}=m\overrightarrow{a}$
3793 \end_inset
3794
3795 ).
3796  Once you've learned about matrices, this is how you'll put parentheses
3797  or brackets around them.
3798 \end_layout
3799
3800 \begin_layout Subsection
3801 Fractions
3802 \end_layout
3803
3804 \begin_layout Standard
3805 Fractions are very simple in Mathed.
3806  Just click on the 
3807 \family sans
3808 Fraction
3809 \family default
3810  button in the 
3811 \family sans
3812 Math\InsetSpace ~
3813 Panel
3814 \family default
3815 , which shows a fraction with blue squares in the numerator and the denominator.
3816  LyX writes two insertion points in a fraction.
3817  As you would expect, you can use arrow keys or the mouse to move around
3818  a fraction.
3819  Click on the top square and type 
3820 \begin_inset Quotes eld
3821 \end_inset
3822
3823 1
3824 \begin_inset Quotes erd
3825 \end_inset
3826
3827 .
3828  Now hit 
3829 \family sans
3830 Down
3831 \family default
3832  and type 
3833 \begin_inset Quotes eld
3834 \end_inset
3835
3836 2
3837 \begin_inset Quotes erd
3838 \end_inset
3839
3840 .
3841  You've made a fraction! Of course you can type anything within each of
3842  the two boxes: variables with exponents, square roots, other fractions,
3843  whatever.
3844  
3845 \end_layout
3846
3847 \begin_layout Standard
3848
3849 \series bold
3850 Exercise
3851 \series default
3852 : Put equation 2 of 
3853 \family typewriter
3854 example_raw.lyx
3855 \family default
3856  into math mode.
3857 \end_layout
3858
3859 \begin_layout Subsection
3860 TeX mode: Limits, log, sin and others
3861 \end_layout
3862
3863 \begin_layout Standard
3864 Because letters in math mode are considered to be variables, if you type
3865  
3866 \begin_inset Quotes eld
3867 \end_inset
3868
3869 sin
3870 \begin_inset Quotes erd
3871 \end_inset
3872
3873  in math mode, LyX thinks you're typing the product of the three variables
3874  
3875 \begin_inset Formula $s$
3876 \end_inset
3877
3878
3879 \begin_inset Formula $i$
3880 \end_inset
3881
3882 , and 
3883 \begin_inset Formula $n$
3884 \end_inset
3885
3886 .
3887  The three letters will be typeset in italics, when what you really wanted
3888  was the word 
3889 \begin_inset Quotes eld
3890 \end_inset
3891
3892 sin
3893 \begin_inset Quotes erd
3894 \end_inset
3895
3896  typeset in Roman.
3897  In addition, LyX won't put a space between the word 
3898 \begin_inset Quotes eld
3899 \end_inset
3900
3901 sin
3902 \begin_inset Quotes erd
3903 \end_inset
3904
3905  and the 
3906 \begin_inset Quotes eld
3907 \end_inset
3908
3909 x
3910 \begin_inset Quotes erd
3911 \end_inset
3912
3913  (typing 
3914 \family sans
3915 Space
3916 \family default
3917  will just exit math mode).
3918  So how do you get 
3919 \begin_inset Quotes eld
3920 \end_inset
3921
3922
3923 \begin_inset Formula $\sin x$
3924 \end_inset
3925
3926
3927 \begin_inset Quotes erd
3928 \end_inset
3929
3930  instead of 
3931 \begin_inset Quotes eld
3932 \end_inset
3933
3934
3935 \begin_inset Formula $sinx$
3936 \end_inset
3937
3938
3939 \begin_inset Quotes erd
3940 \end_inset
3941
3942 ?
3943 \end_layout
3944
3945 \begin_layout Standard
3946 Click on 
3947 \begin_inset Quotes eld
3948 \end_inset
3949
3950 sin
3951 \begin_inset Quotes erd
3952 \end_inset
3953
3954  in the 
3955 \family sans
3956 Functions
3957 \family default
3958  list in the 
3959 \family sans
3960 Math\InsetSpace ~
3961 Panel
3962 \family default
3963 .
3964  The word 
3965 \begin_inset Quotes eld
3966 \end_inset
3967
3968 sin
3969 \begin_inset Quotes erd
3970 \end_inset
3971
3972  is written in black, in upright roman type.
3973  The whole word is treated as one symbol, so if you type 
3974 \family sans
3975 Backspace
3976 \family default
3977 , it will delete the whole word.
3978  Now type 
3979 \begin_inset Quotes eld
3980 \end_inset
3981
3982 x
3983 \begin_inset Quotes erd
3984 \end_inset
3985
3986 , which will be written in blue italics, like you expect in Mathed.
3987  In the 
3988 \family typewriter
3989 dvi
3990 \family default
3991  file, the expression will be correctly typeset.
3992  Try it.
3993 \end_layout
3994
3995 \begin_layout Standard
3996 Other commands you need to type in TeX mode using the 
3997 \family sans
3998 Functions
3999 \family default
4000  box include other trigonometric functions and their inverses, hyperbolic
4001  functions, logarithms, limits, and quite a few others.
4002  These functions can take subscripts and superscripts, important for typing
4003  
4004 \begin_inset Quotes eld
4005 \end_inset
4006
4007
4008 \begin_inset Formula $\cos^{2}\theta$
4009 \end_inset
4010
4011
4012 \begin_inset Quotes erd
4013 \end_inset
4014
4015  or 
4016 \begin_inset Quotes eld
4017 \end_inset
4018
4019
4020 \begin_inset Formula $\lim_{n\rightarrow\infty}$
4021 \end_inset
4022
4023
4024 \begin_inset Quotes erd
4025 \end_inset
4026
4027 .
4028 \end_layout
4029
4030 \begin_layout Standard
4031
4032 \series bold
4033 Exercise
4034 \series default
4035 : Put equation 3 of 
4036 \family typewriter
4037 example_raw.lyx
4038 \family default
4039  into math mode.
4040 \end_layout
4041
4042 \begin_layout Subsection
4043 Matrices
4044 \end_layout
4045
4046 \begin_layout Standard
4047 \begin_inset LatexCommand label
4048 name "sec:matrices"
4049
4050 \end_inset
4051
4052 Click on the 
4053 \family sans
4054 Matrix
4055 \family default
4056  button in the 
4057 \family sans
4058 Math\InsetSpace ~
4059 Panel
4060 \family default
4061 .
4062  The dialog has two sliding bars which allow you to choose how many rows
4063  and columns you want in your matrix.
4064  Choose 2 rows and 3 columns and hit 
4065 \family sans
4066 Apply
4067 \family default
4068  or 
4069 \family sans
4070 OK
4071 \family default
4072 .
4073  LyX prints 6 insertion points in a 
4074 \begin_inset Formula $2\times3$
4075 \end_inset
4076
4077  matrix.
4078  As usual, you can put any sort of Mathed expression (a square root, another
4079  matrix, etc.) in each insertion point.
4080  You can also leave some of the insertion points empty if you want.
4081 \end_layout
4082
4083 \begin_layout Standard
4084
4085 \family sans
4086 Tab
4087 \family default
4088  can be used to move horizontally between the columns of a matrix.
4089  Alternatively, you can use the arrow keys to move around - hitting 
4090 \family sans
4091 Right
4092 \family default
4093  at the end of one box will move to the next box, 
4094 \family sans
4095 Down
4096 \family default
4097  will move to the next row, etc.
4098 \end_layout
4099
4100 \begin_layout Standard
4101 If you suddenly need more rows or columns, use 
4102 \family sans
4103 \bar under
4104 E
4105 \bar default
4106 dit\SpecialChar \menuseparator
4107
4108 \bar under
4109 M
4110 \bar default
4111 ath\SpecialChar \menuseparator
4112 Add\InsetSpace ~
4113
4114 \bar under
4115 R
4116 \bar default
4117 ow
4118 \family default
4119  and 
4120 \family sans
4121 Add\InsetSpace ~
4122
4123 \bar under
4124 C
4125 \bar default
4126 olumn
4127 \family default
4128 .
4129  They add a row or column just after the current position.
4130  Overdid it? Use 
4131 \family sans
4132 \bar under
4133 D
4134 \bar default
4135 elete\InsetSpace ~
4136 Row
4137 \family default
4138  and 
4139 \family sans
4140 D
4141 \bar under
4142 e
4143 \bar default
4144 lete\InsetSpace ~
4145 Column
4146 \family default
4147  from the same menu.
4148 \end_layout
4149
4150 \begin_layout Standard
4151 See the 
4152 \emph on
4153 User's Guide
4154 \emph default
4155  for information on how to change the horizontal alignment of each column,
4156  and how to change the vertical position of the whole matrix.
4157  Note that if you want to write a table containing text, you should use
4158  LyX' wonderful table support, rather than trying to write text in a matrix.
4159 \end_layout
4160
4161 \begin_layout Subsection
4162 Display mode
4163 \end_layout
4164
4165 \begin_layout Standard
4166 All of the expressions we have written so far have been on the same line
4167  as the text that came before and after them, otherwise known as inline
4168  expressions.
4169  This is fine for short, simple expressions, but if you want to write larger
4170  ones, or if you want your expressions to stand out from the text, you need
4171  to write them in display mode.
4172  In addition, only displayed expressions can be labeled and numbered (see
4173  the 
4174 \emph on
4175 User's Guide
4176 \emph default
4177 ), and multi-line equations (see Sec.
4178  
4179 \begin_inset LatexCommand ref
4180 reference "sec:multiline"
4181
4182 \end_inset
4183
4184 ) must be in display mode.
4185 \end_layout
4186
4187 \begin_layout Standard
4188 Click on the 
4189 \family sans
4190 Display
4191 \family default
4192  button in the 
4193 \family sans
4194 Math\InsetSpace ~
4195 Panel
4196 \family default
4197 , which represents a couple lines of text before and after a centered blue
4198  box.
4199  LyX inserts a formula, but the insertion point is on a new line, and it's
4200  centered within that line.
4201  Now type an expression and run LaTeX to see how it looks.
4202  The 
4203 \family sans
4204 Display
4205 \family default
4206  button is actually a toggle; use it now to change a couple of your expressions
4207  to display mode and back.
4208  
4209 \end_layout
4210
4211 \begin_layout Standard
4212 Display mode has a couple differences from inline mode:
4213 \end_layout
4214
4215 \begin_layout Itemize
4216 The default font is larger for a few symbols, like 
4217 \begin_inset Formula $\sum$
4218 \end_inset
4219
4220  and 
4221 \begin_inset Formula $\int$
4222 \end_inset
4223
4224
4225 \end_layout
4226
4227 \begin_layout Itemize
4228 Subscripts and superscripts for limits and sums (but not integrals) are
4229  written under rather than next to the symbols
4230 \end_layout
4231
4232 \begin_layout Itemize
4233 Text is centered
4234 \end_layout
4235
4236 \begin_layout Standard
4237 Other than these differences, though, displayed expressions and inline expressio
4238 ns are very similar.
4239 \end_layout
4240
4241 \begin_layout Standard
4242 One final note about the way displayed formulae are typeset: be careful
4243  about whether you're putting your equation into a new paragraph or not.
4244  If your formula is in the middle of a sentence or paragraph, then don't
4245  press 
4246 \family sans
4247 Return
4248 \family default
4249 .
4250  Doing so will cause the text 
4251 \emph on
4252 after
4253 \emph default
4254  the formula to start a new paragraph.
4255  That text will therefore be indented, which is probably not what you want.
4256 \end_layout
4257
4258 \begin_layout Standard
4259
4260 \series bold
4261 Exercise
4262 \series default
4263 : Put the various equations in 
4264 \family typewriter
4265 example_raw.lyx
4266 \family default
4267  into display mode, and see how they're typeset differently.
4268 \end_layout
4269
4270 \begin_layout Standard
4271
4272 \series bold
4273 Exercise
4274 \series default
4275 : Using various tools you've learned in this section, you should be able
4276  to write an equation like
4277 \begin_inset Foot
4278 status collapsed
4279
4280 \begin_layout Standard
4281 After you've done it the hard way, why don't you give 
4282 \family sans
4283 \bar under
4284 I
4285 \bar default
4286 nsert\SpecialChar \menuseparator
4287 Mat
4288 \bar under
4289 h
4290 \bar default
4291 \SpecialChar \menuseparator
4292
4293 \bar under
4294 C
4295 \bar default
4296 ases\InsetSpace ~
4297 environment
4298 \family default
4299  a try?
4300 \end_layout
4301
4302 \end_inset
4303
4304
4305 \begin_inset Formula \[
4306 f(x)=\left\{ \begin{array}{cc}
4307 \log_{8}x & x>0\\
4308 0 & x=0\\
4309 \sum_{i=1}^{5}\alpha_{i}+\sqrt{-\frac{1}{x}} & x<0\end{array}\right.\]
4310
4311 \end_inset
4312
4313
4314 \end_layout
4315
4316 \begin_layout Section
4317 More Math Stuff
4318 \end_layout
4319
4320 \begin_layout Standard
4321 Mathed can do plenty more.
4322  By now, you're familiar with the basics, so we'll just refer to the 
4323 \emph on
4324 User's Guide
4325 \emph default
4326  for tips on how to:
4327 \end_layout
4328
4329 \begin_layout Itemize
4330 Labeling and numbering expressions
4331 \end_layout
4332
4333 \begin_layout Itemize
4334 Multi-line equations
4335 \end_layout
4336
4337 \begin_layout Itemize
4338 Change typefaces, e.g., to write bold-face text in an expression.
4339 \end_layout
4340
4341 \begin_layout Itemize
4342 Fine-tune font sizes and spacing within an expression.
4343  (Don't worry about this until your final draft!)
4344 \end_layout
4345
4346 \begin_layout Itemize
4347 Write macros.
4348  These are very powerful, because you just define them once at the top of
4349  the document, and then you can use them throughout the document.
4350  If you change the macro definition, the references to the macro will be
4351  changed throughout the document.
4352  Macros can even take arguments.
4353 \end_layout
4354
4355 \begin_layout Itemize
4356 Do lots of other things we didn't have time to mention in this 
4357 \emph on
4358 Tutorial
4359 \emph default
4360 .
4361 \end_layout
4362
4363 \begin_layout Chapter
4364 Miscellaneous
4365 \end_layout
4366
4367 \begin_layout Section
4368 Other Major LyX Features
4369 \end_layout
4370
4371 \begin_layout Standard
4372 We haven't gone through all the possible commands in LyX, and we aren't
4373  planning on it.
4374  As usual, see the 
4375 \emph on
4376 User's Guide
4377 \emph default
4378  for more information.
4379  We'll just mention a couple more major things LyX can do\SpecialChar \ldots{}
4380
4381 \end_layout
4382
4383 \begin_layout Itemize
4384 LyX has WYSIWYM support for tables.
4385  Use the 
4386 \family sans
4387 \bar under
4388 I
4389 \bar default
4390 nsert\SpecialChar \menuseparator
4391
4392 \bar under
4393 T
4394 \bar default
4395 able
4396 \family default
4397  to get a table.
4398  Click on the table with the 
4399 \emph on
4400 right button
4401 \emph default
4402  to get a 
4403 \family sans
4404 Table\InsetSpace ~
4405 Settings
4406 \family default
4407  dialog box which allows extensive table editing.
4408 \end_layout
4409
4410 \begin_layout Itemize
4411 LyX also supports including pictures in a number of formats (including JPEG
4412  and other bitmap formats, PostScript® and raw LaTeX) within documents.
4413  (You guessed it: 
4414 \family sans
4415 \bar under
4416 I
4417 \bar default
4418 nsert\SpecialChar \menuseparator
4419
4420 \bar under
4421 G
4422 \bar default
4423 raphics
4424 \family default
4425 .
4426  Then click on the figure to choose the file to include, rotate or scale
4427  it, etc.) Tables and figures can have captions, and LyX will automatically
4428  generate lists of figures and/or tables.
4429 \end_layout
4430
4431 \begin_layout Itemize
4432 Version control is supported, using RCS (
4433 \family typewriter
4434 man rcsintro
4435 \family default
4436  for more info).
4437 \end_layout
4438
4439 \begin_layout Itemize
4440 LyX is heavily configurable.
4441  Everything from how the LyX window looks to how the output comes out can
4442  be configured in a number of ways.
4443  Much configuration is done through 
4444 \family sans
4445 \bar under
4446 T
4447 \bar default
4448 ools\SpecialChar \menuseparator
4449
4450 \bar under
4451 P
4452 \bar default
4453 references
4454 \family default
4455 .
4456  For more information on this, check out 
4457 \family sans
4458 \bar under
4459 H
4460 \bar default
4461 elp\SpecialChar \menuseparator
4462
4463 \bar under
4464 C
4465 \bar default
4466 ustomization\SpecialChar \@.
4467
4468 \end_layout
4469
4470 \begin_layout Itemize
4471 LyX is being developed by a team of programmers on five continents.
4472  Therefore, LyX has better support for non-English languages (such as Dutch,
4473  German, French, Greek, Czech, Turkish, \SpecialChar \ldots{}
4474 ) than many word processors.
4475  Even some right-to-left languages like Hebrew or Arabic are supported.
4476  You can write documents in other languages, but you can also configure
4477  LyX to show its menus and error messages in other languages.
4478  
4479 \end_layout
4480
4481 \begin_layout Itemize
4482 The LyX menus feature keybindings.
4483  This means that you can do 
4484 \family sans
4485 \bar under
4486 F
4487 \bar default
4488 ile\SpecialChar \menuseparator
4489
4490 \bar under
4491 O
4492 \bar default
4493 pen
4494 \family default
4495  by typing 
4496 \family sans
4497 M-F
4498 \family default
4499  followed by 
4500 \family sans
4501 O
4502 \family default
4503  or by using the binding which is shown next to it in the menu (C-O by default).
4504  Keybindings are also configurable.
4505  For information on this, check out 
4506 \family sans
4507 \bar under
4508 H
4509 \bar default
4510 elp\SpecialChar \menuseparator
4511
4512 \bar under
4513 C
4514 \bar default
4515 ustomization\SpecialChar \@.
4516
4517 \end_layout
4518
4519 \begin_layout Itemize
4520 LyX can read in LaTeX documents.
4521  See Section\InsetSpace ~
4522
4523 \begin_inset LatexCommand ref
4524 reference "sec:tex2lyx"
4525
4526 \end_inset
4527
4528 .
4529 \end_layout
4530
4531 \begin_layout Itemize
4532 Spellchecking and thesaurus facilities are available.
4533 \end_layout
4534
4535 \begin_layout Itemize
4536 The text box near the bottom of the LyX window is called the minibuffer
4537  (after a similar feature in 
4538 \family typewriter
4539 emacs
4540 \family default
4541 ).
4542  This gives you access to all sorts of interesting functionality, including
4543  functionality which could break your document.
4544  In other words, don't type in the minibuffer unless you know what you're
4545  doing.
4546 \end_layout
4547
4548 \begin_layout Section
4549 LyX for LaTeX Users
4550 \end_layout
4551
4552 \begin_layout Standard
4553 \begin_inset LatexCommand label
4554 name "sec:latexusers"
4555
4556 \end_inset
4557
4558 If you don't know anything about LaTeX, you don't have to read this section.
4559  Actually, you might want to 
4560 \emph on
4561 learn
4562 \emph default
4563  about LaTeX, and then read this chapter.
4564  However, many people who begin to use LyX will be familiar with LaTeX.
4565  If you are such a person, you may be wondering if LyX can really do everything
4566  LaTeX can do.
4567  The short answer is that LyX can do pretty much everything LaTeX can do
4568  in one form or another, and it definitely simplifies most parts of writing
4569  a LaTeX document.
4570  The tool that is used to convert a LaTeX document to LyX was rewritten
4571  completely for LyX\InsetSpace ~
4572 1.4.
4573  It should now be able to handle most LaTeX gracefully.
4574 \end_layout
4575
4576 \begin_layout Standard
4577 Because this is just a tutorial, we are only going to mention things that
4578  new LyX users will most likely be interested in.
4579  In the interests of keeping the 
4580 \emph on
4581 Tutorial
4582 \emph default
4583  short, we will give only minimal information here.
4584  The 
4585 \emph on
4586 Extended Features
4587 \emph default
4588  manual, specifically the 
4589 \emph on
4590 Secrets of the LaTeX Masters
4591 \emph default
4592  chapter, has a great deal of information on differences between LyX and
4593  LaTeX, and how to do various LaTeX tricks in LyX.
4594 \end_layout
4595
4596 \begin_layout Subsection
4597 TeX Mode 
4598 \end_layout
4599
4600 \begin_layout Standard
4601 Anything that you enter in TeX mode will be passed straight to LaTeX, and
4602  will be displayed in red on the screen.
4603  You can use TeX commands in LyX by choosing 
4604 \family sans
4605 \bar under
4606 I
4607 \bar default
4608 nsert\SpecialChar \menuseparator
4609 Te
4610 \bar under
4611 X
4612 \bar default
4613 \InsetSpace ~
4614 Code
4615 \family default
4616 .
4617  This creates a text box, and everything within it is passed straight to
4618  LaTeX.
4619 \end_layout
4620
4621 \begin_layout Standard
4622 In a math formula, TeX mode is handled a bit differently.
4623  Enter TeX mode by typing a backslash.
4624  The backslash is not written out, but anything you type afterwards will
4625  be in red.
4626  You exit TeX mode by typing 
4627 \family sans
4628 Space
4629 \family default
4630  or some other non-alphabetic character, like a number, underscore, caret,
4631  or parenthesis.
4632  Once you exit TeX mode, if LyX knows the TeX command you've typed in, it
4633  will convert it to WYSIWYM\SpecialChar \@.
4634  So if, in a formula, you type 
4635 \family typewriter
4636
4637 \backslash
4638 gamma
4639 \family default
4640 , then when you type 
4641 \family sans
4642 Space
4643 \family default
4644 , LyX will change the red 
4645 \begin_inset Quotes eld
4646 \end_inset
4647
4648 gamma
4649 \begin_inset Quotes erd
4650 \end_inset
4651
4652  to a blue 
4653 \begin_inset Quotes eld
4654 \end_inset
4655
4656
4657 \begin_inset Formula $\gamma$
4658 \end_inset
4659
4660
4661 \begin_inset Quotes erd
4662 \end_inset
4663
4664 .
4665  This will work for almost all, non-complicated math macros.
4666  This may be faster than using the 
4667 \family sans
4668 Math\InsetSpace ~
4669 Panel
4670 \family default
4671 , and will be especially convenient for experienced LaTeX users.
4672 \end_layout
4673
4674 \begin_layout Standard
4675 As a special case, if you type a brace in TeX mode, then the beginning 
4676 \emph on
4677 and
4678 \emph default
4679  ending braces will be inserted in red, then take you 
4680 \emph on
4681 out
4682 \emph default
4683  of TeX mode and place the cursor between the braces.
4684  This makes it more convenient to type commands that LyX doesn't know which
4685  take an argument.
4686 \end_layout
4687
4688 \begin_layout Standard
4689 LyX can't do absolutely everything that LaTeX can do (yet?).
4690  Some fancy functions are not supported at all, while some work but aren't
4691  WYSIWYM.
4692  TeX mode allows users to get the full flexibility of LaTeX, while having
4693  all the convenient features of LyX, like WYSIWYM math, tables, and editing.
4694  LyX could never support every LaTeX package.
4695  However, by typing 
4696 \family typewriter
4697
4698 \backslash
4699 usepackage{foo}
4700 \family default
4701  in the preamble (see Section\InsetSpace ~
4702
4703 \begin_inset LatexCommand ref
4704 reference "sec:preamble"
4705
4706 \end_inset
4707
4708 ), you can use any package you want --- although you won't have WYSIWYM
4709  support for that package's features.
4710 \end_layout
4711
4712 \begin_layout Subsection
4713 Importing LaTeX Documents --- 
4714 \family typewriter
4715 tex2lyx
4716 \end_layout
4717
4718 \begin_layout Standard
4719 \begin_inset LatexCommand label
4720 name "sec:tex2lyx"
4721
4722 \end_inset
4723
4724 You can import a LaTeX file into LyX by using the 
4725 \family sans
4726 \bar under
4727 F
4728 \bar default
4729 ile\SpecialChar \menuseparator
4730
4731 \bar under
4732 I
4733 \bar default
4734 mport\SpecialChar \menuseparator
4735
4736 \bar under
4737 L
4738 \bar default
4739 aTeX
4740 \family default
4741  command in LyX.
4742  This will call 
4743 \family typewriter
4744 tex2lyx
4745 \family default
4746  which will create a file 
4747 \family typewriter
4748 foo.lyx
4749 \family default
4750  from the file 
4751 \family typewriter
4752 foo.tex
4753 \family default
4754  --- and then open that file.
4755  If the translation doesn't work, you can try calling 
4756 \family typewriter
4757 tex2lyx
4758 \family default
4759  from the command line, possibly using fancier options.
4760 \end_layout
4761
4762 \begin_layout Standard
4763
4764 \family typewriter
4765 tex2lyx
4766 \family default
4767  will translate most legal LaTeX, but not everything.
4768  It will leave things it doesn't understand in TeX mode, so after translating
4769  a file with 
4770 \family typewriter
4771 tex2lyx
4772 \family default
4773 , you can look for red text and hand-edit it to look right.
4774 \end_layout
4775
4776 \begin_layout Standard
4777
4778 \family typewriter
4779 tex2lyx
4780 \family default
4781  has its own manpage.
4782  Read it to find out about which LaTeX commands and environments aren't
4783  supported, bugs (and how to get around them), and how to use the various
4784  options.
4785 \end_layout
4786
4787 \begin_layout Subsection
4788 Converting LyX Documents to LaTeX
4789 \end_layout
4790
4791 \begin_layout Standard
4792 You might wish to convert a LyX Document to a LaTeX file.
4793  For example, a co-worker or co-author who doesn't have LyX might want to
4794  read it.
4795  This is very easy to do with LyX.
4796  Select 
4797 \family sans
4798 \bar under
4799 F
4800 \bar default
4801 ile\SpecialChar \menuseparator
4802
4803 \bar under
4804 E
4805 \bar default
4806 xport\SpecialChar \menuseparator
4807
4808 \bar under
4809 L
4810 \bar default
4811 aTeX
4812 \family default
4813 .
4814  This will create a file 
4815 \family typewriter
4816 whatever.tex
4817 \family default
4818  from the 
4819 \family typewriter
4820 whatever.lyx
4821 \family default
4822  file you are editing.
4823  LyX always creates temporary LaTeX files when viewing or printing files,
4824  so it is very good at generating LaTeX.
4825 \end_layout
4826
4827 \begin_layout Subsection
4828 LaTeX Preamble
4829 \end_layout
4830
4831 \begin_layout Subsubsection
4832 Document Class
4833 \end_layout
4834
4835 \begin_layout Standard
4836 The 
4837 \family sans
4838 \bar under
4839 D
4840 \bar default
4841 ocument\SpecialChar \menuseparator
4842
4843 \bar under
4844 S
4845 \bar default
4846 ettings
4847 \family default
4848  dialog takes care of many of the options that you would input in a 
4849 \family typewriter
4850
4851 \backslash
4852 documentclass
4853 \family default
4854  command.
4855  Change the class, default font size and paper size here.
4856  Put any extra options to the 
4857 \family typewriter
4858
4859 \backslash
4860 documentclass
4861 \family default
4862  command in the 
4863 \family sans
4864 E
4865 \bar under
4866 x
4867 \bar default
4868 tra\InsetSpace ~
4869 Options
4870 \family default
4871  area.
4872 \end_layout
4873
4874 \begin_layout Subsubsection
4875 Other Preamble Matter
4876 \end_layout
4877
4878 \begin_layout Standard
4879 \begin_inset LatexCommand label
4880 name "sec:preamble"
4881
4882 \end_inset
4883
4884 If you have special commands to put in the preamble of a LaTeX file, you
4885  can use them in a LyX document as well.
4886  Select 
4887 \family sans
4888 \bar under
4889 D
4890 \bar default
4891 ocument\SpecialChar \menuseparator
4892
4893 \bar under
4894 L
4895 \bar default
4896 aTeX\InsetSpace ~
4897
4898 \bar under
4899 P
4900 \bar default
4901 reamble
4902 \family default
4903  and type in the dialog window (or from the document settings dialog, depending
4904  on the frontend).
4905  Anything you type will (like with TeX mode) be sent directly to LaTeX.
4906 \end_layout
4907
4908 \begin_layout Subsection
4909 BibTeX
4910 \end_layout
4911
4912 \begin_layout Standard
4913 LyX has support for BibTeX, which allows you to build databases of bibliographic
4914 al references to be used in multiple documents.
4915  Select 
4916 \family sans
4917 \bar under
4918 I
4919 \bar default
4920 nsert\SpecialChar \menuseparator
4921 List\InsetSpace ~
4922 /\InsetSpace ~
4923 T
4924 \bar under
4925 O
4926 \bar default
4927 C\SpecialChar \menuseparator
4928
4929 \bar under
4930 B
4931 \bar default
4932 ibTeX\InsetSpace ~
4933 Reference
4934 \family default
4935  to include a 
4936 \family typewriter
4937 bib
4938 \family default
4939  file.
4940  Click on the resulting 
4941 \begin_inset Quotes eld
4942 \end_inset
4943
4944 BibTeX\InsetSpace ~
4945 Generated\InsetSpace ~
4946 References
4947 \begin_inset Quotes erd
4948 \end_inset
4949
4950  button, and you will get a 
4951 \family sans
4952 BibTeX
4953 \family default
4954  dialog.
4955  In the 
4956 \family sans
4957 Database
4958 \family default
4959  field, type what you would type inside the braces of a 
4960 \family typewriter
4961
4962 \backslash
4963 bibliography{}
4964 \family default
4965  command
4966 \begin_inset Foot
4967 status collapsed
4968
4969 \begin_layout Standard
4970 Like in regular LaTeX, multiple bibliographies should be separated by commas,
4971  with no whitespace.
4972 \end_layout
4973
4974 \end_inset
4975
4976 .
4977  Similarly, in the 
4978 \family sans
4979 Style
4980 \family default
4981  field, type what you would type inside the braces of a 
4982 \family typewriter
4983
4984 \backslash
4985 bibliographystyle{}
4986 \family default
4987  command.
4988 \end_layout
4989
4990 \begin_layout Standard
4991 After you've done this, you can use citations from any bibliographies you're
4992  including with 
4993 \family sans
4994 \bar under
4995 I
4996 \bar default
4997 nsert\SpecialChar \menuseparator
4998
4999 \bar under
5000 C
5001 \bar default
5002 itation
5003 \family default
5004  (see Section\InsetSpace ~
5005
5006 \begin_inset LatexCommand ref
5007 reference "sec:bibliographies"
5008
5009 \end_inset
5010
5011 ).
5012  LyX will take care of running BibTeX.
5013  The box in the 
5014 \family sans
5015 Citation
5016 \family default
5017  dialog will show a list of all the references in your 
5018 \family typewriter
5019 bib
5020 \family default
5021  file.
5022 \end_layout
5023
5024 \begin_layout Section
5025 Errors!
5026 \end_layout
5027
5028 \begin_layout Standard
5029 Sometimes when you LaTeX a document, there will be errors, things that LyX
5030  or LaTeX can't understand.
5031  When this happens, LyX will open a 
5032 \family sans
5033 LaTeX\InsetSpace ~
5034 Errors
5035 \family default
5036  dialog.
5037  Clicking on individual errors in this dialog will take you to the place
5038  in the LyX document where the error occurs and also display the detailed
5039  LaTeX error message.
5040 \end_layout
5041
5042 \end_body
5043 \end_document