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