]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
2c878c1abc2ee72cfd3edabc1d7e48e62f6c2adc
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38   L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
39   {LyX}}
40
41 % used for multi-column text
42 \usepackage{multicol}
43
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
46 \end_preamble
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
49 \begin_modules
50 logicalmkup
51 theorems-ams
52 theorems-ams-extended
53 \end_modules
54 \maintain_unincluded_children false
55 \begin_local_layout
56 Format 7
57 InsetLayout CharStyle:MenuItem
58 LyxType               charstyle
59 LabelString           menu
60 LatexType             command
61 LatexName             menuitem
62 Font
63 Family              Sans
64 EndFont
65 Preamble
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
67 EndPreamble
68 End
69 \end_local_layout
70 \language english
71 \language_package default
72 \inputencoding latin1
73 \fontencoding global
74 \font_roman default
75 \font_sans default
76 \font_typewriter default
77 \font_default_family default
78 \use_non_tex_fonts false
79 \font_sc false
80 \font_osf false
81 \font_sf_scale 100
82 \font_tt_scale 100
83 \graphics default
84 \default_output_format default
85 \output_sync 0
86 \bibtex_command default
87 \index_command default
88 \paperfontsize 12
89 \spacing single
90 \use_hyperref true
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
95 \pdf_bookmarks true
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
99 \pdf_breaklinks false
100 \pdf_pdfborder false
101 \pdf_colorlinks true
102 \pdf_backref false
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,  pdfpagelayout=OneColumn, pdfnewwindow=true,  pdfstartview=XYZ, plainpages=false, pdfpagelabels"
105 \papersize default
106 \use_geometry false
107 \use_amsmath 0
108 \use_esint 0
109 \use_mhchem 1
110 \use_mathdots 1
111 \cite_engine basic
112 \use_bibtopic false
113 \use_indices false
114 \paperorientation portrait
115 \suppress_date false
116 \use_refstyle 0
117 \index Index
118 \shortcut idx
119 \color #008000
120 \end_index
121 \secnumdepth 3
122 \tocdepth 3
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
126 \papercolumns 1
127 \papersides 2
128 \paperpagestyle headings
129 \tracking_changes true
130 \output_changes false
131 \html_math_output 0
132 \html_css_as_file 0
133 \html_be_strict true
134 \author 1414654397 "Richard Heck"
135 \end_header
136
137 \begin_body
138
139 \begin_layout Title
140 Additional LyX Features
141 \end_layout
142
143 \begin_layout Author
144 by the LyX Team
145 \begin_inset Foot
146 status collapsed
147
148 \begin_layout Plain Layout
149 \noindent
150 Principal maintainer of this file is
151 \noun on
152  Richard Heck
153 \noun default
154 .
155  If you have comments or error corrections, please send them to the LyX
156  Documentation mailing list, 
157 \begin_inset Flex Code
158 status collapsed
159
160 \begin_layout Plain Layout
161 \noindent
162 <lyx-docs@lists.lyx.org>
163 \end_layout
164
165 \end_inset
166
167 .
168 \end_layout
169
170 \end_inset
171
172  
173 \end_layout
174
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
178
179 \end_inset
180
181
182 \end_layout
183
184 \begin_layout Chapter
185 Introduction
186 \end_layout
187
188 \begin_layout Standard
189 This manual is essentially Part II of the 
190 \emph on
191 User's Guide\SpecialChar \@.
192
193 \emph default
194  The reason for separating this document out is simple: the 
195 \emph on
196 User's Guide
197 \emph default
198  is already quite lengthy, and it contains information on all of the basic
199  features one needs to know in order to prepare most documents.
200  However, the LyX Team has worked to make LyX extensible through various
201  configuration files and external packages.
202  That means that if you want to support the Fizzwizzle LaTeX package, you
203  can create a layout file (or module) for it without having to alter LyX
204  itself.
205  We've already had contributions of several new features this way, and some
206  of them are documented here.
207  There are also some more `advanced' features, such as how to control the
208  presentation of bibliographies and how to work with multi-part documents,
209  that are not covered in the 
210 \emph on
211 User's Guide
212 \emph default
213  and are discussed here.
214 \end_layout
215
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218  control, and SGML support, which require additional software to work properly.
219  There is also a chapter on LyX's support for HTML.
220  And lastly, there's a chapter of LaTeX tools and tips, things you can use
221  to spruce up your documents by directly using the powerful features of
222  LaTeX.
223  After all, LyX 
224 \emph on
225 is
226 \emph default
227  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
228 \end_layout
229
230 \begin_layout Standard
231 If you haven't read the 
232 \emph on
233 Introduction
234 \emph default
235  yet, you are definitely in the wrong manual.
236  The 
237 \emph on
238 Introduction
239 \emph default
240  is the first place to go, since it describes the notation and format of
241  all of the manuals.
242  You should also be thoroughly familiar with the 
243 \emph on
244 User's Guide
245 \emph default
246  and all of the basic features of LyX before attempting to read this one.
247 \end_layout
248
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251  with LaTeX, this first chapter covers the inner workings of LyX and how
252  to direct LyX to generate exactly the LaTeX code you want.
253  It is obviously for more seasoned LyX users.
254 \end_layout
255
256 \begin_layout Chapter
257 LyX and LaTeX
258 \end_layout
259
260 \begin_layout Section
261 How LyX Uses LaTeX
262 \end_layout
263
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266  In it, we'll explain how LyX and LaTeX work together to produce printable
267  output.
268  This is the only place in any of the manuals where we assume you know something
269  about LaTeX.
270 \end_layout
271
272 \begin_layout Standard
273 At one time, LyX was called a 
274 \begin_inset Quotes eld
275 \end_inset
276
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
279 \end_inset
280
281  but that's no longer true.
282  There are frontends to LaTeX out there.
283 \begin_inset Foot
284 status collapsed
285
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288  There are also the LaTeX modes for vi and emacs, of course.
289 \end_layout
290
291 \end_inset
292
293  These are basically text editors with the ability to run LaTeX and mark
294  any errors in the file you're editing.
295  Although LyX 
296 \emph on
297 is
298 \emph default
299  an editor, and it 
300 \emph on
301 does
302 \emph default
303  run LaTeX, and it also indicates errors in the file, it also does much,
304  much more.
305  For one thing, you don't need to know LaTeX to use LyX effectively.
306  And LyX has added its own extensions to LaTeX.
307  Try the following sometime: select 
308 \begin_inset Flex MenuItem
309 status collapsed
310
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
313 LaTeX
314 \end_layout
315
316 \end_inset
317
318  from the 
319 \begin_inset Flex MenuItem
320 status collapsed
321
322 \begin_layout Plain Layout
323 File
324 \end_layout
325
326 \end_inset
327
328  menu (or 
329 \begin_inset Flex MenuItem
330 status collapsed
331
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
334 Source
335 \end_layout
336
337 \end_inset
338
339 ), then look at the preamble of the resulting 
340 \begin_inset Flex Code
341 status collapsed
342
343 \begin_layout Plain Layout
344 .tex
345 \end_layout
346
347 \end_inset
348
349  file.
350  You'll notice a variety of new macros defined specifically by LyX.
351  These macros are defined automatically, according to the features you use
352  in the document.
353 \end_layout
354
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
357  They are:
358 \end_layout
359
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
362 status collapsed
363
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
366 Format
367 \end_layout
368
369 \end_inset
370
371
372 \end_layout
373
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
376 status collapsed
377
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
381 Format
382 \end_layout
383
384 \end_inset
385
386
387 \end_layout
388
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
391 status collapsed
392
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
395 Print
396 \end_layout
397
398 \end_inset
399
400
401 \end_layout
402
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
405 status collapsed
406
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
409 Fax
410 \end_layout
411
412 \end_inset
413
414
415 \end_layout
416
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
419  LaTeX was run.
420  
421 \end_layout
422
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
425 \end_layout
426
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension 
429 \begin_inset Flex Code
430 status collapsed
431
432 \begin_layout Plain Layout
433 .tex
434 \end_layout
435
436 \end_inset
437
438  in place of 
439 \begin_inset Flex Code
440 status collapsed
441
442 \begin_layout Plain Layout
443 .lyx
444 \end_layout
445
446 \end_inset
447
448 .
449 \end_layout
450
451 \begin_layout Enumerate
452 Run LaTeX on the 
453 \begin_inset Flex Code
454 status collapsed
455
456 \begin_layout Plain Layout
457 .tex
458 \end_layout
459
460 \end_inset
461
462  file (maybe several times), and run any other commands (such as 
463 \begin_inset Flex Code
464 status collapsed
465
466 \begin_layout Plain Layout
467 bibtex
468 \end_layout
469
470 \end_inset
471
472  or 
473 \begin_inset Flex Code
474 status collapsed
475
476 \begin_layout Plain Layout
477 makeindex
478 \end_layout
479
480 \end_inset
481
482 ) needed to compile the LaTeX file.
483 \end_layout
484
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
487 \end_layout
488
489 \begin_layout Standard
490 If you've run LaTeX using 
491 \begin_inset Flex MenuItem
492 status collapsed
493
494 \begin_layout Plain Layout
495 View
496 \bar under
497 \SpecialChar \menuseparator
498
499 \bar default
500 DVI
501 \end_layout
502
503 \end_inset
504
505 , LyX then runs a DVI viewer to display the DVI-file.
506  If you've used 
507 \begin_inset Flex MenuItem
508 status collapsed
509
510 \begin_layout Plain Layout
511 View
512 \bar under
513 \SpecialChar \menuseparator
514
515 \bar default
516 PostScript
517 \end_layout
518
519 \end_inset
520
521 , LyX performs further steps:
522 \end_layout
523
524 \begin_layout Itemize
525 Run 
526 \begin_inset Flex Code
527 status collapsed
528
529 \begin_layout Plain Layout
530 dvips
531 \end_layout
532
533 \end_inset
534
535  to convert the DVI file to PostScript.
536 \end_layout
537
538 \begin_layout Itemize
539 Run a PostScript viewer, such as 
540 \begin_inset Flex Code
541 status collapsed
542
543 \begin_layout Plain Layout
544 ghostview
545 \end_layout
546
547 \end_inset
548
549 , to display the PostScript file.
550 \end_layout
551
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
554 \end_layout
555
556 \begin_layout Section
557 Translating LaTeX files into LyX
558 \end_layout
559
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the 
562 \begin_inset Flex MenuItem
563 status collapsed
564
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
568 LaTeX
569 \end_layout
570
571 \end_inset
572
573  command in LyX.
574  This will call a program named 
575 \begin_inset Flex Code
576 status collapsed
577
578 \begin_layout Plain Layout
579 tex2lyx
580 \end_layout
581
582 \end_inset
583
584  which will create a file 
585 \begin_inset Flex Code
586 status collapsed
587
588 \begin_layout Plain Layout
589 foo.lyx
590 \end_layout
591
592 \end_inset
593
594  from the file 
595 \begin_inset Flex Code
596 status collapsed
597
598 \begin_layout Plain Layout
599 foo.tex
600 \end_layout
601
602 \end_inset
603
604 .
605  LyX will then open that file.
606 \begin_inset Foot
607 status collapsed
608
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
611 status collapsed
612
613 \begin_layout Plain Layout
614 tex2lyx
615 \end_layout
616
617 \end_inset
618
619  can also be run from the command line, of course.
620 \end_layout
621
622 \end_inset
623
624
625 \end_layout
626
627 \begin_layout Standard
628 \begin_inset Flex Code
629 status collapsed
630
631 \begin_layout Plain Layout
632 tex2lyx
633 \end_layout
634
635 \end_inset
636
637  will translate most legal LaTeX, but not everything.
638  It will put things it doesn't understand into TeX code, so after translating
639  a file with 
640 \begin_inset Flex Code
641 status collapsed
642
643 \begin_layout Plain Layout
644 tex2lyx
645 \end_layout
646
647 \end_inset
648
649 , you can look for TeX code and hand-edit it until it looks right.
650 \end_layout
651
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
654 \end_layout
655
656 \begin_layout Section
657 \begin_inset CommandInset label
658 LatexCommand label
659 name "sec:Inserting-TeX-Code"
660
661 \end_inset
662
663 Inserting TeX Code into LyX Documents 
664 \end_layout
665
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668  You can always insert TeX code into any LyX document.
669  LyX cannot, and will never be able to, display every possible LaTeX construct.
670  If ever you need to insert LaTeX commands into your LyX document, you can
671  use the 
672 \begin_inset Flex Code
673 status collapsed
674
675 \begin_layout Plain Layout
676 TeX Code
677 \end_layout
678
679 \end_inset
680
681  box, which you can insert into your document with 
682 \begin_inset Flex MenuItem
683 status collapsed
684
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
687 TeX Code
688 \end_layout
689
690 \end_inset
691
692 .
693 \end_layout
694
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697  The code looks like this:
698 \end_layout
699
700 \begin_layout LyX-Code
701
702 \backslash
703 begin{tabular}{ll}
704 \begin_inset Newline newline
705 \end_inset
706
707
708 \backslash
709 begin{minipage}{5cm}
710 \begin_inset Newline newline
711 \end_inset
712
713 This is an example for a minipage environment.
714  You 
715 \begin_inset Newline newline
716 \end_inset
717
718 can put nearly everything in it, even (non-floating) 
719 \begin_inset Newline newline
720 \end_inset
721
722 figures and tables.
723  
724 \begin_inset Newline newline
725 \end_inset
726
727
728 \backslash
729 end{minipage}
730 \begin_inset Newline newline
731 \end_inset
732
733 &
734 \begin_inset Newline newline
735 \end_inset
736
737
738 \backslash
739 begin{minipage}{5cm}
740 \begin_inset Newline newline
741 \end_inset
742
743
744 \backslash
745 begin{verbatim}
746 \begin_inset Newline newline
747 \end_inset
748
749
750 \backslash
751 begin{minipage}{5cm}
752 \begin_inset Newline newline
753 \end_inset
754
755 This ...
756  
757 \begin_inset Newline newline
758 \end_inset
759
760
761 \backslash
762 end{minipage}
763 \begin_inset Newline newline
764 \end_inset
765
766
767 \backslash
768 end{verbatim}
769 \begin_inset Newline newline
770 \end_inset
771
772
773 \backslash
774 end{minipage}
775 \begin_inset Newline newline
776 \end_inset
777
778
779 \backslash
780 end{tabular}
781 \end_layout
782
783 \begin_layout LyX-Code
784
785 \end_layout
786
787 \begin_layout Standard
788 The 
789 \begin_inset Flex Code
790 status collapsed
791
792 \begin_layout Plain Layout
793 TeX Code
794 \end_layout
795
796 \end_inset
797
798  box containing this text is directly after this paragraph.
799  Those of you reading the manual in LyX will only see the TeX code inset.
800  Those reading a printed version of the manuals will see the actual results:
801 \end_layout
802
803 \begin_layout Standard
804 \begin_inset ERT
805 status collapsed
806
807 \begin_layout Plain Layout
808
809
810 \backslash
811 begin{tabular}{ll}
812 \end_layout
813
814 \begin_layout Plain Layout
815
816
817 \backslash
818 begin{minipage}{5cm}
819 \end_layout
820
821 \begin_layout Plain Layout
822
823 This is an example for a minipage environment.
824  You can put nearly everything in it, even (non-floating) figures and tables.
825  
826 \end_layout
827
828 \begin_layout Plain Layout
829
830
831 \backslash
832 end{minipage}
833 \end_layout
834
835 \begin_layout Plain Layout
836
837 &
838 \end_layout
839
840 \begin_layout Plain Layout
841
842
843 \backslash
844 begin{minipage}{5cm}
845 \end_layout
846
847 \begin_layout Plain Layout
848
849
850 \backslash
851 begin{verbatim}
852 \end_layout
853
854 \begin_layout Plain Layout
855
856
857 \backslash
858 begin{minipage}{5cm}
859 \end_layout
860
861 \begin_layout Plain Layout
862
863 This ...
864  
865 \end_layout
866
867 \begin_layout Plain Layout
868
869
870 \backslash
871 end{minipage}
872 \end_layout
873
874 \begin_layout Plain Layout
875
876
877 \backslash
878 end{verbatim}
879 \end_layout
880
881 \begin_layout Plain Layout
882
883
884 \backslash
885 end{minipage}
886 \end_layout
887
888 \begin_layout Plain Layout
889
890
891 \backslash
892 end{tabular}
893 \end_layout
894
895 \end_inset
896
897
898 \end_layout
899
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902  some complex LaTeX structure and then use 
903 \begin_inset Flex MenuItem
904 status collapsed
905
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
908 Child
909 \begin_inset space ~
910 \end_inset
911
912 Document
913 \end_layout
914
915 \end_inset
916
917  to include your file (you should select the type 
918 \begin_inset Flex Code
919 status collapsed
920
921 \begin_layout Plain Layout
922 Input
923 \end_layout
924
925 \end_inset
926
927 ).
928  We recommend that you only do this if you have a 
929 \begin_inset Flex Code
930 status collapsed
931
932 \begin_layout Plain Layout
933 .tex
934 \end_layout
935
936 \end_inset
937
938  file which you 
939 \emph on
940 know
941 \emph default
942  works already.
943  Otherwise, you'll have a big job tracking down LaTeX errors.
944 \end_layout
945
946 \begin_layout Standard
947 There are a few last points to emphasize:
948 \end_layout
949
950 \begin_layout Itemize
951 LyX 
952 \emph on
953 does not
954 \emph default
955  check if your LaTeX code is correct.
956 \end_layout
957
958 \begin_layout Itemize
959 Beware reinventing the wheel.
960 \end_layout
961
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
964  more are coming.
965  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966  feature before you decide you have to do it by hand.
967  Moreover, there are numerous LaTeX packages out there to do all sorts of
968  things, from labels to envelopes to fancy multipage tables.
969  Check out 
970 \begin_inset CommandInset href
971 LatexCommand href
972 name "CTAN"
973 target "http://www.ctan.org/"
974
975 \end_inset
976
977  for details, and see chapter 
978 \begin_inset CommandInset ref
979 LatexCommand ref
980 reference "cha:secrets"
981
982 \end_inset
983
984 .
985 \end_layout
986
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989  sure to check out a good LaTeX book for assistance.
990  There are a number of them listed in the bibliography of the 
991 \emph on
992 User's Guide
993 \emph default
994 .
995 \end_layout
996
997 \begin_layout Section
998 LyX and the LaTeX Preamble
999 \end_layout
1000
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1003 \end_layout
1004
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1007  is good for.
1008  If you don't, the following will give you some ideas—we recommend again
1009  that you consult a LaTeX book for further information.
1010  In any case, you should read the points below, because they explain what
1011  you can do and what you don't need to do in the LaTeX preamble of a LyX
1012  document.
1013 \end_layout
1014
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document, 
1017 \emph on
1018 before
1019 \emph default
1020  the text.
1021  It serves to:
1022 \end_layout
1023
1024 \begin_layout Itemize
1025 Declare the document class.
1026  
1027 \begin_inset Newline newline
1028 \end_inset
1029
1030 LyX already does this for you.
1031  If you're a seasoned LaTeX-nician, and you have a custom document class
1032  you want to use, check out the 
1033 \emph on
1034 Customization Manual
1035 \emph default
1036  for information on how to make LyX interface to it.
1037 \end_layout
1038
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1041  
1042 \begin_inset Newline newline
1043 \end_inset
1044
1045 LaTeX packages provide special commands, which are only available within
1046  a document when the package has been declared in the preamble.
1047  For example, the package 
1048 \begin_inset Flex Code
1049 status collapsed
1050
1051 \begin_layout Plain Layout
1052 indentfirst
1053 \end_layout
1054
1055 \end_inset
1056
1057  forces all paragraphs to be indented.
1058  There are other packages for labels, envelopes, margins, etc.
1059  
1060 \end_layout
1061
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1064  
1065 \begin_inset Newline newline
1066 \end_inset
1067
1068 There are several LaTeX counters and variables which 
1069 \emph on
1070 must
1071 \emph default
1072  be set globally from within the preamble in order to have the desired effect.
1073  (There are variables which you can set and reset inside the document, too.)
1074  Margins are a good example of something which must be set in the preamble.
1075  Another example is the label format for lists.
1076  You can actually set these just about anywhere, but it's best to do it
1077  just once, inside the preamble.
1078 \end_layout
1079
1080 \begin_layout Itemize
1081 Declare user defined commands (with 
1082 \begin_inset Flex Code
1083 status collapsed
1084
1085 \begin_layout Plain Layout
1086
1087 \backslash
1088 newcommand
1089 \end_layout
1090
1091 \end_inset
1092
1093  or 
1094 \begin_inset Flex Code
1095 status collapsed
1096
1097 \begin_layout Plain Layout
1098
1099 \backslash
1100 renewcommand
1101 \end_layout
1102
1103 \end_inset
1104
1105 ).
1106 \begin_inset Newline newline
1107 \end_inset
1108
1109 These are abbreviations for LaTeX commands which appear very often inside
1110  a document.
1111  Although the preamble is a good place to declare such commands, they 
1112 \emph on
1113 can
1114 \emph default
1115  be declared anywhere (before they are used for the first time, of course).
1116  This can be useful if there is a lot of raw LaTeX code in your document,
1117  which normally should not be the case.
1118 \end_layout
1119
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the 
1122 \begin_inset Flex Code
1123 status collapsed
1124
1125 \begin_layout Plain Layout
1126 .tex
1127 \end_layout
1128
1129 \end_inset
1130
1131  file it produces.
1132  This makes LaTeX files generated by LyX portable.
1133 \end_layout
1134
1135 \begin_layout Subsection
1136 Changing the Preamble
1137 \end_layout
1138
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141  can't change them without patching LyX itself.
1142  You can, however, add your own stuff to the preamble by selecting 
1143 \begin_inset Flex MenuItem
1144 status collapsed
1145
1146 \begin_layout Plain Layout
1147 LaTeX
1148 \begin_inset space ~
1149 \end_inset
1150
1151 Preamble
1152 \end_layout
1153
1154 \end_inset
1155
1156  in the 
1157 \begin_inset Flex MenuItem
1158 status collapsed
1159
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1162 Settings
1163 \end_layout
1164
1165 \end_inset
1166
1167  dialog.
1168  LyX adds anything in the 
1169 \begin_inset Flex MenuItem
1170 status collapsed
1171
1172 \begin_layout Plain Layout
1173 Preamble
1174 \end_layout
1175
1176 \end_inset
1177
1178  dialog to its own built-in preamble.
1179  Before adding your own declarations in the preamble, you should make sure
1180  that LyX doesn't already support what you want to do.
1181  (Remember what we said about reinventing the wheel?) Also, 
1182 \emph on
1183 make sure your preamble code is correct
1184 \emph default
1185 .
1186  LyX doesn't check it for you.
1187  If there is an error, you're likely to get an error like 
1188 \begin_inset Quotes eld
1189 \end_inset
1190
1191
1192 \begin_inset Flex Code
1193 status collapsed
1194
1195 \begin_layout Plain Layout
1196 Missing 
1197 \backslash
1198 begin{document}
1199 \end_layout
1200
1201 \end_inset
1202
1203
1204 \begin_inset Quotes erd
1205 \end_inset
1206
1207 .
1208  If you see this error, check your preamble.
1209 \end_layout
1210
1211 \begin_layout Subsection
1212 Examples
1213 \end_layout
1214
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1217  do.
1218 \end_layout
1219
1220 \begin_layout Subsubsection
1221 Example #1: Offsets
1222 \end_layout
1223
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position: 
1226 \begin_inset Flex Code
1227 status collapsed
1228
1229 \begin_layout Plain Layout
1230
1231 \backslash
1232 hoffset
1233 \end_layout
1234
1235 \end_inset
1236
1237  and 
1238 \begin_inset Flex Code
1239 status collapsed
1240
1241 \begin_layout Plain Layout
1242
1243 \backslash
1244 voffset
1245 \end_layout
1246
1247 \end_inset
1248
1249 .
1250  Their names should be self-explanatory.
1251  These variables are useful if you think for a moment about computer labels.
1252  Sometimes, the size of a print medium and the area of the medium that you
1253  can actually print on aren't the same.
1254  This is where 
1255 \begin_inset Flex Code
1256 status collapsed
1257
1258 \begin_layout Plain Layout
1259
1260 \backslash
1261 hoffset
1262 \end_layout
1263
1264 \end_inset
1265
1266  and 
1267 \begin_inset Flex Code
1268 status collapsed
1269
1270 \begin_layout Plain Layout
1271
1272 \backslash
1273 voffset
1274 \end_layout
1275
1276 \end_inset
1277
1278  come in.
1279 \end_layout
1280
1281 \begin_layout Standard
1282 The default values for 
1283 \begin_inset Flex Code
1284 status collapsed
1285
1286 \begin_layout Plain Layout
1287
1288 \backslash
1289 hoffset
1290 \end_layout
1291
1292 \end_inset
1293
1294  and 
1295 \begin_inset Flex Code
1296 status collapsed
1297
1298 \begin_layout Plain Layout
1299
1300 \backslash
1301 voffset
1302 \end_layout
1303
1304 \end_inset
1305
1306  are both 0
1307 \begin_inset space \thinspace{}
1308 \end_inset
1309
1310 points, i.
1311 \begin_inset space \thinspace{}
1312 \end_inset
1313
1314 e.
1315 \begin_inset space \space{}
1316 \end_inset
1317
1318 the page isn't shifted.
1319  Unfortunately, some DVI drivers always seem to shift the page.
1320  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321  If you're using LyX on a system that you don't personally maintain, and
1322  your sysadmin is a doofus, 
1323 \begin_inset Flex Code
1324 status collapsed
1325
1326 \begin_layout Plain Layout
1327
1328 \backslash
1329 hoffset
1330 \end_layout
1331
1332 \end_inset
1333
1334  and 
1335 \begin_inset Flex Code
1336 status collapsed
1337
1338 \begin_layout Plain Layout
1339
1340 \backslash
1341 voffset
1342 \end_layout
1343
1344 \end_inset
1345
1346  can save the day.
1347  Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1349 \end_inset
1350
1351 inches too big.
1352  You can add this to the preamble:
1353 \end_layout
1354
1355 \begin_layout LyX-Code
1356
1357 \backslash
1358 setlength{
1359 \backslash
1360 hoffset}{-0.5 in}
1361 \end_layout
1362
1363 \begin_layout LyX-Code
1364
1365 \backslash
1366 setlength{
1367 \backslash
1368 voffset}{-0.5 in}
1369 \end_layout
1370
1371 \begin_layout Standard
1372 and your margins should now be correct.
1373 \end_layout
1374
1375 \begin_layout Subsubsection
1376 Example #2: Labels
1377 \end_layout
1378
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381  There's a rather nice package, available at your nearest CTAN archive,
1382  for printing sheets of labels: 
1383 \begin_inset Flex Code
1384 status collapsed
1385
1386 \begin_layout Plain Layout
1387 labels.sty
1388 \end_layout
1389
1390 \end_inset
1391
1392 .
1393  Now, your system may not have this package installed by default.
1394  We leave that up to you to check.
1395  You'll also want to read the documentation for it; we're not going to do
1396  that for you.
1397  Since this is an example, however, we'll give you an example of how you
1398  use this package.
1399 \end_layout
1400
1401 \begin_layout Standard
1402 First, make sure you're using the 
1403 \begin_inset Flex Code
1404 status collapsed
1405
1406 \begin_layout Plain Layout
1407 article
1408 \end_layout
1409
1410 \end_inset
1411
1412  document class.
1413  Next, you need to put the following in your preamble:
1414 \end_layout
1415
1416 \begin_layout LyX-Code
1417
1418 \backslash
1419 usepackage{labels}
1420 \end_layout
1421
1422 \begin_layout LyX-Code
1423
1424 \backslash
1425 LabelCols=3
1426 \end_layout
1427
1428 \begin_layout LyX-Code
1429
1430 \backslash
1431 LabelRows=7
1432 \end_layout
1433
1434 \begin_layout LyX-Code
1435
1436 \backslash
1437 LeftBorder=8mm
1438 \end_layout
1439
1440 \begin_layout LyX-Code
1441
1442 \backslash
1443 RightBorder=8mm
1444 \end_layout
1445
1446 \begin_layout LyX-Code
1447
1448 \backslash
1449 TopBorder=9mm
1450 \end_layout
1451
1452 \begin_layout LyX-Code
1453
1454 \backslash
1455 BottomBorder=2mm
1456 \end_layout
1457
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460  You're now ready to print labels, but you'll need to insert LaTeX code,
1461  placing the commands 
1462 \begin_inset Flex Code
1463 status collapsed
1464
1465 \begin_layout Plain Layout
1466
1467 \backslash
1468 begin{labels}
1469 \end_layout
1470
1471 \end_inset
1472
1473  and 
1474 \begin_inset Flex Code
1475 status collapsed
1476
1477 \begin_layout Plain Layout
1478
1479 \backslash
1480 end{labels}
1481 \end_layout
1482
1483 \end_inset
1484
1485  around each label text.
1486  This and other special features of 
1487 \begin_inset Flex Code
1488 status collapsed
1489
1490 \begin_layout Plain Layout
1491 labels.sty
1492 \end_layout
1493
1494 \end_inset
1495
1496  are explained in its documentation.
1497 \end_layout
1498
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501  Maybe that someone is you.
1502 \end_layout
1503
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1506 \end_layout
1507
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of 
1510 \emph on
1511 every
1512 \emph default
1513  paragraph.
1514  As with all of their other weird quirks, most Americans will whine and
1515  moan until they can have their way and indent the first line of all paragraphs.
1516  (Yes, we're joking.
1517  (We are?) 
1518 \emph on
1519 Yeah
1520 \emph default
1521 , we are.)
1522 \end_layout
1523
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526  In books, you typically only indent the first line of a paragraph 
1527 \emph on
1528 if
1529 \emph default
1530  it follows another one.
1531  The idea behind indenting the first line of a paragraph is to distinguish
1532  neighboring paragraphs from one another.
1533  If there is no previous paragraph—for example, if it follows a figure or
1534  is the first paragraph in a section—then there is no need for indentation.
1535  
1536 \end_layout
1537
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540  about such esoteric things; you want your indentation! Add this to the
1541  preamble:
1542 \end_layout
1543
1544 \begin_layout LyX-Code
1545
1546 \backslash
1547 usepackage{indentfirst}
1548 \end_layout
1549
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552  all of your paragraphs will get the indentation the Founding Fathers intended
1553  they should have.
1554 \end_layout
1555
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1558 \end_layout
1559
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562  of the advanced things you can do.
1563  Also, there are more examples and an assortment of LaTeX 
1564 \begin_inset Quotes eld
1565 \end_inset
1566
1567 dirty tricks
1568 \begin_inset Quotes erd
1569 \end_inset
1570
1571  given in Chapter
1572 \begin_inset space ~
1573 \end_inset
1574
1575
1576 \begin_inset CommandInset ref
1577 LatexCommand ref
1578 reference "cha:secrets"
1579
1580 \end_inset
1581
1582 .
1583  
1584 \end_layout
1585
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1588 \end_layout
1589
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1592  going.
1593  It then uses the logfile from the LaTeX run to do a post-mortem.
1594  After analyzing the logfile,LyX displays a dialog listing the errors.
1595  Clicking on any one of them will take you to the position in your LyX file
1596  where the error occurred.
1597 \begin_inset Foot
1598 status collapsed
1599
1600 \begin_layout Plain Layout
1601 Well, usually.
1602  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1603  right line.
1604  There are also cases where LaTeX reports the error on one line, but the
1605  actual error is earlier.
1606  This is not unlike forgetting a closing brace in a program: You'll get
1607  an error, but only later.
1608 \end_layout
1609
1610 \end_inset
1611
1612
1613 \end_layout
1614
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1617  
1618 \begin_inset Flex MenuItem
1619 status collapsed
1620
1621 \begin_layout Plain Layout
1622 Document
1623 \bar under
1624 \SpecialChar \menuseparator
1625
1626 \bar default
1627 Latex
1628 \begin_inset space ~
1629 \end_inset
1630
1631 Log
1632 \end_layout
1633
1634 \end_inset
1635
1636 .
1637  There are some fairly common error messages and warnings.
1638  We'll cover those here.
1639  You should look at a good LaTeX book for a complete listing.
1640 \end_layout
1641
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1644 status collapsed
1645
1646 \begin_layout Plain Layout
1647 LaTeX Warning
1648 \end_layout
1649
1650 \end_inset
1651
1652
1653 \begin_inset Newline newline
1654 \end_inset
1655
1656 Anything beginning with these words is a warning message for the purpose
1657  of 
1658 \begin_inset Quotes eld
1659 \end_inset
1660
1661 debugging
1662 \begin_inset Quotes erd
1663 \end_inset
1664
1665  the LaTeX code itself.
1666  You'll get messages like this if you added or changed cross-references
1667  or bibliography entries, in which case, LaTeX is trying to tell you that
1668  you need to make another run.
1669  You can by-and-large ignore these.
1670 \end_layout
1671
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1674 status collapsed
1675
1676 \begin_layout Plain Layout
1677 LaTeX Font Warning
1678 \end_layout
1679
1680 \end_inset
1681
1682
1683 \begin_inset Newline newline
1684 \end_inset
1685
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687  The rest of the message will often say something about a replacement font
1688  that LaTeX used.
1689  You can safely ignore these, too.
1690 \end_layout
1691
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1694 status collapsed
1695
1696 \begin_layout Plain Layout
1697 Overfull 
1698 \backslash
1699 hbox
1700 \end_layout
1701
1702 \end_inset
1703
1704
1705 \begin_inset Newline newline
1706 \end_inset
1707
1708 LaTeX absolutely 
1709 \emph on
1710 loves
1711 \emph default
1712  to spew these out.
1713  They are warnings about lines that were too long and run past the right
1714  margin.
1715  Almost always, this is unnoticeable in the final output.
1716  (It can be just a point or two.) Or, only one or two characters extend past
1717  the margin.
1718  LaTeX seems to generate at least one of these messages for just about any
1719  document you write.
1720 \begin_inset Newline newline
1721 \end_inset
1722
1723 You can ignore these messages.
1724  Your eyes will tell you if there's a problem with something that's too
1725  wide; just look at the output.
1726 \begin_inset Foot
1727 status collapsed
1728
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in 
1731 \begin_inset Flex MenuItem
1732 status collapsed
1733
1734 \begin_layout Plain Layout
1735 Document
1736 \bar under
1737 \SpecialChar \menuseparator
1738
1739 \bar default
1740 Settings
1741 \end_layout
1742
1743 \end_inset
1744
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1746 \end_layout
1747
1748 \end_inset
1749
1750
1751 \end_layout
1752
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1755 status collapsed
1756
1757 \begin_layout Plain Layout
1758 Underfull 
1759 \backslash
1760 hbox
1761 \end_layout
1762
1763 \end_inset
1764
1765
1766 \begin_inset Newline newline
1767 \end_inset
1768
1769 Not quite as common as its cousin.
1770  LaTeX seems to like to print lines that are a bit too wide as opposed to
1771  ones that are a bit too narrow.
1772  We have no idea why.
1773 \end_layout
1774
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1777 status collapsed
1778
1779 \begin_layout Plain Layout
1780 Overfull 
1781 \backslash
1782 vbox
1783 \end_layout
1784
1785 \end_inset
1786
1787  and 
1788 \begin_inset Flex Code
1789 status collapsed
1790
1791 \begin_layout Plain Layout
1792 Underfull 
1793 \backslash
1794 vbox
1795 \end_layout
1796
1797 \end_inset
1798
1799
1800 \begin_inset Newline newline
1801 \end_inset
1802
1803 Warnings about troubles breaking the page.
1804  Once again, just look at the output.
1805  Your eyes will tell you where something has gone wrong.
1806 \end_layout
1807
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1810 status collapsed
1811
1812 \begin_layout Plain Layout
1813  LaTeX Error: File 
1814 \begin_inset Quotes els
1815 \end_inset
1816
1817 Xxxx
1818 \begin_inset Quotes ers
1819 \end_inset
1820
1821  not found
1822 \end_layout
1823
1824 \end_inset
1825
1826
1827 \begin_inset Newline newline
1828 \end_inset
1829
1830 The file 
1831 \begin_inset Quotes eld
1832 \end_inset
1833
1834 Xxxx
1835 \begin_inset Quotes erd
1836 \end_inset
1837
1838  isn't installed on this system.
1839  This usually appears because some package your document needs isn't installed.
1840  If you didn't touch the preamble or didn't use the 
1841 \begin_inset Flex Code
1842 status collapsed
1843
1844 \begin_layout Plain Layout
1845
1846 \backslash
1847 usepackage{}
1848 \end_layout
1849
1850 \end_inset
1851
1852  command, then one of the packages LyX tried to load is missing.
1853  Use 
1854 \begin_inset Flex MenuItem
1855 status collapsed
1856
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1859 LaTeX Configuration
1860 \end_layout
1861
1862 \end_inset
1863
1864  to get a list of packages that LyX knows about.
1865  This file is updated whenever you reconfigure LyX (using 
1866 \begin_inset Flex MenuItem
1867 status collapsed
1868
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1871 Reconfigure
1872 \end_layout
1873
1874 \end_inset
1875
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1878 \end_inset
1879
1880 If you did use the 
1881 \begin_inset Flex Code
1882 status collapsed
1883
1884 \begin_layout Plain Layout
1885
1886 \backslash
1887 usepackage{}
1888 \end_layout
1889
1890 \end_inset
1891
1892  command and the package in question isn't installed, then you'll need to
1893  install it yourself.
1894 \end_layout
1895
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1898 status collapsed
1899
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1902 \end_layout
1903
1904 \end_inset
1905
1906
1907 \begin_inset Newline newline
1908 \end_inset
1909
1910 Error messages beginning with this are trying to tell you that you specified
1911  a bad or undefined option to a package.
1912  Check the package's documentation.
1913 \end_layout
1914
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1917 status collapsed
1918
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1921 \end_layout
1922
1923 \end_inset
1924
1925
1926 \begin_inset Newline newline
1927 \end_inset
1928
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1930  get one of these.
1931  You may have forgotten to load a package.
1932  In any case, this error message usually means that you used an undefined
1933  command.
1934  
1935 \end_layout
1936
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939  Some are self-explanatory.
1940  These are usually LaTeX messages.
1941  Others are downright cryptic.
1942  These are usually TeX error messages, and we really have 
1943 \emph on
1944 no clue
1945 \emph default
1946  what they mean or how to decipher them.
1947  No-one does.
1948 \end_layout
1949
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1952 \end_layout
1953
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1956 \end_layout
1957
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1960 \end_layout
1961
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964  especially if you see a 
1965 \begin_inset Quotes eld
1966 \end_inset
1967
1968
1969 \begin_inset Flex Code
1970 status collapsed
1971
1972 \begin_layout Plain Layout
1973 Missing 
1974 \backslash
1975 begin{document}
1976 \end_layout
1977
1978 \end_inset
1979
1980
1981 \begin_inset Quotes erd
1982 \end_inset
1983
1984  error—it means that there are errors in the preamble.
1985  Start debugging your preamble.
1986 \end_layout
1987
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990  to the document, the first suspect is your LaTeX distribution itself.
1991  Check for missing packages and install them.
1992 \end_layout
1993
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996  Did you use any of the fine-tuning options in LyX? Specifically, did you
1997  
1998 \emph on
1999 misuse
2000 \emph default
2001  any of them, like trying to manually insert lots of 
2002 \begin_inset Flex Code
2003 status collapsed
2004
2005 \begin_layout Plain Layout
2006 Protected
2007 \begin_inset space ~
2008 \end_inset
2009
2010 Blanks
2011 \end_layout
2012
2013 \end_inset
2014
2015
2016 \begin_inset Flex Code
2017 status collapsed
2018
2019 \begin_layout Plain Layout
2020 Linebreaks
2021 \end_layout
2022
2023 \end_inset
2024
2025 , or 
2026 \begin_inset Flex Code
2027 status collapsed
2028
2029 \begin_layout Plain Layout
2030 Pagebreaks
2031 \end_layout
2032
2033 \end_inset
2034
2035 ? Did you try to kludge something together with these instead of using the
2036  appropriate paragraph environment?
2037 \end_layout
2038
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2041  the rules.
2042  Did you try to pull a fancy maneuver? Did you do something funky inside
2043  a table or an equation, like inserting a graphic into a table cell?
2044 \end_layout
2045
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048  a line? By default, LaTeX is rather strict about how much extra inter-word
2049  spacing it will add in order to break a line.
2050  Preferably, you should rework the paragraph to avoid the problem.
2051  If this isn't an option, you can wrap your text in 
2052 \begin_inset Flex Code
2053 status collapsed
2054
2055 \begin_layout Plain Layout
2056
2057 \backslash
2058 sloppypar
2059 \end_layout
2060
2061 \end_inset
2062
2063  to make LaTeX's line breaking more, well, sloppy.
2064 \end_layout
2065
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068  make sure you're in the limits for nesting environments.
2069  If you nested a bunch of environments to the 
2070 \begin_inset Formula $17^{\mathrm{th}}$
2071 \end_inset
2072
2073  level, that's the problem.
2074  (The limit in LaTeX is five.)
2075 \end_layout
2076
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079  If you have a table or figure that's too wide or long for the page, you
2080  need to:
2081 \end_layout
2082
2083 \begin_deeper
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2086 \end_layout
2087
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2090 \end_layout
2091
2092 \end_deeper
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2096 \end_layout
2097
2098 \begin_layout Standard
2099 If all this doesn't help—well, then 
2100 \emph on
2101 perhaps
2102 \emph default
2103  you might have found a bug in LyX\SpecialChar \ldots{}
2104 .
2105 \end_layout
2106
2107 \begin_layout Chapter
2108 Supplemental Tools
2109 \end_layout
2110
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2113 \end_layout
2114
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2117  in the section 
2118 \emph on
2119 Bibliography databases (BibTeX)
2120 \emph default
2121  of the 
2122 \emph on
2123 User's Guide
2124 \emph default
2125 .
2126  The following subsections explain special bibliography features supported
2127  by LyX.
2128 \end_layout
2129
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2132 \end_layout
2133
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2137 \end_inset
2138
2139 g.
2140 \begin_inset space \space{}
2141 \end_inset
2142
2143
2144 \begin_inset Quotes eld
2145 \end_inset
2146
2147 [12]
2148 \begin_inset Quotes erd
2149 \end_inset
2150
2151 ) to refer to a cited work.
2152  However, in many scientific disciplines, other citation styles are in use.
2153  The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2155 \end_inset
2156
2157 g.
2158 \begin_inset space \space{}
2159 \end_inset
2160
2161
2162 \begin_inset Quotes eld
2163 \end_inset
2164
2165 Knuth 1984a
2166 \begin_inset Quotes erd
2167 \end_inset
2168
2169 ).
2170  LyX supports two packages that provide this style, 
2171 \begin_inset Flex Code
2172 status collapsed
2173
2174 \begin_layout Plain Layout
2175 natbib
2176 \end_layout
2177
2178 \end_inset
2179
2180  and 
2181 \begin_inset Flex Code
2182 status collapsed
2183
2184 \begin_layout Plain Layout
2185 jurabib
2186 \end_layout
2187
2188 \end_inset
2189
2190 .
2191  Both packages have their pros and cons, which cannot be listed in detail.
2192  If you only want to have simple author-year (or author-numerical) style,
2193  or if you want to use one of the countless style files for 
2194 \begin_inset Flex Code
2195 status collapsed
2196
2197 \begin_layout Plain Layout
2198 natbib
2199 \end_layout
2200
2201 \end_inset
2202
2203 , than the established 
2204 \begin_inset Flex Code
2205 status collapsed
2206
2207 \begin_layout Plain Layout
2208 natbib
2209 \end_layout
2210
2211 \end_inset
2212
2213  package is probably your choice.
2214  If you need special features like short title references, ibidem etc., you
2215  might consider the 
2216 \begin_inset Flex Code
2217 status collapsed
2218
2219 \begin_layout Plain Layout
2220 jurabib
2221 \end_layout
2222
2223 \end_inset
2224
2225  package.
2226 \end_layout
2227
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2230  Go to 
2231 \begin_inset Flex MenuItem
2232 status collapsed
2233
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2236 Settings
2237 \end_layout
2238
2239 \end_inset
2240
2241  and select under 
2242 \begin_inset Flex MenuItem
2243 status collapsed
2244
2245 \begin_layout Plain Layout
2246 Bibliography
2247 \end_layout
2248
2249 \end_inset
2250
2251  the option 
2252 \begin_inset Flex MenuItem
2253 status collapsed
2254
2255 \begin_layout Plain Layout
2256 Natbib
2257 \end_layout
2258
2259 \end_inset
2260
2261  or 
2262 \begin_inset Flex MenuItem
2263 status collapsed
2264
2265 \begin_layout Plain Layout
2266 Jurabib
2267 \end_layout
2268
2269 \end_inset
2270
2271 .
2272  With both packages, you will get some extra features in the citation dialog
2273  and you can select the style of the reference (
2274 \begin_inset Quotes eld
2275 \end_inset
2276
2277 Knuth 1984
2278 \begin_inset Quotes erd
2279 \end_inset
2280
2281
2282 \begin_inset Quotes eld
2283 \end_inset
2284
2285 Knuth (1984)
2286 \begin_inset Quotes erd
2287 \end_inset
2288
2289
2290 \begin_inset Quotes eld
2291 \end_inset
2292
2293 Knuth, 1984
2294 \begin_inset Quotes erd
2295 \end_inset
2296
2297
2298 \begin_inset Quotes eld
2299 \end_inset
2300
2301 1984
2302 \begin_inset Quotes erd
2303 \end_inset
2304
2305  etc.).
2306  Note that both packages need specifically designed style files.
2307  They both ship their own, but there are lots of additional style files,
2308  and there is even an interactive style file builder
2309 \begin_inset Foot
2310 status collapsed
2311
2312 \begin_layout Plain Layout
2313 See 
2314 \begin_inset Flex URL
2315 status open
2316
2317 \begin_layout Plain Layout
2318
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2320 \end_layout
2321
2322 \end_inset
2323
2324
2325 \end_layout
2326
2327 \end_inset
2328
2329  for 
2330 \begin_inset Flex Code
2331 status collapsed
2332
2333 \begin_layout Plain Layout
2334 natbib
2335 \end_layout
2336
2337 \end_inset
2338
2339 .
2340 \end_layout
2341
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2344 \end_layout
2345
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348  If you are for instance a historian, the possibility to separate sources
2349  and scientific works is most likely a 
2350 \begin_inset Quotes eld
2351 \end_inset
2352
2353 must have
2354 \begin_inset Quotes erd
2355 \end_inset
2356
2357 .
2358  Unfortunately, BibTeX itself does not allow you to do this.
2359  But with the help of some LaTeX packages, BibTeX can be extended to fit
2360  your needs.
2361 \end_layout
2362
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages, 
2365 \family typewriter
2366 bibtopic
2367 \family default
2368 .
2369 \begin_inset Foot
2370 status collapsed
2371
2372 \begin_layout Plain Layout
2373 Available from 
2374 \begin_inset Flex URL
2375 status open
2376
2377 \begin_layout Plain Layout
2378
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2380 \end_layout
2381
2382 \end_inset
2383
2384
2385 \end_layout
2386
2387 \end_inset
2388
2389  The advantage of this package (compared to other packages like 
2390 \family typewriter
2391 multibib
2392 \family default
2393 ) is that you don't need to define new citation commands.
2394  Instead, you need to prepare different bibliographic databases which include
2395  the entries for the different sections of the bibliography.
2396  For example: If you want to divide your bibliography into the sections
2397  
2398 \begin_inset Quotes eld
2399 \end_inset
2400
2401 Sources
2402 \begin_inset Quotes erd
2403 \end_inset
2404
2405  and 
2406 \begin_inset Quotes eld
2407 \end_inset
2408
2409 Scientific works
2410 \begin_inset Quotes erd
2411 \end_inset
2412
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2415 \end_inset
2416
2417 g.
2418 \begin_inset space \space{}
2419 \end_inset
2420
2421
2422 \begin_inset Flex Code
2423 status collapsed
2424
2425 \begin_layout Plain Layout
2426 sources.bib
2427 \end_layout
2428
2429 \end_inset
2430
2431  and 
2432 \begin_inset Flex Code
2433 status collapsed
2434
2435 \begin_layout Plain Layout
2436 scientific.bib
2437 \end_layout
2438
2439 \end_inset
2440
2441 .
2442  
2443 \end_layout
2444
2445 \begin_layout Standard
2446 Go to 
2447 \begin_inset Flex MenuItem
2448 status collapsed
2449
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2452 Settings
2453 \end_layout
2454
2455 \end_inset
2456
2457  and check under 
2458 \begin_inset Flex MenuItem
2459 status collapsed
2460
2461 \begin_layout Plain Layout
2462 Bibliography
2463 \end_layout
2464
2465 \end_inset
2466
2467  the option 
2468 \begin_inset Flex MenuItem
2469 status collapsed
2470
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2473 \end_layout
2474
2475 \end_inset
2476
2477 .
2478  Now you can insert multiple BibTeX bibliographies, one for each section
2479  of your bibliography.
2480  Returning to our example: Insert the BibTeX bibliography 
2481 \begin_inset Flex Code
2482 status collapsed
2483
2484 \begin_layout Plain Layout
2485 sources.bib
2486 \end_layout
2487
2488 \end_inset
2489
2490  and a second one for the database 
2491 \begin_inset Flex Code
2492 status collapsed
2493
2494 \begin_layout Plain Layout
2495 scientific.bib
2496 \end_layout
2497
2498 \end_inset
2499
2500 .
2501  You are free to use the same or different styles for each section.
2502  Additionally, you can chose if the bibliography section should contain
2503  
2504 \begin_inset Quotes eld
2505 \end_inset
2506
2507 all cited references
2508 \begin_inset Quotes erd
2509 \end_inset
2510
2511  of the specified database(s) (which is the default), 
2512 \begin_inset Quotes eld
2513 \end_inset
2514
2515 all uncited references
2516 \begin_inset Quotes erd
2517 \end_inset
2518
2519  or even 
2520 \begin_inset Quotes eld
2521 \end_inset
2522
2523 all references
2524 \begin_inset Quotes erd
2525 \end_inset
2526
2527 .
2528  This might be useful if you would like to separate your bibliography into
2529  three sections: 
2530 \begin_inset Quotes eld
2531 \end_inset
2532
2533 Cited sources
2534 \begin_inset Quotes erd
2535 \end_inset
2536
2537
2538 \begin_inset Quotes eld
2539 \end_inset
2540
2541 Uncited sources
2542 \begin_inset Quotes erd
2543 \end_inset
2544
2545 , and 
2546 \begin_inset Quotes eld
2547 \end_inset
2548
2549 Scientific works
2550 \begin_inset Quotes erd
2551 \end_inset
2552
2553 .
2554  The titles for the sections can be added as ordinary sections or subsections.
2555  Since 
2556 \begin_inset Flex Code
2557 status collapsed
2558
2559 \begin_layout Plain Layout
2560 bibtopic
2561 \end_layout
2562
2563 \end_inset
2564
2565  removes the bibliography title, you have manually re-add that, too (as
2566  a chapter* or section*, for instance).
2567 \end_layout
2568
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2571 \end_layout
2572
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2576 \end_inset
2577
2578 g.
2579 \begin_inset space \space{}
2580 \end_inset
2581
2582 a bibliography for each section or chapter of the document, are not supported
2583  by BibTeX itself.
2584  But the 
2585 \begin_inset Flex Code
2586 status collapsed
2587
2588 \begin_layout Plain Layout
2589 bibtopic
2590 \end_layout
2591
2592 \end_inset
2593
2594  package, which is used for the creation of sectioned bibliographies in
2595  LyX (see the previous section), provides an easy way to solve this task,
2596  if you are willing to use some 
2597 \begin_inset Flex MenuItem
2598 status collapsed
2599
2600 \begin_layout Plain Layout
2601 TeX Code
2602 \end_layout
2603
2604 \end_inset
2605
2606  (see section
2607 \begin_inset space ~
2608 \end_inset
2609
2610
2611 \begin_inset CommandInset ref
2612 LatexCommand ref
2613 reference "sec:Inserting-TeX-Code"
2614
2615 \end_inset
2616
2617 ).
2618 \begin_inset Foot
2619 status collapsed
2620
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the 
2623 \begin_inset Flex Code
2624 status collapsed
2625
2626 \begin_layout Plain Layout
2627 chapterbib
2628 \end_layout
2629
2630 \end_inset
2631
2632  or 
2633 \begin_inset Flex Code
2634 status collapsed
2635
2636 \begin_layout Plain Layout
2637 bibunits
2638 \end_layout
2639
2640 \end_inset
2641
2642  package, respectively.
2643 \end_layout
2644
2645 \end_inset
2646
2647
2648 \end_layout
2649
2650 \begin_layout Standard
2651 First go to 
2652 \begin_inset Flex MenuItem
2653 status collapsed
2654
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2657 Settings
2658 \end_layout
2659
2660 \end_inset
2661
2662  and under 
2663 \begin_inset Flex MenuItem
2664 status collapsed
2665
2666 \begin_layout Plain Layout
2667 Bibliography
2668 \end_layout
2669
2670 \end_inset
2671
2672  check 
2673 \begin_inset Flex MenuItem
2674 status collapsed
2675
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2678 \end_layout
2679
2680 \end_inset
2681
2682 .
2683  In the document, you have to enclose the sections, which shall contain
2684  their own bibliography (including the BibTeX bibliography itself), between
2685  
2686 \begin_inset Flex Code
2687 status collapsed
2688
2689 \begin_layout Plain Layout
2690
2691 \backslash
2692 begin{btUnit}
2693 \end_layout
2694
2695 \end_inset
2696
2697  and 
2698 \begin_inset Flex Code
2699 status collapsed
2700
2701 \begin_layout Plain Layout
2702
2703 \backslash
2704 end{btUnit}
2705 \end_layout
2706
2707 \end_inset
2708
2709  (those commands have to be inserted as TeX code).
2710  The bibliography will contain all references which have been cited in the
2711  current 
2712 \begin_inset Flex Code
2713 status collapsed
2714
2715 \begin_layout Plain Layout
2716 btUnit
2717 \end_layout
2718
2719 \end_inset
2720
2721 .
2722  
2723 \series bold
2724 Note:
2725 \series default
2726  If you are using this approach, then every citation reference has to be
2727  inside some 
2728 \begin_inset Flex Code
2729 status collapsed
2730
2731 \begin_layout Plain Layout
2732 btUnit
2733 \end_layout
2734
2735 \end_inset
2736
2737 .
2738  Also, the 
2739 \begin_inset Flex Code
2740 status collapsed
2741
2742 \begin_layout Plain Layout
2743 btUnit
2744 \end_layout
2745
2746 \end_inset
2747
2748 s cannot be nested.
2749 \end_layout
2750
2751 \begin_layout Section
2752 Multipart Documents
2753 \end_layout
2754
2755 \begin_layout Subsection
2756 General Operation
2757 \end_layout
2758
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761  to break up the document into several files, or perhaps you have something
2762  where a table may change from time to time, but the preceding text does
2763  not.
2764  In these cases, you should seriously consider using multipart documents.
2765  For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767  Each of these could be its own separate LyX file, with one 
2768 \begin_inset Quotes eld
2769 \end_inset
2770
2771 master
2772 \begin_inset Quotes erd
2773 \end_inset
2774
2775  file which contains the title, authors, abstract, references, etc., plus
2776  the five included files.
2777  It is important to note that each of these files is a full LyX file which
2778  can be formatted and printed on its own, as well as included in a master
2779  file.
2780  Each of these files must have the same document class, however—don't attempt
2781  to mix book classes with article classes.
2782  You may also include LaTeX files; however, these files must not have their
2783  own preamble (i.
2784 \begin_inset space \thinspace{}
2785 \end_inset
2786
2787 g.
2788 \begin_inset space \space{}
2789 \end_inset
2790
2791 everything up to and including the 
2792 \begin_inset Flex Code
2793 status collapsed
2794
2795 \begin_layout Plain Layout
2796
2797 \backslash
2798 begin{document}
2799 \end_layout
2800
2801 \end_inset
2802
2803  line as well as the 
2804 \begin_inset Flex Code
2805 status collapsed
2806
2807 \begin_layout Plain Layout
2808
2809 \backslash
2810 end{document}
2811 \end_layout
2812
2813 \end_inset
2814
2815  line must be deleted) or else errors will be generated when you try to
2816  make a DVI file.
2817 \end_layout
2818
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with 
2821 \begin_inset Flex MenuItem
2822 status collapsed
2823
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2826 ChiId
2827 \begin_inset space ~
2828 \end_inset
2829
2830 Document
2831 \end_layout
2832
2833 \end_inset
2834
2835 .
2836  When you click on this selection a small box is inserted into the file
2837  at the current cursor location.
2838  Clicking on the box raises a dialog which allows you to select the file
2839  to be included, and the method of its inclusion.
2840  
2841 \end_layout
2842
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845  The three inclusion methods are 
2846 \begin_inset Quotes eld
2847 \end_inset
2848
2849 include
2850 \begin_inset Quotes erd
2851 \end_inset
2852
2853
2854 \begin_inset Quotes eld
2855 \end_inset
2856
2857 input
2858 \begin_inset Quotes erd
2859 \end_inset
2860
2861 , and 
2862 \begin_inset Quotes eld
2863 \end_inset
2864
2865 verbatim
2866 \begin_inset Quotes erd
2867 \end_inset
2868
2869 .
2870  The difference between 
2871 \begin_inset Quotes eld
2872 \end_inset
2873
2874 include
2875 \begin_inset Quotes erd
2876 \end_inset
2877
2878  and 
2879 \begin_inset Quotes eld
2880 \end_inset
2881
2882 input
2883 \begin_inset Quotes erd
2884 \end_inset
2885
2886  is really only meaningful to LaTeXperts, but the practical difference is
2887  that files which are 
2888 \begin_inset Quotes eld
2889 \end_inset
2890
2891 included
2892 \begin_inset Quotes erd
2893 \end_inset
2894
2895  are typeset beginning on a new page, while files which are 
2896 \begin_inset Quotes eld
2897 \end_inset
2898
2899 inputted
2900 \begin_inset Quotes erd
2901 \end_inset
2902
2903  are typeset starting on the current page.
2904 \end_layout
2905
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909  all the preamble information.
2910 \end_layout
2911
2912 \begin_layout Standard
2913
2914 \begin_inset Quotes eld
2915 \end_inset
2916
2917 verbatim
2918 \begin_inset Quotes erd
2919 \end_inset
2920
2921  included file allows you to include a file typeset exactly as it appears
2922  in the file, i.
2923 \begin_inset space \thinspace{}
2924 \end_inset
2925
2926 g.
2927 \begin_inset space \space{}
2928 \end_inset
2929
2930 in 
2931 \begin_inset Flex Code
2932 status collapsed
2933
2934 \begin_layout Plain Layout
2935 verbatim
2936 \end_layout
2937
2938 \end_inset
2939
2940  mode, with the characters set in a fixed-width typewriter font.
2941  Normally, spaces in this file are invisible, though two consecutive spaces
2942  are conserved, unlike LyX's normal treatment of spaces.
2943  However, setting the 
2944 \begin_inset Flex MenuItem
2945 status collapsed
2946
2947 \begin_layout Plain Layout
2948 Mark
2949 \begin_inset space ~
2950 \end_inset
2951
2952 spaces
2953 \begin_inset space ~
2954 \end_inset
2955
2956 in
2957 \begin_inset space ~
2958 \end_inset
2959
2960 output
2961 \end_layout
2962
2963 \end_inset
2964
2965  checkbox typesets a mark to unambiguously define the presence of a space.
2966  
2967 \end_layout
2968
2969 \begin_layout Subsection
2970 Cross-References Between Files
2971 \end_layout
2972
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2975 position "t"
2976 hor_pos "c"
2977 has_inner_box 1
2978 inner_pos "t"
2979 use_parbox 0
2980 use_makebox 0
2981 width "100col%"
2982 special "none"
2983 height "1in"
2984 height_special "totalheight"
2985 status open
2986
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989  Need to describe default master documents and how children are opened when
2990  the master is.
2991  [[FIXME]]
2992 \end_layout
2993
2994 \end_inset
2995
2996
2997 \end_layout
2998
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001  First, open all the files in question: let's call them A and B in a two
3002  file example, where B is included in A.
3003  Let's say you insert a label in A, then want to reference it in B.
3004  Open the cross-reference dialog in whilst in document B, and you can select
3005  the 
3006 \begin_inset Quotes eld
3007 \end_inset
3008
3009 buffer
3010 \begin_inset Quotes erd
3011 \end_inset
3012
3013  to use.
3014 \end_layout
3015
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3018 \end_layout
3019
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3022 position "t"
3023 hor_pos "c"
3024 has_inner_box 1
3025 inner_pos "t"
3026 use_parbox 0
3027 use_makebox 0
3028 width "100col%"
3029 special "none"
3030 height "1in"
3031 height_special "totalheight"
3032 status open
3033
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036  There is now material about this on the wiki, and it could be copied here.
3037 \end_layout
3038
3039 \end_inset
3040
3041
3042 \end_layout
3043
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3046  them to a comment.
3047  This way LyX will find the 
3048 \begin_inset Flex Code
3049 status collapsed
3050
3051 \begin_layout Plain Layout
3052 .bib
3053 \end_layout
3054
3055 \end_inset
3056
3057 -files and you can easily insert references without making the bibliography
3058  list visible.
3059 \end_layout
3060
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063  references will look like this: [?], instead of like this: [1].
3064  One solution is to use the LaTeX-package 
3065 \begin_inset Flex Code
3066 status collapsed
3067
3068 \begin_layout Plain Layout
3069 comment
3070 \end_layout
3071
3072 \end_inset
3073
3074  that will only include comments by processing the files separately.
3075  To do this, add in the LaTeX preamble of every subdocument the following:
3076 \end_layout
3077
3078 \begin_layout LyX-Code
3079
3080 \backslash
3081 usepackage{comment}
3082 \end_layout
3083
3084 \begin_layout LyX-Code
3085
3086 \backslash
3087 includecomment{comment}
3088 \end_layout
3089
3090 \begin_layout Standard
3091 See also 
3092 \begin_inset Flex URL
3093 status collapsed
3094
3095 \begin_layout Plain Layout
3096
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3098 \end_layout
3099
3100 \end_inset
3101
3102 .
3103 \change_inserted 1414654397 1302984017
3104
3105 \end_layout
3106
3107 \begin_layout Section
3108
3109 \change_inserted 1414654397 1302984017
3110 LyX Archives
3111 \end_layout
3112
3113 \begin_layout Standard
3114
3115 \change_inserted 1414654397 1302984082
3116 Users sometimes need to be able to 
3117 \begin_inset Quotes eld
3118 \end_inset
3119
3120 bundle
3121 \begin_inset Quotes erd
3122 \end_inset
3123
3124  a LyX file together with all the images (and other files) on which it depends,
3125  either for sending to a publisher or for sharing with a co-author.
3126  LyX 2.0 includes a Python script (
3127 \begin_inset Flex Code
3128 status collapsed
3129
3130 \begin_layout Plain Layout
3131
3132 \change_inserted 1414654397 1302984017
3133 lyxpak.py
3134 \end_layout
3135
3136 \end_inset
3137
3138 ) that automates this process.
3139  To use it, you must have either the 
3140 \begin_inset Flex Code
3141 status collapsed
3142
3143 \begin_layout Plain Layout
3144
3145 \change_inserted 1414654397 1302984053
3146 zipfile
3147 \change_unchanged
3148
3149 \end_layout
3150
3151 \end_inset
3152
3153  or 
3154 \begin_inset Flex Code
3155 status collapsed
3156
3157 \begin_layout Plain Layout
3158
3159 \change_inserted 1414654397 1302984046
3160 tarfile
3161 \change_unchanged
3162
3163 \end_layout
3164
3165 \end_inset
3166
3167  python modules installed on your system.
3168  By default, the script prefers the 
3169 \begin_inset Flex Code
3170 status collapsed
3171
3172 \begin_layout Plain Layout
3173
3174 \change_inserted 1414654397 1302984059
3175 gzip
3176 \change_unchanged
3177
3178 \end_layout
3179
3180 \end_inset
3181
3182 -compressed 
3183 \begin_inset Flex Code
3184 status collapsed
3185
3186 \begin_layout Plain Layout
3187
3188 \change_inserted 1414654397 1302984063
3189 tar
3190 \change_unchanged
3191
3192 \end_layout
3193
3194 \end_inset
3195
3196  format on Unix-like systems and the 
3197 \begin_inset Flex Code
3198 status collapsed
3199
3200 \begin_layout Plain Layout
3201
3202 \change_inserted 1414654397 1302984068
3203 zip
3204 \change_unchanged
3205
3206 \end_layout
3207
3208 \end_inset
3209
3210  format on Windows.
3211 \end_layout
3212
3213 \begin_layout Standard
3214
3215 \change_inserted 1414654397 1302984108
3216 LyX's configuration process will set the script up to export a `LyX Archive',
3217  and this format will then be available under 
3218 \begin_inset Flex Code
3219 status collapsed
3220
3221 \begin_layout Plain Layout
3222
3223 \change_inserted 1414654397 1302984108
3224 File\SpecialChar \menuseparator
3225 Export
3226 \change_unchanged
3227
3228 \end_layout
3229
3230 \end_inset
3231
3232 .
3233 \end_layout
3234
3235 \begin_layout Standard
3236
3237 \change_inserted 1414654397 1302984150
3238 Independently of the platform, the generation of a particular archive format
3239  can be forced by adding either the 
3240 \begin_inset Flex Code
3241 status collapsed
3242
3243 \begin_layout Plain Layout
3244
3245 \change_inserted 1414654397 1302984113
3246 -t
3247 \change_unchanged
3248
3249 \end_layout
3250
3251 \end_inset
3252
3253  (for the 
3254 \begin_inset Flex Code
3255 status collapsed
3256
3257 \begin_layout Plain Layout
3258
3259 \change_inserted 1414654397 1302984117
3260 tar
3261 \change_unchanged
3262
3263 \end_layout
3264
3265 \end_inset
3266
3267  format) or 
3268 \begin_inset Flex Code
3269 status collapsed
3270
3271 \begin_layout Plain Layout
3272
3273 \change_inserted 1414654397 1302984121
3274 -z
3275 \change_unchanged
3276
3277 \end_layout
3278
3279 \end_inset
3280
3281  (for the 
3282 \begin_inset Flex Code
3283 status collapsed
3284
3285 \begin_layout Plain Layout
3286
3287 \change_inserted 1414654397 1302984125
3288 zip
3289 \change_unchanged
3290
3291 \end_layout
3292
3293 \end_inset
3294
3295  format) switch to the 
3296 \begin_inset Flex Code
3297 status collapsed
3298
3299 \begin_layout Plain Layout
3300
3301 \change_inserted 1414654397 1302984131
3302 LyX\SpecialChar \menuseparator
3303 LyX Archive
3304 \change_unchanged
3305
3306 \end_layout
3307
3308 \end_inset
3309
3310  converter in 
3311 \begin_inset Flex Code
3312 status collapsed
3313
3314 \begin_layout Plain Layout
3315
3316 \change_inserted 1414654397 1302984137
3317 Tools\SpecialChar \menuseparator
3318 Preferences\SpecialChar \menuseparator
3319 File Handling\SpecialChar \menuseparator
3320 Converters
3321 \change_unchanged
3322
3323 \end_layout
3324
3325 \end_inset
3326
3327 .
3328  (Make sure you add the switch after the script name, not before it.)
3329 \change_unchanged
3330
3331 \end_layout
3332
3333 \begin_layout Section
3334 Fancy Headers and Footers
3335 \end_layout
3336
3337 \begin_layout Standard
3338 The default page layout is rather plain; for an 
3339 \begin_inset Flex Code
3340 status collapsed
3341
3342 \begin_layout Plain Layout
3343 article
3344 \end_layout
3345
3346 \end_inset
3347
3348  document class, all you get is a centered page number at the bottom of
3349  the page.
3350  This document uses KOMA-script's book class, so it appears to be a bit
3351  fancier.
3352  But to really put on a show, you need to set the document page style to
3353  
3354 \begin_inset Quotes eld
3355 \end_inset
3356
3357 fancy
3358 \begin_inset Quotes erd
3359 \end_inset
3360
3361 , as mentioned in the 
3362 \emph on
3363 User Guide
3364 \emph default
3365 .
3366  This section describes the LaTeX code you need to insert in your LaTeX
3367  preamble in order to get the desired effects.
3368 \end_layout
3369
3370 \begin_layout Standard
3371 For more information on fancy headers, see the 
3372 \begin_inset Flex Code
3373 status collapsed
3374
3375 \begin_layout Plain Layout
3376 fancyhdr
3377 \end_layout
3378
3379 \end_inset
3380
3381  package documentation.
3382  (
3383 \begin_inset Flex URL
3384 status collapsed
3385
3386 \begin_layout Plain Layout
3387
3388 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3389 \end_layout
3390
3391 \end_inset
3392
3393 )
3394 \end_layout
3395
3396 \begin_layout Standard
3397 The page header is divided into three fields, not surprisingly labeled 
3398 \begin_inset Quotes eld
3399 \end_inset
3400
3401 left
3402 \begin_inset Quotes erd
3403 \end_inset
3404
3405
3406 \begin_inset Quotes eld
3407 \end_inset
3408
3409 center
3410 \begin_inset Quotes erd
3411 \end_inset
3412
3413 , and 
3414 \begin_inset Quotes eld
3415 \end_inset
3416
3417 right
3418 \begin_inset Quotes erd
3419 \end_inset
3420
3421 .
3422  The footer is also divided into these three fields.
3423  The LaTeX commands to set these fields in the simplest manner are 
3424 \begin_inset Flex Code
3425 status collapsed
3426
3427 \begin_layout Plain Layout
3428
3429 \backslash
3430 lhead
3431 \end_layout
3432
3433 \end_inset
3434
3435
3436 \begin_inset Flex Code
3437 status collapsed
3438
3439 \begin_layout Plain Layout
3440
3441 \backslash
3442 chead
3443 \end_layout
3444
3445 \end_inset
3446
3447
3448 \begin_inset Flex Code
3449 status collapsed
3450
3451 \begin_layout Plain Layout
3452
3453 \backslash
3454 rhead
3455 \end_layout
3456
3457 \end_inset
3458
3459
3460 \begin_inset Flex Code
3461 status collapsed
3462
3463 \begin_layout Plain Layout
3464
3465 \backslash
3466 lfoot
3467 \end_layout
3468
3469 \end_inset
3470
3471 , etc.
3472  Suppose you wish to put your name in the upper left hand corner of each
3473  page.
3474  Simply insert the following command in the preamble: 
3475 \end_layout
3476
3477 \begin_layout Standard
3478
3479 \family typewriter
3480
3481 \backslash
3482 lhead{John Q.
3483  DocWriter}
3484 \end_layout
3485
3486 \begin_layout Standard
3487 You will now see your name in the upper left.
3488  If a field has a default entry that you would like to get rid of (often
3489  the page number appears in the central footer, simply include a command
3490  with a blank argument, e.
3491 \begin_inset space \thinspace{}
3492 \end_inset
3493
3494 g.:
3495 \end_layout
3496
3497 \begin_layout Standard
3498
3499 \family typewriter
3500
3501 \backslash
3502 cfoot{}
3503 \end_layout
3504
3505 \begin_layout Standard
3506 Let's get really fancy: lets put the section number with the word 
3507 \begin_inset Quotes eld
3508 \end_inset
3509
3510 Section
3511 \begin_inset Quotes erd
3512 \end_inset
3513
3514  (e.
3515 \begin_inset space \thinspace{}
3516 \end_inset
3517
3518 g.
3519 \begin_inset space \space{}
3520 \end_inset
3521
3522 Section 3) in the upper left, the page number (e.
3523 \begin_inset space \thinspace{}
3524 \end_inset
3525
3526 g.
3527 \begin_inset space \space{}
3528 \end_inset
3529
3530 Page 4) in the upper right, your name in the lower left, and the date in
3531  the lower right.
3532  The following commands should now appear in the preamble:
3533 \end_layout
3534
3535 \begin_layout Standard
3536
3537 \family typewriter
3538
3539 \backslash
3540 lhead{Section 
3541 \backslash
3542 thesection}
3543 \end_layout
3544
3545 \begin_layout Standard
3546
3547 \family typewriter
3548
3549 \backslash
3550 chead{}
3551 \end_layout
3552
3553 \begin_layout Standard
3554
3555 \family typewriter
3556
3557 \backslash
3558 rhead{Page 
3559 \backslash
3560 thepage}
3561 \end_layout
3562
3563 \begin_layout Standard
3564
3565 \family typewriter
3566
3567 \backslash
3568 lfoot{John Q.
3569  DocWriter}
3570 \end_layout
3571
3572 \begin_layout Standard
3573
3574 \family typewriter
3575
3576 \backslash
3577 cfoot{}
3578 \end_layout
3579
3580 \begin_layout Standard
3581
3582 \family typewriter
3583
3584 \backslash
3585 rfoot{
3586 \backslash
3587 today}
3588 \end_layout
3589
3590 \begin_layout Standard
3591 The commands 
3592 \begin_inset Flex Code
3593 status collapsed
3594
3595 \begin_layout Plain Layout
3596
3597 \backslash
3598 thesection
3599 \end_layout
3600
3601 \end_inset
3602
3603  and 
3604 \begin_inset Flex Code
3605 status collapsed
3606
3607 \begin_layout Plain Layout
3608
3609 \backslash
3610 thepage
3611 \end_layout
3612
3613 \end_inset
3614
3615  access LaTeX's section and page counters, and so print out the current
3616  section and page numbers.
3617  
3618 \begin_inset Flex Code
3619 status collapsed
3620
3621 \begin_layout Plain Layout
3622
3623 \backslash
3624 today
3625 \end_layout
3626
3627 \end_inset
3628
3629  simply prints out today's date.
3630 \end_layout
3631
3632 \begin_layout Standard
3633 The thicknesses of the horizontal rules drawn beneath the header and above
3634  the footer can also be modified.
3635  If you don't want one of the rules, set its thickness to 0.
3636  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3637  Use commands
3638 \family typewriter
3639  
3640 \family default
3641 like 
3642 \begin_inset Flex Code
3643 status collapsed
3644
3645 \begin_layout Plain Layout
3646
3647 \backslash
3648 renewcommand{
3649 \backslash
3650 headrulewidth}{0.4pt}
3651 \end_layout
3652
3653 \end_inset
3654
3655  and 
3656 \begin_inset Flex Code
3657 status collapsed
3658
3659 \begin_layout Plain Layout
3660
3661 \backslash
3662 renewcommand{
3663 \backslash
3664 footrulewidth}{0.4pt}
3665 \end_layout
3666
3667 \end_inset
3668
3669  to set the thicknesses.
3670 \end_layout
3671
3672 \begin_layout Standard
3673 You can switch the header/footer settings on and off for individual pages
3674  using commands like 
3675 \begin_inset Flex Code
3676 status collapsed
3677
3678 \begin_layout Plain Layout
3679
3680 \backslash
3681 thispagestyle{empty}
3682 \end_layout
3683
3684 \end_inset
3685
3686
3687 \begin_inset Flex Code
3688 status collapsed
3689
3690 \begin_layout Plain Layout
3691
3692 \backslash
3693 thispagestyle{plain}
3694 \end_layout
3695
3696 \end_inset
3697
3698 , and 
3699 \begin_inset Flex Code
3700 status collapsed
3701
3702 \begin_layout Plain Layout
3703
3704 \backslash
3705 thispagestyle{fancy}
3706 \end_layout
3707
3708 \end_inset
3709
3710 .
3711  Simply insert them in the text on the page you want changed and mark them
3712  as TeX code.
3713  In fact, title pages are marked as plain by default, while following pages
3714  are marked fancy when using the global fancy setting.
3715 \end_layout
3716
3717 \begin_layout Standard
3718 As a final example, it is possible to include an image in the header or
3719  footer.
3720  Suppose you want to put a company logo in the upper lefthand corner.
3721  You might try something like
3722 \end_layout
3723
3724 \begin_layout Standard
3725
3726 \family typewriter
3727
3728 \backslash
3729 lhead{
3730 \backslash
3731 resizebox{1in}{!}{
3732 \backslash
3733 includegraphics{logo.eps}}}
3734 \end_layout
3735
3736 \begin_layout Standard
3737 \noindent
3738 (you may need to preface this with 
3739 \begin_inset Flex Code
3740 status collapsed
3741
3742 \begin_layout Plain Layout
3743 \noindent
3744
3745 \backslash
3746 usepackage{graphics}
3747 \end_layout
3748
3749 \end_inset
3750
3751  if you don't include graphics elsewhere in your document).
3752 \end_layout
3753
3754 \begin_layout Section
3755 Itemize Bullet Selection
3756 \begin_inset CommandInset label
3757 LatexCommand label
3758 name "sec:bullet"
3759
3760 \end_inset
3761
3762
3763 \end_layout
3764
3765 \begin_layout Standard
3766 by
3767 \noun on
3768  Allan Rae
3769 \end_layout
3770
3771 \begin_layout Subsection
3772 Introduction
3773 \end_layout
3774
3775 \begin_layout Standard
3776 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3777  Using this dialog you can easily specify what bullet shape to use at each
3778  level of an itemized list.
3779  These settings are document-wide so you won't be able to specify different
3780  sets of bullets for different paragraphs.
3781 \begin_inset Foot
3782 status collapsed
3783
3784 \begin_layout Plain Layout
3785 Well, actually you can but you'll have to do it by hand.
3786 \end_layout
3787
3788 \end_inset
3789
3790
3791 \end_layout
3792
3793 \begin_layout Subsection
3794 How it looks
3795 \end_layout
3796
3797 \begin_layout Standard
3798 Open the dialog by selecting the 
3799 \begin_inset Flex MenuItem
3800 status collapsed
3801
3802 \begin_layout Plain Layout
3803 Document\SpecialChar \menuseparator
3804 Settings
3805 \end_layout
3806
3807 \end_inset
3808
3809  menu item and then select the 
3810 \begin_inset Flex MenuItem
3811 status collapsed
3812
3813 \begin_layout Plain Layout
3814 Bullets
3815 \end_layout
3816
3817 \end_inset
3818
3819  tab.
3820 \end_layout
3821
3822 \begin_layout Standard
3823 The dialog provides you with a table of bullet shapes.
3824  A column of buttons on the left of the table provides access to the six
3825  different panels of bullet shapes.
3826  The row of buttons across the top is used to select which bullet depth
3827  you are changing.
3828  A text entry under the table shows the currently selected bullet shape's
3829  LaTeX equivalent and this can be edited if desired.
3830  If you do modify the text you will also need to specify any needed packages
3831  in the LaTeX preamble.
3832 \end_layout
3833
3834 \begin_layout Standard
3835 The six panels are divided up by the packages they require.
3836  The following table shows the mappings from button name to LaTeX packages.
3837 \end_layout
3838
3839 \begin_layout Standard
3840 \align center
3841 \begin_inset Tabular
3842 <lyxtabular version="3" rows="7" columns="2">
3843 <features tabularvalignment="middle">
3844 <column alignment="center" valignment="top" width="0pt">
3845 <column alignment="center" valignment="top" width="0pt">
3846 <row>
3847 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3848 \begin_inset Text
3849
3850 \begin_layout Plain Layout
3851
3852 \family roman
3853 \series medium
3854 \shape up
3855 \size normal
3856 \emph off
3857 \bar no
3858 \noun off
3859 \color none
3860 Button
3861 \end_layout
3862
3863 \end_inset
3864 </cell>
3865 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3866 \begin_inset Text
3867
3868 \begin_layout Plain Layout
3869
3870 \family roman
3871 \series medium
3872 \shape up
3873 \size normal
3874 \emph off
3875 \bar no
3876 \noun off
3877 \color none
3878 Packages Required
3879 \end_layout
3880
3881 \end_inset
3882 </cell>
3883 </row>
3884 <row>
3885 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3886 \begin_inset Text
3887
3888 \begin_layout Plain Layout
3889
3890 \family sans
3891 \series medium
3892 \shape up
3893 \size normal
3894 \emph off
3895 \bar no
3896 \noun off
3897 \color none
3898 Standard
3899 \end_layout
3900
3901 \end_inset
3902 </cell>
3903 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3904 \begin_inset Text
3905
3906 \begin_layout Plain Layout
3907
3908 \series medium
3909 \shape up
3910 \size normal
3911 \emph off
3912 \bar no
3913 \noun off
3914 \color none
3915 base LaTeX
3916 \end_layout
3917
3918 \end_inset
3919 </cell>
3920 </row>
3921 <row>
3922 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3923 \begin_inset Text
3924
3925 \begin_layout Plain Layout
3926
3927 \family sans
3928 \series medium
3929 \shape up
3930 \size normal
3931 \emph off
3932 \bar no
3933 \noun off
3934 \color none
3935 Maths
3936 \end_layout
3937
3938 \end_inset
3939 </cell>
3940 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3941 \begin_inset Text
3942
3943 \begin_layout Plain Layout
3944
3945 \family typewriter
3946 \series medium
3947 \shape up
3948 \size normal
3949 \emph off
3950 \bar no
3951 \noun off
3952 \color none
3953 amssymb.sty
3954 \end_layout
3955
3956 \end_inset
3957 </cell>
3958 </row>
3959 <row>
3960 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3961 \begin_inset Text
3962
3963 \begin_layout Plain Layout
3964
3965 \family sans
3966 \series medium
3967 \shape up
3968 \size normal
3969 \emph off
3970 \bar no
3971 \noun off
3972 \color none
3973 Ding1
3974 \end_layout
3975
3976 \end_inset
3977 </cell>
3978 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3979 \begin_inset Text
3980
3981 \begin_layout Plain Layout
3982
3983 \family typewriter
3984 \series medium
3985 \shape up
3986 \size normal
3987 \emph off
3988 \bar no
3989 \noun off
3990 \color none
3991 pifont.sty
3992 \end_layout
3993
3994 \end_inset
3995 </cell>
3996 </row>
3997 <row>
3998 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3999 \begin_inset Text
4000
4001 \begin_layout Plain Layout
4002
4003 \family sans
4004 \series medium
4005 \shape up
4006 \size normal
4007 \emph off
4008 \bar no
4009 \noun off
4010 \color none
4011 Ding2
4012 \end_layout
4013
4014 \end_inset
4015 </cell>
4016 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4017 \begin_inset Text
4018
4019 \begin_layout Plain Layout
4020
4021 \family typewriter
4022 \series medium
4023 \shape up
4024 \size normal
4025 \emph off
4026 \bar no
4027 \noun off
4028 \color none
4029 pifont.sty
4030 \end_layout
4031
4032 \end_inset
4033 </cell>
4034 </row>
4035 <row>
4036 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4037 \begin_inset Text
4038
4039 \begin_layout Plain Layout
4040
4041 \family sans
4042 \series medium
4043 \shape up
4044 \size normal
4045 \emph off
4046 \bar no
4047 \noun off
4048 \color none
4049 Ding3
4050 \end_layout
4051
4052 \end_inset
4053 </cell>
4054 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4055 \begin_inset Text
4056
4057 \begin_layout Plain Layout
4058
4059 \family typewriter
4060 \series medium
4061 \shape up
4062 \size normal
4063 \emph off
4064 \bar no
4065 \noun off
4066 \color none
4067 pifont.sty
4068 \end_layout
4069
4070 \end_inset
4071 </cell>
4072 </row>
4073 <row>
4074 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4075 \begin_inset Text
4076
4077 \begin_layout Plain Layout
4078
4079 \family sans
4080 \series medium
4081 \shape up
4082 \size normal
4083 \emph off
4084 \bar no
4085 \noun off
4086 \color none
4087 Ding4
4088 \end_layout
4089
4090 \end_inset
4091 </cell>
4092 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4093 \begin_inset Text
4094
4095 \begin_layout Plain Layout
4096
4097 \family typewriter
4098 \series medium
4099 \shape up
4100 \size normal
4101 \emph off
4102 \bar no
4103 \noun off
4104 \color none
4105 pifont.sty
4106 \end_layout
4107
4108 \end_inset
4109 </cell>
4110 </row>
4111 </lyxtabular>
4112
4113 \end_inset
4114
4115
4116 \end_layout
4117
4118 \begin_layout Standard
4119 LyX doesn't stop you using bullets from packages you don't have.
4120  If you get errors from LaTeX when you try to view or print the file, then
4121  it is likely you are missing a package.
4122 \begin_inset Foot
4123 status collapsed
4124
4125 \begin_layout Plain Layout
4126 LyX doesn't restrict your use since you may be editing locally and exporting
4127  elsewhere.
4128 \end_layout
4129
4130 \end_inset
4131
4132
4133 \end_layout
4134
4135 \begin_layout Subsection
4136 How to use it
4137 \end_layout
4138
4139 \begin_layout Standard
4140 Select which bullet depth you want to change then select the bullet shape
4141  and size.
4142  Any changes will not be visible in LyX, but are visible when viewing the
4143  document.
4144 \end_layout
4145
4146 \begin_layout Standard
4147 You can reset a bullet shape to the default simply by clicking your right
4148  mouse button on the appropriate bullet depth button.
4149 \begin_inset Foot
4150 status collapsed
4151
4152 \begin_layout Plain Layout
4153 If you 
4154 \emph on
4155 really
4156 \emph default
4157  want to have multiple sets of paragraphs with different sets of bullets
4158  in each, then you're going to have to get your hands dirty with TeX code.
4159  The bullet selection dialog can help though because it provides you with
4160  the LaTeX code for a wide range of bullet shapes.
4161  To make your own custom paragraphs you have the following options:
4162 \end_layout
4163
4164 \begin_layout Plain Layout
4165 \begin_inset ERT
4166 status open
4167
4168 \begin_layout Plain Layout
4169
4170
4171 \backslash
4172 let
4173 \backslash
4174 savelabelitemi=
4175 \backslash
4176 labelitemi
4177 \end_layout
4178
4179 \end_inset
4180
4181
4182 \end_layout
4183
4184 \begin_layout Plain Layout
4185 \begin_inset ERT
4186 status open
4187
4188 \begin_layout Plain Layout
4189
4190
4191 \backslash
4192 renewcommand
4193 \backslash
4194 labelitemi[0]{
4195 \backslash
4196 small
4197 \backslash
4198 (
4199 \backslash
4200 sharp
4201 \backslash
4202 )}
4203 \end_layout
4204
4205 \end_inset
4206
4207
4208 \end_layout
4209
4210 \begin_layout Itemize
4211 Use the LaTeX command 
4212 \begin_inset Flex Code
4213 status collapsed
4214
4215 \begin_layout Plain Layout
4216
4217 \backslash
4218 renewcommand{}{}
4219 \end_layout
4220
4221 \end_inset
4222
4223  to specify a new bullet shape for a given depth.
4224  You'll also need to save the current bullet shape so you can restore it
4225  again afterwards.
4226  In this itemized list the following LaTeX code was used to change the bullet
4227  used for the first depth.
4228 \end_layout
4229
4230 \begin_deeper
4231 \begin_layout LyX-Code
4232
4233 \backslash
4234 let
4235 \backslash
4236 savelabelitemi=
4237 \backslash
4238 labelitemi 
4239 \end_layout
4240
4241 \begin_layout LyX-Code
4242
4243 \backslash
4244 renewcommand
4245 \backslash
4246 labelitemi[0]{
4247 \backslash
4248 small
4249 \backslash
4250 (
4251 \backslash
4252 sharp
4253 \backslash
4254 )}
4255 \end_layout
4256
4257 \end_deeper
4258 \begin_layout Itemize
4259 Note that the itemize depth is specified in Roman numerals as part of the
4260  
4261 \family typewriter
4262
4263 \backslash
4264 labelitem
4265 \family default
4266  command.
4267 \end_layout
4268
4269 \begin_layout Itemize
4270 \begin_inset ERT
4271 status open
4272
4273 \begin_layout Plain Layout
4274
4275 [
4276 \backslash
4277 (
4278 \backslash
4279 star
4280 \backslash
4281 )]
4282 \end_layout
4283
4284 \end_inset
4285
4286  Specify each individual entry by starting each item with the bullet shape
4287  enclosed in square brackets and set as 
4288 \begin_inset Flex MenuItem
4289 status collapsed
4290
4291 \begin_layout Plain Layout
4292 TeX Code
4293 \end_layout
4294
4295 \end_inset
4296
4297 .
4298  For example, this item was started with 
4299 \begin_inset Flex Code
4300 status collapsed
4301
4302 \begin_layout Plain Layout
4303 [
4304 \backslash
4305 (
4306 \backslash
4307 star
4308 \backslash
4309 )]
4310 \end_layout
4311
4312 \end_inset
4313
4314 .
4315 \end_layout
4316
4317 \begin_layout Plain Layout
4318 \begin_inset ERT
4319 status open
4320
4321 \begin_layout Plain Layout
4322
4323
4324 \backslash
4325 renewcommand
4326 \backslash
4327 labelitemi[0]{
4328 \backslash
4329 savelabelitemi}
4330 \end_layout
4331
4332 \end_inset
4333
4334
4335 \end_layout
4336
4337 \begin_layout Plain Layout
4338 You'll also need to revert the labelitem back to its previous setting for
4339  the global bullet shape settings to remain in effect.
4340  The way used here was:
4341 \end_layout
4342
4343 \begin_layout LyX-Code
4344
4345 \backslash
4346 renewcommand
4347 \backslash
4348 labelitemi[0]{
4349 \backslash
4350 savelabelitemi}
4351 \end_layout
4352
4353 \end_inset
4354
4355
4356 \end_layout
4357
4358 \begin_layout Chapter
4359 LyX and the World Wide Web
4360 \end_layout
4361
4362 \begin_layout Standard
4363 LyX has long supported the export of documents to various web-friendly formats,
4364  such as HTML.
4365  Before verson 2.0, however, HTML export was always accomplished by the use
4366  of external converters.
4367 \begin_inset Foot
4368 status collapsed
4369
4370 \begin_layout Plain Layout
4371 For details on the use of external converters with LyX, see the 
4372 \emph on
4373 Converters
4374 \emph default
4375  section of the Customization manual.
4376 \end_layout
4377
4378 \end_inset
4379
4380  These fall into two large groups: there are converters that use LaTeX as
4381  an intermediate format, such as 
4382 \begin_inset Flex Code
4383 status collapsed
4384
4385 \begin_layout Plain Layout
4386 htlatex
4387 \end_layout
4388
4389 \end_inset
4390
4391
4392 \begin_inset Flex Code
4393 status collapsed
4394
4395 \begin_layout Plain Layout
4396 html2latex
4397 \end_layout
4398
4399 \end_inset
4400
4401 , and 
4402 \begin_inset Flex Code
4403 status collapsed
4404
4405 \begin_layout Plain Layout
4406 plastex
4407 \end_layout
4408
4409 \end_inset
4410
4411 , relying upon LyX to produce the LaTeX; and there is a converter that works
4412  directly on LyX files, 
4413 \begin_inset Flex Code
4414 status collapsed
4415
4416 \begin_layout Plain Layout
4417 eLyXer
4418 \end_layout
4419
4420 \end_inset
4421
4422 .
4423  All of these have different advantages and disadvantages.
4424  
4425 \end_layout
4426
4427 \begin_layout Standard
4428 The LaTeX-based converters have the advantage that, in principle, they know
4429  everything about the exported document that LaTeX does.
4430  Such converters do not care, for example, if a certain block of code was
4431  produced by LyX or was Evil Red Text.
4432  These converters know about 
4433 \begin_inset Flex Code
4434 status collapsed
4435
4436 \begin_layout Plain Layout
4437 aux
4438 \end_layout
4439
4440 \end_inset
4441
4442  files, counters, and references, and can often make use of the 
4443 \begin_inset Flex Code
4444 status collapsed
4445
4446 \begin_layout Plain Layout
4447 bbl
4448 \end_layout
4449
4450 \end_inset
4451
4452  files generated by BibTeX.
4453  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4454  said that only TeX itself understands TeX---and LaTeX-based converters
4455  will often choke on what seem to be quite simple constructs; complex ones
4456  can throw them completely, and as of this writing, for example, the 
4457 \emph on
4458 Embedded Objects
4459 \emph default
4460  manual will not export with 
4461 \begin_inset Flex Code
4462 status collapsed
4463
4464 \begin_layout Plain Layout
4465 htlatex
4466 \end_layout
4467
4468 \end_inset
4469
4470 , though the others will.
4471  The other issue concerns how math is handled.
4472  These converters typically convert the formulae into little pictures that
4473  are then linked from the HTML document.
4474  Since these are actually generated by LaTeX, they are accurate.
4475  But they do not scale well, and just getting them to look as if they are
4476  actually meant to be in your document---so that the font sizes seem to
4477  be roughly the same---can be a challenge.
4478 \end_layout
4479
4480 \begin_layout Standard
4481 Alex Fernandez's 
4482 \begin_inset Flex Code
4483 status collapsed
4484
4485 \begin_layout Plain Layout
4486 eLyXer
4487 \end_layout
4488
4489 \end_inset
4490
4491  (
4492 \begin_inset CommandInset href
4493 LatexCommand href
4494 name "http://elyxer.nongnu.org/"
4495 target "http://elyxer.nongnu.org/"
4496
4497 \end_inset
4498
4499 ) solves some of these problems.
4500  In particular, the formulae it produces scale perfectly, since it renders
4501  math using a combination of HTML and CSS rather than converting the formulae
4502  to images.
4503  But even moderately complex formula are rendered less well than with 
4504 \begin_inset Flex Code
4505 status collapsed
4506
4507 \begin_layout Plain Layout
4508 htlatex
4509 \end_layout
4510
4511 \end_inset
4512
4513 ; this reflects the limitations of HTML.
4514 \begin_inset Foot
4515 status collapsed
4516
4517 \begin_layout Plain Layout
4518 That said, 
4519 \begin_inset Flex Code
4520 status collapsed
4521
4522 \begin_layout Plain Layout
4523 eLyXer
4524 \end_layout
4525
4526 \end_inset
4527
4528  can also use jsMath and MathJax for equations, but this setting is only
4529  available globally and requires one to have access to a server that runs
4530  the backend.
4531 \end_layout
4532
4533 \end_inset
4534
4535  More importantly (as of version 1.1.1, at least), 
4536 \begin_inset Flex Code
4537 status collapsed
4538
4539 \begin_layout Plain Layout
4540 eLyXer
4541 \end_layout
4542
4543 \end_inset
4544
4545  has limited support for math macros and no support for user-defined paragraph
4546  or character styles.
4547  These limitations make 
4548 \begin_inset Flex Code
4549 status collapsed
4550
4551 \begin_layout Plain Layout
4552 eLyXer
4553 \end_layout
4554
4555 \end_inset
4556
4557  unsuitable for many of the documents LyX users produce.
4558  In principle, of course, these problems could be solved, but the LyX developers
4559  have decided to follow a different path and have made LyX itself capable
4560  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4561  plaintext.
4562 \end_layout
4563
4564 \begin_layout Standard
4565 As of this writing, XHTML output remains under development and should probably
4566  be regarded as 
4567 \begin_inset Quotes eld
4568 \end_inset
4569
4570 experimental
4571 \begin_inset Quotes erd
4572 \end_inset
4573
4574 .
4575 \begin_inset Foot
4576 status collapsed
4577
4578 \begin_layout Plain Layout
4579 The file 
4580 \begin_inset Flex Code
4581 status collapsed
4582
4583 \begin_layout Plain Layout
4584 development/HTML.notes
4585 \end_layout
4586
4587 \end_inset
4588
4589 , which can be found in the LyX source tree or 
4590 \begin_inset CommandInset href
4591 LatexCommand href
4592 name "accessed online"
4593 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4594
4595 \end_inset
4596
4597 , usually contains up-to-date information about the state of XHTML output.
4598  See also the list of XHTML bugs on 
4599 \begin_inset CommandInset href
4600 LatexCommand href
4601 name "the bug tracker"
4602 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4603
4604 \end_inset
4605
4606 .
4607 \end_layout
4608
4609 \end_inset
4610
4611  Still, the developers have chosen this approach because it has several
4612  potential advantages over the other two.
4613 \end_layout
4614
4615 \begin_layout Standard
4616 These advantages are primarily due to the fact that the XHTML output routines,
4617  since they are part of LyX, know everything LyX knows about the document
4618  being exported.
4619 \begin_inset Foot
4620 status collapsed
4621
4622 \begin_layout Plain Layout
4623 Another advantage is that, since these routines are internal to LyX, they
4624  are immune to changes in LyX's file format, or to changes in the semantics
4625  of existing insets.
4626 \end_layout
4627
4628 \end_inset
4629
4630  So they know about the table of contents (as displayed in the outline),
4631  about the counters associated with different paragraph styles, and about
4632  user-defined styles.
4633  The XHTML output routines know what LyX knows about internationalization,
4634  too, so they will output 
4635 \begin_inset Quotes eld
4636 \end_inset
4637
4638 Chapter 1
4639 \begin_inset Quotes erd
4640 \end_inset
4641
4642  or 
4643 \begin_inset Quotes eld
4644 \end_inset
4645
4646
4647 \lang ngerman
4648 Kapitel
4649 \lang english
4650  1
4651 \begin_inset Quotes erd
4652 \end_inset
4653
4654 , depending upon the language in effect at the time.
4655  
4656 \end_layout
4657
4658 \begin_layout Standard
4659 Quite generally, the output routines know what LyX knows about document
4660  layout, that is, about how the document is to be rendered on screen.
4661  We use this information when we output the document as XHTML.
4662  In particular, LyX 
4663 \emph on
4664 automatically
4665 \emph default
4666  generates CSS style information corresponding to the layout information
4667  it uses to render the document on screen: if section headings are supposed
4668  to be sans-serif and bold as seen in LyX, then (by default) they will be
4669  sans-serif and bold when viewed in a web browser, too.
4670  And this is true not just for pre-defined styles, like Section, but for
4671  any style, including user-defined styles.
4672  Indeed, the XHTML output routines make no distinction between user-defined
4673  paragraph and character styles and LyX's own pre-defined styles: in each
4674  case, everything LyX knows about the styles is contained in the layout
4675  files.
4676  And much the same is true as regards pre-defined textual insets, such as
4677  footnotes, and various custom insets.
4678  
4679 \end_layout
4680
4681 \begin_layout Standard
4682 The result is that XHTML output can be customized and extended in exactly
4683  the same way LaTeX output can be customized and extended: through layout
4684  files and modules.
4685  See chapter five of the 
4686 \emph on
4687 Customization 
4688 \emph default
4689 manual for the details.
4690 \end_layout
4691
4692 \begin_layout Standard
4693 The remainder of this chapter contains more detailed information on XHTML
4694  output, its limitations, and ways to work around those limitations.
4695 \end_layout
4696
4697 \begin_layout Section
4698 Math Output in XHTML
4699 \end_layout
4700
4701 \begin_layout Standard
4702 LyX offers four choices for how math is rendered.
4703  These have various advantages and disadvantages:
4704 \end_layout
4705
4706 \begin_layout Itemize
4707 MathML
4708 \begin_inset Newline newline
4709 \end_inset
4710
4711 MathML is a dialect of XML designed specifically for mathematics on the
4712  web, and it typically renders very well in browsers that support it.
4713  The disadvantage is that not all browsers support MathML, and support is
4714  not complete even in the Gecko-based browsers, such as Firefox.
4715 \begin_inset Newline newline
4716 \end_inset
4717
4718 If LyX is unable to render a formula as MathML---for example, if the formula
4719  uses the 
4720 \begin_inset Flex Code
4721 status collapsed
4722
4723 \begin_layout Plain Layout
4724 xymatrix
4725 \end_layout
4726
4727 \end_inset
4728
4729  package or ERT---then it will instead output the formula as an image.
4730  
4731 \end_layout
4732
4733 \begin_layout Itemize
4734 HTML
4735 \begin_inset Newline newline
4736 \end_inset
4737
4738 As mentioned above, 
4739 \begin_inset Flex Code
4740 status collapsed
4741
4742 \begin_layout Plain Layout
4743 elyxer
4744 \end_layout
4745
4746 \end_inset
4747
4748  outputs math as HTML, styled by CSS.
4749 \begin_inset Foot
4750 status collapsed
4751
4752 \begin_layout Plain Layout
4753 LyX has borrowed some of the CSS for its HTML output from 
4754 \begin_inset Flex Code
4755 status collapsed
4756
4757 \begin_layout Plain Layout
4758 elyxer
4759 \end_layout
4760
4761 \end_inset
4762
4763 .
4764 \end_layout
4765
4766 \end_inset
4767
4768  For simple formulae, this can work quite well, though with more complicated
4769  formulae it tends to break down.
4770  Still, this method has the advantage that it is very widely supported and
4771  so it may be appropriate for documents that contain only a little, fairly
4772  simple math.
4773 \begin_inset Newline newline
4774 \end_inset
4775
4776 If Lyx is unable to render a formula as HTML---for example, if the formula
4777  uses the 
4778 \begin_inset Flex Code
4779 status collapsed
4780
4781 \begin_layout Plain Layout
4782 xymatrix
4783 \end_layout
4784
4785 \end_inset
4786
4787  package or ERT---then it will instead output the formula as an image.
4788  
4789 \end_layout
4790
4791 \begin_layout Itemize
4792 Images
4793 \begin_inset Newline newline
4794 \end_inset
4795
4796 Like 
4797 \begin_inset Flex Code
4798 status collapsed
4799
4800 \begin_layout Plain Layout
4801 htlatex
4802 \end_layout
4803
4804 \end_inset
4805
4806 , LyX will output formulae as images, the very same images, in fact, that
4807  are used for instant preview.
4808 \begin_inset Foot
4809 status collapsed
4810
4811 \begin_layout Plain Layout
4812 Instant preview does 
4813 \emph on
4814 not 
4815 \emph default
4816 have to be on for images to be output, however.
4817 \end_layout
4818
4819 \end_inset
4820
4821  The advantage to this method is that the images are simply generated by
4822  LaTeX, so they are very accurate.
4823  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4824  so they do not scale terribly well, and one cannot copy them, etc.
4825  (As of this writing, there are also problems about equation numbering.
4826  See 
4827 \begin_inset CommandInset href
4828 LatexCommand href
4829 name "bug 6894"
4830 target "http://www.lyx.org/trac/ticket/6894"
4831
4832 \end_inset
4833
4834 .)
4835 \begin_inset Newline newline
4836 \end_inset
4837
4838 The size of the images can be controlled by setting the 
4839 \begin_inset Quotes eld
4840 \end_inset
4841
4842 Math Images Scaling
4843 \begin_inset Quotes erd
4844 \end_inset
4845
4846  parameter under 
4847 \begin_inset Flex MenuItem
4848 status collapsed
4849
4850 \begin_layout Plain Layout
4851 Document\SpecialChar \menuseparator
4852 Settings\SpecialChar \menuseparator
4853 Output
4854 \end_layout
4855
4856 \end_inset
4857
4858 .
4859 \begin_inset Foot
4860 status collapsed
4861
4862 \begin_layout Plain Layout
4863 For those who want to know, this controls the resolution of the image in
4864  dots per inch and is based upon a default of 75 dpi.
4865 \end_layout
4866
4867 \end_inset
4868
4869
4870 \begin_inset Newline newline
4871 \end_inset
4872
4873 If LyX for some reason fails to create an image for a formula (e.g., if a
4874  required LaTeX package is not installed), then it will fall back to outputing
4875  the raw LaTeX.
4876 \end_layout
4877
4878 \begin_layout Itemize
4879 LaTeX
4880 \begin_inset Newline newline
4881 \end_inset
4882
4883 Finally, LyX will happily output math as LaTeX.
4884  As well as being the output of last resort, this method can be used with
4885  such tools as 
4886 \begin_inset CommandInset href
4887 LatexCommand href
4888 name "jsMath"
4889 target "http://www.math.union.edu/~dpvc/jsMath/"
4890
4891 \end_inset
4892
4893 , which uses JavaScript to render LaTeX embedded in HTML documents.
4894  LyX wraps the LaTeX in either a 
4895 \begin_inset Flex Code
4896 status collapsed
4897
4898 \begin_layout Plain Layout
4899 span
4900 \end_layout
4901
4902 \end_inset
4903
4904  (for inline formulas) or 
4905 \begin_inset Flex Code
4906 status collapsed
4907
4908 \begin_layout Plain Layout
4909 div
4910 \end_layout
4911
4912 \end_inset
4913
4914  (for displayed formulas) with 
4915 \begin_inset Flex Code
4916 status collapsed
4917
4918 \begin_layout Plain Layout
4919 class='math'
4920 \end_layout
4921
4922 \end_inset
4923
4924 , as is required for jsMath.
4925 \end_layout
4926
4927 \begin_layout Standard
4928 One of these output methods must be selected under 
4929 \begin_inset Flex MenuItem
4930 status collapsed
4931
4932 \begin_layout Plain Layout
4933 Document\SpecialChar \menuseparator
4934 Settings\SpecialChar \menuseparator
4935 Output
4936 \end_layout
4937
4938 \end_inset
4939
4940 .
4941  By default, LyX outputs MathML.
4942  This is a document-wide setting, therefore.
4943 \end_layout
4944
4945 \begin_layout Standard
4946 Eventually, LyX will offer the user the option to select an alternate output
4947  method for a particular inset, say, one that isn't being rendered very
4948  well by MathML.
4949 \begin_inset Foot
4950 status collapsed
4951
4952 \begin_layout Plain Layout
4953 That said, since LyX falls back to images if the inset contains ERT, then
4954  one can force output as an image by putting some harmless ERT into the
4955  math, for example: 
4956 \begin_inset Formula $a=b\relax$
4957 \end_inset
4958
4959 .
4960 \end_layout
4961
4962 \end_inset
4963
4964
4965 \end_layout
4966
4967 \begin_layout Section
4968 Bibliography and Citations
4969 \end_layout
4970
4971 \begin_layout Standard
4972 XHTML output fully supports bibliographies and citations.
4973  
4974 \end_layout
4975
4976 \begin_layout Standard
4977 Citation labels are generated by the same machinery that generates LyX's
4978  on-screen labels, so the labels will look in the output much as they do
4979  in LyX, though better.
4980  If you are using numerical citations, then LyX will output numerical labels,
4981  such as [1] or [17], rather than simply showing the citation key in square
4982  brackets, as it does on-screen.
4983  If you are using author-year citations, then LyX will add lowercase letters
4984  to the years, just as BibTeX does, if it finds more than one citation for
4985  a given author-year combination.
4986  The labels will be printed with the bibliography entries.
4987  Note that there is, at present, no way to customize the appearance of the
4988  labels, for example, to choose between square brackets and parentheses.
4989 \end_layout
4990
4991 \begin_layout Standard
4992 Bibliography output is handled by the same machinery that handles the presentati
4993 on of reference information in the citation dialog, so you will see in the
4994  XHTML output pretty much what you would see if you were to look at a given
4995  entry in the citation dialog.
4996  The formatting can be customized in your layout file or, preferably, in
4997  a module.
4998  See the 
4999 \emph on
5000 Customization
5001 \emph default
5002  manual for the details.
5003 \end_layout
5004
5005 \begin_layout Standard
5006 The main defect at present is that cross-referenced information is printed
5007  with every entry with which it is associated.
5008  So you can see things like this:
5009 \end_layout
5010
5011 \begin_layout Quote
5012 Jason Stanley, 
5013 \begin_inset Quotes eld
5014 \end_inset
5015
5016 Context and Logical Form
5017 \begin_inset Quotes erd
5018 \end_inset
5019
5020 , in 
5021 \emph on
5022 Language in Context: Selected Essays
5023 \emph default
5024  (Oxford: Oxford University Press, 2007), pp.
5025  30--68.
5026 \end_layout
5027
5028 \begin_layout Quote
5029 Jason Stanley, 
5030 \begin_inset Quotes eld
5031 \end_inset
5032
5033 Semantics in Context
5034 \begin_inset Quotes erd
5035 \end_inset
5036
5037 , in 
5038 \emph on
5039 Language in Context: Selected Essays
5040 \emph default
5041  (Oxford: Oxford University Press, 2007), pp.
5042  201--30.
5043 \end_layout
5044
5045 \begin_layout Standard
5046 This should be fixed before long.
5047 \end_layout
5048
5049 \begin_layout Standard
5050 There is no support at present for sectioned bibliographies.
5051  If you have multiple bibliographies, then LyX will print the same bibliography
5052  over and over.
5053 \end_layout
5054
5055 \begin_layout Section
5056 Indexes
5057 \end_layout
5058
5059 \begin_layout Standard
5060 LyX will happily export indexes as XHTML, but with certain limitations at
5061  the moment.
5062 \end_layout
5063
5064 \begin_layout Standard
5065 Index export will be most reliable when you do not attempt to use the fancy
5066  constructs that are described in the section on indexes in the 
5067 \emph on
5068 User's Guide
5069 \emph default
5070 .
5071 \begin_inset Foot
5072 status collapsed
5073
5074 \begin_layout Plain Layout
5075 The main issue here is that LyX itself does not really handle these.
5076  It just lets you enter what you would have to enter in raw LaTeX.
5077 \end_layout
5078
5079 \end_inset
5080
5081  We'll describe how they are handled using the subsection headings from
5082  that section.
5083 \end_layout
5084
5085 \begin_layout Itemize
5086 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5087  these, but the entries must be separated by 
5088 \begin_inset Quotes eld
5089 \end_inset
5090
5091  ! 
5092 \begin_inset Quotes erd
5093 \end_inset
5094
5095 , that is, there must be spaces around the exclamation point.
5096  This is because it is otherwise too difficult to check for escaped exclamation
5097  points, ones in math, and so forth.
5098 \end_layout
5099
5100 \begin_layout Itemize
5101 Page Ranges: There is no support at all for page ranges, since these make
5102  no sense with XHMTL.
5103  Instead, you will just get two index entries, one at either end.
5104 \end_layout
5105
5106 \begin_layout Itemize
5107 Cross-referencing: There is no support for cross-referencing.
5108  If LyX finds an entry containing the 
5109 \begin_inset Quotes eld
5110 \end_inset
5111
5112 |see\SpecialChar \ldots{}
5113
5114 \begin_inset Quotes erd
5115 \end_inset
5116
5117  construct, it is just dropped, and the rest is treated as an ordinary index
5118  entry.
5119 \end_layout
5120
5121 \begin_layout Itemize
5122 Index Entry Order: LyX does support attempts to fix the sorting order.
5123  It will take what is before the first `@' it finds and use that for sorting,
5124  taking what follows the first `@' to be the actual entry.
5125  At present, LyX does not check for escaped `@', so do not try to index
5126  email addresses.
5127 \end_layout
5128
5129 \begin_layout Itemize
5130 Index Entry Layout: You can format entries by using the text style dialog,
5131  or by using any other method available within LyX itself.
5132  There is no support for constructs like: 
5133 \begin_inset Quotes eld
5134 \end_inset
5135
5136 entry|textbf
5137 \begin_inset Quotes erd
5138 \end_inset
5139
5140 .
5141  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5142  and everything that follows it.
5143 \end_layout
5144
5145 \begin_layout Itemize
5146 Multiple Indexes: There is no support for multiple indexes.
5147  Rather, all index entries will be printed as one large index.
5148  To avoid our printing several versions of the index, we print only the
5149  main index, so make sure you have one.
5150 \end_layout
5151
5152 \begin_layout Section
5153 Nomenclature and Glossary
5154 \end_layout
5155
5156 \begin_layout Standard
5157 There is at present no support for glossaries.
5158  Adding it would be fairly trivial, and welcome.
5159 \end_layout
5160
5161 \begin_layout Chapter
5162 The LyX Server
5163 \end_layout
5164
5165 \begin_layout Section
5166 Introduction
5167 \end_layout
5168
5169 \begin_layout Standard
5170 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5171  and retrieve information about the LyX internal state.
5172  This is only intended for advanced users, but they should find it useful.
5173  It is by writing to the LyX server, for example, that bibliography managers,
5174  such as JabRef, are able to 
5175 \begin_inset Quotes eld
5176 \end_inset
5177
5178 push
5179 \begin_inset Quotes erd
5180 \end_inset
5181
5182  citations to LyX.
5183 \end_layout
5184
5185 \begin_layout Section
5186 Starting the LyX Server
5187 \end_layout
5188
5189 \begin_layout Standard
5190 The LyX server works through the use of a pair of named pipes.
5191  These are usually located in 
5192 \begin_inset Flex Code
5193 status collapsed
5194
5195 \begin_layout Plain Layout
5196 UserDir
5197 \end_layout
5198
5199 \end_inset
5200
5201 , (except on Windows, where 
5202 \emph on
5203 local
5204 \emph default
5205  named pipes are special objects located in 
5206 \begin_inset Flex Code
5207 status collapsed
5208
5209 \begin_layout Plain Layout
5210
5211 \backslash
5212
5213 \backslash
5214 .
5215 \backslash
5216 pipe
5217 \end_layout
5218
5219 \end_inset
5220
5221 ) and have the names 
5222 \begin_inset Quotes eld
5223 \end_inset
5224
5225
5226 \begin_inset Flex Code
5227 status collapsed
5228
5229 \begin_layout Plain Layout
5230 lyxpipe.in
5231 \end_layout
5232
5233 \end_inset
5234
5235
5236 \begin_inset Quotes erd
5237 \end_inset
5238
5239  and 
5240 \begin_inset Quotes eld
5241 \end_inset
5242
5243
5244 \begin_inset Flex Code
5245 status collapsed
5246
5247 \begin_layout Plain Layout
5248 lyxpipe.out
5249 \end_layout
5250
5251 \end_inset
5252
5253
5254 \begin_inset Quotes erd
5255 \end_inset
5256
5257 .
5258  External programs write into 
5259 \begin_inset Flex Code
5260 status collapsed
5261
5262 \begin_layout Plain Layout
5263 lyxpipe.in
5264 \end_layout
5265
5266 \end_inset
5267
5268  and read back data from 
5269 \begin_inset Flex Code
5270 status collapsed
5271
5272 \begin_layout Plain Layout
5273 lyxpipe.out
5274 \end_layout
5275
5276 \end_inset
5277
5278 .
5279  The stem of the pipe names can be defined in the 
5280 \begin_inset Flex MenuItem
5281 status collapsed
5282
5283 \begin_layout Plain Layout
5284 Tools\SpecialChar \menuseparator
5285 Preferences
5286 \end_layout
5287
5288 \end_inset
5289
5290  dialog, for example 
5291 \begin_inset Flex Code
5292 status collapsed
5293
5294 \begin_layout Plain Layout
5295 "/home/myhome/lyxpipe"
5296 \end_layout
5297
5298 \end_inset
5299
5300 , or 
5301 \begin_inset Flex Code
5302 status collapsed
5303
5304 \begin_layout Plain Layout
5305 "
5306 \backslash
5307
5308 \backslash
5309 .
5310 \backslash
5311 pipe
5312 \backslash
5313 lyxpipe"
5314 \end_layout
5315
5316 \end_inset
5317
5318  on Windows (but any working path can be used).
5319  You 
5320 \emph on
5321 must
5322 \emph default
5323  configure this manually in order for the server to start.
5324 \end_layout
5325
5326 \begin_layout Standard
5327 LyX will add the '
5328 \begin_inset Flex Code
5329 status collapsed
5330
5331 \begin_layout Plain Layout
5332 .in
5333 \end_layout
5334
5335 \end_inset
5336
5337 ' and '
5338 \begin_inset Flex Code
5339 status collapsed
5340
5341 \begin_layout Plain Layout
5342 .out
5343 \end_layout
5344
5345 \end_inset
5346
5347 ' to create the pipes.
5348  If one of the pipes already exists, LyX will assume that another LyX process
5349  is already running and will not start the server.
5350  On POSIX (Unix like) systems, if for some other reason, an unused 
5351 \begin_inset Quotes eld
5352 \end_inset
5353
5354 stale
5355 \begin_inset Quotes erd
5356 \end_inset
5357
5358  pipe is left in existence when LyX closes, then LyX will try to delete
5359  it.
5360  If this fails for some reason, you will need to delete the pipes manually
5361  and then restart LyX.
5362  On Windows, pipes are deleted by the OS on program termination or crash,
5363  so 
5364 \begin_inset Quotes eld
5365 \end_inset
5366
5367 stale
5368 \begin_inset Quotes erd
5369 \end_inset
5370
5371  pipes should not be possible.
5372 \end_layout
5373
5374 \begin_layout Standard
5375 To have several LyX processes with servers at the same time, you have to
5376  use different configurations, perhaps by using separate user directories,
5377  each with its own 
5378 \begin_inset Flex Code
5379 status collapsed
5380
5381 \begin_layout Plain Layout
5382 preferences
5383 \end_layout
5384
5385 \end_inset
5386
5387  file, for each process.
5388 \end_layout
5389
5390 \begin_layout Standard
5391 If you are developing a client program, you might find it useful to enable
5392  debugging information from the LyX server.
5393  Do this by starting LyX as 
5394 \begin_inset Flex Code
5395 status collapsed
5396
5397 \begin_layout Plain Layout
5398 lyx -dbg lyxserver
5399 \end_layout
5400
5401 \end_inset
5402
5403 .
5404 \end_layout
5405
5406 \begin_layout Standard
5407 You can find a complete example client written in C in the source distribution
5408  as 
5409 \begin_inset Flex Code
5410 status collapsed
5411
5412 \begin_layout Plain Layout
5413 development/lyxserver/server_monitor.c
5414 \end_layout
5415
5416 \end_inset
5417
5418 .
5419 \end_layout
5420
5421 \begin_layout Standard
5422 Another useful tool is command-line based client you will find in 
5423 \begin_inset Flex Code
5424 status collapsed
5425
5426 \begin_layout Plain Layout
5427 src/client/lyxclient
5428 \end_layout
5429
5430 \end_inset
5431
5432 .
5433 \end_layout
5434
5435 \begin_layout Section
5436 Normal communication
5437 \end_layout
5438
5439 \begin_layout Standard
5440 To issue a LyX call, the client writes a line of ASCII text into the input
5441  pipe.
5442  This line has the following format:
5443 \end_layout
5444
5445 \begin_layout Quote
5446 LYXCMD:
5447 \emph on
5448 clientname
5449 \emph default
5450 :
5451 \emph on
5452 function
5453 \emph default
5454 :
5455 \emph on
5456 argument
5457 \end_layout
5458
5459 \begin_layout Description
5460 clientname is a name that the client can choose arbitrarily.
5461  Its only use is that LyX will echo it if it sends an answer—so a client
5462  can dispatch results from different requesters.
5463 \end_layout
5464
5465 \begin_layout Description
5466 function is the function you want LyX to perform.
5467  It is the same as the commands you'd use in the minibuffer.
5468 \end_layout
5469
5470 \begin_layout Description
5471 argument is an optional argument which is meaningful only to some functions
5472  (for instance, the 
5473 \begin_inset Quotes eld
5474 \end_inset
5475
5476 self-insert
5477 \begin_inset Quotes erd
5478 \end_inset
5479
5480  LFUN will insert the argument as text at the cursor position).
5481 \end_layout
5482
5483 \begin_layout Standard
5484 The answer from LyX will arrive in the output pipe and be of the form
5485 \end_layout
5486
5487 \begin_layout Quote
5488 INFO:
5489 \emph on
5490 clientname
5491 \emph default
5492 :
5493 \emph on
5494 function
5495 \emph default
5496 :
5497 \emph on
5498 data
5499 \end_layout
5500
5501 \begin_layout Standard
5502 where 
5503 \emph on
5504 clientname
5505 \emph default
5506  and 
5507 \emph on
5508 function
5509 \emph default
5510  are just echoed from the command request, while 
5511 \emph on
5512 data
5513 \emph default
5514  is more or less useful information filled according to how the command
5515  execution worked out.
5516  Some commands, such as 
5517 \begin_inset Quotes eld
5518 \end_inset
5519
5520 font-state
5521 \begin_inset Quotes erd
5522 \end_inset
5523
5524 , will return information about the internal state of LyX, while other will
5525  return an empty data-response.
5526  This means that the command execution went fine.
5527 \end_layout
5528
5529 \begin_layout Standard
5530 In case of errors, the response from LyX will have this form
5531 \end_layout
5532
5533 \begin_layout Quote
5534 ERROR:
5535 \emph on
5536 clientname
5537 \emph default
5538 :
5539 \emph on
5540 function
5541 \emph default
5542 :
5543 \emph on
5544 error message
5545 \end_layout
5546
5547 \begin_layout Standard
5548 where the 
5549 \emph on
5550 error message
5551 \emph default
5552  should contain an explanation of why the command failed.
5553 \end_layout
5554
5555 \begin_layout Standard
5556 Examples:
5557 \end_layout
5558
5559 \begin_layout LyX-Code
5560 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5561 \begin_inset Newline newline
5562 \end_inset
5563
5564 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5565 \begin_inset Newline newline
5566 \end_inset
5567
5568 read a <~/.lyxpipe.out
5569 \begin_inset Newline newline
5570 \end_inset
5571
5572 echo $a
5573 \end_layout
5574
5575 \begin_layout Section
5576 Notification
5577 \end_layout
5578
5579 \begin_layout Standard
5580 LyX can notify clients of events going on asynchronously.
5581  Currently it will only do this if the user binds a key sequence with the
5582  function 
5583 \begin_inset Quotes eld
5584 \end_inset
5585
5586 notify
5587 \begin_inset Quotes erd
5588 \end_inset
5589
5590 .
5591  The format of the string LyX sends is as follows:
5592 \end_layout
5593
5594 \begin_layout Quote
5595 \begin_inset Flex Code
5596 status collapsed
5597
5598 \begin_layout Plain Layout
5599 NOTIFY:
5600 \end_layout
5601
5602 \end_inset
5603
5604
5605 \emph on
5606 key-sequence
5607 \end_layout
5608
5609 \begin_layout Standard
5610 where 
5611 \emph on
5612 key-sequence
5613 \emph default
5614  is the printed representation of the key sequence that was actually typed
5615  by the user.
5616 \end_layout
5617
5618 \begin_layout Standard
5619 This mechanism can be used to extend LyX's command set and implement macros.
5620  Bind some key sequence to 
5621 \begin_inset Quotes eld
5622 \end_inset
5623
5624 notify
5625 \begin_inset Quotes erd
5626 \end_inset
5627
5628 .
5629  Then start a client that listens on the output pipe, dispatches the command
5630  according to the sequence, and starts a function that may use LyX calls
5631  and LyX requests to issue a command or a series of commands to LyX.
5632 \end_layout
5633
5634 \begin_layout Section
5635 The simple LyX Server Protocol
5636 \end_layout
5637
5638 \begin_layout Standard
5639 LyX implements a simple protocol that can be used for session management.
5640  All messages are of the form
5641 \end_layout
5642
5643 \begin_layout Quote
5644 LYXSRV:
5645 \emph on
5646 clientname
5647 \emph default
5648 :
5649 \emph on
5650 protocol message
5651 \end_layout
5652
5653 \begin_layout Standard
5654 where 
5655 \emph on
5656 protocol message
5657 \emph default
5658  can be 
5659 \begin_inset Quotes eld
5660 \end_inset
5661
5662 hello
5663 \begin_inset Quotes erd
5664 \end_inset
5665
5666  or 
5667 \begin_inset Quotes eld
5668 \end_inset
5669
5670 bye
5671 \begin_inset Quotes erd
5672 \end_inset
5673
5674 .
5675  If 
5676 \begin_inset Quotes eld
5677 \end_inset
5678
5679 hello
5680 \begin_inset Quotes erd
5681 \end_inset
5682
5683  is received from a client, LyX will report back to inform the client that
5684  it's listening to it's messages, while 
5685 \begin_inset Quotes eld
5686 \end_inset
5687
5688 bye
5689 \begin_inset Quotes erd
5690 \end_inset
5691
5692  sent from LyX will inform clients that LyX is closing.
5693 \end_layout
5694
5695 \begin_layout Section
5696 Reverse DVI/PDF search
5697 \end_layout
5698
5699 \begin_layout Standard
5700 Some DVI/PDF viewers
5701 \begin_inset Foot
5702 status collapsed
5703
5704 \begin_layout Plain Layout
5705 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5706  Skim on Mac OSX and SumatraPDF on Windows.
5707 \end_layout
5708
5709 \end_inset
5710
5711  provide 
5712 \emph on
5713 reverse search
5714 \emph default
5715  facility (also called 
5716 \emph on
5717 inverse search
5718 \emph default
5719 ).
5720  This means that you can tell LyX to put the cursor to a specific line in
5721  the document by clicking at the respective position in the DVI/PDF output.
5722  To achieve this, the viewer must be able to communicate with LyX.
5723  This is done via the LyX server either by using the named pipe (
5724 \emph on
5725 lyxpipe
5726 \emph default
5727 ), or the UNIX domain socket (
5728 \emph on
5729 lyxsocket
5730 \emph default
5731 ) that LyX creates in its temporary directory (this is the way the 
5732 \begin_inset Flex Code
5733 status collapsed
5734
5735 \begin_layout Plain Layout
5736 lyxclient
5737 \end_layout
5738
5739 \end_inset
5740
5741  program communicates with LyX).
5742  In some cases, you need a helper script that mediates between the viewer
5743  and LyX, in others, the viewer can communicate with LyX directly.
5744  This depends on the selected viewer and on your operating system.
5745  The same applies to the way viewers need to be configured and the way the
5746  reverse search is actually performed.
5747  In what follows, we will thus describe how to setup reverse search for
5748  specific viewers.
5749  Before we turn to this, though, we will explain what needs to be done generally
5750  to enable reverse search in the DVI/PDF output.
5751 \end_layout
5752
5753 \begin_layout Subsection
5754 \begin_inset CommandInset label
5755 LatexCommand label
5756 name "sub:rev-search"
5757
5758 \end_inset
5759
5760 Automatic setup
5761 \end_layout
5762
5763 \begin_layout Standard
5764 In most cases LyX will do the work for you by enabling 
5765 \begin_inset Flex MenuItem
5766 status collapsed
5767
5768 \begin_layout Plain Layout
5769 Document\SpecialChar \menuseparator
5770 Output\SpecialChar \menuseparator
5771 Synchronize with Output
5772 \end_layout
5773
5774 \end_inset
5775
5776 .
5777  In such a case LyX will automatically insert the necessary SyncTeX macro
5778  (for PDF) or load the srcltx package (for DVI) respectively.
5779  This option can be easily reached also on 
5780 \begin_inset Flex Code
5781 status collapsed
5782
5783 \begin_layout Plain Layout
5784 View/Update
5785 \end_layout
5786
5787 \end_inset
5788
5789  Toolbar.
5790 \end_layout
5791
5792 \begin_layout Standard
5793 If you need a different setting, you can select or input a custom macro
5794  from the drop down box just below 
5795 \begin_inset Flex MenuItem
5796 status collapsed
5797
5798 \begin_layout Plain Layout
5799 Document\SpecialChar \menuseparator
5800 Output\SpecialChar \menuseparator
5801 Synchronize with Output
5802 \end_layout
5803
5804 \end_inset
5805
5806 .
5807 \end_layout
5808
5809 \begin_layout Standard
5810 Please note that including the 
5811 \begin_inset Flex Code
5812 status collapsed
5813
5814 \begin_layout Plain Layout
5815 srcltx
5816 \end_layout
5817
5818 \end_inset
5819
5820  package or 
5821 \begin_inset Flex Code
5822 status collapsed
5823
5824 \begin_layout Plain Layout
5825 src-specials
5826 \end_layout
5827
5828 \end_inset
5829
5830  sometimes has an undesired impact on the typesetting.
5831  Thus, you should switch output synchronization off for the final typesetting
5832  if you use the 
5833 \begin_inset Flex Code
5834 status collapsed
5835
5836 \begin_layout Plain Layout
5837 srcltx
5838 \end_layout
5839
5840 \end_inset
5841
5842  package or 
5843 \begin_inset Flex Code
5844 status collapsed
5845
5846 \begin_layout Plain Layout
5847 src-specials
5848 \end_layout
5849
5850 \end_inset
5851
5852 .
5853 \end_layout
5854
5855 \begin_layout Standard
5856 In case you need some more special settings that are not covered by the
5857  automatic settings, read the next section about how to set up output synchroniz
5858 ation manually.
5859  If the automatic setup suits your needs, you can readily jump to section
5860 \begin_inset space ~
5861 \end_inset
5862
5863
5864 \begin_inset CommandInset ref
5865 LatexCommand ref
5866 reference "sub:configuring-viewers"
5867
5868 \end_inset
5869
5870 , where the necessary configuration steps in your viewer -- needed both
5871  with the automatic and the manual setup -- are described.
5872 \end_layout
5873
5874 \begin_layout Subsection
5875 Manual setup
5876 \end_layout
5877
5878 \begin_layout Standard
5879 LaTeX provides several different methods for reverse search.
5880  Some are built-in in the 
5881 \begin_inset Flex Code
5882 status collapsed
5883
5884 \begin_layout Plain Layout
5885 latex/pdflatex
5886 \end_layout
5887
5888 \end_inset
5889
5890  program, some are provided by external packages.
5891  Your choice depends on whether your LaTeX distribution already provides
5892  a given method (the built-in methods are rather new) and whether your viewer
5893  can cope with it.
5894  The available methods are described in the following.
5895 \end_layout
5896
5897 \begin_layout Subsubsection*
5898 Built-in DVI-search via src-specials (DVI only) 
5899 \end_layout
5900
5901 \begin_layout Standard
5902 This method provides the DVI file with the necessary information for reverse
5903  search.
5904  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5905  distribution should include it), and it works reliably.
5906  To enable it, change the 
5907 \begin_inset Flex MenuItem
5908 status collapsed
5909
5910 \begin_layout Plain Layout
5911 LaT
5912 \begin_inset ERT
5913 status collapsed
5914
5915 \begin_layout Plain Layout
5916
5917 {}
5918 \end_layout
5919
5920 \end_inset
5921
5922 eX (plain)->DVI
5923 \end_layout
5924
5925 \end_inset
5926
5927  or 
5928 \begin_inset Flex MenuItem
5929 status collapsed
5930
5931 \begin_layout Plain Layout
5932 LaT
5933 \begin_inset ERT
5934 status collapsed
5935
5936 \begin_layout Plain Layout
5937
5938 {}
5939 \end_layout
5940
5941 \end_inset
5942
5943 eX (plain)->DraftDVI
5944 \end_layout
5945
5946 \end_inset
5947
5948  converter in 
5949 \begin_inset Flex MenuItem
5950 status collapsed
5951
5952 \begin_layout Plain Layout
5953 Preferences\SpecialChar \menuseparator
5954 File Handling\SpecialChar \menuseparator
5955 Converters
5956 \end_layout
5957
5958 \end_inset
5959
5960  to 
5961 \begin_inset Flex Code
5962 status collapsed
5963
5964 \begin_layout Plain Layout
5965 latex -src-specials $$i
5966 \end_layout
5967
5968 \end_inset
5969
5970 .
5971  If this doesn't work, check if your TeX engine needs different options
5972  (the syntax might differ in some distributions).
5973 \end_layout
5974
5975 \begin_layout Subsubsection*
5976 External Packages (PDFSync and scrltx) 
5977 \end_layout
5978
5979 \begin_layout Standard
5980 The packages 
5981 \emph on
5982 pdfsync
5983 \emph default
5984  and 
5985 \emph on
5986 scrltx
5987 \emph default
5988  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5989  respectively.
5990  In order to enable it, load the packages in the LyX preamble: 
5991 \end_layout
5992
5993 \begin_layout Itemize
5994 \begin_inset Flex Code
5995 status collapsed
5996
5997 \begin_layout Plain Layout
5998
5999 \backslash
6000 usepackage{pdfsync}
6001 \end_layout
6002
6003 \end_inset
6004
6005  for reverse PDF search,
6006 \end_layout
6007
6008 \begin_layout Itemize
6009  
6010 \begin_inset Flex Code
6011 status collapsed
6012
6013 \begin_layout Plain Layout
6014
6015 \backslash
6016 usepackage[active]{srcltx}
6017 \end_layout
6018
6019 \end_inset
6020
6021  for reverse DVI search.
6022 \end_layout
6023
6024 \begin_layout Standard
6025 If you want to be able to perform both DVI and PDF reverse searches, you
6026  can also insert in the preamble the following lines
6027 \end_layout
6028
6029 \begin_layout LyX-Code
6030
6031 \backslash
6032 usepackage{ifpdf}
6033 \begin_inset Newline newline
6034 \end_inset
6035
6036
6037 \backslash
6038 ifpdf
6039 \begin_inset Newline newline
6040 \end_inset
6041
6042   
6043 \backslash
6044 usepackage{pdfsync}
6045 \begin_inset Newline newline
6046 \end_inset
6047
6048
6049 \backslash
6050 else
6051 \begin_inset Newline newline
6052 \end_inset
6053
6054   
6055 \backslash
6056 usepackage[active]{srcltx}
6057 \begin_inset Newline newline
6058 \end_inset
6059
6060
6061 \backslash
6062 fi
6063 \end_layout
6064
6065 \begin_layout Standard
6066 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6067  right package will be used.
6068 \end_layout
6069
6070 \begin_layout Standard
6071 Note that PDFSync might affect the output layout of your document.
6072  It is therefore advised to disable PDFsync for final documents.
6073 \end_layout
6074
6075 \begin_layout Subsubsection*
6076 Built-in reverse search via SyncTeX (DVI and PDF) 
6077 \end_layout
6078
6079 \begin_layout Standard
6080 Recent versions of 
6081 \begin_inset Flex Code
6082 status collapsed
6083
6084 \begin_layout Plain Layout
6085 (pdf)latex
6086 \end_layout
6087
6088 \end_inset
6089
6090  have built-in support for both PDF and DVI reverse search.
6091  This so-called 
6092 \emph on
6093 SyncTeX
6094 \emph default
6095  facility is basically the result of the integration of the PDFSync package
6096  to the pdftex program and its merge with the 
6097 \emph on
6098 scr-specials
6099 \emph default
6100  approach.
6101  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6102  to use it.
6103  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6104  already provide SyncTeX support.
6105 \end_layout
6106
6107 \begin_layout Standard
6108 To enable SyncTeX for DVI output, change the 
6109 \begin_inset Flex MenuItem
6110 status collapsed
6111
6112 \begin_layout Plain Layout
6113 LaT
6114 \begin_inset ERT
6115 status collapsed
6116
6117 \begin_layout Plain Layout
6118
6119 {}
6120 \end_layout
6121
6122 \end_inset
6123
6124 eX (plain) -> DVI
6125 \end_layout
6126
6127 \end_inset
6128
6129  or 
6130 \begin_inset Flex MenuItem
6131 status collapsed
6132
6133 \begin_layout Plain Layout
6134 LaT
6135 \begin_inset ERT
6136 status collapsed
6137
6138 \begin_layout Plain Layout
6139
6140 {}
6141 \end_layout
6142
6143 \end_inset
6144
6145 eX (plain) -> DraftDVI
6146 \end_layout
6147
6148 \end_inset
6149
6150  converter in 
6151 \begin_inset Flex MenuItem
6152 status collapsed
6153
6154 \begin_layout Plain Layout
6155 Preferences\SpecialChar \menuseparator
6156 File Handling\SpecialChar \menuseparator
6157 Converters
6158 \end_layout
6159
6160 \end_inset
6161
6162  to 
6163 \begin_inset Flex Code
6164 status collapsed
6165
6166 \begin_layout Plain Layout
6167 latex -synctex=1 $$i
6168 \end_layout
6169
6170 \end_inset
6171
6172 , and for PDF output, change the 
6173 \begin_inset Flex MenuItem
6174 status collapsed
6175
6176 \begin_layout Plain Layout
6177 LaT
6178 \begin_inset ERT
6179 status collapsed
6180
6181 \begin_layout Plain Layout
6182
6183 {}
6184 \end_layout
6185
6186 \end_inset
6187
6188 eX (pdflatex) -> PDF (pdflatex)
6189 \end_layout
6190
6191 \end_inset
6192
6193  or converter to 
6194 \begin_inset Flex Code
6195 status collapsed
6196
6197 \begin_layout Plain Layout
6198 pdflatex -synctex=1 $$i
6199 \end_layout
6200
6201 \end_inset
6202
6203 .
6204  Check the documentation of your viewer whether the viewer needs to be configure
6205 d for the use with SyncTeX.
6206 \begin_inset Foot
6207 status collapsed
6208
6209 \begin_layout Plain Layout
6210 The 
6211 \begin_inset Flex Code
6212 status collapsed
6213
6214 \begin_layout Plain Layout
6215 -synctex=1
6216 \end_layout
6217
6218 \end_inset
6219
6220  option enables gzip compression.
6221  If your viewer does not support it, you should instead use 
6222 \begin_inset Flex Code
6223 status collapsed
6224
6225 \begin_layout Plain Layout
6226 -synctex=-1
6227 \end_layout
6228
6229 \end_inset
6230
6231 .
6232 \end_layout
6233
6234 \end_inset
6235
6236
6237 \end_layout
6238
6239 \begin_layout Subsection
6240 Configuring and using specific viewers
6241 \begin_inset CommandInset label
6242 LatexCommand label
6243 name "sub:configuring-viewers"
6244
6245 \end_inset
6246
6247
6248 \end_layout
6249
6250 \begin_layout Subsubsection*
6251 Xdvi (all platforms)
6252 \end_layout
6253
6254 \begin_layout Standard
6255 If you use 
6256 \begin_inset Flex Code
6257 status collapsed
6258
6259 \begin_layout Plain Layout
6260 xdvi
6261 \end_layout
6262
6263 \end_inset
6264
6265 , you don't need to do anything else for performing a reverse DVI search,
6266  as LyX already provides the necessary hooks for automatically using the
6267  
6268 \begin_inset Flex Code
6269 status collapsed
6270
6271 \begin_layout Plain Layout
6272 lyxclient
6273 \end_layout
6274
6275 \end_inset
6276
6277  program.
6278  Just setup your document as described above (reverse search is triggered
6279  by Ctrl-click or Alt-click on Mac OSX, respectively).
6280 \end_layout
6281
6282 \begin_layout Standard
6283 However, if for whatever reason you want to use the named pipe instead of
6284  the socket for communicating with LyX, simply change the DVI viewer in
6285  
6286 \begin_inset Flex MenuItem
6287 status collapsed
6288
6289 \begin_layout Plain Layout
6290 Preferences\SpecialChar \menuseparator
6291 File Handling\SpecialChar \menuseparator
6292 File formats
6293 \end_layout
6294
6295 \end_inset
6296
6297  to
6298 \begin_inset Foot
6299 status collapsed
6300
6301 \begin_layout Plain Layout
6302 On Mac OSX you have to use 
6303 \begin_inset Flex Code
6304 status collapsed
6305
6306 \begin_layout Plain Layout
6307 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6308 \end_layout
6309
6310 \end_inset
6311
6312
6313 \end_layout
6314
6315 \end_inset
6316
6317  
6318 \begin_inset Flex Code
6319 status collapsed
6320
6321 \begin_layout Plain Layout
6322 xdvi -editor 'lyxeditor.sh %f %l'
6323 \end_layout
6324
6325 \end_inset
6326
6327 , where 
6328 \begin_inset Flex Code
6329 status collapsed
6330
6331 \begin_layout Plain Layout
6332 lyxeditor.sh
6333 \end_layout
6334
6335 \end_inset
6336
6337  is a suitable script.
6338  For example, a minimal shell script is the following one:
6339 \end_layout
6340
6341 \begin_layout LyX-Code
6342 #!/bin/sh
6343 \begin_inset Newline newline
6344 \end_inset
6345
6346 LYXPIPE="/path/to/lyxpipe"
6347 \begin_inset Newline newline
6348 \end_inset
6349
6350 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6351 \begin_inset Newline newline
6352 \end_inset
6353
6354 echo "$COMMAND" > "${LYXPIPE}".in || exit
6355 \begin_inset Newline newline
6356 \end_inset
6357
6358 read < "${LYXPIPE}".out || exit
6359 \end_layout
6360
6361 \begin_layout Standard
6362 where 
6363 \begin_inset Flex Code
6364 status collapsed
6365
6366 \begin_layout Plain Layout
6367 /path/to/lyxpipe
6368 \end_layout
6369
6370 \end_inset
6371
6372  is the Ly
6373 \begin_inset ERT
6374 status collapsed
6375
6376 \begin_layout Plain Layout
6377
6378 {}
6379 \end_layout
6380
6381 \end_inset
6382
6383 XServer pipe path specified in 
6384 \begin_inset Flex MenuItem
6385 status collapsed
6386
6387 \begin_layout Plain Layout
6388 Preferences\SpecialChar \menuseparator
6389 Paths
6390 \end_layout
6391
6392 \end_inset
6393
6394 .
6395 \begin_inset Foot
6396 status collapsed
6397
6398 \begin_layout Plain Layout
6399 In the 
6400 \begin_inset Flex Code
6401 status collapsed
6402
6403 \begin_layout Plain Layout
6404 development/tools
6405 \end_layout
6406
6407 \end_inset
6408
6409  folder of a source distribution you can find a 
6410 \begin_inset Flex Code
6411 status collapsed
6412
6413 \begin_layout Plain Layout
6414 lyxeditor
6415 \end_layout
6416
6417 \end_inset
6418
6419  script which is able to locate the 
6420 \emph on
6421 lyxpipe
6422 \emph default
6423  based on your preferences.
6424 \end_layout
6425
6426 \end_inset
6427
6428
6429 \end_layout
6430
6431 \begin_layout Subsubsection*
6432 MacDviX (Mac OSX)
6433 \end_layout
6434
6435 \begin_layout Standard
6436 At the end of 
6437 \begin_inset Flex Code
6438 status collapsed
6439
6440 \begin_layout Plain Layout
6441 /Applications/MacDviX_Folder/calleditor.script
6442 \end_layout
6443
6444 \end_inset
6445
6446 , add the following lines:
6447 \end_layout
6448
6449 \begin_layout LyX-Code
6450 /Applications/Ly
6451 \begin_inset ERT
6452 status collapsed
6453
6454 \begin_layout Plain Layout
6455
6456 {}
6457 \end_layout
6458
6459 \end_inset
6460
6461 X.app/Contents/MacOS/lyxeditor "$2" $1
6462 \begin_inset Newline newline
6463 \end_inset
6464
6465 exit 1
6466 \end_layout
6467
6468 \begin_layout Standard
6469 Modify the lines accordingly if you install LyX somewhere else than in the
6470  Applications folder.
6471 \end_layout
6472
6473 \begin_layout Standard
6474 Reverse search is triggered by Alt-click (OPTION-click).
6475 \end_layout
6476
6477 \begin_layout Subsubsection*
6478 Skim (Mac OSX)
6479 \end_layout
6480
6481 \begin_layout Standard
6482 Enter 
6483 \begin_inset Flex Code
6484 status collapsed
6485
6486 \begin_layout Plain Layout
6487 open -a Skim.app $$i
6488 \end_layout
6489
6490 \end_inset
6491
6492  to the viewer setting in 
6493 \begin_inset Flex MenuItem
6494 status collapsed
6495
6496 \begin_layout Plain Layout
6497 Preferences\SpecialChar \menuseparator
6498 File Handling\SpecialChar \menuseparator
6499 File formats\SpecialChar \menuseparator
6500 PDF (pdflatex)
6501 \end_layout
6502
6503 \end_inset
6504
6505 , and then in 
6506 \begin_inset Flex MenuItem
6507 status collapsed
6508
6509 \begin_layout Plain Layout
6510 Skim\SpecialChar \menuseparator
6511 Preferences\SpecialChar \menuseparator
6512 Sync
6513 \end_layout
6514
6515 \end_inset
6516
6517  select Ly
6518 \begin_inset ERT
6519 status collapsed
6520
6521 \begin_layout Plain Layout
6522
6523 {}
6524 \end_layout
6525
6526 \end_inset
6527
6528 X.
6529 \end_layout
6530
6531 \begin_layout Standard
6532 Reverse search is triggered by COMMAND-SHIFT-click
6533 \end_layout
6534
6535 \begin_layout Subsubsection*
6536 Okular (KDE)
6537 \end_layout
6538
6539 \begin_layout Standard
6540 Go to 
6541 \begin_inset Flex MenuItem
6542 status collapsed
6543
6544 \begin_layout Plain Layout
6545 Settings\SpecialChar \menuseparator
6546 Configure Okular\SpecialChar \ldots{}
6547 \SpecialChar \menuseparator
6548 Editor
6549 \end_layout
6550
6551 \end_inset
6552
6553 , select 
6554 \begin_inset Quotes eld
6555 \end_inset
6556
6557 Custom Text Editor
6558 \begin_inset Quotes erd
6559 \end_inset
6560
6561  and add the command 
6562 \begin_inset Flex Code
6563 status collapsed
6564
6565 \begin_layout Plain Layout
6566 lyxclient -g %f %l
6567 \end_layout
6568
6569 \end_inset
6570
6571 .
6572 \end_layout
6573
6574 \begin_layout Standard
6575 Reverse search is triggered by SHIFT-click.
6576 \end_layout
6577
6578 \begin_layout Subsubsection*
6579 YAP (Windows)
6580 \end_layout
6581
6582 \begin_layout Standard
6583 Launch yap, choose its 
6584 \begin_inset Flex MenuItem
6585 status collapsed
6586
6587 \begin_layout Plain Layout
6588 View\SpecialChar \menuseparator
6589 Options
6590 \end_layout
6591
6592 \end_inset
6593
6594  menu and select the 
6595 \begin_inset Quotes eld
6596 \end_inset
6597
6598 Inverse DVI Search
6599 \begin_inset Quotes erd
6600 \end_inset
6601
6602  tab.
6603  Click on the 
6604 \begin_inset Quotes eld
6605 \end_inset
6606
6607 New\SpecialChar \ldots{}
6608
6609 \begin_inset Quotes erd
6610 \end_inset
6611
6612  button and, in the window that opens, enter 
6613 \begin_inset Quotes eld
6614 \end_inset
6615
6616 LyX Editor
6617 \begin_inset Quotes erd
6618 \end_inset
6619
6620  (or any other name you like) in the 
6621 \begin_inset Quotes eld
6622 \end_inset
6623
6624 Name:
6625 \begin_inset Quotes erd
6626 \end_inset
6627
6628  field.
6629  Now click on the button labeled 
6630 \begin_inset Quotes eld
6631 \end_inset
6632
6633 \SpecialChar \ldots{}
6634
6635 \begin_inset Quotes erd
6636 \end_inset
6637
6638  to open a file dialog and navigate to the directory containing the batch
6639  file 
6640 \begin_inset Flex Code
6641 status collapsed
6642
6643 \begin_layout Plain Layout
6644 lyxeditor.bat
6645 \end_layout
6646
6647 \end_inset
6648
6649  (see below).
6650  Select 
6651 \begin_inset Flex Code
6652 status collapsed
6653
6654 \begin_layout Plain Layout
6655 lyxeditor.bat
6656 \end_layout
6657
6658 \end_inset
6659
6660  and then specify the program arguments as 
6661 \begin_inset Flex Code
6662 status collapsed
6663
6664 \begin_layout Plain Layout
6665 %f %l
6666 \end_layout
6667
6668 \end_inset
6669
6670 .
6671  The 
6672 \begin_inset Flex Code
6673 status collapsed
6674
6675 \begin_layout Plain Layout
6676 lyxeditor.bat
6677 \end_layout
6678
6679 \end_inset
6680
6681  wrapper is used for communicating with LyX through the 
6682 \emph on
6683 lyxpipe
6684 \emph default
6685  and is as follows:
6686 \end_layout
6687
6688 \begin_layout LyX-Code
6689 @echo off
6690 \begin_inset Newline newline
6691 \end_inset
6692
6693 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6694 \backslash
6695
6696 \backslash
6697 .
6698 \backslash
6699 pipe
6700 \backslash
6701 lyxpipe.in
6702 \begin_inset Newline newline
6703 \end_inset
6704
6705 type 
6706 \backslash
6707
6708 \backslash
6709 .
6710 \backslash
6711 pipe
6712 \backslash
6713 lyxpipe.out
6714 \end_layout
6715
6716 \begin_layout Standard
6717 Make sure that the LyXServer pipe path you specified in LyX is 
6718 \begin_inset Flex Code
6719 status collapsed
6720
6721 \begin_layout Plain Layout
6722
6723 \backslash
6724
6725 \backslash
6726 .
6727 \backslash
6728 pipe
6729 \backslash
6730 lyxpipe
6731 \end_layout
6732
6733 \end_inset
6734
6735 , otherwise change the 
6736 \begin_inset Flex Code
6737 status collapsed
6738
6739 \begin_layout Plain Layout
6740 lyxeditor.bat
6741 \end_layout
6742
6743 \end_inset
6744
6745  wrapper accordingly.
6746 \end_layout
6747
6748 \begin_layout Standard
6749 In yap, reverse search is triggered by double-click.
6750 \end_layout
6751
6752 \begin_layout Subsubsection*
6753 SumatraPDF (Windows)
6754 \end_layout
6755
6756 \begin_layout Standard
6757 In order to use SumatraPDF for inverse search, enter 
6758 \begin_inset Flex Code
6759 status collapsed
6760
6761 \begin_layout Plain Layout
6762 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6763 \end_layout
6764
6765 \end_inset
6766
6767  in the viewer setting in 
6768 \begin_inset Flex MenuItem
6769 status collapsed
6770
6771 \begin_layout Plain Layout
6772 Preferences\SpecialChar \menuseparator
6773 File Handling\SpecialChar \menuseparator
6774 File formats\SpecialChar \menuseparator
6775 PDF (pdflatex)
6776 \end_layout
6777
6778 \end_inset
6779
6780 , where 
6781 \begin_inset Flex Code
6782 status collapsed
6783
6784 \begin_layout Plain Layout
6785 lyxeditor.bat
6786 \end_layout
6787
6788 \end_inset
6789
6790  is the previous wrapper.
6791  If SumatraPDF.exe is not in your command PATH, use its full file name.
6792 \end_layout
6793
6794 \begin_layout Standard
6795 Reverse search is triggered by double-click.
6796 \end_layout
6797
6798 \begin_layout Subsubsection*
6799 YAP (Cygwin)
6800 \end_layout
6801
6802 \begin_layout Standard
6803 First of all, make sure that yap is your default DVI viewer in the Windows
6804  environment, then launch it, choose its 
6805 \begin_inset Flex MenuItem
6806 status collapsed
6807
6808 \begin_layout Plain Layout
6809 View\SpecialChar \menuseparator
6810 Options
6811 \end_layout
6812
6813 \end_inset
6814
6815  menu and select the 
6816 \begin_inset Quotes eld
6817 \end_inset
6818
6819 Inverse DVI Search
6820 \begin_inset Quotes erd
6821 \end_inset
6822
6823  tab.
6824  Click on the 
6825 \begin_inset Quotes eld
6826 \end_inset
6827
6828 New\SpecialChar \ldots{}
6829
6830 \begin_inset Quotes erd
6831 \end_inset
6832
6833  button and, in the window that opens, enter 
6834 \begin_inset Quotes eld
6835 \end_inset
6836
6837 LyX Editor
6838 \begin_inset Quotes erd
6839 \end_inset
6840
6841  (or any other name you like) in the 
6842 \begin_inset Quotes eld
6843 \end_inset
6844
6845 Name:
6846 \begin_inset Quotes erd
6847 \end_inset
6848
6849  field.
6850  Now click on the button labeled 
6851 \begin_inset Quotes eld
6852 \end_inset
6853
6854 \SpecialChar \ldots{}
6855
6856 \begin_inset Quotes erd
6857 \end_inset
6858
6859  to open a file dialog and navigate to the directory containing the 
6860 \begin_inset Flex Code
6861 status collapsed
6862
6863 \begin_layout Plain Layout
6864 lyxeditor.exe
6865 \end_layout
6866
6867 \end_inset
6868
6869  program (which is installed by default on Cygwin along with the LyX executable).
6870  Select 
6871 \begin_inset Flex Code
6872 status collapsed
6873
6874 \begin_layout Plain Layout
6875 lyxeditor.exe
6876 \end_layout
6877
6878 \end_inset
6879
6880  and then specify the program arguments as 
6881 \begin_inset Flex Code
6882 status collapsed
6883
6884 \begin_layout Plain Layout
6885 -g %f %l
6886 \end_layout
6887
6888 \end_inset
6889
6890 .
6891  In this way, you will be using the 
6892 \emph on
6893 lyxsocket
6894 \emph default
6895  for communicating with LyX.
6896  If, for whatever reason, you want to use the 
6897 \emph on
6898 lyxpipe
6899 \emph default
6900 , omit the 
6901 \begin_inset Flex Code
6902 status collapsed
6903
6904 \begin_layout Plain Layout
6905 -g
6906 \end_layout
6907
6908 \end_inset
6909
6910  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6911 \end_layout
6912
6913 \begin_layout Standard
6914 In yap, reverse search is triggered by double-click.
6915 \end_layout
6916
6917 \begin_layout Subsubsection*
6918 SumatraPDF (Cygwin)
6919 \end_layout
6920
6921 \begin_layout Standard
6922 In order to use SumatraPDF for inverse search, enter 
6923 \begin_inset Flex Code
6924 status collapsed
6925
6926 \begin_layout Plain Layout
6927 SumatraPDF.sh
6928 \end_layout
6929
6930 \end_inset
6931
6932  in the viewer setting in 
6933 \begin_inset Flex MenuItem
6934 status collapsed
6935
6936 \begin_layout Plain Layout
6937 Preferences\SpecialChar \menuseparator
6938 File Handling\SpecialChar \menuseparator
6939 File formats\SpecialChar \menuseparator
6940 PDF (pdflatex)
6941 \end_layout
6942
6943 \end_inset
6944
6945 , where 
6946 \begin_inset Flex Code
6947 status collapsed
6948
6949 \begin_layout Plain Layout
6950 SumatraPDF.sh
6951 \end_layout
6952
6953 \end_inset
6954
6955  is the following script (to be placed in your command PATH, 
6956 \begin_inset Flex Code
6957 status collapsed
6958
6959 \begin_layout Plain Layout
6960 /usr/local/bin
6961 \end_layout
6962
6963 \end_inset
6964
6965  being the best choice):
6966 \end_layout
6967
6968 \begin_layout LyX-Code
6969 #!/bin/bash
6970 \begin_inset Newline newline
6971 \end_inset
6972
6973 cd $(dirname $1)
6974 \begin_inset Newline newline
6975 \end_inset
6976
6977 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6978 \end_layout
6979
6980 \begin_layout Standard
6981 This wrapper script is needed because SumatraPDF is a native Windows application
6982  and does not understand the posix paths used by the Cygwin version of LyX.
6983  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6984  the script above.
6985  The 
6986 \begin_inset Flex Code
6987 status collapsed
6988
6989 \begin_layout Plain Layout
6990 -g
6991 \end_layout
6992
6993 \end_inset
6994
6995  enables communication via the 
6996 \emph on
6997 lyxsocket
6998 \emph default
6999 .
7000  Again, omit the 
7001 \begin_inset Flex Code
7002 status collapsed
7003
7004 \begin_layout Plain Layout
7005 -g
7006 \end_layout
7007
7008 \end_inset
7009
7010  option if you want to use the 
7011 \emph on
7012 lyxpipe
7013 \emph default
7014 , and be sure to specify the LyXServer pipe path in the LyX preferences.
7015 \end_layout
7016
7017 \begin_layout Standard
7018 Reverse search is triggered by double-click.
7019 \end_layout
7020
7021 \begin_layout Section
7022 Forward search
7023 \end_layout
7024
7025 \begin_layout Standard
7026 Forward search is, as the name implies, in a sense the 
7027 \begin_inset Quotes eld
7028 \end_inset
7029
7030 opposite
7031 \begin_inset Quotes erd
7032 \end_inset
7033
7034  to reverse search.
7035  It allows you to let the viewer jump to a given position from within LyX.
7036  If forward search is set up (as described in what follows), you can put
7037  the cursor anywhere in your LyX document, and hit 
7038 \begin_inset Flex MenuItem
7039 status collapsed
7040
7041 \begin_layout Plain Layout
7042 Navigate\SpecialChar \menuseparator
7043 Forward search
7044 \end_layout
7045
7046 \end_inset
7047
7048  (or select 
7049 \begin_inset Flex MenuItem
7050 status collapsed
7051
7052 \begin_layout Plain Layout
7053 Forward search
7054 \end_layout
7055
7056 \end_inset
7057
7058  in the context menu via right mouse click), and then the viewer will jump
7059  to that position as well.
7060  This implies, of course, that your viewer supports this function.
7061 \end_layout
7062
7063 \begin_layout Standard
7064 To make forward search possible, you first need to provide the generated
7065  output PDF/DVI file with additional information about the TeX sources.
7066  This can be done via the methods described in the section 
7067 \begin_inset CommandInset ref
7068 LatexCommand ref
7069 reference "sub:rev-search"
7070
7071 \end_inset
7072
7073 .
7074 \end_layout
7075
7076 \begin_layout Standard
7077 Additionally, you need to configure LyX for using your viewers in 
7078 \begin_inset Flex MenuItem
7079 status collapsed
7080
7081 \begin_layout Plain Layout
7082 Tools\SpecialChar \menuseparator
7083 Preferences\SpecialChar \menuseparator
7084 Output\SpecialChar \menuseparator
7085 General
7086 \end_layout
7087
7088 \end_inset
7089
7090 .
7091  We provide a range of tested configurations for some viewers, which you
7092  can select from the drop down list.
7093  If none of these configurations suits you, you have to find out and enter
7094  a suitable configuration yourself.
7095  The definition syntax uses the following placeholders: 
7096 \end_layout
7097
7098 \begin_layout Itemize
7099 \noindent
7100 \begin_inset Flex Code
7101 status collapsed
7102
7103 \begin_layout Plain Layout
7104 $$n
7105 \end_layout
7106
7107 \end_inset
7108
7109 : row number
7110 \end_layout
7111
7112 \begin_layout Itemize
7113 \noindent
7114 \begin_inset Flex Code
7115 status collapsed
7116
7117 \begin_layout Plain Layout
7118 $$t
7119 \end_layout
7120
7121 \end_inset
7122
7123 : name of the (temporary) exported .tex file
7124 \end_layout
7125
7126 \begin_layout Itemize
7127 \noindent
7128 \begin_inset Flex Code
7129 status collapsed
7130
7131 \begin_layout Plain Layout
7132 $$o
7133 \end_layout
7134
7135 \end_inset
7136
7137 : name of the exported output file (either dvi or pdf, depending on which
7138  one exists in the temporary directory)
7139 \end_layout
7140
7141 \begin_layout Standard
7142 Note that only some of the viewers provide full forward search functionality,
7143  among them yap, xdvi, okular and Sumatra PDF
7144 \begin_inset Foot
7145 status collapsed
7146
7147 \begin_layout Plain Layout
7148 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7149 ip
7150 \end_layout
7151
7152 \end_inset
7153
7154 .
7155  While many of the widespread PDF viewers (most notably Adobe Reader) do
7156  not support forward search at all, some other viewers -- e.
7157 \begin_inset space \thinspace{}
7158 \end_inset
7159
7160 g.
7161  evince and xpdf -- allow at least to reload the document and jump to a
7162  specific page of the file, so you can at least navigate 
7163 \begin_inset Quotes eld
7164 \end_inset
7165
7166 near
7167 \begin_inset Quotes erd
7168 \end_inset
7169
7170 .
7171  These latter functionality is provided by an external call of synctex (see
7172  the predefined example configurations).
7173  
7174 \end_layout
7175
7176 \begin_layout Standard
7177 Forward search works both with DVI and PDF output.
7178  LyX simply checks which preview format you have used before (i.
7179 \begin_inset space \thinspace{}
7180 \end_inset
7181
7182 e., which format is already there in the temporary directory) and chooses
7183  the appropriate configuration for the respective format.
7184  
7185 \end_layout
7186
7187 \begin_layout Chapter
7188 Special Document Classes
7189 \end_layout
7190
7191 \begin_layout Section
7192 A&A Paper
7193 \end_layout
7194
7195 \begin_layout Standard
7196 by 
7197 \noun on
7198 Peter Sütterlin
7199 \end_layout
7200
7201 \begin_layout Subsection
7202 Introduction
7203 \end_layout
7204
7205 \begin_layout Standard
7206 This section describes how LyX can be used to write articles for submission
7207  to the scientific journal 
7208 \emph on
7209 Astronomy and Astrophysics
7210 \emph default
7211  (www.edpsciences.fr/aa/ 
7212 \begin_inset Flex URL
7213 status collapsed
7214
7215 \begin_layout Plain Layout
7216
7217 http://www.edpsciences.fr/aa/
7218 \end_layout
7219
7220 \end_inset
7221
7222 ) using Version 5.01 of the document class 
7223 \family typewriter
7224 aa.cls
7225 \family default
7226 .
7227  This package can be downloaded from the ftp site
7228 \end_layout
7229
7230 \begin_layout Standard
7231 \begin_inset VSpace medskip
7232 \end_inset
7233
7234
7235 \end_layout
7236
7237 \begin_layout Standard
7238 \align center
7239 \begin_inset Flex URL
7240 status collapsed
7241
7242 \begin_layout Plain Layout
7243
7244 ftp://ftp.edpsciences.org/pub/aa/readme.html
7245 \end_layout
7246
7247 \end_inset
7248
7249
7250 \end_layout
7251
7252 \begin_layout Standard
7253 \begin_inset VSpace medskip
7254 \end_inset
7255
7256
7257 \end_layout
7258
7259 \begin_layout Standard
7260 A manual comes together with that package, and this text is not meant to
7261  replace the original manual but is merely a short guide in how to realize
7262  the correct form of your paper.
7263  
7264 \end_layout
7265
7266 \begin_layout Standard
7267 Please note that the publisher of the journal was changed from Springer
7268  to EDP Sciences starting January 1, 2001.
7269  That change involved also some slight changes to the style files, namely
7270  the removal of the thesaurus command.
7271  The LyX class aa supports the newest version of these style files, V 5.01.
7272  If you have an older version installed, please upgrade.
7273  For compatibility, the old (version 4) layout has been kept as 
7274 \family sans
7275 article (A&A V4)
7276 \family default
7277 .
7278  Please refer to the comments in 
7279 \family typewriter
7280 LyXDir/layouts/aapaper.layout
7281 \family default
7282 .
7283 \end_layout
7284
7285 \begin_layout Subsection
7286 Getting started
7287 \end_layout
7288
7289 \begin_layout Standard
7290 It is recommended you start from the example template distributed with LyX.
7291  If you are not using a template, note the following settings:
7292 \end_layout
7293
7294 \begin_layout Itemize
7295 Select 
7296 \family sans
7297 article (A&A)
7298 \family default
7299  in the 
7300 \family sans
7301 Document\SpecialChar \menuseparator
7302 Settings
7303 \family default
7304  dialog (OK, that one was obvious).
7305 \end_layout
7306
7307 \begin_layout Itemize
7308 Don't change the option 
7309 \family sans
7310 Page
7311 \begin_inset space ~
7312 \end_inset
7313
7314 style
7315 \family default
7316 : Leave it set to 
7317 \family sans
7318 default
7319 \family default
7320 .
7321  The whole layout is done by the macros, you shouldn't change anything.
7322 \end_layout
7323
7324 \begin_layout Subsection
7325 The header block
7326 \end_layout
7327
7328 \begin_layout Standard
7329 First thing to enter is the header information.
7330  It consists of seven entries, of which some are optional.
7331  They are
7332 \end_layout
7333
7334 \begin_layout Itemize
7335
7336 \family sans
7337 Title
7338 \family default
7339 : [required] 
7340 \end_layout
7341
7342 \begin_layout Itemize
7343
7344 \family sans
7345 Subtitle
7346 \family default
7347 : [optional] 
7348 \end_layout
7349
7350 \begin_layout Itemize
7351
7352 \family sans
7353 Author
7354 \family default
7355 : [required]
7356 \end_layout
7357
7358 \begin_layout Itemize
7359
7360 \family sans
7361 Address
7362 \family default
7363 : [required]
7364 \end_layout
7365
7366 \begin_layout Itemize
7367
7368 \family sans
7369 Offprints
7370 \family default
7371 : [optional] if more than one author: whom to contact for offprint requests.
7372 \end_layout
7373
7374 \begin_layout Itemize
7375
7376 \family sans
7377 Mail
7378 \family default
7379 : [optional] mail address for contacts.
7380 \end_layout
7381
7382 \begin_layout Itemize
7383
7384 \family sans
7385 Date
7386 \family default
7387 : [required].
7388  Suggested format is 
7389 \family typewriter
7390 Received: <date>; Accepted <date> 
7391 \end_layout
7392
7393 \begin_layout Standard
7394 There is no need to issue the 
7395 \family typewriter
7396
7397 \backslash
7398 maketitle
7399 \family default
7400  command, this is done automatically by LyX when the header is finished.
7401  Although the order of the single header entries doesn't matter it is advised
7402  to keep the above sequence, just to get the best optics and meets the layout
7403  of the real document.
7404 \end_layout
7405
7406 \begin_layout Standard
7407 If you want to place footnotes in the header block, e.
7408 \begin_inset space \thinspace{}
7409 \end_inset
7410
7411 g.
7412 \begin_inset space \space{}
7413 \end_inset
7414
7415 to state your present address, just use the standard footnote via the menu
7416  
7417 \family sans
7418 Insert\SpecialChar \menuseparator
7419 Footnote.
7420
7421 \family default
7422  LyX will automagically use the term 
7423 \family typewriter
7424
7425 \backslash
7426 thanks{}
7427 \family default
7428  in that case.
7429 \end_layout
7430
7431 \begin_layout Standard
7432 In addition to these topics, the macros use three additional LaTeX commands
7433  that have no counterpart in LyX:
7434 \end_layout
7435
7436 \begin_layout Itemize
7437
7438 \family typewriter
7439
7440 \backslash
7441 and
7442 \family default
7443  to separate different names for more than one author and institute, respectivel
7444 y.
7445 \end_layout
7446
7447 \begin_layout Itemize
7448
7449 \family typewriter
7450
7451 \backslash
7452 inst{<nr>}
7453 \family default
7454 to mark corresponding author/institute pairs.
7455  The institutes are numbered sequentially as they appear in the 
7456 \family sans
7457 Address
7458 \family default
7459  field, so you have to put a marker to each author.
7460 \end_layout
7461
7462 \begin_layout Itemize
7463
7464 \family typewriter
7465
7466 \backslash
7467 email{address}
7468 \family default
7469  to supply an email address for fast contact.
7470 \end_layout
7471
7472 \begin_layout Standard
7473 In all cases, the appropriate command has to be entered in LyX and marked
7474  as LaTeX code.
7475  See the examples.
7476  
7477 \end_layout
7478
7479 \begin_layout Subsection
7480 The abstract
7481 \end_layout
7482
7483 \begin_layout Standard
7484 The abstract should immediately follow the header block.
7485  With version 5 the abstract environment was changed to a command, and there
7486  is now a resctriction to only one paragraph.
7487  In addition, it should contain an entry with the keywords.
7488  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7489  command 
7490 \family typewriter
7491
7492 \backslash
7493 keywords{}
7494 \family default
7495  by hand and mark it as LaTeX code.
7496  Refer to the example paper.
7497 \end_layout
7498
7499 \begin_layout Subsection
7500 Supported environments
7501 \end_layout
7502
7503 \begin_layout Standard
7504 The A&A paper layout supports the following environments for structuring
7505  your text:
7506 \end_layout
7507
7508 \begin_layout Itemize
7509
7510 \family sans
7511 Standard
7512 \end_layout
7513
7514 \begin_layout Itemize
7515
7516 \family sans
7517 Section
7518 \end_layout
7519
7520 \begin_layout Itemize
7521
7522 \family sans
7523 Subsection
7524 \end_layout
7525
7526 \begin_layout Itemize
7527
7528 \family sans
7529 Subsubsection
7530 \end_layout
7531
7532 \begin_layout Itemize
7533
7534 \family sans
7535 Itemize
7536 \end_layout
7537
7538 \begin_layout Itemize
7539
7540 \family sans
7541 Enumerate
7542 \end_layout
7543
7544 \begin_layout Itemize
7545
7546 \family sans
7547 Description
7548 \end_layout
7549
7550 \begin_layout Itemize
7551
7552 \family sans
7553 Caption
7554 \end_layout
7555
7556 \begin_layout Itemize
7557
7558 \family sans
7559 Abstract
7560 \end_layout
7561
7562 \begin_layout Itemize
7563
7564 \family sans
7565 Acknowledgment
7566 \end_layout
7567
7568 \begin_layout Itemize
7569
7570 \family sans
7571 Bibliography
7572 \end_layout
7573
7574 \begin_layout Itemize
7575
7576 \family sans
7577 LaTeX
7578 \end_layout
7579
7580 \begin_layout Subsection
7581 Commands not supported by LyX
7582 \end_layout
7583
7584 \begin_layout Standard
7585 Some commands are not yet supported by the 
7586 \family sans
7587 paper (A&A)
7588 \family default
7589  layout for LyX.
7590  Some have already been mentioned.
7591  For the sake of completeness, they are listed all together here:
7592 \end_layout
7593
7594 \begin_layout Itemize
7595
7596 \family typewriter
7597
7598 \backslash
7599 and
7600 \end_layout
7601
7602 \begin_layout Itemize
7603
7604 \family typewriter
7605
7606 \backslash
7607 email
7608 \end_layout
7609
7610 \begin_layout Itemize
7611
7612 \family typewriter
7613
7614 \backslash
7615 appendix
7616 \end_layout
7617
7618 \begin_layout Itemize
7619
7620 \family typewriter
7621
7622 \backslash
7623 authorrunning
7624 \end_layout
7625
7626 \begin_layout Itemize
7627
7628 \family typewriter
7629
7630 \backslash
7631 inst{}
7632 \end_layout
7633
7634 \begin_layout Itemize
7635
7636 \family typewriter
7637
7638 \backslash
7639 keywords{}
7640 \end_layout
7641
7642 \begin_layout Itemize
7643
7644 \family typewriter
7645
7646 \backslash
7647 object{}
7648 \end_layout
7649
7650 \begin_layout Itemize
7651
7652 \family typewriter
7653
7654 \backslash
7655 titlerunning{}
7656 \end_layout
7657
7658 \begin_layout Standard
7659 If you want to use any of these commands, you have to enter them yourself.
7660  
7661 \series bold
7662 Do not forget to mark them as LaTeX code!
7663 \end_layout
7664
7665 \begin_layout Subsection
7666 Figure and Table Floats
7667 \end_layout
7668
7669 \begin_layout Standard
7670 LyX provides support for the necessary float environments 
7671 \family sans
7672 figure, figure*, table
7673 \family default
7674  and 
7675 \family sans
7676 table*
7677 \family default
7678 , therefore we won't tell much about it here.
7679  Refer to the 
7680 \emph on
7681 User's
7682 \begin_inset space ~
7683 \end_inset
7684
7685 Guide
7686 \emph default
7687 .
7688  Just remember that tables should be left-aligned.
7689  For that, select the table and change the alignment in 
7690 \family sans
7691 Edit\SpecialChar \menuseparator
7692 Paragraph
7693 \begin_inset space ~
7694 \end_inset
7695
7696 Settings.
7697 \end_layout
7698
7699 \begin_layout Standard
7700 There is only one special thing: the figures with caption besides the figure.
7701  To create such a figure, you have to do the following:
7702 \end_layout
7703
7704 \begin_layout Enumerate
7705 Create a wide figure float: 
7706 \family sans
7707 Insert\SpecialChar \menuseparator
7708 Float\SpecialChar \menuseparator
7709 Figure
7710 \family default
7711 , then right click in the figure and select 
7712 \family sans
7713 \bar under
7714 S
7715 \bar default
7716 pan
7717 \begin_inset space ~
7718 \end_inset
7719
7720 columns
7721 \family default
7722 .
7723 \end_layout
7724
7725 \begin_layout Enumerate
7726 Enter your caption text.
7727 \end_layout
7728
7729 \begin_layout Enumerate
7730 Press 
7731 \family sans
7732 Return
7733 \family default
7734  to move the cursor above the caption.
7735 \end_layout
7736
7737 \begin_layout Enumerate
7738 Insert your figure
7739 \end_layout
7740
7741 \begin_layout Enumerate
7742 Position the cursor behind the figure and insert a horizontal fill: 
7743 \family sans
7744 Insert\SpecialChar \menuseparator
7745 Special
7746 \begin_inset space ~
7747 \end_inset
7748
7749 Character\SpecialChar \menuseparator
7750 Horizontal
7751 \begin_inset space ~
7752 \end_inset
7753
7754 Fill
7755 \family default
7756 .
7757 \end_layout
7758
7759 \begin_layout Enumerate
7760 Switch to LaTeX mode: 
7761 \family sans
7762 M-c
7763 \begin_inset space ~
7764 \end_inset
7765
7766 t
7767 \family default
7768 .
7769 \end_layout
7770
7771 \begin_layout Enumerate
7772 Enter 
7773 \family typewriter
7774
7775 \backslash
7776 parbox[b]{55mm}{
7777 \family default
7778 .
7779  
7780 \series bold
7781 Do not close the brace!
7782 \end_layout
7783
7784 \begin_layout Enumerate
7785 Position the cursor behind the caption text, switch to LaTeX mode and insert
7786  the closing brace: 
7787 \family sans
7788 M-c
7789 \begin_inset space ~
7790 \end_inset
7791
7792 t
7793 \family default
7794  
7795 \family typewriter
7796 }
7797 \family default
7798 .
7799 \end_layout
7800
7801 \begin_layout Standard
7802 Also, refer to the figures in the example paper.
7803 \end_layout
7804
7805 \begin_layout Subsection
7806 Referee layout
7807 \end_layout
7808
7809 \begin_layout Standard
7810 For submission, the paper has to be formated in a special double-spacing
7811  layout.
7812  For this purpose, you have to give the option 
7813 \family typewriter
7814 referee
7815 \family default
7816  to the documentclass.
7817  This must be done using the extra class options field in the 
7818 \family sans
7819 Document\SpecialChar \menuseparator
7820 Settings
7821 \family default
7822  dialog.
7823  Just enter the string 
7824 \family typewriter
7825 referee
7826 \family default
7827  there.
7828 \end_layout
7829
7830 \begin_layout Subsection
7831 The example paper
7832 \end_layout
7833
7834 \begin_layout Standard
7835 The 
7836 \family sans
7837 Examples
7838 \family default
7839  directory contains an example paper written with LyX.
7840  It is the example paper from the original macro package, translated to
7841  LyX.
7842  Use it for inspiration, and compare the original LaTeX code with LyX way
7843  of writing.
7844 \end_layout
7845
7846 \begin_layout Section
7847 AASTeX
7848 \end_layout
7849
7850 \begin_layout Standard
7851 by 
7852 \noun on
7853 Mike Ressler
7854 \end_layout
7855
7856 \begin_layout Subsection
7857 Introduction
7858 \end_layout
7859
7860 \begin_layout Standard
7861 AASTeX is a set of macros produced by the American Astronomical Society
7862  to facilitate electronic manuscript submission to the three journals they
7863  publish: the Astrophysical Journal (including the Letters and Supplement),
7864  the Astronomical Journal, and the Publications of the Astronomical Society
7865  of the Pacific.
7866  LyX has proven to be an excellent tool for generating these documents,
7867  especially given its equation, citation, and figure handling capabilities.
7868  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7869  is the version described here, or higher.
7870  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7871  incompatible with LyX.
7872  The AASTeX package may be downloaded from the AASTeX Web site
7873 \end_layout
7874
7875 \begin_layout Standard
7876 \begin_inset VSpace medskip
7877 \end_inset
7878
7879
7880 \end_layout
7881
7882 \begin_layout Standard
7883 \align center
7884 \begin_inset Flex URL
7885 status collapsed
7886
7887 \begin_layout Plain Layout
7888
7889 http://www.journals.uchicago.edu/AAS/AASTeX
7890 \end_layout
7891
7892 \end_inset
7893
7894
7895 \end_layout
7896
7897 \begin_layout Standard
7898 \begin_inset VSpace medskip
7899 \end_inset
7900
7901
7902 \end_layout
7903
7904 \begin_layout Standard
7905 A complete user guide is contained in that package and you should familiarize
7906  yourself with it thoroughly before embarking on writing a paper in LyX.
7907  LyX will not reduce the need to figure out all the AASTeX commands, it
7908  will only reduce the drudgery of typing everything in.
7909  It is your responsibility to ensure that the final exported LaTeX document
7910  conforms completely to the requirements of the journal to which you are
7911  submitting your paper.
7912 \end_layout
7913
7914 \begin_layout Subsection
7915 Starting a New Paper
7916 \end_layout
7917
7918 \begin_layout Standard
7919 I strongly suggest that you start with the AASTeX template file.
7920  Click on 
7921 \family sans
7922 File\SpecialChar \menuseparator
7923 New from
7924 \family default
7925  
7926 \family sans
7927 Template
7928 \family default
7929 , enter the new file name, then choose the 
7930 \family typewriter
7931 aastex.lyx
7932 \family default
7933  template.
7934  This will show the most common fields found in a manuscript.
7935  Simply overwrite the existing text (including the brackets, 
7936 \family typewriter
7937 <>
7938 \family default
7939 ) with the correct information.
7940  Many of the AASTeX commands and environments can be implemented directly
7941  in LyX, but some cannot: most noticeably 
7942 \family typewriter
7943
7944 \backslash
7945 altaffilmark
7946 \family default
7947  and 
7948 \family typewriter
7949
7950 \backslash
7951 altaffiltext
7952 \family default
7953 , which should stick out like a sore thumb if you actually just opened the
7954  template file.
7955  For commands such as these, the LaTeX code must be entered directly and
7956  marked as such.
7957  Such commands are referred to as TeX code, or Evil Red Text.
7958  I tried to minimize the amount of TeX code needed in an AASTeX document,
7959  but there is still a bit more required than any of us would like.
7960 \end_layout
7961
7962 \begin_layout Subsection
7963 Finishing Your Paper
7964 \end_layout
7965
7966 \begin_layout Standard
7967 When the paper is finished to your satisfaction and previews/prints correctly,
7968  there are a few 
7969 \begin_inset Quotes eld
7970 \end_inset
7971
7972 postprocessing
7973 \begin_inset Quotes erd
7974 \end_inset
7975
7976  actions which need to be done before you submit it to the journals.
7977  
7978 \end_layout
7979
7980 \begin_layout Enumerate
7981 Export your paper as a LaTeX file (
7982 \family sans
7983 File\SpecialChar \menuseparator
7984 Export\SpecialChar \menuseparator
7985 LaTeX
7986 \family default
7987 ).
7988  
7989 \end_layout
7990
7991 \begin_layout Enumerate
7992 Edit the resulting 
7993 \family typewriter
7994 .tex
7995 \family default
7996  file with your favorite text editor
7997 \end_layout
7998
7999 \begin_deeper
8000 \begin_layout Enumerate
8001 remove the comment lines before the 
8002 \family typewriter
8003
8004 \backslash
8005 documentclass
8006 \family default
8007  command
8008 \end_layout
8009
8010 \begin_layout Enumerate
8011 remove the 
8012 \family typewriter
8013
8014 \backslash
8015 usepackage...{fontenc}
8016 \family default
8017  line if it appears (usually just after 
8018 \family typewriter
8019
8020 \backslash
8021 documentclass
8022 \family default
8023 }; also remove the 
8024 \family typewriter
8025
8026 \backslash
8027 secnumdepth
8028 \family default
8029  line if it appears.
8030 \end_layout
8031
8032 \begin_layout Enumerate
8033 remove everything between (and including) the 
8034 \family typewriter
8035
8036 \backslash
8037 makeatletter
8038 \family default
8039  and 
8040 \family typewriter
8041
8042 \backslash
8043 makeatother
8044 \family default
8045  commands, except for any commands you specifically put into the LaTeX preamble
8046  (which should appear immediately after the 
8047 \begin_inset Quotes eld
8048 \end_inset
8049
8050 User specified LaTeX commands
8051 \begin_inset Quotes erd
8052 \end_inset
8053
8054  comment in the 
8055 \family typewriter
8056 .tex
8057 \family default
8058  file).
8059 \end_layout
8060
8061 \end_deeper
8062 \begin_layout Enumerate
8063 Run the resulting file through LaTeX to make sure it still processes correctly.
8064 \end_layout
8065
8066 \begin_layout Enumerate
8067 Reread the journal requirements to make sure your filenames and formats
8068  are correct.
8069 \end_layout
8070
8071 \begin_layout Enumerate
8072 Submit it.
8073 \end_layout
8074
8075 \begin_layout Subsection
8076 Comments On Specific Commands
8077 \end_layout
8078
8079 \begin_layout Standard
8080 I will not describe the detailed usage of the individual AASTeX commands:
8081  the AASTeX User Guide (
8082 \family typewriter
8083 aasguide.tex
8084 \family default
8085 ) gives a good description of each.
8086  Thus it's probably easiest for me to go down the list as found in the guide
8087  and offer comments where necessary.
8088  So let's begin \SpecialChar \ldots{}
8089
8090 \end_layout
8091
8092 \begin_layout Subsubsection
8093 Things that work as expected
8094 \end_layout
8095
8096 \begin_layout Standard
8097 \begin_inset ERT
8098 status open
8099
8100 \begin_layout Plain Layout
8101
8102
8103 \backslash
8104 begin{sloppypar}
8105 \end_layout
8106
8107 \end_inset
8108
8109
8110 \end_layout
8111
8112 \begin_layout Standard
8113 Because they work as you might expect, I simply list them and the section
8114  they are found in: 
8115 \family typewriter
8116
8117 \backslash
8118 documentclass
8119 \family default
8120  (2.1.1), 
8121 \family typewriter
8122
8123 \backslash
8124 begin{document}
8125 \family default
8126  (2.2), 
8127 \family typewriter
8128
8129 \backslash
8130 title
8131 \family default
8132  (2.3), 
8133 \family typewriter
8134
8135 \backslash
8136 author
8137 \family default
8138  (2.3), 
8139 \family typewriter
8140
8141 \backslash
8142 affil
8143 \family default
8144  (2.3), 
8145 \family typewriter
8146
8147 \backslash
8148 abstract
8149 \family default
8150  (2.4), 
8151 \family typewriter
8152
8153 \backslash
8154 keywords
8155 \family default
8156  (2.5), 
8157 \family typewriter
8158
8159 \backslash
8160 section
8161 \family default
8162  (2.7), 
8163 \family typewriter
8164
8165 \backslash
8166 subsection
8167 \family default
8168  (2.7), 
8169 \family typewriter
8170
8171 \backslash
8172 subsubsection
8173 \family default
8174  (2.7), 
8175 \family typewriter
8176
8177 \backslash
8178 paragraph
8179 \family default
8180  (2.7), 
8181 \family typewriter
8182
8183 \backslash
8184 facility
8185 \family default
8186  (2.10), 
8187 \family typewriter
8188
8189 \backslash
8190 begin{displaymath}
8191 \family default
8192  (2.12), 
8193 \family typewriter
8194
8195 \backslash
8196 begin{equation}
8197 \family default
8198  (2.12), 
8199 \family typewriter
8200
8201 \backslash
8202 begin{eqnarray}
8203 \family default
8204  (2.12), 
8205 \family typewriter
8206
8207 \backslash
8208 begin{mathletters}
8209 \family default
8210  (2.12), 
8211 \family typewriter
8212
8213 \backslash
8214 begin{thebibliography}
8215 \family default
8216  (2.13.1), 
8217 \family typewriter
8218
8219 \backslash
8220 bibitem
8221 \family default
8222  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8223  graphicx figure commands (2.14.1), 
8224 \family typewriter
8225
8226 \backslash
8227 begin{table}
8228 \family default
8229  (2.15.4), 
8230 \family typewriter
8231
8232 \backslash
8233 begin{tabular}
8234 \family default
8235  (2.15.4), 
8236 \family typewriter
8237
8238 \backslash
8239 caption
8240 \family default
8241  (2.15.4), 
8242 \family typewriter
8243
8244 \backslash
8245 label
8246 \family default
8247  (2.15.4, amongst other places), 
8248 \family typewriter
8249
8250 \backslash
8251 tablerefs
8252 \family default
8253  (2.15.5), 
8254 \family typewriter
8255
8256 \backslash
8257 tablecomments
8258 \family default
8259  (2.15.5), 
8260 \family typewriter
8261
8262 \backslash
8263 url
8264 \family default
8265  (2.17.4), 
8266 \family typewriter
8267
8268 \backslash
8269 end{document}
8270 \family default
8271  (2.18).
8272 \end_layout
8273
8274 \begin_layout Standard
8275 The following style options also work correctly: 
8276 \family typewriter
8277 longabstract
8278 \family default
8279  (2.4), 
8280 \family typewriter
8281 preprint
8282 \family default
8283  (3.2.1), 
8284 \family typewriter
8285 preprint2
8286 \family default
8287  (3.2.2), 
8288 \family typewriter
8289 eqsecnum
8290 \family default
8291  (3.3), 
8292 \family typewriter
8293 flushrt
8294 \family default
8295  (3.4).
8296  Simply put them in the 
8297 \family sans
8298 Options
8299 \family default
8300  box in 
8301 \family sans
8302 Layout\SpecialChar \menuseparator
8303 Document
8304 \family default
8305 .
8306 \end_layout
8307
8308 \begin_layout Standard
8309 \begin_inset ERT
8310 status open
8311
8312 \begin_layout Plain Layout
8313
8314
8315 \backslash
8316 end{sloppypar}
8317 \end_layout
8318
8319 \end_inset
8320
8321
8322 \end_layout
8323
8324 \begin_layout Subsubsection
8325 Things that work, but require more comment
8326 \end_layout
8327
8328 \begin_layout Standard
8329 The following items work, but require a little more discussion:
8330 \end_layout
8331
8332 \begin_layout Itemize
8333 These items are reserved for use by the journal editors, but you can put
8334  them into the LaTeX preamble if you feel compelled to do so: 
8335 \family typewriter
8336
8337 \backslash
8338 received
8339 \family default
8340
8341 \family typewriter
8342
8343 \backslash
8344 revised
8345 \family default
8346
8347 \family typewriter
8348
8349 \backslash
8350 accepted
8351 \family default
8352
8353 \family typewriter
8354
8355 \backslash
8356 ccc
8357 \family default
8358
8359 \family typewriter
8360
8361 \backslash
8362 cpright
8363 \family default
8364  (all from 2.1.3)
8365 \end_layout
8366
8367 \begin_layout Itemize
8368 These items may be placed in the LaTeX preamble, and are included as blanks
8369  in the template file: 
8370 \family typewriter
8371
8372 \backslash
8373 slugcomment
8374 \family default
8375  (2.1.4), 
8376 \family typewriter
8377
8378 \backslash
8379 shorttitle
8380 \family default
8381  (2.1.5), 
8382 \family typewriter
8383
8384 \backslash
8385 shortauthors
8386 \family default
8387  (2.1.5)
8388 \end_layout
8389
8390 \begin_layout Itemize
8391
8392 \family typewriter
8393
8394 \backslash
8395 email
8396 \family default
8397  (2.3) – can only be used 
8398 \begin_inset Quotes eld
8399 \end_inset
8400
8401 standalone
8402 \begin_inset Quotes erd
8403 \end_inset
8404
8405 , not in the middle of a paragraph.
8406  Use TeX code if you need to embed it.
8407 \end_layout
8408
8409 \begin_layout Itemize
8410
8411 \family typewriter
8412
8413 \backslash
8414 and
8415 \family default
8416  (2.3) – will have extra {} after it.
8417  This should not cause an error.
8418 \end_layout
8419
8420 \begin_layout Itemize
8421
8422 \family typewriter
8423
8424 \backslash
8425 notetoeditor
8426 \family default
8427  (2.6) – can only be used 
8428 \begin_inset Quotes eld
8429 \end_inset
8430
8431 standalone
8432 \begin_inset Quotes erd
8433 \end_inset
8434
8435 , not in the middle of a paragraph.
8436  Use TeX code if you need to embed it.
8437 \end_layout
8438
8439 \begin_layout Itemize
8440
8441 \family typewriter
8442
8443 \backslash
8444 placetable
8445 \family default
8446  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8447  hand
8448 \end_layout
8449
8450 \begin_layout Itemize
8451
8452 \family typewriter
8453
8454 \backslash
8455 placefigure
8456 \family default
8457  (2.8) – same as for 
8458 \family typewriter
8459
8460 \backslash
8461 placetable
8462 \end_layout
8463
8464 \begin_layout Itemize
8465
8466 \family typewriter
8467
8468 \backslash
8469 acknowledgements
8470 \family default
8471  (2.9) – will have extra {} after it.
8472  This should not cause an error.
8473 \end_layout
8474
8475 \begin_layout Itemize
8476
8477 \family typewriter
8478
8479 \backslash
8480 appendix
8481 \family default
8482  (2.11) – will have extra {} after it.
8483  This should not cause an error.
8484 \end_layout
8485
8486 \begin_layout Itemize
8487
8488 \family typewriter
8489
8490 \backslash
8491 figcaption
8492 \family default
8493  (2.14.2) – you can insert an optional filename argument by placing the cursor
8494  at the beginning of the text and selecting 
8495 \family sans
8496 Insert\SpecialChar \menuseparator
8497 Short Title
8498 \family default
8499 .
8500  
8501 \begin_inset Quotes eld
8502 \end_inset
8503
8504 Short Title
8505 \begin_inset Quotes erd
8506 \end_inset
8507
8508  inserts an optional argument of the type needed by 
8509 \family typewriter
8510
8511 \backslash
8512 figcaption
8513 \family default
8514 .
8515  Hopefully it will be renamed someday.
8516 \end_layout
8517
8518 \begin_layout Itemize
8519
8520 \family typewriter
8521
8522 \backslash
8523 objectname
8524 \family default
8525  (2.17.1) – same as 
8526 \family typewriter
8527
8528 \backslash
8529 figcaption
8530 \family default
8531  for the catalog ID optional parameter
8532 \end_layout
8533
8534 \begin_layout Itemize
8535
8536 \family typewriter
8537
8538 \backslash
8539 dataset
8540 \family default
8541  (2.17.1) – same as 
8542 \family typewriter
8543
8544 \backslash
8545 figcaption
8546 \family default
8547  for the catalog ID optional parameter
8548 \end_layout
8549
8550 \begin_layout Subsubsection
8551 Things not implemented, use TeX code
8552 \end_layout
8553
8554 \begin_layout Standard
8555 \begin_inset ERT
8556 status open
8557
8558 \begin_layout Plain Layout
8559
8560
8561 \backslash
8562 begin{sloppypar}
8563 \end_layout
8564
8565 \end_inset
8566
8567
8568 \end_layout
8569
8570 \begin_layout Standard
8571
8572 \family typewriter
8573
8574 \backslash
8575 altaffilmark
8576 \family default
8577  (2.3), 
8578 \family typewriter
8579
8580 \backslash
8581 altaffiltext
8582 \family default
8583  (2.3), 
8584 \family typewriter
8585
8586 \backslash
8587 eqnum
8588 \family default
8589  (2.12), 
8590 \family typewriter
8591
8592 \backslash
8593 setcounter{equation}
8594 \family default
8595  (2.12), Journal name abbreviations (2.13.4), 
8596 \family typewriter
8597
8598 \backslash
8599 figurenum
8600 \family default
8601  (2.14.1), 
8602 \family typewriter
8603
8604 \backslash
8605 epsscale
8606 \family default
8607  (2.14.1), 
8608 \family typewriter
8609
8610 \backslash
8611 plotone
8612 \family default
8613  (2.14.1), 
8614 \family typewriter
8615
8616 \backslash
8617 plottwo
8618 \family default
8619  (2.14.1), 
8620 \family typewriter
8621
8622 \backslash
8623 tablenum
8624 \family default
8625  (2.15.4), 
8626 \family typewriter
8627
8628 \backslash
8629 tableline
8630 \family default
8631  (2.15.4, insert it as the first element in the lefthand cell after where
8632  you want it.
8633  Don't use any of LyX's rules in the table), 
8634 \family typewriter
8635
8636 \backslash
8637 tablenotemark
8638 \family default
8639  (2.15.5), 
8640 \family typewriter
8641
8642 \backslash
8643 tablenotetext
8644 \family default
8645  (2.15.5), much of Misc (2.17, except 
8646 \family typewriter
8647
8648 \backslash
8649 objectname
8650 \family default
8651
8652 \family typewriter
8653
8654 \backslash
8655 dataset
8656 \family default
8657
8658 \family typewriter
8659
8660 \backslash
8661 url
8662 \family default
8663 , and 
8664 \family typewriter
8665
8666 \backslash
8667 email
8668 \family default
8669 ; see above), 
8670 \family typewriter
8671
8672 \backslash
8673 singlespace
8674 \family default
8675  (3.1), 
8676 \family typewriter
8677
8678 \backslash
8679 doublespace
8680 \family default
8681  (3.1), 
8682 \family typewriter
8683
8684 \backslash
8685 onecolumn
8686 \family default
8687  (3.2), 
8688 \family typewriter
8689
8690 \backslash
8691 twocolumn
8692 \family default
8693  (3.2)
8694 \end_layout
8695
8696 \begin_layout Standard
8697 \begin_inset ERT
8698 status open
8699
8700 \begin_layout Plain Layout
8701
8702
8703 \backslash
8704 end{sloppypar}
8705 \end_layout
8706
8707 \end_inset
8708
8709
8710 \end_layout
8711
8712 \begin_layout Subsubsection
8713 Things that cannot be implemented
8714 \end_layout
8715
8716 \begin_layout Standard
8717 \SpecialChar \ldots{}
8718  at least in any meaningful sort of way, so I suggest ignoring them.
8719  They are the references environment (2.13.3), and the deluxetable environment
8720  (2.15).
8721  If you really, really need to use deluxetable, I suggest editing it in
8722  a separate file with a text editor, then using 
8723 \family sans
8724 Insert\SpecialChar \menuseparator
8725 Child
8726 \begin_inset space ~
8727 \end_inset
8728
8729 Document
8730 \family default
8731  to include it in your LyX document.
8732  See the 
8733 \family typewriter
8734 aas_sample.lyx
8735 \family default
8736  file to see an example of this.
8737 \end_layout
8738
8739 \begin_layout Subsection
8740 FAQs, Tips, Tricks, and Other Ruminations
8741 \end_layout
8742
8743 \begin_layout Subsubsection
8744 Getting LyX and AASTeX to cooperate
8745 \end_layout
8746
8747 \begin_layout Standard
8748 It can be a bit tricky to get LyX to recognize a new layout and document
8749  class.
8750  When all else fails, do this:
8751 \end_layout
8752
8753 \begin_layout Enumerate
8754 Make certain that LaTeX can find AASTeX.
8755  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8756  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8757 \family typewriter
8758 sample.tex
8759 \family default
8760 .
8761 \end_layout
8762
8763 \begin_layout Enumerate
8764 Make certain that 
8765 \family typewriter
8766 aastex.layout
8767 \family default
8768  appears in LyX's 
8769 \family typewriter
8770 layouts
8771 \family default
8772  folder
8773 \end_layout
8774
8775 \begin_layout Enumerate
8776 Rerun 
8777 \family sans
8778 Tools\SpecialChar \menuseparator
8779 Reconfigure
8780 \family default
8781  in LyX, then restart LyX.
8782 \end_layout
8783
8784 \begin_layout Enumerate
8785 Open a regular new file, not from a template.
8786  Does AASTeX appear in the class list in 
8787 \family sans
8788 Document\SpecialChar \menuseparator
8789 Settings
8790 \family default
8791 ?
8792 \end_layout
8793
8794 \begin_layout Standard
8795 If you get a warning from an existing AASTeX document about not being able
8796  to find the AASTeX layout or a message about 
8797 \begin_inset Quotes eld
8798 \end_inset
8799
8800 You should not mix title layouts with normal ones
8801 \begin_inset Quotes erd
8802 \end_inset
8803
8804 , things haven't been installed correctly.
8805 \end_layout
8806
8807 \begin_layout Subsubsection
8808 LaTeX error processing a table 
8809 \end_layout
8810
8811 \begin_layout Standard
8812 LyX, by default, attempts to center the table caption/title.
8813  This seems to produce a bad interaction in AASTeX so you should click somewhere
8814  in the caption/title, then select 
8815 \family sans
8816 Edit\SpecialChar \menuseparator
8817 Paragraph
8818 \begin_inset space ~
8819 \end_inset
8820
8821 Settings
8822 \family default
8823 , then set the 
8824 \family sans
8825 Alignment
8826 \family default
8827  to 
8828 \family sans
8829 Block
8830 \family default
8831 .
8832  This took care of it for me.
8833 \end_layout
8834
8835 \begin_layout Subsubsection
8836 References
8837 \end_layout
8838
8839 \begin_layout Standard
8840 A couple of things: 1) I have noticed some funny spacing in the reference
8841  entries in the text.
8842  When you enter the bibliography item data, make sure their is 
8843 \emph on
8844 no
8845 \emph default
8846  space between the last author and the parenthesis setting off the year;
8847  
8848 \emph on
8849 e.
8850 \begin_inset space \thinspace{}
8851 \end_inset
8852
8853 g.
8854 \begin_inset space \space{}
8855 \end_inset
8856
8857
8858 \emph default
8859 type 
8860 \family typewriter
8861 Ressler(1992)
8862 \family default
8863 , not 
8864 \family typewriter
8865 Ressler (1992)
8866 \family default
8867 .
8868  2) Entering the references at all is not obvious.
8869  The easiest thing is to start typing your first reference at the end of
8870  the document, then mark it as type 
8871 \family sans
8872 References
8873 \family default
8874 .
8875  That will put a small gray box in front of what you just typed.
8876  Click on the box to fill in the rest of the information.
8877  For new references, go to the end of an existing reference and press return.
8878  That will create a new line with its own box, etc.
8879 \end_layout
8880
8881 \begin_layout Subsubsection
8882 Including EPS files
8883 \end_layout
8884
8885 \begin_layout Standard
8886 Even though AASTeX provides its own figure commands (
8887 \family typewriter
8888
8889 \backslash
8890 plotone
8891 \family default
8892 , for example), I much prefer LaTeX's standard figure commands (with the
8893  default graphicx).
8894  You can insert the 
8895 \family typewriter
8896
8897 \backslash
8898 plotone
8899 \family default
8900 , etc.
8901 \begin_inset space ~
8902 \end_inset
8903
8904 commands as TeX code into a Figure Float box if you desire, but I never
8905  have much luck getting the layout right.
8906  With the standard graphics, LyX will insert a 
8907 \family typewriter
8908
8909 \backslash
8910 usepackage{graphicx}
8911 \family default
8912  command into the LaTeX preamble and handle the figures in the standard
8913  LaTeX2e way, interspersing the figures in the text.
8914  I believe ApJ accepts figures exactly this way now; AJ might still use
8915  the 
8916 \begin_inset Quotes eld
8917 \end_inset
8918
8919 stack everything at the end
8920 \begin_inset Quotes erd
8921 \end_inset
8922
8923  technique.
8924 \end_layout
8925
8926 \begin_layout Subsubsection
8927 Things I could have done, but didn't
8928 \end_layout
8929
8930 \begin_layout Standard
8931 There are a few 
8932 \begin_inset Quotes eld
8933 \end_inset
8934
8935 pretty
8936 \begin_inset Quotes erd
8937 \end_inset
8938
8939  things I could have implemented, but chose not to.
8940  For instance, I saw no point in double-spacing the text in the LyX window,
8941  even though it is double-spaced in the paper manuscript.
8942  Also, I chose not to make separate layouts for the preprint and preprint2
8943  styles.
8944  Since I assume you will spend most of your time in the plain manuscript
8945  mode anyway, I decided not to chew up more disk space with this.
8946  
8947 \end_layout
8948
8949 \begin_layout Subsection
8950 Final Caveat
8951 \end_layout
8952
8953 \begin_layout Standard
8954 Your mileage may vary.
8955  I've now had papers published by both ApJ and AJ that have had 98% of the
8956  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8957  cleanups.
8958  I have had no trouble with the submission process, and I'm sure the journals
8959  were never aware that there might be a difference.
8960  So, go forth and publish!
8961 \end_layout
8962
8963 \begin_layout Section
8964 AMS LaTeX
8965 \end_layout
8966
8967 \begin_layout Standard
8968 by 
8969 \noun on
8970 David Johnson; updated by Richard Heck
8971 \end_layout
8972
8973 \begin_layout Standard
8974 \begin_inset VSpace bigskip
8975 \end_inset
8976
8977
8978 \end_layout
8979
8980 \begin_layout Standard
8981 \noindent
8982 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8983  papers to be submitted to American Mathematical Society publications.
8984  The layouts are not tailored to a specific journal, but easily can be.
8985  You should refer to the AMS documentation for specific instructions for
8986  each journal (usually it will entail only changing a single line in the
8987  TeX output).
8988  That documentation is available on the Web at 
8989 \begin_inset Flex URL
8990 status open
8991
8992 \begin_layout Plain Layout
8993
8994 http://www.ams.org
8995 \end_layout
8996
8997 \end_inset
8998
8999  or by ftp at 
9000 \begin_inset Flex URL
9001 status open
9002
9003 \begin_layout Plain Layout
9004
9005 ftp://ftp.ams.org/pub/tex/amslatex/
9006 \end_layout
9007
9008 \end_inset
9009
9010 .
9011  These layouts are appropriate, and useful, for any mathematical writing.
9012  
9013 \end_layout
9014
9015 \begin_layout Standard
9016 There are two basic AMS LaTeX layouts: 
9017 \end_layout
9018
9019 \begin_layout Itemize
9020 amsart: The standard AMS article format.
9021 \end_layout
9022
9023 \begin_layout Itemize
9024 amsbook: the standard AMS book (really, monograph) format.
9025  
9026 \end_layout
9027
9028 \begin_layout Standard
9029 The layouts themselves contain only the minimum necessary to use the AMS
9030  classes.
9031  They do not, in particular, contain any of the `theorem' environments used
9032  for setting theorems, lemmas, and the like.
9033  These are contained, instead, in the 
9034 \begin_inset Flex Code
9035 status collapsed
9036
9037 \begin_layout Plain Layout
9038 Theorems (AMS)
9039 \end_layout
9040
9041 \end_inset
9042
9043  module, which is loaded by default when when you select one of the AMS
9044  classes.
9045  (It can also be used with other classes and can be removed, if you would
9046  rather use something else.) Less commonly used environments are in the 
9047 \begin_inset Flex Code
9048 status collapsed
9049
9050 \begin_layout Plain Layout
9051 Theorems (AMS-Extended)
9052 \end_layout
9053
9054 \end_inset
9055
9056  module, which must be loaded manually.
9057 \end_layout
9058
9059 \begin_layout Standard
9060 By default, theorems and the like are numbered consecutively throughout
9061  the document, but this may be modified by loading the module 
9062 \begin_inset Flex Code
9063 status collapsed
9064
9065 \begin_layout Plain Layout
9066 Theorems (Order by Section)
9067 \end_layout
9068
9069 \end_inset
9070
9071  or, if you are using 
9072 \begin_inset Flex Code
9073 status collapsed
9074
9075 \begin_layout Plain Layout
9076 book (AMS)
9077 \end_layout
9078
9079 \end_inset
9080
9081 , the module 
9082 \begin_inset Flex Code
9083 status collapsed
9084
9085 \begin_layout Plain Layout
9086 Theorems (Order by Chapter)
9087 \end_layout
9088
9089 \end_inset
9090
9091 .
9092  These will number the results as 
9093 \begin_inset Formula $n.m$
9094 \end_inset
9095
9096 , where the first number refers to the section (or chapter) and the second
9097  refers to the total number of results so far in that section (or chapter).
9098  Many environments are also available unnumbered.
9099  These are indicated by an asterisk at the end.
9100  If you happen to want 
9101 \emph on
9102 only
9103 \emph default
9104  unnumbered results, the module 
9105 \begin_inset Flex Code
9106 status collapsed
9107
9108 \begin_layout Plain Layout
9109 Theorems (Starred)
9110 \end_layout
9111
9112 \end_inset
9113
9114  provides that option.
9115 \end_layout
9116
9117 \begin_layout Standard
9118 Note that these modules do not 
9119 \emph on
9120 have
9121 \emph default
9122  to be used with the AMS classes.
9123  It is perfectly possible to use the 
9124 \begin_inset Flex Code
9125 status collapsed
9126
9127 \begin_layout Plain Layout
9128 Theorems (AMS)
9129 \end_layout
9130
9131 \end_inset
9132
9133  module, and the others mentioned, with other classes, such as 
9134 \begin_inset Flex Code
9135 status collapsed
9136
9137 \begin_layout Plain Layout
9138 article
9139 \end_layout
9140
9141 \end_inset
9142
9143
9144 \begin_inset Flex Code
9145 status collapsed
9146
9147 \begin_layout Plain Layout
9148 report
9149 \end_layout
9150
9151 \end_inset
9152
9153
9154 \begin_inset Flex Code
9155 status collapsed
9156
9157 \begin_layout Plain Layout
9158 book (KOMA-script)
9159 \end_layout
9160
9161 \end_inset
9162
9163 , and so forth.
9164 \end_layout
9165
9166 \begin_layout Subsection
9167 What these layouts provide
9168 \end_layout
9169
9170 \begin_layout Standard
9171 There is a long list of included environments provided by these layouts.
9172  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9173  variety of `theorem' environments.
9174  However, the AMS recommends the environments that are available in LyX.
9175  
9176 \end_layout
9177
9178 \begin_layout Standard
9179 The following environments—as well as the standard environments, such as
9180  
9181 \begin_inset Flex Noun
9182 status collapsed
9183
9184 \begin_layout Plain Layout
9185 section
9186 \end_layout
9187
9188 \end_inset
9189
9190
9191 \begin_inset Flex Noun
9192 status collapsed
9193
9194 \begin_layout Plain Layout
9195 bibliography
9196 \end_layout
9197
9198 \end_inset
9199
9200
9201 \begin_inset Flex Noun
9202 status collapsed
9203
9204 \begin_layout Plain Layout
9205 title
9206 \end_layout
9207
9208 \end_inset
9209
9210
9211 \begin_inset Flex Noun
9212 status collapsed
9213
9214 \begin_layout Plain Layout
9215 author
9216 \end_layout
9217
9218 \end_inset
9219
9220 , and 
9221 \begin_inset Flex Noun
9222 status collapsed
9223
9224 \begin_layout Plain Layout
9225 date
9226 \end_layout
9227
9228 \end_inset
9229
9230 —are provided by 
9231 \begin_inset Flex Code
9232 status collapsed
9233
9234 \begin_layout Plain Layout
9235 article (AMS)
9236 \end_layout
9237
9238 \end_inset
9239
9240  and 
9241 \begin_inset Flex Code
9242 status collapsed
9243
9244 \begin_layout Plain Layout
9245 book (AMS)
9246 \end_layout
9247
9248 \end_inset
9249
9250 :
9251 \end_layout
9252
9253 \begin_layout Description
9254 Address This should be the author's permanent address.
9255 \end_layout
9256
9257 \begin_layout Description
9258 Current
9259 \begin_inset space ~
9260 \end_inset
9261
9262 Address This should be the author's temporary address at the time of submission,
9263  if different from the Address.
9264 \end_layout
9265
9266 \begin_layout Description
9267 Email Author's e-mail address
9268 \end_layout
9269
9270 \begin_layout Description
9271 URL Author's Web address, if desired.
9272 \end_layout
9273
9274 \begin_layout Description
9275 Keywords Key words or phrases used to identify specific topics discussed
9276  in the paper.
9277 \end_layout
9278
9279 \begin_layout Description
9280 Subjectclass These refer to the AMS Subject Classifications, published and
9281  described in 
9282 \emph on
9283 Mathematical Reviews
9284 \emph default
9285 .
9286  These are also available online at the AMS cites listed above.
9287 \end_layout
9288
9289 \begin_layout Description
9290 Thanks
9291 \end_layout
9292
9293 \begin_layout Description
9294 Dedicatory
9295 \end_layout
9296
9297 \begin_layout Description
9298 Translator
9299 \end_layout
9300
9301 \begin_layout Standard
9302 The following environments are provided by both the 
9303 \begin_inset Flex Code
9304 status collapsed
9305
9306 \begin_layout Plain Layout
9307 Theorems
9308 \end_layout
9309
9310 \end_inset
9311
9312  and 
9313 \begin_inset Flex Code
9314 status collapsed
9315
9316 \begin_layout Plain Layout
9317 Theorems (AMS)
9318 \end_layout
9319
9320 \end_inset
9321
9322  modules, in the latter case in both starred (unnumbered) and unstarred
9323  (numbered) versions.
9324  These same environments are provided only in the starred versions by the
9325  
9326 \begin_inset Flex Code
9327 status collapsed
9328
9329 \begin_layout Plain Layout
9330 Theorems (Starred)
9331 \end_layout
9332
9333 \end_inset
9334
9335  module:
9336 \end_layout
9337
9338 \begin_layout Theorem
9339 This is typically used for the statements of major results.
9340  
9341 \end_layout
9342
9343 \begin_layout Corollary*
9344 This is used for statements which follow fairly directly from previous statement
9345 s.
9346  Again, these can be major results.
9347  
9348 \end_layout
9349
9350 \begin_layout Lemma
9351 These are smaller results needed to prove other statements.
9352 \end_layout
9353
9354 \begin_layout Proposition
9355 These are less major results which (hopefully) add to the general theory
9356  being discussed.
9357 \end_layout
9358
9359 \begin_layout Conjecture
9360 These are statements provided without justification, which the author does
9361  not know how to prove, but which seem to be true (to the author, at least).
9362 \end_layout
9363
9364 \begin_layout Definition*
9365 Guess what this is for.
9366  The font is different for this environment than for the previous ones.
9367  
9368 \end_layout
9369
9370 \begin_layout Example*
9371 Used for examples illustrating proven results.
9372 \end_layout
9373
9374 \begin_layout Problem
9375 It's not really known what this is for.
9376  You should figure it out.
9377 \end_layout
9378
9379 \begin_layout Exercise*
9380 Write a description for this one.
9381 \end_layout
9382
9383 \begin_layout Remark
9384 This environment is also a type of theorem, usually a lesser sort of observation.
9385 \end_layout
9386
9387 \begin_layout Claim*
9388 Often used in the course of giving a proof of a larger result.
9389 \end_layout
9390
9391 \begin_layout Case
9392 Generally, these are used to break up long arguments, using specific instances
9393  of some condition.
9394  
9395 \end_layout
9396
9397 \begin_layout Case
9398 The numbering scheme for cases is on its own, not together with other numbered
9399  statements.
9400  
9401 \end_layout
9402
9403 \begin_layout Proof
9404 At the end of this environment, a QED symbol (usually a square, but it can
9405  vary with different styles) is placed.
9406  If you want to have other environments within this one—for example, Case
9407  environments—and have the QED symbol appear only after them, then the other
9408  environments need to be nested within the proof environment.
9409  See the section 
9410 \emph on
9411 Nesting Environments
9412 \emph default
9413  of the 
9414 \emph on
9415 User's Guide
9416 \emph default
9417  for information on nesting.
9418 \end_layout
9419
9420 \begin_layout Standard
9421 And these environments are provided by 
9422 \begin_inset Flex Code
9423 status collapsed
9424
9425 \begin_layout Plain Layout
9426 Theorems (AMS-Extended)
9427 \end_layout
9428
9429 \end_inset
9430
9431 :
9432 \end_layout
9433
9434 \begin_layout Criterion*
9435 A required condition.
9436 \end_layout
9437
9438 \begin_layout Algorithm*
9439 A general procedure to be used.
9440 \end_layout
9441
9442 \begin_layout Axiom*
9443 This is a property or statement taken as true within the system being discussed.
9444 \end_layout
9445
9446 \begin_layout Condition*
9447 Sometimes used to state a condition assumed within the present context of
9448  discussion.
9449 \end_layout
9450
9451 \begin_layout Note*
9452 Similar to a Remark.
9453 \end_layout
9454
9455 \begin_layout Notation*
9456 Used for the explanation of, yes, notation.
9457 \end_layout
9458
9459 \begin_layout Summary
9460 Do we really need to tell you? 
9461 \end_layout
9462
9463 \begin_layout Acknowledgement*
9464 Acknowledgement.
9465 \end_layout
9466
9467 \begin_layout Conclusion*
9468 Sometimes used at the end of a long train of argument.
9469 \end_layout
9470
9471 \begin_layout Fact
9472 Used in a way similar to Proposition, though perhaps lower on the scale.
9473 \end_layout
9474
9475 \begin_layout Standard
9476 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9477  fonts packages.
9478  They need to be available on your system in order to use these environments.
9479 \end_layout
9480
9481 \begin_layout Section
9482 AGU journals (
9483 \family sans
9484 aguplus
9485 \family default
9486 )
9487 \end_layout
9488
9489 \begin_layout Standard
9490 by 
9491 \shape smallcaps
9492 Martin Vermeer
9493 \end_layout
9494
9495 \begin_layout Subsection
9496 Description
9497 \end_layout
9498
9499 \begin_layout Standard
9500 These are the layout files for some of the journals of the American Geophysical
9501  Society.
9502  It is assumed that you have both the AGU's own class files and AGUplus
9503  installed (everything to be found at
9504 \begin_inset Flex URL
9505 status collapsed
9506
9507 \begin_layout Plain Layout
9508
9509 ftp://ftp.agu.org/journals/latex/journals
9510 \end_layout
9511
9512 \end_inset
9513
9514 ).
9515 \end_layout
9516
9517 \begin_layout Subsection
9518 New styles
9519 \end_layout
9520
9521 \begin_layout Standard
9522 Redefined are 
9523 \family sans
9524 Paragraph
9525 \family default
9526
9527 \family sans
9528 Paragraph*
9529 \family default
9530 .
9531  They are still called this in the LyX GUI, though their LaTeX equivalents
9532  in the AGU classes are 
9533 \family sans
9534 Subsubsubsection
9535 \family default
9536  and 
9537 \family sans
9538 Subsubsubsection*
9539 \family default
9540 .
9541 \end_layout
9542
9543 \begin_layout Standard
9544 Newly defined styles are 
9545 \family sans
9546 Left_Header
9547 \family default
9548
9549 \family sans
9550 Right_Header
9551 \family default
9552
9553 \family sans
9554 Received
9555 \family default
9556
9557 \family sans
9558 Revised
9559 \family default
9560
9561 \family sans
9562 Accepted
9563 \family default
9564
9565 \family sans
9566 CCC
9567 \family default
9568
9569 \family sans
9570 PaperId
9571 \family default
9572
9573 \family sans
9574 AuthorAddr
9575 \family default
9576
9577 \family sans
9578 SlugComment
9579 \family default
9580 .
9581  These are mostly manuscript attributes and defined in the AGU class documentati
9582 on.
9583 \end_layout
9584
9585 \begin_layout Standard
9586 I suspect this is still badly incomplete.
9587 \end_layout
9588
9589 \begin_layout Subsection
9590 New floats
9591 \end_layout
9592
9593 \begin_layout Standard
9594
9595 \family sans
9596 Planotable
9597 \family default
9598  and 
9599 \family sans
9600 Plate
9601 \family default
9602 .
9603  We also have a new 
9604 \family sans
9605 Table_Caption
9606 \family default
9607 .
9608 \end_layout
9609
9610 \begin_layout Subsection
9611 Supported journals
9612 \end_layout
9613
9614 \begin_layout Itemize
9615
9616 \emph on
9617 Journal of Geophysical Research
9618 \emph default
9619
9620 \family typewriter
9621 jgrga.layout
9622 \family default
9623  — Martin Vermeer
9624 \end_layout
9625
9626 \begin_layout Standard
9627 Add your own, it isn't so hard! Look at the 
9628 \family typewriter
9629 jgrga.layout
9630 \family default
9631  example and 
9632 \family typewriter
9633 aguplus.inc
9634 \family default
9635 .
9636 \end_layout
9637
9638 \begin_layout Subsection
9639 Bugs and things to remember
9640 \end_layout
9641
9642 \begin_layout Standard
9643 In order to use the new layouts, you must remember to do the following for
9644  a new document:
9645 \end_layout
9646
9647 \begin_layout Enumerate
9648
9649 \emph on
9650 Turn off babel
9651 \emph default
9652 .
9653  This can be done in the 
9654 \family sans
9655 Layout\SpecialChar \menuseparator
9656 Document
9657 \family default
9658  or 
9659 \family sans
9660 Document\SpecialChar \menuseparator
9661 Settings
9662 \family default
9663  menu item.
9664  (AGU articles are always in English, right? So 
9665 \emph on
9666 don't
9667 \emph default
9668  choose a language.)
9669 \end_layout
9670
9671 \begin_layout Enumerate
9672 Enter 
9673 \family typewriter
9674 jgrga
9675 \family default
9676  into the document's 
9677 \family sans
9678 Extra Options
9679 \family default
9680  field.
9681  (Yes, this is a bug.)
9682 \end_layout
9683
9684 \begin_layout Enumerate
9685 Make sure you use the 
9686 \family typewriter
9687 agu.bst
9688 \family default
9689  bibliography style, by entering 
9690 \family sans
9691 agu
9692 \family default
9693  into the second field of the BibTeX inset.
9694  None of the standard styles will do.
9695 \end_layout
9696
9697 \begin_layout Section
9698 Broadway
9699 \end_layout
9700
9701 \begin_layout Standard
9702 by 
9703 \shape smallcaps
9704 Garst Reese
9705 \end_layout
9706
9707 \begin_layout Subsection
9708 Introduction
9709 \end_layout
9710
9711 \begin_layout Standard
9712 Broadway is for writing plays.
9713  The format is more decorative than Hollywood, and much less standardized.
9714  This format should be suitable for workshops.
9715 \end_layout
9716
9717 \begin_layout Subsection
9718 Special problems
9719 \end_layout
9720
9721 \begin_layout Standard
9722 The same as in Hollywood.
9723 \end_layout
9724
9725 \begin_layout Subsection
9726 Special features
9727 \end_layout
9728
9729 \begin_layout Standard
9730 Insert the 
9731 \family sans
9732 Speaker
9733 \family default
9734  names as labels then cross-reference the label to insert the name.
9735  The cross-reference dialog will show the current cast of characters.
9736 \end_layout
9737
9738 \begin_layout Subsection
9739 Paper size and Margins
9740 \end_layout
9741
9742 \begin_layout Standard
9743 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9744 \end_layout
9745
9746 \begin_layout Subsection
9747 Environments
9748 \end_layout
9749
9750 \begin_layout Standard
9751 The following environments are available.
9752  You can use broadway.bind to get the bind keys shown at the right.
9753 \end_layout
9754
9755 \begin_layout Itemize
9756
9757 \family sans
9758 Standard
9759 \begin_inset Newline newline
9760 \end_inset
9761
9762
9763 \family default
9764 You should not have to use this, but it is here for anything that does not
9765  fit otherwise.
9766 \end_layout
9767
9768 \begin_layout Itemize
9769
9770 \family sans
9771 Narrative
9772 \begin_inset space \hfill{}
9773 \end_inset
9774
9775 M-z n
9776 \begin_inset Newline newline
9777 \end_inset
9778
9779
9780 \family default
9781 Used to describe stage setting and the action.
9782  First use of speaker names in all CAPs.
9783 \end_layout
9784
9785 \begin_layout Itemize
9786
9787 \family sans
9788 ACT
9789 \begin_inset space \hfill{}
9790 \end_inset
9791
9792 M-z a
9793 \begin_inset Newline newline
9794 \end_inset
9795
9796
9797 \family default
9798 Automatically numbered.
9799  On screen it will be arabic, but will print as Roman.
9800 \end_layout
9801
9802 \begin_layout Itemize
9803
9804 \family sans
9805 ACT*
9806 \begin_inset space \hfill{}
9807 \end_inset
9808
9809 M-z S at
9810 \begin_inset Newline newline
9811 \end_inset
9812
9813
9814 \family default
9815 Subtitle for 
9816 \family sans
9817 ACT.
9818
9819 \family default
9820  It is just centered text.
9821 \end_layout
9822
9823 \begin_layout Itemize
9824
9825 \family sans
9826 SCENE
9827 \begin_inset space \hfill{}
9828 \end_inset
9829
9830 M-z S-S
9831 \begin_inset Newline newline
9832 \end_inset
9833
9834
9835 \family default
9836 Not automatically numbered.
9837  You supply the number.
9838  This is because I couldn't figure out how.
9839 \end_layout
9840
9841 \begin_layout Itemize
9842
9843 \family sans
9844 AT_RISE:
9845 \begin_inset space \hfill{}
9846 \end_inset
9847
9848 M-z S-R
9849 \begin_inset Newline newline
9850 \end_inset
9851
9852
9853 \family default
9854 A special case of Narrative to describe the setting and action as the curtain
9855  rises.
9856 \end_layout
9857
9858 \begin_layout Itemize
9859
9860 \family sans
9861 Speaker
9862 \begin_inset space \hfill{}
9863 \end_inset
9864
9865 M-z s
9866 \begin_inset Newline newline
9867 \end_inset
9868
9869
9870 \family default
9871 The speaker's (actor's) title, centered in all CAPS.
9872 \end_layout
9873
9874 \begin_layout Itemize
9875
9876 \family sans
9877 Parenthetical
9878 \begin_inset space \hfill{}
9879 \end_inset
9880
9881 M-z p
9882 \begin_inset Newline newline
9883 \end_inset
9884
9885
9886 \family default
9887 Instructions to the speaker.
9888  The parentheses are automatically inserted.
9889  The ( will appear on screen, but both will be in the printed play.
9890  This environment is only used within 
9891 \family sans
9892 Dialogue
9893 \family default
9894 .
9895 \end_layout
9896
9897 \begin_layout Itemize
9898
9899 \family sans
9900 Dialogue
9901 \begin_inset space \hfill{}
9902 \end_inset
9903
9904 M-z d
9905 \begin_inset Newline newline
9906 \end_inset
9907
9908
9909 \family default
9910 What the Speaker says.
9911 \end_layout
9912
9913 \begin_layout Itemize
9914
9915 \family sans
9916 CURTAIN
9917 \begin_inset space \hfill{}
9918 \end_inset
9919
9920 M-z S-C
9921 \begin_inset Newline newline
9922 \end_inset
9923
9924
9925 \family default
9926 The curtain comes down.
9927 \end_layout
9928
9929 \begin_layout Itemize
9930
9931 \family sans
9932 Title
9933 \begin_inset space \hfill{}
9934 \end_inset
9935
9936 M-z S-T
9937 \end_layout
9938
9939 \begin_layout Itemize
9940
9941 \family sans
9942 Author
9943 \begin_inset space \hfill{}
9944 \end_inset
9945
9946 M-z S-A
9947 \end_layout
9948
9949 \begin_layout Itemize
9950
9951 \family sans
9952 Right_Address
9953 \begin_inset space \hfill{}
9954 \end_inset
9955
9956 M-z r
9957 \end_layout
9958
9959 \begin_layout Standard
9960 Hello there.
9961 \end_layout
9962
9963 \begin_layout Section
9964 Dinbrief
9965 \end_layout
9966
9967 \begin_layout Standard
9968 The document class 
9969 \family sans
9970 dinbrief
9971 \family default
9972  can be used to type letters according to German conventions.
9973  A template file is included in 
9974 \family typewriter
9975 .../lyx/share/templates
9976 \family default
9977  for you to use as a starting point.
9978 \end_layout
9979
9980 \begin_layout Section
9981 EGS journals (
9982 \family sans
9983 egs
9984 \family default
9985 )
9986 \end_layout
9987
9988 \begin_layout Standard
9989 by 
9990 \shape smallcaps
9991 Martin Vermeer
9992 \end_layout
9993
9994 \begin_layout Subsection
9995 Description
9996 \end_layout
9997
9998 \begin_layout Standard
9999 This is the layout file for the European Geophysical Society journals.
10000  The needed 
10001 \family typewriter
10002 egs.cls
10003 \family default
10004  can be downloaded from the web site of the EGS under 
10005 \begin_inset Flex URL
10006 status collapsed
10007
10008 \begin_layout Plain Layout
10009
10010 www.copernicus.org
10011 \end_layout
10012
10013 \end_inset
10014
10015 .
10016 \end_layout
10017
10018 \begin_layout Subsection
10019 New styles
10020 \end_layout
10021
10022 \begin_layout Standard
10023
10024 \family sans
10025 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10026  Accepted
10027 \family default
10028
10029 \family sans
10030 Offsets
10031 \family default
10032 .
10033  The current layout file is unfortunately very unmodular and would benefit
10034  from using the various 
10035 \family typewriter
10036 std*.inc
10037 \family default
10038  file inclusions.
10039 \end_layout
10040
10041 \begin_layout Section
10042 Elsevier Journals
10043 \end_layout
10044
10045 \begin_layout Standard
10046 By 
10047 \noun on
10048 Rod Pinna
10049 \end_layout
10050
10051 \begin_layout Standard
10052 Elsevier Science Publishers B.V.
10053  provides a standard LaTeX document class (
10054 \family typewriter
10055 elsart.cls
10056 \family default
10057 ) for submitting articles to their various journals.
10058  The style file can be downloaded directly from their web site: 
10059 \begin_inset Flex URL
10060 status collapsed
10061
10062 \begin_layout Plain Layout
10063
10064 http://www.elsevier.com/wps/find/authorsview.authors/latex
10065 \end_layout
10066
10067 \end_inset
10068
10069 .
10070  Instructions are supplied along with the class file, which details the
10071  requirements of the publishers.
10072  LyX includes a package that allows for the use of this class, by a layout
10073  and a template file.
10074  Installation of the class file is the same as for any other LaTeX package;
10075  instructions are provided in the Elsevier documentation.
10076 \end_layout
10077
10078 \begin_layout Standard
10079 To make use of 
10080 \family typewriter
10081 elsart.cls
10082 \family default
10083 , a file 
10084 \family typewriter
10085 elsart.layout
10086 \family default
10087  is supplied.
10088  As the Elsevier class file is based mainly on the standard article class,
10089  most of the normal functionality is provided.
10090  The Elsevier class defines a number of mathematical environments, which
10091  are similar to the AMS environments.
10092  These commands are all described in the Elsevier documentation, and are
10093  available in LyX.
10094 \end_layout
10095
10096 \begin_layout Standard
10097 The easiest way to use the Elsevier style is to base documents on the included
10098  template file.
10099  It is best not to use options such as fancy headings or the geometry package,
10100  as elements such as these are defined by Elsevier in their style file.
10101  Ideally, no extra packages except those mentioned in the Elsevier documentation
10102  should be used.
10103  Essentially, Elsevier require as 
10104 \begin_inset Quotes eld
10105 \end_inset
10106
10107 clean
10108 \begin_inset Quotes erd
10109 \end_inset
10110
10111  a LaTeX file as possible, as their intention is to take the supplied file
10112  and replace the class file with one for the particular journal to which
10113  the paper has been submitted.
10114  This also means that not too much time should be spent on the formating
10115  of the document.
10116  When it comes to be published, this will change anyway.
10117  The rest of the usage for this layout is substantially the same as for
10118  the normal article class.
10119  For details of what Elsevier do and don't allow, refer to their documentation.
10120 \end_layout
10121
10122 \begin_layout Section
10123 Foils [aka 
10124 \family sans
10125 FoilTeX
10126 \family default
10127 ]
10128 \begin_inset CommandInset label
10129 LatexCommand label
10130 name "sec:foiltex"
10131
10132 \end_inset
10133
10134
10135 \end_layout
10136
10137 \begin_layout Standard
10138 by 
10139 \noun on
10140 Allan Rae
10141 \end_layout
10142
10143 \begin_layout Subsection
10144 Introduction
10145 \end_layout
10146
10147 \begin_layout Standard
10148 This section describes how to use LyX to make slides for overhead projectors.
10149  There are two document classes that can do this: the default slides class
10150  and the 
10151 \family sans
10152 FoilTeX
10153 \family default
10154  slides class.
10155  This section documents the latter.
10156 \end_layout
10157
10158 \begin_layout Standard
10159 I'm going to say this again, nice and clear, so that there's no misunderstanding
10160 :
10161 \end_layout
10162
10163 \begin_layout Standard
10164 \begin_inset VSpace bigskip
10165 \end_inset
10166
10167
10168 \end_layout
10169
10170 \begin_layout Standard
10171 \align center
10172
10173 \size large
10174 This section documents the class 
10175 \begin_inset Quotes eld
10176 \end_inset
10177
10178
10179 \family sans
10180 slides (FoilTeX)
10181 \family default
10182
10183 \begin_inset Quotes erd
10184 \end_inset
10185
10186  
10187 \emph on
10188 only.
10189 \end_layout
10190
10191 \begin_layout Standard
10192 \begin_inset VSpace bigskip
10193 \end_inset
10194
10195
10196 \end_layout
10197
10198 \begin_layout Standard
10199 If you're looking for the documentation for 
10200 \begin_inset Quotes eld
10201 \end_inset
10202
10203
10204 \family sans
10205 slides (default)
10206 \family default
10207
10208 \begin_inset Quotes erd
10209 \end_inset
10210
10211 , check out section
10212 \begin_inset space ~
10213 \end_inset
10214
10215
10216 \begin_inset CommandInset ref
10217 LatexCommand ref
10218 reference "sec:slitex"
10219
10220 \end_inset
10221
10222 .
10223  If your machine doesn't have the 
10224 \family sans
10225 foils
10226 \family default
10227  class [
10228 \begin_inset Quotes eld
10229 \end_inset
10230
10231
10232 \family sans
10233 slides (FoilTeX)
10234 \family default
10235
10236 \begin_inset Quotes erd
10237 \end_inset
10238
10239 ] installed, you'll probably have to use the default 
10240 \family sans
10241 slides
10242 \family default
10243  class, which isn't quite as good as 
10244 \family sans
10245 foils.
10246 \end_layout
10247
10248 \begin_layout Standard
10249 The 
10250 \family sans
10251 foils
10252 \family default
10253  class is designed for use with version 2.1 of the 
10254 \family sans
10255 foils.cls
10256 \family default
10257  LaTeX class file which is now an integral part of LaTeX2e.
10258 \end_layout
10259
10260 \begin_layout Subsection
10261 Getting Started
10262 \end_layout
10263
10264 \begin_layout Standard
10265 Obviously, to use this document class, you need to select 
10266 \begin_inset Quotes eld
10267 \end_inset
10268
10269
10270 \family sans
10271 slides (FoilTeX)
10272 \family default
10273
10274 \begin_inset Quotes erd
10275 \end_inset
10276
10277  from the 
10278 \family sans
10279 Class
10280 \family default
10281  entry in the 
10282 \family sans
10283 Document
10284 \begin_inset space ~
10285 \end_inset
10286
10287 Layout
10288 \family default
10289  dialog.
10290  There are some settings in the 
10291 \family sans
10292 Document
10293 \begin_inset space ~
10294 \end_inset
10295
10296 Layout
10297 \family default
10298  dialog that you should know about that are specific to this class:
10299 \end_layout
10300
10301 \begin_layout Itemize
10302 Don't change the options 
10303 \family sans
10304 Sides
10305 \family default
10306  and 
10307 \family sans
10308 Columns
10309 \family default
10310  on the 
10311 \family sans
10312 Document
10313 \begin_inset space ~
10314 \end_inset
10315
10316 Layout
10317 \family default
10318  dialog.
10319  They're ignored by the 
10320 \family sans
10321 foils
10322 \family default
10323  class.
10324 \end_layout
10325
10326 \begin_layout Itemize
10327 The default font size is 20
10328 \begin_inset space \thinspace{}
10329 \end_inset
10330
10331 pt with the other options being 17
10332 \begin_inset space \thinspace{}
10333 \end_inset
10334
10335 pt, 25
10336 \begin_inset space \thinspace{}
10337 \end_inset
10338
10339 pt and 30
10340 \begin_inset space \thinspace{}
10341 \end_inset
10342
10343 pt.
10344 \end_layout
10345
10346 \begin_layout Itemize
10347 The default font is 
10348 \family sans
10349 sans
10350 \family default
10351  
10352 \family sans
10353 serif
10354 \family default
10355  but all math equations are still typeset in the usual roman font.
10356 \end_layout
10357
10358 \begin_layout Itemize
10359
10360 \family sans
10361 FoilTeX
10362 \family default
10363  supports A4 and Letter paper sizes as well as a special size for working
10364  with 35
10365 \begin_inset space \thinspace{}
10366 \end_inset
10367
10368 mm slides.
10369  It doesn't support A5, B5, legal or executive paper sizes.
10370 \end_layout
10371
10372 \begin_layout Itemize
10373 Don't bother changing the 
10374 \family sans
10375 Float Placement
10376 \family default
10377  settings because they are ignored anyway.
10378  All floats appear where they are defined in the text.
10379 \end_layout
10380
10381 \begin_layout Itemize
10382 The 
10383 \family sans
10384 Pagestyle
10385 \family default
10386  setting behaves a bit differently for this class.
10387  
10388 \family sans
10389 FoilTeX
10390 \family default
10391  provides extensive footer and header capabilities including a user-defined
10392  logo.
10393  See section
10394 \begin_inset space ~
10395 \end_inset
10396
10397
10398 \begin_inset CommandInset ref
10399 LatexCommand ref
10400 reference "sec:foilfoot"
10401
10402 \end_inset
10403
10404  for more details.
10405  The title page is treated differently to all other pages in the document
10406  and is 
10407 \emph on
10408 always
10409 \emph default
10410  unnumbered and 
10411 \emph on
10412 always
10413 \emph default
10414  has the logo centered at the bottom of the page (if one is defined).
10415  The possible page style choices and what they do are as follows:
10416 \end_layout
10417
10418 \begin_deeper
10419 \begin_layout Labeling
10420 \labelwidthstring MMMMMMM
10421
10422 \family sans
10423 \series bold
10424 empty
10425 \family default
10426 \series default
10427  The final output contains no page numbers, or other headers or footers
10428  (except footnotes of course).
10429  
10430 \end_layout
10431
10432 \begin_layout Labeling
10433 \labelwidthstring MMMMMMM
10434
10435 \family sans
10436 \series bold
10437 plain
10438 \family default
10439 \series default
10440  The final output contains page numbers centered at the bottom of the page.
10441  No other headings or footers (other than footnotes).
10442 \end_layout
10443
10444 \begin_layout Labeling
10445 \labelwidthstring MMMMMMM
10446
10447 \series bold
10448 foilheadings
10449 \series default
10450  Page numbers in lower right corner.
10451  Additional headers and footers are also shown.
10452  This is also the default.
10453 \end_layout
10454
10455 \begin_layout Labeling
10456 \labelwidthstring MMMMMMM
10457
10458 \series bold
10459 fancy
10460 \series default
10461  Gives you access to the 
10462 \family sans
10463 fancyheadings
10464 \family default
10465  package although its use with 
10466 \family sans
10467 FoilTeX
10468 \family default
10469  is discouraged by the writer of the 
10470 \family sans
10471 FoilTeX
10472 \family default
10473  package because of some potential page layout clashes.
10474 \end_layout
10475
10476 \end_deeper
10477 \begin_layout Subsubsection
10478 Extra Options
10479 \end_layout
10480
10481 \begin_layout Standard
10482 The following options may be used in the extra class options in the 
10483 \family sans
10484 Document\SpecialChar \menuseparator
10485 Settings
10486 \family default
10487  dialog.
10488 \end_layout
10489
10490 \begin_layout Labeling
10491 \labelwidthstring MMMMMMx
10492
10493 \series bold
10494 35mmSlide
10495 \series default
10496  This sets up the page layout for 7.33
10497 \begin_inset space \thinspace{}
10498 \end_inset
10499
10500 in by 11
10501 \begin_inset space \thinspace{}
10502 \end_inset
10503
10504 in paper, which is about the same aspect ratio as a 35
10505 \begin_inset space \thinspace{}
10506 \end_inset
10507
10508 mm slide, making it a bit easier to work with this medium.
10509 \end_layout
10510
10511 \begin_layout Labeling
10512 \labelwidthstring MMMMMMx
10513
10514 \series bold
10515 headrule
10516 \series default
10517  Places a rule across the page below the header on every page except the
10518  title page.
10519 \end_layout
10520
10521 \begin_layout Labeling
10522 \labelwidthstring MMMMMMx
10523
10524 \series bold
10525 footrule
10526 \series default
10527  Places a rule across the page above the footer on every page except the
10528  title page.
10529 \end_layout
10530
10531 \begin_layout Labeling
10532 \labelwidthstring MMMMMMx
10533
10534 \series bold
10535 dvips
10536 \series default
10537  This is automatically set each time you create a new 
10538 \family sans
10539 foils
10540 \family default
10541  document.
10542  This option tells 
10543 \family sans
10544 FoilTeX
10545 \family default
10546  to use the dvips driver to rotate those pages that are set as landscape
10547  foils.
10548 \end_layout
10549
10550 \begin_layout Labeling
10551 \labelwidthstring MMMMMMx
10552
10553 \series bold
10554 landscape
10555 \series default
10556  Simply changes the page dimensions to those of a landscape page but doesn't
10557  do any rotation.
10558  Thus if you use this option you need to use an external program to rotate
10559  each page or feed your paper through your printer as landscape.
10560  Note that this option effectively reverses the roles of the 
10561 \family sans
10562 Foilhead
10563 \family default
10564  and 
10565 \family sans
10566 Rotatefoilhead
10567 \family default
10568  environments (don't worry these are described in the next section).
10569 \end_layout
10570
10571 \begin_layout Labeling
10572 \labelwidthstring MMMMMMx
10573
10574 \series bold
10575 leqno
10576 \series default
10577  Equation numbers on the left.
10578 \end_layout
10579
10580 \begin_layout Labeling
10581 \labelwidthstring MMMMMMx
10582
10583 \series bold
10584 fleqn
10585 \series default
10586  Flush-left equations.
10587 \end_layout
10588
10589 \begin_layout Subsection
10590 Supported Environments
10591 \end_layout
10592
10593 \begin_layout Standard
10594 Most of the environments commonly supported in other classes are also supported
10595  by the 
10596 \family sans
10597 foils
10598 \family default
10599  class.
10600  There are several additional environments provided by 
10601 \family sans
10602 FoilTeX
10603 \family default
10604  as well as a couple added by LyX.
10605  The following environments are shared with other classes:
10606 \end_layout
10607
10608 \begin_layout Standard
10609 \begin_inset ERT
10610 status open
10611
10612 \begin_layout Plain Layout
10613
10614
10615 \backslash
10616 begin{multicols}{2}
10617 \end_layout
10618
10619 \end_inset
10620
10621
10622 \end_layout
10623
10624 \begin_layout Itemize
10625
10626 \family sans
10627 Standard
10628 \end_layout
10629
10630 \begin_layout Itemize
10631
10632 \family sans
10633 Itemize
10634 \end_layout
10635
10636 \begin_layout Itemize
10637
10638 \family sans
10639 Enumerate
10640 \end_layout
10641
10642 \begin_layout Itemize
10643
10644 \family sans
10645 Description
10646 \end_layout
10647
10648 \begin_layout Itemize
10649
10650 \family sans
10651 List
10652 \end_layout
10653
10654 \begin_layout Itemize
10655
10656 \family sans
10657 LyX-Code
10658 \end_layout
10659
10660 \begin_layout Itemize
10661
10662 \family sans
10663 Verse
10664 \end_layout
10665
10666 \begin_layout Itemize
10667
10668 \family sans
10669 Quote
10670 \end_layout
10671
10672 \begin_layout Itemize
10673
10674 \family sans
10675 Quotation
10676 \end_layout
10677
10678 \begin_layout Itemize
10679
10680 \family sans
10681 Title
10682 \end_layout
10683
10684 \begin_layout Itemize
10685
10686 \family sans
10687 Author
10688 \end_layout
10689
10690 \begin_layout Itemize
10691
10692 \family sans
10693 Date
10694 \end_layout
10695
10696 \begin_layout Itemize
10697
10698 \family sans
10699 Abstract
10700 \end_layout
10701
10702 \begin_layout Itemize
10703
10704 \family sans
10705 Bibliography
10706 \end_layout
10707
10708 \begin_layout Itemize
10709
10710 \family sans
10711 Address
10712 \end_layout
10713
10714 \begin_layout Itemize
10715
10716 \family sans
10717 RightAddress
10718 \end_layout
10719
10720 \begin_layout Itemize
10721
10722 \family sans
10723 Caption
10724 \end_layout
10725
10726 \begin_layout Itemize
10727
10728 \family sans
10729 Comment
10730 \end_layout
10731
10732 \begin_layout Standard
10733 \begin_inset ERT
10734 status open
10735
10736 \begin_layout Plain Layout
10737
10738
10739 \backslash
10740 end{multicols}
10741 \end_layout
10742
10743 \end_inset
10744
10745
10746 \end_layout
10747
10748 \begin_layout Standard
10749 That is, all the major environments apart from the sectioning environments.
10750  Since foils are essentially self-contained sections, with a title and body,
10751  
10752 \family sans
10753 FoilTeX
10754 \family default
10755  provides specific commands for starting new foils and these are:
10756 \end_layout
10757
10758 \begin_layout Itemize
10759
10760 \family sans
10761 Foilhead
10762 \end_layout
10763
10764 \begin_layout Itemize
10765
10766 \family sans
10767 Rotatefoilhead
10768 \end_layout
10769
10770 \begin_layout Standard
10771 LyX also provides slightly modified versions of these two environments called:
10772 \end_layout
10773
10774 \begin_layout Itemize
10775
10776 \family sans
10777 ShortFoilhead
10778 \end_layout
10779
10780 \begin_layout Itemize
10781
10782 \family sans
10783 ShortRotatefoilhead
10784 \end_layout
10785
10786 \begin_layout Standard
10787 and the differences will be explained in the next section.
10788 \end_layout
10789
10790 \begin_layout Standard
10791 Since foils are often used in presenting ideas or new theorems and such
10792  
10793 \family sans
10794 FoilTeX
10795 \family default
10796  also provides a comprehensive box of goodies for presenting them:
10797 \end_layout
10798
10799 \begin_layout Standard
10800 \begin_inset ERT
10801 status open
10802
10803 \begin_layout Plain Layout
10804
10805
10806 \backslash
10807 begin{multicols}{2}
10808 \end_layout
10809
10810 \end_inset
10811
10812
10813 \end_layout
10814
10815 \begin_layout Itemize
10816
10817 \family sans
10818 Theorem
10819 \end_layout
10820
10821 \begin_layout Itemize
10822
10823 \family sans
10824 Lemma
10825 \end_layout
10826
10827 \begin_layout Itemize
10828
10829 \family sans
10830 Corollary
10831 \end_layout
10832
10833 \begin_layout Itemize
10834
10835 \family sans
10836 Proposition
10837 \end_layout
10838
10839 \begin_layout Itemize
10840
10841 \family sans
10842 Definition
10843 \end_layout
10844
10845 \begin_layout Itemize
10846
10847 \family sans
10848 Proof
10849 \end_layout
10850
10851 \begin_layout Itemize
10852
10853 \family sans
10854 Theorem*
10855 \end_layout
10856
10857 \begin_layout Itemize
10858
10859 \family sans
10860 Lemma*
10861 \end_layout
10862
10863 \begin_layout Itemize
10864
10865 \family sans
10866 Corollary*
10867 \end_layout
10868
10869 \begin_layout Itemize
10870
10871 \family sans
10872 Proposition*
10873 \end_layout
10874
10875 \begin_layout Itemize
10876
10877 \family sans
10878 Definition*
10879 \end_layout
10880
10881 \begin_layout Standard
10882 \begin_inset ERT
10883 status open
10884
10885 \begin_layout Plain Layout
10886
10887
10888 \backslash
10889 end{multicols}
10890 \end_layout
10891
10892 \end_inset
10893
10894
10895 \end_layout
10896
10897 \begin_layout Standard
10898 The starred versions are unnumbered while the unstarred versions are numbered.
10899  There are also two list environments added by LyX and these are:
10900 \end_layout
10901
10902 \begin_layout Itemize
10903
10904 \family sans
10905 TickList
10906 \end_layout
10907
10908 \begin_layout Itemize
10909
10910 \family sans
10911 CrossList
10912 \end_layout
10913
10914 \begin_layout Standard
10915
10916 \family sans
10917 FoilTeX
10918 \family default
10919  provides some powerful header and footer capabilities that are best set
10920  in the preamble although they may be set at any point in a document.
10921  If you want to change these settings in your document the best place to
10922  do so is at the very top of a foil, i.
10923 \begin_inset space \thinspace{}
10924 \end_inset
10925
10926 g.
10927 \emph on
10928
10929 \begin_inset space \space{}
10930 \end_inset
10931
10932
10933 \emph default
10934 straight after the foilhead.
10935 \end_layout
10936
10937 \begin_layout Standard
10938 For this purpose, the following command styles are provided [
10939 \shape smallcaps
10940 Martin Vermeer
10941 \shape default
10942 ]:
10943 \end_layout
10944
10945 \begin_layout Standard
10946 \begin_inset ERT
10947 status open
10948
10949 \begin_layout Plain Layout
10950
10951
10952 \backslash
10953 begin{multicols}{2}
10954 \end_layout
10955
10956 \end_inset
10957
10958
10959 \end_layout
10960
10961 \begin_layout Itemize
10962
10963 \family sans
10964 My
10965 \begin_inset space ~
10966 \end_inset
10967
10968 Logo
10969 \end_layout
10970
10971 \begin_layout Itemize
10972
10973 \family sans
10974 Restriction
10975 \end_layout
10976
10977 \begin_layout Itemize
10978
10979 \family sans
10980 Right
10981 \begin_inset space ~
10982 \end_inset
10983
10984 Footer
10985 \end_layout
10986
10987 \begin_layout Itemize
10988
10989 \family sans
10990 Right
10991 \begin_inset space ~
10992 \end_inset
10993
10994 Header
10995 \end_layout
10996
10997 \begin_layout Itemize
10998
10999 \family sans
11000 Left
11001 \begin_inset space ~
11002 \end_inset
11003
11004 Header
11005 \end_layout
11006
11007 \begin_deeper
11008 \begin_layout Standard
11009 \begin_inset space ~
11010 \end_inset
11011
11012
11013 \end_layout
11014
11015 \end_deeper
11016 \begin_layout Standard
11017 \begin_inset ERT
11018 status open
11019
11020 \begin_layout Plain Layout
11021
11022
11023 \backslash
11024 end{multicols}
11025 \end_layout
11026
11027 \end_inset
11028
11029
11030 \end_layout
11031
11032 \begin_layout Standard
11033 There are also a few commands provided by 
11034 \family sans
11035 FoilTeX
11036 \family default
11037  that aren't directly supported by LyX but I'll tell you what they do and
11038  how to use them in section
11039 \begin_inset space ~
11040 \end_inset
11041
11042
11043 \begin_inset CommandInset ref
11044 LatexCommand ref
11045 reference "sec:unsuppfoils"
11046
11047 \end_inset
11048
11049 .
11050 \end_layout
11051
11052 \begin_layout Subsection
11053 Building a Set of Foils
11054 \end_layout
11055
11056 \begin_layout Standard
11057 This section will give a simple introduction to using the different environments
11058  to build a set of foils.
11059  If you want to see an example set of foils, take a look at the 
11060 \family typewriter
11061 Foils.lyx
11062 \family default
11063  file you find in LyX's 
11064 \family typewriter
11065 examples
11066 \family default
11067  folder.
11068 \end_layout
11069
11070 \begin_layout Subsubsection
11071 Give It a Title Page
11072 \end_layout
11073
11074 \begin_layout Standard
11075 Unlike other classes that provide 
11076 \family sans
11077 Title
11078 \family default
11079
11080 \family sans
11081 Author
11082 \family default
11083
11084 \family sans
11085 Date
11086 \family default
11087  and 
11088 \family sans
11089 Abstract
11090 \family default
11091  environments, 
11092 \family sans
11093 foils
11094 \family default
11095  creates the title on a page of its own.
11096  If you leave out the 
11097 \family sans
11098 Date
11099 \family default
11100  environment LaTeX will substitute the current date (every time you regenerate
11101  the output).
11102 \end_layout
11103
11104 \begin_layout Subsubsection
11105 Start a New Foil
11106 \end_layout
11107
11108 \begin_layout Standard
11109 As I mentioned earlier, there are four ways of starting a new foil.
11110  For portrait foils you should use 
11111 \family sans
11112 Foilhead
11113 \family default
11114  or 
11115 \family sans
11116 ShortFoilhead.
11117
11118 \family default
11119  The difference between these two environments is the amount of space between
11120  the title of the foil (the foilhead) and the body of the foil.
11121 \end_layout
11122
11123 \begin_layout Standard
11124 Landscape foils are generated using the 
11125 \family sans
11126 Rotatefoilhead
11127 \family default
11128  and 
11129 \family sans
11130 ShortRotatefoilhead
11131 \family default
11132  environments.
11133  Again the only difference is the spacing between foilhead and body.
11134  Both of the short versions have 0.5 inches less separation between the foilhead
11135  and the body.
11136  
11137 \end_layout
11138
11139 \begin_layout Standard
11140 One problem with the support for landscape foils is the requirement that
11141  you have to use the 
11142 \family typewriter
11143 dvips
11144 \family default
11145  driver to generate the PostScript output otherwise the foils won't be rotated.
11146  It is possible to get landscape foils even if you haven't got the 
11147 \family typewriter
11148 dvips
11149 \family default
11150  driver provided you can feed your foils sideways through your printer ;-)
11151 \end_layout
11152
11153 \begin_layout Subsubsection
11154 Theorems, Lemmas, Proofs and more
11155 \end_layout
11156
11157 \begin_layout Standard
11158 Due to a small bug in LyX you can't have two of the same type of these environme
11159 nts directly following each other.
11160  They must be separated by something.
11161  If you try, you will just be extending the previous environment as if you
11162  had merged the two environments together.
11163  So, how do you get around this problem? The simplest option is to insert
11164  some text between the two environments or add a 
11165 \family sans
11166 LaTeX
11167 \family default
11168  environment between the two with just a 
11169 \begin_inset Quotes eld
11170 \end_inset
11171
11172
11173 \family typewriter
11174 %
11175 \family default
11176
11177 \begin_inset Quotes erd
11178 \end_inset
11179
11180  in it.
11181  This will force LyX to produce two separate environments and hence the
11182  correct LaTeX output.
11183  An example is provided in the example file included with the LyX distribution.
11184  Remember, this problem only occurs if you are trying to place two of the
11185  same type of theorem-like environments one directly after the other.
11186 \end_layout
11187
11188 \begin_layout Subsubsection
11189 Lists
11190 \end_layout
11191
11192 \begin_layout Standard
11193 You get all the commonly supported list styles found in other classes as
11194  well as two new ones.
11195  I'll only describe the new ones here.
11196  If you want to find out more about the other list environments check out
11197  the 
11198 \emph on
11199 User's Guide.
11200
11201 \emph default
11202  If you intend to use itemized lists you might also want to read about the
11203  
11204 \family sans
11205 Itemize
11206 \begin_inset space ~
11207 \end_inset
11208
11209 Bullet
11210 \begin_inset space ~
11211 \end_inset
11212
11213 Selection
11214 \family default
11215  dialog described above in section
11216 \begin_inset space ~
11217 \end_inset
11218
11219
11220 \begin_inset CommandInset ref
11221 LatexCommand ref
11222 reference "sec:bullet"
11223
11224 \end_inset
11225
11226 .
11227 \end_layout
11228
11229 \begin_layout Standard
11230 The two new list styles, 
11231 \family sans
11232 TickList
11233 \family default
11234  and 
11235 \family sans
11236 CrossList
11237 \family default
11238 , are designed to make it easier for you to create lists of do's and don'ts
11239  or right and wrong by providing dedicated environments that use a tick
11240  or a cross as the label of the list.
11241  These lists are in fact dedicated variants of the 
11242 \family sans
11243 Itemize
11244 \family default
11245  environment.
11246  They do however require that you have the 
11247 \family typewriter
11248 psnfss
11249 \family default
11250  packages installed.
11251 \end_layout
11252
11253 \begin_layout Subsubsection
11254 Figures and Tables
11255 \end_layout
11256
11257 \begin_layout Standard
11258
11259 \family sans
11260 FoilTeX
11261 \family default
11262  redefines the floating tables and figures so that they appear exactly where
11263  they are in the text rather than pushing them to the top of the page or
11264  to some user specified location.
11265  In fact if you change the float placement settings they are simply ignored.
11266 \end_layout
11267
11268 \begin_layout Subsubsection
11269 Page Headers and Footers
11270 \begin_inset CommandInset label
11271 LatexCommand label
11272 name "sec:foilfoot"
11273
11274 \end_inset
11275
11276
11277 \end_layout
11278
11279 \begin_layout Standard
11280
11281 \family sans
11282 My
11283 \begin_inset space ~
11284 \end_inset
11285
11286 Logo
11287 \family default
11288  and 
11289 \family sans
11290 Restriction
11291 \family default
11292  are two commands used to control the left-footer text string.
11293  The first is meant to allow you to include a graphic logo on your foils
11294  and defaults to 
11295 \begin_inset Quotes eld
11296 \end_inset
11297
11298 -Typeset by 
11299 \family sans
11300 FoilTeX
11301 \family default
11302 -
11303 \begin_inset Quotes erd
11304 \end_inset
11305
11306 .
11307  While the second is meant to provide a classification for the audience,
11308  
11309 \emph on
11310 e.
11311 \begin_inset space \thinspace{}
11312 \end_inset
11313
11314 g.
11315 \emph default
11316
11317 \begin_inset space \space{}
11318 \end_inset
11319
11320 Confidential.
11321  It is empty by default.
11322 \end_layout
11323
11324 \begin_layout Standard
11325 The remaining page corners can be filled by 
11326 \family sans
11327 Right
11328 \begin_inset space ~
11329 \end_inset
11330
11331 Footer
11332 \family default
11333  (which defaults to page numbers), 
11334 \family sans
11335 Right
11336 \begin_inset space ~
11337 \end_inset
11338
11339 Header
11340 \family default
11341  (top right) and 
11342 \family sans
11343 Left
11344 \begin_inset space ~
11345 \end_inset
11346
11347 Header
11348 \family default
11349  (top left).
11350 \end_layout
11351
11352 \begin_layout Subsection
11353 Unsupported 
11354 \family sans
11355 FoilTeX
11356 \family default
11357  Goodies
11358 \begin_inset CommandInset label
11359 LatexCommand label
11360 name "sec:unsuppfoils"
11361
11362 \end_inset
11363
11364
11365 \end_layout
11366
11367 \begin_layout Standard
11368 All the commands mentioned below need to be set in a 
11369 \family sans
11370 LaTeX
11371 \family default
11372  environment or as 
11373 \family sans
11374 TeX
11375 \family default
11376  within another environment.
11377 \end_layout
11378
11379 \begin_layout Subsubsection
11380 Lengths
11381 \end_layout
11382
11383 \begin_layout Standard
11384 All lengths are adjusted using the 
11385 \family typewriter
11386
11387 \backslash
11388 setlength{
11389 \family default
11390 \emph on
11391 lengthname
11392 \family typewriter
11393 \emph default
11394 }{
11395 \family default
11396 \emph on
11397 newlength
11398 \family typewriter
11399 \emph default
11400 }
11401 \family default
11402  command.
11403  Where 
11404 \emph on
11405 lengthname
11406 \emph default
11407  should be replaced by the name given to the length you want to change and
11408  
11409 \emph on
11410 newlength
11411 \emph default
11412  is the length value.
11413  All lengths should be specified in units of length such as inches (
11414 \family typewriter
11415 in
11416 \family default
11417 ), millimeters (
11418 \family typewriter
11419 mm
11420 \family default
11421 ) or points (
11422 \family typewriter
11423 pt
11424 \family default
11425 ) or relative to some document or font-based length such as 
11426 \family typewriter
11427
11428 \backslash
11429 textwidth
11430 \family default
11431 .
11432  
11433 \end_layout
11434
11435 \begin_layout Standard
11436 It's possible to change the spacing between a foilhead and the body of the
11437  foil by adjusting the length specified by 
11438 \family typewriter
11439
11440 \backslash
11441 foilheadskip
11442 \family default
11443 .
11444  For example, to make 
11445 \emph on
11446 all
11447 \emph default
11448  foilheads 0.5
11449 \begin_inset space \space{}
11450 \end_inset
11451
11452 in closer to their bodies put the following in the preamble: 
11453 \family typewriter
11454
11455 \backslash
11456 setlength{
11457 \backslash
11458 foilheadskip}{-0.5in}
11459 \end_layout
11460
11461 \begin_layout Standard
11462 The spacings around floats can be adjusted by setting these lengths:
11463 \end_layout
11464
11465 \begin_layout Labeling
11466 \labelwidthstring MMMMMMMMMMM
11467
11468 \family typewriter
11469
11470 \backslash
11471 abovefloatskip
11472 \family default
11473  Separation between the text and the top of the float
11474 \end_layout
11475
11476 \begin_layout Labeling
11477 \labelwidthstring MMMMMMMMMMM
11478
11479 \family typewriter
11480
11481 \backslash
11482 abovecaptionskip
11483 \family default
11484  Separation between the float and the caption
11485 \end_layout
11486
11487 \begin_layout Labeling
11488 \labelwidthstring MMMMMMMMMMM
11489
11490 \family typewriter
11491
11492 \backslash
11493 belowcaptionskip
11494 \family default
11495  Separation between the caption and the following text
11496 \end_layout
11497
11498 \begin_layout Labeling
11499 \labelwidthstring MMMMMMMMMMM
11500
11501 \family typewriter
11502
11503 \backslash
11504 captionwidth
11505 \family default
11506  You can make the captions narrower than the surrounding text by adjusting
11507  this length.
11508  Best done relative to 
11509 \family typewriter
11510
11511 \backslash
11512 textwidth
11513 \family default
11514 .
11515 \end_layout
11516
11517 \begin_layout Standard
11518 There are also several title page related lengths that you may find useful
11519  if you have a long title or several authors:
11520 \end_layout
11521
11522 \begin_layout Labeling
11523 \labelwidthstring MMMMMMMMMMM
11524
11525 \family typewriter
11526
11527 \backslash
11528 abovetitleskip
11529 \family default
11530  Separation from headers to 
11531 \family sans
11532 Title
11533 \end_layout
11534
11535 \begin_layout Labeling
11536 \labelwidthstring MMMMMMMMMMM
11537
11538 \family typewriter
11539
11540 \backslash
11541 titleauthorskip
11542 \family default
11543  between 
11544 \family sans
11545 Title
11546 \family default
11547  and 
11548 \family sans
11549 Author
11550 \family default
11551  environments
11552 \end_layout
11553
11554 \begin_layout Labeling
11555 \labelwidthstring MMMMMMMMMMM
11556
11557 \family typewriter
11558
11559 \backslash
11560 authorauthorskip
11561 \family default
11562  between multiple 
11563 \family sans
11564 Author
11565 \family default
11566  lines
11567 \end_layout
11568
11569 \begin_layout Labeling
11570 \labelwidthstring MMMMMMMMMMM
11571
11572 \family typewriter
11573
11574 \backslash
11575 authordateskip
11576 \family default
11577  between the 
11578 \family sans
11579 Author
11580 \family default
11581  and the 
11582 \family sans
11583 Date
11584 \end_layout
11585
11586 \begin_layout Labeling
11587 \labelwidthstring MMMMMMMMMMM
11588
11589 \family typewriter
11590
11591 \backslash
11592 dateabstractskip
11593 \family default
11594  between the 
11595 \family sans
11596 Date
11597 \family default
11598  and the 
11599 \family sans
11600 Abstract
11601 \end_layout
11602
11603 \begin_layout Standard
11604 The last length related command affects all the list environments.
11605  If you place 
11606 \family typewriter
11607
11608 \backslash
11609 zerolistvertdimens
11610 \family default
11611  
11612 \emph on
11613 inside
11614 \emph default
11615  a list environment then all the vertical spacing between the list items
11616  is removed.
11617  Note that this is a command not a length so it doesn't require 
11618 \family typewriter
11619
11620 \backslash
11621 setlength
11622 \family default
11623  like the stuff mentioned above.
11624 \end_layout
11625
11626 \begin_layout Subsubsection
11627 Headers and Footers
11628 \end_layout
11629
11630 \begin_layout Standard
11631 The 
11632 \family typewriter
11633
11634 \backslash
11635 LogoOn
11636 \family default
11637  and 
11638 \family typewriter
11639
11640 \backslash
11641 LogoOff
11642 \family default
11643  commands control whether the logo in the 
11644 \family sans
11645 MyLogo
11646 \family default
11647  definition appear on a given page.
11648  If you put 
11649 \family typewriter
11650
11651 \backslash
11652 LogoOff
11653 \family default
11654  in the preamble then none of the foils will have the logo on them.
11655  If you don't want the logo on a particular page place the 
11656 \family typewriter
11657
11658 \backslash
11659 LogoOff
11660 \family default
11661  directly after the foilhead of that page and the 
11662 \family typewriter
11663
11664 \backslash
11665 LogoOn
11666 \family default
11667  directly after the next foilhead.
11668 \end_layout
11669
11670 \begin_layout Standard
11671 If you decide to use the 
11672 \family sans
11673 fancy
11674 \family default
11675  page style setting in the 
11676 \family sans
11677 Document
11678 \begin_inset space ~
11679 \end_inset
11680
11681 Layout
11682 \family default
11683  dialog you should probably add 
11684 \family typewriter
11685
11686 \backslash
11687 let
11688 \backslash
11689 headwidth
11690 \backslash
11691 textwidth
11692 \family default
11693  to your preamble so headers and footers on landscape pages are correctly
11694  placed when rotated.
11695  This is due to some clashes between the page layouts provided by the 
11696 \family sans
11697 fancyheadings
11698 \family default
11699  package and the 
11700 \family sans
11701 foils
11702 \family default
11703  class.
11704 \end_layout
11705
11706 \begin_layout Section
11707 Hollywood (Hollywood spec scripts)
11708 \end_layout
11709
11710 \begin_layout Standard
11711 by 
11712 \shape smallcaps
11713 Garst Reese
11714 \end_layout
11715
11716 \begin_layout Subsection
11717 Introduction
11718 \end_layout
11719
11720 \begin_layout Standard
11721 Getting the format of a Hollywood script right is a 
11722 \begin_inset Quotes eld
11723 \end_inset
11724
11725 rite of passage.
11726 \begin_inset Quotes erd
11727 \end_inset
11728
11729  It is designed to make the readers focus on content and to be easy and
11730  familiar for the actors to read.
11731  Each page of a script should be one minute of film.
11732  Nothing goes in a script that you cannot see or hear on screen.
11733  The courier 12 pt font should be used throughout.
11734  No italics.
11735 \end_layout
11736
11737 \begin_layout Subsection
11738 Special problems
11739 \end_layout
11740
11741 \begin_layout Standard
11742 Speakers' lines should NEVER break in mid-sentence.
11743  If a speaker's lines continue over a page break, repeat the 
11744 \family sans
11745 Speaker
11746 \family default
11747  title followed by (Cont'd).
11748 \end_layout
11749
11750 \begin_layout Subsection
11751 Special features
11752 \end_layout
11753
11754 \begin_layout Standard
11755 Insert the 
11756 \family sans
11757 Speaker
11758 \family default
11759  names as labels then cross-reference the label to insert the name.
11760  The cross-reference dialog will show the current cast of characters.
11761  You can use this to insert the speaker name in narratives also.
11762 \end_layout
11763
11764 \begin_layout Subsection
11765 Paper size and Margins
11766 \end_layout
11767
11768 \begin_layout Standard
11769 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11770 \end_layout
11771
11772 \begin_layout Subsection
11773 Environments
11774 \end_layout
11775
11776 \begin_layout Standard
11777 The following environments are available.
11778  You can use hollywood.bind to get the bind keys shown at the right.
11779 \end_layout
11780
11781 \begin_layout Itemize
11782
11783 \family sans
11784 Standard
11785 \begin_inset Newline newline
11786 \end_inset
11787
11788
11789 \family default
11790 Used where nothing else works.
11791  Try to avoid it.
11792 \end_layout
11793
11794 \begin_layout Itemize
11795
11796 \family sans
11797 FADE_IN
11798 \family default
11799 :
11800 \begin_inset space \hfill{}
11801 \end_inset
11802
11803
11804 \family sans
11805 M-z S-I
11806 \family default
11807
11808 \begin_inset Newline newline
11809 \end_inset
11810
11811 Usually followed by something like 
11812 \begin_inset Quotes eld
11813 \end_inset
11814
11815 on Sally waking up.
11816 \begin_inset Quotes erd
11817 \end_inset
11818
11819
11820 \end_layout
11821
11822 \begin_layout Itemize
11823
11824 \family sans
11825 INT:
11826 \begin_inset space \hfill{}
11827 \end_inset
11828
11829 M-z i
11830 \begin_inset Newline newline
11831 \end_inset
11832
11833
11834 \family default
11835 Introduces a new INTERIOR camera set-up.
11836  Always followed by DAY or NIGHT, or something similar to define the lighting
11837  required.
11838  Everthing on this line in CAPS.
11839 \end_layout
11840
11841 \begin_layout Itemize
11842
11843 \family sans
11844 EXT:
11845 \begin_inset space \hfill{}
11846 \end_inset
11847
11848 M-z e
11849 \begin_inset Newline newline
11850 \end_inset
11851
11852
11853 \family default
11854 Introduces a new EXTERIOR camera set-up.
11855  Everthing on this line in CAPS.
11856 \end_layout
11857
11858 \begin_layout Itemize
11859
11860 \family sans
11861 Speaker
11862 \begin_inset space \hfill{}
11863 \end_inset
11864
11865 M-z s
11866 \begin_inset Newline newline
11867 \end_inset
11868
11869
11870 \family default
11871 The character speaking.
11872 \end_layout
11873
11874 \begin_layout Itemize
11875
11876 \family sans
11877 Parenthetical
11878 \begin_inset space \hfill{}
11879 \end_inset
11880
11881 M-z p
11882 \begin_inset Newline newline
11883 \end_inset
11884
11885
11886 \family default
11887 Instructions to the speaker.
11888  The () are automatically inserted, but only the ( will show in LyX.
11889  Both will be printed.
11890 \end_layout
11891
11892 \begin_layout Itemize
11893
11894 \family sans
11895 Dialogue
11896 \begin_inset space \hfill{}
11897 \end_inset
11898
11899 M-z d
11900 \begin_inset Newline newline
11901 \end_inset
11902
11903
11904 \family default
11905 What the 
11906 \family sans
11907 Speaker
11908 \family default
11909  says.
11910 \end_layout
11911
11912 \begin_layout Itemize
11913
11914 \family sans
11915 Transition
11916 \begin_inset space \hfill{}
11917 \end_inset
11918
11919 M-z t
11920 \begin_inset Newline newline
11921 \end_inset
11922
11923
11924 \family default
11925 Camera movement instruction.
11926  e.
11927 \begin_inset space \thinspace{}
11928 \end_inset
11929
11930 g.
11931 \begin_inset space \space{}
11932 \end_inset
11933
11934 CUT TO:
11935 \end_layout
11936
11937 \begin_layout Itemize
11938
11939 \family sans
11940 FADE OUT:
11941 \begin_inset space \hfill{}
11942 \end_inset
11943
11944 M-z S-I
11945 \end_layout
11946
11947 \begin_layout Itemize
11948
11949 \family sans
11950 Author
11951 \begin_inset space \hfill{}
11952 \end_inset
11953
11954 M-z S-A
11955 \end_layout
11956
11957 \begin_layout Itemize
11958
11959 \family sans
11960 Title
11961 \begin_inset space \hfill{}
11962 \end_inset
11963
11964 M-z S-T
11965 \end_layout
11966
11967 \begin_layout Itemize
11968
11969 \family sans
11970 Right_Address
11971 \begin_inset space \hfill{}
11972 \end_inset
11973
11974 M-z r
11975 \end_layout
11976
11977 \begin_layout Subsection
11978 Script jargon
11979 \end_layout
11980
11981 \begin_layout Itemize
11982 (O.S) — off screen
11983 \end_layout
11984
11985 \begin_layout Itemize
11986 (V.0) — voice over
11987 \end_layout
11988
11989 \begin_layout Itemize
11990 b.
11991 \begin_inset space \thinspace{}
11992 \end_inset
11993
11994 g.
11995  — background
11996 \end_layout
11997
11998 \begin_layout Itemize
11999 C.U.
12000  — close-up
12001 \end_layout
12002
12003 \begin_layout Itemize
12004 PAN — camera movement
12005 \end_layout
12006
12007 \begin_layout Itemize
12008 INSERT — cut to close-up of
12009 \end_layout
12010
12011 \begin_layout Section
12012 ijmpc and ijmpd
12013 \end_layout
12014
12015 \begin_layout Standard
12016 by 
12017 \noun on
12018 Panayotis Papasotiriou
12019 \end_layout
12020
12021 \begin_layout Subsection
12022 Overview
12023 \end_layout
12024
12025 \begin_layout Standard
12026 The ijmpc package is a set of macros that facilitates electronic manuscript
12027  submission to the 
12028 \emph on
12029 International Journal of Modern Physics C
12030 \emph default
12031 .
12032  Similarly, the ijmpd package is for creating manuscripts to be submitted
12033  to the 
12034 \emph on
12035 International Journal of Modern Physics D
12036 \emph default
12037 .
12038  Both journals are published by World Scientific.
12039  The corresponding document classes are named 
12040 \family typewriter
12041 ws-ijmpc.cls
12042 \family default
12043  and 
12044 \family typewriter
12045 ws-ijmpd.cls
12046 \family default
12047 , respectively.
12048  These files, together with instructions for the authors, can be downloaded
12049  from the sites 
12050 \begin_inset Flex URL
12051 status collapsed
12052
12053 \begin_layout Plain Layout
12054
12055 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
12056 \end_layout
12057
12058 \end_inset
12059
12060  and 
12061 \begin_inset Flex URL
12062 status collapsed
12063
12064 \begin_layout Plain Layout
12065
12066 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12067 \end_layout
12068
12069 \end_inset
12070
12071 .
12072  Both packages are modified versions of the standard 
12073 \begin_inset Quotes eld
12074 \end_inset
12075
12076 article
12077 \begin_inset Quotes erd
12078 \end_inset
12079
12080  package, and they are almost (but not exactly) identical.
12081  Most of their features are supported by LyX.
12082  I have used LyX successfully to write articles submitted to both journals
12083  without any problem.
12084 \end_layout
12085
12086 \begin_layout Subsection
12087 Writing a paper
12088 \end_layout
12089
12090 \begin_layout Standard
12091 As usual, the easiest way to write a paper is to start with a template.
12092  Click on 
12093 \family sans
12094 File\SpecialChar \menuseparator
12095 New from
12096 \family default
12097  
12098 \family sans
12099 \bar under
12100 T
12101 \bar default
12102 emplate
12103 \family default
12104 , then choose the 
12105 \family typewriter
12106 ijmpc.lyx
12107 \family default
12108  or 
12109 \family typewriter
12110 ijmpd.lyx
12111 \family default
12112  template.
12113  This will give an (almost) empty document that includes the most common
12114  fields found in a manuscript.
12115  Simply overwrite the existing text (including the brackets, 
12116 \family typewriter
12117 <>
12118 \family default
12119 ) with your text.
12120  You should keep in mind the following remarks.
12121 \end_layout
12122
12123 \begin_layout Enumerate
12124 LyX won't let you change the font size and the page style of the document,
12125  because such modifications are not allowed by both packages.
12126 \end_layout
12127
12128 \begin_layout Enumerate
12129 The language of the document should not be changed.
12130  Before previewing your paper, be sure that the babel package is not used.
12131  To do this, click on 
12132 \family sans
12133 Tools\SpecialChar \menuseparator
12134 Preferences
12135 \family default
12136 , select the 
12137 \family sans
12138 Lang Opts
12139 \family default
12140  tab, deselect the 
12141 \family sans
12142 Use babel
12143 \family default
12144  checkbox in the language settings, and click on 
12145 \family sans
12146 Apply
12147 \family default
12148  (or 
12149 \family sans
12150 Save
12151 \family default
12152 , if you wish to make this change permanent).
12153 \end_layout
12154
12155 \begin_layout Enumerate
12156 The 
12157 \begin_inset Quotes eld
12158 \end_inset
12159
12160 Keywords
12161 \begin_inset Quotes erd
12162 \end_inset
12163
12164  style must be used to define keywords.
12165 \end_layout
12166
12167 \begin_layout Enumerate
12168 The ijmpc package provides a style named 
12169 \begin_inset Quotes eld
12170 \end_inset
12171
12172 Classification Codes
12173 \begin_inset Quotes erd
12174 \end_inset
12175
12176 , which can be used to define classification codes, such as PACS numbers.
12177  Note that this facility is not supported by the ijmpd package.
12178 \end_layout
12179
12180 \begin_layout Enumerate
12181 Several new environments are available: 
12182 \begin_inset Quotes eld
12183 \end_inset
12184
12185 Definition
12186 \begin_inset Quotes erd
12187 \end_inset
12188
12189
12190 \begin_inset Quotes eld
12191 \end_inset
12192
12193 Step
12194 \begin_inset Quotes erd
12195 \end_inset
12196
12197
12198 \begin_inset Quotes eld
12199 \end_inset
12200
12201 Example
12202 \begin_inset Quotes erd
12203 \end_inset
12204
12205
12206 \begin_inset Quotes eld
12207 \end_inset
12208
12209 Remark
12210 \begin_inset Quotes erd
12211 \end_inset
12212
12213
12214 \begin_inset Quotes eld
12215 \end_inset
12216
12217 Notation
12218 \begin_inset Quotes erd
12219 \end_inset
12220
12221
12222 \begin_inset Quotes eld
12223 \end_inset
12224
12225 Theorem
12226 \begin_inset Quotes erd
12227 \end_inset
12228
12229
12230 \begin_inset Quotes eld
12231 \end_inset
12232
12233 Proof
12234 \begin_inset Quotes erd
12235 \end_inset
12236
12237
12238 \begin_inset Quotes eld
12239 \end_inset
12240
12241 Corollary
12242 \begin_inset Quotes erd
12243 \end_inset
12244
12245
12246 \begin_inset Quotes eld
12247 \end_inset
12248
12249 Lemma
12250 \begin_inset Quotes erd
12251 \end_inset
12252
12253
12254 \begin_inset Quotes eld
12255 \end_inset
12256
12257 Proposition
12258 \begin_inset Quotes erd
12259 \end_inset
12260
12261
12262 \begin_inset Quotes eld
12263 \end_inset
12264
12265 Prop
12266 \begin_inset Quotes erd
12267 \end_inset
12268
12269
12270 \begin_inset Quotes eld
12271 \end_inset
12272
12273 Question
12274 \begin_inset Quotes erd
12275 \end_inset
12276
12277
12278 \begin_inset Quotes eld
12279 \end_inset
12280
12281 Claim
12282 \begin_inset Quotes erd
12283 \end_inset
12284
12285 , and 
12286 \begin_inset Quotes eld
12287 \end_inset
12288
12289 Conjecture
12290 \begin_inset Quotes erd
12291 \end_inset
12292
12293 .
12294  Their use is more or less obvious.
12295  LyX supports all these environments; it will use the proper label, text
12296  style, and numbering scheme for each of them.
12297 \end_layout
12298
12299 \begin_layout Enumerate
12300 Both packages use basic citations; the natbib package should not be used.
12301  In LyX, citation references are shown as usual; in the output, citations
12302  are shown as superscripts.
12303  If you want to use a citation as normal text, you should use the 
12304 \family typewriter
12305 refcite
12306 \family default
12307  command, e.
12308 \begin_inset space \thinspace{}
12309 \end_inset
12310
12311 g.
12312 \begin_inset space \space{}
12313 \end_inset
12314
12315
12316 \begin_inset Quotes eld
12317 \end_inset
12318
12319 See Ref.
12320 \begin_inset space \space{}
12321 \end_inset
12322
12323
12324 \family typewriter
12325
12326 \backslash
12327 refcite{key}
12328 \family default
12329
12330 \begin_inset Quotes erd
12331 \end_inset
12332
12333 .
12334 \end_layout
12335
12336 \begin_layout Enumerate
12337 There is no 
12338 \begin_inset Quotes eld
12339 \end_inset
12340
12341 Acknowledgments
12342 \begin_inset Quotes erd
12343 \end_inset
12344
12345  section in both packages.
12346  To put acknowledgments, just use the 
12347 \begin_inset Quotes eld
12348 \end_inset
12349
12350 Section*
12351 \begin_inset Quotes erd
12352 \end_inset
12353
12354  environment.
12355 \end_layout
12356
12357 \begin_layout Enumerate
12358 Appendices may be added to the paper, 
12359 \emph on
12360 after
12361 \emph default
12362  the Acknowledgments and 
12363 \shape italic
12364 before
12365 \shape default
12366  the References.
12367  LyX provides a special environment, called 
12368 \begin_inset Quotes eld
12369 \end_inset
12370
12371 Appendices Section
12372 \begin_inset Quotes erd
12373 \end_inset
12374
12375  which marks the beginning of the appendices.
12376  This environment should be left blank; it just sends a LaTeX command, but
12377  nothing is really printed.
12378  In LyX, the word 
12379 \begin_inset Quotes eld
12380 \end_inset
12381
12382 Appendix
12383 \begin_inset Quotes erd
12384 \end_inset
12385
12386  is printed with blue letters, as a signal that all sections after that
12387  point are appendices.
12388  To write an appendix, use the 
12389 \begin_inset Quotes eld
12390 \end_inset
12391
12392 Appendix
12393 \begin_inset Quotes erd
12394 \end_inset
12395
12396  environment.
12397  LyX will number each appendix with capital letters, as required by both
12398  journals.
12399  Note that 
12400 \begin_inset Quotes eld
12401 \end_inset
12402
12403 Appendices Section
12404 \begin_inset Quotes erd
12405 \end_inset
12406
12407  
12408 \emph on
12409 must
12410 \emph default
12411  be present before the first appendix; if not, all appendices will be numbered
12412  as normal sections in the output.
12413 \end_layout
12414
12415 \begin_layout Enumerate
12416 The ijmpc and the ijmpd packages use the 
12417 \family typewriter
12418 tbl
12419 \family default
12420  command to implement table captions.
12421  As a result, a table created by LyX is printed correctly, but its caption
12422  is ignored.
12423  However, you can use some TeX code to overcome this problem, so that captions
12424  are printed as expected.
12425  To do so, create a float table as usual, remove the caption, and replace
12426  it with the TeX code 
12427 \family typewriter
12428
12429 \backslash
12430 tbl{
12431 \emph on
12432 your table caption
12433 \emph default
12434 }{
12435 \family default
12436  (sic); you must also the TeX code 
12437 \family typewriter
12438 }
12439 \family default
12440  immediately after the tabular material.
12441  Study the example table included in the template files to see how this
12442  trick is implemented.
12443  Alternatively, If you need table captions, you should implement the whole
12444  table float in a 
12445 \family typewriter
12446 .tex
12447 \family default
12448  file, then include this file to the LyX document (
12449 \family sans
12450 Insert\SpecialChar \menuseparator
12451 File\SpecialChar \menuseparator
12452 Child
12453 \begin_inset space ~
12454 \end_inset
12455
12456 Document
12457 \family default
12458 ).
12459  Details on how to create a table float can be found in the files 
12460 \family typewriter
12461 ws-ijmpc.tex
12462 \family default
12463  and 
12464 \family typewriter
12465 ws-ijmpd.tex
12466 \family default
12467 , included in the corresponding packages.
12468 \end_layout
12469
12470 \begin_layout Subsection
12471 Preparing a paper for submission
12472 \end_layout
12473
12474 \begin_layout Standard
12475 Before you submit your paper you must export the LyX document as a LaTeX
12476  file (
12477 \family sans
12478 File\SpecialChar \menuseparator
12479 Export\SpecialChar \menuseparator
12480 LaTeX
12481 \family default
12482 )
12483 \begin_inset Foot
12484 status open
12485
12486 \begin_layout Plain Layout
12487 Actually you have the choice between LaTeX (plain) and pdflatex.
12488  If you intend to use pdflatex to prepare the paper, you should use the
12489  pdflatex option so that included graphics are converted to PDF format,
12490  ready for use by pdflatex.
12491 \end_layout
12492
12493 \end_inset
12494
12495 , then make the following changes to the resulting 
12496 \family typewriter
12497 .tex
12498 \family default
12499  file.
12500 \end_layout
12501
12502 \begin_layout Enumerate
12503 Remove the comment lines before the 
12504 \family typewriter
12505
12506 \backslash
12507 documentclass
12508 \family default
12509  command.
12510 \end_layout
12511
12512 \begin_layout Enumerate
12513 Remove everything between (and including) the 
12514 \family typewriter
12515
12516 \backslash
12517 makeatletter
12518 \family default
12519  and 
12520 \family typewriter
12521
12522 \backslash
12523 makeatother
12524 \family default
12525  commands, except for any commands you specifically put into the LaTeX preamble.
12526 \end_layout
12527
12528 \begin_layout Standard
12529 The modified 
12530 \family typewriter
12531 .tex
12532 \family default
12533  file should be saved and processed through LaTeX as many times as necessary.
12534  You may also want to check the resulting 
12535 \family typewriter
12536 .dvi
12537 \family default
12538  document.
12539 \end_layout
12540
12541 \begin_layout Subsection
12542 Use of TeX code
12543 \end_layout
12544
12545 \begin_layout Standard
12546 The use of TeX code is reduced to two commands, which must be placed at
12547  the top of the document.
12548  If you started writing your paper by using the 
12549 \family typewriter
12550 ijmpc.lyx
12551 \family default
12552  or the 
12553 \family typewriter
12554 ijmpd.lyx
12555 \family default
12556  template, the TeX code needed is already in its place; you usually don't
12557  need to delete it.
12558  You may only modify the first TeX code to specify the information printed
12559  to the top of odd and even pages (authors' names and short paper's title,
12560  respectively).
12561  This TeX code must have the form 
12562 \family typewriter
12563
12564 \backslash
12565 markboth{Authors' Names}{Short Paper's Title}
12566 \family default
12567 .
12568 \end_layout
12569
12570 \begin_layout Section
12571 iopart
12572 \end_layout
12573
12574 \begin_layout Standard
12575 by 
12576 \noun on
12577 Uwe Stöhr
12578 \end_layout
12579
12580 \begin_layout Subsection
12581 Overview
12582 \end_layout
12583
12584 \begin_layout Standard
12585 The iopart package provides a document class to create electronic manuscript
12586  submission to the journals published by the Institute of Physics.
12587  Instructions for the authors how to create a paper using the iopart class
12588  can be downloaded together with the iopart package from the site 
12589 \begin_inset Flex URL
12590 status collapsed
12591
12592 \begin_layout Plain Layout
12593
12594 ftp://ftp.iop.org/pub/journals/latex2e
12595 \end_layout
12596
12597 \end_inset
12598
12599 .
12600 \end_layout
12601
12602 \begin_layout Subsection
12603 Writing a paper
12604 \end_layout
12605
12606 \begin_layout Standard
12607 The easiest way to write a paper is to start with the file 
12608 \emph on
12609 IOP-article.lyx
12610 \emph default
12611  that is available in LyX's examples files folder.
12612  Open this file, save it under a new name, and start writing.
12613  The example file explains how to use the special text environments.
12614  Here are the most important advices:
12615 \end_layout
12616
12617 \begin_layout Itemize
12618 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12619  two options 
12620 \family sans
12621 Use AMS math package
12622 \family default
12623  in the document settings under 
12624 \family sans
12625 Math Options
12626 \family default
12627  are not used!
12628 \end_layout
12629
12630 \begin_layout Itemize
12631
12632 \size normal
12633 The title environment defines the kind of your paper.
12634  So use one of the following environments for the title:
12635 \end_layout
12636
12637 \begin_deeper
12638 \begin_layout Itemize
12639
12640 \family sans
12641 \size normal
12642 Title
12643 \family default
12644  for a Paper
12645 \end_layout
12646
12647 \begin_layout Itemize
12648
12649 \family sans
12650 \size normal
12651 Review
12652 \family default
12653  for a Review
12654 \end_layout
12655
12656 \begin_layout Itemize
12657
12658 \family sans
12659 \size normal
12660 Topical
12661 \family default
12662  for a Topical review
12663 \end_layout
12664
12665 \begin_layout Itemize
12666
12667 \family sans
12668 \size normal
12669 Comment
12670 \family default
12671  for a Comment
12672 \end_layout
12673
12674 \begin_layout Itemize
12675
12676 \family sans
12677 \size normal
12678 Note
12679 \family default
12680  for a Note
12681 \end_layout
12682
12683 \begin_layout Itemize
12684
12685 \family sans
12686 \size normal
12687 Paper
12688 \family default
12689  for a Paper (same as Title)
12690 \end_layout
12691
12692 \begin_layout Itemize
12693
12694 \family sans
12695 \size normal
12696 Prelim
12697 \family default
12698  for a Preliminary communication
12699 \end_layout
12700
12701 \begin_layout Itemize
12702
12703 \family sans
12704 \size normal
12705 Rapid
12706 \family default
12707  for a Rapid communication
12708 \end_layout
12709
12710 \begin_layout Itemize
12711
12712 \family sans
12713 \size normal
12714 Letter
12715 \family default
12716  for a Letter to the editor
12717 \end_layout
12718
12719 \end_deeper
12720 \begin_layout Itemize
12721
12722 \size normal
12723 All title environments except of 
12724 \family sans
12725 Letter
12726 \family default
12727  can have an optional short title.
12728 \end_layout
12729
12730 \begin_layout Itemize
12731 There is a general title environment 
12732 \family sans
12733 Article
12734 \family default
12735  which is not directly supported by the LyX.
12736  This can be used as TeX code when your document doesn't fit into one of
12737  the other title types.
12738 \end_layout
12739
12740 \begin_layout Standard
12741 For more informations like hints for special table and formula formatting,
12742  look at the IOP author guidelines.
12743 \end_layout
12744
12745 \begin_layout Section
12746 Kluwer
12747 \end_layout
12748
12749 \begin_layout Standard
12750 by 
12751 \noun on
12752 Panayotis Papasotiriou
12753 \end_layout
12754
12755 \begin_layout Subsection
12756 Overview
12757 \end_layout
12758
12759 \begin_layout Standard
12760 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12761  that facilitates electronic manuscript submission to the journals they
12762  publish.
12763  Most known of them (at least in my domain of interest) are 
12764 \emph on
12765 Astrophysics and Space Science
12766 \emph default
12767  and 
12768 \emph on
12769 Solar Physics
12770 \emph default
12771 , but there are many others (see a complete list at 
12772 \begin_inset Flex URL
12773 status open
12774
12775 \begin_layout Plain Layout
12776
12777 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12778 \end_layout
12779
12780 \end_inset
12781
12782 ).
12783  The Kluwer package may be downloaded from the site 
12784 \begin_inset Flex URL
12785 status collapsed
12786
12787 \begin_layout Plain Layout
12788
12789 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12790 \end_layout
12791
12792 \end_inset
12793
12794 .
12795  A complete user guide is contained in that package (but it can also be
12796  downloaded separately).
12797 \end_layout
12798
12799 \begin_layout Standard
12800 LyX supports many features of the package but not everything.
12801  However, the TeX code needed is reduced to some 
12802 \begin_inset Quotes eld
12803 \end_inset
12804
12805 peculiar
12806 \begin_inset Quotes erd
12807 \end_inset
12808
12809  commands of the package (see
12810 \begin_inset space ~
12811 \end_inset
12812
12813
12814 \begin_inset CommandInset ref
12815 LatexCommand ref
12816 reference "subsec:kluwer_peculiarities"
12817
12818 \end_inset
12819
12820 ).
12821  I have recently used LyX to write an article submitted to the 
12822 \emph on
12823 Astrophysics and Space Science
12824 \emph default
12825  without any problem.
12826 \end_layout
12827
12828 \begin_layout Subsection
12829 Writing a paper
12830 \end_layout
12831
12832 \begin_layout Standard
12833 The easiest way to write a paper is to start with the Kluwer template file.
12834  Click on 
12835 \family sans
12836 File\SpecialChar \menuseparator
12837 New from
12838 \family default
12839  
12840 \family sans
12841 Template
12842 \family default
12843 , then choose the 
12844 \family typewriter
12845 kluwer.lyx
12846 \family default
12847  template.
12848  This will give an (almost) empty document that includes the most common
12849  fields found in a manuscript and a short description of their use.
12850  As in most templates, simply overwrite the existing text (including the
12851  brackets, 
12852 \family typewriter
12853 <>
12854 \family default
12855 ) with the correct information.
12856 \end_layout
12857
12858 \begin_layout Subsection
12859 Preparing a paper for submission
12860 \end_layout
12861
12862 \begin_layout Standard
12863 As in the AASTeX package, before you submit your paper to a journal you
12864  must 
12865 \begin_inset Quotes eld
12866 \end_inset
12867
12868 postprocess
12869 \begin_inset Quotes erd
12870 \end_inset
12871
12872  it as follows.
12873 \end_layout
12874
12875 \begin_layout Enumerate
12876 Export your paper as a LaTeX file.
12877  To do this, click on 
12878 \family sans
12879 File\SpecialChar \menuseparator
12880 Export\SpecialChar \menuseparator
12881 LaTeX
12882 \family default
12883 .
12884  
12885 \end_layout
12886
12887 \begin_layout Enumerate
12888 Edit the resulting 
12889 \family typewriter
12890 .tex
12891 \family default
12892  file with a text editor and make the following changes
12893 \end_layout
12894
12895 \begin_deeper
12896 \begin_layout Enumerate
12897 remove the comment lines before the 
12898 \family typewriter
12899
12900 \backslash
12901 documentclass
12902 \family default
12903  command,
12904 \end_layout
12905
12906 \begin_layout Enumerate
12907 remove everything between (and including) the 
12908 \family typewriter
12909
12910 \backslash
12911 makeatletter
12912 \family default
12913  and 
12914 \family typewriter
12915
12916 \backslash
12917 makeatother
12918 \family default
12919  commands, except for any commands you specifically put into the LaTeX preamble.
12920 \end_layout
12921
12922 \begin_layout Standard
12923 Save the resulting 
12924 \family typewriter
12925 .tex
12926 \family default
12927  file.
12928 \end_layout
12929
12930 \end_deeper
12931 \begin_layout Enumerate
12932 Run the 
12933 \family typewriter
12934 .tex
12935 \family default
12936  file through LaTeX as many times as necessary (usually up to three).
12937 \end_layout
12938
12939 \begin_layout Enumerate
12940 View the resulting 
12941 \family typewriter
12942 .dvi
12943 \family default
12944  document using, e.
12945 \begin_inset space \thinspace{}
12946 \end_inset
12947
12948 g.
12949 \begin_inset space \space{}
12950 \end_inset
12951
12952
12953 \family sans
12954 xdvi
12955 \family default
12956 , and check if everything is OK (it should, if you didn't make any mistake).
12957 \end_layout
12958
12959 \begin_layout Subsection
12960 \begin_inset Quotes eld
12961 \end_inset
12962
12963 Peculiarities
12964 \begin_inset Quotes erd
12965 \end_inset
12966
12967  of the Kluwer package
12968 \begin_inset CommandInset label
12969 LatexCommand label
12970 name "subsec:kluwer_peculiarities"
12971
12972 \end_inset
12973
12974
12975 \end_layout
12976
12977 \begin_layout Standard
12978 The Kluwer package has the following 
12979 \begin_inset Quotes eld
12980 \end_inset
12981
12982 peculiarities
12983 \begin_inset Quotes erd
12984 \end_inset
12985
12986 .
12987 \end_layout
12988
12989 \begin_layout Enumerate
12990 It is possible to write multiple articles in the same LaTeX file
12991 \begin_inset Foot
12992 status collapsed
12993
12994 \begin_layout Plain Layout
12995 I can't imagine any good reason to do this.
12996 \end_layout
12997
12998 \end_inset
12999
13000 .
13001  Each article must be included in the environment 
13002 \begin_inset Quotes eld
13003 \end_inset
13004
13005 article
13006 \begin_inset Quotes erd
13007 \end_inset
13008
13009 .
13010  Unfortunately, this environment cannot be omitted, even if you write just
13011  one article.
13012  Therefore, each article starts with the command 
13013 \family typewriter
13014
13015 \backslash
13016 begin{article}
13017 \family default
13018  and, obviously, ends with the command 
13019 \family typewriter
13020
13021 \backslash
13022 end{article}
13023 \family default
13024 .
13025  Although this can be implemented in LyX, I didn't included it, since it
13026  looks ugly and can confuse the novice user.
13027  Therefore, you need to enter them directly and mark them as LaTeX code
13028  (the well-known 
13029 \begin_inset Quotes eld
13030 \end_inset
13031
13032 TeX code
13033 \begin_inset Quotes erd
13034 \end_inset
13035
13036 ).
13037 \end_layout
13038
13039 \begin_layout Enumerate
13040 Information given at the beginning of the article (i.
13041 \begin_inset space \thinspace{}
13042 \end_inset
13043
13044 g.
13045 \begin_inset space \space{}
13046 \end_inset
13047
13048 title, subtitle, author, institution, running title, running author, abstract
13049  and keywords) must be included in an environment called 
13050 \begin_inset Quotes eld
13051 \end_inset
13052
13053 opening
13054 \begin_inset Quotes erd
13055 \end_inset
13056
13057 .
13058  This is not implemented in LyX, so you must enter title, subtitle etc.
13059 \begin_inset space ~
13060 \end_inset
13061
13062 between two TeX code lines (
13063 \family typewriter
13064
13065 \backslash
13066 begin{opening}
13067 \family default
13068  and 
13069 \family typewriter
13070
13071 \backslash
13072 end{opening}
13073 \family default
13074 ).
13075 \end_layout
13076
13077 \begin_layout Enumerate
13078 According to the user manual, the label of each bibliography item must be
13079  written as 
13080 \family typewriter
13081
13082 \backslash
13083 protect
13084 \backslash
13085 citeauthoryear{
13086 \family default
13087 \emph on
13088 author(s)
13089 \family typewriter
13090 \emph default
13091 }{
13092 \family default
13093 \emph on
13094 year
13095 \family typewriter
13096 \emph default
13097 }
13098 \family default
13099 .
13100 \end_layout
13101
13102 \begin_layout Standard
13103 The 
13104 \family typewriter
13105 kluwer.lyx
13106 \family default
13107  template takes care of all these 
13108 \begin_inset Quotes eld
13109 \end_inset
13110
13111 peculiarities
13112 \begin_inset Quotes erd
13113 \end_inset
13114
13115 .
13116  If you start a new paper using this template you don't need to do anything
13117  special.
13118  Just 
13119 \end_layout
13120
13121 \begin_layout Enumerate
13122 don't delete the TeX code included in the template, and
13123 \end_layout
13124
13125 \begin_layout Enumerate
13126 copy the example bibliography item included in the template and modify it
13127  as necessary to enter new bibliography items.
13128 \end_layout
13129
13130 \begin_layout Section
13131 Koma-Script
13132 \end_layout
13133
13134 \begin_layout Standard
13135 by 
13136 \noun on
13137 Bernd Rellermeyer
13138 \end_layout
13139
13140 \begin_layout Subsection
13141 Overview
13142 \end_layout
13143
13144 \begin_layout Standard
13145 The LyX document classes 
13146 \emph on
13147 article (koma-script)
13148 \emph default
13149
13150 \emph on
13151 report (koma-script)
13152 \emph default
13153
13154 \emph on
13155 book
13156 \emph default
13157  
13158 \emph on
13159 (koma-script)
13160 \emph default
13161 , and 
13162 \emph on
13163 letter
13164 \emph default
13165  
13166 \emph on
13167 (koma-script)
13168 \emph default
13169  correspond to the LaTeX document classes 
13170 \family typewriter
13171 scrartcl.cls
13172 \family default
13173
13174 \family typewriter
13175 scrreprt.cls
13176 \family default
13177
13178 \family typewriter
13179 scrbook.cls
13180 \family default
13181 , and 
13182 \family typewriter
13183 scrlettr.cls
13184 \family default
13185 , resp.
13186 \begin_inset space ~
13187 \end_inset
13188
13189 of the Koma-Script family.
13190  They are replacements for the standard document classes 
13191 \family typewriter
13192 article.cls
13193 \family default
13194
13195 \family typewriter
13196 report.cls
13197 \family default
13198
13199 \family typewriter
13200 book.cls
13201 \family default
13202  and 
13203 \family typewriter
13204 letter.cls
13205 \family default
13206 , resp., and fit better to European typography conventions in a number of
13207  points.
13208 \end_layout
13209
13210 \begin_layout Itemize
13211 Standard character size is 11pt in 
13212 \emph on
13213 article (koma-script)
13214 \emph default
13215
13216 \emph on
13217 report (koma-script)
13218 \emph default
13219 , and 
13220 \emph on
13221 book (koma-script)
13222 \emph default
13223 , and 12pt in 
13224 \emph on
13225 letter (koma-script)
13226 \emph default
13227 .
13228 \end_layout
13229
13230 \begin_layout Itemize
13231 Headings, labels of the description environment, and a number of elements
13232  of the 
13233 \emph on
13234 letter (koma-script)
13235 \emph default
13236  document class are set in a bold sans serif font.
13237 \begin_inset Foot
13238 status collapsed
13239
13240 \begin_layout Plain Layout
13241 There is a big difference between the bold sans serif old cm fonts and new
13242  ec fonts, especially in the appearance of headings.
13243  In comparison, the ec bold sans serif fonts look a bit thin.
13244  Here the LaTeX package 
13245 \family typewriter
13246 cmsd.sty by
13247 \family default
13248  
13249 \shape smallcaps
13250 Walter Schmidt
13251 \shape default
13252  helps to produce the 
13253 \begin_inset Quotes eld
13254 \end_inset
13255
13256 usual
13257 \begin_inset Quotes erd
13258 \end_inset
13259
13260  appearance when using the ec fonts.
13261 \end_layout
13262
13263 \end_inset
13264
13265  The numbering of chapter headings is made in the same way as the numbering
13266  of section headings, that is without the extra line 
13267 \begin_inset Quotes eld
13268 \end_inset
13269
13270 Chapter\SpecialChar \ldots{}
13271
13272 \begin_inset Quotes erd
13273 \end_inset
13274
13275 .
13276  In addition, the appearance of the headings can be modified by using a
13277  number of options (in LyX to be entered in the field 
13278 \family sans
13279 Extra
13280 \begin_inset space ~
13281 \end_inset
13282
13283 Options
13284 \family default
13285  of the dialog 
13286 \family sans
13287 Layout\SpecialChar \menuseparator
13288 Document
13289 \family default
13290 ).
13291  
13292 \end_layout
13293
13294 \begin_layout Itemize
13295 The main means in the Koma-Script document classes to design the type area
13296  are the options 
13297 \family sans
13298 BCOR
13299 \family default
13300  and 
13301 \family sans
13302 DIV
13303 \family default
13304  (in LyX to be entered in the extra class options field in the dialog 
13305 \family sans
13306 Document\SpecialChar \menuseparator
13307 Settings
13308 \family default
13309 ).
13310  They make a clearer modification of page margins possible as do the options
13311  of the dialog 
13312 \family sans
13313 Document\SpecialChar \menuseparator
13314 Settings
13315 \family default
13316 .
13317  
13318 \end_layout
13319
13320 \begin_layout Itemize
13321 The LaTeX document classes of the Koma-Script family define a number of
13322  additional commands.
13323  Those part of it which makes sense in LyX is implemented in corresponding
13324  paragraph types.
13325 \end_layout
13326
13327 \begin_layout Standard
13328 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13329  can be found in the Koma-Script documentation 
13330 \emph on
13331 scrguide
13332 \emph default
13333  (German) and 
13334 \emph on
13335 scrguien
13336 \emph default
13337  (English).
13338 \end_layout
13339
13340 \begin_layout Subsection
13341 article (koma-script), report (koma-script), and book (koma-script)
13342 \end_layout
13343
13344 \begin_layout Standard
13345 The document classes 
13346 \emph on
13347 article (koma-script)
13348 \emph default
13349
13350 \emph on
13351 report (koma-script)
13352 \emph default
13353 , and 
13354 \emph on
13355 book
13356 \emph default
13357  
13358 \emph on
13359 (koma-script)
13360 \emph default
13361  are implemented in the layout files 
13362 \family typewriter
13363 scrartcl.layout
13364 \family default
13365
13366 \family typewriter
13367 scrreprt.layout
13368 \family default
13369 , and 
13370 \family typewriter
13371 scrbook.layout
13372 \family default
13373 , resp.
13374  They contain all the paragraph types of the corresponding standard document
13375  classes 
13376 \emph on
13377 article
13378 \emph default
13379
13380 \emph on
13381 report
13382 \emph default
13383 , and 
13384 \emph on
13385 book
13386 \emph default
13387 , resp., partly modified, with the exception of the LyX specific 
13388 \family sans
13389 List
13390 \family default
13391 -type, which is replaced by the new 
13392 \family sans
13393 Labeling
13394 \family default
13395 -type having the same functionality.
13396  Beside the 
13397 \family sans
13398 Labeling
13399 \family default
13400 -Type there is a number of new paragraph types added.
13401  They are 
13402 \emph on
13403 not
13404 \emph default
13405  part of 
13406 \emph on
13407 letter (koma-script)
13408 \emph default
13409 .
13410 \end_layout
13411
13412 \begin_layout Itemize
13413
13414 \family sans
13415 Addpart, Addchap
13416 \family default
13417
13418 \family sans
13419 Addsec
13420 \family default
13421 : are equivalents to 
13422 \family sans
13423 Part*, Chapter*
13424 \family default
13425  and 
13426 \family sans
13427 Section*
13428 \family default
13429 , resp., additionally inserting an entry in the table of contents.
13430  
13431 \family sans
13432 Addpart
13433 \family default
13434  and 
13435 \family sans
13436 Addchap
13437 \family default
13438  are not contained in 
13439 \emph on
13440 article (koma-script)
13441 \emph default
13442 .
13443 \end_layout
13444
13445 \begin_layout Itemize
13446
13447 \family sans
13448 Addchap*
13449 \family default
13450
13451 \family sans
13452 Addsec*
13453 \family default
13454 : behave exactly as 
13455 \family sans
13456 Addchap
13457 \family default
13458  and 
13459 \family sans
13460 Addsec
13461 \family default
13462 , resp., additionally clearing running heads.
13463  
13464 \family sans
13465 Addchap*
13466 \family default
13467  is not contained in 
13468 \emph on
13469 article (koma-script)
13470 \emph default
13471 .
13472 \begin_inset Foot
13473 status collapsed
13474
13475 \begin_layout Plain Layout
13476 There is also an 
13477 \family typewriter
13478
13479 \backslash
13480 addpart*
13481 \family default
13482  command in 
13483 \emph on
13484 book (koma-script)
13485 \emph default
13486  and in 
13487 \emph on
13488 report (koma-script)
13489 \emph default
13490 , but since this is identical to 
13491 \family sans
13492 Part*
13493 \family default
13494 , is has not been implemented in LyX.
13495 \end_layout
13496
13497 \end_inset
13498
13499
13500 \end_layout
13501
13502 \begin_layout Itemize
13503
13504 \family sans
13505 Minisec
13506 \family default
13507 : generates a heading directly above the following paragraph in the standard
13508  character size without affecting the structure of the document.
13509 \end_layout
13510
13511 \begin_layout Itemize
13512
13513 \family sans
13514 Captionabove
13515 \family default
13516  and 
13517 \family sans
13518 Captionbelow
13519 \family default
13520  are special captions which respect the different space settings needed
13521  for captions placed above or below an element (if you follow strict typographic
13522  rules, you might want to place table captions always above the table).
13523  You can also use the class option 
13524 \family typewriter
13525 tablecaptionsabove
13526 \family default
13527 , which will switch 
13528 \family sans
13529 caption
13530 \family default
13531  to 
13532 \family sans
13533 captionabove
13534 \family default
13535  for tables and 
13536 \family sans
13537 captionbelow
13538 \family default
13539  for figures.
13540  You need at least Koma-Script version 2.8q to use this.
13541 \end_layout
13542
13543 \begin_layout Itemize
13544
13545 \family sans
13546 Dictum
13547 \family default
13548 : can be used to set a bonmot, e.
13549 \begin_inset space \thinspace{}
13550 \end_inset
13551
13552 g.
13553 \begin_inset space \space{}
13554 \end_inset
13555
13556 at the beginning of a chapter.
13557  If you use the optional argument (
13558 \family sans
13559 Insert\SpecialChar \menuseparator
13560 Short
13561 \begin_inset space ~
13562 \end_inset
13563
13564 Title
13565 \family default
13566 ), you can insert the dictum's author there.
13567  Dictum and author are separated by a line.
13568  You need at least Koma-Script version 2.8q to use this.
13569  
13570 \family sans
13571 Dictum
13572 \family default
13573  is not contained in 
13574 \emph on
13575 article (koma-script)
13576 \emph default
13577 .
13578 \end_layout
13579
13580 \begin_layout Standard
13581 The following types, together with the standard types 
13582 \family sans
13583 Title
13584 \family default
13585
13586 \family sans
13587 Author
13588 \family default
13589 , and 
13590 \family sans
13591 Date
13592 \family default
13593 , form the title area of the document.
13594  They must be entered ahead of the first 
13595 \begin_inset Quotes eld
13596 \end_inset
13597
13598 ordinary
13599 \begin_inset Quotes erd
13600 \end_inset
13601
13602  paragraph.
13603 \begin_inset Foot
13604 status collapsed
13605
13606 \begin_layout Plain Layout
13607 The corresponding LaTeX commands must appear before the 
13608 \family typewriter
13609
13610 \backslash
13611 maketitle
13612 \family default
13613  command.
13614 \end_layout
13615
13616 \end_inset
13617
13618  When such a type is used more than once, the latter usage overwrites the
13619  former one, that means, for every type only the latest usage is valid.
13620  The order of the different types however has, like 
13621 \family sans
13622 Title
13623 \family default
13624
13625 \family sans
13626 Author
13627 \family default
13628 , and 
13629 \family sans
13630 Date
13631 \family default
13632 , no effect on the appearance of the produced document.
13633 \end_layout
13634
13635 \begin_layout Itemize
13636
13637 \family sans
13638 Subject
13639 \family default
13640 : produces a centered paragraph above the ordinary title (
13641 \family sans
13642 Title
13643 \family default
13644
13645 \family sans
13646 Author
13647 \family default
13648
13649 \family sans
13650 Date
13651 \family default
13652 ) for the subject of the document.
13653 \end_layout
13654
13655 \begin_layout Itemize
13656
13657 \family sans
13658 Publishers
13659 \family default
13660 : produces a centered paragraph below the ordinary title (
13661 \family sans
13662 Title
13663 \family default
13664
13665 \family sans
13666 Author
13667 \family default
13668
13669 \family sans
13670 Date
13671 \family default
13672 ) for the publishers' name.
13673 \end_layout
13674
13675 \begin_layout Itemize
13676
13677 \family sans
13678 Dedication
13679 \family default
13680 : in 
13681 \emph on
13682 report (koma-script)
13683 \emph default
13684  and 
13685 \emph on
13686 book (koma-script)
13687 \emph default
13688  produces a centered paragraph on its own page behind the title page, or
13689  in 
13690 \emph on
13691 article (koma-script)
13692 \emph default
13693  produces a centered paragraph below the ordinary title (
13694 \family sans
13695 Title
13696 \family default
13697
13698 \family sans
13699 Author
13700 \family default
13701
13702 \family sans
13703 Date
13704 \family default
13705
13706 \family sans
13707 Publishers
13708 \family default
13709 ) for a dedication.
13710 \end_layout
13711
13712 \begin_layout Itemize
13713
13714 \family sans
13715 Titlehead
13716 \family default
13717 : produces a left aligned paragraph above the ordinary title (
13718 \family sans
13719 Title
13720 \family default
13721
13722 \family sans
13723 Author
13724 \family default
13725
13726 \family sans
13727 Date
13728 \family default
13729
13730 \family sans
13731 Subject
13732 \family default
13733 ) for a document`s head.
13734 \end_layout
13735
13736 \begin_layout Itemize
13737
13738 \family sans
13739 Uppertitleback
13740 \family default
13741 : produces in a double-sided print in 
13742 \emph on
13743 report (koma-script)
13744 \emph default
13745  and 
13746 \emph on
13747 book (koma-script)
13748 \emph default
13749  a left-aligned paragraph at the top of the title page`s back or has no
13750  effect in a single-sided print or in 
13751 \emph on
13752 article (koma-script)
13753 \emph default
13754 .
13755 \end_layout
13756
13757 \begin_layout Itemize
13758
13759 \family sans
13760 Lowertitleback
13761 \family default
13762 : produces in a double-sided print in 
13763 \emph on
13764 report (koma-script)
13765 \emph default
13766  and 
13767 \emph on
13768 book (koma-script)
13769 \emph default
13770  a left-aligned paragraph at the bottom of the title page`s back or has
13771  no effect in a single-sided print or in 
13772 \emph on
13773 article (koma-script)
13774 \emph default
13775 .
13776 \end_layout
13777
13778 \begin_layout Itemize
13779
13780 \family sans
13781 Extratitle
13782 \family default
13783 : produces a special 
13784 \begin_inset Quotes eld
13785 \end_inset
13786
13787 dirty
13788 \begin_inset Quotes erd
13789 \end_inset
13790
13791  page ahead of the actual document containing a paragraph without special
13792  formatting.
13793 \end_layout
13794
13795 \begin_layout Standard
13796 The layout files for the document classes 
13797 \emph on
13798 article (koma-script)
13799 \emph default
13800
13801 \emph on
13802 report (koma-script)
13803 \emph default
13804 , and 
13805 \emph on
13806 book (koma-script)
13807 \emph default
13808  do include the file 
13809 \family typewriter
13810 scrmacros.inc
13811 \family default
13812 .
13813  This is thought of as a place to define your own types.
13814  Copy scrmacros
13815 \family typewriter
13816 .inc
13817 \family default
13818  in your personal layout directory and edit the file!
13819 \end_layout
13820
13821 \begin_layout Subsection
13822 letter (koma-script)
13823 \end_layout
13824
13825 \begin_layout Standard
13826 \begin_inset ERT
13827 status open
13828
13829 \begin_layout Plain Layout
13830
13831
13832 \backslash
13833 begin{sloppypar}
13834 \end_layout
13835
13836 \end_inset
13837
13838
13839 \end_layout
13840
13841 \begin_layout Standard
13842 \noindent
13843 The document class 
13844 \emph on
13845 letter (koma-script)
13846 \emph default
13847  is implemented in the layout file 
13848 \family typewriter
13849 scrlettr.layout
13850 \family default
13851 .
13852  It contains all the paragraph types of the corresponding standard document
13853  class 
13854 \emph on
13855 letter
13856 \emph default
13857 , partly modified, with the exception of the LyX specific types 
13858 \family sans
13859 LyX-Code
13860 \family default
13861  and 
13862 \family sans
13863 Comment
13864 \family default
13865  and the 
13866 \family sans
13867 List
13868 \family default
13869  type, which is replaced by the new 
13870 \family sans
13871 Labeling
13872 \family default
13873  type.
13874  In addition, it contains, in contrast to the standard document class, the
13875  standard types 
13876 \family sans
13877 LaTeX
13878 \family default
13879
13880 \family sans
13881 Quotation
13882 \family default
13883
13884 \family sans
13885 Quote
13886 \family default
13887 , and 
13888 \family sans
13889 Verse
13890 \family default
13891 .
13892  Furthermore, there are a number of new letter specific types.
13893 \end_layout
13894
13895 \begin_layout Standard
13896 \begin_inset ERT
13897 status open
13898
13899 \begin_layout Plain Layout
13900
13901
13902 \backslash
13903 end{sloppypar}
13904 \end_layout
13905
13906 \end_inset
13907
13908
13909 \end_layout
13910
13911 \begin_layout Standard
13912 The appearance of the letter produced by this document class can be controlled
13913  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13914 \begin_inset Foot
13915 status collapsed
13916
13917 \begin_layout Plain Layout
13918 For example, the standard appearance of the letter`s heading, consisting
13919  of name and address, is quite self-willed.
13920  An 
13921 \begin_inset Quotes eld
13922 \end_inset
13923
13924 ordinary
13925 \begin_inset Quotes erd
13926 \end_inset
13927
13928  heading is produced by the following LaTeX commands in the preamble:
13929 \end_layout
13930
13931 \begin_layout LyX-Code
13932
13933 \backslash
13934 firsthead{
13935 \backslash
13936 parbox[b]{
13937 \backslash
13938 textwidth}
13939 \end_layout
13940
13941 \begin_layout LyX-Code
13942   {
13943 \backslash
13944 ignorespaces 
13945 \backslash
13946 fromname
13947 \backslash
13948
13949 \backslash
13950  
13951 \backslash
13952 ignorespaces 
13953 \backslash
13954 fromaddress}} 
13955 \end_layout
13956
13957 \begin_layout LyX-Code
13958
13959 \backslash
13960 nexthead{
13961 \backslash
13962 parbox[b]{
13963 \backslash
13964 textwidth}
13965 \end_layout
13966
13967 \begin_layout LyX-Code
13968   {
13969 \backslash
13970 ignorespaces 
13971 \backslash
13972 fromname 
13973 \backslash
13974 hfill 
13975 \backslash
13976 ignorespaces 
13977 \backslash
13978 pagename
13979 \backslash
13980  
13981 \backslash
13982 thepage}}
13983 \end_layout
13984
13985 \end_inset
13986
13987  A detailed German description of such LaTeX commands can be found in the
13988  Koma-Script documentation 
13989 \emph on
13990 scrguide
13991 \emph default
13992 .
13993  With it, the letter's author can produce his personal letter layout.
13994 \end_layout
13995
13996 \begin_layout Standard
13997 The types 
13998 \family sans
13999 Letter
14000 \family default
14001  and 
14002 \family sans
14003 Opening
14004 \family default
14005  define the beginning of the letter and must be used in every letter.
14006  To emphasize them in the LyX document class, they are marked with the letter
14007  
14008 \shape italic
14009 L
14010 \shape default
14011  or 
14012 \shape italic
14013 O
14014 \shape default
14015 , resp.
14016 \begin_inset space ~
14017 \end_inset
14018
14019 in the left margin.
14020  It is possible to write any number of letters in one file.
14021  An 
14022 \family sans
14023 Opening
14024 \family default
14025  type produces a new letter using the same addressee and a 
14026 \family sans
14027 Letter
14028 \family default
14029  type produces a new addressee.
14030  The types 
14031 \family sans
14032 Closing
14033 \family default
14034
14035 \family sans
14036 PS
14037 \family default
14038
14039 \family sans
14040 CC
14041 \family default
14042 , and 
14043 \family sans
14044 Encl
14045 \family default
14046  are ordinary paragraph types and can also be used several times in one
14047  and the same letter.
14048 \end_layout
14049
14050 \begin_layout Itemize
14051
14052 \family sans
14053 Letter
14054 \family default
14055 : produces a paragraph for the addressee and implicitly defines the beginning
14056  of the letter.
14057 \end_layout
14058
14059 \begin_layout Itemize
14060
14061 \family sans
14062 Opening
14063 \family default
14064 : produces a paragraph for the form of address and implicitly produces a
14065  new letter.
14066 \end_layout
14067
14068 \begin_layout Itemize
14069
14070 \family sans
14071 Closing
14072 \family default
14073 : produces a paragraph for a close.
14074 \end_layout
14075
14076 \begin_layout Itemize
14077
14078 \family sans
14079 PS
14080 \family default
14081 : produces a paragraph for a postscript.
14082 \end_layout
14083
14084 \begin_layout Itemize
14085
14086 \family sans
14087 CC
14088 \family default
14089 : produces a paragraph for a distribution list.
14090 \end_layout
14091
14092 \begin_layout Itemize
14093
14094 \family sans
14095 Encl
14096 \family default
14097 : produces a paragraph for enclosures.
14098 \end_layout
14099
14100 \begin_layout Standard
14101 The types 
14102 \family sans
14103 Name
14104 \family default
14105
14106 \family sans
14107 Signature
14108 \family default
14109
14110 \family sans
14111 Address
14112 \family default
14113
14114 \family sans
14115 Telephone
14116 \family default
14117
14118 \family sans
14119 Place
14120 \family default
14121
14122 \family sans
14123 Backaddress
14124 \family default
14125
14126 \family sans
14127 Specialmail
14128 \family default
14129
14130 \family sans
14131 Location
14132 \family default
14133
14134 \family sans
14135 Title
14136 \family default
14137 , and 
14138 \family sans
14139 Subject
14140 \family default
14141  are input types provided with a label to enter information, which will
14142  be processed by the document class.
14143 \begin_inset Foot
14144 status open
14145
14146 \begin_layout Plain Layout
14147 It could be seen as a matter of inconsequence, that the types 
14148 \family sans
14149 Letter
14150 \family default
14151  and 
14152 \family sans
14153 Opening
14154 \family default
14155  described above are not such input types as well.
14156  Because of the special meaning of those types, however, I have implemented
14157  them as ordinary paragraph types with a one letter mark in the left margin.
14158  Moreover, it would affect my feeling of symmetry, if the 
14159 \family sans
14160 Opening
14161 \family default
14162  type and the 
14163 \family sans
14164 Closing
14165 \family default
14166  type had such a serious different appearance.
14167 \end_layout
14168
14169 \end_inset
14170
14171  The types must be used ahead of the corresponding 
14172 \family sans
14173 Opening
14174 \family default
14175  type.
14176 \end_layout
14177
14178 \begin_layout Standard
14179 An implementation of these types in a WYSIWYG fashion does not seem to make
14180  sense, because the real appearance of the produced letter does not only
14181  depend on the usage of the particular type, but also on other factors.
14182  For example, a signature entered in the 
14183 \family sans
14184 Signature
14185 \family default
14186  type will in the standard behavior appear in the produced letter only,
14187  when in the same letter also a 
14188 \family sans
14189 Closing
14190 \family default
14191  type is used.
14192  The entered value of the 
14193 \family sans
14194 Telephone
14195 \family default
14196  type will in the standard behavior not appear in the produced letter at
14197  all.
14198  The possibility to design the letter`s heading freely is already indicated
14199  in a footnote above.
14200 \end_layout
14201
14202 \begin_layout Standard
14203 The input types can also be used as empty paragraphs.
14204  This makes sense e.
14205 \begin_inset space \thinspace{}
14206 \end_inset
14207
14208 g.
14209 \begin_inset space \space{}
14210 \end_inset
14211
14212 for the 
14213 \family sans
14214 Signature
14215 \family default
14216  type.
14217  If the 
14218 \family sans
14219 Signature
14220 \family default
14221  type is not used at all, in the standard behavior the value of the 
14222 \family sans
14223 Name
14224 \family default
14225  type is used as signature, whereas if an empty 
14226 \family sans
14227 Signature
14228 \family default
14229  type is used, no signature value is defined.
14230 \end_layout
14231
14232 \begin_layout Standard
14233 By using the input types it is possible to write a letter template, containing
14234  filled input types with your personal dates (name, address, etc.) and empty
14235  input types for other dates you want to enter.
14236 \end_layout
14237
14238 \begin_layout Itemize
14239
14240 \family sans
14241 Name
14242 \family default
14243 : sender's name, in the standard behavior appears as a centered paragraph
14244  in small caps in the letter`s heading.
14245 \end_layout
14246
14247 \begin_layout Itemize
14248
14249 \family sans
14250 Signature
14251 \family default
14252 : sender's signature, in the standard behavior appears below the 
14253 \family sans
14254 Closing
14255 \family default
14256  type.
14257  If no 
14258 \family sans
14259 Signature
14260 \family default
14261  type is used, the value of the 
14262 \family sans
14263 Name
14264 \family default
14265  type appears instead.
14266 \end_layout
14267
14268 \begin_layout Itemize
14269
14270 \family sans
14271 Address
14272 \family default
14273 : sender's address, in the standard behavior appears in a centered paragraph
14274  in the letter`s heading below the sender's name.
14275 \end_layout
14276
14277 \begin_layout Itemize
14278
14279 \family sans
14280 Telephone
14281 \family default
14282 : sender's telephone number, in the standard behavior only sets the LaTeX
14283  variable 
14284 \family typewriter
14285
14286 \backslash
14287 telephonenum
14288 \family default
14289 .
14290 \end_layout
14291
14292 \begin_layout Itemize
14293
14294 \family sans
14295 Place
14296 \family default
14297 : place of the letter`s making.
14298 \end_layout
14299
14300 \begin_layout Itemize
14301
14302 \family sans
14303 Date
14304 \family default
14305 : date of the letter`s making.
14306  
14307 \family sans
14308 Place
14309 \family default
14310  and 
14311 \family sans
14312 Date
14313 \family default
14314 , in the standard behavior, produce the place and the date in a right-aligned
14315  line below the addressee's field.
14316  If an empty 
14317 \family sans
14318 Date
14319 \family default
14320  type is used, neither place nor date appear, independent of the value of
14321  the 
14322 \family sans
14323 Place
14324 \family default
14325  type.
14326  If no 
14327 \family sans
14328 Date
14329 \family default
14330  type is used, the date of the letter `s production is used.
14331 \end_layout
14332
14333 \begin_layout Itemize
14334
14335 \family sans
14336 Backaddress
14337 \family default
14338 : sender`s back address, in the standard behavior appears above the addressee's
14339  field in a small sans serif font.
14340 \end_layout
14341
14342 \begin_layout Itemize
14343
14344 \family sans
14345 Specialmail
14346 \family default
14347 : special mail information, in the standard behavior appears underlined
14348  above the addressee's field below the back address.
14349 \end_layout
14350
14351 \begin_layout Itemize
14352
14353 \family sans
14354 Location
14355 \family default
14356 : additional information, in the standard behavior appears on right side
14357  below the addressee`s field.
14358 \end_layout
14359
14360 \begin_layout Itemize
14361
14362 \family sans
14363 Title
14364 \family default
14365 : the letter's title, in the standard behavior appears in a big, bold, sans
14366  serif font above the subject.
14367 \end_layout
14368
14369 \begin_layout Itemize
14370
14371 \family sans
14372 Subject
14373 \family default
14374 : the letter's subject, in the standard behavior appears in a bold font
14375  above the 
14376 \family sans
14377 Opening
14378 \family default
14379  paragraph.
14380 \end_layout
14381
14382 \begin_layout Standard
14383 The types 
14384 \family sans
14385 Yourref
14386 \family default
14387
14388 \family sans
14389 Yourmail
14390 \family default
14391
14392 \family sans
14393 Myref
14394 \family default
14395
14396 \family sans
14397 Customer
14398 \family default
14399 , and 
14400 \family sans
14401 Invoice
14402 \family default
14403  produce a business letter like line above the 
14404 \family sans
14405 Title
14406 \family default
14407  line containing the fields 
14408 \begin_inset Quotes eld
14409 \end_inset
14410
14411 Your ref.
14412 \begin_inset Quotes erd
14413 \end_inset
14414
14415
14416 \begin_inset Quotes eld
14417 \end_inset
14418
14419 Your letter of
14420 \begin_inset Quotes erd
14421 \end_inset
14422
14423
14424 \begin_inset Quotes eld
14425 \end_inset
14426
14427 Our ref.
14428 \begin_inset Quotes erd
14429 \end_inset
14430
14431
14432 \begin_inset Quotes eld
14433 \end_inset
14434
14435 Customer no.
14436 \begin_inset Quotes erd
14437 \end_inset
14438
14439
14440 \begin_inset Quotes eld
14441 \end_inset
14442
14443 Invoice no.
14444 \begin_inset Quotes erd
14445 \end_inset
14446
14447 , and 
14448 \begin_inset Quotes eld
14449 \end_inset
14450
14451 Date
14452 \begin_inset Quotes erd
14453 \end_inset
14454
14455 .
14456  For the date field, the value of the 
14457 \family sans
14458 Date
14459 \family default
14460  type is used.
14461  If one of these 
14462 \begin_inset Quotes eld
14463 \end_inset
14464
14465 business letter types
14466 \begin_inset Quotes erd
14467 \end_inset
14468
14469  is used, the value of the 
14470 \family sans
14471 Place
14472 \family default
14473  type however does not appear, but only the LaTeX variable 
14474 \family typewriter
14475
14476 \backslash
14477 fromplace
14478 \family default
14479  is set.
14480  The ordinary output of place and date in a right-aligned line below the
14481  addressee`s field is suppressed.
14482  The types are implemented as input types provided with a label and must
14483  be used ahead of the corresponding 
14484 \family sans
14485 Opening
14486 \family default
14487  type.
14488 \end_layout
14489
14490 \begin_layout Itemize
14491
14492 \family sans
14493 Yourref
14494 \family default
14495 : Your ref.
14496 \end_layout
14497
14498 \begin_layout Itemize
14499
14500 \family sans
14501 Yourmail
14502 \family default
14503 : Your letter of.
14504 \end_layout
14505
14506 \begin_layout Itemize
14507
14508 \family sans
14509 Myref
14510 \family default
14511 : Our ref.
14512 \end_layout
14513
14514 \begin_layout Itemize
14515
14516 \family sans
14517 Customer
14518 \family default
14519 : Customer no.
14520 \end_layout
14521
14522 \begin_layout Itemize
14523
14524 \family sans
14525 Invoice
14526 \family default
14527 : Invoice no.
14528 \end_layout
14529
14530 \begin_layout Subsection
14531 The new letter class: letter (koma-script v.2)
14532 \end_layout
14533
14534 \begin_layout Standard
14535 by 
14536 \noun on
14537 Jürgen Spitzmüller
14538 \end_layout
14539
14540 \begin_layout Standard
14541 \begin_inset VSpace medskip
14542 \end_inset
14543
14544
14545 \end_layout
14546
14547 \begin_layout Standard
14548 \noindent
14549 Koma-Script version 2.8 has introduced a new letter class 
14550 \family typewriter
14551 scrlttr2
14552 \family default
14553  which supersedes the now unsupported 
14554 \family typewriter
14555 scrlettr
14556 \family default
14557 .
14558  It has — on the LaTeX side — a completely new interface and is not compatible
14559  with the old class.
14560  Therefore, LyX supports both, though it is recommended you use the new
14561  class.
14562 \end_layout
14563
14564 \begin_layout Standard
14565 This class covers the same functionality as 
14566 \emph on
14567 letter (koma-script),
14568 \emph default
14569  and a few more.
14570  The basic items are 
14571 \family sans
14572 Address
14573 \family default
14574  (receiver's address, same as 
14575 \family sans
14576 Letter
14577 \family default
14578  in the old layout), 
14579 \family sans
14580 Opening
14581 \family default
14582 , and 
14583 \family sans
14584 Closing
14585 \family default
14586 .
14587  
14588 \family sans
14589 NextAddress
14590 \family default
14591  will start a new letter (i.
14592 \begin_inset space \thinspace{}
14593 \end_inset
14594
14595 g.
14596 \begin_inset space \space{}
14597 \end_inset
14598
14599 you can write several letters per document).
14600  New elements are sender's 
14601 \family sans
14602 E-Mail
14603 \family default
14604
14605 \family sans
14606 URL
14607 \family default
14608
14609 \family sans
14610 Fax
14611 \family default
14612
14613 \family sans
14614 Bank
14615 \family default
14616  and the possibility to use a 
14617 \family sans
14618 Logo
14619 \family default
14620  (via 
14621 \family sans
14622 Insert\SpecialChar \menuseparator
14623 Graphics
14624 \family default
14625 ) in the header.
14626 \end_layout
14627
14628 \begin_layout Standard
14629 The biggest improvement is, though, that the letter's layout is configurable
14630  to meet almost any needs.
14631  This can be done via the preamble or with a special style file (Letter
14632  Class Option, extension 
14633 \family typewriter
14634 *.lco
14635 \family default
14636 ), that will be read in as a class option.
14637 \begin_inset Foot
14638 status collapsed
14639
14640 \begin_layout Plain Layout
14641 The KOMA package comes with some default 
14642 \family typewriter
14643 *.lco
14644 \family default
14645  files.
14646  There is, for instance, a 
14647 \family typewriter
14648 DIN.lco
14649 \family default
14650  file that follows german typesetting rules, or a 
14651 \family typewriter
14652 KOMAold.lco
14653 \family default
14654  that provides the default layout of the old 
14655 \family typewriter
14656 scrlettr
14657 \family default
14658  class.
14659  The latter can be loaded with the class option 
14660 \family typewriter
14661 KOMAold
14662 \family default
14663 , inserted via the 
14664 \family sans
14665 \bar under
14666 L
14667 \bar default
14668 ayout\SpecialChar \menuseparator
14669
14670 \bar under
14671 D
14672 \bar default
14673 ocument\SpecialChar \menuseparator
14674 Extra Options
14675 \family default
14676  field.
14677 \end_layout
14678
14679 \end_inset
14680
14681  Have a look at the 
14682 \emph on
14683 koma-letter2
14684 \emph default
14685  template that is included in LyX for examples.
14686  A detailed description is to be found in the Koma-Script documentation
14687  (
14688 \emph on
14689 scrguide
14690 \emph default
14691 ).
14692 \end_layout
14693
14694 \begin_layout Subsection
14695 Problems
14696 \end_layout
14697
14698 \begin_layout Standard
14699 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14700  some problems.
14701 \end_layout
14702
14703 \begin_layout Itemize
14704 The chapter number of a 
14705 \family sans
14706 Chapter
14707 \family default
14708  type appears on a line of its own above the chapter heading instead of
14709  appearing in the same line ahead of it.
14710  The cause for that is the LyX internal behavior for the labeltype 
14711 \family sans
14712 Counter_Chapter
14713 \family default
14714  in the layout file.
14715 \end_layout
14716
14717 \begin_layout Itemize
14718 The headings of the types 
14719 \family sans
14720 Addchap
14721 \family default
14722  and 
14723 \family sans
14724 Addsec
14725 \family default
14726  are only put in the 
14727 \begin_inset Quotes eld
14728 \end_inset
14729
14730 true
14731 \begin_inset Quotes erd
14732 \end_inset
14733
14734  LaTeX table of contents, but not in the LyX table of contents (
14735 \family sans
14736 Document\SpecialChar \menuseparator
14737 Table
14738 \begin_inset space ~
14739 \end_inset
14740
14741 of
14742 \begin_inset space ~
14743 \end_inset
14744
14745 Contents
14746 \family default
14747 ).
14748 \end_layout
14749
14750 \begin_layout Itemize
14751 The paragraphs in a 
14752 \emph on
14753 letter
14754 \emph default
14755  document class appear in a skip separation mode, not indented.
14756  This is the standard behavior, no special LaTeX commands are needed for
14757  that.
14758  But in the 
14759 \family sans
14760 Document\SpecialChar \menuseparator
14761 Settings
14762 \family default
14763  dialog the corresponding radio button indicates 
14764 \family sans
14765 Indent
14766 \family default
14767 .
14768  A 
14769 \family sans
14770 Skip
14771 \family default
14772  value always has the effect that extra LaTeX commands are inserted in the
14773  document to produce the gap, which is not what is wanted in this case.
14774 \end_layout
14775
14776 \begin_layout Section
14777 Latex8 (IEEE Conference Papers)
14778 \end_layout
14779
14780 \begin_layout Standard
14781 by 
14782 \noun on
14783 Allan Rae
14784 \end_layout
14785
14786 \begin_layout Subsection
14787 Introduction
14788 \end_layout
14789
14790 \begin_layout Standard
14791 Since this class is specifically for writing submissions to IEEE sponsored
14792  conferences I strongly recommend that you get a copy of their Authors Kit.
14793  The 
14794 \family sans
14795 latex.sty
14796 \family default
14797  package and associated bibliography style file is included in the kit.
14798  The Authors Kit is usually sent out by email once your initial submission
14799  has been accepted.
14800  There is a lot of useful information in the Authors Kit explaining formatting
14801  restrictions and so on and I will assume you have read this since that
14802  means I don't have to repeat it all here.
14803 \end_layout
14804
14805 \begin_layout Subsection
14806 Getting Started
14807 \end_layout
14808
14809 \begin_layout Standard
14810 [AR\SpecialChar \@.
14811  more to come]
14812 \end_layout
14813
14814 \begin_layout Subsection
14815 Supported Environments
14816 \end_layout
14817
14818 \begin_layout Itemize
14819
14820 \family sans
14821 Standard
14822 \end_layout
14823
14824 \begin_layout Itemize
14825
14826 \family sans
14827 Title
14828 \end_layout
14829
14830 \begin_layout Itemize
14831
14832 \family sans
14833 Author
14834 \end_layout
14835
14836 \begin_layout Itemize
14837
14838 \family sans
14839 E-mail
14840 \end_layout
14841
14842 \begin_layout Itemize
14843
14844 \family sans
14845 Affiliation
14846 \end_layout
14847
14848 \begin_layout Itemize
14849
14850 \family sans
14851 Abstract
14852 \end_layout
14853
14854 \begin_layout Itemize
14855
14856 \family sans
14857 Section
14858 \end_layout
14859
14860 \begin_layout Itemize
14861
14862 \family sans
14863 SubSection
14864 \end_layout
14865
14866 \begin_layout Itemize
14867
14868 \family sans
14869 Caption
14870 \end_layout
14871
14872 \begin_layout Subsection
14873 Differences Between Screen and Paper
14874 \end_layout
14875
14876 \begin_layout Standard
14877 There are slight differences in appearance mainly with the presentation
14878  of section counters.
14879  On screen the trailing period of the section counter is missing but it
14880  will appear in the output so don't let this worry you.
14881 \end_layout
14882
14883 \begin_layout Section
14884 Memoir
14885 \end_layout
14886
14887 \begin_layout Standard
14888 By 
14889 \noun on
14890 Jürgen Spitzmüller
14891 \end_layout
14892
14893 \begin_layout Subsection
14894 Overview
14895 \end_layout
14896
14897 \begin_layout Standard
14898 Memoir is a very powerful and constantly evolving class.
14899  It has been designed with regard to fictional and non-fictional literature.
14900  Its aim is to let the user have maximum control over the typesetting of
14901  his document.
14902  Memoir is based on the standard book class, but it can also emulate the
14903  article class (see below).
14904 \end_layout
14905
14906 \begin_layout Standard
14907 Peter Wilson, the developer of Memoir, is known as the author of lots of
14908  useful packages in the LaTeX world.
14909  Most of them have been merged with Memoir.
14910  Therefore, it is much easier to layout the table of contents, appendices,
14911  chapter designs and such.
14912  LyX, though, does not support all of these goodies natively.
14913  Some of them might be added to forthcoming releases
14914 \begin_inset Foot
14915 status collapsed
14916
14917 \begin_layout Plain Layout
14918 You are invited to send suggestions to 
14919 \begin_inset Flex URL
14920 status collapsed
14921
14922 \begin_layout Plain Layout
14923
14924 lyx-devel@lists.lyx.org
14925 \end_layout
14926
14927 \end_inset
14928
14929 .
14930 \end_layout
14931
14932 \end_inset
14933
14934 , lots will probably never, due to the limitations of LyX's framework.
14935  Of course you can still use all features with the help of some native LaTeX
14936  commands (TeX code
14937 \begin_inset Foot
14938 status collapsed
14939
14940 \begin_layout Plain Layout
14941 Cf.
14942 \begin_inset ERT
14943 status collapsed
14944
14945 \begin_layout Plain Layout
14946
14947
14948 \backslash
14949  
14950 \end_layout
14951
14952 \end_inset
14953
14954 section
14955 \begin_inset space ~
14956 \end_inset
14957
14958
14959 \begin_inset CommandInset ref
14960 LatexCommand ref
14961 reference "sec:Inserting-TeX-Code"
14962
14963 \end_inset
14964
14965  for details.
14966 \end_layout
14967
14968 \end_inset
14969
14970 ).
14971  In this section, we can only list those features which are natively supported
14972  by LyX.
14973  For detailed descriptions (and for the rest of features) we recommend you
14974  have a look at the detailed manual of the Memoir class
14975 \begin_inset Foot
14976 status collapsed
14977
14978 \begin_layout Plain Layout
14979 Cf.
14980 \begin_inset ERT
14981 status collapsed
14982
14983 \begin_layout Plain Layout
14984
14985
14986 \backslash
14987  
14988 \end_layout
14989
14990 \end_inset
14991
14992
14993 \begin_inset Flex URL
14994 status collapsed
14995
14996 \begin_layout Plain Layout
14997
14998 CTAN:/macros/latex/memoir/memman.pdf
14999 \end_layout
15000
15001 \end_inset
15002
15003 .
15004 \end_layout
15005
15006 \end_inset
15007
15008 , which is not only a user guide for the class, but also both a comprehensive
15009  description on good typesetting and a superb example for good typesetting
15010  itself.
15011 \end_layout
15012
15013 \begin_layout Subsection
15014 Basic features and restrictions
15015 \end_layout
15016
15017 \begin_layout Standard
15018 Memoir supports basically all features of the standard book classes.
15019  There are, however, some differences, as follows:
15020 \end_layout
15021
15022 \begin_layout Description
15023 Font
15024 \begin_inset space ~
15025 \end_inset
15026
15027 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
15028 \end_layout
15029
15030 \begin_layout Description
15031 Page
15032 \begin_inset space ~
15033 \end_inset
15034
15035 style: The fancy page style is not supported, due to a command clash between
15036  Memoir and the fancyhdr package (they both define a command with the same
15037  name, which confuses LaTeX).
15038  Instead, Memoir comes with a number of its own page styles (see 
15039 \family sans
15040 Layout\SpecialChar \menuseparator
15041 Document\SpecialChar \menuseparator
15042 Page
15043 \begin_inset space ~
15044 \end_inset
15045
15046 Style
15047 \family default
15048 ).
15049  If you want to use these for the chapter pages, you have to use the command
15050  
15051 \family typewriter
15052
15053 \backslash
15054 chapterstyle
15055 \family default
15056  in the main text or in preamble (e.
15057 \begin_inset space \thinspace{}
15058 \end_inset
15059
15060 g.
15061 \begin_inset space \space{}
15062 \end_inset
15063
15064
15065 \family typewriter
15066
15067 \backslash
15068 chapterstyle{companion}
15069 \family default
15070 ).
15071 \end_layout
15072
15073 \begin_layout Description
15074 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15075  optional argument in the standard classes.
15076  With this, you can specify an alternative version of the title for the
15077  table of contents and the headers (for instance, if the title is too long).
15078  In LyX, you can do this via 
15079 \family sans
15080 Insert\SpecialChar \menuseparator
15081 Short
15082 \begin_inset space ~
15083 \end_inset
15084
15085 Title
15086 \family default
15087  at the beginning of a chapter/section.
15088  Memoir features a second optional argument and thus separates the table
15089  of contents from the header.
15090  You can define three variants of a title with this: one for the main text,
15091  one for the table of contents, and one for the headers.
15092  Simply insert two optional arguments if you need this feature, the first
15093  one containing the short title for the Table of Contents, the second one
15094  containing an alternative short title for the headers.
15095 \end_layout
15096
15097 \begin_layout Description
15098 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15099  of contents, the list of figures and the list of table start a new page
15100  automatically.
15101  Memoir does not follow this route.
15102  You have to insert a page break yourself, if you want to have one.
15103 \end_layout
15104
15105 \begin_layout Description
15106 Titlepage: For some unknown reason, Memoir uses pagination on the title
15107  page (in the standard classes, title pages are 
15108 \begin_inset Quotes eld
15109 \end_inset
15110
15111 empty
15112 \begin_inset Quotes erd
15113 \end_inset
15114
15115 , i.
15116 \begin_inset space \thinspace{}
15117 \end_inset
15118
15119 g.
15120 \begin_inset space \space{}
15121 \end_inset
15122
15123 without pagina).
15124  If you want an empty title page, type 
15125 \family typewriter
15126
15127 \backslash
15128 aliaspagestyle{title}{empty}
15129 \family default
15130  in the preamble.
15131 \end_layout
15132
15133 \begin_layout Description
15134 Article: With the class option 
15135 \emph on
15136 article
15137 \emph default
15138  (to be inserted in 
15139 \family sans
15140 Layout\SpecialChar \menuseparator
15141 Document\SpecialChar \menuseparator
15142 Extra
15143 \begin_inset space ~
15144 \end_inset
15145
15146 Options
15147 \family default
15148 ), you can emulate article style.
15149  That is, counters (footnotes, figures, tables etc.) will not be reset on
15150  new chapters, chapters don't start a new page (but are—in contrary to 
15151 \begin_inset Quotes eld
15152 \end_inset
15153
15154 real
15155 \begin_inset Quotes erd
15156 \end_inset
15157
15158  article classes—still allowed), parts, though, use their own page, as in
15159  book.
15160 \end_layout
15161
15162 \begin_layout Description
15163 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15164  font commands, which have been used in the old LaTeX version 2.09 (e.
15165 \begin_inset space \thinspace{}
15166 \end_inset
15167
15168 g.
15169 \begin_inset space \space{}
15170 \end_inset
15171
15172
15173 \family typewriter
15174
15175 \backslash
15176 rm
15177 \family default
15178
15179 \family typewriter
15180
15181 \backslash
15182 it
15183 \family default
15184 ).
15185  It produces an error and stops LaTeX whenever such a command appears.
15186  The class option 
15187 \emph on
15188 oldfontcommands
15189 \emph default
15190  reallows the commands and spits out warnings instead (which does at least
15191  not stop LaTeX).
15192  Since a lot of packages and particularly BibTeX style files are still using
15193  those commands, we have decided to use this option by default.
15194 \end_layout
15195
15196 \begin_layout Subsection
15197 Extra features
15198 \end_layout
15199
15200 \begin_layout Standard
15201 We will only describe the features supported by LyX (which is not much currently
15202 ).
15203  Please consult the Memoir manual
15204 \begin_inset Foot
15205 status collapsed
15206
15207 \begin_layout Plain Layout
15208 Cf.
15209 \begin_inset ERT
15210 status collapsed
15211
15212 \begin_layout Plain Layout
15213
15214
15215 \backslash
15216  
15217 \end_layout
15218
15219 \end_inset
15220
15221
15222 \begin_inset Flex URL
15223 status collapsed
15224
15225 \begin_layout Plain Layout
15226
15227 CTAN:/macros/latex/memoir/memman.pdf
15228 \end_layout
15229
15230 \end_inset
15231
15232 .
15233 \end_layout
15234
15235 \end_inset
15236
15237  for details.
15238 \end_layout
15239
15240 \begin_layout Description
15241 Abstract: You may wonder why an abstract is an extra feature.
15242  Well, it is in book class.
15243  Usually books don't have abstracts.
15244  Memoir, however, has.
15245  You can use it wherever and how often you like.
15246 \end_layout
15247
15248 \begin_layout Description
15249 Chapterprecis: You may know this older typesetting style: The contents of
15250  a chapter are summarized below the title and also in the table of contents
15251  (e.
15252 \begin_inset space \thinspace{}
15253 \end_inset
15254
15255 g.
15256 \begin_inset space \space{}
15257 \end_inset
15258
15259
15260 \emph on
15261 Our hero arrives in Troia; he loses some friends; he finds others
15262 \emph default
15263 ).
15264  Chapterprecis does exactly this.
15265  It is therefore only sensible below a chapter.
15266 \end_layout
15267
15268 \begin_layout Description
15269 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15270  The epigraph environment provides an elegant way of typesetting such a
15271  motto.
15272  The motto itself (text) and its author (source) are divided by a short
15273  line.
15274  Unfortunately, we have to fool LyX a bit here again, since the environment
15275  needs two arguments (text and source).
15276  In this case, we have to use curly brackets (in TeX mode) between the two
15277  arguments: 
15278 \emph on
15279 <smart slogan>
15280 \emph default
15281  
15282 \family typewriter
15283 }{
15284 \family default
15285  
15286 \emph on
15287 <author of the slogan>.
15288 \end_layout
15289
15290 \begin_layout Description
15291 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15292  complex figurative poems).
15293  LyX can only support a few of them.
15294  One is poemtitle, which is a centered title for poems, which will also
15295  be added to the table of contents (verse is the standard environment for
15296  poems.
15297  Memoir has some enhanced versions of verse, but you need to use TeX code,
15298  because they have to be nested inside regular verse environments, which
15299  is not possible with LyX).
15300 \end_layout
15301
15302 \begin_layout Description
15303 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15304 \end_layout
15305
15306 \begin_layout Section
15307 Article (mwart), book (mwbk) and report (mwrep)
15308 \begin_inset Argument
15309 status collapsed
15310
15311 \begin_layout Plain Layout
15312 The 
15313 \family typewriter
15314 mw
15315 \family default
15316  Classes
15317 \end_layout
15318
15319 \end_inset
15320
15321
15322 \end_layout
15323
15324 \begin_layout Standard
15325 by 
15326 \noun on
15327 Tomasz Luczak
15328 \end_layout
15329
15330 \begin_layout Standard
15331 The LyX document classes 
15332 \emph on
15333 article (mwart)
15334 \emph default
15335
15336 \emph on
15337 report (mwrep)
15338 \emph default
15339  and 
15340 \emph on
15341 book
15342 \emph default
15343  
15344 \emph on
15345 (mwbk)
15346 \emph default
15347  correspond to the LaTeX document classes 
15348 \family typewriter
15349 mwart.cls
15350 \family default
15351
15352 \family typewriter
15353 mwrep.cls
15354 \family default
15355  and 
15356 \family typewriter
15357 mwbk.cls
15358 \family default
15359 , resp.
15360  They are replacements for the standard document classes 
15361 \family typewriter
15362 article.cls
15363 \family default
15364
15365 \family typewriter
15366 report.cls
15367 \family default
15368  and 
15369 \family typewriter
15370 book.cls
15371 \family default
15372 , resp., and fit better to Polish typography conventions in a number of points.
15373  
15374 \end_layout
15375
15376 \begin_layout Standard
15377 Basic differences:
15378 \end_layout
15379
15380 \begin_layout Itemize
15381 Unnumbered titles (with star, e.
15382 \begin_inset space \thinspace{}
15383 \end_inset
15384
15385 g.
15386 \begin_inset space \space{}
15387 \end_inset
15388
15389
15390 \family sans
15391 Section*
15392 \family default
15393 ) are added into table of contents,
15394 \end_layout
15395
15396 \begin_layout Itemize
15397 Additional page styles:
15398 \end_layout
15399
15400 \begin_deeper
15401 \begin_layout Description
15402 uheadings header with separated lines,
15403 \end_layout
15404
15405 \begin_layout Description
15406 myheadings custom header, contents headers via commands: 
15407 \family typewriter
15408
15409 \backslash
15410 markright
15411 \family default
15412  and 
15413 \family typewriter
15414
15415 \backslash
15416 markboth
15417 \family default
15418 ,
15419 \end_layout
15420
15421 \begin_layout Description
15422 myuheadings custom header with separated lines,
15423 \end_layout
15424
15425 \begin_layout Description
15426 outer page number is placed on outer side of page
15427 \end_layout
15428
15429 \end_deeper
15430 \begin_layout Itemize
15431 Options 
15432 \end_layout
15433
15434 \begin_deeper
15435 \begin_layout Description
15436 rmheadings serif titles — default,
15437 \end_layout
15438
15439 \begin_layout Description
15440 sfheadings sansserif titles,
15441 \end_layout
15442
15443 \begin_layout Description
15444 authortitle on title page first placed is author next title — default,
15445 \end_layout
15446
15447 \begin_layout Description
15448 titleauthor on title page first placed is title next author,
15449 \end_layout
15450
15451 \begin_layout Description
15452 withmarginpar reserve place on page for margins.
15453 \end_layout
15454
15455 \end_deeper
15456 \begin_layout Section
15457 Paper
15458 \end_layout
15459
15460 \begin_layout Standard
15461 The document class 
15462 \family sans
15463 paper
15464 \family default
15465  provides an alternative to the standard 
15466 \family sans
15467 article
15468 \family default
15469  class.
15470  It provides similar functionality, but you might prefer this layout with
15471  sans serif sections, headings, and more.
15472 \end_layout
15473
15474 \begin_layout Section
15475 RevTeX4
15476 \end_layout
15477
15478 \begin_layout Standard
15479 by 
15480 \noun on
15481 Amir Karger
15482 \end_layout
15483
15484 \begin_layout Standard
15485 \begin_inset VSpace bigskip
15486 \end_inset
15487
15488
15489 \end_layout
15490
15491 \begin_layout Standard
15492 \noindent
15493 The 
15494 \family sans
15495 Revtex
15496 \begin_inset space ~
15497 \end_inset
15498
15499 4
15500 \family default
15501  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15502 \begin_inset Formula $\beta$
15503 \end_inset
15504
15505  release of May, 1999) class.
15506 \end_layout
15507
15508 \begin_layout Standard
15509 LyX has a 
15510 \family sans
15511 Revtex
15512 \family default
15513  textclass, which works with RevTeX 3.1.
15514  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15515  That means that it doesn't interact very well with LyX, which requires
15516  LaTeX2e, although it has been kludged to work.
15517  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15518  LyX with the 
15519 \family sans
15520 RevTeX
15521 \begin_inset space ~
15522 \end_inset
15523
15524 4
15525 \family default
15526  textclass should also be pretty easy to use.
15527 \end_layout
15528
15529 \begin_layout Standard
15530 These documents are supposed to be used in 
15531 \emph on
15532 addition
15533 \emph default
15534  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15535  macros, and assume you'll know what to put in the preamble if necessary.
15536 \end_layout
15537
15538 \begin_layout Subsection
15539 Installation
15540 \end_layout
15541
15542 \begin_layout Standard
15543 All you need to do is install RevTeX 4, as described in the package's README
15544  file.
15545  The package can be found at The RevTeX 4 Web Site 
15546 \begin_inset Flex URL
15547 status collapsed
15548
15549 \begin_layout Plain Layout
15550
15551 http://publish.aps.org/revtex4/
15552 \end_layout
15553
15554 \end_inset
15555
15556 .
15557  Install it somewhere that LaTeX can see it.
15558  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15559  (i.
15560 \begin_inset space \thinspace{}
15561 \end_inset
15562
15563 g.
15564 \begin_inset space \space{}
15565 \end_inset
15566
15567 not the directory where you installed the class file.) Then, if you reconfigure
15568  LyX, it will find the class file and let you use the RevTeX4 textclass.
15569 \end_layout
15570
15571 \begin_layout Standard
15572 Probably the easiest way to get started is either to import a RevTeX 4 document
15573  using 
15574 \family typewriter
15575 tex2lyx
15576 \family default
15577 , or to use the 
15578 \family sans
15579 Revtex
15580 \begin_inset space ~
15581 \end_inset
15582
15583 4
15584 \family default
15585  template, found in the templates directory.
15586 \end_layout
15587
15588 \begin_layout Subsection
15589 Preamble Matter
15590 \end_layout
15591
15592 \begin_layout Standard
15593 Optional arguments to 
15594 \family typewriter
15595
15596 \backslash
15597 documentclass
15598 \family default
15599 , like 
15600 \begin_inset Quotes eld
15601 \end_inset
15602
15603 preprint
15604 \begin_inset Quotes erd
15605 \end_inset
15606
15607  and 
15608 \begin_inset Quotes eld
15609 \end_inset
15610
15611 aps
15612 \begin_inset Quotes erd
15613 \end_inset
15614
15615 , go in the 
15616 \family sans
15617 E
15618 \bar under
15619 x
15620 \bar default
15621 tra
15622 \begin_inset space ~
15623 \end_inset
15624
15625 Options
15626 \family default
15627  field in the 
15628 \family sans
15629 Document
15630 \begin_inset space ~
15631 \end_inset
15632
15633 Layout
15634 \family default
15635  dialog, as usual.
15636  Remember that in RevTeX, at least one optional argument is required! 
15637 \end_layout
15638
15639 \begin_layout Standard
15640 Other preamble matter, like 
15641 \family typewriter
15642
15643 \backslash
15644 draft
15645 \family default
15646  etc.
15647 \begin_inset space ~
15648 \end_inset
15649
15650 goes in the 
15651 \family sans
15652 LaTeX
15653 \begin_inset space ~
15654 \end_inset
15655
15656 Preamble
15657 \family default
15658  dialog, also as usual.
15659 \end_layout
15660
15661 \begin_layout Subsection
15662 Layouts
15663 \end_layout
15664
15665 \begin_layout Standard
15666 The layouts basically correspond to the commands in RevTeX4.0.
15667  For example, the Email layout corresponds to 
15668 \family typewriter
15669
15670 \backslash
15671 email{}
15672 \family default
15673 .
15674  Note that (at least as of RevTeX 4.0 Beta), the 
15675 \family sans
15676 Address
15677 \family default
15678  and 
15679 \family sans
15680 Affiliation
15681 \family default
15682  layouts are exactly equivalent, so you shouldn't need to use both.
15683 \begin_inset Foot
15684 status collapsed
15685
15686 \begin_layout Plain Layout
15687 In case you're curious, both were included so that 
15688 \family typewriter
15689 tex2lyx
15690 \family default
15691  would be able to translate both 
15692 \family typewriter
15693
15694 \backslash
15695 address
15696 \family default
15697  and 
15698 \family typewriter
15699
15700 \backslash
15701 affiliation
15702 \family default
15703 .
15704 \end_layout
15705
15706 \end_inset
15707
15708
15709 \end_layout
15710
15711 \begin_layout Subsection
15712 Important Notes
15713 \end_layout
15714
15715 \begin_layout Standard
15716 There are a couple of important unique aspects of RevTeX 4 which might cause
15717  bugs that will be even more confusing in LyX.
15718 \end_layout
15719
15720 \begin_layout Standard
15721 In RevTeX, the 
15722 \family typewriter
15723
15724 \backslash
15725 thanks
15726 \family default
15727  command goes 
15728 \emph on
15729 outside
15730 \emph default
15731  the 
15732 \family typewriter
15733
15734 \backslash
15735 author
15736 \family default
15737  command.
15738  The LyX equivalent is that there is a separate Thanks layout.
15739  Do 
15740 \emph on
15741 not
15742 \emph default
15743  write footnotes in the 
15744 \family sans
15745 Author
15746 \family default
15747  layout, or weird things may happen.
15748  See the RevTeX 4 documentation for more details.
15749 \end_layout
15750
15751 \begin_layout Standard
15752 Also, the 
15753 \family sans
15754 Author
15755 \begin_inset space ~
15756 \end_inset
15757
15758 Email
15759 \family default
15760
15761 \family sans
15762 Author
15763 \begin_inset space ~
15764 \end_inset
15765
15766 URL
15767 \family default
15768 , and 
15769 \family sans
15770 Thanks
15771 \family default
15772  layouts must be placed 
15773 \emph on
15774 in between
15775 \emph default
15776  the 
15777 \family sans
15778 Author
15779 \family default
15780  layout and the corresponding 
15781 \family sans
15782 Address
15783 \family default
15784  (or equivalent 
15785 \family sans
15786 Affiliation
15787 \family default
15788 ) layout.
15789  If you put the 
15790 \family sans
15791 Thanks
15792 \family default
15793  after the 
15794 \family sans
15795 Address
15796 \family default
15797 , the LaTeX won't compile.
15798 \end_layout
15799
15800 \begin_layout Subsection
15801 Drawbacks
15802 \end_layout
15803
15804 \begin_layout Standard
15805 The main problem with this layout is that you can't use the optional arguments
15806  to layouts like Email and Title.
15807  (The problem is not unique to this layout; you can't use optional arguments
15808  to the Section layouts either.) This means that after you export that file
15809  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15810  need to edit the LaTeX file with a text editor to add the optional arguments
15811  to set, e.
15812 \begin_inset space \thinspace{}
15813 \end_inset
15814
15815 g.
15816 \begin_inset space \space{}
15817 \end_inset
15818
15819 the running title for the page headers.
15820  Lacking these layouts makes the 
15821 \family typewriter
15822
15823 \backslash
15824 altaffiliation
15825 \family default
15826  (and the equivalent 
15827 \family typewriter
15828
15829 \backslash
15830 altaddress
15831 \family default
15832 ) useless, so the corresponding layouts don't exist, and will have to be
15833  added by hand.
15834 \begin_inset Foot
15835 status collapsed
15836
15837 \begin_layout Plain Layout
15838
15839 \emph on
15840 Note from JMarc:
15841 \emph default
15842  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15843  has not been updated yet to take advantage of it.
15844 \end_layout
15845
15846 \end_inset
15847
15848  
15849 \end_layout
15850
15851 \begin_layout Section
15852 Springer Journals (
15853 \family sans
15854 svjour
15855 \family default
15856 )
15857 \end_layout
15858
15859 \begin_layout Standard
15860 by 
15861 \noun on
15862 Martin Vermeer
15863 \end_layout
15864
15865 \begin_layout Subsection
15866 Description
15867 \end_layout
15868
15869 \begin_layout Standard
15870 These are the layout files for some of the journal formats used by Springer
15871  Verlag and listed on 
15872 \begin_inset Flex URL
15873 status collapsed
15874
15875 \begin_layout Plain Layout
15876
15877 http://www.springer.de/author/tex/help-journals.html
15878 \end_layout
15879
15880 \end_inset
15881
15882 , where you should also go to fetch the class files (yes, these are LaTeX2e
15883  now!).
15884  It is a modular system: the things common to all journals are implemented
15885  in 
15886 \family typewriter
15887 svjour.inc
15888 \family default
15889 , which journal-specific layout files (such as, e.
15890 \begin_inset space \thinspace{}
15891 \end_inset
15892
15893 g.
15894 \begin_inset space \space{}
15895 \end_inset
15896
15897
15898 \family typewriter
15899 svjog.layout
15900 \family default
15901  for Journal of Geodesy) can include.
15902 \end_layout
15903
15904 \begin_layout Standard
15905 This means that implementing support for any other Springer journal on this
15906  list is as simple as writing your own 
15907 \family typewriter
15908 sv
15909 \family default
15910 <myjournal>
15911 \family typewriter
15912 .layout
15913 \family default
15914  file following the outline given in 
15915 \family typewriter
15916 svjog.layout
15917 \family default
15918 .
15919  
15920 \end_layout
15921
15922 \begin_layout Standard
15923 It is reasonably well tested only for the Journal of Geodesy.
15924  
15925 \family typewriter
15926 svjour
15927 \family default
15928  and 
15929 \family typewriter
15930 svjog
15931 \family default
15932  come with the standard LyX distribution.
15933  Install the relevant class file (downloaded from Springer) in a proper
15934  directory, reconfigure LaTeX (in the teTeX case by running 
15935 \family typewriter
15936 texhash
15937 \family default
15938 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15939  and it should work.
15940 \end_layout
15941
15942 \begin_layout Subsection
15943 New styles
15944 \end_layout
15945
15946 \begin_layout Standard
15947 A large number of theorem-like styles — 
15948 \family sans
15949 Claim, Conjecture,
15950 \family default
15951  
15952 \family sans
15953 \SpecialChar \ldots{}
15954 Theorem
15955 \family default
15956 .
15957 \end_layout
15958
15959 \begin_layout Standard
15960
15961 \family sans
15962 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15963  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15964 \family default
15965 .
15966  See the Springer class file documentation for details.
15967 \end_layout
15968
15969 \begin_layout Subsection
15970 Supported journals
15971 \end_layout
15972
15973 \begin_layout Itemize
15974
15975 \emph on
15976 Journal of Geodesy
15977 \emph default
15978
15979 \family typewriter
15980 svjog.layout
15981 \family default
15982  — Martin Vermeer
15983 \end_layout
15984
15985 \begin_layout Itemize
15986
15987 \emph on
15988 Probability Theory and Related Fields
15989 \emph default
15990
15991 \family typewriter
15992 svprobth.layout
15993 \family default
15994  — Jean-Marc Lasgouttes
15995 \end_layout
15996
15997 \begin_layout Standard
15998 Add your own, it isn't so hard!
15999 \end_layout
16000
16001 \begin_layout Subsection
16002 Credits
16003 \end_layout
16004
16005 \begin_layout Standard
16006 These files are partly based on the older 
16007 \family typewriter
16008 ejour2.layout
16009 \family default
16010 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
16011  file from Springer.
16012  All this, and the 
16013 \family typewriter
16014 ejour2
16015 \family default
16016  layout, are now defunct.
16017  Jean-Marc Lasgouttes helped out big in making me find my way around the
16018  LyX layout file mechanism.
16019 \end_layout
16020
16021 \begin_layout Subsection
16022 Bugs
16023 \end_layout
16024
16025 \begin_layout Standard
16026 Probably.
16027  But probably less than in the old hacked-LaTeX 
16028 \family typewriter
16029 ejour2
16030 \family default
16031 .
16032 \end_layout
16033
16034 \begin_layout Standard
16035 Limitations e.
16036 \begin_inset space \thinspace{}
16037 \end_inset
16038
16039 g.: does not display the number for theorem-like layouts, just #.
16040 \end_layout
16041
16042 \begin_layout Section
16043 Slides [aka 
16044 \noun on
16045 SliTeX
16046 \noun default
16047 ]
16048 \begin_inset CommandInset label
16049 LatexCommand label
16050 name "sec:slitex"
16051
16052 \end_inset
16053
16054
16055 \end_layout
16056
16057 \begin_layout Standard
16058 by 
16059 \noun on
16060 John Weiss
16061 \noun default
16062  
16063 \end_layout
16064
16065 \begin_layout Subsection
16066 Introduction
16067 \end_layout
16068
16069 \begin_layout Standard
16070 This section describes how to use LyX to make slides for overhead projectors.
16071  There are two document classes that can do this: the default slides class
16072  and the 
16073 \family sans
16074 FoilTeX
16075 \family default
16076  slides class.
16077  This section documents the former.
16078 \end_layout
16079
16080 \begin_layout Standard
16081 I'm going to say this again, nice and clear, so that there's no misunderstanding
16082 :
16083 \end_layout
16084
16085 \begin_layout Standard
16086 \begin_inset VSpace bigskip
16087 \end_inset
16088
16089
16090 \end_layout
16091
16092 \begin_layout Standard
16093 \align center
16094
16095 \size large
16096 This section documents the class 
16097 \begin_inset Quotes eld
16098 \end_inset
16099
16100
16101 \family sans
16102 slides (default)
16103 \family default
16104
16105 \begin_inset Quotes erd
16106 \end_inset
16107
16108  
16109 \emph on
16110 only.
16111 \end_layout
16112
16113 \begin_layout Standard
16114 \begin_inset VSpace bigskip
16115 \end_inset
16116
16117
16118 \end_layout
16119
16120 \begin_layout Standard
16121 If you're looking for the documentation for 
16122 \begin_inset Quotes eld
16123 \end_inset
16124
16125
16126 \family sans
16127 slides (FoilTeX)
16128 \family default
16129
16130 \begin_inset Quotes erd
16131 \end_inset
16132
16133 , check out section
16134 \begin_inset space ~
16135 \end_inset
16136
16137
16138 \begin_inset CommandInset ref
16139 LatexCommand ref
16140 reference "sec:foiltex"
16141
16142 \end_inset
16143
16144 .
16145  The 
16146 \family sans
16147 foils
16148 \family default
16149  class [
16150 \begin_inset Quotes eld
16151 \end_inset
16152
16153
16154 \family sans
16155 slides (FoilTeX)
16156 \family default
16157
16158 \begin_inset Quotes erd
16159 \end_inset
16160
16161 ] is actually somewhat better than the default 
16162 \family sans
16163 slides
16164 \family default
16165  class,
16166 \begin_inset Foot
16167 status collapsed
16168
16169 \begin_layout Plain Layout
16170 \SpecialChar \ldots{}
16171 or so I've been told repeatedly by its advocates.
16172  Having never used it, I have no idea if this claim is true or not.
16173 \end_layout
16174
16175 \end_inset
16176
16177  which this section documents.
16178 \end_layout
16179
16180 \begin_layout Standard
16181 This class is the LaTeX2e improvement of the old 
16182 \noun on
16183 SliTeX
16184 \noun default
16185  package.
16186  Every LaTeX2e distribution includes this class [which I'll just refer to
16187  as 
16188 \begin_inset Quotes eld
16189 \end_inset
16190
16191
16192 \family sans
16193 slides
16194 \family default
16195
16196 \begin_inset Quotes erd
16197 \end_inset
16198
16199  from now on], so you're bound to have it.
16200  As I noted earlier, there are other classes, such as 
16201 \family sans
16202 foils
16203 \family default
16204 , which also produce slides for overhead projectors and do a better job
16205  at it.
16206  However, there are some things which 
16207 \family sans
16208 slides
16209 \family default
16210  can do which the others can't, such as generate overlays.
16211  Read on to learn more!
16212 \end_layout
16213
16214 \begin_layout Subsection
16215 Getting Started
16216 \begin_inset CommandInset label
16217 LatexCommand label
16218 name "sec:slidesetup"
16219
16220 \end_inset
16221
16222
16223 \end_layout
16224
16225 \begin_layout Standard
16226 Obviously, to use this document class, you need to select 
16227 \begin_inset Quotes eld
16228 \end_inset
16229
16230
16231 \family sans
16232 slides (default)
16233 \family default
16234
16235 \begin_inset Quotes erd
16236 \end_inset
16237
16238  from the class list in the 
16239 \family sans
16240 Document\SpecialChar \menuseparator
16241 Settings
16242 \family default
16243  dialog.
16244  There are some other special things you should know about this class:
16245 \end_layout
16246
16247 \begin_layout Itemize
16248 Don't bother changing the options 
16249 \family sans
16250 Sides and Columns
16251 \family default
16252 .
16253  They're not supported by the 
16254 \family sans
16255 slides
16256 \family default
16257  class, anyways.
16258 \end_layout
16259
16260 \begin_layout Itemize
16261 The option 
16262 \family sans
16263 Page
16264 \begin_inset space ~
16265 \end_inset
16266
16267 style
16268 \family default
16269  behaves a bit differently for this class.
16270  The possible choices and what they do are as follows:
16271 \end_layout
16272
16273 \begin_deeper
16274 \begin_layout Description
16275
16276 \family sans
16277 plain
16278 \family default
16279  The final output contains page numbers in the lower right corner.
16280 \end_layout
16281
16282 \begin_layout Description
16283
16284 \family sans
16285 headings
16286 \family default
16287  Like 
16288 \family sans
16289 plain
16290 \family default
16291 , but also prints out any time markers you've put in.
16292  This is the default.
16293 \end_layout
16294
16295 \begin_layout Description
16296
16297 \family sans
16298 empty
16299 \family default
16300  The final output contains no page numbers, time markers, or alignment markers.
16301 \end_layout
16302
16303 \end_deeper
16304 \begin_layout Itemize
16305 The 
16306 \family sans
16307 slides
16308 \family default
16309  class has an extra option: 
16310 \family typewriter
16311 clock
16312 \family default
16313 .
16314  To use it, put 
16315 \begin_inset Quotes eld
16316 \end_inset
16317
16318
16319 \family typewriter
16320 clock
16321 \family default
16322
16323 \begin_inset Quotes erd
16324 \end_inset
16325
16326  in the extra class options.
16327 \end_layout
16328
16329 \begin_deeper
16330 \begin_layout Standard
16331 Using this options allows you to add time markers to 
16332 \family sans
16333 Note
16334 \family default
16335 s.
16336  See section
16337 \begin_inset space ~
16338 \end_inset
16339
16340
16341 \begin_inset CommandInset ref
16342 LatexCommand ref
16343 reference "sec:slideNote"
16344
16345 \end_inset
16346
16347  for more details.
16348 \end_layout
16349
16350 \end_deeper
16351 \begin_layout Standard
16352 You can also use the template file 
16353 \begin_inset Quotes eld
16354 \end_inset
16355
16356
16357 \family typewriter
16358 slides.lyx
16359 \family default
16360
16361 \begin_inset Quotes erd
16362 \end_inset
16363
16364  to automatically set up a document to use the 
16365 \family sans
16366 slides
16367 \family default
16368  class [using 
16369 \family sans
16370 File\SpecialChar \menuseparator
16371 New
16372 \begin_inset space ~
16373 \end_inset
16374
16375 from
16376 \begin_inset space ~
16377 \end_inset
16378
16379 Template
16380 \family default
16381  to open your new document].
16382  The template file also contains some examples of the special paragraph
16383  environments used by this class.
16384  I'll describe those next.
16385 \end_layout
16386
16387 \begin_layout Subsection
16388 Paragraph Environments
16389 \end_layout
16390
16391 \begin_layout Subsubsection
16392 Supported Environments
16393 \end_layout
16394
16395 \begin_layout Standard
16396 The first thing you'll notice when you start up a new 
16397 \family sans
16398 slides
16399 \family default
16400  document is the font size and type: it's the equivalent of the size 
16401 \begin_inset Quotes eld
16402 \end_inset
16403
16404
16405 \family sans
16406 Largest
16407 \family default
16408
16409 \begin_inset Quotes erd
16410 \end_inset
16411
16412  in the 
16413 \family sans
16414 Sans
16415 \begin_inset space ~
16416 \end_inset
16417
16418 Serif
16419 \family default
16420  font.
16421  This is also what's used in the output.
16422  Think of this as a 
16423 \begin_inset Quotes eld
16424 \end_inset
16425
16426 visual cue
16427 \begin_inset Quotes erd
16428 \end_inset
16429
16430  to remind you that this is a slide.
16431  Your final slides will use a larger font; ergo, you'll have less space.
16432  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16433 \end_layout
16434
16435 \begin_layout Standard
16436 The next thing that becomes obvious is the changes to the paragraph environment
16437  pull-down box [at the far-left end of the toolbar].
16438  Most of the paragraph environments you're used to seeing are missing.
16439  There are also five new ones.
16440  That's because the 
16441 \family sans
16442 slides
16443 \family default
16444  class itself only supports certain paragraph environments:
16445 \end_layout
16446
16447 \begin_layout Itemize
16448
16449 \family sans
16450 Standard
16451 \end_layout
16452
16453 \begin_layout Itemize
16454
16455 \family sans
16456 Itemize
16457 \end_layout
16458
16459 \begin_layout Itemize
16460
16461 \family sans
16462 Enumerate
16463 \end_layout
16464
16465 \begin_layout Itemize
16466
16467 \family sans
16468 Description
16469 \end_layout
16470
16471 \begin_layout Itemize
16472
16473 \family sans
16474 List
16475 \end_layout
16476
16477 \begin_layout Itemize
16478
16479 \family sans
16480 Quotation
16481 \end_layout
16482
16483 \begin_layout Itemize
16484
16485 \family sans
16486 Quote
16487 \end_layout
16488
16489 \begin_layout Itemize
16490
16491 \family sans
16492 Verse
16493 \end_layout
16494
16495 \begin_layout Itemize
16496
16497 \family sans
16498 Caption
16499 \end_layout
16500
16501 \begin_layout Itemize
16502
16503 \family sans
16504 LyX-Code
16505 \end_layout
16506
16507 \begin_layout Itemize
16508
16509 \family sans
16510 Comment
16511 \end_layout
16512
16513 \begin_layout Standard
16514 All of the other standard environments, including the section-heading environmen
16515 ts, aren't used in the 
16516 \family sans
16517 slides
16518 \family default
16519  class.
16520 \end_layout
16521
16522 \begin_layout Standard
16523 On the other hand, you'll notice the following new environments:
16524 \end_layout
16525
16526 \begin_layout Itemize
16527
16528 \family sans
16529 Slide
16530 \end_layout
16531
16532 \begin_layout Itemize
16533
16534 \family sans
16535 Overlay
16536 \end_layout
16537
16538 \begin_layout Itemize
16539
16540 \family sans
16541 Note
16542 \end_layout
16543
16544 \begin_layout Itemize
16545
16546 \family sans
16547 InvisibleText
16548 \end_layout
16549
16550 \begin_layout Itemize
16551
16552 \family sans
16553 VisibleText
16554 \end_layout
16555
16556 \begin_layout Standard
16557 These five are kind of quirky, due to a 
16558 \begin_inset Quotes eld
16559 \end_inset
16560
16561 feature
16562 \begin_inset Quotes erd
16563 \end_inset
16564
16565  in LyX.
16566  You see, LyX doesn't permit you to nest any other paragraph environment
16567  into an empty environment.
16568  Now, that's fine and dandy, but it means that you wouldn't be able to start
16569  a slide with anything except plain text.
16570  To deal with this, I've performed a little 
16571 \begin_inset Quotes eld
16572 \end_inset
16573
16574 LaTeX magic.
16575 \begin_inset Quotes erd
16576 \end_inset
16577
16578  
16579 \end_layout
16580
16581 \begin_layout Subsubsection
16582 Quirks of the New Environments
16583 \begin_inset CommandInset label
16584 LatexCommand label
16585 name "sec:slideQuirk"
16586
16587 \end_inset
16588
16589
16590 \end_layout
16591
16592 \begin_layout Standard
16593 All five of the new paragraph environments are somewhat quirky due to inherent
16594  limitiations in the current version of LyX.
16595  As I just mentioned, LyX forbids environments that begin with another environme
16596 nt.
16597  To get around this, the 
16598 \family sans
16599 Slide
16600 \family default
16601  environment isn't a paragraph environment as described in the 
16602 \emph on
16603 User's Guide
16604 \emph default
16605 .
16606  
16607 \end_layout
16608
16609 \begin_layout Standard
16610 You should consider 
16611 \family sans
16612 Slide
16613 \family default
16614
16615 \family sans
16616 Overlay
16617 \family default
16618 , and 
16619 \family sans
16620 Note
16621 \family default
16622  to be 
16623 \begin_inset Quotes eld
16624 \end_inset
16625
16626 pseudo-environments.
16627 \begin_inset Quotes erd
16628 \end_inset
16629
16630  They look like a section heading or a 
16631 \begin_inset Quotes eld
16632 \end_inset
16633
16634
16635 \family sans
16636 Caption
16637 \family default
16638 ,
16639 \begin_inset Quotes erd
16640 \end_inset
16641
16642  but really begin a [and, if necessary, end the previous] paragraph environment.
16643  Likewise, treat 
16644 \family sans
16645 InvisibleText
16646 \family default
16647  and 
16648 \family sans
16649 VisibleText
16650 \family default
16651  as 
16652 \begin_inset Quotes eld
16653 \end_inset
16654
16655 pseudo-commands.
16656 \begin_inset Quotes erd
16657 \end_inset
16658
16659  These two perform some action.
16660 \end_layout
16661
16662 \begin_layout Standard
16663 A common feature of all five environments, 
16664 \family sans
16665 Slide
16666 \family default
16667
16668 \family sans
16669 Overlay
16670 \family default
16671
16672 \family sans
16673 Note
16674 \family default
16675
16676 \family sans
16677 InvisibleText
16678 \family default
16679  and 
16680 \family sans
16681 VisibleText
16682 \family default
16683 , is a rather long-ish label.
16684  The text following this label — ordinarily the contents of the paragraph
16685  environment — is utterly irrelevant for 
16686 \family sans
16687 Slide
16688 \family default
16689
16690 \family sans
16691 Overlay
16692 \family default
16693
16694 \family sans
16695 Note
16696 \family default
16697
16698 \family sans
16699 InvisibleText
16700 \family default
16701  and 
16702 \family sans
16703 VisibleText
16704 \family default
16705 .
16706  LyX completely ignores it.
16707  In fact, you can leave these five environments completely empty.
16708  
16709 \end_layout
16710
16711 \begin_layout Standard
16712 While you don't 
16713 \emph on
16714 have
16715 \emph default
16716  to put any text after the rather long-ish label, you might want to.
16717  This could be a short description of the contents of the 
16718 \family sans
16719 Slide
16720 \family default
16721 , for example.
16722  In that case, enter your descriptive comment and hit 
16723 \family sans
16724 Return
16725 \family default
16726  as you normally would.
16727 \end_layout
16728
16729 \begin_layout Standard
16730 If, on the other hand, you don't want to enter any descriptive text, you'll
16731  hit another LyX quirk.
16732  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16733  environment until you put something in the old one.
16734  So, do this:
16735 \end_layout
16736
16737 \begin_layout Itemize
16738 Start entering the text that will 
16739 \emph on
16740 follow
16741 \emph default
16742  the new 
16743 \family sans
16744 Slide
16745 \family default
16746
16747 \family sans
16748 Overlay
16749 \family default
16750
16751 \family sans
16752 Note
16753 \family default
16754
16755 \family sans
16756 InvisibleText
16757 \family default
16758  or 
16759 \family sans
16760 VisibleText
16761 \family default
16762 .
16763  
16764 \end_layout
16765
16766 \begin_layout Itemize
16767 Now move to the beginning of that paragraph.
16768  
16769 \end_layout
16770
16771 \begin_layout Itemize
16772 Next, hit 
16773 \family sans
16774 Return
16775 \family default
16776 .
16777  
16778 \end_layout
16779
16780 \begin_layout Itemize
16781 Finally, change this new, empty paragraph to a 
16782 \family sans
16783 Slide
16784 \family default
16785
16786 \family sans
16787 Overlay
16788 \family default
16789
16790 \family sans
16791 Note
16792 \family default
16793
16794 \family sans
16795 InvisibleText
16796 \family default
16797  or 
16798 \family sans
16799 VisibleText
16800 \family default
16801 .
16802  
16803 \end_layout
16804
16805 \begin_layout Standard
16806 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16807
16808 \end_layout
16809
16810 \begin_layout Subsection
16811 Making a Presentation with 
16812 \family sans
16813 Slide
16814 \family default
16815
16816 \family sans
16817 Overlay
16818 \family default
16819  and 
16820 \family sans
16821 Note
16822 \end_layout
16823
16824 \begin_layout Subsubsection
16825 Using the 
16826 \family sans
16827 Slide
16828 \family default
16829  Environment
16830 \end_layout
16831
16832 \begin_layout Standard
16833 If you're expecting this section to teach you how to actually make a presentatio
16834 n, you'll be sorely disappointed.
16835  Naturally, I'll describe all of the ways the 
16836 \family sans
16837 slides
16838 \family default
16839  class can assist you in preparing the materials for a presentation.
16840  Filling in the contents, however, is up to you.
16841  [Then again, that 
16842 \emph on
16843 is
16844 \emph default
16845  the LyX philosophy.]
16846 \end_layout
16847
16848 \begin_layout Standard
16849 Choosing the 
16850 \family sans
16851 Slide
16852 \family default
16853  environment [in the manner described in section
16854 \begin_inset space ~
16855 \end_inset
16856
16857
16858 \begin_inset CommandInset ref
16859 LatexCommand ref
16860 reference "sec:slideQuirk"
16861
16862 \end_inset
16863
16864 ] tells LyX to begin a new slide [duh].
16865  The label for this environment/
16866 \begin_inset Quotes erd
16867 \end_inset
16868
16869 pseudo-command
16870 \begin_inset Quotes erd
16871 \end_inset
16872
16873  is an 
16874 \begin_inset Quotes eld
16875 \end_inset
16876
16877 ASCII line,
16878 \begin_inset Quotes erd
16879 \end_inset
16880
16881  in cool blue, followed by the label, 
16882 \begin_inset Quotes eld
16883 \end_inset
16884
16885 NewSlide:
16886 \begin_inset Quotes erd
16887 \end_inset
16888
16889 .
16890  Any text or paragraph environments that follow this one go on the new slide.
16891  It's that simple.
16892 \end_layout
16893
16894 \begin_layout Standard
16895 Slides are probably the only time you'll need to forcibly end pages in LyX
16896  (this can be specified in the 
16897 \family sans
16898 Paragraph Layout
16899 \family default
16900  dialog).
16901  In fact, you'll want to, once you finish entering the contents of one slide.
16902  If you've entered more text than can physically fit on a slide, the extra
16903  overflows onto a new slide.
16904  I don't recommend doing this, however, since the overflow slide won't have
16905  any page number on it.
16906  Furthermore, it may interfere with any 
16907 \family sans
16908 Overlay
16909 \family default
16910  you've made to accompany the oversized 
16911 \family sans
16912 Slide
16913 \family default
16914 .
16915 \end_layout
16916
16917 \begin_layout Standard
16918 The 
16919 \family sans
16920 Overlay
16921 \family default
16922  and 
16923 \family sans
16924 Note
16925 \family default
16926  environments work the same way as the 
16927 \family sans
16928 Slide
16929 \family default
16930  environment.
16931  They both create an 
16932 \begin_inset Quotes eld
16933 \end_inset
16934
16935 ASCII line
16936 \begin_inset Quotes erd
16937 \end_inset
16938
16939  followed by a label [
16940 \begin_inset Quotes eld
16941 \end_inset
16942
16943 NewOverlay:
16944 \begin_inset Quotes erd
16945 \end_inset
16946
16947  and 
16948 \begin_inset Quotes eld
16949 \end_inset
16950
16951 NewNote:
16952 \begin_inset Quotes erd
16953 \end_inset
16954
16955 , respectively].
16956  The color is a stunning magenta instead of blue, and the 
16957 \begin_inset Quotes eld
16958 \end_inset
16959
16960 ASCII line
16961 \begin_inset Quotes erd
16962 \end_inset
16963
16964  will look different, in style and in length.
16965  The label fonts of all three also differ from one another.
16966 \end_layout
16967
16968 \begin_layout Standard
16969 As with a 
16970 \family sans
16971 Slide
16972 \family default
16973 , if the contents of a 
16974 \family sans
16975 Note
16976 \family default
16977  or 
16978 \family sans
16979 Overlay
16980 \family default
16981  exceed the physical size of a slide or sheet of paper, the extra will overflow
16982  onto a new sheet.
16983  Again, you should avoid this.
16984  It defeats the whole purpose of 
16985 \family sans
16986 Note
16987 \family default
16988 s and 
16989 \family sans
16990 Overlay
16991 \family default
16992 s.
16993 \end_layout
16994
16995 \begin_layout Subsubsection
16996 Using 
16997 \family sans
16998 Overlay
16999 \family default
17000  with 
17001 \family sans
17002 Slide
17003 \end_layout
17004
17005 \begin_layout Standard
17006 The idea behind an 
17007 \family sans
17008 Overlay
17009 \family default
17010  is a slide that sits atop another slide.
17011  Perhaps you wish to discuss a figure on the main 
17012 \family sans
17013 Slide
17014 \family default
17015  before displaying the text associated with it.
17016  One way to accomplish this is tape a flap of dark paper over the part of
17017  the 
17018 \family sans
17019 Slide
17020 \family default
17021  you want to display later.
17022  This method fails, however, if you wish to overlap one graph with another,
17023  for example.
17024  You would then have to fumble while speaking to align the two separate,
17025  overlapping 
17026 \family sans
17027 Slide
17028 \family default
17029 s to align the two graphs.
17030  The use of an 
17031 \family sans
17032 Overlay
17033 \family default
17034  environment in both cases makes life much easier.
17035 \end_layout
17036
17037 \begin_layout Standard
17038 Each 
17039 \family sans
17040 Overlay
17041 \family default
17042  receives the page number of its 
17043 \begin_inset Quotes eld
17044 \end_inset
17045
17046 parent
17047 \begin_inset Quotes erd
17048 \end_inset
17049
17050  
17051 \family sans
17052 Slide
17053 \family default
17054 , appended by 
17055 \begin_inset Quotes eld
17056 \end_inset
17057
17058
17059 \family typewriter
17060 -a
17061 \family default
17062
17063 \begin_inset Quotes erd
17064 \end_inset
17065
17066 .
17067 \begin_inset Foot
17068 status collapsed
17069
17070 \begin_layout Plain Layout
17071 Presumably, mutliple 
17072 \family sans
17073 Overlay
17074 \family default
17075 s would have 
17076 \begin_inset Quotes eld
17077 \end_inset
17078
17079
17080 \family typewriter
17081 -a
17082 \family default
17083
17084 \begin_inset Quotes erd
17085 \end_inset
17086
17087
17088 \begin_inset Quotes eld
17089 \end_inset
17090
17091
17092 \family typewriter
17093 -b
17094 \family default
17095
17096 \begin_inset Quotes erd
17097 \end_inset
17098
17099
17100 \begin_inset Quotes eld
17101 \end_inset
17102
17103
17104 \family typewriter
17105 -c
17106 \family default
17107
17108 \begin_inset Quotes erd
17109 \end_inset
17110
17111 , etc.
17112 \begin_inset space ~
17113 \end_inset
17114
17115 appended to the page number of the parent 
17116 \family sans
17117 Slide
17118 \family default
17119 .
17120  
17121 \end_layout
17122
17123 \end_inset
17124
17125  Clearly, you want the contents of both the 
17126 \family sans
17127 Slide
17128 \family default
17129  and the 
17130 \family sans
17131 Overlay
17132 \family default
17133  to each fit on a single physical slide! You should probably consider an
17134  
17135 \family sans
17136 Overlay
17137 \family default
17138  as 
17139 \begin_inset Quotes eld
17140 \end_inset
17141
17142 part of
17143 \begin_inset Quotes erd
17144 \end_inset
17145
17146  a 
17147 \family sans
17148 Slide
17149 \family default
17150 .
17151  Indeed, the LyX 
17152 \family sans
17153 slides
17154 \family default
17155  class provides a visual cue for this: the label at the start of an 
17156 \family sans
17157 Overlay
17158 \family default
17159  is shorter than that at the start of a 
17160 \family sans
17161 Slide
17162 \family default
17163 .
17164  Lastly, when you generate printable output, you'll find alignment markers
17165  in all four corners of both the 
17166 \family sans
17167 Overlay
17168 \family default
17169  page and its parent 
17170 \family sans
17171 Slide
17172 \family default
17173 .
17174  These will assist you in lining up the two physical slides.
17175 \end_layout
17176
17177 \begin_layout Standard
17178 The major problem in overlaying two slides is aligning the contents of the
17179  two transparencies.
17180  How much space should you leave for that graph on the second slide? Worse
17181  still, what if you want a graph and a sentence on second slide, but there
17182  is text on the main transparency that goes in between them? You could try
17183  and insert vertical space of the right size.
17184  The better way is to use 
17185 \family sans
17186 InvisibleText
17187 \family default
17188  and 
17189 \family sans
17190 VisibleText
17191 \family default
17192 .
17193 \end_layout
17194
17195 \begin_layout Standard
17196 As their names imply, 
17197 \family sans
17198 InvisibleText
17199 \family default
17200  and 
17201 \family sans
17202 VisibleText
17203 \family default
17204  are two command-like paragraph environments that make all subsequent text
17205  invisible and visible, respectively.
17206  Note from section
17207 \begin_inset space ~
17208 \end_inset
17209
17210
17211 \begin_inset CommandInset ref
17212 LatexCommand ref
17213 reference "sec:slideQuirk"
17214
17215 \end_inset
17216
17217  that you don't place anything 
17218 \emph on
17219 into
17220 \emph default
17221  these two environments, however.
17222  When you create an 
17223 \family sans
17224 InvisibleText
17225 \family default
17226 , it inserts a centered, sky-blue label into the page reading 
17227 \begin_inset Quotes eld
17228 \end_inset
17229
17230 <Invisible Text Follows>
17231 \begin_inset Quotes erd
17232 \end_inset
17233
17234 .
17235  For paragraphs following this label, the parts of the 
17236 \family sans
17237 Slide
17238 \family default
17239  [or 
17240 \family sans
17241 Overlay
17242 \family default
17243 ; it doesn't matter which] where they would be contain instead blank space.
17244  
17245 \end_layout
17246
17247 \begin_layout Standard
17248 For 
17249 \family sans
17250 VisibleText
17251 \family default
17252 , the corresponding centered label is 
17253 \begin_inset Quotes eld
17254 \end_inset
17255
17256 <Visible Text Follows>
17257 \begin_inset Quotes erd
17258 \end_inset
17259
17260  in blazing green.
17261  Paragraphs following this label behave normally.
17262  Note that the beginning of a new 
17263 \family sans
17264 Slide
17265 \family default
17266
17267 \family sans
17268 Overlay
17269 \family default
17270 , or 
17271 \family sans
17272 Note
17273 \family default
17274  automatically shuts off an 
17275 \family sans
17276 InvisibleText
17277 \family default
17278 .
17279  It's therefore not necessary to use 
17280 \family sans
17281 VisibleText
17282 \family default
17283  at the end of a 
17284 \family sans
17285 Slide
17286 \family default
17287 .
17288 \end_layout
17289
17290 \begin_layout Standard
17291 By now, it should be obvious how to create overlay transparencies using
17292  the proper combination of 
17293 \family sans
17294 InvisibleText
17295 \family default
17296  and 
17297 \family sans
17298 VisibleText
17299 \family default
17300  on a 
17301 \family sans
17302 Slide
17303 \family default
17304  and 
17305 \family sans
17306 Overlay
17307 \family default
17308 :
17309 \end_layout
17310
17311 \begin_layout Enumerate
17312 Create a 
17313 \family sans
17314 Slide
17315 \family default
17316 , including everything that will appear on it, whether on the main slide
17317  or on the 
17318 \family sans
17319 Overlay
17320 \family default
17321 .
17322 \end_layout
17323
17324 \begin_layout Enumerate
17325 Before each figure or paragraph that will appear only on the 
17326 \family sans
17327 Overlay
17328 \family default
17329 , insert an 
17330 \family sans
17331 InvisibleText
17332 \family default
17333  environment.
17334  If necessary, insert a 
17335 \family sans
17336 VisibleText
17337 \family default
17338  environment after the 
17339 \family sans
17340 Overlay
17341 \family default
17342 -only text.
17343 \end_layout
17344
17345 \begin_layout Enumerate
17346 Start an 
17347 \family sans
17348 Overlay
17349 \family default
17350  immediately following the 
17351 \family sans
17352 Slide
17353 \family default
17354 .
17355 \end_layout
17356
17357 \begin_layout Enumerate
17358 Copy the contents of this 
17359 \family sans
17360 Slide
17361 \family default
17362  into the 
17363 \family sans
17364 Overlay
17365 \family default
17366 .
17367 \end_layout
17368
17369 \begin_layout Enumerate
17370 Within the 
17371 \family sans
17372 Overlay
17373 \family default
17374 , change all of the 
17375 \family sans
17376 InvisibleText
17377 \family default
17378  lines to 
17379 \family sans
17380 VisibleText
17381 \family default
17382  and vice-versa.
17383 \end_layout
17384
17385 \begin_layout Standard
17386 That's it.
17387  You've just made an 
17388 \family sans
17389 Overlay
17390 \family default
17391 .
17392 \end_layout
17393
17394 \begin_layout Standard
17395 There's one problem with the way I've designed the LyX 
17396 \family sans
17397 slides
17398 \family default
17399  class: you can't make text in the middle of a paragraph invisible, nor
17400  make text in the middle of an invisible paragraph visible again.
17401  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17402 \begin_inset Foot
17403 status collapsed
17404
17405 \begin_layout Plain Layout
17406 The commands of interest are: 
17407 \end_layout
17408
17409 \begin_layout Itemize
17410
17411 \family typewriter
17412 {
17413 \backslash
17414 invisible \SpecialChar \ldots{}
17415  }
17416 \end_layout
17417
17418 \begin_layout Itemize
17419
17420 \family typewriter
17421 {
17422 \backslash
17423 visible \SpecialChar \ldots{}
17424  }
17425 \end_layout
17426
17427 \begin_layout Plain Layout
17428 \SpecialChar \ldots{}
17429 and need to be marked as TeX.
17430  The text whose 
17431 \begin_inset Quotes eld
17432 \end_inset
17433
17434 visibility
17435 \begin_inset Quotes erd
17436 \end_inset
17437
17438  you wish to change goes in between the brackets [and after the 
17439 \family typewriter
17440
17441 \backslash
17442 invisible
17443 \family default
17444  or 
17445 \family typewriter
17446
17447 \backslash
17448 visible
17449 \family default
17450  command].
17451  If you don't know how to mark text as TeX, see the appropriate section
17452  of the 
17453 \emph on
17454 User's Guide
17455 \emph default
17456 .
17457 \end_layout
17458
17459 \end_inset
17460
17461
17462 \end_layout
17463
17464 \begin_layout Subsubsection
17465 Using 
17466 \family sans
17467 Note
17468 \family default
17469  with 
17470 \family sans
17471 Slide
17472 \family default
17473
17474 \begin_inset CommandInset label
17475 LatexCommand label
17476 name "sec:slideNote"
17477
17478 \end_inset
17479
17480
17481 \end_layout
17482
17483 \begin_layout Standard
17484 Like an 
17485 \family sans
17486 Overlay
17487 \family default
17488 , a 
17489 \family sans
17490 Note
17491 \family default
17492  is associated with a 
17493 \begin_inset Quotes eld
17494 \end_inset
17495
17496 parent
17497 \begin_inset Quotes erd
17498 \end_inset
17499
17500  
17501 \family sans
17502 Slide
17503 \family default
17504 .
17505  Here, too, the LyX 
17506 \family sans
17507 slides
17508 \family default
17509  class provides visual cues.
17510  The label for a 
17511 \family sans
17512 Note
17513 \family default
17514  is shorter than that of a 
17515 \family sans
17516 Slide
17517 \family default
17518  [yet longer than that of an 
17519 \family sans
17520 Overlay
17521 \family default
17522 ] and, like the label of an 
17523 \family sans
17524 Overlay
17525 \family default
17526  is shockingly magenta.
17527  Additionally, the printed 
17528 \family sans
17529 Note
17530 \family default
17531  has the page number of its 
17532 \begin_inset Quotes eld
17533 \end_inset
17534
17535 parent
17536 \begin_inset Quotes erd
17537 \end_inset
17538
17539  
17540 \family sans
17541 Slide
17542 \family default
17543 , appended by 
17544 \begin_inset Quotes eld
17545 \end_inset
17546
17547
17548 \family typewriter
17549 -
17550 \family default
17551 1
17552 \begin_inset Quotes erd
17553 \end_inset
17554
17555
17556 \begin_inset Quotes eld
17557 \end_inset
17558
17559
17560 \family typewriter
17561 -
17562 \family default
17563 2
17564 \begin_inset Quotes erd
17565 \end_inset
17566
17567
17568 \begin_inset Quotes eld
17569 \end_inset
17570
17571
17572 \family typewriter
17573 -
17574 \family default
17575 3
17576 \begin_inset Quotes erd
17577 \end_inset
17578
17579 , etc.
17580  You can have multiple 
17581 \family sans
17582 Note
17583 \family default
17584 s associated with a single 
17585 \family sans
17586 Slide
17587 \family default
17588 , and, as with 
17589 \family sans
17590 Slide
17591 \family default
17592  and 
17593 \family sans
17594 Overlay
17595 \family default
17596 , you'll probably want to break up long 
17597 \family sans
17598 Note
17599 \family default
17600 s so that they fit on a single sheet of paper.
17601 \end_layout
17602
17603 \begin_layout Standard
17604 The purpose of a 
17605 \family sans
17606 Note
17607 \family default
17608  is obvious: it contains anything additional you might want to say about
17609  a 
17610 \family sans
17611 Slide
17612 \family default
17613 .
17614  It could also be used as a sheet of reminders for a particular 
17615 \family sans
17616 Slide
17617 \family default
17618 .
17619  In the case of the latter, you might want to make use of time markers.
17620  Currently, the LyX 
17621 \family sans
17622 slides
17623 \family default
17624  class has no 
17625 \begin_inset Quotes eld
17626 \end_inset
17627
17628 native
17629 \begin_inset Quotes erd
17630 \end_inset
17631
17632  support for time markers, a 
17633 \noun on
17634 SliTeX
17635 \noun default
17636  feature.
17637  So, you'll have to resort to using the LaTeX codes.
17638 \end_layout
17639
17640 \begin_layout Standard
17641 To use time markers, you'll need to specify the extra class option 
17642 \begin_inset Quotes eld
17643 \end_inset
17644
17645
17646 \family typewriter
17647 clock
17648 \family default
17649
17650 \begin_inset Quotes erd
17651 \end_inset
17652
17653  [see section
17654 \begin_inset space ~
17655 \end_inset
17656
17657
17658 \begin_inset CommandInset ref
17659 LatexCommand ref
17660 reference "sec:slidesetup"
17661
17662 \end_inset
17663
17664 ].
17665  This option turns on timing marks, which will appear in the lower-left-hand
17666  corner of every 
17667 \family sans
17668 Note
17669 \family default
17670  you generate.
17671  To set what appears in the time marker, you use the LaTeX commands 
17672 \begin_inset Quotes eld
17673 \end_inset
17674
17675
17676 \family typewriter
17677
17678 \backslash
17679 settime{}
17680 \family default
17681
17682 \begin_inset Quotes erd
17683 \end_inset
17684
17685  and 
17686 \begin_inset Quotes eld
17687 \end_inset
17688
17689
17690 \family typewriter
17691
17692 \backslash
17693 addtime{}
17694 \family default
17695
17696 \begin_inset Quotes erd
17697 \end_inset
17698
17699 .
17700  The arguments of both commands are time measured in seconds.
17701  
17702 \begin_inset Quotes eld
17703 \end_inset
17704
17705
17706 \family typewriter
17707
17708 \backslash
17709 settime{}
17710 \family default
17711
17712 \begin_inset Quotes erd
17713 \end_inset
17714
17715  sets the time marker to a given time.
17716  
17717 \begin_inset Quotes eld
17718 \end_inset
17719
17720
17721 \family typewriter
17722
17723 \backslash
17724 addtime{}
17725 \family default
17726
17727 \begin_inset Quotes erd
17728 \end_inset
17729
17730  increments the time marker by the specified amount.
17731  Using time markers and 
17732 \family sans
17733 Note
17734 \family default
17735 s in this fashion, you can remind yourself how much time to spend on a particula
17736
17737 \family sans
17738 Slide
17739 \family default
17740 .
17741 \end_layout
17742
17743 \begin_layout Standard
17744 There's one last feature to describe.
17745  Clearly, you'd like to print out all of your 
17746 \family sans
17747 Slide
17748 \family default
17749 s and 
17750 \family sans
17751 Overlay
17752 \family default
17753 s on transparencies while printing all of your 
17754 \family sans
17755 Note
17756 \family default
17757 s on plain paper.
17758  However, a 
17759 \family sans
17760 Note
17761 \family default
17762  
17763 \emph on
17764 must
17765 \emph default
17766  follow the 
17767 \family sans
17768 Slide
17769 \family default
17770  with which it is associated.
17771  What's a person to do?
17772 \end_layout
17773
17774 \begin_layout Standard
17775 Luckily, there are two LaTeX commands that allow you to select what to print
17776  out.
17777  Both must be placed into the preamble of your document.
17778  The command 
17779 \begin_inset Quotes eld
17780 \end_inset
17781
17782
17783 \family typewriter
17784
17785 \backslash
17786 onlyslides{
17787 \backslash
17788 slides}
17789 \family default
17790
17791 \begin_inset Quotes erd
17792 \end_inset
17793
17794  will cause the output to contain only the 
17795 \family sans
17796 Slide
17797 \family default
17798 s and 
17799 \family sans
17800 Overlay
17801 \family default
17802 s.
17803  Correspondingly, the command 
17804 \begin_inset Quotes eld
17805 \end_inset
17806
17807
17808 \family typewriter
17809
17810 \backslash
17811 onlynotes{
17812 \backslash
17813 notes}
17814 \family default
17815
17816 \begin_inset Quotes erd
17817 \end_inset
17818
17819  prevents the output of anything but 
17820 \family sans
17821 Note
17822 \family default
17823 s.
17824  I'd advise placing both commands in the preamble and initially comment
17825  both out.
17826  You can then preview your entire presentation as you write.
17827  When you're done writing, you can then uncomment one of the two to select
17828  what you want to print.
17829  I like to uncomment 
17830 \begin_inset Quotes eld
17831 \end_inset
17832
17833
17834 \family typewriter
17835
17836 \backslash
17837 onlyslides{
17838 \backslash
17839 slides}
17840 \family default
17841
17842 \begin_inset Quotes erd
17843 \end_inset
17844
17845  , print to a file with 
17846 \begin_inset Quotes eld
17847 \end_inset
17848
17849
17850 \family typewriter
17851 -slides
17852 \family default
17853
17854 \begin_inset Quotes erd
17855 \end_inset
17856
17857  in its name, comment it back out, then uncomment 
17858 \begin_inset Quotes eld
17859 \end_inset
17860
17861
17862 \family typewriter
17863
17864 \backslash
17865 onlynotes{
17866 \backslash
17867 notes}
17868 \family default
17869
17870 \begin_inset Quotes erd
17871 \end_inset
17872
17873  and print to a 
17874 \begin_inset Quotes eld
17875 \end_inset
17876
17877
17878 \family typewriter
17879 *-notes.ps
17880 \family default
17881
17882 \begin_inset Quotes erd
17883 \end_inset
17884
17885  file.
17886  I can then send either file to a printer, loading transparencies or plain
17887  paper as appropriate.
17888 \end_layout
17889
17890 \begin_layout Standard
17891 You can also provide other arguments to the 
17892 \begin_inset Quotes eld
17893 \end_inset
17894
17895
17896 \family typewriter
17897
17898 \backslash
17899 onlyslides{}
17900 \family default
17901
17902 \begin_inset Quotes erd
17903 \end_inset
17904
17905  and 
17906 \begin_inset Quotes eld
17907 \end_inset
17908
17909
17910 \family typewriter
17911
17912 \backslash
17913 onlynotes{}
17914 \family default
17915
17916 \begin_inset Quotes erd
17917 \end_inset
17918
17919  commands.
17920  See a good LaTeX book for details.
17921 \end_layout
17922
17923 \begin_layout Subsection
17924 The 
17925 \family sans
17926 slides
17927 \family default
17928  Class Template File
17929 \end_layout
17930
17931 \begin_layout Standard
17932 I have also provided a template file, 
17933 \begin_inset Quotes eld
17934 \end_inset
17935
17936
17937 \family typewriter
17938 slides.lyx
17939 \family default
17940
17941 \begin_inset Quotes erd
17942 \end_inset
17943
17944 , with the 
17945 \family sans
17946 slides
17947 \family default
17948  class.
17949  To use it, begin your new presentation with 
17950 \family sans
17951 \bar under
17952 F
17953 \bar default
17954 ile\SpecialChar \menuseparator
17955 New
17956 \begin_inset space ~
17957 \end_inset
17958
17959 from
17960 \begin_inset space ~
17961 \end_inset
17962
17963
17964 \bar under
17965 T
17966 \bar default
17967 emplate
17968 \family default
17969 .
17970  Your new LyX presentation file will contain an example 
17971 \family sans
17972 Slide
17973 \family default
17974  – 
17975 \family sans
17976 Overlay
17977 \family default
17978  – 
17979 \family sans
17980 Note
17981 \family default
17982  triplet.
17983  The 
17984 \family sans
17985 Slide
17986 \family default
17987  and 
17988 \family sans
17989 Overlay
17990 \family default
17991  additionally contain an example of the use of 
17992 \family sans
17993 InvisibleText
17994 \family default
17995  and 
17996 \family sans
17997 VisibleText
17998 \family default
17999 .
18000  Lastly, the preamble will contain:
18001 \end_layout
18002
18003 \begin_layout LyX-Code
18004 % Uncomment to print out only slides and overlays
18005 \end_layout
18006
18007 \begin_layout LyX-Code
18008 %
18009 \end_layout
18010
18011 \begin_layout LyX-Code
18012 %
18013 \backslash
18014 onlyslides{
18015 \backslash
18016 slides}
18017 \begin_inset Newline newline
18018 \end_inset
18019
18020  
18021 \end_layout
18022
18023 \begin_layout LyX-Code
18024 % Uncomment to print out only notes
18025 \end_layout
18026
18027 \begin_layout LyX-Code
18028 %
18029 \end_layout
18030
18031 \begin_layout LyX-Code
18032 %
18033 \backslash
18034 onlynotes{
18035 \backslash
18036 notes}
18037 \end_layout
18038
18039 \begin_layout Standard
18040 One final thing: I created this class to support the LaTeX2e 
18041 \begin_inset Quotes eld
18042 \end_inset
18043
18044
18045 \noun on
18046 SliTeX
18047 \noun default
18048  emulation
18049 \begin_inset Quotes erd
18050 \end_inset
18051
18052  class, one of the built-in LaTeX2e classes.
18053  Neither I nor the rest of the LyX Team endorse or oppose the use of this
18054  built-in slide class.
18055  It's here if you want it or need it.
18056  There exist other LaTeX2e classes for creating presentations, such as the
18057  
18058 \family sans
18059 Foils
18060 \family default
18061  class [see section
18062 \begin_inset space ~
18063 \end_inset
18064
18065
18066 \begin_inset CommandInset ref
18067 LatexCommand ref
18068 reference "sec:foiltex"
18069
18070 \end_inset
18071
18072 ] or the 
18073 \begin_inset Quotes eld
18074 \end_inset
18075
18076
18077 \family typewriter
18078 seminar
18079 \family default
18080
18081 \begin_inset Quotes erd
18082 \end_inset
18083
18084  package [present on some TeX distributions].
18085  The latter is not yet supported under LyX.
18086 \begin_inset Foot
18087 status collapsed
18088
18089 \begin_layout Plain Layout
18090 Perhaps you can take on the task\SpecialChar \ldots{}
18091
18092 \end_layout
18093
18094 \end_inset
18095
18096  I know nothing about these other classes.
18097  Try them out to see what sort of alternative they provide.
18098 \end_layout
18099
18100 \begin_layout Chapter
18101 LyX Features needing Extra Software
18102 \end_layout
18103
18104 \begin_layout Section
18105 Checking TeX
18106 \end_layout
18107
18108 \begin_layout Standard
18109 by 
18110 \noun on
18111 Asger Alstrup
18112 \end_layout
18113
18114 \begin_layout Subsection
18115 Introduction
18116 \end_layout
18117
18118 \begin_layout Standard
18119 If you have the 
18120 \family typewriter
18121 chktex
18122 \family default
18123  program installed
18124 \begin_inset Foot
18125 status collapsed
18126
18127 \begin_layout Plain Layout
18128
18129 \family typewriter
18130 chktex
18131 \family default
18132  is not yet available when you are using the LaTeX distribution MiKTeX.
18133 \end_layout
18134
18135 \end_inset
18136
18137 , you'll find in the 
18138 \family sans
18139 Tools
18140 \family default
18141  menu the entry: 
18142 \family sans
18143 Check
18144 \begin_inset space ~
18145 \end_inset
18146
18147 TeX
18148 \family default
18149 .
18150  You can get 
18151 \family typewriter
18152 chktex
18153 \family default
18154  it from CTAN, 
18155 \begin_inset CommandInset href
18156 LatexCommand href
18157 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18158
18159 \end_inset
18160
18161 .
18162 \end_layout
18163
18164 \begin_layout Standard
18165 The 
18166 \family sans
18167 ChkTeX
18168 \family default
18169  package is a program that was written by 
18170 \begin_inset Flex Noun
18171 status collapsed
18172
18173 \begin_layout Plain Layout
18174 Jens T.
18175 \begin_inset space ~
18176 \end_inset
18177
18178 Berger Thielemann
18179 \end_layout
18180
18181 \end_inset
18182
18183  in frustration because some constructs in LaTeX are sometimes non-intuitive,
18184  and easy to forget.
18185  The program runs over your LaTeX file, checks the integrity of the file,
18186  and flags some common errors.
18187  In other technical words, it is 
18188 \family typewriter
18189 lint
18190 \family default
18191  for LaTeX.
18192 \end_layout
18193
18194 \begin_layout Standard
18195 Well, what is a syntax checker doing in LyX which is supposed to produce
18196  correct LaTeX anyways? The answer is simple: Just as 
18197 \family typewriter
18198 Lint
18199 \family default
18200  not only checks the 
18201 \emph on
18202 syntax
18203 \emph default
18204  of C programs, but also does 
18205 \emph on
18206 semantic
18207 \emph default
18208  checks for type-errors, 
18209 \family sans
18210 ChkTeX
18211 \family default
18212  catches some common 
18213 \emph on
18214 typographic
18215 \emph default
18216  errors, in addition to the syntactical ones.
18217  Specifically, 
18218 \family sans
18219 ChkTeX
18220 \family default
18221  is capable of detecting several common errors, such as
18222 \end_layout
18223
18224 \begin_layout Itemize
18225 Ellipsis detection:
18226 \begin_inset Newline newline
18227 \end_inset
18228
18229 Use \SpecialChar \ldots{}
18230  instead of ...
18231 \end_layout
18232
18233 \begin_layout Itemize
18234 No space in front of/after parenthesis:
18235 \begin_inset Newline newline
18236 \end_inset
18237
18238 ( wrong spacing )
18239 \end_layout
18240
18241 \begin_layout Itemize
18242 Enforcement of normal space after common abbreviations:
18243 \begin_inset Newline newline
18244 \end_inset
18245
18246 e.
18247 \begin_inset space \thinspace{}
18248 \end_inset
18249
18250 g.
18251 \begin_inset space \space{}
18252 \end_inset
18253
18254 is too wide spacing.
18255 \end_layout
18256
18257 \begin_layout Itemize
18258 Enforcement of end-of-sentence space when the last sentence ends with a
18259  capital letter:
18260 \begin_inset Newline newline
18261 \end_inset
18262
18263 This is a TEST.
18264  And this is wrong spacing.
18265 \end_layout
18266
18267 \begin_layout Itemize
18268 Space in front of labels and similar commands:
18269 \begin_inset Newline newline
18270 \end_inset
18271
18272 The label should stick right up to the text to avoid falling to a wrong
18273  page.
18274  
18275 \begin_inset CommandInset label
18276 LatexCommand label
18277 name "sec:chktex"
18278
18279 \end_inset
18280
18281  
18282 \begin_inset Foot
18283 status collapsed
18284
18285 \begin_layout Plain Layout
18286 This footnote is in danger of falling off to a wrong page
18287 \end_layout
18288
18289 \end_inset
18290
18291  The label is separated too much.
18292 \end_layout
18293
18294 \begin_layout Itemize
18295 Space in front of references, instead of hard spaces:
18296 \begin_inset Newline newline
18297 \end_inset
18298
18299 In you are in bad luck, the text will break right between the referenced
18300  text and reference number, and that's a pity.
18301  See section 
18302 \begin_inset CommandInset ref
18303 LatexCommand ref
18304 reference "sec:chktex"
18305
18306 \end_inset
18307
18308 .
18309 \end_layout
18310
18311 \begin_layout Itemize
18312 Use of 
18313 \begin_inset Quotes eld
18314 \end_inset
18315
18316 x
18317 \begin_inset Quotes erd
18318 \end_inset
18319
18320  instead of 
18321 \begin_inset Formula $\times$
18322 \end_inset
18323
18324  between numbers:
18325 \begin_inset Newline newline
18326 \end_inset
18327
18328 2x2 looks cheap compared to 
18329 \begin_inset Formula $2\times2$
18330 \end_inset
18331
18332 .
18333 \end_layout
18334
18335 \begin_layout Standard
18336 and more \SpecialChar \ldots{}
18337  It is an invaluable tool when you are 
18338 \begin_inset Quotes eld
18339 \end_inset
18340
18341 finishing up
18342 \begin_inset Quotes erd
18343 \end_inset
18344
18345  your document before printing, and you should run it right after the obligatory
18346  spelling check, and before you go fine tuning the typesetting.
18347 \end_layout
18348
18349 \begin_layout Subsection
18350 How to use it
18351 \end_layout
18352
18353 \begin_layout Standard
18354 If you have the program installed, usage is as simple as choosing 
18355 \family sans
18356 Tools\SpecialChar \menuseparator
18357 Check
18358 \begin_inset space ~
18359 \end_inset
18360
18361 TeX
18362 \family default
18363 .
18364  This will make LyX generate a LaTeX file of your document, start 
18365 \family sans
18366 ChkTeX
18367 \family default
18368  to check it, and then make LyX insert 
18369 \begin_inset Quotes eld
18370 \end_inset
18371
18372 error boxes
18373 \begin_inset Quotes erd
18374 \end_inset
18375
18376  with the warnings from 
18377 \family sans
18378 ChkTeX
18379 \family default
18380 , if there were any.
18381  The warnings will be placed close to the point of the mistake, and you
18382  can quickly find them by using the 
18383 \family sans
18384 Navigate\SpecialChar \menuseparator
18385 Error
18386 \family default
18387  menu item, or the shortcut key 
18388 \family sans
18389 C-g
18390 \family default
18391  from the default 
18392 \family typewriter
18393 cua
18394 \family default
18395  bind file.
18396  Open the error boxes by clicking on them with the mouse, or use the shortcut
18397  key 
18398 \family sans
18399 C-i
18400 \family default
18401  from 
18402 \family typewriter
18403 cua
18404 \family default
18405  bindings, or the corresponding 
18406 \family sans
18407 C-o
18408 \family default
18409  for the alternate 
18410 \family typewriter
18411 emacs
18412 \family default
18413  bind file.
18414  Read the warning and correct the mistake, if it is a mistake.
18415  If you have trouble understanding what the warning is about, you can safely
18416  ignore it.
18417  Remember that there is a hidden layer between the document on screen and
18418  the technical details in invoking 
18419 \family sans
18420 ChkTeX
18421 \family default
18422 , and this gap can make some warnings seem arcane or just right down plain
18423  silly.
18424 \end_layout
18425
18426 \begin_layout Standard
18427 This document is an excellent testing bed for the feature, and it should
18428  provide quite a few warnings for you to fiddle with.
18429  Since computers are only so smart, expect most of the warnings to be false
18430  alarms, though.
18431 \end_layout
18432
18433 \begin_layout Subsection
18434 How to fine tune it
18435 \end_layout
18436
18437 \begin_layout Standard
18438 Sometimes, you'll find that 
18439 \family sans
18440 ChkTeX
18441 \family default
18442  makes more noise than suits your mood.
18443  Then you can choose not to use it, wait until your mood changes, or try
18444  to customize 
18445 \family sans
18446 ChkTeX
18447 \family default
18448  to get better along with you.
18449  Another choice in the most desperate situations is to use 
18450 \family sans
18451 View\SpecialChar \menuseparator
18452 Remove
18453 \begin_inset space ~
18454 \end_inset
18455
18456 All
18457 \begin_inset space ~
18458 \end_inset
18459
18460 Error
18461 \begin_inset space ~
18462 \end_inset
18463
18464 Boxes
18465 \family default
18466 , which will get rid of all warnings instantly.
18467 \end_layout
18468
18469 \begin_layout Standard
18470 Although 
18471 \family sans
18472 ChkTeX
18473 \family default
18474  
18475 \emph on
18476 is
18477 \emph default
18478  very configurable and extensible, you shouldn't expect to solve all problems
18479  with 
18480 \family sans
18481 ChkTeX
18482 \family default
18483  in LyX this way.
18484  Since LyX has to generate a somewhat special LaTeX file to be able to match
18485  the line numbers from the 
18486 \family sans
18487 ChkTeX
18488 \family default
18489  output
18490 \begin_inset Foot
18491 status collapsed
18492
18493 \begin_layout Plain Layout
18494 You can inspect the specific output from 
18495 \family sans
18496 chktex
18497 \family default
18498  by using 
18499 \family sans
18500 Edit\SpecialChar \menuseparator
18501 View
18502 \begin_inset space ~
18503 \end_inset
18504
18505 LaTeX
18506 \begin_inset space ~
18507 \end_inset
18508
18509 Log
18510 \family default
18511  right after a 
18512 \family sans
18513 chktex
18514 \family default
18515  run.
18516 \end_layout
18517
18518 \end_inset
18519
18520  to the internal document structure, some of the warnings will not seen
18521  to appear correctly.
18522  There are two things you can do about this:
18523 \end_layout
18524
18525 \begin_layout Itemize
18526 Fine tune the 
18527 \family sans
18528 ChkTeX
18529 \family default
18530  invocation command line in 
18531 \family sans
18532 Preferences
18533 \family default
18534  (tabs 
18535 \family sans
18536 Outputs
18537 \family default
18538
18539 \family sans
18540 Misc
18541 \family default
18542 ), or the global 
18543 \family sans
18544 ChkTeX
18545 \family default
18546  installation configuration file (usually with the file 
18547 \family typewriter
18548 chktexrc
18549 \family default
18550 ).
18551  See below to learn what warnings can be enabled and disabled on the command
18552  line.
18553  
18554 \end_layout
18555
18556 \begin_layout Itemize
18557 Export your document as a raw LaTeX file using 
18558 \family sans
18559 File\SpecialChar \menuseparator
18560 Export\SpecialChar \menuseparator
18561 LaTeX
18562 \family default
18563  and run 
18564 \family typewriter
18565 chktex
18566 \family default
18567  manually on that.
18568  Invoked in this way, it can be a hassle to find the corresponding place
18569  in the document inside LyX, but with a little patience, you should be able
18570  to do it.
18571 \end_layout
18572
18573 \begin_layout Standard
18574 Here follows the warning messages that can be enabled and disabled in 
18575 \family sans
18576 Preferences
18577 \family default
18578 .
18579  Use 
18580 \family typewriter
18581 -n#
18582 \family default
18583  to disable a warning, and 
18584 \family typewriter
18585 -w#
18586 \family default
18587  to enable a warning.
18588  The emphasized entries are disabled by default, because the default is
18589  "
18590 \family typewriter
18591 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18592 \family default
18593 ".
18594 \end_layout
18595
18596 \begin_layout Standard
18597 Notice that you should only use the options that enable and disable warnings,
18598  because LyX relies on some of the other command line parameters to be set
18599  in a specific way to have a chance to communicate with 
18600 \family typewriter
18601 chktex
18602 \family default
18603 .
18604 \end_layout
18605
18606 \begin_layout Enumerate
18607
18608 \size small
18609 \emph on
18610 Command terminated with space.
18611 \end_layout
18612
18613 \begin_layout Enumerate
18614
18615 \size small
18616 Non-breaking space (
18617 \begin_inset Quotes eld
18618 \end_inset
18619
18620
18621 \family typewriter
18622 ~
18623 \family default
18624
18625 \begin_inset Quotes erd
18626 \end_inset
18627
18628 ) should have been used.
18629 \end_layout
18630
18631 \begin_layout Enumerate
18632
18633 \size small
18634 \emph on
18635 You should enclose the previous parenthesis with 
18636 \begin_inset Quotes eld
18637 \end_inset
18638
18639
18640 \family typewriter
18641 {}
18642 \family default
18643
18644 \begin_inset Quotes erd
18645 \end_inset
18646
18647 .
18648 \end_layout
18649
18650 \begin_layout Enumerate
18651
18652 \size small
18653 Italic correction (
18654 \begin_inset Quotes eld
18655 \end_inset
18656
18657
18658 \family typewriter
18659
18660 \backslash
18661 /
18662 \family default
18663
18664 \begin_inset Quotes erd
18665 \end_inset
18666
18667 ) found in non-italic buffer.
18668 \end_layout
18669
18670 \begin_layout Enumerate
18671
18672 \size small
18673 Italic correction (
18674 \begin_inset Quotes eld
18675 \end_inset
18676
18677
18678 \family typewriter
18679
18680 \backslash
18681 /
18682 \family default
18683
18684 \begin_inset Quotes erd
18685 \end_inset
18686
18687 ) found more than once.
18688 \end_layout
18689
18690 \begin_layout Enumerate
18691
18692 \size small
18693 \emph on
18694 No italic correction (
18695 \begin_inset Quotes eld
18696 \end_inset
18697
18698
18699 \family typewriter
18700
18701 \backslash
18702 /
18703 \family default
18704
18705 \begin_inset Quotes erd
18706 \end_inset
18707
18708 ) found.
18709 \end_layout
18710
18711 \begin_layout Enumerate
18712
18713 \size small
18714 Accent command 
18715 \begin_inset Quotes eld
18716 \end_inset
18717
18718
18719 \family typewriter
18720 cmd
18721 \family default
18722
18723 \begin_inset Quotes erd
18724 \end_inset
18725
18726  needs use of 
18727 \begin_inset Quotes eld
18728 \end_inset
18729
18730
18731 \family typewriter
18732 cmd
18733 \family default
18734
18735 \begin_inset Quotes erd
18736 \end_inset
18737
18738 .
18739 \end_layout
18740
18741 \begin_layout Enumerate
18742
18743 \size small
18744 Wrong length of dash may have been used.
18745 \end_layout
18746
18747 \begin_layout Enumerate
18748
18749 \size small
18750 \emph on
18751 \begin_inset Quotes eld
18752 \end_inset
18753
18754
18755 \family typewriter
18756 %s
18757 \family default
18758
18759 \begin_inset Quotes erd
18760 \end_inset
18761
18762  expected, found 
18763 \begin_inset Quotes eld
18764 \end_inset
18765
18766
18767 \family typewriter
18768 %s
18769 \family default
18770
18771 \begin_inset Quotes erd
18772 \end_inset
18773
18774 .
18775 \end_layout
18776
18777 \begin_layout Enumerate
18778
18779 \size small
18780 Solo 
18781 \begin_inset Quotes eld
18782 \end_inset
18783
18784
18785 \family typewriter
18786 %s
18787 \family default
18788
18789 \begin_inset Quotes erd
18790 \end_inset
18791
18792  found.
18793 \end_layout
18794
18795 \begin_layout Enumerate
18796
18797 \size small
18798 You should use 
18799 \begin_inset Quotes eld
18800 \end_inset
18801
18802
18803 \family typewriter
18804 %s
18805 \family default
18806
18807 \begin_inset Quotes erd
18808 \end_inset
18809
18810  to achieve an ellipsis.
18811 \end_layout
18812
18813 \begin_layout Enumerate
18814
18815 \size small
18816 Inter-word spacing (
18817 \begin_inset Quotes eld
18818 \end_inset
18819
18820
18821 \family typewriter
18822
18823 \backslash
18824
18825 \family default
18826  
18827 \begin_inset Quotes eld
18828 \end_inset
18829
18830 ) should perhaps be used.
18831 \end_layout
18832
18833 \begin_layout Enumerate
18834
18835 \size small
18836 Inter-sentence spacing (
18837 \begin_inset Quotes eld
18838 \end_inset
18839
18840
18841 \family typewriter
18842
18843 \backslash
18844 @
18845 \family default
18846
18847 \begin_inset Quotes erd
18848 \end_inset
18849
18850 ) should perhaps be used.
18851 \end_layout
18852
18853 \begin_layout Enumerate
18854
18855 \size small
18856 Could not find argument for command.
18857 \end_layout
18858
18859 \begin_layout Enumerate
18860
18861 \size small
18862 No match found for 
18863 \begin_inset Quotes eld
18864 \end_inset
18865
18866
18867 \family typewriter
18868 %s
18869 \family default
18870
18871 \begin_inset Quotes erd
18872 \end_inset
18873
18874 .
18875 \end_layout
18876
18877 \begin_layout Enumerate
18878
18879 \size small
18880 Math mode still on at end of LaTeX file.
18881 \end_layout
18882
18883 \begin_layout Enumerate
18884
18885 \size small
18886 Number of 
18887 \begin_inset Quotes eld
18888 \end_inset
18889
18890
18891 \family typewriter
18892 char
18893 \family default
18894
18895 \begin_inset Quotes erd
18896 \end_inset
18897
18898  doesn't match the number of 
18899 \begin_inset Quotes eld
18900 \end_inset
18901
18902
18903 \family typewriter
18904 char
18905 \family default
18906
18907 \begin_inset Quotes erd
18908 \end_inset
18909
18910 .
18911 \end_layout
18912
18913 \begin_layout Enumerate
18914
18915 \size small
18916 You should use either 
18917 \family typewriter
18918
18919 \begin_inset Quotes eld
18920 \end_inset
18921
18922
18923 \family default
18924  or 
18925 \family typewriter
18926
18927 \begin_inset Quotes erd
18928 \end_inset
18929
18930
18931 \family default
18932  as an alternative to 
18933 \begin_inset Quotes eld
18934 \end_inset
18935
18936
18937 \family typewriter
18938 "
18939 \family default
18940
18941 \begin_inset Quotes erd
18942 \end_inset
18943
18944 .
18945 \end_layout
18946
18947 \begin_layout Enumerate
18948
18949 \size small
18950 You should use "
18951 \family typewriter
18952 '
18953 \family default
18954 " (ASCII 39) instead of "
18955 \family typewriter
18956 ´
18957 \family default
18958 " (ASCII 180).
18959 \end_layout
18960
18961 \begin_layout Enumerate
18962
18963 \size small
18964 User-specified pattern found.
18965 \end_layout
18966
18967 \begin_layout Enumerate
18968
18969 \size small
18970 This command might not be intended.
18971 \end_layout
18972
18973 \begin_layout Enumerate
18974
18975 \size small
18976 \emph on
18977 Comment displayed.
18978 \end_layout
18979
18980 \begin_layout Enumerate
18981
18982 \size small
18983 Either 
18984 \family typewriter
18985 ''
18986 \backslash
18987 ,'
18988 \family default
18989  or 
18990 \family typewriter
18991 '
18992 \backslash
18993 ,''
18994 \family default
18995  will look better.
18996 \end_layout
18997
18998 \begin_layout Enumerate
18999
19000 \size small
19001 Delete this space to maintain correct page references.
19002 \end_layout
19003
19004 \begin_layout Enumerate
19005
19006 \size small
19007 \emph on
19008 You might wish to put this between a pair of 
19009 \begin_inset Quotes eld
19010 \end_inset
19011
19012
19013 \family typewriter
19014 {}
19015 \family default
19016
19017 \begin_inset Quotes erd
19018 \end_inset
19019
19020 .
19021 \end_layout
19022
19023 \begin_layout Enumerate
19024
19025 \size small
19026 You ought to remove spaces in front of punctuation.
19027 \end_layout
19028
19029 \begin_layout Enumerate
19030
19031 \size small
19032 Could not execute LaTeX command.
19033 \end_layout
19034
19035 \begin_layout Enumerate
19036
19037 \size small
19038 Don't use 
19039 \family typewriter
19040
19041 \backslash
19042 /
19043 \family default
19044  in front of small punctuation.
19045 \end_layout
19046
19047 \begin_layout Enumerate
19048
19049 \family typewriter
19050 \size small
19051 $
19052 \backslash
19053 times$
19054 \family default
19055  may look prettier here.
19056 \end_layout
19057
19058 \begin_layout Enumerate
19059
19060 \size small
19061 \emph on
19062 Multiple spaces detected in output.
19063 \end_layout
19064
19065 \begin_layout Enumerate
19066
19067 \size small
19068 This text may be ignored.
19069 \end_layout
19070
19071 \begin_layout Enumerate
19072
19073 \size small
19074 Use 
19075 \family typewriter
19076
19077 \begin_inset Quotes eld
19078 \end_inset
19079
19080
19081 \family default
19082  to begin quotation, not 
19083 \family typewriter
19084 '
19085 \family default
19086 .
19087 \end_layout
19088
19089 \begin_layout Enumerate
19090
19091 \size small
19092 Use 
19093 \family typewriter
19094 '
19095 \family default
19096  to end quotation, not 
19097 \family typewriter
19098
19099 \begin_inset Quotes eld
19100 \end_inset
19101
19102
19103 \family default
19104 .
19105 \end_layout
19106
19107 \begin_layout Enumerate
19108
19109 \size small
19110 Don't mix quotes.
19111 \end_layout
19112
19113 \begin_layout Enumerate
19114
19115 \size small
19116 You should perhaps use 
19117 \begin_inset Quotes eld
19118 \end_inset
19119
19120
19121 \family typewriter
19122 cmd
19123 \family default
19124
19125 \begin_inset Quotes erd
19126 \end_inset
19127
19128  instead.
19129 \end_layout
19130
19131 \begin_layout Enumerate
19132
19133 \size small
19134 You should put a space in front of/after parenthesis.
19135 \end_layout
19136
19137 \begin_layout Enumerate
19138
19139 \size small
19140 You should avoid spaces in front of/after parenthesis.
19141 \end_layout
19142
19143 \begin_layout Enumerate
19144
19145 \size small
19146 \emph on
19147 You should not use punctuation in front of/after quotes.
19148 \end_layout
19149
19150 \begin_layout Enumerate
19151
19152 \size small
19153 Double space found.
19154 \end_layout
19155
19156 \begin_layout Enumerate
19157
19158 \size small
19159 You should put punctuation outside inner/inside display math mode.
19160 \end_layout
19161
19162 \begin_layout Enumerate
19163
19164 \size small
19165 You ought to not use primitive TeX in LaTeX code.
19166 \end_layout
19167
19168 \begin_layout Enumerate
19169
19170 \size small
19171 You should remove spaces in front of 
19172 \begin_inset Quotes eld
19173 \end_inset
19174
19175
19176 \family typewriter
19177 %s
19178 \family default
19179
19180 \begin_inset Quotes erd
19181 \end_inset
19182
19183
19184 \end_layout
19185
19186 \begin_layout Enumerate
19187
19188 \size small
19189 \begin_inset Quotes eld
19190 \end_inset
19191
19192
19193 \family typewriter
19194 %s
19195 \family default
19196
19197 \begin_inset Quotes erd
19198 \end_inset
19199
19200  is normally not followed by 
19201 \begin_inset Quotes eld
19202 \end_inset
19203
19204
19205 \family typewriter
19206 %c
19207 \family default
19208
19209 \begin_inset Quotes erd
19210 \end_inset
19211
19212 .
19213 \end_layout
19214
19215 \begin_layout Standard
19216 In later versions of LyX, we hope to provide a more complete interface to
19217  this tool (and it's smaller cousin 
19218 \family typewriter
19219 lacheck
19220 \family default
19221 ) to exploit the full power of it.
19222  But it's not exactly useless as it is now: go try it on one of your existing
19223  documents of a certain length and be surprised.
19224 \end_layout
19225
19226 \begin_layout Section
19227 Version Control in LyX
19228 \end_layout
19229
19230 \begin_layout Standard
19231 by
19232 \noun on
19233  Lars Gullik Bjønnes 
19234 \noun default
19235 and 
19236 \noun on
19237 Pavel Sanda
19238 \end_layout
19239
19240 \begin_layout Subsection
19241 Introduction
19242 \end_layout
19243
19244 \begin_layout Standard
19245 A friend of mine wanted to try LyX for a group project.
19246  When he didn't find support for version control or file locking, he dropped
19247  it.
19248  This angered me a bit, so I thought that I should at least make support
19249  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
19250  This has been done.
19251  LyX now supports some of the most basic RCS/CVS/SVN commands.
19252  If you need something a bit more sophisticated you will have to do that
19253  manually in a terminal.
19254 \end_layout
19255
19256 \begin_layout Standard
19257 Before you begin to use the version control features in LyX, you should
19258  be familiar with RCS/CVS/SVN usage before start using it under LyX.
19259  Also note that CVS support is not as good as subversion support so we advice
19260  using SVN instead.
19261  Good place to start with Subversion is SVN Book
19262 \begin_inset Foot
19263 status open
19264
19265 \begin_layout Plain Layout
19266 \begin_inset CommandInset href
19267 LatexCommand href
19268 target "http://svnbook.red-bean.com/"
19269
19270 \end_inset
19271
19272
19273 \end_layout
19274
19275 \end_inset
19276
19277 .
19278  In case of RCS you should read 
19279 \begin_inset Quotes eld
19280 \end_inset
19281
19282 rcsintro
19283 \begin_inset Quotes erd
19284 \end_inset
19285
19286  (a man file, read it with 
19287 \family typewriter
19288 man rcsintro
19289 \family default
19290 ).
19291  This file describes all the basic features of RCS.
19292  You should especially notice the comment about a RCS directory, and the
19293  notion of a master RCS file (the file ending in 
19294 \family typewriter
19295 ,v
19296 \family default
19297 ).
19298 \end_layout
19299
19300 \begin_layout Standard
19301 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19302  package—no guarantees are made for older versions.
19303  Most of the log messages are not currently displayed after operations —
19304  you can check them in Messages pane if unsure.
19305 \end_layout
19306
19307 \begin_layout Standard
19308 For introducing your own external commands consult vc-command in the manual
19309  of LyX functions.
19310 \end_layout
19311
19312 \begin_layout Subsection
19313 RCS commands in LyX
19314 \end_layout
19315
19316 \begin_layout Standard
19317 The following sections describe the RCS commands supported by LyX.
19318  You can find them in the 
19319 \family sans
19320 File\SpecialChar \menuseparator
19321 Version
19322 \begin_inset space ~
19323 \end_inset
19324
19325 Control
19326 \family default
19327  submenu.
19328  LyX was tested against RCS 5.7.
19329 \end_layout
19330
19331 \begin_layout Subsubsection
19332
19333 \family sans
19334 Register
19335 \end_layout
19336
19337 \begin_layout Standard
19338 If your document is not under revision control, this is the only item shown
19339  in the menu.
19340  And if it is under revision control, the 
19341 \family sans
19342 Register
19343 \family default
19344  item is not visible.
19345  
19346 \end_layout
19347
19348 \begin_layout Standard
19349 This command registers your document with RCS (unless you are under the
19350  directory managed by CVS)\SpecialChar \@.
19351  You are asked interactively to supply an initial
19352  description of the document.
19353  The document is now set in Read-Only mode and you have to 
19354 \family sans
19355 Check
19356 \begin_inset space ~
19357 \end_inset
19358
19359 Out
19360 \begin_inset space ~
19361 \end_inset
19362
19363 For
19364 \begin_inset space ~
19365 \end_inset
19366
19367 Edit
19368 \family default
19369 , before making any changes to it.
19370  A document under revision control has a 
19371 \begin_inset Quotes eld
19372 \end_inset
19373
19374 [RCS:<version> <locker>]
19375 \begin_inset Quotes erd
19376 \end_inset
19377
19378  item tagged to the filename in the minibuffer.
19379 \end_layout
19380
19381 \begin_layout Standard
19382 RCS command that is run: 
19383 \family typewriter
19384 ci -q -u -i -t-"<initial description>" <file-name>
19385 \end_layout
19386
19387 \begin_layout Standard
19388 Read 
19389 \family typewriter
19390 man ci
19391 \family default
19392  to understand the switches.
19393  
19394 \end_layout
19395
19396 \begin_layout Subsubsection
19397
19398 \family sans
19399 Check In Changes
19400 \end_layout
19401
19402 \begin_layout Standard
19403 When you are finished editing a file, you check in your changes.
19404  When you do this, you are asked for a description of the changes.
19405  This is stored in the history log.
19406  The version number is bumped, your changes are applied to the master RCS
19407  file, the document is unlocked and set to Read-Only mode.
19408  
19409 \end_layout
19410
19411 \begin_layout Standard
19412 RCS command: 
19413 \family typewriter
19414 ci -q -u -m"<description>" <file-name>
19415 \end_layout
19416
19417 \begin_layout Subsubsection
19418
19419 \family sans
19420 Check Out For Edit
19421 \end_layout
19422
19423 \begin_layout Standard
19424 By doing this you lock the document so that only you can edit it.
19425  This will also make the document Read-Write only for you.
19426  You will usually continue editing for a while and when you are finished
19427  you check in your changes.
19428  The status line is changed to reflect that you have locked the file.
19429  
19430 \end_layout
19431
19432 \begin_layout Standard
19433 RCS command: 
19434 \family typewriter
19435 co -q -l <file-name>
19436 \end_layout
19437
19438 \begin_layout Subsubsection
19439
19440 \family sans
19441 Revert To Repository Version
19442 \end_layout
19443
19444 \begin_layout Standard
19445 This will discard all changes made to the document since the last check
19446  in.
19447  You get a warning before changes are discarded.
19448 \end_layout
19449
19450 \begin_layout Standard
19451 RCS command: 
19452 \family typewriter
19453 co -f -u<version> <file-name>
19454 \end_layout
19455
19456 \begin_layout Subsubsection
19457
19458 \family sans
19459 Undo Last Checkin
19460 \end_layout
19461
19462 \begin_layout Standard
19463 This makes as if the last check in never happened.
19464  No changes are made to the document loaded into LyX, but the last version
19465  is removed from the master RCS file.
19466  
19467 \end_layout
19468
19469 \begin_layout Standard
19470 RCS command: 
19471 \family typewriter
19472 rcs -o<version> <file-name>
19473 \end_layout
19474
19475 \begin_layout Subsubsection
19476
19477 \family sans
19478 Show History
19479 \end_layout
19480
19481 \begin_layout Standard
19482 This shows the complete history of the RCS document.
19483  The output of 
19484 \family typewriter
19485 rlog <file-name>
19486 \family default
19487  is shown in a browser.
19488  See 
19489 \family typewriter
19490 man rlog
19491 \family default
19492  for more info.
19493 \end_layout
19494
19495 \begin_layout Subsubsection
19496 Revision info
19497 \end_layout
19498
19499 \begin_layout Standard
19500 LyX supports RCS version number information (only), see 
19501 \begin_inset CommandInset ref
19502 LatexCommand ref
19503 reference "sub:VCS-Revision-Information"
19504
19505 \end_inset
19506
19507  for details.
19508 \end_layout
19509
19510 \begin_layout Subsection
19511 CVS commands in LyX
19512 \end_layout
19513
19514 \begin_layout Standard
19515 A subset of CVS operations is supported by LyX.
19516  You can find the commands in the 
19517 \family sans
19518 File\SpecialChar \menuseparator
19519 Version
19520 \begin_inset space ~
19521 \end_inset
19522
19523 Control
19524 \family default
19525  submenu.
19526  The version control system SVN is more powerful, so please use it instead
19527  of CVS if possible.
19528 \end_layout
19529
19530 \begin_layout Subsubsection
19531
19532 \family sans
19533 General CVS usage
19534 \end_layout
19535
19536 \begin_layout Standard
19537 If you start from scratch with CVS you have to create your repository and
19538  checkout the working copy with external tools.
19539  If you're using a client-server setup you may need to login before doing
19540  the first repository checkout.
19541 \end_layout
19542
19543 \begin_layout Standard
19544 If your documents are under revision control and others are using the same
19545  repository problems arise when different changes to the same document at
19546  the same location happen.
19547  Standard CVS repositories doesn't operate with a file locking mechanism.
19548  This may be surprising, but conflicts only occur if people disagree on
19549  the proper content of the same part of a document.
19550  So, if co-workers are used to communicate regularly, these conflicts occur
19551  rarely.
19552  If they don't communicate they have a fundamental problem anyway.
19553  Nevertheless some people like to work with so called 
19554 \begin_inset Quotes eld
19555 \end_inset
19556
19557 reserved checkouts
19558 \begin_inset Quotes erd
19559 \end_inset
19560
19561 .
19562  If they do so the working copy of all files is readonly when checked out
19563  first and the user starts editing after using a special command to make
19564  the working copy writable.
19565  When the changes are checked in the working copy returns to readonly state.
19566  With LyX one has to edit the 
19567 \begin_inset Flex Code
19568 status collapsed
19569
19570 \begin_layout Plain Layout
19571 .cvsrc
19572 \end_layout
19573
19574 \end_inset
19575
19576  file and add the line 
19577 \begin_inset Flex Code
19578 status collapsed
19579
19580 \begin_layout Plain Layout
19581 cvs -r
19582 \end_layout
19583
19584 \end_inset
19585
19586  to work with reserved checkouts.
19587  The benefit is the possibility to see who is using a writable copy of some
19588  document.
19589  It's not guaranteed only one user makes a copy writable.
19590 \end_layout
19591
19592 \begin_layout Standard
19593 LyX tries to guess if you're using reserved or non-reserved checkouts.
19594  If your working copy is readonly or it is writable and an additional copy
19595  of your document exists in the CVS/Base sub-directory a reserved otherwise
19596  a non-reserved checkout is assumed.
19597  When a reserved checkout is detected you have to use 
19598 \begin_inset Flex MenuItem
19599 status collapsed
19600
19601 \begin_layout Plain Layout
19602 Check Out
19603 \end_layout
19604
19605 \end_inset
19606
19607  to make your working copy writable if it's readonly.
19608  After doing so the 
19609 \begin_inset Flex MenuItem
19610 status collapsed
19611
19612 \begin_layout Plain Layout
19613 Check In
19614 \end_layout
19615
19616 \end_inset
19617
19618  operation is possible and that makes your working copy readonly again after
19619  transferring your changes to the repository.
19620 \end_layout
19621
19622 \begin_layout Standard
19623 More information about CVS can be found here 
19624 \begin_inset Flex URL
19625 status collapsed
19626
19627 \begin_layout Plain Layout
19628
19629 http://www.nongnu.org/cvs
19630 \end_layout
19631
19632 \end_inset
19633
19634  and here 
19635 \begin_inset Flex URL
19636 status collapsed
19637
19638 \begin_layout Plain Layout
19639
19640 http://ximbiot.com/cvs
19641 \end_layout
19642
19643 \end_inset
19644
19645 .
19646 \end_layout
19647
19648 \begin_layout Standard
19649 Read 
19650 \family typewriter
19651 man cvs
19652 \family default
19653  to understand the sub-commands and the switches mentioned below.
19654 \end_layout
19655
19656 \begin_layout Subsubsection
19657
19658 \family sans
19659 Register
19660 \end_layout
19661
19662 \begin_layout Standard
19663 If your document is not under revision control, this is the only item shown
19664  in the menu.
19665  And if it is under revision control, the 
19666 \family sans
19667 \bar under
19668 R
19669 \bar default
19670 egister
19671 \family default
19672  item is not visible.
19673  
19674 \end_layout
19675
19676 \begin_layout Standard
19677 This command registers in CVS your document 
19678 \begin_inset Flex Strong
19679 status collapsed
19680
19681 \begin_layout Plain Layout
19682
19683 \emph on
19684 only
19685 \end_layout
19686
19687 \end_inset
19688
19689  in case you have already the documents directory under CVS control (in
19690  particular 
19691 \family typewriter
19692 CVS/Entries
19693 \family default
19694  file exists).
19695  This means you have to create or checkout the archive by yourself using
19696  external tools.
19697  (In case you forget that step LyX registers the document with RCS.)
19698 \end_layout
19699
19700 \begin_layout Standard
19701 Then you are asked interactively to supply an initial description of the
19702  document.
19703  Don't forget that registered file is not yet checked in.
19704 \end_layout
19705
19706 \begin_layout Standard
19707 CVS command that is run: 
19708 \family typewriter
19709 cvs -q add -m"<entered message>" "<file-name>"
19710 \end_layout
19711
19712 \begin_layout Standard
19713 The term 
19714 \family typewriter
19715 "<file-name>"
19716 \family default
19717  above and for all other CVS commands is an abbreviation for 
19718 \begin_inset Quotes eld
19719 \end_inset
19720
19721 change the current working directory to file location and use the file name
19722  without path component as argument
19723 \begin_inset Quotes erd
19724 \end_inset
19725
19726 .
19727 \end_layout
19728
19729 \begin_layout Subsubsection
19730
19731 \family sans
19732 Check In Changes
19733 \end_layout
19734
19735 \begin_layout Standard
19736 When you are finished editing a file, you commit your changes.
19737  When you do this and you had changed the document, you are asked for a
19738  description of the changes.
19739  After that changes are written to the repository.
19740  In case you didn't change the document and a reserved checkout is detected
19741  the reservation made on 
19742 \begin_inset Flex MenuItem
19743 status collapsed
19744
19745 \begin_layout Plain Layout
19746 Check Out
19747 \end_layout
19748
19749 \end_inset
19750
19751  is undone.
19752 \end_layout
19753
19754 \begin_layout Labeling
19755 \labelwidthstring 00.00.0000
19756 CVS
19757 \begin_inset space ~
19758 \end_inset
19759
19760 command: 
19761 \begin_inset space ~
19762 \end_inset
19763
19764
19765 \begin_inset Newline newline
19766 \end_inset
19767
19768
19769 \begin_inset Flex Code
19770 status collapsed
19771
19772 \begin_layout Plain Layout
19773 cvs 
19774 \family typewriter
19775 -q commit -m"<description>" "<file-name>"
19776 \end_layout
19777
19778 \end_inset
19779
19780  or
19781 \begin_inset Newline newline
19782 \end_inset
19783
19784
19785 \begin_inset Flex Code
19786 status collapsed
19787
19788 \begin_layout Plain Layout
19789 cvs -q unedit 
19790 \family typewriter
19791 "<file-name>"
19792 \end_layout
19793
19794 \end_inset
19795
19796
19797 \end_layout
19798
19799 \begin_layout Subsubsection
19800
19801 \family sans
19802 Check Out Changes
19803 \end_layout
19804
19805 \begin_layout Standard
19806 When you are sharing a repository with others, you may have to incorporate
19807  their changes into your working copy.
19808 \end_layout
19809
19810 \begin_layout Standard
19811 CVS command: 
19812 \family typewriter
19813 cvs -q update "<file-name>"
19814 \end_layout
19815
19816 \begin_layout Standard
19817 If a readonly checkout is detected the working copy is made writable and
19818  reserved.
19819 \end_layout
19820
19821 \begin_layout Standard
19822 CVS command: 
19823 \family typewriter
19824 cvs -q edit "<file-name>"
19825 \end_layout
19826
19827 \begin_layout Subsubsection
19828
19829 \family sans
19830 Revert To Repository Version
19831 \end_layout
19832
19833 \begin_layout Standard
19834 This will discard all changes made to the document since the last check
19835  in.
19836  You get a warning before changes are discarded.
19837  Firstly the file is deleted, secondly CVS update command is run.
19838 \end_layout
19839
19840 \begin_layout Standard
19841 CVS command: 
19842 \family typewriter
19843 cvs -q update "<file-name>"
19844 \end_layout
19845
19846 \begin_layout Standard
19847 If a reserved checkout is detected and the working copy has no changes only
19848  the reservation is undone.
19849 \end_layout
19850
19851 \begin_layout Standard
19852 CVS command: 
19853 \family typewriter
19854 cvs -q unedit "<file-name>"
19855 \end_layout
19856
19857 \begin_layout Subsubsection
19858 Update of the local directory checkout from repository
19859 \end_layout
19860
19861 \begin_layout Standard
19862 Once your documents gets more complex, containing sub-documents and pictures,
19863  including external 
19864 \begin_inset Flex Code
19865 status collapsed
19866
19867 \begin_layout Plain Layout
19868 .tex
19869 \end_layout
19870
19871 \end_inset
19872
19873  files and so on using version control becomes more complicated.
19874  LyX supports updating the whole tree in which resides the document.
19875  This become especially useful once you cooperate with people which neither
19876  have detailed knowledge about CVS usage nor they have ambition to commit
19877  additional material to the repository.
19878  You have to organize the files structure so that all external files are
19879  in the same directory or subdirectories of the document.
19880  It's good practice anyway to store multipart documents in an extra directory.
19881 \end_layout
19882
19883 \begin_layout Standard
19884 The 
19885 \begin_inset Flex Code
19886 status collapsed
19887
19888 \begin_layout Plain Layout
19889 Update local directory from repository
19890 \end_layout
19891
19892 \end_inset
19893
19894  command updates the whole directory.
19895  If local changes are detected user is warned before update starts.
19896  In case of merge conflicts both versions of the conflicting document parts
19897  are placed in the final document.
19898  You have to review and correct the result of the merge.
19899  You'll find the conflicts enclosed in pairs of 
19900 \begin_inset Flex Code
19901 status collapsed
19902
19903 \begin_layout Plain Layout
19904 <<<<<<<
19905 \end_layout
19906
19907 \end_inset
19908
19909  and 
19910 \begin_inset Flex Code
19911 status collapsed
19912
19913 \begin_layout Plain Layout
19914 >>>>>>>
19915 \end_layout
19916
19917 \end_inset
19918
19919  separated by 
19920 \begin_inset Flex Code
19921 status collapsed
19922
19923 \begin_layout Plain Layout
19924 =======
19925 \end_layout
19926
19927 \end_inset
19928
19929 .
19930  The first part is your version as before the update operation with the
19931  document name prepended.
19932  The second one is the repository version with the version number after
19933  the sequence of 
19934 \begin_inset Flex Code
19935 status collapsed
19936
19937 \begin_layout Plain Layout
19938 >
19939 \end_layout
19940
19941 \end_inset
19942
19943  signs.
19944 \end_layout
19945
19946 \begin_layout Labeling
19947 \labelwidthstring 00.00.0000
19948 CVS
19949 \begin_inset space ~
19950 \end_inset
19951
19952 commands: 
19953 \begin_inset space ~
19954 \end_inset
19955
19956
19957 \begin_inset Newline newline
19958 \end_inset
19959
19960
19961 \begin_inset Flex Code
19962 status collapsed
19963
19964 \begin_layout Plain Layout
19965 cd $path; cvs diff 
19966 \family typewriter
19967 "."
19968 \end_layout
19969
19970 \end_inset
19971
19972  (Ask if changes are detected.)
19973 \begin_inset Newline newline
19974 \end_inset
19975
19976
19977 \begin_inset Flex Code
19978 status collapsed
19979
19980 \begin_layout Plain Layout
19981 cd $path; cvs -q update 
19982 \family typewriter
19983 "."
19984 \end_layout
19985
19986 \end_inset
19987
19988
19989 \end_layout
19990
19991 \begin_layout Standard
19992 where 
19993 \begin_inset Flex Code
19994 status collapsed
19995
19996 \begin_layout Plain Layout
19997 $path
19998 \end_layout
19999
20000 \end_inset
20001
20002  stands for the path to the document.
20003 \end_layout
20004
20005 \begin_layout Subsubsection
20006
20007 \family sans
20008 Show History
20009 \end_layout
20010
20011 \begin_layout Standard
20012 This shows the complete history of the CVS document.
20013  The output of 
20014 \family typewriter
20015 cvs log "<file-name>"
20016 \family default
20017  is shown in a browser.
20018 \end_layout
20019
20020 \begin_layout Subsection
20021 SVN commands in LyX
20022 \end_layout
20023
20024 \begin_layout Standard
20025 SVN is now partially supported by LyX.
20026  You can find the commands in the 
20027 \family sans
20028 File\SpecialChar \menuseparator
20029 Version
20030 \begin_inset space ~
20031 \end_inset
20032
20033 Control
20034 \family default
20035  submenu.
20036  Please note that if you use password protected access to repository via
20037  ssh, you will be asked in terminal window.
20038  LyX was tested against SVN 1.5 and 1.6
20039 \begin_inset Foot
20040 status open
20041
20042 \begin_layout Plain Layout
20043 Most of the commands will work with 1.4 too, see 
20044 \begin_inset CommandInset ref
20045 LatexCommand ref
20046 reference "sub:SVN-Repo-Update"
20047
20048 \end_inset
20049
20050 .
20051 \end_layout
20052
20053 \end_inset
20054
20055
20056 \end_layout
20057
20058 \begin_layout Subsubsection
20059
20060 \family sans
20061 Register
20062 \end_layout
20063
20064 \begin_layout Standard
20065 If your document is not under revision control, this is the only item shown
20066  in the menu.
20067  And if it is under revision control, the 
20068 \family sans
20069 \bar under
20070 R
20071 \bar default
20072 egister
20073 \family default
20074  item is not visible.
20075  
20076 \end_layout
20077
20078 \begin_layout Standard
20079 This command registers in SVN your document ONLY in case you have already
20080  the documents directory under SVN control (in particular 
20081 \family typewriter
20082 .svn/entries
20083 \family default
20084  file exists).
20085  This means you have to checkout the archive by yourself.
20086  
20087 \end_layout
20088
20089 \begin_layout Standard
20090 Then you are asked interactively to supply an initial description of the
20091  document.
20092  Don't forget that registered file is not yet commited.
20093 \end_layout
20094
20095 \begin_layout Standard
20096 SVN command that is run: 
20097 \family typewriter
20098 svn add -q 
20099 \begin_inset Quotes eld
20100 \end_inset
20101
20102 <file-name>
20103 \begin_inset Quotes erd
20104 \end_inset
20105
20106
20107 \end_layout
20108
20109 \begin_layout Standard
20110 Read 
20111 \family typewriter
20112 man svn
20113 \family default
20114  to understand the switches.
20115  
20116 \end_layout
20117
20118 \begin_layout Subsubsection
20119
20120 \family sans
20121 Check In Changes
20122 \end_layout
20123
20124 \begin_layout Standard
20125 When you are finished editing a file, you commit your changes.
20126  When you do this, you are asked for a description of the changes.
20127  After that changes are commited.
20128 \end_layout
20129
20130 \begin_layout Standard
20131 SVN command:
20132 \begin_inset Foot
20133 status collapsed
20134
20135 \begin_layout Plain Layout
20136 In case locking is not enabled.
20137  See Section 
20138 \begin_inset CommandInset ref
20139 LatexCommand ref
20140 reference "subsec:SVN-File-Locking"
20141
20142 \end_inset
20143
20144 .
20145 \end_layout
20146
20147 \end_inset
20148
20149  
20150 \family typewriter
20151 svn commit -q -m"<description>" <file-name>
20152 \end_layout
20153
20154 \begin_layout Subsubsection
20155
20156 \family sans
20157 Check Out For Edit
20158 \end_layout
20159
20160 \begin_layout Standard
20161 Updates the changes of this file from the repository.
20162  Be sure you understand SVN merging and conflicts resolving before using
20163  this function, because all conflicts has to be resolved manually by you!
20164 \end_layout
20165
20166 \begin_layout Standard
20167 SVN command:
20168 \begin_inset Foot
20169 status collapsed
20170
20171 \begin_layout Plain Layout
20172 Ditto.
20173 \end_layout
20174
20175 \end_inset
20176
20177  
20178 \family typewriter
20179 svn update --non-interactive 
20180 \begin_inset Quotes eld
20181 \end_inset
20182
20183 <file-name>
20184 \begin_inset Quotes erd
20185 \end_inset
20186
20187
20188 \end_layout
20189
20190 \begin_layout Subsubsection
20191
20192 \family sans
20193 Revert To Repository Version
20194 \end_layout
20195
20196 \begin_layout Standard
20197 This will discard all changes made to the document since the last check
20198  in.
20199  You get a warning before changes are discarded.
20200  
20201 \end_layout
20202
20203 \begin_layout Standard
20204 SVN command: 
20205 \family typewriter
20206 svn revert -q 
20207 \begin_inset Quotes eld
20208 \end_inset
20209
20210 <file-name>
20211 \begin_inset Quotes erd
20212 \end_inset
20213
20214
20215 \end_layout
20216
20217 \begin_layout Subsubsection
20218 \begin_inset CommandInset label
20219 LatexCommand label
20220 name "sub:SVN-Repo-Update"
20221
20222 \end_inset
20223
20224 Update of the local directory checkout from repository
20225 \begin_inset Foot
20226 status collapsed
20227
20228 \begin_layout Plain Layout
20229 Note that this command will work only with subversion 
20230 \begin_inset Formula $\geqq1.5$
20231 \end_inset
20232
20233
20234 \end_layout
20235
20236 \end_inset
20237
20238
20239 \end_layout
20240
20241 \begin_layout Standard
20242 All the commands above have one shortcomming - they deal with the current
20243  document only.
20244  Once your document contains pictures, includes external 
20245 \begin_inset Flex Code
20246 status collapsed
20247
20248 \begin_layout Plain Layout
20249 .tex
20250 \end_layout
20251
20252 \end_inset
20253
20254  files and so on administration becomes more complicated.
20255  LyX now supports updating the whole tree in which resides the document
20256 \begin_inset Foot
20257 status collapsed
20258
20259 \begin_layout Plain Layout
20260 One need to organize the files structure so that all external files are
20261  in the same directory or subdirectories of the document.
20262  
20263 \end_layout
20264
20265 \end_inset
20266
20267 .
20268  This become especially useful once you cooperate with people which neither
20269  know about subversion management nor they have ambition to commit additional
20270  material to the repository.
20271  
20272 \end_layout
20273
20274 \begin_layout Standard
20275 \begin_inset Flex Code
20276 status collapsed
20277
20278 \begin_layout Plain Layout
20279 Update local directory from repository
20280 \end_layout
20281
20282 \end_inset
20283
20284  command updates the whole directory and in case of merge conflicts local
20285  version of the files are left, so no unintended data loss occurs.
20286  If local changes are detected user is warned before update starts.
20287 \end_layout
20288
20289 \begin_layout Labeling
20290 \labelwidthstring 00.00.0000
20291 SVN
20292 \begin_inset space ~
20293 \end_inset
20294
20295 commands: 
20296 \begin_inset space ~
20297 \end_inset
20298
20299
20300 \begin_inset Newline newline
20301 \end_inset
20302
20303
20304 \begin_inset Flex Code
20305 status collapsed
20306
20307 \begin_layout Plain Layout
20308 svn diff $path
20309 \end_layout
20310
20311 \end_inset
20312
20313  (Ask if changes are detected.)
20314 \begin_inset Newline newline
20315 \end_inset
20316
20317
20318 \begin_inset Flex Code
20319 status collapsed
20320
20321 \begin_layout Plain Layout
20322 svn update --accept mine-full $path
20323 \end_layout
20324
20325 \end_inset
20326
20327
20328 \end_layout
20329
20330 \begin_layout Standard
20331 where 
20332 \begin_inset Flex Code
20333 status collapsed
20334
20335 \begin_layout Plain Layout
20336 $path
20337 \end_layout
20338
20339 \end_inset
20340
20341  stands for the path to the document.
20342 \end_layout
20343
20344 \begin_layout Subsubsection
20345
20346 \family sans
20347 Show History
20348 \end_layout
20349
20350 \begin_layout Standard
20351 This shows the complete history of the SVN document.
20352  The output of 
20353 \family typewriter
20354 svn log 
20355 \begin_inset Quotes eld
20356 \end_inset
20357
20358 <file-name>
20359 \begin_inset Quotes erd
20360 \end_inset
20361
20362
20363 \family default
20364  is shown in a browser.
20365 \end_layout
20366
20367 \begin_layout Subsubsection
20368 File Locking
20369 \begin_inset CommandInset label
20370 LatexCommand label
20371 name "subsec:SVN-File-Locking"
20372
20373 \end_inset
20374
20375
20376 \end_layout
20377
20378 \begin_layout Standard
20379 The file exchange through various revision control systems brings the problem
20380  of merge conflicts in case two different users try to edit the same (parts
20381  of) document.
20382  When such a conflict happens it needs manual resolving and one reasonable
20383  alternative is to provide some kind of locking mechanism, which guarantees
20384  that only one user is allowed to edit file at the given time.
20385 \end_layout
20386
20387 \begin_layout Standard
20388 SVN has two such mechanisms to provide mutual exclusivity for file access
20389  - locks and automatic setting of write permissions (see sec.
20390  
20391 \begin_inset CommandInset ref
20392 LatexCommand ref
20393 reference "subsec:Automatical-Locking-Property"
20394
20395 \end_inset
20396
20397 ) based on 
20398 \begin_inset Flex Code
20399 status collapsed
20400
20401 \begin_layout Plain Layout
20402 svn:needs-lock
20403 \end_layout
20404
20405 \end_inset
20406
20407  file svn property
20408 \begin_inset Foot
20409 status open
20410
20411 \begin_layout Plain Layout
20412 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20413 \end_layout
20414
20415 \end_inset
20416
20417 .
20418  If this property is detected for a given document LyX starts to use SVN
20419  locks for document editing automatically and the whole check-in/out mechanism
20420  switches to the same regimen as for RCS.
20421  This in particular means there are two different modes of file use in LyX:
20422 \end_layout
20423
20424 \begin_layout Itemize
20425 Unlocked state.
20426  The loaded file is in the read-only mode.
20427  For editing on needs to check-out.
20428  
20429 \emph on
20430 Check-out
20431 \emph default
20432  consists of updating from the repository and gaining write lock.
20433  If the lock is not possible to obtain, we remain in unlocked state.
20434 \end_layout
20435
20436 \begin_layout Itemize
20437 Locked state.
20438  The loaded file is in the 'normal' edit mode.
20439  No other user is allowed to edit the file.
20440  
20441 \emph on
20442 Check-in
20443 \emph default
20444  consists of commiting changes and releasing write-lock.
20445  If no changes have been made to the document, no commit will be produced
20446 \begin_inset Foot
20447 status collapsed
20448
20449 \begin_layout Plain Layout
20450 Don't be puzzled by the fact that you will be asked for commit message anyway.
20451 \end_layout
20452
20453 \end_inset
20454
20455  and only the write-lock will be released.
20456 \end_layout
20457
20458 \begin_layout Standard
20459 SVN commands:
20460 \end_layout
20461
20462 \begin_layout Labeling
20463 \labelwidthstring 00.00.0000
20464 Check-in:
20465 \family typewriter
20466  svn commit -q -m"<description>" "<file-name>"
20467 \begin_inset Newline newline
20468 \end_inset
20469
20470 svn unlock "<file-name>"
20471 \end_layout
20472
20473 \begin_layout Labeling
20474 \labelwidthstring 00.00.0000
20475 Check-out: 
20476 \family typewriter
20477 svn update "<file-name>"
20478 \begin_inset Newline newline
20479 \end_inset
20480
20481 svn lock "<file-name>"
20482 \end_layout
20483
20484 \begin_layout Subsubsection
20485
20486 \family typewriter
20487 \begin_inset CommandInset label
20488 LatexCommand label
20489 name "subsec:Automatical-Locking-Property"
20490
20491 \end_inset
20492
20493
20494 \family default
20495 Automatic Locking Property
20496 \end_layout
20497
20498 \begin_layout Standard
20499 The above mentioned automatic setting of write permissions of the .lyx file
20500  can be set through
20501 \family sans
20502 \bar under
20503  F
20504 \bar default
20505 ile\SpecialChar \menuseparator
20506
20507 \bar under
20508 V
20509 \bar default
20510 ersion
20511 \begin_inset space ~
20512 \end_inset
20513
20514 Control\SpecialChar \menuseparator
20515
20516 \bar under
20517 T
20518 \bar default
20519 oggle locking property
20520 \family default
20521 .
20522  This command is active only when the file is not locked on the svn server
20523  (i.e.
20524  you need to check-out before proceeding).
20525 \end_layout
20526
20527 \begin_layout Labeling
20528 \labelwidthstring 00.00.0000
20529 SVN
20530 \begin_inset space ~
20531 \end_inset
20532
20533 commands:
20534 \end_layout
20535
20536 \begin_layout Labeling
20537 \labelwidthstring 00.00.0000
20538 Set:
20539 \family typewriter
20540  svn propset svn:needs-lock ON "<file-name>"
20541 \end_layout
20542
20543 \begin_layout Labeling
20544 \labelwidthstring 00.00.0000
20545 Unset: 
20546 \family typewriter
20547 svn propdel svn:needs-lock "<file-name>"
20548 \end_layout
20549
20550 \begin_layout Subsubsection
20551 \begin_inset CommandInset label
20552 LatexCommand label
20553 name "sub:VCS-Revision-Information"
20554
20555 \end_inset
20556
20557 Revision Information in Documents
20558 \end_layout
20559
20560 \begin_layout Standard
20561 There are more possibilities how to activate revision information in our
20562  document.
20563 \end_layout
20564
20565 \begin_layout Itemize
20566 LyX supports directly:
20567 \end_layout
20568
20569 \begin_deeper
20570 \begin_layout Itemize
20571 tree revision information (
20572 \begin_inset Flex Code
20573 status collapsed
20574
20575 \begin_layout Plain Layout
20576 vcs-tree-revision
20577 \end_layout
20578
20579 \end_inset
20580
20581 ).
20582  The result is the output of the 
20583 \begin_inset Flex Code
20584 status collapsed
20585
20586 \begin_layout Plain Layout
20587 svnversion
20588 \end_layout
20589
20590 \end_inset
20591
20592  command, the following table gives you an idea, how to read the results.
20593 \end_layout
20594
20595 \begin_layout Standard
20596 \align center
20597 \begin_inset Tabular
20598 <lyxtabular version="3" rows="6" columns="2">
20599 <features tabularvalignment="middle">
20600 <column alignment="center" valignment="top" width="0">
20601 <column alignment="center" valignment="top" width="0">
20602 <row>
20603 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20604 \begin_inset Text
20605
20606 \begin_layout Plain Layout
20607 Output
20608 \end_layout
20609
20610 \end_inset
20611 </cell>
20612 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20613 \begin_inset Text
20614
20615 \begin_layout Plain Layout
20616 Meaning
20617 \end_layout
20618
20619 \end_inset
20620 </cell>
20621 </row>
20622 <row>
20623 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20624 \begin_inset Text
20625
20626 \begin_layout Plain Layout
20627 4123:4168
20628 \end_layout
20629
20630 \end_inset
20631 </cell>
20632 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20633 \begin_inset Text
20634
20635 \begin_layout Plain Layout
20636 mixed revision working copy
20637 \end_layout
20638
20639 \end_inset
20640 </cell>
20641 </row>
20642 <row>
20643 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20644 \begin_inset Text
20645
20646 \begin_layout Plain Layout
20647 4168M
20648 \end_layout
20649
20650 \end_inset
20651 </cell>
20652 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20653 \begin_inset Text
20654
20655 \begin_layout Plain Layout
20656 modified working copy
20657 \end_layout
20658
20659 \end_inset
20660 </cell>
20661 </row>
20662 <row>
20663 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20664 \begin_inset Text
20665
20666 \begin_layout Plain Layout
20667 4123S
20668 \end_layout
20669
20670 \end_inset
20671 </cell>
20672 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20673 \begin_inset Text
20674
20675 \begin_layout Plain Layout
20676 switched working copy
20677 \end_layout
20678
20679 \end_inset
20680 </cell>
20681 </row>
20682 <row>
20683 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20684 \begin_inset Text
20685
20686 \begin_layout Plain Layout
20687 4123P
20688 \end_layout
20689
20690 \end_inset
20691 </cell>
20692 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20693 \begin_inset Text
20694
20695 \begin_layout Plain Layout
20696 partial working copy, from a sparse checkout
20697 \end_layout
20698
20699 \end_inset
20700 </cell>
20701 </row>
20702 <row>
20703 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20704 \begin_inset Text
20705
20706 \begin_layout Plain Layout
20707 4123:4168MS
20708 \end_layout
20709
20710 \end_inset
20711 </cell>
20712 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20713 \begin_inset Text
20714
20715 \begin_layout Plain Layout
20716 mixed revision, modified, switched working copy
20717 \end_layout
20718
20719 \end_inset
20720 </cell>
20721 </row>
20722 </lyxtabular>
20723
20724 \end_inset
20725
20726
20727 \end_layout
20728
20729 \begin_layout Itemize
20730 file revision information.
20731  The result comes from parsing the output of 
20732 \begin_inset Flex Code
20733 status collapsed
20734
20735 \begin_layout Plain Layout
20736 svn
20737 \begin_inset space ~
20738 \end_inset
20739
20740 info
20741 \begin_inset space ~
20742 \end_inset
20743
20744 --xml
20745 \begin_inset space ~
20746 \end_inset
20747
20748 file.lyx
20749 \end_layout
20750
20751 \end_inset
20752
20753 .
20754  Supported flags are:
20755 \end_layout
20756
20757 \begin_deeper
20758 \begin_layout Itemize
20759 version number of the last commit (
20760 \begin_inset Flex Code
20761 status collapsed
20762
20763 \begin_layout Plain Layout
20764 vcs-revision
20765 \end_layout
20766
20767 \end_inset
20768
20769 )
20770 \end_layout
20771
20772 \begin_layout Itemize
20773 author of the last commit (
20774 \begin_inset Flex Code
20775 status collapsed
20776
20777 \begin_layout Plain Layout
20778 vcs-author
20779 \end_layout
20780
20781 \end_inset
20782
20783 )
20784 \end_layout
20785
20786 \begin_layout Itemize
20787 date of the last commit (
20788 \begin_inset Flex Code
20789 status collapsed
20790
20791 \begin_layout Plain Layout
20792 vcs-date
20793 \end_layout
20794
20795 \end_inset
20796
20797 )
20798 \end_layout
20799
20800 \begin_layout Itemize
20801 time of the last commit (
20802 \begin_inset Flex Code
20803 status collapsed
20804
20805 \begin_layout Plain Layout
20806 vcs-time
20807 \end_layout
20808
20809 \end_inset
20810
20811 )
20812 \end_layout
20813
20814 \end_deeper
20815 \begin_layout Standard
20816 You can obtain this info via InsetInfo (e.g.
20817  
20818 \begin_inset Flex Code
20819 status collapsed
20820
20821 \begin_layout Plain Layout
20822 info-insert buffer vcs-date
20823 \end_layout
20824
20825 \end_inset
20826
20827 ).
20828  The information will be available only when you have the file stored under
20829  svn managment (i.e.
20830  the 
20831 \begin_inset Flex Code
20832 status collapsed
20833
20834 \begin_layout Plain Layout
20835 .svn
20836 \end_layout
20837
20838 \end_inset
20839
20840  directory is available with your document).
20841 \end_layout
20842
20843 \end_deeper
20844 \begin_layout Itemize
20845 Another---a hacking one---possibility is to use svn keywords
20846 \begin_inset Foot
20847 status collapsed
20848
20849 \begin_layout Plain Layout
20850 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20851 \end_layout
20852
20853 \end_inset
20854
20855 .
20856  In short -- you set file keywords property (e.g.
20857  
20858 \family sans
20859 svn propset svn:keywords 'Rev' file.lyx
20860 \family default
20861 ) and then paste keyword TeX code
20862 \begin_inset Foot
20863 status collapsed
20864
20865 \begin_layout Plain Layout
20866 This is an easy way how to ensure that LyX won't break the line in the middle
20867  of keyword tag.
20868 \end_layout
20869
20870 \end_inset
20871
20872  tag in your document (e.g.
20873  
20874 \begin_inset ERT
20875 status open
20876
20877 \begin_layout Plain Layout
20878
20879 $Rev$
20880 \end_layout
20881
20882 \end_inset
20883
20884 ).
20885  This way svn client will automatically substitute revision number (e.g.
20886  
20887 \begin_inset ERT
20888 status open
20889
20890 \begin_layout Plain Layout
20891
20892 $Rev: 59 $
20893 \end_layout
20894
20895 \end_inset
20896
20897 ) after each update and commit.
20898  There are more problems with this approach.
20899  Firstly, the '$' character is used in TeX world for math equations, so
20900  any occurence of math formula 
20901 \begin_inset Formula $Rev$
20902 \end_inset
20903
20904  become 
20905 \begin_inset Formula $Rev:59$
20906 \end_inset
20907
20908  in your LyX document.
20909  Similarly for other keywords like Id, Date, Author, etc.
20910  Secondly svn output is dependent on your locales, so its very easy that
20911  svn would produce some problematic strings once Date is used.
20912  Thirdly you get the whole 'Rev: 59' string in your document instead of
20913  the plain number.
20914  Until subversion implements user's custom keywords it will be hard to use
20915  this approach reliably or let LyX to support it directly.
20916 \end_layout
20917
20918 \begin_layout Subsection
20919 SVN and Windows Environment
20920 \end_layout
20921
20922 \begin_layout Quote
20923 My inclination is to say that if the user cannot figure out the command
20924  line operations on their own fairly quickly, they would be well advised
20925  to use TortoiseSVN.
20926  ---P.
20927  A.
20928  Rubin
20929 \end_layout
20930
20931 \begin_layout Subsubsection
20932 Preparation
20933 \end_layout
20934
20935 \begin_layout Standard
20936 In addition to installing LyX, and having access to a Subversion repository,
20937  the user will need to install the Subversion client program.
20938  A Windows installer for the client program is available from 
20939 \begin_inset CommandInset href
20940 LatexCommand href
20941 name "CollabNet"
20942 target "http://www.collab.net/nonav/downloads/subversion/"
20943
20944 \end_inset
20945
20946 .
20947  The user may also want to install 
20948 \begin_inset CommandInset href
20949 LatexCommand href
20950 name "TortoiseSVN"
20951 target "http://tortoisesvn.tigris.org/"
20952
20953 \end_inset
20954
20955 , which integrates Subversion operations into the context (rightclick) menu
20956  of Windows Explorer.
20957  Operations done outside LyX will typically be more convenient using the
20958  Explorer context menu.
20959  Note that TortoiseSVN is not a replacement for the client program, which
20960  is what LyX itself will use.
20961 \end_layout
20962
20963 \begin_layout Subsubsection
20964 Bringing a document under Subversion control
20965 \end_layout
20966
20967 \begin_layout Standard
20968 Before a LyX document can be brought under version control in Subversion,
20969  its parent directory needs to be under version control.
20970  If the document is being added to a project already in the repository,
20971  this is accomplished by checking the project out to the directory where
20972  the new document will be placed.
20973  If the project itself is not yet under version control (for instance, if
20974  this document starts a new project), the directory must be imported into
20975  the repository.
20976  This is done outside LyX.
20977  Both import and checkout are easily accomplished from the Explorer context
20978  menu using TortoiseSVN, or alternatively can be done using the command
20979  line client at a DOS prompt.
20980  The procedure for importing the project using TortoiseSVN is described
20981  below, assuming an existing repository and a new project being started
20982  in 
20983 \family typewriter
20984 C:
20985 \backslash
20986 new project
20987 \family default
20988 .
20989  For information on using the Subversion client program, run 
20990 \family typewriter
20991 svn --help 
20992 \family default
20993 in a DOS shell.
20994 \end_layout
20995
20996 \begin_layout Enumerate
20997 Locate 
20998 \family typewriter
20999 C:
21000 \backslash
21001 new project 
21002 \family default
21003 in Windows Explorer, right click it, and select 
21004 \family typewriter
21005 TortoiseSVN > Repo-browser
21006 \family default
21007 .
21008  If necessary, adjust the URL for the repository, then click OK.
21009 \end_layout
21010
21011 \begin_layout Enumerate
21012 Right click the level of the repository under which you want to place the
21013  new project folder (typically the top level) and click 
21014 \family typewriter
21015 Create folder\SpecialChar \ldots{}
21016
21017 \family default
21018  Supply a name for the project folder and click OK.
21019  Add a message for the log file if desired, then click OK again.
21020  The new project folder should appear in the repository.
21021  Finally, click OK again to exit the repository browser.
21022 \end_layout
21023
21024 \begin_layout Enumerate
21025 Once again right click 
21026 \family typewriter
21027 C:
21028 \backslash
21029 new project
21030 \family default
21031 , this time selecting SVN Checkout\SpecialChar \ldots{}
21032  Select the URL of the project folder
21033  you just created in the repository, and set the checkout directory to 
21034 \family typewriter
21035 C:
21036 \backslash
21037 new project.
21038
21039 \family default
21040  Click OK.
21041  You will be warned about a non-empty folder; click OK to proceed.
21042  You should now have a 
21043 \family typewriter
21044 .svn
21045 \family default
21046  directory under 
21047 \family typewriter
21048 C:
21049 \backslash
21050 new project.
21051 \end_layout
21052
21053 \begin_layout Enumerate
21054 Create or open your document in LyX and click 
21055 \family sans
21056 \bar under
21057 F
21058 \bar default
21059 ile\SpecialChar \menuseparator
21060
21061 \bar under
21062 V
21063 \bar default
21064 ersion
21065 \begin_inset space ~
21066 \end_inset
21067
21068 Control\SpecialChar \menuseparator
21069
21070 \bar under
21071 R
21072 \bar default
21073 egister.
21074  
21075 \family default
21076 Add a log message and click OK to commit the document to version control.
21077 \end_layout
21078
21079 \begin_layout Standard
21080 From this point onward, you should have full functionality in the 
21081 \family sans
21082 \bar under
21083 F
21084 \bar default
21085 ile\SpecialChar \menuseparator
21086
21087 \bar under
21088 V
21089 \bar default
21090 ersion
21091 \begin_inset space ~
21092 \end_inset
21093
21094 Control
21095 \family default
21096  menu.
21097  You also have the option of checking the document in and out, viewing its
21098  history, etc.
21099  using the TortoiseSVN context menu in Windows Explorer or the Subversion
21100  client program from a command prompt.
21101 \end_layout
21102
21103 \begin_layout Subsubsection
21104 SSH tunnel used with SVN under Windows
21105 \end_layout
21106
21107 \begin_layout Standard
21108 Compared with Linux setting up svn client to communicate over ssh under
21109  Windows is a rather troublesome task.
21110  We will at least offer some hints how to setup the client side but prior
21111  knowledge about ssh and the Windows command line is needed, also be prepared
21112  for a great deal of frustration\SpecialChar \ldots{}
21113
21114 \end_layout
21115
21116 \begin_layout Enumerate
21117 Get a svn client for windows, as described in the previous sections.
21118  When it is a fresh install run some svn command (e.g.
21119  
21120 \begin_inset Flex Code
21121 status collapsed
21122
21123 \begin_layout Plain Layout
21124 svn --version
21125 \end_layout
21126
21127 \end_inset
21128
21129 ) to create config files, which you will need to change later on.
21130 \end_layout
21131
21132 \begin_layout Enumerate
21133 Choose a ssh client for Windows.
21134  There are several possibilities, we will use the one from Putty tools
21135 \begin_inset Foot
21136 status open
21137
21138 \begin_layout Plain Layout
21139 \begin_inset Flex URL
21140 status collapsed
21141
21142 \begin_layout Plain Layout
21143
21144 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21145 \end_layout
21146
21147 \end_inset
21148
21149
21150 \end_layout
21151
21152 \end_inset
21153
21154 .
21155  You will need to set the connection up so that the client doesn't ask for
21156  any password from you.
21157  To keep things easy we will use only keys without any additional password
21158  protection etc.
21159 \end_layout
21160
21161 \begin_deeper
21162 \begin_layout Enumerate
21163 Generate keys by 
21164 \begin_inset Flex Code
21165 status collapsed
21166
21167 \begin_layout Plain Layout
21168 puttygen
21169 \end_layout
21170
21171 \end_inset
21172
21173 .
21174  Save your private .ppk key file and put the public one on the server side.
21175  If the SVN server runs on Linux, note that the format of the public key
21176  is not compatible with Linux openssh and you will need to direcly copy-paste
21177  the key from the “
21178 \emph on
21179 Public key for pasting into OpenSSH authorized_keys file
21180 \emph default
21181 :” edit field into the server's 
21182 \begin_inset Flex Code
21183 status collapsed
21184
21185 \begin_layout Plain Layout
21186 ~/.ssh/authorized_keys
21187 \end_layout
21188
21189 \end_inset
21190
21191
21192 \begin_inset Flex Code
21193 status collapsed
21194
21195 \begin_layout Plain Layout
21196 authorized_keys2
21197 \end_layout
21198
21199 \end_inset
21200
21201  file.
21202 \end_layout
21203
21204 \begin_layout Enumerate
21205 Get the Putty's 
21206 \begin_inset Flex Code
21207 status collapsed
21208
21209 \begin_layout Plain Layout
21210 plink
21211 \end_layout
21212
21213 \end_inset
21214
21215 .
21216  In the SVN config file
21217 \begin_inset Foot
21218 status collapsed
21219
21220 \begin_layout Plain Layout
21221 Exact path depends on Windows version, usually somewhere around 
21222 \begin_inset Flex Code
21223 status collapsed
21224
21225 \begin_layout Plain Layout
21226 c:
21227 \backslash
21228 Documents and Settings
21229 \backslash
21230 user
21231 \backslash
21232 Application Data
21233 \backslash
21234 Subversion
21235 \backslash
21236 config
21237 \end_layout
21238
21239 \end_inset
21240
21241  / 
21242 \begin_inset Flex Code
21243 status collapsed
21244
21245 \begin_layout Plain Layout
21246 AppData
21247 \backslash
21248 Roaming
21249 \backslash
21250 Subversion
21251 \end_layout
21252
21253 \end_inset
21254
21255 .
21256 \end_layout
21257
21258 \end_inset
21259
21260 , section [tunnels], setup ssh command, e.g.
21261  
21262 \begin_inset Flex Code
21263 status collapsed
21264
21265 \begin_layout Plain Layout
21266 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21267 \end_layout
21268
21269 \end_inset
21270
21271 .
21272 \begin_inset Foot
21273 status collapsed
21274
21275 \begin_layout Plain Layout
21276 It will usually take a lot of time to get exact command right and it depends
21277  on many things.
21278  For example do not have some remote server saved as a default session in
21279  Putty etc.
21280  If things fail, try to connect via plink without SVN first.
21281 \end_layout
21282
21283 \end_inset
21284
21285
21286 \end_layout
21287
21288 \end_deeper
21289 \begin_layout Enumerate
21290 Checkout the SVN archive, e.g.
21291  
21292 \begin_inset Flex Code
21293 status collapsed
21294
21295 \begin_layout Plain Layout
21296 svn co svn+ssh://user@server/repository_path
21297 \end_layout
21298
21299 \end_inset
21300
21301 .
21302 \end_layout
21303
21304 \begin_layout Subsubsection
21305 End-of-Line Conversions
21306 \end_layout
21307
21308 \begin_layout Standard
21309 When the collsraborators are mixing Linux and Windows environments, LyX
21310  will use different line endings inside the .lyx files.
21311  This is not a problem as far as LyX functionality is concerned, but the
21312  commit diffs will be huge and merge-conflicts prone.
21313  Fortunately SVN itself knows
21314 \begin_inset Foot
21315 status collapsed
21316
21317 \begin_layout Plain Layout
21318 \begin_inset Flex URL
21319 status collapsed
21320
21321 \begin_layout Plain Layout
21322
21323 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21324 \end_layout
21325
21326 \end_inset
21327
21328
21329 \end_layout
21330
21331 \end_inset
21332
21333  how to deal with CR/LF problems when switching .lyx files to the 
21334 \begin_inset Flex Code
21335 status collapsed
21336
21337 \begin_layout Plain Layout
21338 native
21339 \end_layout
21340
21341 \end_inset
21342
21343  mode.
21344 \begin_inset Foot
21345 status collapsed
21346
21347 \begin_layout Plain Layout
21348 For the lazy guys: 
21349 \begin_inset Flex Code
21350 status collapsed
21351
21352 \begin_layout Plain Layout
21353 svn propset svn:eol-style native FILE_NAME
21354 \end_layout
21355
21356 \end_inset
21357
21358
21359 \end_layout
21360
21361 \end_inset
21362
21363
21364 \end_layout
21365
21366 \begin_layout Subsection
21367 Further tuning
21368 \end_layout
21369
21370 \begin_layout Standard
21371 With the recent addition of the vc-command function LyX power users are
21372  allowed to create their own commands for revision control.
21373 \end_layout
21374
21375 \begin_layout Standard
21376 As an example you can see how two TortoiseSVN commands could be integrated
21377  directly:
21378 \end_layout
21379
21380 \begin_layout Description
21381 Commit: 
21382 \begin_inset Flex Code
21383 status collapsed
21384
21385 \begin_layout Plain Layout
21386 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21387 \end_layout
21388
21389 \end_inset
21390
21391
21392 \end_layout
21393
21394 \begin_layout Description
21395 Revert: 
21396 \begin_inset Flex Code
21397 status collapsed
21398
21399 \begin_layout Plain Layout
21400 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21401 \end_layout
21402
21403 \end_inset
21404
21405
21406 \end_layout
21407
21408 \begin_layout Subsection
21409 Version control and Document comparison
21410 \end_layout
21411
21412 \begin_layout Standard
21413 One of the typical uses of version control is to inspect the changes between
21414  revisions, usually by creating 
21415 \begin_inset Flex Code
21416 status collapsed
21417
21418 \begin_layout Plain Layout
21419 diff
21420 \end_layout
21421
21422 \end_inset
21423
21424  dumps.
21425  While this is useful for plain text files, it is much less useful in the
21426  case of LyX files, which have more complicated structure.
21427  Hence we provide binding to the Document comparison feature.
21428  They are two ways of calling this feature - either by direct call of 
21429 \begin_inset Flex Code
21430 status collapsed
21431
21432 \begin_layout Plain Layout
21433 VC_COMPARE
21434 \end_layout
21435
21436 \end_inset
21437
21438  LyX function (for details see LyX functions manual) or by icon/menu item
21439  
21440 \begin_inset Flex MenuItem
21441 status collapsed
21442
21443 \begin_layout Plain Layout
21444 Compare with older revision...
21445 \end_layout
21446
21447 \end_inset
21448
21449 .
21450  One can either compare two chosen revisions of the document or he can simply
21451  compare the current version of edited text with older revisions (where
21452  '
21453 \begin_inset Flex MenuItem
21454 status collapsed
21455
21456 \begin_layout Plain Layout
21457 0
21458 \end_layout
21459
21460 \end_inset
21461
21462 ' revisions back means comparison of the edited file with last commited
21463  revision).
21464  
21465 \end_layout
21466
21467 \begin_layout Standard
21468 This feature is supported for SVN and RCS though due to the more complicated
21469  versioning scheme of RCS there is a constraint -- when addressing the revisions
21470  in dialog, numbers always point to the last number in RCS revision number,
21471  i.e.
21472  '35' in '1.2.35'.
21473 \end_layout
21474
21475 \begin_layout Section
21476 Literate Programming
21477 \end_layout
21478
21479 \begin_layout Standard
21480 Updated by 
21481 \noun on
21482 Kayvan Sylvan 
21483 \noun default
21484 (kayvan@sylvan.com)
21485 \noun on
21486
21487 \noun default
21488 original documentation written by 
21489 \noun on
21490 Edmar Wienskoski Jr.
21491
21492 \noun default
21493  (edmar-w-jr@technologist.com)
21494 \end_layout
21495
21496 \begin_layout Subsection
21497 Introduction
21498 \end_layout
21499
21500 \begin_layout Standard
21501 The main purpose of this documentation is to show you how to use LyX for
21502  literate programming, where it is assumed that you are familiar with this
21503  programming technique, and know what 
21504 \begin_inset Quotes eld
21505 \end_inset
21506
21507 tangling
21508 \begin_inset Quotes erd
21509 \end_inset
21510
21511  and 
21512 \begin_inset Quotes eld
21513 \end_inset
21514
21515 weaving
21516 \begin_inset Quotes erd
21517 \end_inset
21518
21519  means.
21520  If that is not the case, please follow the web links provided in the following
21521  sections.
21522  There is a lot of good documentation out there covering old development
21523  history to the latest tools tips.
21524 \end_layout
21525
21526 \begin_layout Standard
21527 It is also assumed that you are familiar with LyX itself to a point that
21528  you are comfortable changing your LyX preferences, and X resources file.
21529  If that is not the case please refer to other LyX documentation to cover
21530  your specific needs.
21531 \end_layout
21532
21533 \begin_layout Subsection
21534 Literate Programming
21535 \end_layout
21536
21537 \begin_layout Standard
21538 From the Literate Programming FAQ: 
21539 \end_layout
21540
21541 \begin_layout Quotation
21542 Literate programming is the combination of documentation and source together
21543  in a fashion suited for reading by human beings.
21544  In fact, literate programs should be enjoyable reading, even inviting!
21545  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21546  and documentation in a single file.
21547  Literate programming tools then parse the file to produce either readable
21548  documentation or compilable source.
21549  The WEB style of literate programming was created by D.
21550 \begin_inset space \thinspace{}
21551 \end_inset
21552
21553 E.
21554  Knuth during the development of his TeX typesetting software.
21555  
21556 \end_layout
21557
21558 \begin_layout Standard
21559 Another excerpt says:
21560 \end_layout
21561
21562 \begin_layout Quotation
21563
21564 \emph on
21565 How is literate programming different from verbose commenting?
21566 \end_layout
21567
21568 \begin_layout Quotation
21569 There are three distinguishing characteristics.
21570  In order of importance, they are: 
21571 \end_layout
21572
21573 \begin_deeper
21574 \begin_layout Itemize
21575 flexible order of elaboration 
21576 \end_layout
21577
21578 \begin_layout Itemize
21579 automatic support for browsing 
21580 \end_layout
21581
21582 \begin_layout Itemize
21583 typeset documentation, especially diagrams and mathematics 
21584 \end_layout
21585
21586 \end_deeper
21587 \begin_layout Standard
21588 Now that I sparked your curiosity, take a look in the references.
21589 \end_layout
21590
21591 \begin_layout Subsubsection
21592 References
21593 \end_layout
21594
21595 \begin_layout Standard
21596 The complete Literate Programming FAQ can be found at:
21597 \end_layout
21598
21599 \begin_layout Quote
21600 Literate Programming FAQ 
21601 \begin_inset Flex URL
21602 status collapsed
21603
21604 \begin_layout Plain Layout
21605
21606 http://www.literateprogramming.com/lpfaq.pdf
21607 \end_layout
21608
21609 \end_inset
21610
21611
21612 \end_layout
21613
21614 \begin_layout Standard
21615 The FAQ lists 23 (twenty three!) different literate programming tools.
21616  Where some are specialized or 
21617 \begin_inset Quotes eld
21618 \end_inset
21619
21620 tailored
21621 \begin_inset Quotes erd
21622 \end_inset
21623
21624  for particular programming languages, while other have general scope.
21625  I selected 
21626 \noun on
21627 Noweb
21628 \noun default
21629  for my own use for several reasons:
21630 \end_layout
21631
21632 \begin_layout Itemize
21633 It can generate the documentation either in LaTeX or HTML.
21634 \end_layout
21635
21636 \begin_layout Itemize
21637 It has a open architecture, i.
21638 \begin_inset space \thinspace{}
21639 \end_inset
21640
21641 g.
21642 \begin_inset space \space{}
21643 \end_inset
21644
21645 it is easy to plug in new filters and to perform special processing that
21646  you may need.
21647  
21648 \end_layout
21649
21650 \begin_layout Itemize
21651 There is a good selection of filters available already (the HTML is one
21652  of them).
21653 \end_layout
21654
21655 \begin_layout Itemize
21656 It is free.
21657 \end_layout
21658
21659 \begin_layout Standard
21660 The Noweb web page can be found at: 
21661 \end_layout
21662
21663 \begin_layout Quote
21664 Noweb home page 
21665 \begin_inset Flex URL
21666 status collapsed
21667
21668 \begin_layout Plain Layout
21669
21670 http://www.cs.virginia.edu/~nr/noweb/
21671 \end_layout
21672
21673 \end_inset
21674
21675
21676 \end_layout
21677
21678 \begin_layout Standard
21679 Starting from there you can reach many other interesting links and even
21680  some literate program examples.
21681 \end_layout
21682
21683 \begin_layout Subsection
21684 LyX and Literate Programming
21685 \end_layout
21686
21687 \begin_layout Standard
21688 The LyX support for Literate Programming is provided by using the generic
21689  LyX converters mechanism.
21690  This support is provided in a 
21691 \begin_inset Quotes eld
21692 \end_inset
21693
21694 Noweb independent
21695 \begin_inset Quotes erd
21696 \end_inset
21697
21698  way, i.
21699 \begin_inset space \thinspace{}
21700 \end_inset
21701
21702 g.
21703 \begin_inset space \space{}
21704 \end_inset
21705
21706 you will be able to use this new LyX feature with some other literate programmin
21707 g tool of your choice by just changing your LyX preferences.
21708 \end_layout
21709
21710 \begin_layout Subsubsection
21711 Generating documents and code (weaving and tangling)
21712 \end_layout
21713
21714 \begin_layout Paragraph
21715 Selecting the document class
21716 \end_layout
21717
21718 \begin_layout Standard
21719 If you have installed Noweb and LyX successfully, whenever you open a new
21720  document or try to change the document class of an existing one, you will
21721  find that there are three new document classes available:
21722 \end_layout
21723
21724 \begin_layout Itemize
21725 Article (Noweb)
21726 \end_layout
21727
21728 \begin_layout Itemize
21729 Book (Noweb)
21730 \end_layout
21731
21732 \begin_layout Itemize
21733 Report (Noweb)
21734 \end_layout
21735
21736 \begin_layout Standard
21737 You must select one of them to create your literate documents from.
21738  
21739 \end_layout
21740
21741 \begin_layout Standard
21742 Note that literate documents are not limited to these three classes.
21743  New classes can be generated from other styles like letter or in combination
21744  with other class variations like Article (AMS).
21745  If you have special needs that cannot be covered by one of the existing
21746  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21747  will arrange to insert a new entry, or teach you how to do it.
21748 \begin_inset Foot
21749 status collapsed
21750
21751 \begin_layout Plain Layout
21752 It is very simple, it involves the creation of a file with four lines, and
21753  re-running of the auto configuration.
21754 \end_layout
21755
21756 \end_inset
21757
21758  Moreover, if you use a literate tool other than Noweb you may need to create
21759  a new set of document classes for it.
21760 \end_layout
21761
21762 \begin_layout Paragraph
21763 Typing code in
21764 \end_layout
21765
21766 \begin_layout Standard
21767 LyX enables you to write code with a layout named 
21768 \noun on
21769 Scrap
21770 \noun default
21771 .
21772 \begin_inset Foot
21773 status collapsed
21774
21775 \begin_layout Plain Layout
21776 The equivalent Noweb term is 
21777 \begin_inset Quotes eld
21778 \end_inset
21779
21780 Chunk
21781 \begin_inset Quotes erd
21782 \end_inset
21783
21784 .
21785  For historical reasons, I got used to the term 
21786 \begin_inset Quotes eld
21787 \end_inset
21788
21789 scrap
21790 \begin_inset Quotes erd
21791 \end_inset
21792
21793  introduced by other literate tool named Nuweb, which I used for many years
21794  before rendering myself to Noweb.
21795 \end_layout
21796
21797 \end_inset
21798
21799  Noweb delimits scraps like this:
21800 \end_layout
21801
21802 \begin_layout LyX-Code
21803 <<My scrap>>=
21804 \end_layout
21805
21806 \begin_layout LyX-Code
21807   code
21808 \end_layout
21809
21810 \begin_layout LyX-Code
21811   more code
21812 \end_layout
21813
21814 \begin_layout LyX-Code
21815   even more code
21816 \end_layout
21817
21818 \begin_layout LyX-Code
21819   @
21820 \end_layout
21821
21822 \begin_layout Standard
21823 The problem is that whatever is written in between the << and the 
21824 \family typewriter
21825 @
21826 \family default
21827  must be taken literally, i.
21828 \begin_inset space \thinspace{}
21829 \end_inset
21830
21831 g.
21832 \begin_inset space \space{}
21833 \end_inset
21834
21835 LyX should be prevented from making any special interpretation of what has
21836  been written.
21837  This is handled by a special layout named Scrap, that works like a normal
21838  paragraph but has a free spacing capability.
21839 \end_layout
21840
21841 \begin_layout Standard
21842 The down side of the Scrap paragraph layout is that consecutive paragraphs
21843  of code will be spaced with one empty line in the source code and also
21844  in the printed documentation.
21845  The work around is to enter each line of code within a single Scrap, with
21846  a newline (ctrl-return).
21847  The example above will look like this:
21848 \begin_inset Foot
21849 status collapsed
21850
21851 \begin_layout Plain Layout
21852 If you have a printed version of this document you will not see any difference
21853  between the previous example and this one.
21854 \end_layout
21855
21856 \end_inset
21857
21858
21859 \end_layout
21860
21861 \begin_layout LyX-Code
21862 <<My scrap>>=
21863 \begin_inset Newline newline
21864 \end_inset
21865
21866   code
21867 \begin_inset Newline newline
21868 \end_inset
21869
21870   more code
21871 \begin_inset Newline newline
21872 \end_inset
21873
21874   even more code
21875 \begin_inset Newline newline
21876 \end_inset
21877
21878   @
21879 \end_layout
21880
21881 \begin_layout Standard
21882 This layout works fine.
21883  The only real inconvenience is that you have to type ctrl-return instead
21884  of a plain return.
21885 \begin_inset Foot
21886 status collapsed
21887
21888 \begin_layout Plain Layout
21889 It is in my list of 
21890 \begin_inset Quotes eld
21891 \end_inset
21892
21893 improvements
21894 \begin_inset Quotes erd
21895 \end_inset
21896
21897  to fix that.
21898 \end_layout
21899
21900 \end_inset
21901
21902
21903 \end_layout
21904
21905 \begin_layout Standard
21906 As a special note, you can also use the 
21907 \begin_inset Quotes eld
21908 \end_inset
21909
21910 %def
21911 \begin_inset Quotes erd
21912 \end_inset
21913
21914  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21915 rence:
21916 \end_layout
21917
21918 \begin_layout LyX-Code
21919 <<My scrap>>=
21920 \begin_inset Newline newline
21921 \end_inset
21922
21923   def some_function(args):
21924 \begin_inset Newline newline
21925 \end_inset
21926
21927     "This is the doc string for this function."
21928 \begin_inset Newline newline
21929 \end_inset
21930
21931     print "My args: ", args
21932 \end_layout
21933
21934 \begin_layout LyX-Code
21935 @ %def some_function
21936 \end_layout
21937
21938 \begin_layout Standard
21939 For an example of this usage and the resulting cross-reference output, look
21940  at the Literate python program in 
21941 \emph on
21942 LIBDIR/examples/listerrors.lyx
21943 \emph default
21944  which should make this all clear.
21945 \end_layout
21946
21947 \begin_layout Paragraph
21948 Generating the documentation
21949 \end_layout
21950
21951 \begin_layout Standard
21952 At this point you already have a new document file with a proper document
21953  class, and with some code and text on it.
21954  How do I print it? The answer is simple, you select 
21955 \family sans
21956 View\SpecialChar \menuseparator
21957 DVI,
21958 \family default
21959  etc.
21960  Just like you would do for a plain document.
21961  No special procedure is required.
21962 \end_layout
21963
21964 \begin_layout Standard
21965 To help orientate you, I will now explain what happens inside LyX:
21966 \end_layout
21967
21968 \begin_layout Enumerate
21969 When the 
21970 \family sans
21971 Update\SpecialChar \menuseparator
21972 DVI
21973 \family default
21974  menu option is chosen, a LaTeX file is generated.
21975  
21976 \end_layout
21977
21978 \begin_deeper
21979 \begin_layout Standard
21980 If the document is of any literate class the generated file will be named
21981  with an extension name defined by the 
21982 \begin_inset Quotes eld
21983 \end_inset
21984
21985 literate
21986 \begin_inset Quotes erd
21987 \end_inset
21988
21989  format (defined in the Preferences panel), otherwise the file will have
21990  the usual 
21991 \family typewriter
21992 .tex
21993 \family default
21994  extension.
21995 \end_layout
21996
21997 \end_deeper
21998 \begin_layout Enumerate
21999 Note that the only difference so far is in the name of the file, no special
22000  processing is required by LyX.
22001  Given that you formatted the code using the Scrap layout that, by itself,
22002  takes care of the business.
22003 \end_layout
22004
22005 \begin_layout Enumerate
22006 If the document is of any literate class LyX will then use the internal
22007  LyX to Noweb converter, followed by the Noweb to LaTeX converter
22008 \begin_inset Foot
22009 status collapsed
22010
22011 \begin_layout Plain Layout
22012 The converters are defined in the 
22013 \family sans
22014 Tools\SpecialChar \menuseparator
22015 Preferences
22016 \family default
22017  panel, under the 
22018 \begin_inset Quotes eld
22019 \end_inset
22020
22021 Conversion
22022 \begin_inset Quotes erd
22023 \end_inset
22024
22025  tab.
22026  See section 
22027 \emph on
22028 Converters
22029 \emph default
22030  of the 
22031 \emph on
22032 Customization
22033 \emph default
22034  manual for general information about converters.
22035 \end_layout
22036
22037 \end_inset
22038
22039  to generate the LaTeX file.
22040 \end_layout
22041
22042 \begin_deeper
22043 \begin_layout Standard
22044 Otherwise it will just skip this step.
22045 \end_layout
22046
22047 \end_deeper
22048 \begin_layout Enumerate
22049 Finally, LaTeX is invoked and the regular post processing continues as in
22050  a plain document.
22051 \end_layout
22052
22053 \begin_layout Standard
22054 Independence from a particular 
22055 \begin_inset Quotes eld
22056 \end_inset
22057
22058 literate tool
22059 \begin_inset Quotes erd
22060 \end_inset
22061
22062  is easily achieved by changing the commands that are run by the various
22063  converters.
22064 \end_layout
22065
22066 \begin_layout Paragraph
22067 Generating the code
22068 \end_layout
22069
22070 \begin_layout Standard
22071 When the build menu option is chosen or the corresponding button in the
22072  toolbar is pressed, a LaTeX file is generated just like step 1 above.
22073  Next, LyX invokes the 
22074 \family typewriter
22075 Noweb->Program
22076 \family default
22077  converter.
22078  This converter needs to be defined by the user and is not installed by
22079  default, though the Program format is.
22080  This converter (like any other converter) will have two parts:
22081 \end_layout
22082
22083 \begin_layout Enumerate
22084 The converter program itself.
22085  This program performs the conversion from the one format to the other (in
22086  this case, from the Noweb format to the Program pseudo-format).
22087 \end_layout
22088
22089 \begin_layout Enumerate
22090 The error log parser.
22091  This is a program whose sole purpose is to rewrite error messages in a
22092  format that LyX understands.
22093  This makes it possible for LyX to place error boxes in the right places
22094  in the file buffer.
22095 \end_layout
22096
22097 \begin_layout Standard
22098 The first part, the 
22099 \begin_inset Quotes eld
22100 \end_inset
22101
22102 Converter
22103 \begin_inset Quotes erd
22104 \end_inset
22105
22106  setting, should be set to 
22107 \begin_inset Quotes eld
22108 \end_inset
22109
22110
22111 \family typewriter
22112 build-script $$i
22113 \family default
22114
22115 \begin_inset Quotes erd
22116 \end_inset
22117
22118 .
22119  This basically means that LyX will call 
22120 \begin_inset Quotes eld
22121 \end_inset
22122
22123 build-script
22124 \begin_inset Quotes erd
22125 \end_inset
22126
22127  (a program or script) with the name of the Noweb file (normally a file
22128  in the LyX temp directory).
22129  
22130 \end_layout
22131
22132 \begin_layout Standard
22133 This is an implementation of 
22134 \begin_inset Quotes eld
22135 \end_inset
22136
22137 build-script
22138 \begin_inset Quotes erd
22139 \end_inset
22140
22141  that you can place in a directory on your path:
22142 \end_layout
22143
22144 \begin_layout LyX-Code
22145 #!/bin/sh
22146 \end_layout
22147
22148 \begin_layout LyX-Code
22149 #
22150 \end_layout
22151
22152 \begin_layout LyX-Code
22153 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22154 \end_layout
22155
22156 \begin_layout Standard
22157 The next part of the converter setting is the 
22158 \begin_inset Quotes eld
22159 \end_inset
22160
22161 Flags
22162 \begin_inset Quotes erd
22163 \end_inset
22164
22165  which is to be set to 
22166 \begin_inset Quotes eld
22167 \end_inset
22168
22169
22170 \family typewriter
22171 parselog=listerrors
22172 \family default
22173
22174 \begin_inset Quotes erd
22175 \end_inset
22176
22177 .
22178  This will run any errors that are generated by the 
22179 \begin_inset Quotes eld
22180 \end_inset
22181
22182 build-script
22183 \begin_inset Quotes erd
22184 \end_inset
22185
22186  process through the 
22187 \begin_inset Quotes eld
22188 \end_inset
22189
22190 listerrors
22191 \begin_inset Quotes erd
22192 \end_inset
22193
22194  program.
22195 \end_layout
22196
22197 \begin_layout Standard
22198 The converter code looks in 
22199 \emph on
22200 MYLYXDIR/scripts
22201 \emph default
22202  first, then in 
22203 \emph on
22204 LIBDIR/scripts
22205 \emph default
22206  then on the path for the 
22207 \begin_inset Quotes eld
22208 \end_inset
22209
22210 listerrors
22211 \begin_inset Quotes erd
22212 \end_inset
22213
22214  program.
22215 \end_layout
22216
22217 \begin_layout Standard
22218 The build will normally take place in LyX's temporary directory, so the
22219  files produced by the conversion will be in that directory.
22220  LyX will copy out what it regards as the `main' file, but the 
22221 \family typewriter
22222 Noweb->Program
22223 \family default
22224  conversion may produce several files, and so most of these would then be
22225  deleted when LyX was closed.
22226  The present solution is to use a `copier',
22227 \begin_inset Foot
22228 status collapsed
22229
22230 \begin_layout Plain Layout
22231 See section 
22232 \emph on
22233 Copiers
22234 \emph default
22235  of the 
22236 \emph on
22237 Customization
22238 \emph default
22239  manual for information on these.
22240 \end_layout
22241
22242 \end_inset
22243
22244  in this case, the 
22245 \family typewriter
22246 ext_copy.py
22247 \family default
22248  script in its default mode, so that the entire contents of the temporary
22249  directory is copied.
22250  More will get copied than is needed, to be sure, but nothing will be lost.
22251  If, however, you know what extensions the generated files will have, this
22252  can be improved by using the 
22253 \family typewriter
22254 -e
22255 \family default
22256  option to 
22257 \family typewriter
22258 ext_copy
22259 \family default
22260 .
22261  This option takes a comma-separated list of extensions to copy.
22262  So, for example, if the conversion will generate only files with the extensions
22263  
22264 \family typewriter
22265 .c
22266 \family default
22267  and 
22268 \family typewriter
22269 .h
22270 \family default
22271 , then the correct definition would be:
22272 \end_layout
22273
22274 \begin_layout LyX-Code
22275 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22276 \end_layout
22277
22278 \begin_layout Standard
22279 The result will be that only files with these two extensions will be copied
22280  out.
22281 \end_layout
22282
22283 \begin_layout Paragraph
22284 Build instructions in the document
22285 \end_layout
22286
22287 \begin_layout Standard
22288 The last piece of the integration between LyX and noweb is the 
22289 \begin_inset Quotes eld
22290 \end_inset
22291
22292 build-script
22293 \begin_inset Quotes erd
22294 \end_inset
22295
22296  scrap.
22297  Generally, the instructions for building your program should be embedded
22298  in a scrap of its own.
22299  The noweb-specific 
22300 \begin_inset Quotes eld
22301 \end_inset
22302
22303 build-script
22304 \begin_inset Quotes erd
22305 \end_inset
22306
22307  above uses the notangle command to look for this scrap (called 
22308 \begin_inset Quotes eld
22309 \end_inset
22310
22311 build-script
22312 \begin_inset Quotes erd
22313 \end_inset
22314
22315 ) and runs its contents through 
22316 \begin_inset Quotes eld
22317 \end_inset
22318
22319 sh
22320 \begin_inset Quotes erd
22321 \end_inset
22322
22323 .
22324 \end_layout
22325
22326 \begin_layout Standard
22327 Typically, such a scrap would look something like this:
22328 \end_layout
22329
22330 \begin_layout LyX-Code
22331 <<build-script>>=
22332 \begin_inset Newline newline
22333 \end_inset
22334
22335 #!/bin/sh
22336 \begin_inset Newline newline
22337 \end_inset
22338
22339
22340 \begin_inset Newline newline
22341 \end_inset
22342
22343 if [ -z "${NOWEB_SOURCE}" ]
22344 \begin_inset Newline newline
22345 \end_inset
22346
22347 then
22348 \begin_inset Newline newline
22349 \end_inset
22350
22351   NOWEB_SOURCE=myfile.nw
22352 \begin_inset Newline newline
22353 \end_inset
22354
22355 fi
22356 \begin_inset Newline newline
22357 \end_inset
22358
22359 [...
22360  code to extract files ...]
22361 \begin_inset Newline newline
22362 \end_inset
22363
22364 [...
22365  code to compile files ...]
22366 \begin_inset Newline newline
22367 \end_inset
22368
22369 @
22370 \end_layout
22371
22372 \begin_layout Standard
22373 Look in 
22374 \emph on
22375 LIBDIR/examples/listerrors.lyx
22376 \emph default
22377  or in 
22378 \emph on
22379 LIBDIR/examples/Literate.lyx
22380 \emph default
22381  which implement two versions of the 
22382 \begin_inset Quotes eld
22383 \end_inset
22384
22385 listerrors
22386 \begin_inset Quotes erd
22387 \end_inset
22388
22389  program for some illustrations of how all of these pieces go together or
22390  in 
22391 \emph on
22392 LIBDIR/examples/noweb2lyx.lyx.
22393
22394 \emph default
22395  Interestingly, these three files show off the language-indepence of the
22396  LyX literate programming support since they are written in Python, C and
22397  Perl respectively.
22398 \end_layout
22399
22400 \begin_layout Subsubsection
22401 Configuring LyX
22402 \end_layout
22403
22404 \begin_layout Standard
22405 All the Literate Programming support is configured by the 
22406 \family sans
22407 Tools\SpecialChar \menuseparator
22408 Preferences
22409 \family default
22410  panel in the 
22411 \begin_inset Quotes eld
22412 \end_inset
22413
22414 Conversion
22415 \begin_inset Quotes erd
22416 \end_inset
22417
22418  tab.
22419  The important parts are:
22420 \end_layout
22421
22422 \begin_layout Description
22423 the
22424 \begin_inset space ~
22425 \end_inset
22426
22427
22428 \begin_inset Quotes eld
22429 \end_inset
22430
22431 literate
22432 \begin_inset Quotes erd
22433 \end_inset
22434
22435
22436 \begin_inset space ~
22437 \end_inset
22438
22439 format Set up via the Formats tab, this is where the Noweb-specific pieces
22440  are set up.
22441  The 
22442 \family sans
22443 GUI Name
22444 \family default
22445  is set to 
22446 \family typewriter
22447 NoWeb
22448 \family default
22449 , the file extension is set to 
22450 \family typewriter
22451 .nw
22452 \family default
22453 .
22454  This tells LyX to create a file with a 
22455 \family typewriter
22456 .nw
22457 \family default
22458  extension in the first step of the conversion process.
22459 \end_layout
22460
22461 \begin_layout Description
22462 the
22463 \begin_inset space ~
22464 \end_inset
22465
22466
22467 \family sans
22468 Program
22469 \family default
22470
22471 \begin_inset space ~
22472 \end_inset
22473
22474 format This is an empty format whose sole purpose is to be the endpoint
22475  of a conversion (which then allows us to set up a converter for it).
22476 \end_layout
22477
22478 \begin_layout Description
22479
22480 \family sans
22481 NoWeb
22482 \family default
22483 ->
22484 \family sans
22485 LaTeX
22486 \family default
22487  This converter performs the 
22488 \begin_inset Quotes eld
22489 \end_inset
22490
22491 weaving
22492 \begin_inset Quotes erd
22493 \end_inset
22494
22495  of the literate document.
22496  For Noweb, it is set to 
22497 \begin_inset Quotes eld
22498 \end_inset
22499
22500
22501 \family typewriter
22502 noweave -delay -index $$i > $$o
22503 \family default
22504
22505 \begin_inset Quotes erd
22506 \end_inset
22507
22508
22509 \end_layout
22510
22511 \begin_layout Description
22512
22513 \family sans
22514 NoWeb
22515 \family default
22516 ->
22517 \family sans
22518 Program
22519 \family default
22520  This performs the 
22521 \begin_inset Quotes eld
22522 \end_inset
22523
22524 tangling step
22525 \begin_inset Quotes erd
22526 \end_inset
22527
22528 .
22529  As stated above, the Converter is set to 
22530 \begin_inset Quotes eld
22531 \end_inset
22532
22533
22534 \family typewriter
22535 build-script $$i
22536 \family default
22537
22538 \begin_inset Quotes erd
22539 \end_inset
22540
22541 , with Flags set to 
22542 \begin_inset Quotes eld
22543 \end_inset
22544
22545
22546 \family typewriter
22547 originaldir,parselog=listerrors
22548 \family default
22549
22550 \begin_inset Quotes erd
22551 \end_inset
22552
22553 .
22554 \end_layout
22555
22556 \begin_layout Subsubsection
22557 Debug extensions
22558 \end_layout
22559
22560 \begin_layout Standard
22561 There is also a new function implemented in the LyX server, the 
22562 \begin_inset Quotes eld
22563 \end_inset
22564
22565 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22566  
22567 \end_layout
22568
22569 \begin_layout Standard
22570 When debugging code with ddd/gdb, it is possible to invoke a text editor
22571  at the current execution position with a single key stroke.
22572  The default ddd configuration for that is shift-ctrl-V.
22573  It happens that you can define the editor command line invocation in ddd
22574  by accessing the 
22575 \family sans
22576 Edit\SpecialChar \menuseparator
22577 Preferences\SpecialChar \menuseparator
22578 Helpers
22579 \family default
22580  dialog and changing the "Edit Sources" entry.
22581 \end_layout
22582
22583 \begin_layout Standard
22584 I take advantage of the new created LyX server function and this ddd feature,
22585  and set 
22586 \begin_inset Quotes eld
22587 \end_inset
22588
22589 Edit Sources
22590 \begin_inset Quotes erd
22591 \end_inset
22592
22593  to:
22594 \end_layout
22595
22596 \begin_layout LyX-Code
22597 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22598 \end_layout
22599
22600 \begin_layout Standard
22601 With this, whenever you are using ddd and find a point in the program that
22602  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22603  ddd you forward this information to LyX through the LyX server and then
22604  the LyX window will show the same file with the cursor at the same position
22605  ddd was pointing to.
22606  No more guessing or long scrolling to locate a point in the program back
22607  from debugging !
22608 \end_layout
22609
22610 \begin_layout Standard
22611 Note however that you must enable the LyX server to get this feature working
22612  (it is disabled by default).
22613  You can enable it in 
22614 \family sans
22615 Preferences
22616 \family default
22617  (tabs 
22618 \family sans
22619 Inputs
22620 \family default
22621
22622 \family sans
22623 Paths
22624 \family default
22625 ) by entering in the 
22626 \family sans
22627 LyXserver pipe
22628 \family default
22629  a path like 
22630 \begin_inset Quotes eld
22631 \end_inset
22632
22633
22634 \family typewriter
22635 /home/<your-home-directory>/.lyx/lyxpipe
22636 \family default
22637
22638 \begin_inset Quotes erd
22639 \end_inset
22640
22641
22642 \end_layout
22643
22644 \begin_layout Standard
22645 Read the LyX server documentation in the 
22646 \emph on
22647 Customization Manual
22648 \emph default
22649  for further information.
22650 \end_layout
22651
22652 \begin_layout Subsubsection
22653 Toolbar extensions
22654 \end_layout
22655
22656 \begin_layout Standard
22657 There are six new buttons that can be added to your LyX toolbar.
22658  Five of these buttons are short cuts to layout styles: 
22659 \family sans
22660 Standard
22661 \family default
22662
22663 \family sans
22664 Section
22665 \family default
22666
22667 \family sans
22668 LaTeX
22669 \family default
22670
22671 \family sans
22672 LyX-Code
22673 \family default
22674 , and 
22675 \family sans
22676 Scrap
22677 \family default
22678 .
22679  The last one is a short cut to the 
22680 \begin_inset Quotes eld
22681 \end_inset
22682
22683 Build Program
22684 \begin_inset Quotes erd
22685 \end_inset
22686
22687  File menu entry.
22688  
22689 \end_layout
22690
22691 \begin_layout Standard
22692 LyX has a range of buttons that are available for tool bar customization.
22693  In my toolbar I like to combine the six short cuts above with two more:
22694  One for 
22695 \family sans
22696 View
22697 \family default
22698 \SpecialChar \menuseparator
22699
22700 \family sans
22701 Update
22702 \family default
22703 \SpecialChar \menuseparator
22704
22705 \family sans
22706 DVI
22707 \family default
22708  and the other for 
22709 \family sans
22710 View\SpecialChar \menuseparator
22711 DVI
22712 \family default
22713  File menu entries.
22714  Here is how it looks like:
22715 \end_layout
22716
22717 \begin_layout LyX-Code
22718 Toolbar
22719 \end_layout
22720
22721 \begin_layout LyX-Code
22722   Layouts
22723 \end_layout
22724
22725 \begin_layout LyX-Code
22726   Icon "layout Standard"
22727 \end_layout
22728
22729 \begin_layout LyX-Code
22730   Icon "layout Section"
22731 \end_layout
22732
22733 \begin_layout LyX-Code
22734   Icon "layout LaTeX"
22735 \end_layout
22736
22737 \begin_layout LyX-Code
22738   Icon "layout LyX-Code"
22739 \end_layout
22740
22741 \begin_layout LyX-Code
22742   Icon "layout Scrap"
22743 \end_layout
22744
22745 \begin_layout LyX-Code
22746   Separator
22747 \end_layout
22748
22749 \begin_layout LyX-Code
22750   Icon "buffer-view"
22751 \end_layout
22752
22753 \begin_layout LyX-Code
22754   Icon "buffer-typeset"
22755 \end_layout
22756
22757 \begin_layout LyX-Code
22758   Icon "build-program"
22759 \end_layout
22760
22761 \begin_layout LyX-Code
22762   Separator
22763 \end_layout
22764
22765 \begin_layout LyX-Code
22766 .
22767 \end_layout
22768
22769 \begin_layout LyX-Code
22770 .
22771 \end_layout
22772
22773 \begin_layout LyX-Code
22774 .
22775 \end_layout
22776
22777 \begin_layout LyX-Code
22778 End
22779 \end_layout
22780
22781 \begin_layout Subsubsection
22782 Colors customization
22783 \end_layout
22784
22785 \begin_layout Standard
22786 There are a number of colors in LyX that can be customized in 
22787 \family sans
22788 Preferences
22789 \family default
22790 .
22791  One of the things that bothers people is the LaTeX font color.
22792  The default color is red, since the scraps uses LaTeX font, and there is
22793  a lot of scraps in literate documents, you may get tired of seeing everything
22794  in red.
22795  You can change it by going to the tabs 
22796 \family sans
22797 Look&Feel
22798 \family default
22799
22800 \family sans
22801 Colors.
22802 \end_layout
22803
22804 \begin_layout Standard
22805 The next thing is the visible presence of the newline character in the screen.
22806  You can choose the color of this particular character and make it blend
22807  in the background.
22808  I recommend you choosing a color that is close to the background but not
22809  equal, that way you still can see it is there, but it is not bothering
22810  you anymore.
22811  
22812 \end_layout
22813
22814 \begin_layout Chapter
22815 Secrets of the LaTeX Masters
22816 \begin_inset CommandInset label
22817 LatexCommand label
22818 name "cha:secrets"
22819
22820 \end_inset
22821
22822
22823 \end_layout
22824
22825 \begin_layout Standard
22826 Though LyX is a powerful tool, it cannot hope to support everything that
22827  can be done with pure TeX/LaTeX.
22828  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22829  as long as you are not afraid to use that 
22830 \begin_inset Quotes eld
22831 \end_inset
22832
22833 TeX
22834 \begin_inset Quotes erd
22835 \end_inset
22836
22837  button on the toolbar or add things to the LaTeX preamble.
22838  This section lists some tips, tricks, and otherwise cool ideas to give
22839  your document that extra little flair.
22840  
22841 \emph on
22842 Do try this at home
22843 \emph default
22844 , just start with something a little smaller and less important than your
22845  dissertation!
22846 \end_layout
22847
22848 \begin_layout Standard
22849 Most ideas in this section require less common files in your LaTeX installation.
22850  If you have a system like TeXLive, most will already be available.
22851  A few, however, will need to be downloaded from one of the CTAN archives.
22852  Often, there are several ways to do something, or several LaTeX style files
22853  which do the same thing.
22854  We do not endorse one choice over another, we simply claim that we have
22855  done a particular task with a particular file.
22856  Put on your wizard hat, keep an eye out for dragons, and let us begin.
22857 \end_layout
22858
22859 \begin_layout Section
22860 Multiple Columns
22861 \end_layout
22862
22863 \begin_layout Standard
22864 by 
22865 \noun on
22866 Lars Gullik Bjønnes
22867 \end_layout
22868
22869 \begin_layout Subsection
22870 Purpose
22871 \end_layout
22872
22873 \begin_layout Standard
22874 The aim for this chapter
22875 \begin_inset Foot
22876 status collapsed
22877
22878 \begin_layout Plain Layout
22879 Editor's note: Lars' original chapter was a masterful description of how
22880  to use the 
22881 \family typewriter
22882 multicol
22883 \family default
22884  package.
22885  However, it was too long to flow smoothly in this document.
22886  I have therefore chosen to excerpt the most important sections here (sorry,
22887  Lars); you can read the original chapter (and more of the story!) in the
22888  example file 
22889 \family typewriter
22890 examples/multicol.lyx
22891 \family default
22892 .
22893  — mer
22894 \end_layout
22895
22896 \end_inset
22897
22898  is to show how the LaTeX package 
22899 \family typewriter
22900 multicol
22901 \family default
22902  can be used in a LyX document.
22903  As LyX doesn't support the 
22904 \family typewriter
22905 multicol
22906 \family default
22907  package natively yet, we have to use some small hacks.
22908  By reading this section it should be obvious how to do this.
22909 \end_layout
22910
22911 \begin_layout Subsection
22912 Limitations 
22913 \end_layout
22914
22915 \begin_layout Standard
22916 The 
22917 \family typewriter
22918 multicol
22919 \family default
22920  package allows switching between one and multicolumn format on the same
22921  page.
22922  Footnotes are handled correctly (for the most part), but will be placed
22923  at the bottom of the page and not under each column.
22924  LaTeX's float mechanism, however, is partly disabled in the current implementat
22925 ion.
22926  At the moment only page-wide floats can be used within the scope of the
22927  environment.
22928 \end_layout
22929
22930 \begin_layout Subsection
22931 Examples
22932 \end_layout
22933
22934 \begin_layout Subsubsection
22935 Two columns
22936 \end_layout
22937
22938 \begin_layout Standard
22939 If you want to have two columns in your text, you have use LaTeX mode to
22940  insert 
22941 \family typewriter
22942
22943 \backslash
22944 begin{multicols}{2}
22945 \family default
22946  at the point where you want the two column layout to start, and then 
22947 \family typewriter
22948
22949 \backslash
22950 end{multicols}
22951 \family default
22952  where you want it to end.
22953  Like this:
22954 \end_layout
22955
22956 \begin_layout Standard
22957 \begin_inset ERT
22958 status open
22959
22960 \begin_layout Plain Layout
22961
22962
22963 \backslash
22964 begin{multicols}{2}
22965 \end_layout
22966
22967 \end_inset
22968
22969
22970 \end_layout
22971
22972 \begin_layout Standard
22973 \noindent
22974
22975 \series bold
22976 \size small
22977 The Adventure of the Empty House
22978 \series default
22979
22980 \begin_inset Newline newline
22981 \end_inset
22982
22983 by 
22984 \noun on
22985 Sir Arthur Conan Doyle
22986 \end_layout
22987
22988 \begin_layout Standard
22989
22990 \size small
22991 It was in the spring of the year 1894 that all London was interested, and
22992  the fashionable world dismayed, by the murder of the Honourable Ronald
22993  Adair under most unusual and inexplicable circumstances.
22994  The public has already learned those particulars of the crime which came
22995  out in the police investigation, but a good deal was suppressed upon that
22996  occasion, since the case for the prosecution was so overwhelmingly strong
22997  that it was not necessary to bring forward all the facts.
22998  Only now, at the end of nearly ten years, am I allowed to supply those
22999  missing links which make up the whole of that remarkable chain.
23000  The crime was of interest in itself, but that interest was as nothing to
23001  me compared to the inconceivable sequel, which afforded me the greatest
23002  shock and surprise of any event in my adventurous life.
23003  Even now, after this long interval, I find myself thrilling as I think
23004  of it, and feeling once more that sudden flood of joy, amazement, and increduli
23005 ty which utterly submerged my mind.
23006  Let me say to that public, which has shown some interest in those glimpses
23007  which I have occasionally given them of the thoughts and actions of a very
23008  remarkable man, that they are not to blame me if I have not shared my knowledge
23009  with them, for I should have considered it my first duty to do so, had
23010  I not been barred by a positive prohibition from his own lips, which was
23011  only withdrawn upon the third of last month.
23012 \end_layout
23013
23014 \begin_layout Standard
23015 \begin_inset ERT
23016 status open
23017
23018 \begin_layout Plain Layout
23019
23020
23021 \backslash
23022 end{multicols}
23023 \end_layout
23024
23025 \end_inset
23026
23027
23028 \end_layout
23029
23030 \begin_layout Subsubsection
23031 Multiple columns
23032 \end_layout
23033
23034 \begin_layout Standard
23035 The same pattern is used when you want more than two columns:
23036 \end_layout
23037
23038 \begin_layout Standard
23039 \begin_inset ERT
23040 status open
23041
23042 \begin_layout Plain Layout
23043
23044
23045 \backslash
23046 begin{multicols}{3}
23047 \end_layout
23048
23049 \end_inset
23050
23051
23052 \end_layout
23053
23054 \begin_layout Standard
23055
23056 \size footnotesize
23057 It can be imagined that my close intimacy with Sherlock Holmes had interested
23058  me deeply in crime, and that after his disappearance I never failed to
23059  read with care the various problems which came before the public.
23060  And I even attempted, more than once, for my own private satisfaction,
23061  to employ his methods in their solution, though with indifferent success.
23062  There was none, however, which appealed to me like this tragedy of Ronald
23063  Adair.
23064  As I read the evidence at the inquest, which led up to a verdict of willful
23065  murder against some person or persons unknown, I realized more clearly
23066  than I had ever done the loss which the community had sustained by the
23067  death of Sherlock Holmes.
23068  There were points about this strange business which would, I was sure,
23069  have specially appealed to him, and the efforts of the police would have
23070  been supplemented, or more probably anticipated, by the trained observation
23071  and the alert mind of the first criminal agent in Europe.
23072  All day, as I drove upon my round, I turned over the case in my mind and
23073  found no explanation which appeared to me to be adequate.
23074  At the risk of telling a twice-told tale, I will recapitulate the facts
23075  as they were known to the public at the conclusion of the inquest.
23076 \end_layout
23077
23078 \begin_layout Standard
23079 \begin_inset ERT
23080 status open
23081
23082 \begin_layout Plain Layout
23083
23084
23085 \backslash
23086 end{multicols}
23087 \end_layout
23088
23089 \end_inset
23090
23091
23092 \end_layout
23093
23094 \begin_layout Standard
23095 You can have more than 3 columns if you want to, but that might not be very
23096  pleasant for the eye.
23097 \end_layout
23098
23099 \begin_layout Subsubsection
23100 Columns inside columns
23101 \end_layout
23102
23103 \begin_layout Standard
23104 You can even have columns inside columns:
23105 \end_layout
23106
23107 \begin_layout Standard
23108 \begin_inset ERT
23109 status open
23110
23111 \begin_layout Plain Layout
23112
23113
23114 \backslash
23115 begin{multicols}{2}
23116 \end_layout
23117
23118 \end_inset
23119
23120
23121 \end_layout
23122
23123 \begin_layout Standard
23124
23125 \size footnotesize
23126 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23127  at that time governor of one of the Australian colonies.
23128  Adair's mother had returned from Australia to undergo the operation for
23129  cataract, and she, her son Ronald, and her daughter Hilda were living together
23130  at 427 Park Lane.
23131 \end_layout
23132
23133 \begin_layout Standard
23134 \begin_inset ERT
23135 status open
23136
23137 \begin_layout Plain Layout
23138
23139
23140 \backslash
23141 begin{multicols}{2}
23142 \end_layout
23143
23144 \end_inset
23145
23146
23147 \end_layout
23148
23149 \begin_layout Standard
23150
23151 \size footnotesize
23152 The youth moved in the best society–had, so far as was known, no enemies
23153  and no particular vices.
23154  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23155  had been broken off by mutual consent some months before, and there was
23156  no sign that it had left any very profound feeling behind it.
23157  For the rest {sic} the man's life moved in a narrow and conventional circle,
23158  for his habits were quiet and his nature unemotional.
23159  Yet it was upon this easy-going young aristocrat that death came, in most
23160  strange and unexpected form, between the hours of ten and eleven-twenty
23161  on the night of March 30, 1894.
23162 \end_layout
23163
23164 \begin_layout Standard
23165 \begin_inset ERT
23166 status open
23167
23168 \begin_layout Plain Layout
23169
23170
23171 \backslash
23172 end{multicols}
23173 \end_layout
23174
23175 \end_inset
23176
23177
23178 \end_layout
23179
23180 \begin_layout Standard
23181
23182 \size footnotesize
23183 Ronald Adair was fond of cards–playing continually, but never for such stakes
23184  as would hurt him.
23185  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23186  It was shown that, after dinner on the day of his death, he had played
23187  a rubber of whist at the latter club.
23188  He had also played there in the afternoon.
23189
23190 \size default
23191  
23192 \size footnotesize
23193 The evidence of those who had played with him– Mr.
23194  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23195  and that there was a fairly equal fall of the cards.
23196  Adair might have lost five pounds, but not more.
23197  His fortune was a considerable one, and such a loss could not in any way
23198  affect him.
23199  He had played nearly every day at one club or other, but he was a cautious
23200  player, and usually rose a winner.
23201  It came out in evidence that, in partnership with Colonel Moran, he had
23202  actually won as much as four hundred and twenty pounds in a sitting, some
23203  weeks before, from Godfrey Milner and Lord Balmoral.
23204  So much for his recent history as it came out at the inquest.
23205 \end_layout
23206
23207 \begin_layout Standard
23208 \begin_inset ERT
23209 status open
23210
23211 \begin_layout Plain Layout
23212
23213
23214 \backslash
23215 end{multicols}
23216 \end_layout
23217
23218 \end_inset
23219
23220
23221 \end_layout
23222
23223 \begin_layout Standard
23224 Please do read the file 
23225 \family typewriter
23226 examples/multicol.lyx
23227 \family default
23228  for more advanced examples including column and header spacing, vertical
23229  separator lines, and more.
23230 \end_layout
23231
23232 \begin_layout Section
23233 Numbering in the 
23234 \family sans
23235 Enumerate
23236 \family default
23237  Paragraph Environment
23238 \begin_inset Argument
23239 status collapsed
23240
23241 \begin_layout Plain Layout
23242 Numbering in Enumerate
23243 \end_layout
23244
23245 \end_inset
23246
23247
23248 \end_layout
23249
23250 \begin_layout Standard
23251 by 
23252 \noun on
23253 John Weiss
23254 \end_layout
23255
23256 \begin_layout Standard
23257 \begin_inset VSpace bigskip
23258 \end_inset
23259
23260
23261 \end_layout
23262
23263 \begin_layout Standard
23264 \noindent
23265 The default numbering for the 
23266 \family sans
23267 Enumerate
23268 \family default
23269  paragraph environment begins with Arabic numbers and ends with uppercase
23270  letters.
23271  Suppose, however, you wanted a different type of numbering scheme.
23272  Here's a quickie example of how to change the numbering scheme:
23273 \end_layout
23274
23275 \begin_layout LyX-Code
23276
23277 \backslash
23278 renewcommand{
23279 \backslash
23280 labelenumi}{
23281 \backslash
23282 Roman{enumi}.}
23283 \end_layout
23284
23285 \begin_layout LyX-Code
23286
23287 \backslash
23288 renewcommand{
23289 \backslash
23290 labelenumii}{
23291 \backslash
23292 Alph{enumii}.}
23293 \end_layout
23294
23295 \begin_layout LyX-Code
23296
23297 \backslash
23298 renewcommand{
23299 \backslash
23300 labelenumiii}{
23301 \backslash
23302 arabic{enumiii}.}
23303 \end_layout
23304
23305 \begin_layout LyX-Code
23306
23307 \backslash
23308 renewcommand{
23309 \backslash
23310 labelenumiv}{
23311 \backslash
23312 alph{enumiv}.)}
23313 \end_layout
23314
23315 \begin_layout Standard
23316 \SpecialChar \ldots{}
23317  which changes the numbering scheme to uppercase Roman numerals, uppercase
23318  letters, Arabic numbers, and lowercase letter.
23319 \end_layout
23320
23321 \begin_layout Standard
23322 Additionally, the previous example also adds a little bit extra to the numbering
23323  scheme.
23324  For example, the first level label actually looks like: 
23325 \begin_inset Quotes eld
23326 \end_inset
23327
23328 I.
23329 \begin_inset Quotes erd
23330 \end_inset
23331
23332 .
23333  For ease of reading, we'll describe what the numbering schemes look like
23334  using a notation something like this: <
23335 \begin_inset Quotes eld
23336 \end_inset
23337
23338 I.
23339 \begin_inset Quotes erd
23340 \end_inset
23341
23342 ,
23343 \begin_inset space ~
23344 \end_inset
23345
23346
23347 \begin_inset Quotes erd
23348 \end_inset
23349
23350 A.
23351 \begin_inset Quotes erd
23352 \end_inset
23353
23354 ,
23355 \begin_inset space ~
23356 \end_inset
23357
23358
23359 \begin_inset Quotes erd
23360 \end_inset
23361
23362 1.
23363 \begin_inset Quotes erd
23364 \end_inset
23365
23366 ,
23367 \begin_inset space ~
23368 \end_inset
23369
23370
23371 \begin_inset Quotes eld
23372 \end_inset
23373
23374 a.)
23375 \begin_inset Quotes erd
23376 \end_inset
23377
23378 >.
23379  
23380 \end_layout
23381
23382 \begin_layout Standard
23383 As you can see in the example, there is a label command for each nesting
23384  level, 
23385 \family typewriter
23386
23387 \backslash
23388 labelenumi
23389 \family default
23390  \SpecialChar \ldots{}
23391  
23392 \family typewriter
23393
23394 \backslash
23395 labelenumiv
23396 \family default
23397 , as well as a counter, 
23398 \family typewriter
23399 enumi
23400 \family default
23401  \SpecialChar \ldots{}
23402  
23403 \family typewriter
23404 enumiv
23405 \family default
23406 .
23407  There are also five 
23408 \begin_inset Quotes eld
23409 \end_inset
23410
23411 number printing
23412 \begin_inset Quotes erd
23413 \end_inset
23414
23415  commands, 
23416 \family typewriter
23417
23418 \backslash
23419 arabic{}
23420 \family default
23421
23422 \family typewriter
23423
23424 \backslash
23425 roman{}
23426 \family default
23427
23428 \family typewriter
23429
23430 \backslash
23431 Roman{}
23432 \family default
23433
23434 \family typewriter
23435
23436 \backslash
23437 alph{}
23438 \family default
23439 , and 
23440 \family typewriter
23441
23442 \backslash
23443 Alph{}
23444 \family default
23445 , each of which take one counter as an argument.
23446  You can add characters before or after these, but there's no need to add
23447  spaces.
23448 \end_layout
23449
23450 \begin_layout Standard
23451 You can get really fancy with these.
23452  For example:
23453 \end_layout
23454
23455 \begin_layout LyX-Code
23456
23457 \backslash
23458 renewcommand{
23459 \backslash
23460 labelenumi}{
23461 \backslash
23462 #
23463 \backslash
23464 Alph{enumi}
23465 \backslash
23466 #}
23467 \end_layout
23468
23469 \begin_layout LyX-Code
23470
23471 \backslash
23472 renewcommand{
23473 \backslash
23474 labelenumii}{
23475 \backslash
23476 Alph{enumi}.
23477 \backslash
23478 arabic{enumii}}
23479 \end_layout
23480
23481 \begin_layout LyX-Code
23482
23483 \backslash
23484 renewcommand{
23485 \backslash
23486 labelenumiii}{
23487 \backslash
23488 alph{enumiii}+}
23489 \end_layout
23490
23491 \begin_layout LyX-Code
23492
23493 \backslash
23494 renewcommand{
23495 \backslash
23496 labelenumiv}{(
23497 \backslash
23498 roman{enumiv})}
23499 \end_layout
23500
23501 \begin_layout Standard
23502 produces the somewhat out of hand numbering scheme: <
23503 \begin_inset Quotes eld
23504 \end_inset
23505
23506 #A#
23507 \begin_inset Quotes erd
23508 \end_inset
23509
23510 ,
23511 \begin_inset space ~
23512 \end_inset
23513
23514
23515 \begin_inset Quotes erd
23516 \end_inset
23517
23518 A.1
23519 \begin_inset Quotes erd
23520 \end_inset
23521
23522 ,
23523 \begin_inset space ~
23524 \end_inset
23525
23526
23527 \begin_inset Quotes erd
23528 \end_inset
23529
23530 a+
23531 \begin_inset Quotes erd
23532 \end_inset
23533
23534 ,
23535 \begin_inset space ~
23536 \end_inset
23537
23538
23539 \begin_inset Quotes eld
23540 \end_inset
23541
23542 (i)
23543 \begin_inset Quotes erd
23544 \end_inset
23545
23546 >.
23547  
23548 \end_layout
23549
23550 \begin_layout Section
23551 Dropped Capitals
23552 \end_layout
23553
23554 \begin_layout Standard
23555 by 
23556 \noun on
23557 Mike Ressler
23558 \end_layout
23559
23560 \begin_layout Standard
23561 \begin_inset VSpace bigskip
23562 \end_inset
23563
23564
23565 \end_layout
23566
23567 \begin_layout Standard
23568 \noindent
23569 \begin_inset ERT
23570 status collapsed
23571
23572 \begin_layout Plain Layout
23573
23574
23575 \backslash
23576 newfont{
23577 \backslash
23578 tmpfont}{cmr17 scaled 2500}{
23579 \backslash
23580 tmpfont T}
23581 \backslash
23582 vspace*{-8.4ex}
23583 \end_layout
23584
23585 \end_inset
23586
23587
23588 \end_layout
23589
23590 \begin_layout Standard
23591 \noindent
23592 \begin_inset ERT
23593 status open
23594
23595 \begin_layout Plain Layout
23596
23597
23598 \backslash
23599 hangindent=3.3em 
23600 \backslash
23601 hangafter=-3
23602 \end_layout
23603
23604 \end_inset
23605
23606  hose of you who like the style of old books probably also like 
23607 \begin_inset Quotes eld
23608 \end_inset
23609
23610 dropped capitals
23611 \begin_inset Quotes erd
23612 \end_inset
23613
23614 —those large capital letters which begin each new chapter or section.
23615  Implementing them with plain LyX/LaTeX is straightforward (assuming you
23616  know some plain TeX!) but does require a lot of work and many iterations,
23617  as you can see by all the ugly TeX-mode stuff at the beginning of this
23618  paragraph.
23619 \end_layout
23620
23621 \begin_layout Standard
23622 \begin_inset ERT
23623 status open
23624
23625 \begin_layout Plain Layout
23626
23627
23628 \backslash
23629 verb+
23630 \backslash
23631 bigdrop{-1em}{3}{ptmri}{T}+
23632 \end_layout
23633
23634 \end_inset
23635
23636 here is a much easier way of doing this, of course.
23637  The 
23638 \family typewriter
23639 dropcaps
23640 \family default
23641  (or the newer 
23642 \family typewriter
23643 dropping
23644 \family default
23645 ) package from CTAN allows a simple way to add such letters to your documents.
23646  Since this package is not a standard part of TeXLive, I can't demonstrate
23647  it within this document, but if you copy this paragraph to a new document,
23648  delete the 
23649 \begin_inset Quotes eld
23650 \end_inset
23651
23652
23653 \family typewriter
23654
23655 \backslash
23656 verb
23657 \family default
23658
23659 \begin_inset Quotes erd
23660 \end_inset
23661
23662  and the pluses from the TeX code at the beginning of the paragraph, and
23663  add 
23664 \family typewriter
23665
23666 \backslash
23667 usepackage{dropcaps}
23668 \family default
23669  to your LaTeX preamble, you will get a nice Times Roman Italic 
23670 \begin_inset Quotes eld
23671 \end_inset
23672
23673 T
23674 \begin_inset Quotes erd
23675 \end_inset
23676
23677 , whose height is three lines of text and which protrudes 1 em into the
23678  margin.
23679  (Make certain you have copied 
23680 \begin_inset Quotes eld
23681 \end_inset
23682
23683
23684 \family typewriter
23685 dropcaps.sty
23686 \family default
23687
23688 \begin_inset Quotes erd
23689 \end_inset
23690
23691  into a directory where TeX can see it.) The first argument is the amount
23692  of indentation; in this case the negative sign moves it into the margin.
23693  The second argument is the height of the letter in number of lines of text.
23694  The third argument is the font name: virtually anything which has a tfm
23695  file should work (wade through the 
23696 \family typewriter
23697 .../texmf/fonts/tfm
23698 \family default
23699  directory for possibilities).
23700  My personal favorite is 
23701 \begin_inset Quotes eld
23702 \end_inset
23703
23704
23705 \family typewriter
23706 yinit
23707 \family default
23708
23709 \begin_inset Quotes erd
23710 \end_inset
23711
23712 , a fancy German font specifically designed for dropped capitals.
23713  The fourth argument is the letter (or letters) to be dropped.
23714  The 
23715 \family typewriter
23716 dropping
23717 \family default
23718  package also offers the 
23719 \family typewriter
23720
23721 \backslash
23722 bigdrop
23723 \family default
23724  command, as well as a slightly simplified 
23725 \family typewriter
23726
23727 \backslash
23728 dropping
23729 \family default
23730  command.
23731 \end_layout
23732
23733 \begin_layout Section
23734 Non-standard Paragraph Shapes
23735 \end_layout
23736
23737 \begin_layout Standard
23738 by 
23739 \noun on
23740 Mike Ressler
23741 \end_layout
23742
23743 \begin_layout Standard
23744 \begin_inset VSpace bigskip
23745 \end_inset
23746
23747
23748 \end_layout
23749
23750 \begin_layout Standard
23751 \begin_inset ERT
23752 status collapsed
23753
23754 \begin_layout Plain Layout
23755
23756
23757 \backslash
23758 begin{sloppypar}
23759 \end_layout
23760
23761 \end_inset
23762
23763
23764 \end_layout
23765
23766 \begin_layout Standard
23767 \begin_inset ERT
23768 status collapsed
23769
23770 \begin_layout Plain Layout
23771
23772
23773 \backslash
23774 newdimen
23775 \backslash
23776 varunit 
23777 \end_layout
23778
23779 \begin_layout Plain Layout
23780
23781
23782 \backslash
23783 setlength{
23784 \backslash
23785 varunit}{4.5in}
23786 \end_layout
23787
23788 \end_inset
23789
23790
23791 \end_layout
23792
23793 \begin_layout Standard
23794 \noindent
23795 \begin_inset ERT
23796 status collapsed
23797
23798 \begin_layout Plain Layout
23799
23800
23801 \backslash
23802 parshape 19 0.45
23803 \backslash
23804 varunit 0.332
23805 \backslash
23806 varunit
23807 \end_layout
23808
23809 \begin_layout Plain Layout
23810
23811 0.40
23812 \backslash
23813 varunit 0.300
23814 \backslash
23815 varunit
23816 \end_layout
23817
23818 \begin_layout Plain Layout
23819
23820 0.35
23821 \backslash
23822 varunit 0.293
23823 \backslash
23824 varunit
23825 \end_layout
23826
23827 \begin_layout Plain Layout
23828
23829 0.30
23830 \backslash
23831 varunit 0.300
23832 \backslash
23833 varunit
23834 \end_layout
23835
23836 \begin_layout Plain Layout
23837
23838 0.25
23839 \backslash
23840 varunit 0.317
23841 \backslash
23842 varunit
23843 \end_layout
23844
23845 \begin_layout Plain Layout
23846
23847 0.20
23848 \backslash
23849 varunit 0.342
23850 \backslash
23851 varunit
23852 \end_layout
23853
23854 \begin_layout Plain Layout
23855
23856 0.15
23857 \backslash
23858 varunit 0.373
23859 \backslash
23860 varunit
23861 \end_layout
23862
23863 \begin_layout Plain Layout
23864
23865 0.10
23866 \backslash
23867 varunit 0.410
23868 \backslash
23869 varunit
23870 \end_layout
23871
23872 \begin_layout Plain Layout
23873
23874 0.05
23875 \backslash
23876 varunit 0.453
23877 \backslash
23878 varunit
23879 \end_layout
23880
23881 \begin_layout Plain Layout
23882
23883 0.00
23884 \backslash
23885 varunit 0.500
23886 \backslash
23887 varunit
23888 \end_layout
23889
23890 \begin_layout Plain Layout
23891
23892 0.05
23893 \backslash
23894 varunit 0.453
23895 \backslash
23896 varunit
23897 \end_layout
23898
23899 \begin_layout Plain Layout
23900
23901 0.10
23902 \backslash
23903 varunit 0.410
23904 \backslash
23905 varunit
23906 \end_layout
23907
23908 \begin_layout Plain Layout
23909
23910 0.15
23911 \backslash
23912 varunit 0.373
23913 \backslash
23914 varunit
23915 \end_layout
23916
23917 \begin_layout Plain Layout
23918
23919 0.20
23920 \backslash
23921 varunit 0.342
23922 \backslash
23923 varunit
23924 \end_layout
23925
23926 \begin_layout Plain Layout
23927
23928 0.25
23929 \backslash
23930 varunit 0.317
23931 \backslash
23932 varunit
23933 \end_layout
23934
23935 \begin_layout Plain Layout
23936
23937 0.30
23938 \backslash
23939 varunit 0.300
23940 \backslash
23941 varunit
23942 \end_layout
23943
23944 \begin_layout Plain Layout
23945
23946 0.35
23947 \backslash
23948 varunit 0.293
23949 \backslash
23950 varunit
23951 \end_layout
23952
23953 \begin_layout Plain Layout
23954
23955 0.40
23956 \backslash
23957 varunit 0.300
23958 \backslash
23959 varunit
23960 \end_layout
23961
23962 \begin_layout Plain Layout
23963
23964 0.45
23965 \backslash
23966 varunit 0.332
23967 \backslash
23968 varunit
23969 \end_layout
23970
23971 \begin_layout Plain Layout
23972
23973 \end_layout
23974
23975 \end_inset
23976
23977 There are times when the tyranny of rectangular paragraphs must be overthrown.
23978  In such situations, a call to the delightful plain TeX command 
23979 \family typewriter
23980
23981 \backslash
23982 parshape
23983 \family default
23984  is called for.
23985  As you can see, completely arbitrary shapes can be laid out with a suitable
23986  set of linelength definitions.
23987  While this parshape may look a bit silly and useless, one could conceive
23988  of situations such as finely tuned dropped capitals, word wrapping around
23989  non-rectangular graphics, etc.
23990  which will benefit from such handcrafting.
23991 \end_layout
23992
23993 \begin_layout Standard
23994 \begin_inset VSpace bigskip
23995 \end_inset
23996
23997
23998 \end_layout
23999
24000 \begin_layout Standard
24001 The syntax is 
24002 \family typewriter
24003
24004 \backslash
24005 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
24006  #nindent #nlength
24007 \family default
24008 , where 
24009 \family typewriter
24010 numlines
24011 \family default
24012  is the number of lines of text which define the paragraph.
24013  If there turn out to be fewer lines, the shape is truncated; if there are
24014  more, the excess lines have the same dimensions as the last line of the
24015  definition.
24016  The 
24017 \family typewriter
24018 #nindent
24019 \family default
24020  and 
24021 \family typewriter
24022 #nlength
24023 \family default
24024  entries specify the indentation of the line from the left margin, and the
24025  length of the line as measured from that point.
24026  The shape applies only to the current paragraph; everything is reset to
24027  normal for the next paragraph.
24028 \end_layout
24029
24030 \begin_layout Standard
24031 \begin_inset ERT
24032 status collapsed
24033
24034 \begin_layout Plain Layout
24035
24036
24037 \backslash
24038 end{sloppypar}
24039 \end_layout
24040
24041 \end_inset
24042
24043
24044 \end_layout
24045
24046 \begin_layout Section
24047 Summary
24048 \end_layout
24049
24050 \begin_layout Standard
24051 As you can see, the examples in this section range from the useful to the
24052  whimsical.
24053  While I don't expect that anyone will ever need the paragraph shape demonstrate
24054 d in the last section, the important point is that you can do almost anything
24055  you want in LyX if you are willing to figure out how to do it in TeX and
24056  LaTeX.
24057  TeX is a fantastically powerful typesetting system and all that power is
24058  available to you since LyX uses it as its backend.
24059  Happy LyXing!
24060 \end_layout
24061
24062 \end_body
24063 \end_document