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