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