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