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