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