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