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