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