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