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