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