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