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