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