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