]> git.lyx.org Git - lyx.git/blob - lib/doc/Extended.lyx
Docs
[lyx.git] / lib / doc / Extended.lyx
1 #LyX 1.6.0svn created this file. For more info see http://www.lyx.org/
2 \lyxformat 338
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 User's Guide prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the User's Guide 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 \begin_modules
49 logicalmkup
50 theorems-ams
51 theorems-ams-extended
52 \end_modules
53 \language english
54 \inputencoding latin1
55 \font_roman default
56 \font_sans default
57 \font_typewriter default
58 \font_default_family default
59 \font_sc false
60 \font_osf false
61 \font_sf_scale 100
62 \font_tt_scale 100
63
64 \graphics default
65 \paperfontsize 12
66 \spacing single
67 \use_hyperref true
68 \pdf_title "LyX's Extended manual"
69 \pdf_author "LyX Team"
70 \pdf_subject "LyX's extended documentation"
71 \pdf_keywords "LyX, Documentation, Extended"
72 \pdf_bookmarks true
73 \pdf_bookmarksnumbered true
74 \pdf_bookmarksopen false
75 \pdf_bookmarksopenlevel 1
76 \pdf_breaklinks false
77 \pdf_pdfborder false
78 \pdf_colorlinks true
79 \pdf_backref false
80 \pdf_pagebackref false
81 \pdf_pdfusetitle false
82 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,  pdfpagelayout=OneColumn, pdfnewwindow=true,  pdfstartview=XYZ, plainpages=false, pdfpagelabels"
83 \papersize default
84 \use_geometry false
85 \use_amsmath 0
86 \use_esint 0
87 \cite_engine basic
88 \use_bibtopic false
89 \paperorientation portrait
90 \secnumdepth 3
91 \tocdepth 3
92 \paragraph_separation indent
93 \defskip medskip
94 \quotes_language english
95 \papercolumns 1
96 \papersides 2
97 \paperpagestyle headings
98 \tracking_changes false
99 \output_changes false
100 \author "" 
101 \author "" 
102 \end_header
103
104 \begin_body
105
106 \begin_layout Title
107 Extended LyX Features
108 \end_layout
109
110 \begin_layout Author
111 by the LyX Team
112 \begin_inset Foot
113 status collapsed
114
115 \begin_layout Plain Layout
116 \noindent
117 Principal maintainer of this file is
118 \noun on
119  Mike Ressler
120 \noun default
121 .
122  If you have comments or error corrections, please send them to the LyX
123  Documentation mailing list, <lyx-docs@lists.lyx.org>.
124 \end_layout
125
126 \end_inset
127
128  
129 \end_layout
130
131 \begin_layout Standard
132 \begin_inset CommandInset toc
133 LatexCommand tableofcontents
134
135 \end_inset
136
137
138 \end_layout
139
140 \begin_layout Chapter
141 Introduction
142 \end_layout
143
144 \begin_layout Standard
145 The 
146 \emph on
147 Extended LyX Features
148 \emph default
149  manual, which you are now reading, is essentially Part II of the 
150 \emph on
151 User's Guide\SpecialChar \@.
152
153 \emph default
154  The reason for splitting this document is simple: the 
155 \emph on
156 User's Guide
157 \emph default
158  is already huge, and it contains all of the basic features one needs to
159  know in order to prepare most documents.
160  However, the LyX Team has a long-term goal of making LyX extensible through
161  various configuration files and external packages.
162  That means that if you want to support the Fizzwizzle LaTeX package, you
163  can create a layout file for it without having to alter LyX itself.
164  We've already had contributions of several new features this way.
165  This is the place where all of that gets documented.
166 \end_layout
167
168 \begin_layout Standard
169 This manual also documents some special features, like fax support, version
170  control, and SGML support, which require additional software to work properly.
171  Lastly, there's a chapter of LaTeX tools and tips, things you can use to
172  spruce up your documents by directly using the powerful features of LaTeX.
173  After all, LyX 
174 \emph on
175 is
176 \emph default
177  only WYSIWYM, and will only ever interface to certain LaTeX features.
178 \end_layout
179
180 \begin_layout Standard
181 Of course, with all of this extra documentation, 
182 \emph on
183 Extended LyX Features
184 \emph default
185  may itself grow too big for its britches.
186  In that case, you can just call it the 
187 \begin_inset Quotes eld
188 \end_inset
189
190 Overextended Manual
191 \begin_inset Quotes erd
192 \end_inset
193
194  for fun!
195 \end_layout
196
197 \begin_layout Standard
198 If you haven't read the 
199 \emph on
200 Introduction
201 \emph default
202  yet, you are definitely in the wrong manual.
203  The 
204 \emph on
205 Introduction
206 \emph default
207  is the first place to go, since it will direct you to the correct manual,
208  and it also describes the notation and format of all of the manuals.
209  You should also be thoroughly familiar with the 
210 \emph on
211 User's Guide
212 \emph default
213  and all of the basic features of LyX.
214  
215 \end_layout
216
217 \begin_layout Standard
218 In this document, many sections are independent articles contributed by
219  an individual and are noted as such.
220  This person is generally whoever wrote the layout file for the new document
221  class or LaTeX package, or implemented the feature.
222  If there is no mention of an author to a chapter [or chapter sections],
223  that means it was written by the LyX Documentation Team.
224 \end_layout
225
226 \begin_layout Standard
227 Since all the topics in this manual depend heavily on LyX's interaction
228  with LaTeX, this first chapter covers the inner workings of LyX and how
229  to direct LyX to generate exactly the LaTeX code you want.
230  It is obviously for more seasoned LyX users.
231 \end_layout
232
233 \begin_layout Chapter
234 LyX and LaTeX
235 \end_layout
236
237 \begin_layout Section
238 How LyX Uses LaTeX
239 \end_layout
240
241 \begin_layout Standard
242 \begin_inset CommandInset label
243 LatexCommand label
244 name "sec:lyxandlatex"
245
246 \end_inset
247
248 This chapter is for both TeX-nicians and the LaTeX-curious.
249  In it, we'll explain how LyX and LaTeX work together to produce printable
250  output.
251  This is the only place in any of the manuals where we assume you know something
252  about LaTeX.
253 \end_layout
254
255 \begin_layout Standard
256 At one time, we called LyX a 
257 \begin_inset Quotes eld
258 \end_inset
259
260 WYSIWYM frontend to LaTeX,
261 \begin_inset Quotes erd
262 \end_inset
263
264  but that's no longer true.
265  There are frontends to LaTeX out there.
266  They are basically editors with the ability to run LaTeX and mark any errors
267  in the file you're editing.
268  Although LyX 
269 \emph on
270 is
271 \emph default
272  an editor, and it 
273 \emph on
274 does
275 \emph default
276  run LaTeX, and it also marks errors in the file, it also does much, much
277  more.
278  Thanks to the WYSIWYM concept, you don't need LaTeX to use LyX effectively.
279  LyX has also added a few extensions to LaTeX.
280  Try the following sometime: select 
281 \family sans
282 Export\SpecialChar \menuseparator
283 LaTeX
284 \family default
285  from the 
286 \family sans
287 \bar under
288 F
289 \bar default
290 ile
291 \family default
292  menu, then look at the preamble of the resulting 
293 \family typewriter
294 .tex
295 \family default
296  file.
297  You'll notice a variety of new macros defined specifically by LyX.
298  These macros are defined automatically, according to the features you use
299  in the document.
300 \end_layout
301
302 \begin_layout Standard
303 There are several commands that automatically invoke LaTeX.
304  They are:
305 \end_layout
306
307 \begin_layout Itemize
308
309 \family sans
310 \bar under
311 V
312 \bar default
313 iew\SpecialChar \menuseparator
314 View
315 \begin_inset space ~
316 \end_inset
317
318
319 \emph on
320 Format
321 \end_layout
322
323 \begin_layout Itemize
324
325 \family sans
326 \bar under
327 V
328 \bar default
329 iew\SpecialChar \menuseparator
330
331 \bar under
332 U
333 \bar default
334 pdate\SpecialChar \menuseparator
335
336 \emph on
337 Format
338 \end_layout
339
340 \begin_layout Itemize
341
342 \family sans
343 \bar under
344 F
345 \bar default
346 ile
347 \bar under
348 \SpecialChar \menuseparator
349 P
350 \bar default
351 rint
352 \end_layout
353
354 \begin_layout Itemize
355
356 \family sans
357 \bar under
358 F
359 \bar default
360 ile
361 \bar under
362 \SpecialChar \menuseparator
363 F
364 \bar default
365 ax
366 \end_layout
367
368 \begin_layout Standard
369 They will only invoke LaTeX if the file has changed since the last time
370  LaTeX was run.
371  
372 \end_layout
373
374 \begin_layout Standard
375 When you run LaTeX on the file you're editing, LyX performs these steps:
376 \end_layout
377
378 \begin_layout Enumerate
379 Convert the document to LaTeX and save to a file with the extension 
380 \family typewriter
381 .tex
382 \family default
383  in place of 
384 \family typewriter
385 .lyx
386 \family default
387 .
388 \end_layout
389
390 \begin_layout Enumerate
391 Run LaTeX on the 
392 \family typewriter
393 .tex
394 \family default
395  file (maybe several times).
396 \end_layout
397
398 \begin_layout Enumerate
399 If there are any errors, insert error boxes in the document to mark where
400  they are.
401  These boxes are transient and are not saved along with the document.
402 \end_layout
403
404 \begin_layout Standard
405 If you've run LaTeX using 
406 \family sans
407 View
408 \begin_inset space ~
409 \end_inset
410
411 DVI
412 \family default
413 , LyX then executes 
414 \family typewriter
415 xdvi
416 \family default
417  on the DVI-file.
418  If you've used 
419 \family sans
420 View
421 \begin_inset space ~
422 \end_inset
423
424 PostScript
425 \family default
426  or 
427 \family sans
428 \bar under
429 P
430 \bar default
431 rint
432 \family default
433 , LyX performs two more steps:
434 \end_layout
435
436 \begin_layout Itemize
437 Run 
438 \family typewriter
439 dvips
440 \family default
441  to convert the DVI file to PostScript:
442 \end_layout
443
444 \begin_deeper
445 \begin_layout Itemize
446 For 
447 \family sans
448 View
449 \begin_inset space ~
450 \end_inset
451
452 PostScript
453 \family default
454 , the output file has the extension 
455 \family typewriter
456 .ps_tmp
457 \end_layout
458
459 \begin_layout Itemize
460 For 
461 \family sans
462 \bar under
463 P
464 \bar default
465 rint
466 \family default
467
468 \begin_inset space ~
469 \end_inset
470
471 , the output file has the extension 
472 \family typewriter
473 .ps
474 \family default
475 , as expected.
476 \end_layout
477
478 \end_deeper
479 \begin_layout Itemize
480 Execute 
481 \family typewriter
482 ghostview
483 \family default
484  or send the PostScript file to the printer.
485 \end_layout
486
487 \begin_layout Section
488 \begin_inset Quotes eld
489 \end_inset
490
491 Help! LyX generated an unreadable 
492 \family typewriter
493 .tex
494 \family default
495  file!
496 \begin_inset Quotes erd
497 \end_inset
498
499
500 \end_layout
501
502 \begin_layout Standard
503 Die-hard LaTeX users will scream and howl this into the night, then declare
504  LyX useless, simply because they didn't RTFM.
505 \end_layout
506
507 \begin_layout Standard
508 We're going to set the record straight.
509  LyX produces two kinds of LaTeX files.
510  One is human readable.
511  The other is LyX readable.
512  Every time LyX executes LaTeX, it produces a LaTeX file that it can easily
513  scan for errors.
514  The resulting 
515 \family typewriter
516 .tex
517 \family default
518  file is not human readable.
519  Don't even try to read it.
520  If you want a 
521 \family typewriter
522 .tex
523 \family default
524  file that you can send to a colleague, select 
525 \family sans
526 \bar under
527 E
528 \bar default
529 xport\SpecialChar \menuseparator
530
531 \bar under
532 L
533 \bar default
534 aTeX
535 \family default
536  from the 
537 \family sans
538 \bar under
539 F
540 \bar default
541 ile
542 \family default
543  menu.
544 \end_layout
545
546 \begin_layout Section
547 Translating LaTeX files into LyX
548 \begin_inset CommandInset label
549 LatexCommand label
550 name "sec:Translating-LaTeX-files"
551
552 \end_inset
553
554
555 \end_layout
556
557 \begin_layout Standard
558 You can import a LaTeX file into LyX by using the 
559 \family sans
560 \bar under
561 F
562 \bar default
563 ile\SpecialChar \menuseparator
564
565 \bar under
566 I
567 \bar default
568 mport\SpecialChar \menuseparator
569
570 \bar under
571 L
572 \bar default
573 aTeX
574 \family default
575  command in LyX.
576  This will call a program named 
577 \family typewriter
578 tex2lyx
579 \family default
580 ---which will create a file 
581 \family typewriter
582 foo.lyx
583 \family default
584  from the file 
585 \family typewriter
586 foo.tex
587 \family default
588 ---and then open that file.
589 \end_layout
590
591 \begin_layout Standard
592
593 \family typewriter
594 tex2lyx
595 \family default
596  will translate most legal LaTeX, but not everything.
597  It will leave things it doesn't understand in TeX mode, so after translating
598  a file with 
599 \family typewriter
600 tex2lyx
601 \family default
602 , you can look for red text and hand-edit it to look right.
603 \end_layout
604
605 \begin_layout Standard
606 If you just want to put a piece of LaTeX code into a LyX file, see Section
607 \begin_inset space ~
608 \end_inset
609
610
611 \begin_inset CommandInset ref
612 LatexCommand ref
613 reference "sec:latexcodes"
614
615 \end_inset
616
617 .
618 \end_layout
619
620 \begin_layout Section
621 Inserting LaTeX Code into LyX Documents 
622 \begin_inset CommandInset label
623 LatexCommand label
624 name "sec:Inserting-LaTeX-Code"
625
626 \end_inset
627
628
629 \end_layout
630
631 \begin_layout Standard
632 \begin_inset CommandInset label
633 LatexCommand label
634 name "sec:latexcodes"
635
636 \end_inset
637
638  This is a rather important point: You can always insert LaTeX code into
639  any LyX document.
640  LyX simply cannot, and will probably never be able to, display every possible
641  LaTeX construct.
642  If ever you need to insert LaTeX commands into your LyX document, you can
643  use the ERT box, which you can insert into your document with 
644 \family sans
645 \bar under
646 I
647 \bar default
648 nsert\SpecialChar \menuseparator
649
650 \bar under
651 T
652 \bar default
653 eX
654 \family default
655 .
656  The ERT box comes in three forms: collapsed, open, and inlined.
657  The first two are used just like any other collapsible (foldable) box (such
658  as footnotes), and are useful for significant amounts of LaTeX commands.
659  An 
660 \begin_inset Quotes eld
661 \end_inset
662
663 inlined
664 \begin_inset Quotes erd
665 \end_inset
666
667  ERT box displays its content as part of the button, and is useful for very
668  short sections of LaTeX commands.
669  
670 \begin_inset ERT
671 status open
672
673 \begin_layout Plain Layout
674
675 % like this
676 \end_layout
677
678 \end_inset
679
680
681 \end_layout
682
683 \begin_layout Standard
684 You can switch between all three by right-clicking on the ERT.
685  Note that if you want more than one line of LaTeX commands, you cannot
686  use the inlined mode.
687 \end_layout
688
689 \begin_layout Standard
690 Here's an example of inserting LaTeX commands in a LyX document.
691  The code looks like this:
692 \end_layout
693
694 \begin_layout LyX-Code
695
696 \backslash
697 begin{tabular}{ll}
698 \begin_inset Newline newline
699 \end_inset
700
701
702 \backslash
703 begin{minipage}{5cm}
704 \begin_inset Newline newline
705 \end_inset
706
707 This is an example for a minipage environment.
708  You 
709 \begin_inset Newline newline
710 \end_inset
711
712 can put nearly everything in it, even (non-floating) 
713 \begin_inset Newline newline
714 \end_inset
715
716 figures and tables.
717  
718 \begin_inset Newline newline
719 \end_inset
720
721
722 \backslash
723 end{minipage}
724 \begin_inset Newline newline
725 \end_inset
726
727 &
728 \begin_inset Newline newline
729 \end_inset
730
731
732 \backslash
733 begin{minipage}{5cm}
734 \begin_inset Newline newline
735 \end_inset
736
737
738 \backslash
739 begin{verbatim}
740 \begin_inset Newline newline
741 \end_inset
742
743
744 \backslash
745 begin{minipage}{5cm}
746 \begin_inset Newline newline
747 \end_inset
748
749 This ...
750  
751 \begin_inset Newline newline
752 \end_inset
753
754
755 \backslash
756 end{minipage}
757 \begin_inset Newline newline
758 \end_inset
759
760
761 \backslash
762 end{verbatim}
763 \begin_inset Newline newline
764 \end_inset
765
766
767 \backslash
768 end{minipage}
769 \begin_inset Newline newline
770 \end_inset
771
772
773 \backslash
774 end{tabular}
775 \end_layout
776
777 \begin_layout LyX-Code
778
779 \end_layout
780
781 \begin_layout Standard
782 The ERT box containing this text is directly after this paragraph.
783  Those of you reading the manual online will only see a bunch of funky text
784  in red.
785  Those reading a printed version of the manuals will see the actual results:
786 \end_layout
787
788 \begin_layout Standard
789 \begin_inset ERT
790 status collapsed
791
792 \begin_layout Plain Layout
793
794
795 \backslash
796 begin{tabular}{ll}
797 \end_layout
798
799 \begin_layout Plain Layout
800
801
802 \backslash
803 begin{minipage}{5cm}
804 \end_layout
805
806 \begin_layout Plain Layout
807
808 This is an example for a minipage environment.
809  You can put nearly everything in it, even (non-floating) figures and tables.
810  
811 \end_layout
812
813 \begin_layout Plain Layout
814
815
816 \backslash
817 end{minipage}
818 \end_layout
819
820 \begin_layout Plain Layout
821
822 &
823 \end_layout
824
825 \begin_layout Plain Layout
826
827
828 \backslash
829 begin{minipage}{5cm}
830 \end_layout
831
832 \begin_layout Plain Layout
833
834
835 \backslash
836 begin{verbatim}
837 \end_layout
838
839 \begin_layout Plain Layout
840
841
842 \backslash
843 begin{minipage}{5cm}
844 \end_layout
845
846 \begin_layout Plain Layout
847
848 This ...
849  
850 \end_layout
851
852 \begin_layout Plain Layout
853
854
855 \backslash
856 end{minipage}
857 \end_layout
858
859 \begin_layout Plain Layout
860
861
862 \backslash
863 end{verbatim}
864 \end_layout
865
866 \begin_layout Plain Layout
867
868
869 \backslash
870 end{minipage}
871 \end_layout
872
873 \begin_layout Plain Layout
874
875
876 \backslash
877 end{tabular}
878 \end_layout
879
880 \end_inset
881
882
883 \end_layout
884
885 \begin_layout Standard
886 In addition to these two methods, you can also create a separate file containing
887  some complex LaTeX structure.
888  You can then use 
889 \family sans
890 \bar under
891 I
892 \bar default
893 nsert\SpecialChar \menuseparator
894 Chil
895 \bar under
896 d
897 \bar default
898
899 \begin_inset space ~
900 \end_inset
901
902 Document
903 \family default
904  to include your file (you should select the type 
905 \family sans
906 Input
907 \family default
908 ).
909  We recommend that you only do this if you have a 
910 \family typewriter
911 .tex
912 \family default
913  file which you 
914 \emph on
915 know
916 \emph default
917  works already.
918  Otherwise, you'll have a big job tracking down LaTeX errors\SpecialChar \ldots{}
919
920 \end_layout
921
922 \begin_layout Standard
923 There are a few last notes to emphasize:
924 \end_layout
925
926 \begin_layout Itemize
927 Inside of LyX, LaTeX code appears 
928 \emph on
929 in red
930 \end_layout
931
932 \begin_layout Itemize
933 LyX 
934 \emph on
935 does not
936 \emph default
937  check if your LaTeX code is correct.
938 \end_layout
939
940 \begin_layout Itemize
941 Beware reinventing the wheel.
942 \end_layout
943
944 \begin_layout Standard
945 That last note refers to two things.
946  First, LyX does have quite a few features tucked into it, and more are
947  coming.
948  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
949  feature before you go off merrily coding LaTeX.
950  Second, there are numerous LaTeX packages out there to do all sorts of
951  things, from labels to envelopes to fancy multipage tables.
952  Check out a CTAN site for details (see Section 
953 \begin_inset Quotes eld
954 \end_inset
955
956 Requirements
957 \begin_inset Quotes erd
958 \end_inset
959
960  of the 
961 \emph on
962 User's Guide
963 \emph default
964 ).
965 \begin_inset Foot
966 status open
967
968 \begin_layout Plain Layout
969 Note from 
970 \noun on
971 John Weiss
972 \noun default
973 : I seem to do this an awful lot.
974  Sat down and merrily began coding something to print out labels, only to
975  learn that there were already 2 different LaTeX packages to do this.
976  Worse yet --- I had them already!
977 \end_layout
978
979 \end_inset
980
981
982 \end_layout
983
984 \begin_layout Standard
985 If you do need to do some wild and fancy things within your document, be
986  sure to check out a good LaTeX book for assistance.
987  There are a number of them listed in the bibliography of the 
988 \emph on
989 User's Guide
990 \emph default
991 .
992 \end_layout
993
994 \begin_layout Standard
995 There are a number of LaTeX commands which have to be placed before the
996  beginning of the actual text.
997  They go into the preamble, and this is explained in the next section.
998 \end_layout
999
1000 \begin_layout Section
1001 LyX and the LaTeX Preamble
1002 \end_layout
1003
1004 \begin_layout Subsection
1005 About the LaTeX Preamble
1006 \end_layout
1007
1008 \begin_layout Standard
1009 \begin_inset CommandInset label
1010 LatexCommand label
1011 name "sec:preamble"
1012
1013 \end_inset
1014
1015 If you already know LaTeX, there is no need to explain here what the preamble
1016  is good for.
1017  If you don't, the following will give you some ideas --- we recommend again
1018  that you consult a LaTeX book for further information.
1019  In any case, you should read the points below, because they explain what
1020  you can do and what you don't need to do in the LaTeX preamble of a LyX
1021  document.
1022 \end_layout
1023
1024 \begin_layout Standard
1025 The LaTeX preamble comes at the very beginning of a document, 
1026 \emph on
1027 before
1028 \emph default
1029  the text.
1030  It serves to:
1031 \end_layout
1032
1033 \begin_layout Itemize
1034 declare the document class.
1035  LyX already does this for you.
1036 \end_layout
1037
1038 \begin_deeper
1039 \begin_layout Standard
1040 If you're a seasoned LaTeX-nician, and you have some custom document class
1041  you want to use, check out the 
1042 \emph on
1043 Customization Manual
1044 \emph default
1045  for information on how to make LyX interface to it.
1046  Be sure to submit your efforts to the LyX Team for inclusion in future
1047  versions!
1048 \end_layout
1049
1050 \end_deeper
1051 \begin_layout Itemize
1052 declare the usage of packages.
1053  LaTeX packages provide special commands, which are only available within
1054  a document when the package has been declared in the preamble.
1055  For example, the package 
1056 \family typewriter
1057 indentfirst
1058 \family default
1059  forces all paragraphs to be indented.
1060  There are other packages for labels, envelopes, margins, etc.
1061  
1062 \end_layout
1063
1064 \begin_layout Itemize
1065 set counters, variables, lengths and widths.
1066  There are several LaTeX counters and variables which 
1067 \emph on
1068 must
1069 \emph default
1070  be set globally from within the preamble in order to have the desired effect.
1071  [There are other variables which you can set and reset inside the document,
1072  too.] Margins are a good example of something which must be set in the preamble.
1073  Another example is the label format for lists.
1074  You can actually set these just about anywhere, but it's best to do it
1075  just once, inside the preamble.
1076 \end_layout
1077
1078 \begin_layout Itemize
1079 declare user defined commands [with 
1080 \family typewriter
1081
1082 \backslash
1083 newcommand
1084 \family default
1085  or 
1086 \family typewriter
1087
1088 \backslash
1089 renewcommand
1090 \family default
1091 ], mostly abbreviations for LaTeX commands which appear very often inside
1092  a document.
1093  Although the preamble is a good place to declare such commands, they 
1094 \emph on
1095 can
1096 \emph default
1097  be declared anywhere else [but 
1098 \emph on
1099 before
1100 \emph default
1101  they are used for the first time, of course\SpecialChar \ldots{}
1102 ].
1103  This can be useful if there is a lot of raw LaTeX code in your document,
1104  which normally should not be the case.
1105 \end_layout
1106
1107 \begin_layout Standard
1108 LyX adds its own set of definitions to the preamble of the 
1109 \family typewriter
1110 .tex
1111 \family default
1112  file it produces.
1113  This makes LaTeX files generated by LyX portable.
1114 \end_layout
1115
1116 \begin_layout Subsection
1117 Changing the Preamble
1118 \end_layout
1119
1120 \begin_layout Standard
1121 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1122  can't change them without patching LyX itself.
1123  You can, however, add your own stuff to the preamble.
1124  There are two ways to do this:
1125 \end_layout
1126
1127 \begin_layout Enumerate
1128 Select 
1129 \family sans
1130 \bar under
1131 L
1132 \bar default
1133 aTeX
1134 \begin_inset space ~
1135 \end_inset
1136
1137
1138 \bar under
1139 P
1140 \bar default
1141 reamble
1142 \family default
1143  from the 
1144 \family sans
1145 \bar under
1146 D
1147 \bar default
1148 ocument
1149 \family default
1150  menu, or via the 
1151 \family sans
1152 \bar under
1153 D
1154 \bar default
1155 ocument
1156 \family default
1157 \SpecialChar \menuseparator
1158
1159 \family sans
1160 \bar under
1161 S
1162 \bar default
1163 ettings
1164 \family default
1165  dialog, depending on your frontend.
1166  Note that the LyX keybindings will not work in this dialog, alas.
1167 \end_layout
1168
1169 \begin_layout Enumerate
1170 Use the preamble contents you've added as your default template (see 
1171 \begin_inset Quotes eld
1172 \end_inset
1173
1174 Basic LyX Setup
1175 \begin_inset Quotes erd
1176 \end_inset
1177
1178  in the 
1179 \emph on
1180 User's Guide
1181 \emph default
1182 ), so that it will be the default preamble for any file you create.
1183 \end_layout
1184
1185 \begin_layout Standard
1186 LyX adds anything in the 
1187 \family sans
1188 \bar under
1189 P
1190 \bar default
1191 reamble
1192 \family default
1193  dialog to its own built-in preamble.
1194  Before adding your own declarations in the preamble, you should make sure
1195  that LyX doesn't already support what you want to do (remember what we
1196  said about reinventing the wheel?).
1197  Also, 
1198 \emph on
1199 make sure your preamble code is correct
1200 \emph default
1201 .
1202  LyX doesn't check it.
1203 \end_layout
1204
1205 \begin_layout Subsection
1206 Examples
1207 \end_layout
1208
1209 \begin_layout Standard
1210 Here are some examples of what you can add to a preamble, and what they
1211  do:
1212 \end_layout
1213
1214 \begin_layout Subsubsection
1215 Example #1: Offsets
1216 \end_layout
1217
1218 \begin_layout Standard
1219 There are two variables under LaTeX that control page position: 
1220 \family typewriter
1221
1222 \backslash
1223 hoffset
1224 \family default
1225  and 
1226 \family typewriter
1227
1228 \backslash
1229 voffset
1230 \family default
1231 .
1232  Their names should be self-explanatory.
1233  These variables are useful if you think for a moment about computer labels.
1234  Sometimes, the size of a print medium and the area of the medium that you
1235  can actually print on aren't the same.
1236  This is where 
1237 \family typewriter
1238
1239 \backslash
1240 hoffset
1241 \family default
1242  and 
1243 \family typewriter
1244
1245 \backslash
1246 voffset
1247 \family default
1248  come in.
1249 \end_layout
1250
1251 \begin_layout Standard
1252 The default values for 
1253 \family typewriter
1254
1255 \backslash
1256 hoffset
1257 \family default
1258  and 
1259 \family typewriter
1260
1261 \backslash
1262 voffset
1263 \family default
1264  are both 0 pt.,
1265 \begin_inset space ~
1266 \end_inset
1267
1268 i.
1269 \begin_inset space ~
1270 \end_inset
1271
1272 e.
1273 \begin_inset space ~
1274 \end_inset
1275
1276 the page isn't shifted.
1277 \end_layout
1278
1279 \begin_layout Standard
1280 Unfortunately, some DVI drivers always seem to shift the page.
1281  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1282  If you're using LyX on a system that you don't personally maintain, and
1283  your sysadmin is a doofus, 
1284 \family typewriter
1285
1286 \backslash
1287 hoffset
1288 \family default
1289  and 
1290 \family typewriter
1291
1292 \backslash
1293 voffset
1294 \family default
1295  can save the day.
1296  Suppose you're left and top margins are always 0.5 inches too big.
1297  You can add this to the preamble:
1298 \end_layout
1299
1300 \begin_layout LyX-Code
1301
1302 \backslash
1303 setlength{
1304 \backslash
1305 hoffset}{-0.5 in}
1306 \end_layout
1307
1308 \begin_layout LyX-Code
1309
1310 \backslash
1311 setlength{
1312 \backslash
1313 voffset}{-0.5 in}
1314 \end_layout
1315
1316 \begin_layout Standard
1317 \SpecialChar \ldots{}
1318 and your margins should now be correct.
1319 \end_layout
1320
1321 \begin_layout Subsubsection
1322 Example #2: Labels
1323 \end_layout
1324
1325 \begin_layout Standard
1326 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1327  There's a rather nice package, available at your nearest CTAN archive,
1328  for printing sheets of labels, called 
1329 \family typewriter
1330 labels.sty
1331 \family default
1332 .
1333  Now, your system may not have this package installed by default.
1334  We leave that up to you to check.
1335  You'll also want to read the documentation for it; we're not going to do
1336  that for you.
1337  Since this is an example, however, we'll give you an example of how you
1338  use this package.
1339 \end_layout
1340
1341 \begin_layout Standard
1342 First, make sure you're using the 
1343 \family sans
1344 article
1345 \family default
1346  document class.
1347  Next, you need to put the following in your preamble:
1348 \end_layout
1349
1350 \begin_layout LyX-Code
1351
1352 \backslash
1353 usepackage{labels}
1354 \end_layout
1355
1356 \begin_layout LyX-Code
1357
1358 \backslash
1359 LabelCols=3
1360 \end_layout
1361
1362 \begin_layout LyX-Code
1363
1364 \backslash
1365 LabelRows=7
1366 \end_layout
1367
1368 \begin_layout LyX-Code
1369
1370 \backslash
1371 LeftBorder=8mm
1372 \end_layout
1373
1374 \begin_layout LyX-Code
1375
1376 \backslash
1377 RightBorder=8mm
1378 \end_layout
1379
1380 \begin_layout LyX-Code
1381
1382 \backslash
1383 TopBorder=9mm
1384 \end_layout
1385
1386 \begin_layout LyX-Code
1387
1388 \backslash
1389 BottomBorder=2mm
1390 \end_layout
1391
1392 \begin_layout Standard
1393 This sets things up for Avery® label sheets, stock #5360.
1394  You're now ready to print labels, but you'll need to insert LaTeX code,
1395  placing the commands 
1396 \family typewriter
1397
1398 \backslash
1399 begin{labels}
1400 \family default
1401  and 
1402 \family typewriter
1403
1404 \backslash
1405 end{labels}
1406 \family default
1407  around each label text.
1408  This and other special features of 
1409 \family typewriter
1410 labels.sty
1411 \family default
1412  are explained in its documentation.
1413 \end_layout
1414
1415 \begin_layout Standard
1416 Someday, someone may write a LyX layout file to support this package directly.
1417  Maybe that someone is you.
1418 \end_layout
1419
1420 \begin_layout Subsubsection
1421 Example #3: Paragraph Indentation
1422 \end_layout
1423
1424 \begin_layout Standard
1425 Americans are trained to indent the first line of 
1426 \emph on
1427 every
1428 \emph default
1429  paragraph.
1430  As with all of their other weird quirks, most Americans will whine and
1431  moan until they can have their way and indent the first line of all paragraphs.
1432 \begin_inset Foot
1433 status collapsed
1434
1435 \begin_layout Plain Layout
1436 Note from 
1437 \noun on
1438 John Weiss
1439 \noun default
1440 : This was written by an American --- 
1441 \emph on
1442 me
1443 \emph default
1444 ! It's my perception of my fellow countrymen.
1445  Tough if you don't like it.
1446  Thpbpbpbpbpbpbpbp!
1447 \end_layout
1448
1449 \end_inset
1450
1451
1452 \end_layout
1453
1454 \begin_layout Standard
1455 Of course, this behavior isn't standard typography.
1456  In books, you typically only indent the first line of a paragraph 
1457 \emph on
1458 if
1459 \emph default
1460  it follows another one.
1461  The idea behind indenting the first line of a paragraph is to distinguish
1462  neighboring paragraphs from one another.
1463  If there is no previous paragraph, for example, it follows a figure, or
1464  is the first paragraph in a section, then there is no special indentation.
1465  
1466 \end_layout
1467
1468 \begin_layout Standard
1469 If you're a typical American, though, you don't care about such esoteric
1470  things; you want your indentation! Add this to the preamble:
1471 \end_layout
1472
1473 \begin_layout LyX-Code
1474
1475 \backslash
1476 usepackage{indentfirst}
1477 \end_layout
1478
1479 \begin_layout Standard
1480 If your TeX distribution isn't a braindead one, you'll have this package,
1481  and all of your paragraphs will get the indentation you think they deserve.
1482 \end_layout
1483
1484 \begin_layout Subsubsection
1485 Example #4: This Document
1486 \end_layout
1487
1488 \begin_layout Standard
1489 You can also check out the preamble of this document to get an idea of some
1490  of the advanced things you can do.
1491  You'll probably need to make the 
1492 \family sans
1493 \bar under
1494 P
1495 \bar default
1496 reamble\SpecialChar \ldots{}
1497
1498 \family default
1499  dialog full-screen to see most of it.
1500  Also, there are more examples and an assortment of LaTeX 
1501 \begin_inset Quotes eld
1502 \end_inset
1503
1504 dirty tricks
1505 \begin_inset Quotes erd
1506 \end_inset
1507
1508  given in Chapter
1509 \begin_inset space ~
1510 \end_inset
1511
1512
1513 \begin_inset CommandInset ref
1514 LatexCommand ref
1515 reference "cha:secrets"
1516
1517 \end_inset
1518
1519 .
1520  
1521 \end_layout
1522
1523 \begin_layout Section
1524 LyX and LaTeX Errors
1525 \end_layout
1526
1527 \begin_layout Standard
1528 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1529  going.
1530  It then uses the log-file from the LaTeX run to do a post-mortem.
1531  As we stated earlier in the chapter, LyX generates two kinds of 
1532 \family typewriter
1533 .tex
1534 \family default
1535  files, one of which it uses to locate errors in the document.
1536  If there was an error someplace, LyX will put a box with the word 
1537 \begin_inset Quotes eld
1538 \end_inset
1539
1540 Error
1541 \begin_inset Quotes erd
1542 \end_inset
1543
1544  at the appropriate place in the document.
1545 \begin_inset Foot
1546 status collapsed
1547
1548 \begin_layout Plain Layout
1549 LyX will occasionally misguess where the error was.
1550  This will typically happen with tables, figures, math, and the preamble.
1551 \end_layout
1552
1553 \end_inset
1554
1555  It will also display a message alerting you to the fact that there were
1556  errors.
1557 \end_layout
1558
1559 \begin_layout Standard
1560 You can navigate through the errors by using 
1561 \family sans
1562 \bar under
1563 E
1564 \bar default
1565 rror
1566 \family default
1567  in the 
1568 \family sans
1569 \bar under
1570 N
1571 \bar default
1572 avigate
1573 \family default
1574  menu.
1575  You can 
1576 \begin_inset Quotes eld
1577 \end_inset
1578
1579 open
1580 \begin_inset Quotes erd
1581 \end_inset
1582
1583  the error-boxes and view the error message LaTeX produced by clicking on
1584  it.
1585 \end_layout
1586
1587 \begin_layout Standard
1588 Some folks also like to look at the log file directly, accessible from 
1589 \family sans
1590 \bar under
1591 D
1592 \bar default
1593 ocument\SpecialChar \menuseparator
1594
1595 \bar under
1596 L
1597 \bar default
1598 aTeX
1599 \begin_inset space ~
1600 \end_inset
1601
1602 Log
1603 \begin_inset space ~
1604 \end_inset
1605
1606 File
1607 \family default
1608 .
1609  There are some fairly common error messages and warnings.
1610  We'll cover those here.
1611  You should look at a good LaTeX book for a complete listing.
1612 \end_layout
1613
1614 \begin_layout Itemize
1615 \begin_inset Quotes eld
1616 \end_inset
1617
1618
1619 \family typewriter
1620 LaTeX Warning:
1621 \family default
1622
1623 \begin_inset Quotes eld
1624 \end_inset
1625
1626
1627 \end_layout
1628
1629 \begin_deeper
1630 \begin_layout Standard
1631 Anything beginning with these word is a warning message for the purpose
1632  of 
1633 \begin_inset Quotes eld
1634 \end_inset
1635
1636 debugging
1637 \begin_inset Quotes erd
1638 \end_inset
1639
1640  the LaTeX code itself.
1641  You'll get messages like this if you added or changed cross-references
1642  or bibliography entries, in which case, LaTeX is trying to tell you that
1643  you need to make another run.
1644 \end_layout
1645
1646 \begin_layout Standard
1647 You can by-and-large ignore these.
1648 \end_layout
1649
1650 \end_deeper
1651 \begin_layout Itemize
1652 \begin_inset Quotes eld
1653 \end_inset
1654
1655
1656 \family typewriter
1657 LaTeX Font Warning:
1658 \family default
1659
1660 \begin_inset Quotes erd
1661 \end_inset
1662
1663
1664 \end_layout
1665
1666 \begin_deeper
1667 \begin_layout Standard
1668 Another warning message, this time about fonts which LaTeX couldn't find.
1669  The rest of the message will often say something about a replacement font
1670  that LaTeX used.
1671 \end_layout
1672
1673 \begin_layout Standard
1674 You can safely ignore these.
1675 \end_layout
1676
1677 \end_deeper
1678 \begin_layout Itemize
1679 \begin_inset Quotes eld
1680 \end_inset
1681
1682
1683 \family typewriter
1684 Overfull 
1685 \backslash
1686 hbox
1687 \family default
1688
1689 \begin_inset Quotes erd
1690 \end_inset
1691
1692
1693 \end_layout
1694
1695 \begin_deeper
1696 \begin_layout Standard
1697 LaTeX absolutely 
1698 \emph on
1699 loves
1700 \emph default
1701  to spew these out.
1702  They are warning you about lines that were too long and run past the right
1703  margin.
1704  Almost always, this is unnoticeable in the final output.
1705  Or, only one or two characters extend past the margin.
1706  LaTeX seems to generate at least one of these messages for just about any
1707  document you write.
1708 \end_layout
1709
1710 \begin_layout Standard
1711 You can ignore these stupid messages.
1712  Your eyes will tell you if there's a problem with something that's too
1713  wide; just look at the output.
1714 \end_layout
1715
1716 \end_deeper
1717 \begin_layout Itemize
1718 \begin_inset Quotes eld
1719 \end_inset
1720
1721
1722 \family typewriter
1723 Underfull 
1724 \backslash
1725 hbox
1726 \family default
1727
1728 \begin_inset Quotes erd
1729 \end_inset
1730
1731
1732 \end_layout
1733
1734 \begin_deeper
1735 \begin_layout Standard
1736 Not quite as common as its cousin.
1737  LaTeX seems to like to print lines that are a bit too wide as opposed to
1738  ones that are a bit too narrow.
1739  We have no idea why.
1740 \end_layout
1741
1742 \begin_layout Standard
1743 You can ignore these, too.
1744 \end_layout
1745
1746 \end_deeper
1747 \begin_layout Itemize
1748 \begin_inset Quotes eld
1749 \end_inset
1750
1751
1752 \family typewriter
1753 Overfull 
1754 \backslash
1755 vbox
1756 \family default
1757
1758 \begin_inset Quotes erd
1759 \end_inset
1760
1761  and 
1762 \begin_inset Quotes eld
1763 \end_inset
1764
1765
1766 \family typewriter
1767 Underfull 
1768 \backslash
1769 vbox
1770 \family default
1771
1772 \begin_inset Quotes erd
1773 \end_inset
1774
1775
1776 \end_layout
1777
1778 \begin_deeper
1779 \begin_layout Standard
1780 Warnings about troubles breaking the page.
1781  Once again, just look at the output.
1782  Your eyes will tell you where something has gone wrong.
1783 \end_layout
1784
1785 \end_deeper
1786 \begin_layout Itemize
1787 \begin_inset Quotes eld
1788 \end_inset
1789
1790  
1791 \family typewriter
1792 LaTeX Error: File 
1793 \begin_inset Quotes els
1794 \end_inset
1795
1796 Xxxx
1797 \begin_inset Quotes ers
1798 \end_inset
1799
1800  not found
1801 \family default
1802
1803 \begin_inset Quotes erd
1804 \end_inset
1805
1806  
1807 \end_layout
1808
1809 \begin_deeper
1810 \begin_layout Standard
1811 The file 
1812 \begin_inset Quotes eld
1813 \end_inset
1814
1815 Xxxx
1816 \begin_inset Quotes erd
1817 \end_inset
1818
1819  isn't installed on this system.
1820  This usually appears because some package your document needs isn't installed.
1821  If you didn't touch the preamble or didn't use the 
1822 \family typewriter
1823
1824 \backslash
1825 usepackage{}
1826 \family default
1827  command, then one of the packages LyX tried to load is missing.
1828  Use 
1829 \family sans
1830 \bar under
1831 H
1832 \bar default
1833 elp\SpecialChar \menuseparator
1834 L
1835 \bar under
1836 a
1837 \bar default
1838 TeX Configuration
1839 \family default
1840 , to get a list of packages that LyX knows about.
1841  This file is updated whenever you reconfigure LyX (using 
1842 \family sans
1843 \bar under
1844 T
1845 \bar default
1846 ools
1847 \bar under
1848 \SpecialChar \menuseparator
1849 R
1850 \bar default
1851 econfigure
1852 \family default
1853 ) and tells you which packages have been detected and what they do.
1854 \end_layout
1855
1856 \begin_layout Standard
1857 If you 
1858 \emph on
1859 did
1860 \emph default
1861  use the 
1862 \family typewriter
1863
1864 \backslash
1865 usepackage{}
1866 \family default
1867  command, and the package in question isn't installed, you'll need to install
1868  it yourself.
1869 \end_layout
1870
1871 \end_deeper
1872 \begin_layout Itemize
1873 \begin_inset Quotes eld
1874 \end_inset
1875
1876
1877 \family typewriter
1878 LaTeX Error: Unknown option
1879 \family default
1880
1881 \begin_inset Quotes erd
1882 \end_inset
1883
1884
1885 \end_layout
1886
1887 \begin_deeper
1888 \begin_layout Standard
1889 Error messages beginning with this are trying to tell you that you specified
1890  a bad or undefined option to a package.
1891  Check the package's documentation.
1892 \end_layout
1893
1894 \end_deeper
1895 \begin_layout Itemize
1896 \begin_inset Quotes eld
1897 \end_inset
1898
1899
1900 \family typewriter
1901 Undefined control sequence
1902 \family default
1903
1904 \begin_inset Quotes erd
1905 \end_inset
1906
1907
1908 \end_layout
1909
1910 \begin_deeper
1911 \begin_layout Standard
1912 If you've inserted LaTeX code into your document, but made a typo, you'll
1913  get one of these.
1914  You may have forgotten to load a package.
1915  In any case, this error message usually means that you used an undefined
1916  command.
1917 \end_layout
1918
1919 \end_deeper
1920 \begin_layout Standard
1921 There are other error and warning messages.
1922  Some are self-explanatory.
1923  These are usually LaTeX messages.
1924  Others are downright cryptic.
1925  These are actually TeX error messages, and we really have 
1926 \emph on
1927 no clue
1928 \emph default
1929  what they mean or how to decipher them.
1930 \end_layout
1931
1932 \begin_layout Standard
1933 There's a general sequence you should follow if you get error messages:
1934 \end_layout
1935
1936 \begin_layout Enumerate
1937 Look at the LaTeX code you inserted for typos.
1938 \end_layout
1939
1940 \begin_layout Enumerate
1941 If there are no typos, check and see that you used the command(s) correctly.
1942 \end_layout
1943
1944 \begin_layout Enumerate
1945 If you get a bunch of error boxes piled up at the very top of the document,
1946  it means that there are errors in the preamble.
1947  Start debugging your preamble.
1948 \end_layout
1949
1950 \begin_layout Enumerate
1951 If you didn't add anything to the preamble and didn't add any LaTeX code
1952  to the document, the first suspect is your LaTeX distribution itself.
1953  Check for missing packages and install them.
1954 \end_layout
1955
1956 \begin_layout Enumerate
1957 Okay, so there are no missing packages.
1958  Did you use any of the fine-tuning options in LyX? Specifically, did you
1959  
1960 \emph on
1961 misuse
1962 \emph default
1963  any of them, like trying to manually insert lots of 
1964 \family sans
1965 Protected
1966 \begin_inset space ~
1967 \end_inset
1968
1969 Blank
1970 \family default
1971 s, 
1972 \family sans
1973 Linebreak
1974 \family default
1975 s, or 
1976 \family sans
1977 Pagebreak
1978 \family default
1979 s? Did you try to kludge something together with these instead of using
1980  the appropriate paragraph environment?
1981 \end_layout
1982
1983 \begin_layout Enumerate
1984 All right, you didn't use any of the fine-tuning options, you played by
1985  the rules.
1986  Did you try to pull a fancy maneuver? Did you do something funky inside
1987  a table or an equation, like inserting a graphic into a table cell?
1988 \end_layout
1989
1990 \begin_layout Enumerate
1991 Do you have long sections of text where LaTeX cannot find a place to break
1992  a line? By default, LaTeX is rather strict about how much extra inter-word
1993  spacing it will add in order to break a line.
1994  Preferably, you should rework the paragraph to avoid the problem.
1995  If this isn't an option, you can wrap your text in 
1996 \family typewriter
1997
1998 \backslash
1999 sloppypar
2000 \family default
2001  to make LaTeX's line breaking more, well, sloppy.
2002 \end_layout
2003
2004 \begin_layout Enumerate
2005 Did you go overboard with the nesting? LyX (currently) doesn't check to
2006  make sure you're in the limits for nesting environments.
2007  If you nested a bunch of environments to the 
2008 \begin_inset Formula $17^{\mathrm{th}}$
2009 \end_inset
2010
2011  level, that's the problem.
2012 \end_layout
2013
2014 \begin_layout Enumerate
2015 Okay, you didn't get any error messages, but your output looks whacked.
2016  If you have a table or figure that's too wide or long for the page, you
2017  need to:
2018 \end_layout
2019
2020 \begin_deeper
2021 \begin_layout Enumerate
2022 rescale the figure so it fits.
2023 \end_layout
2024
2025 \begin_layout Enumerate
2026 trim down the table so it fits.
2027 \end_layout
2028
2029 \begin_layout Standard
2030 If something else is wrong with the output, and you didn't try to pull anything
2031  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2032 \end_layout
2033
2034 \end_deeper
2035 \begin_layout Standard
2036 If all this doesn't help --- well, then 
2037 \emph on
2038 perhaps
2039 \emph default
2040  you might have found a bug in LyX\SpecialChar \ldots{}
2041
2042 \end_layout
2043
2044 \begin_layout Chapter
2045 Supplemental Tools
2046 \end_layout
2047
2048 \begin_layout Section
2049 Preparing a Bibliography with BibTeX
2050 \begin_inset CommandInset label
2051 LatexCommand label
2052 name "sec:Preparing-a-Bibliography"
2053
2054 \end_inset
2055
2056
2057 \end_layout
2058
2059 \begin_layout Standard
2060 by 
2061 \noun on
2062 Mike Ressler
2063 \noun default
2064  and 
2065 \noun on
2066 Jürgen Spitzmüller
2067 \end_layout
2068
2069 \begin_layout Standard
2070 \begin_inset VSpace bigskip
2071 \end_inset
2072
2073
2074 \end_layout
2075
2076 \begin_layout Standard
2077 \noindent
2078 STOP! If you don't know what BibTeX is, or have a reasonably good idea of
2079  how to use it (
2080 \emph on
2081 e.
2082 \begin_inset space \thinspace{}
2083 \end_inset
2084
2085 g.
2086 \emph default
2087
2088 \begin_inset space ~
2089 \end_inset
2090
2091 setting up your own bibliographic databases), 
2092 \emph on
2093 run
2094 \emph default
2095 , do not walk, to your nearest copy of the 2nd edition of Lamport's 
2096 \emph on
2097 LaTeX: A Document Preparation System
2098 \emph default
2099 , particularly Appendix B.
2100  The rest of this discussion assumes you have created a correct bibliography
2101  file, that you have all relevant environment variables set correctly (esp.
2102  
2103 \family typewriter
2104 BIBINPUTS
2105 \family default
2106
2107 \family typewriter
2108 BSTINPUTS
2109 \family default
2110 , and 
2111 \family typewriter
2112 TEXINPUTS
2113 \family default
2114 ), and that if sufficiently desperate, you could create and 
2115 \begin_inset Quotes eld
2116 \end_inset
2117
2118 TeX
2119 \begin_inset Quotes erd
2120 \end_inset
2121
2122  a LaTeX file with a BibTeX database.
2123  
2124 \end_layout
2125
2126 \begin_layout Standard
2127 For those who don't know what BibTeX is, it is a system for creating a large
2128  database of your most used journal references.
2129  For all future articles you write, you only need to include this standard
2130  database and reference the appropriate key to each reference.
2131  Even if you write only a few papers with handful of references each, it
2132  is well worth your time to examine BibTeX and decide whether it will be
2133  useful to you.
2134 \end_layout
2135
2136 \begin_layout Standard
2137 To use BibTeX with LyX, first read the 
2138 \emph on
2139 User Guide
2140 \emph default
2141  where it describes how to insert citations.
2142  The basic mechanism for inserting BibTeX references is the same.
2143  Then, at the very end of your document, select 
2144 \family sans
2145 Insert\SpecialChar \menuseparator
2146 List
2147 \family default
2148  / 
2149 \family sans
2150 TOC\SpecialChar \menuseparator
2151 BibTeX Reference
2152 \family default
2153 .
2154  In the resulting dialog, fill out the dialog boxes as follows: 
2155 \end_layout
2156
2157 \begin_layout Description
2158 Database: enter the name of your 
2159 \family typewriter
2160 .bib
2161 \family default
2162  file 
2163 \emph on
2164 without
2165 \emph default
2166  the 
2167 \family typewriter
2168 .bib
2169 \family default
2170  extension.
2171  For searching multiple 
2172 \family typewriter
2173 .bib
2174 \family default
2175  files, just enter them in the desired order, separated by commas.
2176  
2177 \end_layout
2178
2179 \begin_layout Description
2180 Style: enter the name of your BibTeX style file *without* the 
2181 \family typewriter
2182 .bst
2183 \family default
2184  extension.
2185  The default style is 
2186 \family typewriter
2187 plain
2188 \family default
2189  (which should be included in your LaTeX distribution, so you don't have
2190  to worry about creating it).
2191 \end_layout
2192
2193 \begin_layout Standard
2194 For each citation, assuming that the source is in the 
2195 \family typewriter
2196 .bib
2197 \family default
2198  file, just call 
2199 \family sans
2200 \bar under
2201 I
2202 \bar default
2203 nsert\SpecialChar \menuseparator
2204
2205 \bar under
2206 C
2207 \bar default
2208 itation Reference
2209 \family default
2210  at the correct location in the text, and enter the appropriate reference
2211  key.
2212  Nothing else is required; when invoking 
2213 \family sans
2214 \bar under
2215 V
2216 \bar default
2217 iew\SpecialChar \menuseparator
2218
2219 \bar under
2220 D
2221 \bar default
2222 VI
2223 \family default
2224 , for example, you should see that BibTeX and LaTeX are invoked as needed,
2225  including multiple invocations of LaTeX.
2226  
2227 \end_layout
2228
2229 \begin_layout Subsection
2230 Alternative Citation Styles
2231 \end_layout
2232
2233 \begin_layout Standard
2234 Standard BibTeX uses numbers (e.
2235 \begin_inset space \thinspace{}
2236 \end_inset
2237
2238 g.
2239 \begin_inset space \space{}
2240 \end_inset
2241
2242
2243 \begin_inset Quotes eld
2244 \end_inset
2245
2246 [12]
2247 \begin_inset Quotes erd
2248 \end_inset
2249
2250 ) to refer to a cited work.
2251  However, in many scientific disciplines, other citation styles are in use.
2252  The most common one is the author-year style (e.
2253 \begin_inset space \thinspace{}
2254 \end_inset
2255
2256 g.
2257 \begin_inset space \space{}
2258 \end_inset
2259
2260
2261 \begin_inset Quotes eld
2262 \end_inset
2263
2264 Knuth 1984a
2265 \begin_inset Quotes erd
2266 \end_inset
2267
2268 ).
2269  LyX supports two packages that provide this style, 
2270 \family typewriter
2271 natbib
2272 \family default
2273  and 
2274 \family typewriter
2275 jurabib
2276 \family default
2277 .
2278  Both packages have their own pros and cons, which cannot be listed in detail.
2279  If you only want to have simple author-year (or author-numerical) style
2280  or if you want to use one of the countless style files for natbib, than
2281  the established 
2282 \family typewriter
2283 natbib
2284 \family default
2285  package is probably your choice.
2286  If you need special features like short title references, ibidem etc., you
2287  might consider the fairly new 
2288 \family typewriter
2289 jurabib
2290 \family default
2291  package.
2292 \end_layout
2293
2294 \begin_layout Standard
2295 The handling of both packages in LyX is basically the same.
2296  Go to 
2297 \family sans
2298 \bar under
2299 D
2300 \bar default
2301 ocument\SpecialChar \menuseparator
2302
2303 \bar under
2304 S
2305 \bar default
2306 ettings
2307 \family default
2308  and select the 
2309 \family sans
2310 Bibliography
2311 \family default
2312  pane (with the xforms frontend: the 
2313 \family sans
2314 Extras
2315 \family default
2316  tab).
2317  Then select 
2318 \family sans
2319 Natbib
2320 \family default
2321  or 
2322 \family sans
2323 Jurabib
2324 \family default
2325 .
2326  With both packages, you will get some extra features in the citation dialog
2327  and you can select the style of the reference (
2328 \begin_inset Quotes eld
2329 \end_inset
2330
2331 Knuth 1984
2332 \begin_inset Quotes erd
2333 \end_inset
2334
2335
2336 \begin_inset Quotes eld
2337 \end_inset
2338
2339 Knuth (1984)
2340 \begin_inset Quotes erd
2341 \end_inset
2342
2343
2344 \begin_inset Quotes eld
2345 \end_inset
2346
2347 Knuth, 1984
2348 \begin_inset Quotes erd
2349 \end_inset
2350
2351
2352 \begin_inset Quotes eld
2353 \end_inset
2354
2355 1984
2356 \begin_inset Quotes erd
2357 \end_inset
2358
2359  etc.).
2360  Note that both packages need specifically designed style files (they both
2361  ship their own, while there are lots of additional style files and even
2362  an interactive style file builder
2363 \begin_inset Foot
2364 status collapsed
2365
2366 \begin_layout Plain Layout
2367 See 
2368 \begin_inset Flex URL
2369 status collapsed
2370
2371 \begin_layout Plain Layout
2372
2373 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2374 \end_layout
2375
2376 \end_inset
2377
2378
2379 \end_layout
2380
2381 \end_inset
2382
2383  for 
2384 \family typewriter
2385 natbib
2386 \family default
2387  available).
2388 \end_layout
2389
2390 \begin_layout Subsection
2391 Sectionated Bibliographies
2392 \begin_inset CommandInset label
2393 LatexCommand label
2394 name "sub:Sectionated-Bibliographies"
2395
2396 \end_inset
2397
2398
2399 \end_layout
2400
2401 \begin_layout Standard
2402 Sometimes you might need to divide your bibliography into several sections.
2403  If you are, for instance, a historian, the possibility to separate sources
2404  and scientific works is most likely a 
2405 \begin_inset Quotes eld
2406 \end_inset
2407
2408 must have
2409 \begin_inset Quotes erd
2410 \end_inset
2411
2412 .
2413  Unfortunately, BibTeX itself does not allow you to do this.
2414  The good news is, though: With the help of some LaTeX packages, BibTeX
2415  can be extended to fit your historical needs.
2416 \end_layout
2417
2418 \begin_layout Standard
2419 As of version 1.4, LyX provides native support for one of these packages,
2420  Stefan Ulrich's 
2421 \family typewriter
2422 bibtopic
2423 \family default
2424 .
2425 \begin_inset Foot
2426 status collapsed
2427
2428 \begin_layout Plain Layout
2429 Available from 
2430 \begin_inset Flex URL
2431 status collapsed
2432
2433 \begin_layout Plain Layout
2434
2435 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2436 \end_layout
2437
2438 \end_inset
2439
2440
2441 \end_layout
2442
2443 \end_inset
2444
2445  The advantage of this package (compared to other packages like 
2446 \family typewriter
2447 multibib
2448 \family default
2449 ) is that you don't need to define new citation commands.
2450  Instead, you need to prepare different bibliographic databases which include
2451  the entries for the different sections of the bibliography.
2452  For example: If you want to divide your bibliography into the sections
2453  
2454 \begin_inset Quotes eld
2455 \end_inset
2456
2457 Sources
2458 \begin_inset Quotes erd
2459 \end_inset
2460
2461  and 
2462 \begin_inset Quotes eld
2463 \end_inset
2464
2465 Scientific works
2466 \begin_inset Quotes erd
2467 \end_inset
2468
2469 , you first need to create two bibliographic databases, e.
2470 \begin_inset space \thinspace{}
2471 \end_inset
2472
2473 g.
2474 \begin_inset space \space{}
2475 \end_inset
2476
2477
2478 \family typewriter
2479 sources.bib
2480 \family default
2481  and 
2482 \family typewriter
2483 scientific.bib
2484 \family default
2485 .
2486  
2487 \end_layout
2488
2489 \begin_layout Standard
2490 In LyX, go to 
2491 \family sans
2492 \bar under
2493 D
2494 \bar default
2495 ocument\SpecialChar \menuseparator
2496
2497 \bar under
2498 S
2499 \bar default
2500 ettings
2501 \family default
2502  and select the 
2503 \family sans
2504 Bibliography
2505 \family default
2506  pane (with the xforms frontend: the 
2507 \family sans
2508 Extras
2509 \family default
2510  tab).
2511  Check 
2512 \family sans
2513 Sectionated
2514 \begin_inset space ~
2515 \end_inset
2516
2517 bibliography
2518 \family default
2519 .
2520  Now you can insert multiple BibTeX references (as described in section
2521 \begin_inset space ~
2522 \end_inset
2523
2524
2525 \begin_inset CommandInset ref
2526 LatexCommand ref
2527 reference "sec:Preparing-a-Bibliography"
2528
2529 \end_inset
2530
2531 ), one for each section of your bibliography.
2532  Returning to our example: Insert a BibTeX reference for the database 
2533 \family typewriter
2534 sources.bib
2535 \family default
2536  and a second one for the database 
2537 \family typewriter
2538 scientific.bib
2539 \family default
2540 .
2541  You are free to use the same or different styles for each section.
2542  Additionally, you can chose if the bibliography section should contain
2543  
2544 \begin_inset Quotes eld
2545 \end_inset
2546
2547 all cited references
2548 \begin_inset Quotes erd
2549 \end_inset
2550
2551  of the specified database(s) (which is the default), 
2552 \begin_inset Quotes eld
2553 \end_inset
2554
2555 all uncited references
2556 \begin_inset Quotes erd
2557 \end_inset
2558
2559  or even 
2560 \begin_inset Quotes eld
2561 \end_inset
2562
2563 all references
2564 \begin_inset Quotes erd
2565 \end_inset
2566
2567 .
2568  This might be useful if you would like to separate your bibliography into
2569  three sections: 
2570 \begin_inset Quotes eld
2571 \end_inset
2572
2573 Cited sources
2574 \begin_inset Quotes erd
2575 \end_inset
2576
2577
2578 \begin_inset Quotes eld
2579 \end_inset
2580
2581 Uncited sources
2582 \begin_inset Quotes erd
2583 \end_inset
2584
2585 , and 
2586 \begin_inset Quotes eld
2587 \end_inset
2588
2589 Scientific works
2590 \begin_inset Quotes erd
2591 \end_inset
2592
2593 .
2594  The titles for the sections can be added as ordinary sections or subsections.
2595  Since 
2596 \family typewriter
2597 bibtopic
2598 \family default
2599  removes the bibliography title, you have manually re-add that, too (as
2600  a chapter* or section*, for instance).
2601 \end_layout
2602
2603 \begin_layout Subsection
2604 Multiple Bibliographies
2605 \end_layout
2606
2607 \begin_layout Standard
2608 Multiple bibliographies, e.
2609 \begin_inset space \thinspace{}
2610 \end_inset
2611
2612 g.
2613 \begin_inset space \space{}
2614 \end_inset
2615
2616 a bibliography for each section or chapter of the document, are not supported
2617  by BibTeX itself.
2618  But the 
2619 \family typewriter
2620 bibtopic
2621 \family default
2622  package, which is used for the creation of sectionated bibliographies in
2623  LyX (cf.
2624 \begin_inset space ~
2625 \end_inset
2626
2627 section
2628 \begin_inset space ~
2629 \end_inset
2630
2631
2632 \begin_inset CommandInset ref
2633 LatexCommand ref
2634 reference "sub:Sectionated-Bibliographies"
2635
2636 \end_inset
2637
2638 ), provides an easy way to solve this task, if you are willing to use some
2639  LaTeX-Code (ERT, cf.
2640 \begin_inset space ~
2641 \end_inset
2642
2643 section
2644 \begin_inset space ~
2645 \end_inset
2646
2647
2648 \begin_inset CommandInset ref
2649 LatexCommand ref
2650 reference "sec:Inserting-LaTeX-Code"
2651
2652 \end_inset
2653
2654 ).
2655 \begin_inset Foot
2656 status collapsed
2657
2658 \begin_layout Plain Layout
2659 An alternative approach is to use the 
2660 \family typewriter
2661 chapterbib
2662 \family default
2663  or 
2664 \family typewriter
2665 bibunits
2666 \family default
2667  package, respectively.
2668 \end_layout
2669
2670 \end_inset
2671
2672
2673 \end_layout
2674
2675 \begin_layout Standard
2676 First, go to 
2677 \family sans
2678 \bar under
2679 D
2680 \bar default
2681 ocument\SpecialChar \menuseparator
2682
2683 \bar under
2684 S
2685 \bar default
2686 ettings
2687 \family default
2688  and select the 
2689 \family sans
2690 Bibliography
2691 \family default
2692  pane (with the xforms frontend: the 
2693 \family sans
2694 Extras
2695 \family default
2696  tab).
2697  Check 
2698 \family sans
2699 Sectionated
2700 \begin_inset space ~
2701 \end_inset
2702
2703 bibliography
2704 \family default
2705 .
2706  In the document, you have to enclose the sections, which shall contain
2707  their own bibliography (including the BibTeX reference itself), between
2708  
2709 \family typewriter
2710
2711 \backslash
2712 begin{btUnit}
2713 \family default
2714  and 
2715 \family typewriter
2716
2717 \backslash
2718 end{btUnit}
2719 \family default
2720  (those commands have to be inserted as ERT).
2721  The bibliography will contain all references which have been cited in the
2722  current btUnit.
2723  N.
2724 \begin_inset space \thinspace{}
2725 \end_inset
2726
2727 B.: If you are using this approach, then 
2728 \emph on
2729 every
2730 \emph default
2731  citation reference has to be inside some btUnit.
2732  Also, the btUnits cannot be nested.
2733 \end_layout
2734
2735 \begin_layout Standard
2736
2737 \end_layout
2738
2739 \begin_layout Section
2740 Multipart Documents
2741 \end_layout
2742
2743 \begin_layout Subsection
2744 General Operation
2745 \end_layout
2746
2747 \begin_layout Standard
2748 When you are working on a large file with many sections, it is often convenient
2749  to break up the document into several files, or perhaps you have something
2750  where a table may change from time to time, but the preceding text does
2751  not.
2752  In these cases, you should seriously consider using multipart documents.
2753  For example, scientific papers often have five major sections: the introduction
2754 , observations, results, discussion, and conclusion.
2755  Each of these could be its own separate LyX file, with one 
2756 \begin_inset Quotes eld
2757 \end_inset
2758
2759 master
2760 \begin_inset Quotes erd
2761 \end_inset
2762
2763  file which contains the title, authors, abstract, references, etc., plus
2764  the five included files.
2765  It is important to note that each of these files is a full LyX file which
2766  can be formatted and printed on its own, as well as included in a master
2767  file.
2768  Each of these files must have the same document class, however--- don't
2769  attempt to mix book classes with article classes.
2770  You may also include LaTeX files; however, these files must not have their
2771  own preamble 
2772 \emph on
2773 (i.e.
2774
2775 \emph default
2776  everything up to and including the 
2777 \family typewriter
2778
2779 \backslash
2780 begin{document}
2781 \family default
2782  line as well as the 
2783 \family typewriter
2784
2785 \backslash
2786 end{document}
2787 \family default
2788  line must be deleted) or else errors will be generated when you try to
2789  make a DVI file.
2790 \end_layout
2791
2792 \begin_layout Standard
2793 LyX allows you to include files quite easily with 
2794 \family sans
2795 \bar under
2796 I
2797 \bar default
2798 nsert\SpecialChar \menuseparator
2799 ChiI
2800 \bar under
2801 d
2802 \bar default
2803
2804 \begin_inset space ~
2805 \end_inset
2806
2807 Document
2808 \family default
2809 .
2810  When you click on this selection a small box is inserted into the file
2811  at the current cursor location.
2812  Clicking on the box raises a dialog which allows you to select the file
2813  to be included, and the method of its inclusion.
2814  
2815 \end_layout
2816
2817 \begin_layout Standard
2818 The file selection box should by now be obvious.
2819  The three inclusion methods are 
2820 \begin_inset Quotes eld
2821 \end_inset
2822
2823 include
2824 \begin_inset Quotes erd
2825 \end_inset
2826
2827
2828 \begin_inset Quotes eld
2829 \end_inset
2830
2831 input
2832 \begin_inset Quotes erd
2833 \end_inset
2834
2835 , and 
2836 \begin_inset Quotes eld
2837 \end_inset
2838
2839 verbatim
2840 \begin_inset Quotes erd
2841 \end_inset
2842
2843 .
2844  The difference between 
2845 \begin_inset Quotes eld
2846 \end_inset
2847
2848 include
2849 \begin_inset Quotes erd
2850 \end_inset
2851
2852  and 
2853 \begin_inset Quotes eld
2854 \end_inset
2855
2856 input
2857 \begin_inset Quotes erd
2858 \end_inset
2859
2860  is really only meaningful to LaTeXperts, but the practical difference is
2861  that files which are 
2862 \begin_inset Quotes eld
2863 \end_inset
2864
2865 included
2866 \begin_inset Quotes erd
2867 \end_inset
2868
2869  are typeset beginning on a new page, while files which are 
2870 \begin_inset Quotes eld
2871 \end_inset
2872
2873 inputted
2874 \begin_inset Quotes erd
2875 \end_inset
2876
2877  are typeset starting on the current page.
2878  Perhaps the labeling in LyX will be changed someday to reflect this.
2879 \end_layout
2880
2881 \begin_layout Standard
2882 Generally, the master file is converted into a full LaTeX file before typesettin
2883 g, while the included files are converted to LaTeX files which do not have
2884  all the preamble information.
2885  Checking the 
2886 \family sans
2887 Don't
2888 \family default
2889
2890 \begin_inset space ~
2891 \end_inset
2892
2893
2894 \family sans
2895 typeset
2896 \family default
2897  button prevents this conversion.
2898 \end_layout
2899
2900 \begin_layout Standard
2901
2902 \begin_inset Quotes eld
2903 \end_inset
2904
2905 verbatim
2906 \begin_inset Quotes erd
2907 \end_inset
2908
2909  included file allows you to include a file typeset exactly as it appears
2910  in the file, i.e.
2911 \begin_inset space ~
2912 \end_inset
2913
2914 verbatim mode, with the characters set in a fixed-width typewriter font.
2915  Normally, spaces in this file are invisible, though two consecutive spaces
2916  are conserved, unlike LyX's normal treatment of spaces.
2917  However, setting the 
2918 \family sans
2919 \bar under
2920 M
2921 \bar default
2922 ark
2923 \begin_inset space ~
2924 \end_inset
2925
2926 spaces
2927 \begin_inset space ~
2928 \end_inset
2929
2930 in
2931 \begin_inset space ~
2932 \end_inset
2933
2934 output
2935 \family default
2936  checkbox typesets a mark to unambiguously define the presence of a space.
2937  
2938 \end_layout
2939
2940 \begin_layout Subsection
2941 Cross-References Between Files
2942 \end_layout
2943
2944 \begin_layout Standard
2945 It is possible to set up cross-references between the different files.
2946  First, open all the files in question: let's call them A and B in a two
2947  file example, where B is included in A.
2948  Let's say you insert a label in A, then want to reference it in B.
2949  Open the cross-reference dialog in whilst in document B, and you can select
2950  the 
2951 \begin_inset Quotes eld
2952 \end_inset
2953
2954 buffer
2955 \begin_inset Quotes erd
2956 \end_inset
2957
2958  to use.
2959 \end_layout
2960
2961 \begin_layout Section
2962 Fancy Headers and Footers
2963 \end_layout
2964
2965 \begin_layout Standard
2966 The default page layout is rather plain; for an article document class,
2967  all you get is a centered page number at the bottom of the page.
2968  This document is the book class, so it appears to be a bit fancier, but
2969  to really put on a show, you need to set the document page style to 
2970 \begin_inset Quotes eld
2971 \end_inset
2972
2973 fancy
2974 \begin_inset Quotes erd
2975 \end_inset
2976
2977 , as mentioned in the 
2978 \family sans
2979 User
2980 \begin_inset space ~
2981 \end_inset
2982
2983 Guide
2984 \family default
2985 .
2986  This section describes the LaTeX codes you need to insert in your LaTeX
2987  preamble or the text in order to get the desired effects.
2988 \end_layout
2989
2990 \begin_layout Standard
2991 The page header is divided into three fields, not surprisingly labeled 
2992 \begin_inset Quotes eld
2993 \end_inset
2994
2995 left
2996 \begin_inset Quotes erd
2997 \end_inset
2998
2999
3000 \begin_inset Quotes eld
3001 \end_inset
3002
3003 center
3004 \begin_inset Quotes erd
3005 \end_inset
3006
3007 , and 
3008 \begin_inset Quotes eld
3009 \end_inset
3010
3011 right
3012 \begin_inset Quotes erd
3013 \end_inset
3014
3015 .
3016  The footer is also divided into these three fields.
3017  The LaTeX commands to set these fields in the simplest manner are 
3018 \family typewriter
3019
3020 \backslash
3021 lhead
3022 \family default
3023
3024 \family typewriter
3025
3026 \backslash
3027 chead
3028 \family default
3029
3030 \family typewriter
3031
3032 \backslash
3033 rhead
3034 \family default
3035
3036 \family typewriter
3037
3038 \backslash
3039 lfoot
3040 \family default
3041 , etc.
3042  Suppose you wish to put your name in the upper left hand corner of each
3043  page.
3044  Simply insert the following command in the preamble: 
3045 \end_layout
3046
3047 \begin_layout Standard
3048
3049 \family typewriter
3050
3051 \backslash
3052 lhead{John Q.
3053  DocWriter}
3054 \end_layout
3055
3056 \begin_layout Standard
3057 You will now see your name in the upper left.
3058  If a field has a default entry that you would like to get rid of (often
3059  the page number appears in the central footer, simply include a command
3060  with a blank argument, e.
3061 \begin_inset space \thinspace{}
3062 \end_inset
3063
3064 g.
3065 \end_layout
3066
3067 \begin_layout Standard
3068
3069 \family typewriter
3070
3071 \backslash
3072 cfoot{}
3073 \end_layout
3074
3075 \begin_layout Standard
3076 Let's get really fancy: lets put the section number with the word 
3077 \begin_inset Quotes eld
3078 \end_inset
3079
3080 Section
3081 \begin_inset Quotes erd
3082 \end_inset
3083
3084  (e.
3085 \begin_inset space \thinspace{}
3086 \end_inset
3087
3088 g.
3089 \begin_inset space ~
3090 \end_inset
3091
3092 Section 3) in the upper left, the page number (e.
3093 \begin_inset space \thinspace{}
3094 \end_inset
3095
3096 g.
3097 \begin_inset space ~
3098 \end_inset
3099
3100 Page 4) in the upper right, your name in the lower left, and the date in
3101  the lower right.
3102  The following commands should now appear in the preamble:
3103 \end_layout
3104
3105 \begin_layout Standard
3106
3107 \family typewriter
3108
3109 \backslash
3110 lhead{Section 
3111 \backslash
3112 thesection}
3113 \end_layout
3114
3115 \begin_layout Standard
3116
3117 \family typewriter
3118
3119 \backslash
3120 chead{}
3121 \end_layout
3122
3123 \begin_layout Standard
3124
3125 \family typewriter
3126
3127 \backslash
3128 rhead{Page 
3129 \backslash
3130 thepage}
3131 \end_layout
3132
3133 \begin_layout Standard
3134
3135 \family typewriter
3136
3137 \backslash
3138 lfoot{John Q.
3139  DocWriter}
3140 \end_layout
3141
3142 \begin_layout Standard
3143
3144 \family typewriter
3145
3146 \backslash
3147 cfoot{}
3148 \end_layout
3149
3150 \begin_layout Standard
3151
3152 \family typewriter
3153
3154 \backslash
3155 rfoot{
3156 \backslash
3157 today}
3158 \end_layout
3159
3160 \begin_layout Standard
3161 The codes 
3162 \family typewriter
3163
3164 \backslash
3165 thesection
3166 \family default
3167  and 
3168 \family typewriter
3169
3170 \backslash
3171 thepage
3172 \family default
3173  access LaTeX's section and page counters, and so print out the current
3174  section and page numbers.
3175  
3176 \family typewriter
3177
3178 \backslash
3179 today
3180 \family default
3181  simply prints out today's date.
3182 \end_layout
3183
3184 \begin_layout Standard
3185 The thicknesses of the horizontal rules drawn beneath the header and above
3186  the footer can also be modified.
3187  If you don't want one of the headers, set its thickness to 0.
3188  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3189  Use the commands, e.
3190 \begin_inset space \thinspace{}
3191 \end_inset
3192
3193 g.
3194  
3195 \family typewriter
3196
3197 \backslash
3198 renewcommand{
3199 \backslash
3200 headrulewidth}{0.4pt}
3201 \family default
3202  and 
3203 \family typewriter
3204
3205 \backslash
3206 renewcommand{
3207 \backslash
3208 footrulewidth}{0.4pt}
3209 \family default
3210  to set the thicknesses.
3211 \end_layout
3212
3213 \begin_layout Standard
3214 You can switch the header/footer settings on and off for individual pages
3215  using commands like 
3216 \family typewriter
3217
3218 \backslash
3219 thispagestyle{empty}
3220 \family default
3221
3222 \family typewriter
3223
3224 \backslash
3225 thispagestyle{plain}
3226 \family default
3227 , and 
3228 \family typewriter
3229
3230 \backslash
3231 thispagestyle{fancy}
3232 \family default
3233 .
3234  Simply insert them in the text on the page you want changed and mark them
3235  as TeX code.
3236  In fact, title pages are marked as plain by default, while following pages
3237  are marked fancy when using the global fancy setting.
3238 \end_layout
3239
3240 \begin_layout Standard
3241 There are more complex commands which will let you insert things in the
3242  upper left on odd numbered pages, etc., but I will refer you to the 
3243 \family typewriter
3244 fancyhdr
3245 \family default
3246  package documentation for more descriptions.
3247  For example, if you have a teTeX installation, look for 
3248 \family typewriter
3249 /usr/share/texmf/doc/latex/fancyhdr/\SpecialChar \-
3250 fancyhdr.dvi
3251 \family default
3252 .
3253 \end_layout
3254
3255 \begin_layout Standard
3256 As a final example, it is possible to include an Encapsulated PostScript
3257  file in the header or footer.
3258  Suppose you want to put a company logo in the upper lefthand corner.
3259  You might try something like
3260 \end_layout
3261
3262 \begin_layout Standard
3263
3264 \family typewriter
3265
3266 \backslash
3267 lhead{
3268 \backslash
3269 resizebox{1in}{!}{
3270 \backslash
3271 includegraphics{logo.eps}}}
3272 \end_layout
3273
3274 \begin_layout Standard
3275 \noindent
3276 (you may need to preface this with 
3277 \family typewriter
3278
3279 \backslash
3280 usepackage{graphics}
3281 \family default
3282  if you don't include EPS files elsewhere in your document).
3283 \end_layout
3284
3285 \begin_layout Section
3286 Itemize Bullet Selection
3287 \begin_inset CommandInset label
3288 LatexCommand label
3289 name "sec:bullet"
3290
3291 \end_inset
3292
3293
3294 \end_layout
3295
3296 \begin_layout Standard
3297 by
3298 \noun on
3299  Allan Rae
3300 \end_layout
3301
3302 \begin_layout Subsection
3303 Introduction
3304 \end_layout
3305
3306 \begin_layout Standard
3307 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3308  Using this dialog you can easily specify what bullet shape to use at each
3309  level of an itemized list.
3310  These settings are document-wide so you won't be able to specify different
3311  sets of bullets for different paragraphs
3312 \begin_inset Foot
3313 status collapsed
3314
3315 \begin_layout Plain Layout
3316 Well, actually you can but you'll have to do it by hand.
3317 \end_layout
3318
3319 \end_inset
3320
3321 .
3322 \end_layout
3323
3324 \begin_layout Subsection
3325 How it looks
3326 \end_layout
3327
3328 \begin_layout Standard
3329 Open the dialog by selecting the 
3330 \family sans
3331 \bar under
3332 D
3333 \bar default
3334 ocument\SpecialChar \menuseparator
3335
3336 \bar under
3337 S
3338 \bar default
3339 ettings
3340 \family default
3341  menu item and then select the 
3342 \family sans
3343 \bar under
3344 B
3345 \bar default
3346 ullets
3347 \family default
3348  tab.
3349 \end_layout
3350
3351 \begin_layout Standard
3352 The dialog provides you with a table of bullet shapes.
3353  A column of buttons on the left of the table provides access to the six
3354  different panels of bullet shapes.
3355  The row of buttons across the top is used to select which bullet depth
3356  you are changing.
3357  A text entry under the table shows the currently selected bullet shape's
3358  LaTeX equivalent and this can be edited if desired.
3359  If you do modify the text you will also need to specify any needed packages
3360  in the LaTeX preamble.
3361 \end_layout
3362
3363 \begin_layout Standard
3364 The six panels are divided up by the packages they require.
3365  The following table shows the mappings from button name to LaTeX packages.
3366 \end_layout
3367
3368 \begin_layout Standard
3369 \align center
3370 \begin_inset Tabular
3371 <lyxtabular version="3" rows="7" columns="2">
3372 <features>
3373 <column alignment="center" valignment="top" width="0pt">
3374 <column alignment="center" valignment="top" width="0pt">
3375 <row>
3376 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3377 \begin_inset Text
3378
3379 \begin_layout Plain Layout
3380
3381 \family roman
3382 \series medium
3383 \shape up
3384 \size normal
3385 \emph off
3386 \bar no
3387 \noun off
3388 \color none
3389 Button
3390 \end_layout
3391
3392 \end_inset
3393 </cell>
3394 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3395 \begin_inset Text
3396
3397 \begin_layout Plain Layout
3398
3399 \family roman
3400 \series medium
3401 \shape up
3402 \size normal
3403 \emph off
3404 \bar no
3405 \noun off
3406 \color none
3407 Packages Required
3408 \end_layout
3409
3410 \end_inset
3411 </cell>
3412 </row>
3413 <row>
3414 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3415 \begin_inset Text
3416
3417 \begin_layout Plain Layout
3418
3419 \family sans
3420 \series medium
3421 \shape up
3422 \size normal
3423 \emph off
3424 \bar no
3425 \noun off
3426 \color none
3427 Standard
3428 \end_layout
3429
3430 \end_inset
3431 </cell>
3432 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3433 \begin_inset Text
3434
3435 \begin_layout Plain Layout
3436
3437 \series medium
3438 \shape up
3439 \size normal
3440 \emph off
3441 \bar no
3442 \noun off
3443 \color none
3444 base LaTeX
3445 \end_layout
3446
3447 \end_inset
3448 </cell>
3449 </row>
3450 <row>
3451 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3452 \begin_inset Text
3453
3454 \begin_layout Plain Layout
3455
3456 \family sans
3457 \series medium
3458 \shape up
3459 \size normal
3460 \emph off
3461 \bar no
3462 \noun off
3463 \color none
3464 Maths
3465 \end_layout
3466
3467 \end_inset
3468 </cell>
3469 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3470 \begin_inset Text
3471
3472 \begin_layout Plain Layout
3473
3474 \family typewriter
3475 \series medium
3476 \shape up
3477 \size normal
3478 \emph off
3479 \bar no
3480 \noun off
3481 \color none
3482 amssymb.sty
3483 \end_layout
3484
3485 \end_inset
3486 </cell>
3487 </row>
3488 <row>
3489 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3490 \begin_inset Text
3491
3492 \begin_layout Plain Layout
3493
3494 \family sans
3495 \series medium
3496 \shape up
3497 \size normal
3498 \emph off
3499 \bar no
3500 \noun off
3501 \color none
3502 Ding1
3503 \end_layout
3504
3505 \end_inset
3506 </cell>
3507 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3508 \begin_inset Text
3509
3510 \begin_layout Plain Layout
3511
3512 \family typewriter
3513 \series medium
3514 \shape up
3515 \size normal
3516 \emph off
3517 \bar no
3518 \noun off
3519 \color none
3520 pifont.sty
3521 \end_layout
3522
3523 \end_inset
3524 </cell>
3525 </row>
3526 <row>
3527 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3528 \begin_inset Text
3529
3530 \begin_layout Plain Layout
3531
3532 \family sans
3533 \series medium
3534 \shape up
3535 \size normal
3536 \emph off
3537 \bar no
3538 \noun off
3539 \color none
3540 Ding2
3541 \end_layout
3542
3543 \end_inset
3544 </cell>
3545 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3546 \begin_inset Text
3547
3548 \begin_layout Plain Layout
3549
3550 \family typewriter
3551 \series medium
3552 \shape up
3553 \size normal
3554 \emph off
3555 \bar no
3556 \noun off
3557 \color none
3558 pifont.sty
3559 \end_layout
3560
3561 \end_inset
3562 </cell>
3563 </row>
3564 <row>
3565 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3566 \begin_inset Text
3567
3568 \begin_layout Plain Layout
3569
3570 \family sans
3571 \series medium
3572 \shape up
3573 \size normal
3574 \emph off
3575 \bar no
3576 \noun off
3577 \color none
3578 Ding3
3579 \end_layout
3580
3581 \end_inset
3582 </cell>
3583 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3584 \begin_inset Text
3585
3586 \begin_layout Plain Layout
3587
3588 \family typewriter
3589 \series medium
3590 \shape up
3591 \size normal
3592 \emph off
3593 \bar no
3594 \noun off
3595 \color none
3596 pifont.sty
3597 \end_layout
3598
3599 \end_inset
3600 </cell>
3601 </row>
3602 <row>
3603 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3604 \begin_inset Text
3605
3606 \begin_layout Plain Layout
3607
3608 \family sans
3609 \series medium
3610 \shape up
3611 \size normal
3612 \emph off
3613 \bar no
3614 \noun off
3615 \color none
3616 Ding4
3617 \end_layout
3618
3619 \end_inset
3620 </cell>
3621 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3622 \begin_inset Text
3623
3624 \begin_layout Plain Layout
3625
3626 \family typewriter
3627 \series medium
3628 \shape up
3629 \size normal
3630 \emph off
3631 \bar no
3632 \noun off
3633 \color none
3634 pifont.sty
3635 \end_layout
3636
3637 \end_inset
3638 </cell>
3639 </row>
3640 </lyxtabular>
3641
3642 \end_inset
3643
3644
3645 \end_layout
3646
3647 \begin_layout Standard
3648 LyX doesn't stop you using bullets from packages you don't have.
3649  If you get errors from LaTeX when you try to view or print the file then
3650  its likely you are missing a package.
3651  LyX doesn't restrict your use since you may be editing locally and exporting
3652  elsewhere.
3653 \end_layout
3654
3655 \begin_layout Subsection
3656 How to use it
3657 \end_layout
3658
3659 \begin_layout Standard
3660 Select which bullet depth you want to change then select the bullet shape
3661  and size.
3662  Any changes will not be visible in LyX, but are visible when viewing the
3663  document using xdvi or ghostview.
3664 \end_layout
3665
3666 \begin_layout Standard
3667 You can reset a bullet shape to the default simply by clicking your right
3668  mouse button on the appropriate bullet depth button.
3669 \end_layout
3670
3671 \begin_layout Standard
3672 If you 
3673 \emph on
3674 really
3675 \emph default
3676  want to have multiple sets of paragraphs with different sets of bullets
3677  in each then you're going to have to get your hands dirty.
3678  The itemize bullet selection dialog can help though because it provides
3679  you with the LaTeX code for a wide range of bullet shapes.
3680  To make your own custom paragraphs you have the following options:
3681 \end_layout
3682
3683 \begin_layout Standard
3684 \begin_inset ERT
3685 status open
3686
3687 \begin_layout Plain Layout
3688
3689
3690 \backslash
3691 let
3692 \backslash
3693 savelabelitemi=
3694 \backslash
3695 labelitemi
3696 \end_layout
3697
3698 \end_inset
3699
3700
3701 \end_layout
3702
3703 \begin_layout Standard
3704 \begin_inset ERT
3705 status open
3706
3707 \begin_layout Plain Layout
3708
3709
3710 \backslash
3711 renewcommand
3712 \backslash
3713 labelitemi[0]{
3714 \backslash
3715 small
3716 \backslash
3717 (
3718 \backslash
3719 sharp
3720 \backslash
3721 )}
3722 \end_layout
3723
3724 \end_inset
3725
3726
3727 \end_layout
3728
3729 \begin_layout Itemize
3730 Use the LaTeX command 
3731 \family typewriter
3732
3733 \backslash
3734 renewcommand{}{}
3735 \family default
3736  to specify a new bullet shape for a given depth.
3737  You'll also need to save the current bullet shape so you can restore it
3738  again afterwards.
3739  In this itemized list the following LaTeX code was used to change the bullet
3740  used for the first depth.
3741 \begin_inset Newline newline
3742 \end_inset
3743
3744
3745 \family typewriter
3746
3747 \backslash
3748 let
3749 \backslash
3750 savelabelitemi=
3751 \backslash
3752 labelitemi
3753 \family default
3754  
3755 \family typewriter
3756
3757 \begin_inset Newline newline
3758 \end_inset
3759
3760
3761 \backslash
3762 renewcommand
3763 \backslash
3764 labelitemi[0]{
3765 \backslash
3766 small
3767 \backslash
3768 (
3769 \backslash
3770 sharp
3771 \backslash
3772 )}
3773 \begin_inset Newline newline
3774 \end_inset
3775
3776
3777 \family default
3778 Note that the itemize depth is specified in Roman numerals as part of the
3779  
3780 \family typewriter
3781
3782 \backslash
3783 labelitem
3784 \family default
3785  command.
3786 \end_layout
3787
3788 \begin_layout Itemize
3789 \begin_inset ERT
3790 status open
3791
3792 \begin_layout Plain Layout
3793
3794 [
3795 \backslash
3796 (
3797 \backslash
3798 star
3799 \backslash
3800 )]
3801 \end_layout
3802
3803 \end_inset
3804
3805  Specify each individual entry by starting each item with the bullet shape
3806  enclosed in square brackets and set as TeX.
3807  For example, this item was started with 
3808 \family typewriter
3809 [
3810 \backslash
3811 (
3812 \backslash
3813 star
3814 \backslash
3815 )]
3816 \family default
3817 .
3818 \end_layout
3819
3820 \begin_layout Standard
3821 \begin_inset ERT
3822 status open
3823
3824 \begin_layout Plain Layout
3825
3826
3827 \backslash
3828 renewcommand
3829 \backslash
3830 labelitemi[0]{
3831 \backslash
3832 savelabelitemi}
3833 \end_layout
3834
3835 \end_inset
3836
3837
3838 \end_layout
3839
3840 \begin_layout Standard
3841 You'll also need to revert the labelitem back to its previous setting for
3842  the global bullet shape settings to remain in effect.
3843  The way used here was:
3844 \begin_inset Newline newline
3845 \end_inset
3846
3847
3848 \family typewriter
3849
3850 \backslash
3851 renewcommand
3852 \backslash
3853 labelitemi[0]{
3854 \backslash
3855 savelabelitemi}
3856 \end_layout
3857
3858 \begin_layout Chapter
3859 Special Document Classes
3860 \end_layout
3861
3862 \begin_layout Section
3863 \begin_inset CommandInset label
3864 LatexCommand label
3865 name "sec:AMS-LaTeX"
3866
3867 \end_inset
3868
3869 AMS LaTeX
3870 \end_layout
3871
3872 \begin_layout Standard
3873 by 
3874 \noun on
3875 David Johnson; updated by Richard Heck
3876 \end_layout
3877
3878 \begin_layout Standard
3879 \begin_inset VSpace bigskip
3880 \end_inset
3881
3882
3883 \end_layout
3884
3885 \begin_layout Standard
3886 \noindent
3887 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
3888  papers to be submitted to American Mathematical Society publications.
3889  The layouts are not tailored to a specific journal, but easily can be.
3890  You should refer to the AMS documentation for specific instructions for
3891  each journal (usually it will entail only changing a single line in the
3892  TeX output).
3893  That documentation is available on the Web at 
3894 \begin_inset Flex URL
3895 status open
3896
3897 \begin_layout Plain Layout
3898
3899 http://www.ams.org
3900 \end_layout
3901
3902 \end_inset
3903
3904  or by ftp at 
3905 \begin_inset Flex URL
3906 status open
3907
3908 \begin_layout Plain Layout
3909
3910 ftp://ftp.ams.org/pub/tex/amslatex/
3911 \end_layout
3912
3913 \end_inset
3914
3915 .
3916  These layouts are appropriate, and useful, for any mathematical writing.
3917  
3918 \end_layout
3919
3920 \begin_layout Standard
3921 There are two basic AMS LaTeX layouts: 
3922 \end_layout
3923
3924 \begin_layout Enumerate
3925 amsart: The standard AMS article format.
3926 \end_layout
3927
3928 \begin_layout Enumerate
3929 amsbook: the standard AMS book (really, monograph) format.
3930  
3931 \end_layout
3932
3933 \begin_layout Standard
3934 These layouts themselves contain only the minimum necessary to use the AMS
3935  classes.
3936  They do not, in particular, contain any of the `theorem' environments used
3937  for setting theorems, lemmas, and the like.
3938  These are contained, instead, in the 
3939 \begin_inset Flex CharStyle:Code
3940 status collapsed
3941
3942 \begin_layout Plain Layout
3943 Theorems (AMS)
3944 \end_layout
3945
3946 \end_inset
3947
3948  module, which you will need to load separately when you selected one of
3949  the AMS classes.
3950  Less commonly used environments are in the 
3951 \begin_inset Flex CharStyle:Code
3952 status collapsed
3953
3954 \begin_layout Plain Layout
3955 Theorems (AMS-Extended)
3956 \end_layout
3957
3958 \end_inset
3959
3960  module.
3961  
3962 \end_layout
3963
3964 \begin_layout Standard
3965 By default, theorems and the like are numbered consecutively throughout
3966  the document, but this may be modified by loading the module 
3967 \begin_inset Flex CharStyle:Code
3968 status collapsed
3969
3970 \begin_layout Plain Layout
3971 Theorems (Order by Section)
3972 \end_layout
3973
3974 \end_inset
3975
3976  or, if you are using 
3977 \begin_inset Flex CharStyle:Code
3978 status collapsed
3979
3980 \begin_layout Plain Layout
3981 book (AMS)
3982 \end_layout
3983
3984 \end_inset
3985
3986 , the module 
3987 \begin_inset Flex CharStyle:Code
3988 status collapsed
3989
3990 \begin_layout Plain Layout
3991 Theorems (Order by Chapter)
3992 \end_layout
3993
3994 \end_inset
3995
3996 .
3997  These will number the results as 
3998 \begin_inset Formula $n.m$
3999 \end_inset
4000
4001 , where the first number refers to the section (or chapter) and the second
4002  refers to the total number of results so far in that section (or chapter).
4003  Many environments are also available unnumbered.
4004  These are indicated by an asterisk at the end.
4005  If you happen to want 
4006 \emph on
4007 only
4008 \emph default
4009  unnumbered results, the the module 
4010 \begin_inset Flex CharStyle:Code
4011 status collapsed
4012
4013 \begin_layout Plain Layout
4014 Theorems (Starred)
4015 \end_layout
4016
4017 \end_inset
4018
4019  provides that option.
4020 \end_layout
4021
4022 \begin_layout Standard
4023 Note that these modules do not 
4024 \emph on
4025 have
4026 \emph default
4027  to be used with the AMS classes.
4028  It is perfectly possible to use the 
4029 \begin_inset Flex CharStyle:Code
4030 status collapsed
4031
4032 \begin_layout Plain Layout
4033 Theorems (AMS)
4034 \end_layout
4035
4036 \end_inset
4037
4038  module, and the others mentioned, with other classes, such as 
4039 \begin_inset Flex CharStyle:Code
4040 status collapsed
4041
4042 \begin_layout Plain Layout
4043 article
4044 \end_layout
4045
4046 \end_inset
4047
4048
4049 \begin_inset Flex CharStyle:Code
4050 status collapsed
4051
4052 \begin_layout Plain Layout
4053 report
4054 \end_layout
4055
4056 \end_inset
4057
4058
4059 \begin_inset Flex CharStyle:Code
4060 status collapsed
4061
4062 \begin_layout Plain Layout
4063 book (KOMA-script)
4064 \end_layout
4065
4066 \end_inset
4067
4068 , and so forth.
4069 \end_layout
4070
4071 \begin_layout Subsection
4072 What these layouts provide
4073 \end_layout
4074
4075 \begin_layout Standard
4076 There is a long list of included environments provided by these layouts.
4077  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
4078  variety of `theorem' environments.
4079  However, the AMS recommends the environments that are available in LyX.
4080  
4081 \end_layout
4082
4083 \begin_layout Standard
4084 The following environments---as well as the standard environments, such
4085  as 
4086 \begin_inset Flex CharStyle:Noun
4087 status collapsed
4088
4089 \begin_layout Plain Layout
4090 section
4091 \end_layout
4092
4093 \end_inset
4094
4095
4096 \begin_inset Flex CharStyle:Noun
4097 status collapsed
4098
4099 \begin_layout Plain Layout
4100 bibliography
4101 \end_layout
4102
4103 \end_inset
4104
4105
4106 \begin_inset Flex CharStyle:Noun
4107 status collapsed
4108
4109 \begin_layout Plain Layout
4110 title
4111 \end_layout
4112
4113 \end_inset
4114
4115
4116 \begin_inset Flex CharStyle:Noun
4117 status collapsed
4118
4119 \begin_layout Plain Layout
4120 author
4121 \end_layout
4122
4123 \end_inset
4124
4125 , and 
4126 \begin_inset Flex CharStyle:Noun
4127 status collapsed
4128
4129 \begin_layout Plain Layout
4130 date
4131 \end_layout
4132
4133 \end_inset
4134
4135 ---are provided by 
4136 \begin_inset Flex CharStyle:Code
4137 status collapsed
4138
4139 \begin_layout Plain Layout
4140 article (AMS)
4141 \end_layout
4142
4143 \end_inset
4144
4145  and 
4146 \begin_inset Flex CharStyle:Code
4147 status collapsed
4148
4149 \begin_layout Plain Layout
4150 book (AMS)
4151 \end_layout
4152
4153 \end_inset
4154
4155 :
4156 \end_layout
4157
4158 \begin_layout Description
4159 Address This should be the author's permanent address.
4160 \end_layout
4161
4162 \begin_layout Description
4163 Current
4164 \begin_inset space ~
4165 \end_inset
4166
4167 Address This should be the author's temporary address at the time of submission,
4168  if different from the Address.
4169 \end_layout
4170
4171 \begin_layout Description
4172 Email Author's e-mail address
4173 \end_layout
4174
4175 \begin_layout Description
4176 URL Author's Web address, if desired.
4177 \end_layout
4178
4179 \begin_layout Description
4180 Keywords Key words or phrases used to identify specific topics discussed
4181  in the paper.
4182 \end_layout
4183
4184 \begin_layout Description
4185 Subjectclass These refer to the AMS Subject Classifications, published and
4186  described in 
4187 \emph on
4188 Mathematical Reviews
4189 \emph default
4190 .
4191  These are also available online at the AMS cites listed above.
4192 \end_layout
4193
4194 \begin_layout Description
4195 Thanks
4196 \end_layout
4197
4198 \begin_layout Description
4199 Dedicatory
4200 \end_layout
4201
4202 \begin_layout Description
4203 Translator
4204 \end_layout
4205
4206 \begin_layout Standard
4207 The following environments are provided by both the 
4208 \begin_inset Flex CharStyle:Code
4209 status collapsed
4210
4211 \begin_layout Plain Layout
4212 Theorems
4213 \end_layout
4214
4215 \end_inset
4216
4217  and 
4218 \begin_inset Flex CharStyle:Code
4219 status collapsed
4220
4221 \begin_layout Plain Layout
4222 Theorems (AMS)
4223 \end_layout
4224
4225 \end_inset
4226
4227  modules, in the latter case in both starred (unnumbered) and unstarred
4228  (numbered) versions.
4229  These same environments are provided only in the starred versions by the
4230  
4231 \begin_inset Flex CharStyle:Code
4232 status collapsed
4233
4234 \begin_layout Plain Layout
4235 Theorems (Starred)
4236 \end_layout
4237
4238 \end_inset
4239
4240  module:
4241 \end_layout
4242
4243 \begin_layout Theorem
4244 This is typically used for the statements of major results.
4245  
4246 \end_layout
4247
4248 \begin_layout Corollary*
4249 This is used for statements which follow fairly directly from previous statement
4250 s.
4251  Again, these can be major results.
4252  
4253 \end_layout
4254
4255 \begin_layout Lemma
4256 These are smaller results needed to prove other statements.
4257 \end_layout
4258
4259 \begin_layout Proposition
4260 These are less major results which (hopefully) add to the general theory
4261  being discussed.
4262 \end_layout
4263
4264 \begin_layout Conjecture
4265 These are statements provided without justification, which the author does
4266  not know how to prove, but which seem to be true (to the author, at least).
4267 \end_layout
4268
4269 \begin_layout Definition*
4270 Guess what this is for.
4271  The font is different for this environment than for the previous ones.
4272  
4273 \end_layout
4274
4275 \begin_layout Example*
4276 Used for examples illustrating proven results.
4277 \end_layout
4278
4279 \begin_layout Problem
4280 It's not really known what this is for.
4281  You should figure it out.
4282 \end_layout
4283
4284 \begin_layout Exercise*
4285 Write a description for this one.
4286 \end_layout
4287
4288 \begin_layout Remark
4289 This environment is also a type of theorem, usually a lesser sort of observation.
4290 \end_layout
4291
4292 \begin_layout Claim*
4293 Often used in the course of giving a proof of a larger result.
4294 \end_layout
4295
4296 \begin_layout Case
4297 Generally, these are used to break up long arguments, using specific instances
4298  of some condition.
4299  
4300 \end_layout
4301
4302 \begin_layout Case
4303 The numbering scheme for cases is on its own, not together with other numbered
4304  statements.
4305  
4306 \end_layout
4307
4308 \begin_layout Proof
4309 At the end of this environment , a QED symbol (usually a square, but it
4310  can vary with different styles) is placed.
4311  If you want to have other environments within this one---for example, Case
4312  environments---and have the QED symbol appear only after them, then the
4313  other environments need to be nested within the proof environment.
4314  See section 
4315 \begin_inset CommandInset ref
4316 LatexCommand ref
4317 reference "sec:Nesting"
4318
4319 \end_inset
4320
4321  of the 
4322 \emph on
4323 User's Guide
4324 \emph default
4325  for information on nesting.
4326 \end_layout
4327
4328 \begin_layout Standard
4329 And these are provided by 
4330 \begin_inset Flex CharStyle:Code
4331 status collapsed
4332
4333 \begin_layout Plain Layout
4334 Theorems (AMS-Extended)
4335 \end_layout
4336
4337 \end_inset
4338
4339 :
4340 \end_layout
4341
4342 \begin_layout Criterion*
4343 A required condition.
4344 \end_layout
4345
4346 \begin_layout Algorithm*
4347 A general procedure to be used.
4348 \end_layout
4349
4350 \begin_layout Axiom*
4351 This is a property or statement taken as true within the system being discussed.
4352 \end_layout
4353
4354 \begin_layout Condition*
4355 Sometimes used to state a condition assumed within the present context of
4356  discussion.
4357 \end_layout
4358
4359 \begin_layout Note*
4360 Similar to a Remark.
4361 \end_layout
4362
4363 \begin_layout Notation*
4364 Used for the explanation of, yes, notation.
4365 \end_layout
4366
4367 \begin_layout Summary
4368 Do we really need to tell you? 
4369 \end_layout
4370
4371 \begin_layout Acknowledgement*
4372 Acknowledgement.
4373 \end_layout
4374
4375 \begin_layout Conclusion*
4376 Sometimes used at the end of a long train of argument.
4377 \end_layout
4378
4379 \begin_layout Fact
4380 Used in a way similar to Proposition, though perhaps lower on the scale.
4381 \end_layout
4382
4383 \begin_layout Standard
4384 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
4385  fonts packages.
4386  They need to be available on your system in order to use these environments.
4387 \end_layout
4388
4389 \begin_layout Section
4390 Dinbrief
4391 \end_layout
4392
4393 \begin_layout Standard
4394 The document class 
4395 \family sans
4396 dinbrief
4397 \family default
4398  can be used to type letters according to German conventions.
4399  A template file is included in 
4400 \family typewriter
4401 .../lyx/share/templates
4402 \family default
4403  for you to use as a starting point.
4404 \end_layout
4405
4406 \begin_layout Section
4407 Paper
4408 \end_layout
4409
4410 \begin_layout Standard
4411 The document class 
4412 \family sans
4413 paper
4414 \family default
4415  provides an alternative to the standard 
4416 \family sans
4417 article
4418 \family default
4419  class.
4420  It provides similar functionality, but you might prefer this layout with
4421  sans serif sections, headings, and more.
4422 \end_layout
4423
4424 \begin_layout Section
4425 A&A Paper
4426 \end_layout
4427
4428 \begin_layout Standard
4429 by 
4430 \noun on
4431 Peter Sütterlin
4432 \end_layout
4433
4434 \begin_layout Subsection
4435 Introduction
4436 \end_layout
4437
4438 \begin_layout Standard
4439 This section describes how LyX can be used to write articles for submission
4440  to the scientific journal 
4441 \emph on
4442 Astronomy and Astrophysics
4443 \emph default
4444  (www.edpsciences.fr/aa/ 
4445 \begin_inset Flex URL
4446 status collapsed
4447
4448 \begin_layout Plain Layout
4449
4450 http://www.edpsciences.fr/aa/
4451 \end_layout
4452
4453 \end_inset
4454
4455 ) using Version 5.01 of the document class 
4456 \family typewriter
4457 aa.cls
4458 \family default
4459 .
4460  This package can be downloaded from the ftp site
4461 \end_layout
4462
4463 \begin_layout Standard
4464 \begin_inset VSpace medskip
4465 \end_inset
4466
4467
4468 \end_layout
4469
4470 \begin_layout Standard
4471 \align center
4472 \begin_inset Flex URL
4473 status collapsed
4474
4475 \begin_layout Plain Layout
4476
4477 ftp://ftp.edpsciences.org/pub/aa/readme.html
4478 \end_layout
4479
4480 \end_inset
4481
4482
4483 \end_layout
4484
4485 \begin_layout Standard
4486 \begin_inset VSpace medskip
4487 \end_inset
4488
4489
4490 \end_layout
4491
4492 \begin_layout Standard
4493 A manual comes together with that package, and this text is not meant to
4494  replace the original manual but merely a short guide how to realize the
4495  correct form of your paper.
4496  
4497 \end_layout
4498
4499 \begin_layout Standard
4500 Please note that the publisher of the journal was changed from Springer
4501  to EDP Sciences starting January 1, 2001.
4502  That change implicated also some slight changes of the style files, namely
4503  the removal of the thesaurus command.
4504  The LyX class aa supports the newest version of these style files, V 5.01.
4505  If you have an older version installed, please upgrade.
4506  For compatibility, the old (version 4) layout has been kept as 
4507 \family sans
4508 article (A&A V4)
4509 \family default
4510 .
4511  Please refer to the comments in 
4512 \family typewriter
4513 LyXDir/layouts/aapaper.layout
4514 \family default
4515 .
4516 \end_layout
4517
4518 \begin_layout Subsection
4519 Getting started
4520 \end_layout
4521
4522 \begin_layout Standard
4523 It is recommended you start from the example template distributed with LyX.
4524  If you are not using a template, note the following settings:
4525 \end_layout
4526
4527 \begin_layout Itemize
4528 Select 
4529 \family sans
4530 article (A&A)
4531 \family default
4532  in the 
4533 \family sans
4534 \bar under
4535 D
4536 \bar default
4537 ocument\SpecialChar \menuseparator
4538
4539 \bar under
4540 S
4541 \bar default
4542 ettings
4543 \family default
4544  dialog (OK, that one was obvious).
4545 \end_layout
4546
4547 \begin_layout Itemize
4548 Don't change the option 
4549 \family sans
4550 Page
4551 \begin_inset space ~
4552 \end_inset
4553
4554 style
4555 \family default
4556 : Leave it set to 
4557 \family sans
4558 default
4559 \family default
4560 .
4561  The whole layout is done by the macros, you shouldn't change anything.
4562 \end_layout
4563
4564 \begin_layout Subsection
4565 The header block
4566 \end_layout
4567
4568 \begin_layout Standard
4569 First thing to enter is the header information.
4570  It consists of seven entries, of which some are optional.
4571  They are
4572 \end_layout
4573
4574 \begin_layout Itemize
4575
4576 \family sans
4577 Title
4578 \family default
4579 : [required] 
4580 \end_layout
4581
4582 \begin_layout Itemize
4583
4584 \family sans
4585 Subtitle
4586 \family default
4587 : [optional] 
4588 \end_layout
4589
4590 \begin_layout Itemize
4591
4592 \family sans
4593 Author
4594 \family default
4595 : [required]
4596 \end_layout
4597
4598 \begin_layout Itemize
4599
4600 \family sans
4601 Address
4602 \family default
4603 : [required]
4604 \end_layout
4605
4606 \begin_layout Itemize
4607
4608 \family sans
4609 Offprints
4610 \family default
4611 : [optional] if more than one author: whom to contact for offprint requests.
4612 \end_layout
4613
4614 \begin_layout Itemize
4615
4616 \family sans
4617 Mail
4618 \family default
4619 : [optional] mail address for contacts.
4620 \end_layout
4621
4622 \begin_layout Itemize
4623
4624 \family sans
4625 Date
4626 \family default
4627 : [required].
4628  Suggested format is 
4629 \family typewriter
4630 Received: <date>; Accepted <date> 
4631 \end_layout
4632
4633 \begin_layout Standard
4634 There is no need to issue the 
4635 \family typewriter
4636
4637 \backslash
4638 maketitle
4639 \family default
4640  command, this is done automatically by LyX when the header is finished.
4641  Although the order of the single header entries doesn't matter it is advised
4642  to keep the above sequence, just to get the best optics and meets the layout
4643  of the real document.
4644 \end_layout
4645
4646 \begin_layout Standard
4647 If you want to place footnotes in the header block, e.
4648 \begin_inset space \thinspace{}
4649 \end_inset
4650
4651 g.
4652 \begin_inset space ~
4653 \end_inset
4654
4655 to state your present address, just use the standard footnote via 
4656 \family sans
4657 \bar under
4658 I
4659 \bar default
4660 nsert\SpecialChar \menuseparator
4661
4662 \bar under
4663 F
4664 \bar default
4665 ootnote.
4666
4667 \family default
4668  LyX will automagically use the term 
4669 \family typewriter
4670
4671 \backslash
4672 thanks{}
4673 \family default
4674  in that case.
4675 \end_layout
4676
4677 \begin_layout Standard
4678 In addition to these topics, the macros use three additional LaTeX commands
4679  that have no counterpart in LyX:
4680 \end_layout
4681
4682 \begin_layout Itemize
4683
4684 \family typewriter
4685
4686 \backslash
4687 and
4688 \family default
4689  to separate different names for more than one author and institute, respectivel
4690 y.
4691 \end_layout
4692
4693 \begin_layout Itemize
4694
4695 \family typewriter
4696
4697 \backslash
4698 inst{<nr>}
4699 \family default
4700 to mark corresponding author/institute pairs.
4701  The institutes are numbered sequentially as they appear in the 
4702 \family sans
4703 Address
4704 \family default
4705  field, so you have to put a marker to each author.
4706 \end_layout
4707
4708 \begin_layout Itemize
4709
4710 \family typewriter
4711
4712 \backslash
4713 email{address}
4714 \family default
4715  to supply an email address for fast contact.
4716 \end_layout
4717
4718 \begin_layout Standard
4719 In all cases, the appropriate command has to be entered in LyX and marked
4720  as LaTeX code.
4721  See the examples.
4722  
4723 \end_layout
4724
4725 \begin_layout Subsection
4726 The abstract
4727 \end_layout
4728
4729 \begin_layout Standard
4730 The abstract should immediately follow the header block.
4731  With version 5 the abstract environment was changed to a command, and there
4732  is now a resctriction to only one paragraph.
4733  In addition, it should contain an entry with the keywords.
4734  This is not yet implemented for LyX, therefore you have to enter the LaTeX
4735  command 
4736 \family typewriter
4737
4738 \backslash
4739 keywords{}
4740 \family default
4741  by hand and mark it as LaTeX code.
4742  Refer to the example paper.
4743 \end_layout
4744
4745 \begin_layout Subsection
4746 Supported environments
4747 \end_layout
4748
4749 \begin_layout Standard
4750 The A&A paper layout supports the following environments for structuring
4751  your text:
4752 \end_layout
4753
4754 \begin_layout Itemize
4755
4756 \family sans
4757 Standard
4758 \end_layout
4759
4760 \begin_layout Itemize
4761
4762 \family sans
4763 Section
4764 \end_layout
4765
4766 \begin_layout Itemize
4767
4768 \family sans
4769 Subsection
4770 \end_layout
4771
4772 \begin_layout Itemize
4773
4774 \family sans
4775 Subsubsection
4776 \end_layout
4777
4778 \begin_layout Itemize
4779
4780 \family sans
4781 Itemize
4782 \end_layout
4783
4784 \begin_layout Itemize
4785
4786 \family sans
4787 Enumerate
4788 \end_layout
4789
4790 \begin_layout Itemize
4791
4792 \family sans
4793 Description
4794 \end_layout
4795
4796 \begin_layout Itemize
4797
4798 \family sans
4799 Caption
4800 \end_layout
4801
4802 \begin_layout Itemize
4803
4804 \family sans
4805 Abstract
4806 \end_layout
4807
4808 \begin_layout Itemize
4809
4810 \family sans
4811 Acknowledgment
4812 \end_layout
4813
4814 \begin_layout Itemize
4815
4816 \family sans
4817 Bibliography
4818 \end_layout
4819
4820 \begin_layout Itemize
4821
4822 \family sans
4823 LaTeX
4824 \end_layout
4825
4826 \begin_layout Subsection
4827 Commands not supported by LyX
4828 \end_layout
4829
4830 \begin_layout Standard
4831 Some commands are not yet supported by the 
4832 \family sans
4833 paper (A&A)
4834 \family default
4835  layout for LyX.
4836  Some have already been mentioned.
4837  For the sake of completeness, they are listed all together here:
4838 \end_layout
4839
4840 \begin_layout Itemize
4841
4842 \family typewriter
4843
4844 \backslash
4845 and
4846 \end_layout
4847
4848 \begin_layout Itemize
4849
4850 \family typewriter
4851
4852 \backslash
4853 email
4854 \end_layout
4855
4856 \begin_layout Itemize
4857
4858 \family typewriter
4859
4860 \backslash
4861 appendix
4862 \end_layout
4863
4864 \begin_layout Itemize
4865
4866 \family typewriter
4867
4868 \backslash
4869 authorrunning
4870 \end_layout
4871
4872 \begin_layout Itemize
4873
4874 \family typewriter
4875
4876 \backslash
4877 inst{}
4878 \end_layout
4879
4880 \begin_layout Itemize
4881
4882 \family typewriter
4883
4884 \backslash
4885 keywords{}
4886 \end_layout
4887
4888 \begin_layout Itemize
4889
4890 \family typewriter
4891
4892 \backslash
4893 object{}
4894 \end_layout
4895
4896 \begin_layout Itemize
4897
4898 \family typewriter
4899
4900 \backslash
4901 titlerunning{}
4902 \end_layout
4903
4904 \begin_layout Standard
4905 If you want to use any of these commands, you have to enter them yourself.
4906  
4907 \series bold
4908 Do not forget to mark them as LaTeX code!
4909 \end_layout
4910
4911 \begin_layout Subsection
4912 Figure and Table Floats
4913 \end_layout
4914
4915 \begin_layout Standard
4916 LyX provides support for the necessary float environments 
4917 \family sans
4918 figure, figure*, table
4919 \family default
4920  and 
4921 \family sans
4922 table*
4923 \family default
4924 , therefore we won't tell much about it here.
4925  Refer to the 
4926 \emph on
4927 User's
4928 \begin_inset space ~
4929 \end_inset
4930
4931 Guide
4932 \emph default
4933 .
4934  Just remember that tables should be left-aligned.
4935  For that, select the table and change the alignment in 
4936 \family sans
4937 \bar under
4938 E
4939 \bar default
4940 dit\SpecialChar \menuseparator
4941
4942 \bar under
4943 P
4944 \bar default
4945 aragraph
4946 \begin_inset space ~
4947 \end_inset
4948
4949 Settings.
4950 \end_layout
4951
4952 \begin_layout Standard
4953 There is only one special thing: the figures with caption besides the figure.
4954  To create such a figure, you have to do the following:
4955 \end_layout
4956
4957 \begin_layout Enumerate
4958 Create a wide figure float: 
4959 \family sans
4960 \bar under
4961 I
4962 \bar default
4963 nsert\SpecialChar \menuseparator
4964 Flo
4965 \bar under
4966 a
4967 \bar default
4968 t\SpecialChar \menuseparator
4969 Figure
4970 \family default
4971 , then right click in the figure and select 
4972 \family sans
4973 \bar under
4974 S
4975 \bar default
4976 pan
4977 \begin_inset space ~
4978 \end_inset
4979
4980 columns
4981 \family default
4982 .
4983 \end_layout
4984
4985 \begin_layout Enumerate
4986 Enter your caption text.
4987 \end_layout
4988
4989 \begin_layout Enumerate
4990 Press 
4991 \family sans
4992 Return
4993 \family default
4994  to move the cursor above the caption.
4995 \end_layout
4996
4997 \begin_layout Enumerate
4998 Insert your figure
4999 \end_layout
5000
5001 \begin_layout Enumerate
5002 Position the cursor behind the figure and insert a horizontal fill: 
5003 \family sans
5004 \bar under
5005 I
5006 \bar default
5007 nsert\SpecialChar \menuseparator
5008
5009 \bar under
5010 S
5011 \bar default
5012 pecial
5013 \begin_inset space ~
5014 \end_inset
5015
5016 Character
5017 \bar under
5018 \SpecialChar \menuseparator
5019 H
5020 \bar default
5021 orizontal
5022 \begin_inset space ~
5023 \end_inset
5024
5025 Fill
5026 \family default
5027 .
5028 \end_layout
5029
5030 \begin_layout Enumerate
5031 Switch to LaTeX mode: 
5032 \family sans
5033 M-c
5034 \begin_inset space ~
5035 \end_inset
5036
5037 t
5038 \family default
5039 .
5040 \end_layout
5041
5042 \begin_layout Enumerate
5043 Enter 
5044 \family typewriter
5045
5046 \backslash
5047 parbox[b]{55mm}{
5048 \family default
5049 .
5050  
5051 \series bold
5052 Do not close the brace!
5053 \end_layout
5054
5055 \begin_layout Enumerate
5056 Position the cursor behind the caption text, switch to LaTeX mode and insert
5057  the closing brace: 
5058 \family sans
5059 M-c
5060 \begin_inset space ~
5061 \end_inset
5062
5063 t
5064 \family default
5065  
5066 \family typewriter
5067 }
5068 \family default
5069 .
5070 \end_layout
5071
5072 \begin_layout Standard
5073 Also, refer to the figures in the example paper.
5074 \end_layout
5075
5076 \begin_layout Subsection
5077 Referee layout
5078 \end_layout
5079
5080 \begin_layout Standard
5081 For submission, the paper has to be formated in a special double-spacing
5082  layout.
5083  For this purpose, you have to give the option 
5084 \family typewriter
5085 referee
5086 \family default
5087  to the documentclass.
5088  This must be done using the extra class options field in the 
5089 \family sans
5090 \bar under
5091 D
5092 \bar default
5093 ocument\SpecialChar \menuseparator
5094
5095 \bar under
5096 S
5097 \bar default
5098 ettings
5099 \family default
5100  dialog.
5101  Just enter the string 
5102 \family typewriter
5103 referee
5104 \family default
5105  there.
5106 \end_layout
5107
5108 \begin_layout Subsection
5109 The example paper
5110 \end_layout
5111
5112 \begin_layout Standard
5113 The 
5114 \family sans
5115 Examples
5116 \family default
5117  directory contains an example paper written with LyX.
5118  It is the example paper from the original macro package, translated to
5119  LyX.
5120  Use it for inspiration, and compare the original LaTeX code with LyX way
5121  of writing.
5122 \end_layout
5123
5124 \begin_layout Section
5125 AASTeX
5126 \end_layout
5127
5128 \begin_layout Standard
5129 by 
5130 \noun on
5131 Mike Ressler
5132 \end_layout
5133
5134 \begin_layout Subsection
5135 Introduction
5136 \end_layout
5137
5138 \begin_layout Standard
5139 AASTeX is a set of macros produced by the American Astronomical Society
5140  to facilitate electronic manuscript submission to the three journals they
5141  publish: the Astrophysical Journal (including the Letters and Supplement),
5142  the Astronomical Journal, and the Publications of the Astronomical Society
5143  of the Pacific.
5144  LyX has proven to be an excellent tool for generating these documents,
5145  especially given its equation, citation, and figure handling capabilities.
5146  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
5147  is the version described here, or higher.
5148  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
5149  incompatible with LyX.
5150  The AASTeX package may be downloaded from the AASTeX Web site
5151 \end_layout
5152
5153 \begin_layout Standard
5154 \begin_inset VSpace medskip
5155 \end_inset
5156
5157
5158 \end_layout
5159
5160 \begin_layout Standard
5161 \align center
5162 \begin_inset Flex URL
5163 status collapsed
5164
5165 \begin_layout Plain Layout
5166
5167 http://www.journals.uchicago.edu/AAS/AASTeX
5168 \end_layout
5169
5170 \end_inset
5171
5172
5173 \end_layout
5174
5175 \begin_layout Standard
5176 \begin_inset VSpace medskip
5177 \end_inset
5178
5179
5180 \end_layout
5181
5182 \begin_layout Standard
5183 A complete user guide is contained in that package and you should familiarize
5184  yourself with it thoroughly before embarking on writing a paper in LyX.
5185  LyX will not reduce the need to figure out all the AASTeX commands, it
5186  will only reduce the drudgery of typing everything in.
5187  It is your responsibility to ensure that the final exported LaTeX document
5188  conforms completely to the requirements of the journal to which you are
5189  submitting your paper.
5190 \end_layout
5191
5192 \begin_layout Subsection
5193 Starting a New Paper
5194 \end_layout
5195
5196 \begin_layout Standard
5197 I strongly suggest that you start with the AASTeX template file.
5198  Click on 
5199 \family sans
5200 \bar under
5201 F
5202 \bar default
5203 ile\SpecialChar \menuseparator
5204 New from
5205 \family default
5206  
5207 \family sans
5208 \bar under
5209 T
5210 \bar default
5211 emplate
5212 \family default
5213 , enter the new file name, then choose the 
5214 \family typewriter
5215 aastex.lyx
5216 \family default
5217  template.
5218  This will show the most common fields found in a manuscript.
5219  Simply overwrite the existing text (including the brackets, 
5220 \family typewriter
5221 <>
5222 \family default
5223 ) with the correct information.
5224  Many of the AASTeX commands and environments can be implemented directly
5225  in LyX, but some cannot: most noticeably 
5226 \family typewriter
5227
5228 \backslash
5229 altaffilmark
5230 \family default
5231  and 
5232 \family typewriter
5233
5234 \backslash
5235 altaffiltext
5236 \family default
5237 , which should stick out like a sore thumb if you actually just opened the
5238  template file.
5239  For commands such as these, the LaTeX code must be entered directly and
5240  marked as such.
5241  Such commands are referred to as ERT, or Evil Red Text.
5242  I tried to minimize the amount of ERT needed in an AASTeX document, but
5243  there is still a bit more required than any of us would like.
5244 \end_layout
5245
5246 \begin_layout Subsection
5247 Finishing Your Paper
5248 \end_layout
5249
5250 \begin_layout Standard
5251 When the paper is finished to your satisfaction and previews/prints correctly,
5252  there are a few 
5253 \begin_inset Quotes eld
5254 \end_inset
5255
5256 postprocessing
5257 \begin_inset Quotes erd
5258 \end_inset
5259
5260  actions which need to be done before you submit it to the journals.
5261  
5262 \end_layout
5263
5264 \begin_layout Enumerate
5265 Export your paper as a LaTeX file (
5266 \family sans
5267 \bar under
5268 F
5269 \bar default
5270 ile\SpecialChar \menuseparator
5271
5272 \bar under
5273 E
5274 \bar default
5275 xport\SpecialChar \menuseparator
5276
5277 \bar under
5278 L
5279 \bar default
5280 aTeX
5281 \family default
5282 ).
5283  
5284 \end_layout
5285
5286 \begin_layout Enumerate
5287 Edit the resulting 
5288 \family typewriter
5289 .tex
5290 \family default
5291  file with your favorite text editor
5292 \end_layout
5293
5294 \begin_deeper
5295 \begin_layout Enumerate
5296 remove the comment lines before the 
5297 \family typewriter
5298
5299 \backslash
5300 documentclass
5301 \family default
5302  command
5303 \end_layout
5304
5305 \begin_layout Enumerate
5306 remove the 
5307 \family typewriter
5308
5309 \backslash
5310 usepackage...{fontenc}
5311 \family default
5312  line if it appears (usually just after 
5313 \family typewriter
5314
5315 \backslash
5316 documentclass
5317 \family default
5318 }; also remove the 
5319 \family typewriter
5320
5321 \backslash
5322 secnumdepth
5323 \family default
5324  line if it appears.
5325 \end_layout
5326
5327 \begin_layout Enumerate
5328 remove everything between (and including) the 
5329 \family typewriter
5330
5331 \backslash
5332 makeatletter
5333 \family default
5334  and 
5335 \family typewriter
5336
5337 \backslash
5338 makeatother
5339 \family default
5340  commands, except for any commands you specifically put into the LaTeX preamble
5341  (which should appear immediately after the 
5342 \begin_inset Quotes eld
5343 \end_inset
5344
5345 User specified LaTeX commands
5346 \begin_inset Quotes erd
5347 \end_inset
5348
5349  comment in the 
5350 \family typewriter
5351 .tex
5352 \family default
5353  file).
5354 \end_layout
5355
5356 \end_deeper
5357 \begin_layout Enumerate
5358 Run the resulting file through LaTeX to make sure it still processes correctly.
5359 \end_layout
5360
5361 \begin_layout Enumerate
5362 Reread the journal requirements to make sure your filenames and formats
5363  are correct.
5364 \end_layout
5365
5366 \begin_layout Enumerate
5367 Submit it.
5368 \end_layout
5369
5370 \begin_layout Subsection
5371 Comments On Specific Commands
5372 \end_layout
5373
5374 \begin_layout Standard
5375 I will not describe the detailed usage of the individual AASTeX commands:
5376  the AASTeX User Guide (
5377 \family typewriter
5378 aasguide.tex
5379 \family default
5380 ) gives a good description of each.
5381  Thus it's probably easiest for me to go down the list as found in the guide
5382  and offer comments where necessary.
5383  So let's begin \SpecialChar \ldots{}
5384
5385 \end_layout
5386
5387 \begin_layout Subsubsection
5388 Things that work as expected
5389 \end_layout
5390
5391 \begin_layout Standard
5392 \begin_inset ERT
5393 status open
5394
5395 \begin_layout Plain Layout
5396
5397
5398 \backslash
5399 begin{sloppypar}
5400 \end_layout
5401
5402 \end_inset
5403
5404
5405 \end_layout
5406
5407 \begin_layout Standard
5408 Because they work as you might expect, I simply list them and the section
5409  they are found in: 
5410 \family typewriter
5411
5412 \backslash
5413 documentclass
5414 \family default
5415  (2.1.1), 
5416 \family typewriter
5417
5418 \backslash
5419 begin{document}
5420 \family default
5421  (2.2), 
5422 \family typewriter
5423
5424 \backslash
5425 title
5426 \family default
5427  (2.3), 
5428 \family typewriter
5429
5430 \backslash
5431 author
5432 \family default
5433  (2.3), 
5434 \family typewriter
5435
5436 \backslash
5437 affil
5438 \family default
5439  (2.3), 
5440 \family typewriter
5441
5442 \backslash
5443 abstract
5444 \family default
5445  (2.4), 
5446 \family typewriter
5447
5448 \backslash
5449 keywords
5450 \family default
5451  (2.5), 
5452 \family typewriter
5453
5454 \backslash
5455 section
5456 \family default
5457  (2.7), 
5458 \family typewriter
5459
5460 \backslash
5461 subsection
5462 \family default
5463  (2.7), 
5464 \family typewriter
5465
5466 \backslash
5467 subsubsection
5468 \family default
5469  (2.7), 
5470 \family typewriter
5471
5472 \backslash
5473 paragraph
5474 \family default
5475  (2.7), 
5476 \family typewriter
5477
5478 \backslash
5479 facility
5480 \family default
5481  (2.10), 
5482 \family typewriter
5483
5484 \backslash
5485 begin{displaymath}
5486 \family default
5487  (2.12), 
5488 \family typewriter
5489
5490 \backslash
5491 begin{equation}
5492 \family default
5493  (2.12), 
5494 \family typewriter
5495
5496 \backslash
5497 begin{eqnarray}
5498 \family default
5499  (2.12), 
5500 \family typewriter
5501
5502 \backslash
5503 begin{mathletters}
5504 \family default
5505  (2.12), 
5506 \family typewriter
5507
5508 \backslash
5509 begin{thebibliography}
5510 \family default
5511  (2.13.1), 
5512 \family typewriter
5513
5514 \backslash
5515 bibitem
5516 \family default
5517  (2.13.2), all the cite commands and their variations (2.13.2), the generic
5518  graphicx figure commands (2.14.1), 
5519 \family typewriter
5520
5521 \backslash
5522 begin{table}
5523 \family default
5524  (2.15.4), 
5525 \family typewriter
5526
5527 \backslash
5528 begin{tabular}
5529 \family default
5530  (2.15.4), 
5531 \family typewriter
5532
5533 \backslash
5534 caption
5535 \family default
5536  (2.15.4), 
5537 \family typewriter
5538
5539 \backslash
5540 label
5541 \family default
5542  (2.15.4, amongst other places), 
5543 \family typewriter
5544
5545 \backslash
5546 tablerefs
5547 \family default
5548  (2.15.5), 
5549 \family typewriter
5550
5551 \backslash
5552 tablecomments
5553 \family default
5554  (2.15.5), 
5555 \family typewriter
5556
5557 \backslash
5558 url
5559 \family default
5560  (2.17.4), 
5561 \family typewriter
5562
5563 \backslash
5564 end{document}
5565 \family default
5566  (2.18).
5567 \end_layout
5568
5569 \begin_layout Standard
5570 The following style options also work correctly: 
5571 \family typewriter
5572 longabstract
5573 \family default
5574  (2.4), 
5575 \family typewriter
5576 preprint
5577 \family default
5578  (3.2.1), 
5579 \family typewriter
5580 preprint2
5581 \family default
5582  (3.2.2), 
5583 \family typewriter
5584 eqsecnum
5585 \family default
5586  (3.3), 
5587 \family typewriter
5588 flushrt
5589 \family default
5590  (3.4).
5591  Simply put them in the 
5592 \family sans
5593 Options
5594 \family default
5595  box in 
5596 \family sans
5597 Layout\SpecialChar \menuseparator
5598 Document
5599 \family default
5600 .
5601 \end_layout
5602
5603 \begin_layout Standard
5604 \begin_inset ERT
5605 status open
5606
5607 \begin_layout Plain Layout
5608
5609
5610 \backslash
5611 end{sloppypar}
5612 \end_layout
5613
5614 \end_inset
5615
5616
5617 \end_layout
5618
5619 \begin_layout Subsubsection
5620 Things that work, but require more comment
5621 \end_layout
5622
5623 \begin_layout Standard
5624 The following items work, but require a little more discussion:
5625 \end_layout
5626
5627 \begin_layout Itemize
5628 These items are reserved for use by the journal editors, but you can put
5629  them into the LaTeX preamble if you feel compelled to do so: 
5630 \family typewriter
5631
5632 \backslash
5633 received
5634 \family default
5635
5636 \family typewriter
5637
5638 \backslash
5639 revised
5640 \family default
5641
5642 \family typewriter
5643
5644 \backslash
5645 accepted
5646 \family default
5647
5648 \family typewriter
5649
5650 \backslash
5651 ccc
5652 \family default
5653
5654 \family typewriter
5655
5656 \backslash
5657 cpright
5658 \family default
5659  (all from 2.1.3)
5660 \end_layout
5661
5662 \begin_layout Itemize
5663 These items may be placed in the LaTeX preamble, and are included as blanks
5664  in the template file: 
5665 \family typewriter
5666
5667 \backslash
5668 slugcomment
5669 \family default
5670  (2.1.4), 
5671 \family typewriter
5672
5673 \backslash
5674 shorttitle
5675 \family default
5676  (2.1.5), 
5677 \family typewriter
5678
5679 \backslash
5680 shortauthors
5681 \family default
5682  (2.1.5)
5683 \end_layout
5684
5685 \begin_layout Itemize
5686
5687 \family typewriter
5688
5689 \backslash
5690 email
5691 \family default
5692  (2.3) -- can only be used 
5693 \begin_inset Quotes eld
5694 \end_inset
5695
5696 standalone
5697 \begin_inset Quotes erd
5698 \end_inset
5699
5700 , not in the middle of a paragraph.
5701  Use ERT if you need to embed it.
5702 \end_layout
5703
5704 \begin_layout Itemize
5705
5706 \family typewriter
5707
5708 \backslash
5709 and
5710 \family default
5711  (2.3) -- will have extra {} after it.
5712  This should not cause an error.
5713 \end_layout
5714
5715 \begin_layout Itemize
5716
5717 \family typewriter
5718
5719 \backslash
5720 notetoeditor
5721 \family default
5722  (2.6) -- can only be used 
5723 \begin_inset Quotes eld
5724 \end_inset
5725
5726 standalone
5727 \begin_inset Quotes erd
5728 \end_inset
5729
5730 , not in the middle of a paragraph.
5731  Use ERT if you need to embed it.
5732 \end_layout
5733
5734 \begin_layout Itemize
5735
5736 \family typewriter
5737
5738 \backslash
5739 placetable
5740 \family default
5741  (2.8) -- can't insert a cross-reference tag, you must type the tag name
5742  by hand
5743 \end_layout
5744
5745 \begin_layout Itemize
5746
5747 \family typewriter
5748
5749 \backslash
5750 placefigure
5751 \family default
5752  (2.8) -- same as for 
5753 \family typewriter
5754
5755 \backslash
5756 placetable
5757 \end_layout
5758
5759 \begin_layout Itemize
5760
5761 \family typewriter
5762
5763 \backslash
5764 acknowledgements
5765 \family default
5766  (2.9) -- will have extra {} after it.
5767  This should not cause an error.
5768 \end_layout
5769
5770 \begin_layout Itemize
5771
5772 \family typewriter
5773
5774 \backslash
5775 appendix
5776 \family default
5777  (2.11) -- will have extra {} after it.
5778  This should not cause an error.
5779 \end_layout
5780
5781 \begin_layout Itemize
5782
5783 \family typewriter
5784
5785 \backslash
5786 figcaption
5787 \family default
5788  (2.14.2) -- you can insert an optional filename argument by placing the cursor
5789  at the beginning of the text and selecting 
5790 \family sans
5791 Insert\SpecialChar \menuseparator
5792 Short Title
5793 \family default
5794 .
5795  
5796 \begin_inset Quotes eld
5797 \end_inset
5798
5799 Short Title
5800 \begin_inset Quotes erd
5801 \end_inset
5802
5803  inserts an optional argument of the type needed by 
5804 \family typewriter
5805
5806 \backslash
5807 figcaption
5808 \family default
5809 .
5810  Hopefully it will be renamed someday.
5811 \end_layout
5812
5813 \begin_layout Itemize
5814
5815 \family typewriter
5816
5817 \backslash
5818 objectname
5819 \family default
5820  (2.17.1) -- same as 
5821 \family typewriter
5822
5823 \backslash
5824 figcaption
5825 \family default
5826  for the catalog ID optional parameter
5827 \end_layout
5828
5829 \begin_layout Itemize
5830
5831 \family typewriter
5832
5833 \backslash
5834 dataset
5835 \family default
5836  (2.17.1) -- same as 
5837 \family typewriter
5838
5839 \backslash
5840 figcaption
5841 \family default
5842  for the catalog ID optional parameter
5843 \end_layout
5844
5845 \begin_layout Subsubsection
5846 Things not implemented, use ERT
5847 \end_layout
5848
5849 \begin_layout Standard
5850 \begin_inset ERT
5851 status open
5852
5853 \begin_layout Plain Layout
5854
5855
5856 \backslash
5857 begin{sloppypar}
5858 \end_layout
5859
5860 \end_inset
5861
5862
5863 \end_layout
5864
5865 \begin_layout Standard
5866
5867 \family typewriter
5868
5869 \backslash
5870 altaffilmark
5871 \family default
5872  (2.3), 
5873 \family typewriter
5874
5875 \backslash
5876 altaffiltext
5877 \family default
5878  (2.3), 
5879 \family typewriter
5880
5881 \backslash
5882 eqnum
5883 \family default
5884  (2.12), 
5885 \family typewriter
5886
5887 \backslash
5888 setcounter{equation}
5889 \family default
5890  (2.12), Journal name abbreviations (2.13.4), 
5891 \family typewriter
5892
5893 \backslash
5894 figurenum
5895 \family default
5896  (2.14.1), 
5897 \family typewriter
5898
5899 \backslash
5900 epsscale
5901 \family default
5902  (2.14.1), 
5903 \family typewriter
5904
5905 \backslash
5906 plotone
5907 \family default
5908  (2.14.1), 
5909 \family typewriter
5910
5911 \backslash
5912 plottwo
5913 \family default
5914  (2.14.1), 
5915 \family typewriter
5916
5917 \backslash
5918 tablenum
5919 \family default
5920  (2.15.4), 
5921 \family typewriter
5922
5923 \backslash
5924 tableline
5925 \family default
5926  (2.15.4, insert it as the first element in the lefthand cell after where
5927  you want it.
5928  Don't use any of LyX's rules in the table), 
5929 \family typewriter
5930
5931 \backslash
5932 tablenotemark
5933 \family default
5934  (2.15.5), 
5935 \family typewriter
5936
5937 \backslash
5938 tablenotetext
5939 \family default
5940  (2.15.5), much of Misc (2.17, except 
5941 \family typewriter
5942
5943 \backslash
5944 objectname
5945 \family default
5946
5947 \family typewriter
5948
5949 \backslash
5950 dataset
5951 \family default
5952
5953 \family typewriter
5954
5955 \backslash
5956 url
5957 \family default
5958 , and 
5959 \family typewriter
5960
5961 \backslash
5962 email
5963 \family default
5964 ; see above), 
5965 \family typewriter
5966
5967 \backslash
5968 singlespace
5969 \family default
5970  (3.1), 
5971 \family typewriter
5972
5973 \backslash
5974 doublespace
5975 \family default
5976  (3.1), 
5977 \family typewriter
5978
5979 \backslash
5980 onecolumn
5981 \family default
5982  (3.2), 
5983 \family typewriter
5984
5985 \backslash
5986 twocolumn
5987 \family default
5988  (3.2)
5989 \end_layout
5990
5991 \begin_layout Standard
5992 \begin_inset ERT
5993 status open
5994
5995 \begin_layout Plain Layout
5996
5997
5998 \backslash
5999 end{sloppypar}
6000 \end_layout
6001
6002 \end_inset
6003
6004
6005 \end_layout
6006
6007 \begin_layout Subsubsection
6008 Things that cannot be implemented
6009 \end_layout
6010
6011 \begin_layout Standard
6012 \SpecialChar \ldots{}
6013  at least in any meaningful sort of way, so I suggest ignoring them.
6014  They are the references environment (2.13.3), and the deluxetable environment
6015  (2.15).
6016  If you really, really need to use deluxetable, I suggest editing it in
6017  a separate file with a text editor, then using 
6018 \family sans
6019 \bar under
6020 I
6021 \bar default
6022 nsert\SpecialChar \menuseparator
6023 Chil
6024 \bar under
6025 d
6026 \bar default
6027
6028 \begin_inset space ~
6029 \end_inset
6030
6031 Document
6032 \family default
6033  to include it in your LyX document.
6034  See the 
6035 \family typewriter
6036 aas_sample.lyx
6037 \family default
6038  file to see an example of this.
6039 \end_layout
6040
6041 \begin_layout Subsection
6042 FAQs, Tips, Tricks, and Other Ruminations
6043 \end_layout
6044
6045 \begin_layout Subsubsection
6046 Getting LyX and AASTeX to cooperate
6047 \end_layout
6048
6049 \begin_layout Standard
6050 It can be a bit tricky to get LyX to recognize a new layout and document
6051  class.
6052  When all else fails, do this:
6053 \end_layout
6054
6055 \begin_layout Enumerate
6056 Make certain that LaTeX can find AASTeX.
6057  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
6058  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
6059 \family typewriter
6060 sample.tex
6061 \family default
6062 .
6063 \end_layout
6064
6065 \begin_layout Enumerate
6066 Make certain that 
6067 \family typewriter
6068 aastex.layout
6069 \family default
6070  appears in LyX's 
6071 \family typewriter
6072 layouts
6073 \family default
6074  folder
6075 \end_layout
6076
6077 \begin_layout Enumerate
6078 Rerun 
6079 \family sans
6080 \bar under
6081 T
6082 \bar default
6083 ools\SpecialChar \menuseparator
6084
6085 \bar under
6086 R
6087 \bar default
6088 econfigure
6089 \family default
6090  in LyX, then restart LyX.
6091 \end_layout
6092
6093 \begin_layout Enumerate
6094 Open a regular new file, not from a template.
6095  Does AASTeX appear in the class list in 
6096 \family sans
6097 \bar under
6098 D
6099 \bar default
6100 ocument\SpecialChar \menuseparator
6101
6102 \bar under
6103 S
6104 \bar default
6105 ettings
6106 \family default
6107 ?
6108 \end_layout
6109
6110 \begin_layout Standard
6111 If you get a warning from an existing AASTeX document about not being able
6112  to find the AASTeX layout or a message about 
6113 \begin_inset Quotes eld
6114 \end_inset
6115
6116 You should not mix title layouts with normal ones
6117 \begin_inset Quotes erd
6118 \end_inset
6119
6120 , things haven't been installed correctly.
6121 \end_layout
6122
6123 \begin_layout Subsubsection
6124 LaTeX error processing a table 
6125 \end_layout
6126
6127 \begin_layout Standard
6128 LyX, by default, attempts to center the table caption/title.
6129  This seems to produce a bad interaction in AASTeX so you should click somewhere
6130  in the caption/title, then select 
6131 \family sans
6132 \bar under
6133 E
6134 \bar default
6135 dit\SpecialChar \menuseparator
6136
6137 \bar under
6138 P
6139 \bar default
6140 aragraph
6141 \begin_inset space ~
6142 \end_inset
6143
6144 Settings
6145 \family default
6146 , then set the 
6147 \family sans
6148 Alignment
6149 \family default
6150  to 
6151 \family sans
6152 \bar under
6153 B
6154 \bar default
6155 lock
6156 \family default
6157 .
6158  This took care of it for me.
6159 \end_layout
6160
6161 \begin_layout Subsubsection
6162 References
6163 \begin_inset CommandInset label
6164 LatexCommand label
6165 name "cite"
6166
6167 \end_inset
6168
6169
6170 \end_layout
6171
6172 \begin_layout Standard
6173 A couple of things: 1) I have noticed some funny spacing in the reference
6174  entries in the text.
6175  When you enter the bibliography item data, make sure their is 
6176 \emph on
6177 no
6178 \emph default
6179  space between the last author and the parenthesis setting off the year;
6180  
6181 \emph on
6182 e.
6183 \begin_inset space \thinspace{}
6184 \end_inset
6185
6186 g.
6187 \begin_inset space ~
6188 \end_inset
6189
6190
6191 \emph default
6192 type 
6193 \family typewriter
6194 Ressler(1992)
6195 \family default
6196 , not 
6197 \family typewriter
6198 Ressler (1992)
6199 \family default
6200 .
6201  2) Entering the references at all is not obvious.
6202  The easiest thing is to start typing your first reference at the end of
6203  the document, then mark it as type 
6204 \family sans
6205 References
6206 \family default
6207 .
6208  That will put a small gray box in front of what you just typed.
6209  Click on the box to fill in the rest of the information.
6210  For new references, go to the end of an existing reference and press return.
6211  That will create a new line with its own box, etc.
6212 \end_layout
6213
6214 \begin_layout Subsubsection
6215 Including EPS files
6216 \end_layout
6217
6218 \begin_layout Standard
6219 Even though AASTeX provides its own figure commands (
6220 \family typewriter
6221
6222 \backslash
6223 plotone
6224 \family default
6225 , for example), I much prefer LaTeX's standard figure commands (with the
6226  default graphicx).
6227  You can insert the 
6228 \family typewriter
6229
6230 \backslash
6231 plotone
6232 \family default
6233 , etc.
6234 \begin_inset space ~
6235 \end_inset
6236
6237 commands as ERT into a Figure Float box if you desire, but I never have
6238  much luck getting the layout right.
6239  With the standard graphics, LyX will insert a 
6240 \family typewriter
6241
6242 \backslash
6243 usepackage{graphicx}
6244 \family default
6245  command into the LaTeX preamble and handle the figures in the standard
6246  LaTeX2e way, interspersing the figures in the text.
6247  I believe ApJ accepts figures exactly this way now; AJ might still use
6248  the 
6249 \begin_inset Quotes eld
6250 \end_inset
6251
6252 stack everything at the end
6253 \begin_inset Quotes erd
6254 \end_inset
6255
6256  technique.
6257 \end_layout
6258
6259 \begin_layout Subsubsection
6260 Things I could have done, but didn't
6261 \end_layout
6262
6263 \begin_layout Standard
6264 There are a few 
6265 \begin_inset Quotes eld
6266 \end_inset
6267
6268 pretty
6269 \begin_inset Quotes erd
6270 \end_inset
6271
6272  things I could have implemented, but chose not to.
6273  For instance, I saw no point in double-spacing the text in the LyX window,
6274  even though it is double-spaced in the paper manuscript.
6275  Also, I chose not to make separate layouts for the preprint and preprint2
6276  styles.
6277  Since I assume you will spend most of your time in the plain manuscript
6278  mode anyway, I decided not to chew up more disk space with this.
6279  
6280 \end_layout
6281
6282 \begin_layout Subsection
6283 Final Caveat
6284 \end_layout
6285
6286 \begin_layout Standard
6287 Your mileage may vary.
6288  I've now had papers published by both ApJ and AJ that have had 98% of the
6289  effort done in LyX; the last 2% was the LaTeX post-processing and a few
6290  cleanups.
6291  I have had no trouble with the submission process, and I'm sure the journals
6292  were never aware that there might be a difference.
6293  So, go forth and publish!
6294 \end_layout
6295
6296 \begin_layout Section
6297 ijmpc and ijmpd
6298 \end_layout
6299
6300 \begin_layout Standard
6301 by 
6302 \noun on
6303 Panayotis Papasotiriou
6304 \end_layout
6305
6306 \begin_layout Subsection
6307 Overview
6308 \end_layout
6309
6310 \begin_layout Standard
6311 The ijmpc package is a set of macros that facilitates electronic manuscript
6312  submission to the 
6313 \emph on
6314 International Journal of Modern Physics C
6315 \emph default
6316 .
6317  Similarly, the ijmpd package is for creating manuscripts to be submitted
6318  to the 
6319 \emph on
6320 International Journal of Modern Physics D
6321 \emph default
6322 .
6323  Both journals are published by World Scientific.
6324  The corresponding document classes are named 
6325 \family typewriter
6326 ws-ijmpc.cls
6327 \family default
6328  and 
6329 \family typewriter
6330 ws-ijmpd.cls
6331 \family default
6332 , respectively.
6333  These files, together with instructions for the authors, can be downloaded
6334  from the sites 
6335 \begin_inset Flex URL
6336 status collapsed
6337
6338 \begin_layout Plain Layout
6339
6340 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
6341 \end_layout
6342
6343 \end_inset
6344
6345  and 
6346 \begin_inset Flex URL
6347 status collapsed
6348
6349 \begin_layout Plain Layout
6350
6351 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
6352 \end_layout
6353
6354 \end_inset
6355
6356 .
6357  Both packages are modified versions of the standard 
6358 \begin_inset Quotes eld
6359 \end_inset
6360
6361 article
6362 \begin_inset Quotes erd
6363 \end_inset
6364
6365  package, and they are almost (but not exactly) identical.
6366  Most of their features are supported by LyX.
6367  I have used LyX successfully to write articles submitted to both journals
6368  without any problem.
6369 \end_layout
6370
6371 \begin_layout Subsection
6372 Writing a paper
6373 \end_layout
6374
6375 \begin_layout Standard
6376 As usual, the easiest way to write a paper is to start with a template.
6377  Click on 
6378 \family sans
6379 \bar under
6380 F
6381 \bar default
6382 ile\SpecialChar \menuseparator
6383 New from
6384 \family default
6385  
6386 \family sans
6387 \bar under
6388 T
6389 \bar default
6390 emplate
6391 \family default
6392 , then choose the 
6393 \family typewriter
6394 ijmpc.lyx
6395 \family default
6396  or 
6397 \family typewriter
6398 ijmpd.lyx
6399 \family default
6400  template.
6401  This will give an (almost) empty document that includes the most common
6402  fields found in a manuscript.
6403  Simply overwrite the existing text (including the brackets, 
6404 \family typewriter
6405 <>
6406 \family default
6407 ) with your text.
6408  You should keep in mind the following remarks.
6409 \end_layout
6410
6411 \begin_layout Enumerate
6412 LyX won't let you change the font size and the page style of the document,
6413  because such modifications are not allowed by both packages.
6414 \end_layout
6415
6416 \begin_layout Enumerate
6417 The language of the document should not be changed.
6418  Before previewing your paper, be sure that the babel package is not used.
6419  To do this, click on 
6420 \family sans
6421 \bar under
6422 T
6423 \bar default
6424 ools\SpecialChar \menuseparator
6425
6426 \bar under
6427 P
6428 \bar default
6429 references
6430 \family default
6431 , select the 
6432 \family sans
6433 Lang Opts
6434 \family default
6435  tab, deselect the 
6436 \family sans
6437 \bar under
6438 U
6439 \bar default
6440 se babel
6441 \family default
6442  checkbox in the language settings, and click on 
6443 \family sans
6444 \bar under
6445 A
6446 \bar default
6447 pply
6448 \family default
6449  (or 
6450 \family sans
6451 Save
6452 \family default
6453 , if you wish to make this change permanent).
6454 \end_layout
6455
6456 \begin_layout Enumerate
6457 The 
6458 \begin_inset Quotes eld
6459 \end_inset
6460
6461 Keywords
6462 \begin_inset Quotes erd
6463 \end_inset
6464
6465  style must be used to define keywords.
6466 \end_layout
6467
6468 \begin_layout Enumerate
6469 The ijmpc package provides a style named 
6470 \begin_inset Quotes eld
6471 \end_inset
6472
6473 Classification Codes
6474 \begin_inset Quotes erd
6475 \end_inset
6476
6477 , which can be used to define classification codes, such as PACS numbers.
6478  Note that this facility is not supported by the ijmpd package.
6479 \end_layout
6480
6481 \begin_layout Enumerate
6482 Several new environments are available: 
6483 \begin_inset Quotes eld
6484 \end_inset
6485
6486 Definition
6487 \begin_inset Quotes erd
6488 \end_inset
6489
6490
6491 \begin_inset Quotes eld
6492 \end_inset
6493
6494 Step
6495 \begin_inset Quotes erd
6496 \end_inset
6497
6498
6499 \begin_inset Quotes eld
6500 \end_inset
6501
6502 Example
6503 \begin_inset Quotes erd
6504 \end_inset
6505
6506
6507 \begin_inset Quotes eld
6508 \end_inset
6509
6510 Remark
6511 \begin_inset Quotes erd
6512 \end_inset
6513
6514
6515 \begin_inset Quotes eld
6516 \end_inset
6517
6518 Notation
6519 \begin_inset Quotes erd
6520 \end_inset
6521
6522
6523 \begin_inset Quotes eld
6524 \end_inset
6525
6526 Theorem
6527 \begin_inset Quotes erd
6528 \end_inset
6529
6530
6531 \begin_inset Quotes eld
6532 \end_inset
6533
6534 Proof
6535 \begin_inset Quotes erd
6536 \end_inset
6537
6538
6539 \begin_inset Quotes eld
6540 \end_inset
6541
6542 Corollary
6543 \begin_inset Quotes erd
6544 \end_inset
6545
6546
6547 \begin_inset Quotes eld
6548 \end_inset
6549
6550 Lemma
6551 \begin_inset Quotes erd
6552 \end_inset
6553
6554
6555 \begin_inset Quotes eld
6556 \end_inset
6557
6558 Proposition
6559 \begin_inset Quotes erd
6560 \end_inset
6561
6562
6563 \begin_inset Quotes eld
6564 \end_inset
6565
6566 Prop
6567 \begin_inset Quotes erd
6568 \end_inset
6569
6570
6571 \begin_inset Quotes eld
6572 \end_inset
6573
6574 Question
6575 \begin_inset Quotes erd
6576 \end_inset
6577
6578
6579 \begin_inset Quotes eld
6580 \end_inset
6581
6582 Claim
6583 \begin_inset Quotes erd
6584 \end_inset
6585
6586 , and 
6587 \begin_inset Quotes eld
6588 \end_inset
6589
6590 Conjecture
6591 \begin_inset Quotes erd
6592 \end_inset
6593
6594 .
6595  Their use is more or less obvious.
6596  LyX supports all these environments; it will use the proper label, text
6597  style, and numbering scheme for each of them.
6598 \end_layout
6599
6600 \begin_layout Enumerate
6601 Both packages use basic citations; the natbib package should not be used.
6602  In LyX, citation references are shown as usual; in the output, citations
6603  are shown as superscripts.
6604  If you want to use a citation as normal text, you should use the 
6605 \family typewriter
6606 refcite
6607 \family default
6608  command, e.
6609 \begin_inset space \thinspace{}
6610 \end_inset
6611
6612 g., 
6613 \begin_inset Quotes eld
6614 \end_inset
6615
6616 See Ref.
6617 \begin_inset space ~
6618 \end_inset
6619
6620
6621 \family typewriter
6622
6623 \backslash
6624 refcite{key}
6625 \family default
6626
6627 \begin_inset Quotes erd
6628 \end_inset
6629
6630 .
6631 \end_layout
6632
6633 \begin_layout Enumerate
6634 There is no 
6635 \begin_inset Quotes eld
6636 \end_inset
6637
6638 Acknowledgments
6639 \begin_inset Quotes erd
6640 \end_inset
6641
6642  section in both packages.
6643  To put acknowledgments, just use the 
6644 \begin_inset Quotes eld
6645 \end_inset
6646
6647 Section*
6648 \begin_inset Quotes erd
6649 \end_inset
6650
6651  environment.
6652 \end_layout
6653
6654 \begin_layout Enumerate
6655 Appendices may be added to the paper, 
6656 \emph on
6657 after
6658 \emph default
6659  the Acknowledgments and 
6660 \shape italic
6661 before
6662 \shape default
6663  the References.
6664  LyX provides a special environment, called 
6665 \begin_inset Quotes eld
6666 \end_inset
6667
6668 Appendices Section
6669 \begin_inset Quotes erd
6670 \end_inset
6671
6672  which marks the beginning of the appendices.
6673  This environment should be left blank; it just sends a LaTeX command, but
6674  nothing is really printed.
6675  In LyX, the word 
6676 \begin_inset Quotes eld
6677 \end_inset
6678
6679 Appendix
6680 \begin_inset Quotes erd
6681 \end_inset
6682
6683  is printed with blue letters, as a signal that all sections after that
6684  point are appendices.
6685  To write an appendix, use the 
6686 \begin_inset Quotes eld
6687 \end_inset
6688
6689 Appendix
6690 \begin_inset Quotes erd
6691 \end_inset
6692
6693  environment.
6694  LyX will number each appendix with capital letters, as required by both
6695  journals.
6696  Note that 
6697 \begin_inset Quotes eld
6698 \end_inset
6699
6700 Appendices Section
6701 \begin_inset Quotes erd
6702 \end_inset
6703
6704  
6705 \emph on
6706 must
6707 \emph default
6708  be present before the first appendix; if not, all appendices will be numbered
6709  as normal sections in the output.
6710 \end_layout
6711
6712 \begin_layout Enumerate
6713 The ijmpc and the ijmpd packages use the 
6714 \family typewriter
6715 tbl
6716 \family default
6717  command to implement table captions.
6718  As a result, a table created by LyX is printed correctly, but its caption
6719  is ignored.
6720  However, you can use some ERT to overpass this problem, so that captions
6721  are printed as expected.
6722  To do so, create a float table as usual, remove the caption, and replace
6723  it with the ERT 
6724 \family typewriter
6725
6726 \backslash
6727 tbl{
6728 \emph on
6729 your table caption
6730 \emph default
6731 }{
6732 \family default
6733  (sic); you must also the ERT 
6734 \family typewriter
6735 }
6736 \family default
6737  immediately after the tabular material.
6738  Study the example table included in the template files to see how this
6739  trick is implemented.
6740  Alternatively, If you need table captions, you should implement the whole
6741  table float in a 
6742 \family typewriter
6743 .tex
6744 \family default
6745  file, then include this file to the LyX document (
6746 \family sans
6747 \bar under
6748 I
6749 \bar default
6750 nsert\SpecialChar \menuseparator
6751 Fil
6752 \bar under
6753 e
6754 \bar default
6755 \SpecialChar \menuseparator
6756 Chil
6757 \bar under
6758 d
6759 \bar default
6760
6761 \begin_inset space ~
6762 \end_inset
6763
6764 Document
6765 \family default
6766 ).
6767  Details on how to create a table float can be found in the files 
6768 \family typewriter
6769 ws-ijmpc.tex
6770 \family default
6771  and 
6772 \family typewriter
6773 ws-ijmpd.tex
6774 \family default
6775 , included in the corresponding packages.
6776 \end_layout
6777
6778 \begin_layout Subsection
6779 Preparing a paper for submission
6780 \end_layout
6781
6782 \begin_layout Standard
6783 Before you submit your paper you must export the LyX document as a LaTeX
6784  file (
6785 \family sans
6786 \bar under
6787 F
6788 \bar default
6789 ile\SpecialChar \menuseparator
6790
6791 \bar under
6792 E
6793 \bar default
6794 xport\SpecialChar \menuseparator
6795
6796 \bar under
6797 L
6798 \bar default
6799 a
6800 \family default
6801 T
6802 \family sans
6803 eX
6804 \family default
6805 )
6806 \begin_inset Foot
6807 status open
6808
6809 \begin_layout Plain Layout
6810 Actually you have the choice between LaTeX (plain) and pdflatex.
6811  If you intend to use pdflatex to prepare the paper, you should use the
6812  pdflatex option so that included graphics are converted to PDF format,
6813  ready for use by pdflatex.
6814 \end_layout
6815
6816 \end_inset
6817
6818 , then make the following changes to the resulting 
6819 \family typewriter
6820 .tex
6821 \family default
6822  file.
6823 \end_layout
6824
6825 \begin_layout Enumerate
6826 Remove the comment lines before the 
6827 \family typewriter
6828
6829 \backslash
6830 documentclass
6831 \family default
6832  command.
6833 \end_layout
6834
6835 \begin_layout Enumerate
6836 Remove everything between (and including) the 
6837 \family typewriter
6838
6839 \backslash
6840 makeatletter
6841 \family default
6842  and 
6843 \family typewriter
6844
6845 \backslash
6846 makeatother
6847 \family default
6848  commands, except for any commands you specifically put into the LaTeX preamble.
6849 \end_layout
6850
6851 \begin_layout Standard
6852 The modified 
6853 \family typewriter
6854 .tex
6855 \family default
6856  file should be saved and processed through LaTeX as many times as necessary.
6857  You may also want to check the resulting 
6858 \family typewriter
6859 .dvi
6860 \family default
6861  document.
6862 \end_layout
6863
6864 \begin_layout Subsection
6865 Use of ERT
6866 \end_layout
6867
6868 \begin_layout Standard
6869 The use of ERT is reduced to two commands, which must be placed at the top
6870  of the document.
6871  If you started writing your paper by using the 
6872 \family typewriter
6873 ijmpc.lyx
6874 \family default
6875  or the 
6876 \family typewriter
6877 ijmpd.lyx
6878 \family default
6879  template, the ERT needed is already in its place; you usually don't need
6880  to delete it.
6881  You may only modify the first ERT to specify the information printed to
6882  the top of odd and even pages (authors' names and short paper's title,
6883  respectively).
6884  This ERT must have the form 
6885 \family typewriter
6886
6887 \backslash
6888 markboth{Authors' Names}{Short Paper's Title}
6889 \family default
6890 .
6891 \end_layout
6892
6893 \begin_layout Section
6894 iopart
6895 \end_layout
6896
6897 \begin_layout Standard
6898 by 
6899 \noun on
6900 Uwe Stöhr
6901 \end_layout
6902
6903 \begin_layout Subsection
6904 Overview
6905 \end_layout
6906
6907 \begin_layout Standard
6908 The iopart package provides a document class to create electronic manuscript
6909  submission to the journals published by the Institute of Physics.
6910  Instructions for the authors how to create a paper using the iopart class
6911  can be downloaded together with the iopart package from the site 
6912 \begin_inset Flex URL
6913 status collapsed
6914
6915 \begin_layout Plain Layout
6916
6917 ftp://ftp.iop.org/pub/journals/latex2e
6918 \end_layout
6919
6920 \end_inset
6921
6922 .
6923 \end_layout
6924
6925 \begin_layout Subsection
6926 Writing a paper
6927 \end_layout
6928
6929 \begin_layout Standard
6930 The easiest way to write a paper is to start with the file 
6931 \emph on
6932 IOP-article.lyx
6933 \emph default
6934  that is available in LyX's examples files folder.
6935  Open this file, save it under a new name, and start writing.
6936  The example file explains how to use the special text environments.
6937  Here are the most important advices:
6938 \end_layout
6939
6940 \begin_layout Itemize
6941 To be able to compile your document to a PDF, PS, or DVI, assure that the
6942  two options 
6943 \family sans
6944 Use AMS math package
6945 \family default
6946  in the document settings under 
6947 \family sans
6948 Math Options
6949 \family default
6950  are not used!
6951 \end_layout
6952
6953 \begin_layout Itemize
6954
6955 \size normal
6956 The title environment defines the kind of your paper.
6957  So use one of the following environments for the title:
6958 \end_layout
6959
6960 \begin_deeper
6961 \begin_layout Itemize
6962
6963 \family sans
6964 \size normal
6965 Title
6966 \family default
6967  for a Paper
6968 \end_layout
6969
6970 \begin_layout Itemize
6971
6972 \family sans
6973 \size normal
6974 Review
6975 \family default
6976  for a Review
6977 \end_layout
6978
6979 \begin_layout Itemize
6980
6981 \family sans
6982 \size normal
6983 Topical
6984 \family default
6985  for a Topical review
6986 \end_layout
6987
6988 \begin_layout Itemize
6989
6990 \family sans
6991 \size normal
6992 Comment
6993 \family default
6994  for a Comment
6995 \end_layout
6996
6997 \begin_layout Itemize
6998
6999 \family sans
7000 \size normal
7001 Note
7002 \family default
7003  for a Note
7004 \end_layout
7005
7006 \begin_layout Itemize
7007
7008 \family sans
7009 \size normal
7010 Paper
7011 \family default
7012  for a Paper (same as Title)
7013 \end_layout
7014
7015 \begin_layout Itemize
7016
7017 \family sans
7018 \size normal
7019 Prelim
7020 \family default
7021  for a Preliminary communication
7022 \end_layout
7023
7024 \begin_layout Itemize
7025
7026 \family sans
7027 \size normal
7028 Rapid
7029 \family default
7030  for a Rapid communication
7031 \end_layout
7032
7033 \begin_layout Itemize
7034
7035 \family sans
7036 \size normal
7037 Letter
7038 \family default
7039  for a Letter to the editor
7040 \end_layout
7041
7042 \end_deeper
7043 \begin_layout Itemize
7044
7045 \size normal
7046 All title environments except of 
7047 \family sans
7048 Letter
7049 \family default
7050  can have an optional short title.
7051 \end_layout
7052
7053 \begin_layout Itemize
7054 There is a general title environment 
7055 \family sans
7056 Article
7057 \family default
7058  which is not directly supported by the LyX.
7059  This can be used as ERT when your document doesn't fit into one of the
7060  other title types.
7061 \end_layout
7062
7063 \begin_layout Standard
7064 For more informations like hints for special table and formula formatting,
7065  look at the IOP author guidelines.
7066 \end_layout
7067
7068 \begin_layout Section
7069 Kluwer
7070 \end_layout
7071
7072 \begin_layout Standard
7073 by 
7074 \noun on
7075 Panayotis Papasotiriou
7076 \end_layout
7077
7078 \begin_layout Subsection
7079 Overview
7080 \end_layout
7081
7082 \begin_layout Standard
7083 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
7084  that facilitates electronic manuscript submission to the journals they
7085  publish.
7086  Most known of them (at least in my domain of interest) are 
7087 \emph on
7088 Astrophysics and Space Science
7089 \emph default
7090  and 
7091 \emph on
7092 Solar Physics
7093 \emph default
7094 , but there are many others (see a complete list at 
7095 \begin_inset Flex URL
7096 status collapsed
7097
7098 \begin_layout Plain Layout
7099
7100 http://www.wkap.nl/jrnllist.htm/JRNLHOME
7101 \end_layout
7102
7103 \end_inset
7104
7105 ).
7106  The Kluwer package may be downloaded from the site 
7107 \begin_inset Flex URL
7108 status collapsed
7109
7110 \begin_layout Plain Layout
7111
7112 http://www.wkap.nl/kaphtml.htm/STYLEFILES
7113 \end_layout
7114
7115 \end_inset
7116
7117 .
7118  A complete user guide is contained in that package (but it can also be
7119  downloaded separately).
7120 \end_layout
7121
7122 \begin_layout Standard
7123 LyX supports many features of the package but not everything.
7124  However, the ERT needed is reduced to some 
7125 \begin_inset Quotes eld
7126 \end_inset
7127
7128 peculiar
7129 \begin_inset Quotes erd
7130 \end_inset
7131
7132  commands of the package (see
7133 \begin_inset space ~
7134 \end_inset
7135
7136
7137 \begin_inset CommandInset ref
7138 LatexCommand ref
7139 reference "subsec:kluwer_peculiarities"
7140
7141 \end_inset
7142
7143 ).
7144  I have recently used LyX to write an article submitted to the 
7145 \emph on
7146 Astrophysics and Space Science
7147 \emph default
7148  without any problem.
7149 \end_layout
7150
7151 \begin_layout Subsection
7152 Writing a paper
7153 \end_layout
7154
7155 \begin_layout Standard
7156 The easiest way to write a paper is to start with the Kluwer template file.
7157  Click on 
7158 \family sans
7159 File\SpecialChar \menuseparator
7160 New from
7161 \family default
7162  
7163 \family sans
7164 \bar under
7165 T
7166 \bar default
7167 emplate
7168 \family default
7169 , then choose the 
7170 \family typewriter
7171 kluwer.lyx
7172 \family default
7173  template.
7174  This will give an (almost) empty document that includes the most common
7175  fields found in a manuscript and a short description of their use.
7176  As in most templates, simply overwrite the existing text (including the
7177  brackets, 
7178 \family typewriter
7179 <>
7180 \family default
7181 ) with the correct information.
7182 \end_layout
7183
7184 \begin_layout Subsection
7185 Preparing a paper for submission
7186 \end_layout
7187
7188 \begin_layout Standard
7189 As in the AASTeX package, before you submit your paper to a journal you
7190  must 
7191 \begin_inset Quotes eld
7192 \end_inset
7193
7194 postprocess
7195 \begin_inset Quotes erd
7196 \end_inset
7197
7198  it as follows.
7199 \end_layout
7200
7201 \begin_layout Enumerate
7202 Export your paper as a LaTeX file.
7203  To do this, click on 
7204 \family sans
7205 \bar under
7206 F
7207 \bar default
7208 ile\SpecialChar \menuseparator
7209
7210 \bar under
7211 E
7212 \bar default
7213 xport\SpecialChar \menuseparator
7214
7215 \bar under
7216 L
7217 \bar default
7218 aTeX
7219 \family default
7220 .
7221  
7222 \end_layout
7223
7224 \begin_layout Enumerate
7225 Edit the resulting 
7226 \family typewriter
7227 .tex
7228 \family default
7229  file with a text editor and make the following changes
7230 \end_layout
7231
7232 \begin_deeper
7233 \begin_layout Enumerate
7234 remove the comment lines before the 
7235 \family typewriter
7236
7237 \backslash
7238 documentclass
7239 \family default
7240  command,
7241 \end_layout
7242
7243 \begin_layout Enumerate
7244 remove everything between (and including) the 
7245 \family typewriter
7246
7247 \backslash
7248 makeatletter
7249 \family default
7250  and 
7251 \family typewriter
7252
7253 \backslash
7254 makeatother
7255 \family default
7256  commands, except for any commands you specifically put into the LaTeX preamble.
7257 \end_layout
7258
7259 \begin_layout Standard
7260 Save the resulting 
7261 \family typewriter
7262 .tex
7263 \family default
7264  file.
7265 \end_layout
7266
7267 \end_deeper
7268 \begin_layout Enumerate
7269 Run the 
7270 \family typewriter
7271 .tex
7272 \family default
7273  file through LaTeX as many times as necessary (usually up to three).
7274 \end_layout
7275
7276 \begin_layout Enumerate
7277 View the resulting 
7278 \family typewriter
7279 .dvi
7280 \family default
7281  document using, e.
7282 \begin_inset space \thinspace{}
7283 \end_inset
7284
7285 g., 
7286 \family sans
7287 xdvi
7288 \family default
7289 , and check if everything is OK (it should, if you didn't make any mistake).
7290 \end_layout
7291
7292 \begin_layout Subsection
7293 \begin_inset Quotes eld
7294 \end_inset
7295
7296 Peculiarities
7297 \begin_inset Quotes erd
7298 \end_inset
7299
7300  of the Kluwer package
7301 \begin_inset CommandInset label
7302 LatexCommand label
7303 name "subsec:kluwer_peculiarities"
7304
7305 \end_inset
7306
7307
7308 \end_layout
7309
7310 \begin_layout Standard
7311 The Kluwer package has the following 
7312 \begin_inset Quotes eld
7313 \end_inset
7314
7315 peculiarities
7316 \begin_inset Quotes erd
7317 \end_inset
7318
7319 .
7320 \end_layout
7321
7322 \begin_layout Enumerate
7323 It is possible to write multiple articles in the same LaTeX file
7324 \begin_inset Foot
7325 status collapsed
7326
7327 \begin_layout Plain Layout
7328 I can't imagine any good reason to do this.
7329 \end_layout
7330
7331 \end_inset
7332
7333 .
7334  Each article must be included in the environment 
7335 \begin_inset Quotes eld
7336 \end_inset
7337
7338 article
7339 \begin_inset Quotes erd
7340 \end_inset
7341
7342 .
7343  Unfortunately, this environment cannot be omitted, even if you write just
7344  one article.
7345  Therefore, each article starts with the command 
7346 \family typewriter
7347
7348 \backslash
7349 begin{article}
7350 \family default
7351  and, obviously, ends with the command 
7352 \family typewriter
7353
7354 \backslash
7355 end{article}
7356 \family default
7357 .
7358  Although this can be implemented in LyX, I didn't included it, since it
7359  looks ugly and can confuse the novice user.
7360  Therefore, you need to enter them directly and mark them as LaTeX code
7361  (the well-known 
7362 \begin_inset Quotes eld
7363 \end_inset
7364
7365 ERT
7366 \begin_inset Quotes erd
7367 \end_inset
7368
7369 ).
7370 \end_layout
7371
7372 \begin_layout Enumerate
7373 Information given at the beginning of the article (i.e., title, subtitle,
7374  author, institution, running title, running author, abstract and keywords)
7375  must be included in an environment called 
7376 \begin_inset Quotes eld
7377 \end_inset
7378
7379 opening
7380 \begin_inset Quotes erd
7381 \end_inset
7382
7383 .
7384  This is not implemented in LyX, so you must enter title, subtitle etc.
7385 \begin_inset space ~
7386 \end_inset
7387
7388 between two ERT lines (
7389 \family typewriter
7390
7391 \backslash
7392 begin{opening}
7393 \family default
7394  and 
7395 \family typewriter
7396
7397 \backslash
7398 end{opening}
7399 \family default
7400 ).
7401 \end_layout
7402
7403 \begin_layout Enumerate
7404 According to the user manual, the label of each bibliography item must be
7405  written as 
7406 \family typewriter
7407
7408 \backslash
7409 protect
7410 \backslash
7411 citeauthoryear{
7412 \family default
7413 \emph on
7414 author(s)
7415 \family typewriter
7416 \emph default
7417 }{
7418 \family default
7419 \emph on
7420 year
7421 \family typewriter
7422 \emph default
7423 }
7424 \family default
7425 .
7426 \end_layout
7427
7428 \begin_layout Standard
7429 The 
7430 \family typewriter
7431 kluwer.lyx
7432 \family default
7433  template takes care of all these 
7434 \begin_inset Quotes eld
7435 \end_inset
7436
7437 peculiarities
7438 \begin_inset Quotes erd
7439 \end_inset
7440
7441 .
7442  If you start a new paper using this template you don't need to do anything
7443  special.
7444  Just 
7445 \end_layout
7446
7447 \begin_layout Enumerate
7448 don't delete the ERT included in the template, and
7449 \end_layout
7450
7451 \begin_layout Enumerate
7452 copy the example bibliography item included in the template and modify it
7453  as necessary to enter new bibliography items.
7454 \end_layout
7455
7456 \begin_layout Section
7457 Koma-Script
7458 \end_layout
7459
7460 \begin_layout Standard
7461 by 
7462 \noun on
7463 Bernd Rellermeyer
7464 \end_layout
7465
7466 \begin_layout Subsection
7467 Overview
7468 \end_layout
7469
7470 \begin_layout Standard
7471 The LyX document classes 
7472 \emph on
7473 article (koma-script)
7474 \emph default
7475
7476 \emph on
7477 report (koma-script)
7478 \emph default
7479
7480 \emph on
7481 book
7482 \emph default
7483  
7484 \emph on
7485 (koma-script)
7486 \emph default
7487 , and 
7488 \emph on
7489 letter
7490 \emph default
7491  
7492 \emph on
7493 (koma-script)
7494 \emph default
7495  correspond to the LaTeX document classes 
7496 \family typewriter
7497 scrartcl.cls
7498 \family default
7499
7500 \family typewriter
7501 scrreprt.cls
7502 \family default
7503
7504 \family typewriter
7505 scrbook.cls
7506 \family default
7507 , and 
7508 \family typewriter
7509 scrlettr.cls
7510 \family default
7511 , resp.
7512 \begin_inset space ~
7513 \end_inset
7514
7515 of the Koma-Script family.
7516  They are replacements for the standard document classes 
7517 \family typewriter
7518 article.cls
7519 \family default
7520
7521 \family typewriter
7522 report.cls
7523 \family default
7524
7525 \family typewriter
7526 book.cls
7527 \family default
7528  and 
7529 \family typewriter
7530 letter.cls
7531 \family default
7532 , resp., and fit better to European typography conventions in a number of
7533  points.
7534 \end_layout
7535
7536 \begin_layout Itemize
7537 Standard character size is 11pt in 
7538 \emph on
7539 article (koma-script)
7540 \emph default
7541
7542 \emph on
7543 report (koma-script)
7544 \emph default
7545 , and 
7546 \emph on
7547 book (koma-script)
7548 \emph default
7549 , and 12pt in 
7550 \emph on
7551 letter (koma-script)
7552 \emph default
7553 .
7554 \end_layout
7555
7556 \begin_layout Itemize
7557 Headings, labels of the description environment, and a number of elements
7558  of the 
7559 \emph on
7560 letter (koma-script)
7561 \emph default
7562  document class are set in a bold sans serif font.
7563 \begin_inset Foot
7564 status collapsed
7565
7566 \begin_layout Plain Layout
7567 There is a big difference between the bold sans serif old cm fonts and new
7568  ec fonts, especially in the appearance of headings.
7569  In comparison, the ec bold sans serif fonts look a bit thin.
7570  Here the LaTeX package 
7571 \family typewriter
7572 cmsd.sty by
7573 \family default
7574  
7575 \shape smallcaps
7576 Walter Schmidt
7577 \shape default
7578  helps to produce the 
7579 \begin_inset Quotes eld
7580 \end_inset
7581
7582 usual
7583 \begin_inset Quotes erd
7584 \end_inset
7585
7586  appearance when using the ec fonts.
7587 \end_layout
7588
7589 \end_inset
7590
7591  The numbering of chapter headings is made in the same way as the numbering
7592  of section headings, that is without the extra line 
7593 \begin_inset Quotes eld
7594 \end_inset
7595
7596 Chapter\SpecialChar \ldots{}
7597
7598 \begin_inset Quotes erd
7599 \end_inset
7600
7601 .
7602  In addition, the appearance of the headings can be modified by using a
7603  number of options (in LyX to be entered in the field 
7604 \family sans
7605 E
7606 \bar under
7607 x
7608 \bar default
7609 tra
7610 \begin_inset space ~
7611 \end_inset
7612
7613 Options
7614 \family default
7615  of the dialog 
7616 \family sans
7617 \bar under
7618 L
7619 \bar default
7620 ayout\SpecialChar \menuseparator
7621
7622 \bar under
7623 D
7624 \bar default
7625 ocument
7626 \family default
7627 ).
7628  A detailed German description of these options can be found in the Koma-Script
7629  documentation 
7630 \emph on
7631 scrguide
7632 \emph default
7633 .
7634 \end_layout
7635
7636 \begin_layout Itemize
7637 The main means in the Koma-Script document classes to design the type area
7638  are the options 
7639 \family sans
7640 BCOR
7641 \family default
7642  and 
7643 \family sans
7644 DIV
7645 \family default
7646  (in LyX to be entered in the extra class options field in the dialog 
7647 \family sans
7648 \bar under
7649 D
7650 \bar default
7651 ocument\SpecialChar \menuseparator
7652
7653 \bar under
7654 S
7655 \bar default
7656 ettings
7657 \family default
7658 ).
7659  They make a clearer modification of page margins possible as do the options
7660  of the dialog 
7661 \family sans
7662 \bar under
7663 D
7664 \bar default
7665 ocument\SpecialChar \menuseparator
7666
7667 \bar under
7668 S
7669 \bar default
7670 ettings
7671 \family default
7672 .
7673  A detailed German description of these and other type area options can
7674  be found in the Koma-Script documentation 
7675 \emph on
7676 scrguide
7677 \emph default
7678 .
7679 \end_layout
7680
7681 \begin_layout Itemize
7682 The LaTeX document classes of the Koma-Script family define a number of
7683  additional commands.
7684  Those part of it which makes sense in LyX is implemented in corresponding
7685  paragraph types.
7686 \end_layout
7687
7688 \begin_layout Standard
7689 A detailed German description of the LaTeX document classes of the Koma-Script
7690  family can be found in the Koma-Script documentation 
7691 \emph on
7692 scrguide
7693 \emph default
7694 .
7695 \begin_inset Foot
7696 status collapsed
7697
7698 \begin_layout Plain Layout
7699 There is an English translation 
7700 \emph on
7701 screnggu
7702 \emph default
7703 , but it is not a complete one.
7704 \end_layout
7705
7706 \end_inset
7707
7708  The following sections describe only those aspects, which are relevant
7709  in LyX.
7710 \end_layout
7711
7712 \begin_layout Subsection
7713 article (koma-script), report (koma-script), and book (koma-script)
7714 \end_layout
7715
7716 \begin_layout Standard
7717 The document classes 
7718 \emph on
7719 article (koma-script)
7720 \emph default
7721
7722 \emph on
7723 report (koma-script)
7724 \emph default
7725 , and 
7726 \emph on
7727 book
7728 \emph default
7729  
7730 \emph on
7731 (koma-script)
7732 \emph default
7733  are implemented in the layout files 
7734 \family typewriter
7735 scrartcl.layout
7736 \family default
7737
7738 \family typewriter
7739 scrreprt.layout
7740 \family default
7741 , and 
7742 \family typewriter
7743 scrbook.layout
7744 \family default
7745 , resp.
7746  They contain all the paragraph types of the corresponding standard document
7747  classes 
7748 \emph on
7749 article
7750 \emph default
7751
7752 \emph on
7753 report
7754 \emph default
7755 , and 
7756 \emph on
7757 book
7758 \emph default
7759 , resp., partly modified, with the exception of the LyX specific 
7760 \family sans
7761 List
7762 \family default
7763 -type, which is replaced by the new 
7764 \family sans
7765 Labeling
7766 \family default
7767 -type having the same functionality.
7768  Beside the 
7769 \family sans
7770 Labeling
7771 \family default
7772 -Type there is a number of new paragraph types added.
7773  They are 
7774 \emph on
7775 not
7776 \emph default
7777  part of 
7778 \emph on
7779 letter (koma-script)
7780 \emph default
7781 .
7782 \end_layout
7783
7784 \begin_layout Itemize
7785
7786 \family sans
7787 Addpart, Addchap
7788 \family default
7789
7790 \family sans
7791 Addsec
7792 \family default
7793 : are equivalents to 
7794 \family sans
7795 Part*, Chapter*
7796 \family default
7797  and 
7798 \family sans
7799 Section*
7800 \family default
7801 , resp., additionally inserting an entry in the table of contents.
7802  
7803 \family sans
7804 Addpart
7805 \family default
7806  and 
7807 \family sans
7808 Addchap
7809 \family default
7810  are not contained in 
7811 \emph on
7812 article (koma-script)
7813 \emph default
7814 .
7815 \end_layout
7816
7817 \begin_layout Itemize
7818
7819 \family sans
7820 Addchap*
7821 \family default
7822
7823 \family sans
7824 Addsec*
7825 \family default
7826 : behave exactly as 
7827 \family sans
7828 Addchap
7829 \family default
7830  and 
7831 \family sans
7832 Addsec
7833 \family default
7834 , resp., additionally clearing running heads.
7835  
7836 \family sans
7837 Addchap*
7838 \family default
7839  is not contained in 
7840 \emph on
7841 article (koma-script)
7842 \emph default
7843 .
7844 \begin_inset Foot
7845 status collapsed
7846
7847 \begin_layout Plain Layout
7848 There is also an 
7849 \family typewriter
7850
7851 \backslash
7852 addpart*
7853 \family default
7854  command in 
7855 \emph on
7856 book (koma-script)
7857 \emph default
7858  and in 
7859 \emph on
7860 report (koma-script)
7861 \emph default
7862 , but since this is identical to 
7863 \family sans
7864 Part*
7865 \family default
7866 , is has not been implemented in LyX.
7867 \end_layout
7868
7869 \end_inset
7870
7871
7872 \end_layout
7873
7874 \begin_layout Itemize
7875
7876 \family sans
7877 Minisec
7878 \family default
7879 : generates a heading directly above the following paragraph in the standard
7880  character size without affecting the structure of the document.
7881 \end_layout
7882
7883 \begin_layout Itemize
7884
7885 \family sans
7886 Captionabove
7887 \family default
7888  and 
7889 \family sans
7890 Captionbelow
7891 \family default
7892  are special captions which respect the different space settings needed
7893  for captions placed above or below an element (if you follow strict typographic
7894  rules, you might want to place table captions always above the table).
7895  You can also use the class option 
7896 \family typewriter
7897 tablecaptionsabove
7898 \family default
7899 , which will switch 
7900 \family sans
7901 caption
7902 \family default
7903  to 
7904 \family sans
7905 captionabove
7906 \family default
7907  for tables and 
7908 \family sans
7909 captionbelow
7910 \family default
7911  for figures.
7912  You need at least Koma-Script version 2.8q to use this.
7913 \end_layout
7914
7915 \begin_layout Itemize
7916
7917 \family sans
7918 Dictum
7919 \family default
7920 : can be used to set a bonmot, e.
7921 \begin_inset space \thinspace{}
7922 \end_inset
7923
7924 g.
7925 \begin_inset space ~
7926 \end_inset
7927
7928 at the beginning of a chapter.
7929  If you use the optional argument (
7930 \family sans
7931 \bar under
7932 I
7933 \bar default
7934 nsert\SpecialChar \menuseparator
7935 Short
7936 \begin_inset space ~
7937 \end_inset
7938
7939 Title
7940 \family default
7941 ), you can insert the dictum's author there.
7942  Dictum and author are separated by a line.
7943  You need at least Koma-Script version 2.8q to use this.
7944  
7945 \family sans
7946 Dictum
7947 \family default
7948  is not contained in 
7949 \emph on
7950 article (koma-script)
7951 \emph default
7952 .
7953 \end_layout
7954
7955 \begin_layout Standard
7956 The following types, together with the standard types 
7957 \family sans
7958 Title
7959 \family default
7960
7961 \family sans
7962 Author
7963 \family default
7964 , and 
7965 \family sans
7966 Date
7967 \family default
7968 , form the title area of the document.
7969  They must be entered ahead of the first 
7970 \begin_inset Quotes eld
7971 \end_inset
7972
7973 ordinary
7974 \begin_inset Quotes erd
7975 \end_inset
7976
7977  paragraph.
7978 \begin_inset Foot
7979 status collapsed
7980
7981 \begin_layout Plain Layout
7982 The corresponding LaTeX commands must appear before the 
7983 \family typewriter
7984
7985 \backslash
7986 maketitle
7987 \family default
7988  command.
7989 \end_layout
7990
7991 \end_inset
7992
7993  When such a type is used more than once, the latter usage overwrites the
7994  former one, that means, for every type only the latest usage is valid.
7995  The order of the different types however has, like 
7996 \family sans
7997 Title
7998 \family default
7999
8000 \family sans
8001 Author
8002 \family default
8003 , and 
8004 \family sans
8005 Date
8006 \family default
8007 , no effect on the appearance of the produced document.
8008 \end_layout
8009
8010 \begin_layout Itemize
8011
8012 \family sans
8013 Subject
8014 \family default
8015 : produces a centered paragraph above the ordinary title (
8016 \family sans
8017 Title
8018 \family default
8019
8020 \family sans
8021 Author
8022 \family default
8023
8024 \family sans
8025 Date
8026 \family default
8027 ) for the subject of the document.
8028 \end_layout
8029
8030 \begin_layout Itemize
8031
8032 \family sans
8033 Publishers
8034 \family default
8035 : produces a centered paragraph below the ordinary title (
8036 \family sans
8037 Title
8038 \family default
8039
8040 \family sans
8041 Author
8042 \family default
8043
8044 \family sans
8045 Date
8046 \family default
8047 ) for the publishers' name.
8048 \end_layout
8049
8050 \begin_layout Itemize
8051
8052 \family sans
8053 Dedication
8054 \family default
8055 : in 
8056 \emph on
8057 report (koma-script)
8058 \emph default
8059  and 
8060 \emph on
8061 book (koma-script)
8062 \emph default
8063  produces a centered paragraph on its own page behind the title page, or
8064  in 
8065 \emph on
8066 article (koma-script)
8067 \emph default
8068  produces a centered paragraph below the ordinary title (
8069 \family sans
8070 Title
8071 \family default
8072
8073 \family sans
8074 Author
8075 \family default
8076
8077 \family sans
8078 Date
8079 \family default
8080
8081 \family sans
8082 Publishers
8083 \family default
8084 ) for a dedication.
8085 \end_layout
8086
8087 \begin_layout Itemize
8088
8089 \family sans
8090 Titlehead
8091 \family default
8092 : produces a left aligned paragraph above the ordinary title (
8093 \family sans
8094 Title
8095 \family default
8096
8097 \family sans
8098 Author
8099 \family default
8100
8101 \family sans
8102 Date
8103 \family default
8104
8105 \family sans
8106 Subject
8107 \family default
8108 ) for a document`s head.
8109 \end_layout
8110
8111 \begin_layout Itemize
8112
8113 \family sans
8114 Uppertitleback
8115 \family default
8116 : produces in a double-sided print in 
8117 \emph on
8118 report (koma-script)
8119 \emph default
8120  and 
8121 \emph on
8122 book (koma-script)
8123 \emph default
8124  a left-aligned paragraph at the top of the title page`s back or has no
8125  effect in a single-sided print or in 
8126 \emph on
8127 article (koma-script)
8128 \emph default
8129 .
8130 \end_layout
8131
8132 \begin_layout Itemize
8133
8134 \family sans
8135 Lowertitleback
8136 \family default
8137 : produces in a double-sided print in 
8138 \emph on
8139 report (koma-script)
8140 \emph default
8141  and 
8142 \emph on
8143 book (koma-script)
8144 \emph default
8145  a left-aligned paragraph at the bottom of the title page`s back or has
8146  no effect in a single-sided print or in 
8147 \emph on
8148 article (koma-script)
8149 \emph default
8150 .
8151 \end_layout
8152
8153 \begin_layout Itemize
8154
8155 \family sans
8156 Extratitle
8157 \family default
8158 : produces a special 
8159 \begin_inset Quotes eld
8160 \end_inset
8161
8162 dirty
8163 \begin_inset Quotes erd
8164 \end_inset
8165
8166  page ahead of the actual document containing a paragraph without special
8167  formatting.
8168 \end_layout
8169
8170 \begin_layout Standard
8171 The layout files for the document classes 
8172 \emph on
8173 article (koma-script)
8174 \emph default
8175
8176 \emph on
8177 report (koma-script)
8178 \emph default
8179 , and 
8180 \emph on
8181 book (koma-script)
8182 \emph default
8183  do include the file 
8184 \family typewriter
8185 scrmacros.inc
8186 \family default
8187 .
8188  This is thought of as a place to define your own types.
8189  Copy s
8190 \family typewriter
8191 crmacros.inc
8192 \family default
8193  in your personal layout directory and edit the file!
8194 \end_layout
8195
8196 \begin_layout Subsection
8197 letter (koma-script)
8198 \end_layout
8199
8200 \begin_layout Standard
8201 \begin_inset ERT
8202 status open
8203
8204 \begin_layout Plain Layout
8205
8206
8207 \backslash
8208 begin{sloppypar}
8209 \end_layout
8210
8211 \end_inset
8212
8213
8214 \end_layout
8215
8216 \begin_layout Standard
8217 \noindent
8218 The document class 
8219 \emph on
8220 letter (koma-script)
8221 \emph default
8222  is implemented in the layout file 
8223 \family typewriter
8224 scrlettr.layout
8225 \family default
8226 .
8227  It contains all the paragraph types of the corresponding standard document
8228  class 
8229 \emph on
8230 letter
8231 \emph default
8232 , partly modified, with the exception of the LyX specific types 
8233 \family sans
8234 LyX-Code
8235 \family default
8236  and 
8237 \family sans
8238 Comment
8239 \family default
8240  and the 
8241 \family sans
8242 List
8243 \family default
8244  type, which is replaced by the new 
8245 \family sans
8246 Labeling
8247 \family default
8248  type.
8249  In addition, it contains, in contrast to the standard document class, the
8250  standard types 
8251 \family sans
8252 LaTeX
8253 \family default
8254
8255 \family sans
8256 Quotation
8257 \family default
8258
8259 \family sans
8260 Quote
8261 \family default
8262 , and 
8263 \family sans
8264 Verse
8265 \family default
8266 .
8267  Furthermore, there are a number of new letter specific types.
8268 \end_layout
8269
8270 \begin_layout Standard
8271 \begin_inset ERT
8272 status open
8273
8274 \begin_layout Plain Layout
8275
8276
8277 \backslash
8278 end{sloppypar}
8279 \end_layout
8280
8281 \end_inset
8282
8283
8284 \end_layout
8285
8286 \begin_layout Standard
8287 The appearance of the letter produced by this document class can be controlled
8288  by a number of LaTeX commands, which you can put in the LaTeX preamble.
8289 \begin_inset Foot
8290 status collapsed
8291
8292 \begin_layout Plain Layout
8293 For example, the standard appearance of the letter`s heading, consisting
8294  of name and address, is quite self-willed.
8295  An 
8296 \begin_inset Quotes eld
8297 \end_inset
8298
8299 ordinary
8300 \begin_inset Quotes erd
8301 \end_inset
8302
8303  heading is produced by the following LaTeX commands in the preamble:
8304 \end_layout
8305
8306 \begin_layout LyX-Code
8307
8308 \backslash
8309 firsthead{
8310 \backslash
8311 parbox[b]{
8312 \backslash
8313 textwidth}
8314 \end_layout
8315
8316 \begin_layout LyX-Code
8317   {
8318 \backslash
8319 ignorespaces 
8320 \backslash
8321 fromname
8322 \backslash
8323
8324 \backslash
8325  
8326 \backslash
8327 ignorespaces 
8328 \backslash
8329 fromaddress}} 
8330 \end_layout
8331
8332 \begin_layout LyX-Code
8333
8334 \backslash
8335 nexthead{
8336 \backslash
8337 parbox[b]{
8338 \backslash
8339 textwidth}
8340 \end_layout
8341
8342 \begin_layout LyX-Code
8343   {
8344 \backslash
8345 ignorespaces 
8346 \backslash
8347 fromname 
8348 \backslash
8349 hfill 
8350 \backslash
8351 ignorespaces 
8352 \backslash
8353 pagename
8354 \backslash
8355  
8356 \backslash
8357 thepage}}
8358 \end_layout
8359
8360 \end_inset
8361
8362  A detailed German description of such LaTeX commands can be found in the
8363  Koma-Script documentation 
8364 \emph on
8365 scrguide
8366 \emph default
8367 .
8368  With it, the letter's author can produce his personal letter layout.
8369 \end_layout
8370
8371 \begin_layout Standard
8372 The types 
8373 \family sans
8374 Letter
8375 \family default
8376  and 
8377 \family sans
8378 Opening
8379 \family default
8380  define the beginning of the letter and must be used in every letter.
8381  To emphasize them in the LyX document class, they are marked with the letter
8382  
8383 \shape italic
8384 L
8385 \shape default
8386  or 
8387 \shape italic
8388 O
8389 \shape default
8390 , resp.
8391 \begin_inset space ~
8392 \end_inset
8393
8394 in the left margin.
8395  It is possible to write any number of letters in one file.
8396  An 
8397 \family sans
8398 Opening
8399 \family default
8400  type produces a new letter using the same addressee and a 
8401 \family sans
8402 Letter
8403 \family default
8404  type produces a new addressee.
8405  The types 
8406 \family sans
8407 Closing
8408 \family default
8409
8410 \family sans
8411 PS
8412 \family default
8413
8414 \family sans
8415 CC
8416 \family default
8417 , and 
8418 \family sans
8419 Encl
8420 \family default
8421  are ordinary paragraph types and can also be used several times in one
8422  and the same letter.
8423 \end_layout
8424
8425 \begin_layout Itemize
8426
8427 \family sans
8428 Letter
8429 \family default
8430 : produces a paragraph for the addressee and implicitly defines the beginning
8431  of the letter.
8432 \end_layout
8433
8434 \begin_layout Itemize
8435
8436 \family sans
8437 Opening
8438 \family default
8439 : produces a paragraph for the form of address and implicitly produces a
8440  new letter.
8441 \end_layout
8442
8443 \begin_layout Itemize
8444
8445 \family sans
8446 Closing
8447 \family default
8448 : produces a paragraph for a close.
8449 \end_layout
8450
8451 \begin_layout Itemize
8452
8453 \family sans
8454 PS
8455 \family default
8456 : produces a paragraph for a postscript.
8457 \end_layout
8458
8459 \begin_layout Itemize
8460
8461 \family sans
8462 CC
8463 \family default
8464 : produces a paragraph for a distribution list.
8465 \end_layout
8466
8467 \begin_layout Itemize
8468
8469 \family sans
8470 Encl
8471 \family default
8472 : produces a paragraph for enclosures.
8473 \end_layout
8474
8475 \begin_layout Standard
8476 The types 
8477 \family sans
8478 Name
8479 \family default
8480
8481 \family sans
8482 Signature
8483 \family default
8484
8485 \family sans
8486 Address
8487 \family default
8488
8489 \family sans
8490 Telephone
8491 \family default
8492
8493 \family sans
8494 Place
8495 \family default
8496
8497 \family sans
8498 Backaddress
8499 \family default
8500
8501 \family sans
8502 Specialmail
8503 \family default
8504
8505 \family sans
8506 Location
8507 \family default
8508
8509 \family sans
8510 Title
8511 \family default
8512 , and 
8513 \family sans
8514 Subject
8515 \family default
8516  are input types provided with a label to enter information, which will
8517  be processed by the document class.
8518 \begin_inset Foot
8519 status open
8520
8521 \begin_layout Plain Layout
8522 It could be seen as a matter of inconsequence, that the types 
8523 \family sans
8524 Letter
8525 \family default
8526  and 
8527 \family sans
8528 Opening
8529 \family default
8530  described above are not such input types as well.
8531  Because of the special meaning of those types, however, I have implemented
8532  them as ordinary paragraph types with a one letter mark in the left margin.
8533  Moreover, it would affect my feeling of symmetry, if the 
8534 \family sans
8535 Opening
8536 \family default
8537  type and the 
8538 \family sans
8539 Closing
8540 \family default
8541  type had such a serious different appearance.
8542 \end_layout
8543
8544 \end_inset
8545
8546  The types must be used ahead of the corresponding 
8547 \family sans
8548 Opening
8549 \family default
8550  type.
8551 \end_layout
8552
8553 \begin_layout Standard
8554 An implementation of these types in a WYSIWYG fashion does not seem to make
8555  sense, because the real appearance of the produced letter does not only
8556  depend on the usage of the particular type, but also on other factors.
8557  For example, a signature entered in the 
8558 \family sans
8559 Signature
8560 \family default
8561  type will in the standard behavior appear in the produced letter only,
8562  when in the same letter also a 
8563 \family sans
8564 Closing
8565 \family default
8566  type is used.
8567  The entered value of the 
8568 \family sans
8569 Telephone
8570 \family default
8571  type will in the standard behavior not appear in the produced letter at
8572  all.
8573  The possibility to design the letter`s heading freely is already indicated
8574  in a footnote above.
8575 \end_layout
8576
8577 \begin_layout Standard
8578 The input types can also be used as empty paragraphs.
8579  This makes sense e.
8580 \begin_inset space \thinspace{}
8581 \end_inset
8582
8583 g.
8584 \begin_inset space ~
8585 \end_inset
8586
8587 for the 
8588 \family sans
8589 Signature
8590 \family default
8591  type.
8592  If the 
8593 \family sans
8594 Signature
8595 \family default
8596  type is not used at all, in the standard behavior the value of the 
8597 \family sans
8598 Name
8599 \family default
8600  type is used as signature, whereas if an empty 
8601 \family sans
8602 Signature
8603 \family default
8604  type is used, no signature value is defined.
8605 \end_layout
8606
8607 \begin_layout Standard
8608 By using the input types it is possible to write a letter template, containing
8609  filled input types with your personal dates (name, address, etc.) and empty
8610  input types for other dates you want to enter.
8611 \end_layout
8612
8613 \begin_layout Itemize
8614
8615 \family sans
8616 Name
8617 \family default
8618 : sender's name, in the standard behavior appears as a centered paragraph
8619  in small caps in the letter`s heading.
8620 \end_layout
8621
8622 \begin_layout Itemize
8623
8624 \family sans
8625 Signature
8626 \family default
8627 : sender's signature, in the standard behavior appears below the 
8628 \family sans
8629 Closing
8630 \family default
8631  type.
8632  If no 
8633 \family sans
8634 Signature
8635 \family default
8636  type is used, the value of the 
8637 \family sans
8638 Name
8639 \family default
8640  type appears instead.
8641 \end_layout
8642
8643 \begin_layout Itemize
8644
8645 \family sans
8646 Address
8647 \family default
8648 : sender's address, in the standard behavior appears in a centered paragraph
8649  in the letter`s heading below the sender's name.
8650 \end_layout
8651
8652 \begin_layout Itemize
8653
8654 \family sans
8655 Telephone
8656 \family default
8657 : sender's telephone number, in the standard behavior only sets the LaTeX
8658  variable 
8659 \family typewriter
8660
8661 \backslash
8662 telephonenum
8663 \family default
8664 .
8665 \end_layout
8666
8667 \begin_layout Itemize
8668
8669 \family sans
8670 Place
8671 \family default
8672 : place of the letter`s making.
8673 \end_layout
8674
8675 \begin_layout Itemize
8676
8677 \family sans
8678 Date
8679 \family default
8680 : date of the letter`s making.
8681  
8682 \family sans
8683 Place
8684 \family default
8685  and 
8686 \family sans
8687 Date
8688 \family default
8689 , in the standard behavior, produce the place and the date in a right-aligned
8690  line below the addressee's field.
8691  If an empty 
8692 \family sans
8693 Date
8694 \family default
8695  type is used, neither place nor date appear, independent of the value of
8696  the 
8697 \family sans
8698 Place
8699 \family default
8700  type.
8701  If no 
8702 \family sans
8703 Date
8704 \family default
8705  type is used, the date of the letter `s production is used.
8706 \end_layout
8707
8708 \begin_layout Itemize
8709
8710 \family sans
8711 Backaddress
8712 \family default
8713 : sender`s back address, in the standard behavior appears above the addressee's
8714  field in a small sans serif font.
8715 \end_layout
8716
8717 \begin_layout Itemize
8718
8719 \family sans
8720 Specialmail
8721 \family default
8722 : special mail information, in the standard behavior appears underlined
8723  above the addressee's field below the back address.
8724 \end_layout
8725
8726 \begin_layout Itemize
8727
8728 \family sans
8729 Location
8730 \family default
8731 : additional information, in the standard behavior appears on right side
8732  below the addressee`s field.
8733 \end_layout
8734
8735 \begin_layout Itemize
8736
8737 \family sans
8738 Title
8739 \family default
8740 : the letter's title, in the standard behavior appears in a big, bold, sans
8741  serif font above the subject.
8742 \end_layout
8743
8744 \begin_layout Itemize
8745
8746 \family sans
8747 Subject
8748 \family default
8749 : the letter's subject, in the standard behavior appears in a bold font
8750  above the 
8751 \family sans
8752 Opening
8753 \family default
8754  paragraph.
8755 \end_layout
8756
8757 \begin_layout Standard
8758 The types 
8759 \family sans
8760 Yourref
8761 \family default
8762
8763 \family sans
8764 Yourmail
8765 \family default
8766
8767 \family sans
8768 Myref
8769 \family default
8770
8771 \family sans
8772 Customer
8773 \family default
8774 , and 
8775 \family sans
8776 Invoice
8777 \family default
8778  produce a business letter like line above the 
8779 \family sans
8780 Title
8781 \family default
8782  line containing the fields 
8783 \begin_inset Quotes eld
8784 \end_inset
8785
8786 Your ref.
8787 \begin_inset Quotes erd
8788 \end_inset
8789
8790
8791 \begin_inset Quotes eld
8792 \end_inset
8793
8794 Your letter of
8795 \begin_inset Quotes erd
8796 \end_inset
8797
8798
8799 \begin_inset Quotes eld
8800 \end_inset
8801
8802 Our ref.
8803 \begin_inset Quotes erd
8804 \end_inset
8805
8806
8807 \begin_inset Quotes eld
8808 \end_inset
8809
8810 Customer no.
8811 \begin_inset Quotes erd
8812 \end_inset
8813
8814
8815 \begin_inset Quotes eld
8816 \end_inset
8817
8818 Invoice no.
8819 \begin_inset Quotes erd
8820 \end_inset
8821
8822 , and 
8823 \begin_inset Quotes eld
8824 \end_inset
8825
8826 Date
8827 \begin_inset Quotes erd
8828 \end_inset
8829
8830 .
8831  For the date field, the value of the 
8832 \family sans
8833 Date
8834 \family default
8835  type is used.
8836  If one of these 
8837 \begin_inset Quotes eld
8838 \end_inset
8839
8840 business letter types
8841 \begin_inset Quotes erd
8842 \end_inset
8843
8844  is used, the value of the 
8845 \family sans
8846 Place
8847 \family default
8848  type however does not appear, but only the LaTeX variable 
8849 \family typewriter
8850
8851 \backslash
8852 fromplace
8853 \family default
8854  is set.
8855  The ordinary output of place and date in a right-aligned line below the
8856  addressee`s field is suppressed.
8857  The types are implemented as input types provided with a label and must
8858  be used ahead of the corresponding 
8859 \family sans
8860 Opening
8861 \family default
8862  type.
8863 \end_layout
8864
8865 \begin_layout Itemize
8866
8867 \family sans
8868 Yourref
8869 \family default
8870 : Your ref.
8871 \end_layout
8872
8873 \begin_layout Itemize
8874
8875 \family sans
8876 Yourmail
8877 \family default
8878 : Your letter of.
8879 \end_layout
8880
8881 \begin_layout Itemize
8882
8883 \family sans
8884 Myref
8885 \family default
8886 : Our ref.
8887 \end_layout
8888
8889 \begin_layout Itemize
8890
8891 \family sans
8892 Customer
8893 \family default
8894 : Customer no.
8895 \end_layout
8896
8897 \begin_layout Itemize
8898
8899 \family sans
8900 Invoice
8901 \family default
8902 : Invoice no.
8903 \end_layout
8904
8905 \begin_layout Subsection
8906 The new letter class: letter (koma-script v.2)
8907 \end_layout
8908
8909 \begin_layout Standard
8910 by 
8911 \noun on
8912 Jürgen Spitzmüller
8913 \end_layout
8914
8915 \begin_layout Standard
8916 \begin_inset VSpace medskip
8917 \end_inset
8918
8919
8920 \end_layout
8921
8922 \begin_layout Standard
8923 \noindent
8924 Koma-Script version 2.8 has introduced a new letter class 
8925 \family typewriter
8926 scrlttr2
8927 \family default
8928  which supersedes the now unsupported 
8929 \family typewriter
8930 scrlettr
8931 \family default
8932 .
8933  It has --- on the LaTeX side --- a completely new interface and is not
8934  compatible with the old class.
8935  Therefore, LyX supports both, though it is recommended to use the new class.
8936 \end_layout
8937
8938 \begin_layout Standard
8939 This class covers the same functionality as 
8940 \emph on
8941 letter (koma-script),
8942 \emph default
8943  and a few more.
8944  The basic items are 
8945 \family sans
8946 Address
8947 \family default
8948  (receiver's address, same as 
8949 \family sans
8950 Letter
8951 \family default
8952  in the old layout), 
8953 \family sans
8954 Opening
8955 \family default
8956 , and 
8957 \family sans
8958 Closing
8959 \family default
8960 .
8961  
8962 \family sans
8963 NextAddress
8964 \family default
8965  will start a new letter (i.
8966 \begin_inset space \thinspace{}
8967 \end_inset
8968
8969 e.
8970 \begin_inset space ~
8971 \end_inset
8972
8973 you can write several letters per document).
8974  New elements are sender's 
8975 \family sans
8976 E-Mail
8977 \family default
8978
8979 \family sans
8980 URL
8981 \family default
8982
8983 \family sans
8984 Fax
8985 \family default
8986
8987 \family sans
8988 Bank
8989 \family default
8990  and the possibility to use a 
8991 \family sans
8992 Logo
8993 \family default
8994  (via 
8995 \family sans
8996 \bar under
8997 I
8998 \bar default
8999 nsert\SpecialChar \menuseparator
9000
9001 \bar under
9002 G
9003 \bar default
9004 raphics
9005 \family default
9006 ) in the header.
9007 \end_layout
9008
9009 \begin_layout Standard
9010 The biggest improvement is, though, that the letter's layout is configurable
9011  at almost any needs.
9012  This can be done via the preamble or with a special style file (Letter
9013  Class Option, extension 
9014 \family typewriter
9015 *.lco
9016 \family default
9017 ), that will be read in as a class option.
9018 \begin_inset Foot
9019 status collapsed
9020
9021 \begin_layout Plain Layout
9022 The KOMA package comes with some default 
9023 \family typewriter
9024 *.lco
9025 \family default
9026  files.
9027  There is, for instance, a 
9028 \family typewriter
9029 DIN.lco
9030 \family default
9031  file that follows german typesetting rules, or a 
9032 \family typewriter
9033 KOMAold.lco
9034 \family default
9035  that provides the default layout of the old 
9036 \family typewriter
9037 scrlettr
9038 \family default
9039  class.
9040  The latter can be loaded with the class option 
9041 \family typewriter
9042 KOMAold
9043 \family default
9044 , inserted via the 
9045 \family sans
9046 \bar under
9047 L
9048 \bar default
9049 ayout\SpecialChar \menuseparator
9050
9051 \bar under
9052 D
9053 \bar default
9054 ocument\SpecialChar \menuseparator
9055 Extra Options
9056 \family default
9057  field.
9058 \end_layout
9059
9060 \end_inset
9061
9062  Have a look at the 
9063 \emph on
9064 koma-letter2
9065 \emph default
9066  template that is included in LyX for examples.
9067  A detailed description is to be found in the Koma-Script documentation
9068  (
9069 \emph on
9070 scrguide
9071 \emph default
9072 ).
9073 \end_layout
9074
9075 \begin_layout Subsection
9076 Problems
9077 \end_layout
9078
9079 \begin_layout Standard
9080 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
9081  some problems.
9082 \end_layout
9083
9084 \begin_layout Itemize
9085 The chapter number of a 
9086 \family sans
9087 Chapter
9088 \family default
9089  type appears on a line of its own above the chapter heading instead of
9090  appearing in the same line ahead of it.
9091  The cause for that is the LyX internal behavior for the labeltype 
9092 \family sans
9093 Counter_Chapter
9094 \family default
9095  in the layout file.
9096 \end_layout
9097
9098 \begin_layout Itemize
9099 The headings of the types 
9100 \family sans
9101 Addchap
9102 \family default
9103  and 
9104 \family sans
9105 Addsec
9106 \family default
9107  are only put in the 
9108 \begin_inset Quotes eld
9109 \end_inset
9110
9111 true
9112 \begin_inset Quotes erd
9113 \end_inset
9114
9115  LaTeX table of contents, but not in the LyX table of contents (
9116 \family sans
9117 \bar under
9118 D
9119 \bar default
9120 ocument\SpecialChar \menuseparator
9121
9122 \bar under
9123 T
9124 \bar default
9125 able
9126 \begin_inset space ~
9127 \end_inset
9128
9129 of
9130 \begin_inset space ~
9131 \end_inset
9132
9133 Contents
9134 \family default
9135 ).
9136 \end_layout
9137
9138 \begin_layout Itemize
9139 The paragraphs in a 
9140 \emph on
9141 letter
9142 \emph default
9143  document class appear in a skip separation mode, not indented.
9144  This is the standard behavior, no special LaTeX commands are needed for
9145  that.
9146  But in the 
9147 \family sans
9148 \bar under
9149 D
9150 \bar default
9151 ocument\SpecialChar \menuseparator
9152
9153 \bar under
9154 S
9155 \bar default
9156 ettings
9157 \family default
9158  dialog the corresponding radio button indicates 
9159 \family sans
9160 \bar under
9161 I
9162 \bar default
9163 ndent
9164 \family default
9165 .
9166  A 
9167 \family sans
9168 S
9169 \bar under
9170 k
9171 \bar default
9172 ip
9173 \family default
9174  value always has the effect that extra LaTeX commands are inserted in the
9175  document to produce the gap, which is not what is wanted in this case.
9176 \end_layout
9177
9178 \begin_layout Section
9179 Springer Journals (
9180 \family sans
9181 svjour
9182 \family default
9183 )
9184 \end_layout
9185
9186 \begin_layout Standard
9187 by 
9188 \noun on
9189 Martin Vermeer
9190 \end_layout
9191
9192 \begin_layout Subsection
9193 Description
9194 \end_layout
9195
9196 \begin_layout Standard
9197 These are the layout files for some of the journal formats used by Springer
9198  Verlag and listed on 
9199 \begin_inset Flex URL
9200 status collapsed
9201
9202 \begin_layout Plain Layout
9203
9204 http://www.springer.de/author/tex/help-journals.html
9205 \end_layout
9206
9207 \end_inset
9208
9209 , where you should also go to fetch the class files (yes, these are LaTeX2e
9210  now!).
9211  It is a modular system: the things common to all journals are implemented
9212  in 
9213 \family typewriter
9214 svjour.inc
9215 \family default
9216 , which journal-specific layout files (such as, e.
9217 \begin_inset space \thinspace{}
9218 \end_inset
9219
9220 g., 
9221 \family typewriter
9222 svjog.layout
9223 \family default
9224  for Journal of Geodesy) can include.
9225 \end_layout
9226
9227 \begin_layout Standard
9228 This means that implementing support for any other Springer journal on this
9229  list is as simple as writing your own 
9230 \family typewriter
9231 sv
9232 \family default
9233 <myjournal>
9234 \family typewriter
9235 .layout
9236 \family default
9237  file following the outline given in 
9238 \family typewriter
9239 svjog.layout
9240 \family default
9241 .
9242  
9243 \end_layout
9244
9245 \begin_layout Standard
9246 It is reasonably well tested only for the Journal of Geodesy.
9247  
9248 \family typewriter
9249 svjour
9250 \family default
9251  and 
9252 \family typewriter
9253 svjog
9254 \family default
9255  come with the standard LyX distribution.
9256  Install the relevant class file (downloaded from Springer) in a proper
9257  directory, reconfigure LaTeX (in the teTeX case by running 
9258 \family typewriter
9259 texhash
9260 \family default
9261 , as root if necessary --- doesn't LyX take care of this?), reconfigure
9262  LyX and it should work.
9263 \end_layout
9264
9265 \begin_layout Subsection
9266 New styles
9267 \end_layout
9268
9269 \begin_layout Standard
9270 A large number of theorem-like styles --- 
9271 \family sans
9272 Claim, Conjecture,
9273 \family default
9274  
9275 \family sans
9276 \SpecialChar \ldots{}
9277 Theorem
9278 \family default
9279 .
9280 \end_layout
9281
9282 \begin_layout Standard
9283
9284 \family sans
9285 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
9286  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
9287 \family default
9288 .
9289  See the Springer class file documentation for details.
9290 \end_layout
9291
9292 \begin_layout Subsection
9293 Supported journals
9294 \end_layout
9295
9296 \begin_layout Itemize
9297
9298 \emph on
9299 Journal of Geodesy
9300 \emph default
9301
9302 \family typewriter
9303 svjog.layout
9304 \family default
9305  --- Martin Vermeer
9306 \end_layout
9307
9308 \begin_layout Itemize
9309
9310 \emph on
9311 Probability Theory and Related Fields
9312 \emph default
9313
9314 \family typewriter
9315 svprobth.layout
9316 \family default
9317  --- Jean-Marc Lasgouttes
9318 \end_layout
9319
9320 \begin_layout Standard
9321 Add your own, it isn't so hard!
9322 \end_layout
9323
9324 \begin_layout Subsection
9325 Credits
9326 \end_layout
9327
9328 \begin_layout Standard
9329 These files are partly based on the older 
9330 \family typewriter
9331 ejour2.layout
9332 \family default
9333 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
9334  file from Springer.
9335  All this, and the 
9336 \family typewriter
9337 ejour2
9338 \family default
9339  layout, are now defunct.
9340  Jean-Marc Lasgouttes helped out big in making me find my way around the
9341  LyX layout file mechanism.
9342 \end_layout
9343
9344 \begin_layout Subsection
9345 Bugs
9346 \end_layout
9347
9348 \begin_layout Standard
9349 Probably.
9350  But probably less than in the old hacked-LaTeX 
9351 \family typewriter
9352 ejour2
9353 \family default
9354 .
9355 \end_layout
9356
9357 \begin_layout Standard
9358 Limitations e.
9359 \begin_inset space \thinspace{}
9360 \end_inset
9361
9362 g.: does not display the number for theorem-like layouts, just #.
9363 \end_layout
9364
9365 \begin_layout Section
9366 AGU journals (
9367 \family sans
9368 aguplus
9369 \family default
9370 )
9371 \end_layout
9372
9373 \begin_layout Standard
9374 by 
9375 \shape smallcaps
9376 Martin Vermeer
9377 \end_layout
9378
9379 \begin_layout Subsection
9380 Description
9381 \end_layout
9382
9383 \begin_layout Standard
9384 These are the layout files for some of the journals of the American Geophysical
9385  Society.
9386  It is assumed that you have both the AGU's own class files and AGUplus
9387  installed (everything to be found at
9388 \begin_inset Flex URL
9389 status collapsed
9390
9391 \begin_layout Plain Layout
9392
9393 ftp://ftp.agu.org/journals/latex/journals
9394 \end_layout
9395
9396 \end_inset
9397
9398 ).
9399 \end_layout
9400
9401 \begin_layout Subsection
9402 New styles
9403 \end_layout
9404
9405 \begin_layout Standard
9406 Redefined are 
9407 \family sans
9408 Paragraph
9409 \family default
9410
9411 \family sans
9412 Paragraph*
9413 \family default
9414 .
9415  They are still called this in the LyX GUI, though their LaTeX equivalents
9416  in the AGU classes are 
9417 \family sans
9418 Subsubsubsection
9419 \family default
9420  and 
9421 \family sans
9422 Subsubsubsection*
9423 \family default
9424 .
9425 \end_layout
9426
9427 \begin_layout Standard
9428 Newly defined styles are 
9429 \family sans
9430 Left_Header
9431 \family default
9432
9433 \family sans
9434 Right_Header
9435 \family default
9436
9437 \family sans
9438 Received
9439 \family default
9440
9441 \family sans
9442 Revised
9443 \family default
9444
9445 \family sans
9446 Accepted
9447 \family default
9448
9449 \family sans
9450 CCC
9451 \family default
9452
9453 \family sans
9454 PaperId
9455 \family default
9456
9457 \family sans
9458 AuthorAddr
9459 \family default
9460
9461 \family sans
9462 SlugComment
9463 \family default
9464 .
9465  These are mostly manuscript attributes and defined in the AGU class documentati
9466 on.
9467 \end_layout
9468
9469 \begin_layout Standard
9470 I suspect this is still badly incomplete.
9471 \end_layout
9472
9473 \begin_layout Subsection
9474 New floats
9475 \end_layout
9476
9477 \begin_layout Standard
9478
9479 \family sans
9480 Planotable
9481 \family default
9482  and 
9483 \family sans
9484 Plate
9485 \family default
9486 .
9487  We also have a new 
9488 \family sans
9489 Table_Caption
9490 \family default
9491 .
9492 \end_layout
9493
9494 \begin_layout Subsection
9495 Supported journals
9496 \end_layout
9497
9498 \begin_layout Itemize
9499
9500 \emph on
9501 Journal of Geophysical Research
9502 \emph default
9503
9504 \family typewriter
9505 jgrga.layout
9506 \family default
9507  --- Martin Vermeer
9508 \end_layout
9509
9510 \begin_layout Standard
9511 Add your own, it isn't so hard! Look at the 
9512 \family typewriter
9513 jgrga.layout
9514 \family default
9515  example and 
9516 \family typewriter
9517 aguplus.inc
9518 \family default
9519 .
9520 \end_layout
9521
9522 \begin_layout Subsection
9523 Bugs and things to remember
9524 \end_layout
9525
9526 \begin_layout Standard
9527 In order to use the new layouts, you must remember to do the following for
9528  a new document:
9529 \end_layout
9530
9531 \begin_layout Enumerate
9532
9533 \emph on
9534 Turn off babel
9535 \emph default
9536 .
9537  This can be done in the 
9538 \family sans
9539 layout\SpecialChar \menuseparator
9540 document
9541 \family default
9542  or 
9543 \family sans
9544 document\SpecialChar \menuseparator
9545 settings
9546 \family default
9547  menu item.
9548  (AGU articles are always in English, right? So 
9549 \emph on
9550 don't
9551 \emph default
9552  choose a language.)
9553 \end_layout
9554
9555 \begin_layout Enumerate
9556 Enter 
9557 \family typewriter
9558 jgrga
9559 \family default
9560  into the document's 
9561 \family sans
9562 Extra Options
9563 \family default
9564  field.
9565  (Yes, this is a bug.)
9566 \end_layout
9567
9568 \begin_layout Enumerate
9569 Make sure you use the 
9570 \family typewriter
9571 agu.bst
9572 \family default
9573  bibliography style, by entering 
9574 \family sans
9575 agu
9576 \family default
9577  into the second field of the BibTeX inset.
9578  None of the standard styles will do.
9579 \end_layout
9580
9581 \begin_layout Section
9582 EGS journals (
9583 \family sans
9584 egs
9585 \family default
9586 )
9587 \end_layout
9588
9589 \begin_layout Standard
9590 by 
9591 \shape smallcaps
9592 Martin Vermeer
9593 \end_layout
9594
9595 \begin_layout Subsection
9596 Description
9597 \end_layout
9598
9599 \begin_layout Standard
9600 This is the layout file for the European Geophysical Society journals.
9601  The needed 
9602 \family typewriter
9603 egs.cls
9604 \family default
9605  can be downloaded from the web site of the EGS under 
9606 \begin_inset Flex URL
9607 status collapsed
9608
9609 \begin_layout Plain Layout
9610
9611 www.copernicus.org
9612 \end_layout
9613
9614 \end_inset
9615
9616 .
9617 \end_layout
9618
9619 \begin_layout Subsection
9620 New styles
9621 \end_layout
9622
9623 \begin_layout Standard
9624
9625 \family sans
9626 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9627  Accepted
9628 \family default
9629
9630 \family sans
9631 Offsets
9632 \family default
9633 .
9634  The current layout file is unfortunately very unmodular and would benefit
9635  from using the various 
9636 \family typewriter
9637 std*.inc
9638 \family default
9639  file inclusions.
9640 \end_layout
9641
9642 \begin_layout Section
9643 Slides [aka 
9644 \noun on
9645 Sli
9646 \noun default
9647 TeX]
9648 \begin_inset CommandInset label
9649 LatexCommand label
9650 name "sec:slitex"
9651
9652 \end_inset
9653
9654
9655 \end_layout
9656
9657 \begin_layout Standard
9658 by 
9659 \noun on
9660 John Weiss
9661 \noun default
9662  
9663 \end_layout
9664
9665 \begin_layout Subsection
9666 Introduction
9667 \end_layout
9668
9669 \begin_layout Standard
9670 This section describes how to use LyX to make slides for overhead projectors.
9671  There are two document classes that can do this: the default slides class
9672  and the 
9673 \family sans
9674 Foil
9675 \family default
9676 TeX slides class.
9677  This section documents the former.
9678 \end_layout
9679
9680 \begin_layout Standard
9681 I'm going to say this again, nice and clear, so that there's no misunderstanding
9682 :
9683 \end_layout
9684
9685 \begin_layout Standard
9686 \begin_inset VSpace bigskip
9687 \end_inset
9688
9689
9690 \end_layout
9691
9692 \begin_layout Standard
9693 \align center
9694
9695 \size large
9696 This section documents the class 
9697 \begin_inset Quotes eld
9698 \end_inset
9699
9700
9701 \family sans
9702 slides (default)
9703 \family default
9704
9705 \begin_inset Quotes erd
9706 \end_inset
9707
9708  
9709 \emph on
9710 only.
9711 \end_layout
9712
9713 \begin_layout Standard
9714 \begin_inset VSpace bigskip
9715 \end_inset
9716
9717
9718 \end_layout
9719
9720 \begin_layout Standard
9721 If you're looking for the documentation for 
9722 \begin_inset Quotes eld
9723 \end_inset
9724
9725
9726 \family sans
9727 slides (FoilTeX)
9728 \family default
9729
9730 \begin_inset Quotes erd
9731 \end_inset
9732
9733 , check out section
9734 \begin_inset space ~
9735 \end_inset
9736
9737
9738 \begin_inset CommandInset ref
9739 LatexCommand ref
9740 reference "sec:foiltex"
9741
9742 \end_inset
9743
9744 .
9745  The 
9746 \family sans
9747 foils
9748 \family default
9749  class [
9750 \begin_inset Quotes eld
9751 \end_inset
9752
9753
9754 \family sans
9755 slides (FoilTeX)
9756 \family default
9757
9758 \begin_inset Quotes erd
9759 \end_inset
9760
9761 ] is actually somewhat better than the default 
9762 \family sans
9763 slides
9764 \family default
9765  class,
9766 \begin_inset Foot
9767 status collapsed
9768
9769 \begin_layout Plain Layout
9770 \SpecialChar \ldots{}
9771 or so I've been told repeatedly by its advocates.
9772  Having never used it, I have no idea if this claim is true or not.
9773 \end_layout
9774
9775 \end_inset
9776
9777  which this section documents.
9778 \end_layout
9779
9780 \begin_layout Standard
9781 This class is the LaTeX2e improvement of the old 
9782 \noun on
9783 Sli
9784 \noun default
9785 TeX package.
9786  Every LaTeX2e distribution includes this class [which I'll just refer to
9787  as 
9788 \begin_inset Quotes eld
9789 \end_inset
9790
9791
9792 \family sans
9793 slides
9794 \family default
9795
9796 \begin_inset Quotes erd
9797 \end_inset
9798
9799  from now on], so you're bound to have it.
9800  As I noted earlier, there are other classes, such as 
9801 \family sans
9802 foils
9803 \family default
9804 , which also produce slides for overhead projectors and do a better job
9805  at it.
9806  However, there are some things which 
9807 \family sans
9808 slides
9809 \family default
9810  can do which the others can't, such as generate overlays.
9811  Read on to learn more!
9812 \end_layout
9813
9814 \begin_layout Subsection
9815 Getting Started
9816 \begin_inset CommandInset label
9817 LatexCommand label
9818 name "sec:slidesetup"
9819
9820 \end_inset
9821
9822
9823 \end_layout
9824
9825 \begin_layout Standard
9826 Obviously, to use this document class, you need to select 
9827 \begin_inset Quotes eld
9828 \end_inset
9829
9830
9831 \family sans
9832 slides (default)
9833 \family default
9834
9835 \begin_inset Quotes erd
9836 \end_inset
9837
9838  from the class list in the 
9839 \family sans
9840 \bar under
9841 D
9842 \bar default
9843 ocument\SpecialChar \menuseparator
9844
9845 \bar under
9846 S
9847 \bar default
9848 ettings
9849 \family default
9850  dialog.
9851  There are some other special things you should know about this class:
9852 \end_layout
9853
9854 \begin_layout Itemize
9855 Don't bother changing the options 
9856 \family sans
9857 Sides and Columns
9858 \family default
9859 .
9860  They're not supported by the 
9861 \family sans
9862 slides
9863 \family default
9864  class, anyways.
9865 \end_layout
9866
9867 \begin_layout Itemize
9868 The option 
9869 \family sans
9870 \bar under
9871 P
9872 \bar default
9873 age
9874 \begin_inset space ~
9875 \end_inset
9876
9877 style
9878 \family default
9879  behaves a bit differently for this class.
9880  The possible choices and what they do are as follows:
9881 \end_layout
9882
9883 \begin_deeper
9884 \begin_layout Description
9885
9886 \family sans
9887 plain
9888 \family default
9889  The final output contains page numbers in the lower right corner.
9890 \end_layout
9891
9892 \begin_layout Description
9893
9894 \family sans
9895 headings
9896 \family default
9897  Like 
9898 \family sans
9899 plain
9900 \family default
9901 , but also prints out any time markers you've put in.
9902  This is the default.
9903 \end_layout
9904
9905 \begin_layout Description
9906
9907 \family sans
9908 empty
9909 \family default
9910  The final output contains no page numbers, time markers, or alignment markers.
9911 \end_layout
9912
9913 \end_deeper
9914 \begin_layout Itemize
9915 The 
9916 \family sans
9917 slides
9918 \family default
9919  class has an extra option: 
9920 \family typewriter
9921 clock
9922 \family default
9923 .
9924  To use it, put 
9925 \begin_inset Quotes eld
9926 \end_inset
9927
9928
9929 \family typewriter
9930 clock
9931 \family default
9932
9933 \begin_inset Quotes erd
9934 \end_inset
9935
9936  in the extra class options.
9937 \end_layout
9938
9939 \begin_deeper
9940 \begin_layout Standard
9941 Using this options allows you to add time markers to 
9942 \family sans
9943 Note
9944 \family default
9945 s.
9946  See section
9947 \begin_inset space ~
9948 \end_inset
9949
9950
9951 \begin_inset CommandInset ref
9952 LatexCommand ref
9953 reference "sec:slideNote"
9954
9955 \end_inset
9956
9957  for more details.
9958 \end_layout
9959
9960 \end_deeper
9961 \begin_layout Standard
9962 You can also use the template file 
9963 \begin_inset Quotes eld
9964 \end_inset
9965
9966
9967 \family typewriter
9968 slides.lyx
9969 \family default
9970
9971 \begin_inset Quotes erd
9972 \end_inset
9973
9974  to automatically set up a document to use the 
9975 \family sans
9976 slides
9977 \family default
9978  class [using 
9979 \family sans
9980 \bar under
9981 F
9982 \bar default
9983 ile\SpecialChar \menuseparator
9984 New
9985 \begin_inset space ~
9986 \end_inset
9987
9988 from
9989 \begin_inset space ~
9990 \end_inset
9991
9992
9993 \bar under
9994 T
9995 \bar default
9996 emplate
9997 \family default
9998  to open your new document].
9999  The template file also contains some examples of the special paragraph
10000  environments used by this class.
10001  I'll describe those next.
10002 \end_layout
10003
10004 \begin_layout Subsection
10005 Paragraph Environments
10006 \end_layout
10007
10008 \begin_layout Subsubsection
10009 Supported Environments
10010 \end_layout
10011
10012 \begin_layout Standard
10013 The first thing you'll notice when you start up a new 
10014 \family sans
10015 slides
10016 \family default
10017  document is the font size and type: it's the equivalent of the size 
10018 \begin_inset Quotes eld
10019 \end_inset
10020
10021
10022 \family sans
10023 Largest
10024 \family default
10025
10026 \begin_inset Quotes erd
10027 \end_inset
10028
10029  in the 
10030 \family sans
10031 Sans
10032 \begin_inset space ~
10033 \end_inset
10034
10035 Serif
10036 \family default
10037  font.
10038  This is also what's used in the output.
10039  Think of this as a 
10040 \begin_inset Quotes eld
10041 \end_inset
10042
10043 visual cue
10044 \begin_inset Quotes erd
10045 \end_inset
10046
10047  to remind you that this is a slide.
10048  Your final slides will use a larger font; ergo, you'll have less space.
10049  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
10050 \end_layout
10051
10052 \begin_layout Standard
10053 The next thing that becomes obvious is the changes to the paragraph environment
10054  pull-down box [at the far-left end of the toolbar].
10055  Most of the paragraph environments you're used to seeing are missing.
10056  There are also five new ones.
10057  That's because the 
10058 \family sans
10059 slides
10060 \family default
10061  class itself only supports certain paragraph environments:
10062 \end_layout
10063
10064 \begin_layout Itemize
10065
10066 \family sans
10067 Standard
10068 \end_layout
10069
10070 \begin_layout Itemize
10071
10072 \family sans
10073 Itemize
10074 \end_layout
10075
10076 \begin_layout Itemize
10077
10078 \family sans
10079 Enumerate
10080 \end_layout
10081
10082 \begin_layout Itemize
10083
10084 \family sans
10085 Description
10086 \end_layout
10087
10088 \begin_layout Itemize
10089
10090 \family sans
10091 List
10092 \end_layout
10093
10094 \begin_layout Itemize
10095
10096 \family sans
10097 Quotation
10098 \end_layout
10099
10100 \begin_layout Itemize
10101
10102 \family sans
10103 Quote
10104 \end_layout
10105
10106 \begin_layout Itemize
10107
10108 \family sans
10109 Verse
10110 \end_layout
10111
10112 \begin_layout Itemize
10113
10114 \family sans
10115 Caption
10116 \end_layout
10117
10118 \begin_layout Itemize
10119
10120 \family sans
10121 LyX-Code
10122 \end_layout
10123
10124 \begin_layout Itemize
10125
10126 \family sans
10127 Comment
10128 \end_layout
10129
10130 \begin_layout Standard
10131 All of the other standard environments, including the section-heading environmen
10132 ts, aren't used in the 
10133 \family sans
10134 slides
10135 \family default
10136  class.
10137 \end_layout
10138
10139 \begin_layout Standard
10140 On the other hand, you'll notice the following new environments:
10141 \end_layout
10142
10143 \begin_layout Itemize
10144
10145 \family sans
10146 Slide
10147 \end_layout
10148
10149 \begin_layout Itemize
10150
10151 \family sans
10152 Overlay
10153 \end_layout
10154
10155 \begin_layout Itemize
10156
10157 \family sans
10158 Note
10159 \end_layout
10160
10161 \begin_layout Itemize
10162
10163 \family sans
10164 InvisibleText
10165 \end_layout
10166
10167 \begin_layout Itemize
10168
10169 \family sans
10170 VisibleText
10171 \end_layout
10172
10173 \begin_layout Standard
10174 These five are kind of quirky, due to a 
10175 \begin_inset Quotes eld
10176 \end_inset
10177
10178 feature
10179 \begin_inset Quotes erd
10180 \end_inset
10181
10182  in LyX.
10183  You see, LyX doesn't permit you to nest any other paragraph environment
10184  into an empty environment.
10185  Now, that's fine and dandy, but it means that you wouldn't be able to start
10186  a slide with anything except plain text.
10187  To deal with this, I've performed a little 
10188 \begin_inset Quotes eld
10189 \end_inset
10190
10191 LaTeX magic.
10192 \begin_inset Quotes erd
10193 \end_inset
10194
10195  
10196 \end_layout
10197
10198 \begin_layout Subsubsection
10199 Quirks of the New Environments
10200 \begin_inset CommandInset label
10201 LatexCommand label
10202 name "sec:slideQuirk"
10203
10204 \end_inset
10205
10206
10207 \end_layout
10208
10209 \begin_layout Standard
10210 All five of the new paragraph environments are somewhat quirky due to inherent
10211  limitiations in the current version of LyX.
10212  As I just mentioned, LyX forbids environments that begin with another environme
10213 nt.
10214  To get around this, the 
10215 \family sans
10216 Slide
10217 \family default
10218  environment isn't a paragraph environment as described in the 
10219 \emph on
10220 User's Guide
10221 \emph default
10222 .
10223  
10224 \end_layout
10225
10226 \begin_layout Standard
10227 You should consider 
10228 \family sans
10229 Slide
10230 \family default
10231
10232 \family sans
10233 Overlay
10234 \family default
10235 , and 
10236 \family sans
10237 Note
10238 \family default
10239  to be 
10240 \begin_inset Quotes eld
10241 \end_inset
10242
10243 pseudo-environments.
10244 \begin_inset Quotes erd
10245 \end_inset
10246
10247  They look like a section heading or a 
10248 \begin_inset Quotes eld
10249 \end_inset
10250
10251
10252 \family sans
10253 Caption
10254 \family default
10255 ,
10256 \begin_inset Quotes erd
10257 \end_inset
10258
10259  but really begin a [and, if necessary, end the previous] paragraph environment.
10260  Likewise, treat 
10261 \family sans
10262 InvisibleText
10263 \family default
10264  and 
10265 \family sans
10266 VisibleText
10267 \family default
10268  as 
10269 \begin_inset Quotes eld
10270 \end_inset
10271
10272 pseudo-commands.
10273 \begin_inset Quotes erd
10274 \end_inset
10275
10276  These two perform some action.
10277 \end_layout
10278
10279 \begin_layout Standard
10280 A common feature of all five environments, 
10281 \family sans
10282 Slide
10283 \family default
10284
10285 \family sans
10286 Overlay
10287 \family default
10288
10289 \family sans
10290 Note
10291 \family default
10292
10293 \family sans
10294 InvisibleText
10295 \family default
10296  and 
10297 \family sans
10298 VisibleText
10299 \family default
10300 , is a rather long-ish label.
10301  The text following this label --- ordinarily the contents of the paragraph
10302  environment --- is utterly irrelevant for 
10303 \family sans
10304 Slide
10305 \family default
10306
10307 \family sans
10308 Overlay
10309 \family default
10310
10311 \family sans
10312 Note
10313 \family default
10314
10315 \family sans
10316 InvisibleText
10317 \family default
10318  and 
10319 \family sans
10320 VisibleText
10321 \family default
10322 .
10323  LyX completely ignores it.
10324  In fact, you can leave these five environments completely empty.
10325  
10326 \end_layout
10327
10328 \begin_layout Standard
10329 While you don't 
10330 \emph on
10331 have
10332 \emph default
10333  to put any text after the rather long-ish label, you might want to.
10334  This could be a short description of the contents of the 
10335 \family sans
10336 Slide
10337 \family default
10338 , for example.
10339  In that case, enter in your descriptive comment and hit 
10340 \family sans
10341 Return
10342 \family default
10343  as you normally would.
10344 \end_layout
10345
10346 \begin_layout Standard
10347 If, on the other hand, you don't want to enter in any descriptive text,
10348  you'll hit another LyX quirk.
10349  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
10350  environment until you put something in the old one.
10351  So, do this:
10352 \end_layout
10353
10354 \begin_layout Itemize
10355 Start entering the text that will 
10356 \emph on
10357 follow
10358 \emph default
10359  the new 
10360 \family sans
10361 Slide
10362 \family default
10363
10364 \family sans
10365 Overlay
10366 \family default
10367
10368 \family sans
10369 Note
10370 \family default
10371
10372 \family sans
10373 InvisibleText
10374 \family default
10375  or 
10376 \family sans
10377 VisibleText
10378 \family default
10379 .
10380  
10381 \end_layout
10382
10383 \begin_layout Itemize
10384 Now move to the beginning of that paragraph.
10385  
10386 \end_layout
10387
10388 \begin_layout Itemize
10389 Next, hit 
10390 \family sans
10391 Return
10392 \family default
10393 .
10394  
10395 \end_layout
10396
10397 \begin_layout Itemize
10398 Finally, change this new, empty paragraph to a 
10399 \family sans
10400 Slide
10401 \family default
10402
10403 \family sans
10404 Overlay
10405 \family default
10406
10407 \family sans
10408 Note
10409 \family default
10410
10411 \family sans
10412 InvisibleText
10413 \family default
10414  or 
10415 \family sans
10416 VisibleText
10417 \family default
10418 .
10419  
10420 \end_layout
10421
10422 \begin_layout Standard
10423 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
10424
10425 \end_layout
10426
10427 \begin_layout Subsection
10428 Making a Presentation with 
10429 \family sans
10430 Slide
10431 \family default
10432
10433 \family sans
10434 Overlay
10435 \family default
10436  and 
10437 \family sans
10438 Note
10439 \end_layout
10440
10441 \begin_layout Subsubsection
10442 Using the 
10443 \family sans
10444 Slide
10445 \family default
10446  Environment
10447 \end_layout
10448
10449 \begin_layout Standard
10450 If you're expecting this section to teach you how to actually make a presentatio
10451 n, you'll be sorely disappointed.
10452  Naturally, I'll describe all of the ways the 
10453 \family sans
10454 slides
10455 \family default
10456  class can assist you in preparing the materials for a presentation.
10457  Filling in the contents, however, is up to you.
10458  [Then again, that 
10459 \emph on
10460 is
10461 \emph default
10462  the LyX philosophy.]
10463 \end_layout
10464
10465 \begin_layout Standard
10466 Choosing the 
10467 \family sans
10468 Slide
10469 \family default
10470  environment [in the manner described in section
10471 \begin_inset space ~
10472 \end_inset
10473
10474
10475 \begin_inset CommandInset ref
10476 LatexCommand ref
10477 reference "sec:slideQuirk"
10478
10479 \end_inset
10480
10481 ] tells LyX to begin a new slide [duh].
10482  The label for this environment/
10483 \begin_inset Quotes erd
10484 \end_inset
10485
10486 pseudo-command
10487 \begin_inset Quotes erd
10488 \end_inset
10489
10490  is an 
10491 \begin_inset Quotes eld
10492 \end_inset
10493
10494 ASCII line,
10495 \begin_inset Quotes erd
10496 \end_inset
10497
10498  in cool blue, followed by the label, 
10499 \begin_inset Quotes eld
10500 \end_inset
10501
10502 NewSlide:
10503 \begin_inset Quotes erd
10504 \end_inset
10505
10506 .
10507  Any text or paragraph environments that follow this one go on the new slide.
10508  It's that simple.
10509 \end_layout
10510
10511 \begin_layout Standard
10512 Slides are probably the only time you'll need to forcibly end pages in LyX
10513  (this can be specified in the 
10514 \family sans
10515 Paragraph Layout
10516 \family default
10517  dialog).
10518  In fact, you'll want to, once you finish entering the contents of one slide.
10519  If you've entered more text than can physically fit on a slide, the extra
10520  overflows onto a new slide.
10521  I don't recommend doing this, however, since the overflow slide won't have
10522  any page number on it.
10523  Furthermore, it may interfere with any 
10524 \family sans
10525 Overlay
10526 \family default
10527  you've made to accompany the oversized 
10528 \family sans
10529 Slide
10530 \family default
10531 .
10532 \end_layout
10533
10534 \begin_layout Standard
10535 The 
10536 \family sans
10537 Overlay
10538 \family default
10539  and 
10540 \family sans
10541 Note
10542 \family default
10543  environments work the same way as the 
10544 \family sans
10545 Slide
10546 \family default
10547  environment.
10548  They both create an 
10549 \begin_inset Quotes eld
10550 \end_inset
10551
10552 ASCII line
10553 \begin_inset Quotes erd
10554 \end_inset
10555
10556  followed by a label [
10557 \begin_inset Quotes eld
10558 \end_inset
10559
10560 NewOverlay:
10561 \begin_inset Quotes erd
10562 \end_inset
10563
10564  and 
10565 \begin_inset Quotes eld
10566 \end_inset
10567
10568 NewNote:
10569 \begin_inset Quotes erd
10570 \end_inset
10571
10572 , respectively].
10573  The color is a stunning magenta instead of blue, and the 
10574 \begin_inset Quotes eld
10575 \end_inset
10576
10577 ASCII line
10578 \begin_inset Quotes erd
10579 \end_inset
10580
10581  will look different, in style and in length.
10582  The label fonts of all three also differ from one another.
10583 \end_layout
10584
10585 \begin_layout Standard
10586 As with a 
10587 \family sans
10588 Slide
10589 \family default
10590 , if the contents of a 
10591 \family sans
10592 Note
10593 \family default
10594  or 
10595 \family sans
10596 Overlay
10597 \family default
10598  exceed the physical size of a slide or sheet of paper, the extra will overflow
10599  onto a new sheet.
10600  Again, you should avoid this.
10601  It defeats the whole purpose of 
10602 \family sans
10603 Note
10604 \family default
10605 s and 
10606 \family sans
10607 Overlay
10608 \family default
10609 s.
10610 \end_layout
10611
10612 \begin_layout Subsubsection
10613 Using 
10614 \family sans
10615 Overlay
10616 \family default
10617  with 
10618 \family sans
10619 Slide
10620 \end_layout
10621
10622 \begin_layout Standard
10623 The idea behind an 
10624 \family sans
10625 Overlay
10626 \family default
10627  is a slide that sits atop another slide.
10628  Perhaps you wish to discuss a figure on the main 
10629 \family sans
10630 Slide
10631 \family default
10632  before displaying the text associated with it.
10633  One way to accomplish this is tape a flap of dark paper over the part of
10634  the 
10635 \family sans
10636 Slide
10637 \family default
10638  you want to display later.
10639  This method fails, however, if you wish to overlap one graph with another,
10640  for example.
10641  You would then have to fumble while speaking to align the two separate,
10642  overlapping 
10643 \family sans
10644 Slide
10645 \family default
10646 s to align the two graphs.
10647  The use of an 
10648 \family sans
10649 Overlay
10650 \family default
10651  environment in both cases makes life much easier.
10652 \end_layout
10653
10654 \begin_layout Standard
10655 Each 
10656 \family sans
10657 Overlay
10658 \family default
10659  receives the page number of its 
10660 \begin_inset Quotes eld
10661 \end_inset
10662
10663 parent
10664 \begin_inset Quotes erd
10665 \end_inset
10666
10667  
10668 \family sans
10669 Slide
10670 \family default
10671 , appended by 
10672 \begin_inset Quotes eld
10673 \end_inset
10674
10675
10676 \family typewriter
10677 -a
10678 \family default
10679
10680 \begin_inset Quotes erd
10681 \end_inset
10682
10683 .
10684 \begin_inset Foot
10685 status collapsed
10686
10687 \begin_layout Plain Layout
10688 Presumably, mutliple 
10689 \family sans
10690 Overlay
10691 \family default
10692 s would have 
10693 \begin_inset Quotes eld
10694 \end_inset
10695
10696
10697 \family typewriter
10698 -a
10699 \family default
10700
10701 \begin_inset Quotes erd
10702 \end_inset
10703
10704
10705 \begin_inset Quotes eld
10706 \end_inset
10707
10708
10709 \family typewriter
10710 -b
10711 \family default
10712
10713 \begin_inset Quotes erd
10714 \end_inset
10715
10716
10717 \begin_inset Quotes eld
10718 \end_inset
10719
10720
10721 \family typewriter
10722 -c
10723 \family default
10724
10725 \begin_inset Quotes erd
10726 \end_inset
10727
10728 , etc.
10729 \begin_inset space ~
10730 \end_inset
10731
10732 appended to the page number of the parent 
10733 \family sans
10734 Slide
10735 \family default
10736 .
10737  
10738 \end_layout
10739
10740 \end_inset
10741
10742  Clearly, you want the contents of both the 
10743 \family sans
10744 Slide
10745 \family default
10746  and the 
10747 \family sans
10748 Overlay
10749 \family default
10750  to each fit on a single physical slide! You should probably consider an
10751  
10752 \family sans
10753 Overlay
10754 \family default
10755  as 
10756 \begin_inset Quotes eld
10757 \end_inset
10758
10759 part of
10760 \begin_inset Quotes erd
10761 \end_inset
10762
10763  a 
10764 \family sans
10765 Slide
10766 \family default
10767 .
10768  Indeed, the LyX 
10769 \family sans
10770 slides
10771 \family default
10772  class provides a visual cue for this: the label at the start of an 
10773 \family sans
10774 Overlay
10775 \family default
10776  is shorter than that at the start of a 
10777 \family sans
10778 Slide
10779 \family default
10780 .
10781  Lastly, when you generate printable output, you'll find alignment markers
10782  in all four corners of both the 
10783 \family sans
10784 Overlay
10785 \family default
10786  page and its parent 
10787 \family sans
10788 Slide
10789 \family default
10790 .
10791  These will assist you in lining up the two physical slides.
10792 \end_layout
10793
10794 \begin_layout Standard
10795 The major problem in overlaying two slides is aligning the contents of the
10796  two transparencies.
10797  How much space should you leave for that graph on the second slide? Worse
10798  still, what if you want a graph and a sentence on second slide, but there
10799  is text on the main transparency that goes in between them? You could try
10800  and insert vertical space of the right size.
10801  The better way is to use 
10802 \family sans
10803 InvisibleText
10804 \family default
10805  and 
10806 \family sans
10807 VisibleText
10808 \family default
10809 .
10810 \end_layout
10811
10812 \begin_layout Standard
10813 As their names imply, 
10814 \family sans
10815 InvisibleText
10816 \family default
10817  and 
10818 \family sans
10819 VisibleText
10820 \family default
10821  are two command-like paragraph environments that make all subsequent text
10822  invisible and visible, respectively.
10823  Note from section
10824 \begin_inset space ~
10825 \end_inset
10826
10827
10828 \begin_inset CommandInset ref
10829 LatexCommand ref
10830 reference "sec:slideQuirk"
10831
10832 \end_inset
10833
10834  that you don't place anything 
10835 \emph on
10836 into
10837 \emph default
10838  these two environments, however.
10839  When you create an 
10840 \family sans
10841 InvisibleText
10842 \family default
10843 , it inserts a centered, sky-blue label into the page reading 
10844 \begin_inset Quotes eld
10845 \end_inset
10846
10847 <Invisible Text Follows>
10848 \begin_inset Quotes erd
10849 \end_inset
10850
10851 .
10852  For paragraphs following this label, the parts of the 
10853 \family sans
10854 Slide
10855 \family default
10856  [or 
10857 \family sans
10858 Overlay
10859 \family default
10860 ; it doesn't matter which] where they would be contain instead blank space.
10861  
10862 \end_layout
10863
10864 \begin_layout Standard
10865 For 
10866 \family sans
10867 VisibleText
10868 \family default
10869 , the corresponding centered label is 
10870 \begin_inset Quotes eld
10871 \end_inset
10872
10873 <Visible Text Follows>
10874 \begin_inset Quotes erd
10875 \end_inset
10876
10877  in blazing green.
10878  Paragraphs following this label behave normally.
10879  Note that the beginning of a new 
10880 \family sans
10881 Slide
10882 \family default
10883
10884 \family sans
10885 Overlay
10886 \family default
10887 , or 
10888 \family sans
10889 Note
10890 \family default
10891  automatically shuts off an 
10892 \family sans
10893 InvisibleText
10894 \family default
10895 .
10896  It's therefore not necessary to use 
10897 \family sans
10898 VisibleText
10899 \family default
10900  at the end of a 
10901 \family sans
10902 Slide
10903 \family default
10904 .
10905 \end_layout
10906
10907 \begin_layout Standard
10908 By now, it should be obvious how to create overlay transparencies using
10909  the proper combination of 
10910 \family sans
10911 InvisibleText
10912 \family default
10913  and 
10914 \family sans
10915 VisibleText
10916 \family default
10917  on a 
10918 \family sans
10919 Slide
10920 \family default
10921  and 
10922 \family sans
10923 Overlay
10924 \family default
10925 :
10926 \end_layout
10927
10928 \begin_layout Enumerate
10929 Create a 
10930 \family sans
10931 Slide
10932 \family default
10933 , including everything that will appear on it, whether on the main slide
10934  or on the 
10935 \family sans
10936 Overlay
10937 \family default
10938 .
10939 \end_layout
10940
10941 \begin_layout Enumerate
10942 Before each figure or paragraph that will appear only on the 
10943 \family sans
10944 Overlay
10945 \family default
10946 , insert an 
10947 \family sans
10948 InvisibleText
10949 \family default
10950  environment.
10951  If necessary, insert a 
10952 \family sans
10953 VisibleText
10954 \family default
10955  environment after the 
10956 \family sans
10957 Overlay
10958 \family default
10959 -only text.
10960 \end_layout
10961
10962 \begin_layout Enumerate
10963 Start an 
10964 \family sans
10965 Overlay
10966 \family default
10967  immediately following the 
10968 \family sans
10969 Slide
10970 \family default
10971 .
10972 \end_layout
10973
10974 \begin_layout Enumerate
10975 Copy the contents of this 
10976 \family sans
10977 Slide
10978 \family default
10979  into the 
10980 \family sans
10981 Overlay
10982 \family default
10983 .
10984 \end_layout
10985
10986 \begin_layout Enumerate
10987 Within the 
10988 \family sans
10989 Overlay
10990 \family default
10991 , change all of the 
10992 \family sans
10993 InvisibleText
10994 \family default
10995  lines to 
10996 \family sans
10997 VisibleText
10998 \family default
10999  and vice-versa.
11000 \end_layout
11001
11002 \begin_layout Standard
11003 That's it.
11004  You've just made an 
11005 \family sans
11006 Overlay
11007 \family default
11008 .
11009 \end_layout
11010
11011 \begin_layout Standard
11012 There's one problem with the way I've designed the LyX 
11013 \family sans
11014 slides
11015 \family default
11016  class: you can't make text in the middle of a paragraph invisible, nor
11017  make text in the middle of an invisible paragraph visible again.
11018  To accomplish this feat, you'll need to use some inlined LaTeX codes.
11019 \begin_inset Foot
11020 status collapsed
11021
11022 \begin_layout Plain Layout
11023 The commands of interest are: 
11024 \end_layout
11025
11026 \begin_layout Itemize
11027
11028 \family typewriter
11029 {
11030 \backslash
11031 invisible \SpecialChar \ldots{}
11032  }
11033 \end_layout
11034
11035 \begin_layout Itemize
11036
11037 \family typewriter
11038 {
11039 \backslash
11040 visible \SpecialChar \ldots{}
11041  }
11042 \end_layout
11043
11044 \begin_layout Plain Layout
11045 \SpecialChar \ldots{}
11046 and need to be marked as TeX.
11047  The text whose 
11048 \begin_inset Quotes eld
11049 \end_inset
11050
11051 visibility
11052 \begin_inset Quotes erd
11053 \end_inset
11054
11055  you wish to change goes in between the brackets [and after the 
11056 \family typewriter
11057
11058 \backslash
11059 invisible
11060 \family default
11061  or 
11062 \family typewriter
11063
11064 \backslash
11065 visible
11066 \family default
11067  command].
11068  If you don't know how to mark text as TeX, see the appropriate section
11069  of the 
11070 \emph on
11071 User's Guide
11072 \emph default
11073 .
11074 \end_layout
11075
11076 \end_inset
11077
11078
11079 \end_layout
11080
11081 \begin_layout Subsubsection
11082 Using 
11083 \family sans
11084 Note
11085 \family default
11086  with 
11087 \family sans
11088 Slide
11089 \family default
11090
11091 \begin_inset CommandInset label
11092 LatexCommand label
11093 name "sec:slideNote"
11094
11095 \end_inset
11096
11097
11098 \end_layout
11099
11100 \begin_layout Standard
11101 Like an 
11102 \family sans
11103 Overlay
11104 \family default
11105 , a 
11106 \family sans
11107 Note
11108 \family default
11109  is associated with a 
11110 \begin_inset Quotes eld
11111 \end_inset
11112
11113 parent
11114 \begin_inset Quotes erd
11115 \end_inset
11116
11117  
11118 \family sans
11119 Slide
11120 \family default
11121 .
11122  Here, too, the LyX 
11123 \family sans
11124 slides
11125 \family default
11126  class provides visual cues.
11127  The label for a 
11128 \family sans
11129 Note
11130 \family default
11131  is shorter than that of a 
11132 \family sans
11133 Slide
11134 \family default
11135  [yet longer than that of an 
11136 \family sans
11137 Overlay
11138 \family default
11139 ] and, like the label of an 
11140 \family sans
11141 Overlay
11142 \family default
11143  is shockingly magenta.
11144  Additionally, the printed 
11145 \family sans
11146 Note
11147 \family default
11148  has the page number of its 
11149 \begin_inset Quotes eld
11150 \end_inset
11151
11152 parent
11153 \begin_inset Quotes erd
11154 \end_inset
11155
11156  
11157 \family sans
11158 Slide
11159 \family default
11160 , appended by 
11161 \begin_inset Quotes eld
11162 \end_inset
11163
11164
11165 \family typewriter
11166 -
11167 \family default
11168 1
11169 \begin_inset Quotes erd
11170 \end_inset
11171
11172
11173 \begin_inset Quotes eld
11174 \end_inset
11175
11176
11177 \family typewriter
11178 -
11179 \family default
11180 2
11181 \begin_inset Quotes erd
11182 \end_inset
11183
11184
11185 \begin_inset Quotes eld
11186 \end_inset
11187
11188
11189 \family typewriter
11190 -
11191 \family default
11192 3
11193 \begin_inset Quotes erd
11194 \end_inset
11195
11196 , etc.
11197  You can have multiple 
11198 \family sans
11199 Note
11200 \family default
11201 s associated with a single 
11202 \family sans
11203 Slide
11204 \family default
11205 , and, as with 
11206 \family sans
11207 Slide
11208 \family default
11209  and 
11210 \family sans
11211 Overlay
11212 \family default
11213 , you'll probably want to break up long 
11214 \family sans
11215 Note
11216 \family default
11217 s so that they fit on a single sheet of paper.
11218 \end_layout
11219
11220 \begin_layout Standard
11221 The purpose of a 
11222 \family sans
11223 Note
11224 \family default
11225  is obvious: it contains anything additional you might want to say about
11226  a 
11227 \family sans
11228 Slide
11229 \family default
11230 .
11231  It could also be used as a sheet of reminders for a particular 
11232 \family sans
11233 Slide
11234 \family default
11235 .
11236  In the case of the latter, you might want to make use of time markers.
11237  Currently, the LyX 
11238 \family sans
11239 slides
11240 \family default
11241  class has no 
11242 \begin_inset Quotes eld
11243 \end_inset
11244
11245 native
11246 \begin_inset Quotes erd
11247 \end_inset
11248
11249  support for time markers, a 
11250 \noun on
11251 Sli
11252 \noun default
11253 TeX feature.
11254  So, you'll have to resort to using the LaTeX codes.
11255 \end_layout
11256
11257 \begin_layout Standard
11258 To use time markers, you'll need to specify the extra class option 
11259 \begin_inset Quotes eld
11260 \end_inset
11261
11262
11263 \family typewriter
11264 clock
11265 \family default
11266
11267 \begin_inset Quotes erd
11268 \end_inset
11269
11270  [see section
11271 \begin_inset space ~
11272 \end_inset
11273
11274
11275 \begin_inset CommandInset ref
11276 LatexCommand ref
11277 reference "sec:slidesetup"
11278
11279 \end_inset
11280
11281 ].
11282  This option turns on timing marks, which will appear in the lower-left-hand
11283  corner of every 
11284 \family sans
11285 Note
11286 \family default
11287  you generate.
11288  To set what appears in the time marker, you use the LaTeX commands 
11289 \begin_inset Quotes eld
11290 \end_inset
11291
11292
11293 \family typewriter
11294
11295 \backslash
11296 settime{}
11297 \family default
11298
11299 \begin_inset Quotes erd
11300 \end_inset
11301
11302  and 
11303 \begin_inset Quotes eld
11304 \end_inset
11305
11306
11307 \family typewriter
11308
11309 \backslash
11310 addtime{}
11311 \family default
11312
11313 \begin_inset Quotes erd
11314 \end_inset
11315
11316 .
11317  The arguments of both commands are time measured in seconds.
11318  
11319 \begin_inset Quotes eld
11320 \end_inset
11321
11322
11323 \family typewriter
11324
11325 \backslash
11326 settime{}
11327 \family default
11328
11329 \begin_inset Quotes erd
11330 \end_inset
11331
11332  sets the time marker to a given time.
11333  
11334 \begin_inset Quotes eld
11335 \end_inset
11336
11337
11338 \family typewriter
11339
11340 \backslash
11341 addtime{}
11342 \family default
11343
11344 \begin_inset Quotes erd
11345 \end_inset
11346
11347  increments the time marker by the specified amount.
11348  Using time markers and 
11349 \family sans
11350 Note
11351 \family default
11352 s in this fashion, you can remind yourself how much time to spend on a particula
11353
11354 \family sans
11355 Slide
11356 \family default
11357 .
11358 \end_layout
11359
11360 \begin_layout Standard
11361 There's one last feature to describe.
11362  Clearly, you'd like to print out all of your 
11363 \family sans
11364 Slide
11365 \family default
11366 s and 
11367 \family sans
11368 Overlay
11369 \family default
11370 s on transparencies while printing all of your 
11371 \family sans
11372 Note
11373 \family default
11374 s on plain paper.
11375  However, a 
11376 \family sans
11377 Note
11378 \family default
11379  
11380 \emph on
11381 must
11382 \emph default
11383  follow the 
11384 \family sans
11385 Slide
11386 \family default
11387  with which it is associated.
11388  What's a person to do?
11389 \end_layout
11390
11391 \begin_layout Standard
11392 Luckily, there are two LaTeX commands that allow you to select what to print
11393  out.
11394  Both must be placed into the preamble of your document.
11395  The command 
11396 \begin_inset Quotes eld
11397 \end_inset
11398
11399
11400 \family typewriter
11401
11402 \backslash
11403 onlyslides{
11404 \backslash
11405 slides}
11406 \family default
11407
11408 \begin_inset Quotes erd
11409 \end_inset
11410
11411  will cause the output to contain only the 
11412 \family sans
11413 Slide
11414 \family default
11415 s and 
11416 \family sans
11417 Overlay
11418 \family default
11419 s.
11420  Correspondingly, the command 
11421 \begin_inset Quotes eld
11422 \end_inset
11423
11424
11425 \family typewriter
11426
11427 \backslash
11428 onlynotes{
11429 \backslash
11430 notes}
11431 \family default
11432
11433 \begin_inset Quotes erd
11434 \end_inset
11435
11436  prevents the output of anything but 
11437 \family sans
11438 Note
11439 \family default
11440 s.
11441  I'd advise placing both commands in the preamble and initially comment
11442  both out.
11443  You can then preview your entire presentation as you write.
11444  When you're done writing, you can then uncomment one of the two to select
11445  what you want to print.
11446  I like to uncomment 
11447 \begin_inset Quotes eld
11448 \end_inset
11449
11450
11451 \family typewriter
11452
11453 \backslash
11454 onlyslides{
11455 \backslash
11456 slides}
11457 \family default
11458
11459 \begin_inset Quotes erd
11460 \end_inset
11461
11462  , print to a file with 
11463 \begin_inset Quotes eld
11464 \end_inset
11465
11466
11467 \family typewriter
11468 -slides
11469 \family default
11470
11471 \begin_inset Quotes erd
11472 \end_inset
11473
11474  in its name, comment it back out, then uncomment 
11475 \begin_inset Quotes eld
11476 \end_inset
11477
11478
11479 \family typewriter
11480
11481 \backslash
11482 onlynotes{
11483 \backslash
11484 notes}
11485 \family default
11486
11487 \begin_inset Quotes erd
11488 \end_inset
11489
11490  and print to a 
11491 \begin_inset Quotes eld
11492 \end_inset
11493
11494
11495 \family typewriter
11496 *-notes.ps
11497 \family default
11498
11499 \begin_inset Quotes erd
11500 \end_inset
11501
11502  file.
11503  I can then send either file to a printer, loading transparencies or plain
11504  paper as appropriate.
11505 \end_layout
11506
11507 \begin_layout Standard
11508 You can also provide other arguments to the 
11509 \begin_inset Quotes eld
11510 \end_inset
11511
11512
11513 \family typewriter
11514
11515 \backslash
11516 onlyslides{}
11517 \family default
11518
11519 \begin_inset Quotes erd
11520 \end_inset
11521
11522  and 
11523 \begin_inset Quotes eld
11524 \end_inset
11525
11526
11527 \family typewriter
11528
11529 \backslash
11530 onlynotes{}
11531 \family default
11532
11533 \begin_inset Quotes erd
11534 \end_inset
11535
11536  commands.
11537  See a good LaTeX book for details.
11538 \end_layout
11539
11540 \begin_layout Subsection
11541 The 
11542 \family sans
11543 slides
11544 \family default
11545  Class Template File
11546 \end_layout
11547
11548 \begin_layout Standard
11549 I have also provided a template file, 
11550 \begin_inset Quotes eld
11551 \end_inset
11552
11553
11554 \family typewriter
11555 slides.lyx
11556 \family default
11557
11558 \begin_inset Quotes erd
11559 \end_inset
11560
11561 , with the 
11562 \family sans
11563 slides
11564 \family default
11565  class.
11566  To use it, begin your new presentation with 
11567 \family sans
11568 \bar under
11569 F
11570 \bar default
11571 ile\SpecialChar \menuseparator
11572 New
11573 \begin_inset space ~
11574 \end_inset
11575
11576 from
11577 \begin_inset space ~
11578 \end_inset
11579
11580
11581 \bar under
11582 T
11583 \bar default
11584 emplate
11585 \family default
11586 .
11587  Your new LyX presentation file will contain an example 
11588 \family sans
11589 Slide
11590 \family default
11591  -- 
11592 \family sans
11593 Overlay
11594 \family default
11595  -- 
11596 \family sans
11597 Note
11598 \family default
11599  triplet.
11600  The 
11601 \family sans
11602 Slide
11603 \family default
11604  and 
11605 \family sans
11606 Overlay
11607 \family default
11608  additionally contain an example of the use of 
11609 \family sans
11610 InvisibleText
11611 \family default
11612  and 
11613 \family sans
11614 VisibleText
11615 \family default
11616 .
11617  Lastly, the preamble will contain:
11618 \end_layout
11619
11620 \begin_layout LyX-Code
11621 % Uncomment to print out only slides and overlays
11622 \end_layout
11623
11624 \begin_layout LyX-Code
11625 %
11626 \end_layout
11627
11628 \begin_layout LyX-Code
11629 %
11630 \backslash
11631 onlyslides{
11632 \backslash
11633 slides}
11634 \begin_inset Newline newline
11635 \end_inset
11636
11637  
11638 \end_layout
11639
11640 \begin_layout LyX-Code
11641 % Uncomment to print out only notes
11642 \end_layout
11643
11644 \begin_layout LyX-Code
11645 %
11646 \end_layout
11647
11648 \begin_layout LyX-Code
11649 %
11650 \backslash
11651 onlynotes{
11652 \backslash
11653 notes}
11654 \end_layout
11655
11656 \begin_layout Standard
11657 One final thing: I created this class to support the LaTeX2e 
11658 \begin_inset Quotes eld
11659 \end_inset
11660
11661
11662 \noun on
11663 Sli
11664 \noun default
11665 TeX emulation
11666 \begin_inset Quotes erd
11667 \end_inset
11668
11669  class, one of the built-in LaTeX2e classes.
11670  Neither I nor the rest of the LyX Team endorse or oppose the use of this
11671  built-in slide class.
11672  It's here if you want it or need it.
11673  There exist other LaTeX2e classes for creating presentations, such as the
11674  
11675 \family sans
11676 Foils
11677 \family default
11678  class [see section
11679 \begin_inset space ~
11680 \end_inset
11681
11682
11683 \begin_inset CommandInset ref
11684 LatexCommand ref
11685 reference "sec:foiltex"
11686
11687 \end_inset
11688
11689 ] or the 
11690 \begin_inset Quotes eld
11691 \end_inset
11692
11693
11694 \family typewriter
11695 seminar
11696 \family default
11697
11698 \begin_inset Quotes erd
11699 \end_inset
11700
11701  package [present on some TeX distributions].
11702  The latter is not yet supported under LyX.
11703 \begin_inset Foot
11704 status collapsed
11705
11706 \begin_layout Plain Layout
11707 Perhaps you can take on the task\SpecialChar \ldots{}
11708
11709 \end_layout
11710
11711 \end_inset
11712
11713  I know nothing about these other classes.
11714  Try them out to see what sort of alternative they provide.
11715 \end_layout
11716
11717 \begin_layout Section
11718 Foils [aka 
11719 \family sans
11720 Foil
11721 \family default
11722 \noun on
11723 TeX
11724 \noun default
11725 ]
11726 \begin_inset CommandInset label
11727 LatexCommand label
11728 name "sec:foiltex"
11729
11730 \end_inset
11731
11732
11733 \end_layout
11734
11735 \begin_layout Standard
11736 by 
11737 \noun on
11738 Allan Rae
11739 \end_layout
11740
11741 \begin_layout Subsection
11742 Introduction
11743 \end_layout
11744
11745 \begin_layout Standard
11746 This section describes how to use LyX to make slides for overhead projectors.
11747  There are two document classes that can do this: the default slides class
11748  and the 
11749 \family sans
11750 Foil
11751 \family default
11752 TeX slides class.
11753  This section documents the latter.
11754 \end_layout
11755
11756 \begin_layout Standard
11757 I'm going to say this again, nice and clear, so that there's no misunderstanding
11758 :
11759 \end_layout
11760
11761 \begin_layout Standard
11762 \begin_inset VSpace bigskip
11763 \end_inset
11764
11765
11766 \end_layout
11767
11768 \begin_layout Standard
11769 \align center
11770
11771 \size large
11772 This section documents the class 
11773 \begin_inset Quotes eld
11774 \end_inset
11775
11776
11777 \family sans
11778 slides (FoilTeX)
11779 \family default
11780
11781 \begin_inset Quotes erd
11782 \end_inset
11783
11784  
11785 \emph on
11786 only.
11787 \end_layout
11788
11789 \begin_layout Standard
11790 \begin_inset VSpace bigskip
11791 \end_inset
11792
11793
11794 \end_layout
11795
11796 \begin_layout Standard
11797 If you're looking for the documentation for 
11798 \begin_inset Quotes eld
11799 \end_inset
11800
11801
11802 \family sans
11803 slides (default)
11804 \family default
11805
11806 \begin_inset Quotes erd
11807 \end_inset
11808
11809 , check out section
11810 \begin_inset space ~
11811 \end_inset
11812
11813
11814 \begin_inset CommandInset ref
11815 LatexCommand ref
11816 reference "sec:slitex"
11817
11818 \end_inset
11819
11820 .
11821  If your machine doesn't have the 
11822 \family sans
11823 foils
11824 \family default
11825  class [
11826 \begin_inset Quotes eld
11827 \end_inset
11828
11829
11830 \family sans
11831 slides (FoilTeX)
11832 \family default
11833
11834 \begin_inset Quotes erd
11835 \end_inset
11836
11837 ] installed, you'll probably have to use the default 
11838 \family sans
11839 slides
11840 \family default
11841  class, which isn't quite as good as 
11842 \family sans
11843 foils.
11844 \end_layout
11845
11846 \begin_layout Standard
11847 The 
11848 \family sans
11849 foils
11850 \family default
11851  class is designed for use with version 2.1 of the 
11852 \family sans
11853 foils.cls
11854 \family default
11855  LaTeX class file which is now an integral part of LaTeX2e.
11856 \end_layout
11857
11858 \begin_layout Subsection
11859 Getting Started
11860 \end_layout
11861
11862 \begin_layout Standard
11863 Obviously, to use this document class, you need to select 
11864 \begin_inset Quotes eld
11865 \end_inset
11866
11867
11868 \family sans
11869 slides (FoilTeX)
11870 \family default
11871
11872 \begin_inset Quotes erd
11873 \end_inset
11874
11875  from the 
11876 \family sans
11877 \bar under
11878 C
11879 \bar default
11880 lass
11881 \family default
11882  entry in the 
11883 \family sans
11884 Document
11885 \begin_inset space ~
11886 \end_inset
11887
11888 Layout
11889 \family default
11890  dialog.
11891  There are some settings in the 
11892 \family sans
11893 Document
11894 \begin_inset space ~
11895 \end_inset
11896
11897 Layout
11898 \family default
11899  dialog that you should know about that are specific to this class:
11900 \end_layout
11901
11902 \begin_layout Itemize
11903 Don't change the options 
11904 \family sans
11905 Sides
11906 \family default
11907  and 
11908 \family sans
11909 Columns
11910 \family default
11911  on the 
11912 \family sans
11913 Document
11914 \begin_inset space ~
11915 \end_inset
11916
11917 Layout
11918 \family default
11919  dialog.
11920  They're ignored by the 
11921 \family sans
11922 foils
11923 \family default
11924  class.
11925 \end_layout
11926
11927 \begin_layout Itemize
11928 The default font size is 20pt with the other options being 17pt, 25pt and
11929  30pt.
11930 \end_layout
11931
11932 \begin_layout Itemize
11933 The default font is 
11934 \family sans
11935 sans
11936 \family default
11937  
11938 \family sans
11939 serif
11940 \family default
11941  but all math equations are still typeset in the usual roman font.
11942 \end_layout
11943
11944 \begin_layout Itemize
11945
11946 \family sans
11947 Foil
11948 \family default
11949 TeX supports A4 and Letter paper sizes as well as a special size for working
11950  with 35mm slides.
11951  It doesn't support A5, B5, legal or executive paper sizes.
11952 \end_layout
11953
11954 \begin_layout Itemize
11955 Don't bother changing the 
11956 \family sans
11957 Float Placement
11958 \family default
11959  settings because they are ignored anyway.
11960  All floats appear where they are defined in the text.
11961 \end_layout
11962
11963 \begin_layout Itemize
11964 The 
11965 \family sans
11966 \bar under
11967 P
11968 \bar default
11969 agestyle
11970 \family default
11971  setting behaves a bit differently for this class.
11972  
11973 \family sans
11974 Foil
11975 \family default
11976 TeX provides extensive footer and header capabilities including a user-defined
11977  logo.
11978  See section
11979 \begin_inset space ~
11980 \end_inset
11981
11982
11983 \begin_inset CommandInset ref
11984 LatexCommand ref
11985 reference "sec:foilfoot"
11986
11987 \end_inset
11988
11989  for more details.
11990  The title page is treated differently to all other pages in the document
11991  and is 
11992 \emph on
11993 always
11994 \emph default
11995  unnumbered and 
11996 \emph on
11997 always
11998 \emph default
11999  has the logo centered at the bottom of the page (if one is defined).
12000  The possible page style choices and what they do are as follows:
12001 \end_layout
12002
12003 \begin_deeper
12004 \begin_layout Labeling
12005 \labelwidthstring MMMMMMM
12006
12007 \family sans
12008 \series bold
12009 empty
12010 \family default
12011 \series default
12012  The final output contains no page numbers, or other headers or footers
12013  (except footnotes of course).
12014  
12015 \end_layout
12016
12017 \begin_layout Labeling
12018 \labelwidthstring MMMMMMM
12019
12020 \family sans
12021 \series bold
12022 plain
12023 \family default
12024 \series default
12025  The final output contains page numbers centered at the bottom of the page.
12026  No other headings or footers (other than footnotes).
12027 \end_layout
12028
12029 \begin_layout Labeling
12030 \labelwidthstring MMMMMMM
12031
12032 \series bold
12033 foilheadings
12034 \series default
12035  Page numbers in lower right corner.
12036  Additional headers and footers are also shown.
12037  This is also the default.
12038 \end_layout
12039
12040 \begin_layout Labeling
12041 \labelwidthstring MMMMMMM
12042
12043 \series bold
12044 fancy
12045 \series default
12046  Gives you access to the 
12047 \family sans
12048 fancyheadings
12049 \family default
12050  package although its use with 
12051 \family sans
12052 Foil
12053 \family default
12054 TeX is discouraged by the writer of the 
12055 \family sans
12056 Foil
12057 \family default
12058 TeX package because of some potential page layout clashes.
12059 \end_layout
12060
12061 \end_deeper
12062 \begin_layout Subsubsection
12063 Extra Options
12064 \end_layout
12065
12066 \begin_layout Standard
12067 The following options may be used in the extra class options in the 
12068 \family sans
12069 \bar under
12070 D
12071 \bar default
12072 ocument\SpecialChar \menuseparator
12073
12074 \bar under
12075 S
12076 \bar default
12077 ettings
12078 \family default
12079  dialog.
12080 \end_layout
12081
12082 \begin_layout Labeling
12083 \labelwidthstring MMMMMMx
12084
12085 \series bold
12086 35mmSlide
12087 \series default
12088  This sets up the page layout for 7.33in by 11in paper, which is about the
12089  same aspect ratio as a 35mm slide, making it a bit easier to work with
12090  this medium.
12091 \end_layout
12092
12093 \begin_layout Labeling
12094 \labelwidthstring MMMMMMx
12095
12096 \series bold
12097 headrule
12098 \series default
12099  Places a rule across the page below the header on every page except the
12100  title page.
12101 \end_layout
12102
12103 \begin_layout Labeling
12104 \labelwidthstring MMMMMMx
12105
12106 \series bold
12107 footrule
12108 \series default
12109  Places a rule across the page above the footer on every page except the
12110  title page.
12111 \end_layout
12112
12113 \begin_layout Labeling
12114 \labelwidthstring MMMMMMx
12115
12116 \series bold
12117 dvips
12118 \series default
12119  This is automatically set each time you create a new 
12120 \family sans
12121 foils
12122 \family default
12123  document.
12124  This option tells 
12125 \family sans
12126 Foil
12127 \family default
12128 TeX to use the dvips driver to rotate those pages that are set as landscape
12129  foils.
12130 \end_layout
12131
12132 \begin_layout Labeling
12133 \labelwidthstring MMMMMMx
12134
12135 \series bold
12136 landscape
12137 \series default
12138  Simply changes the page dimensions to those of a landscape page but doesn't
12139  do any rotation.
12140  Thus if you use this option you need to use an external program to rotate
12141  each page or feed your paper through your printer as landscape.
12142  Note that this option effectively reverses the roles of the 
12143 \family sans
12144 Foilhead
12145 \family default
12146  and 
12147 \family sans
12148 Rotatefoilhead
12149 \family default
12150  environments (don't worry these are described in the next section).
12151 \end_layout
12152
12153 \begin_layout Labeling
12154 \labelwidthstring MMMMMMx
12155
12156 \series bold
12157 leqno
12158 \series default
12159  Equation numbers on the left.
12160 \end_layout
12161
12162 \begin_layout Labeling
12163 \labelwidthstring MMMMMMx
12164
12165 \series bold
12166 fleqn
12167 \series default
12168  Flush-left equations.
12169 \end_layout
12170
12171 \begin_layout Subsection
12172 Supported Environments
12173 \end_layout
12174
12175 \begin_layout Standard
12176 Most of the environments commonly supported in other classes are also supported
12177  by the 
12178 \family sans
12179 foils
12180 \family default
12181  class.
12182  There are several additional environments provided by 
12183 \family sans
12184 Foil
12185 \family default
12186 TeX as well as a couple added by LyX.
12187  The following environments are shared with other classes:
12188 \end_layout
12189
12190 \begin_layout Standard
12191 \begin_inset ERT
12192 status open
12193
12194 \begin_layout Plain Layout
12195
12196
12197 \backslash
12198 begin{multicols}{2}
12199 \end_layout
12200
12201 \end_inset
12202
12203
12204 \end_layout
12205
12206 \begin_layout Itemize
12207
12208 \family sans
12209 Standard
12210 \end_layout
12211
12212 \begin_layout Itemize
12213
12214 \family sans
12215 Itemize
12216 \end_layout
12217
12218 \begin_layout Itemize
12219
12220 \family sans
12221 Enumerate
12222 \end_layout
12223
12224 \begin_layout Itemize
12225
12226 \family sans
12227 Description
12228 \end_layout
12229
12230 \begin_layout Itemize
12231
12232 \family sans
12233 List
12234 \end_layout
12235
12236 \begin_layout Itemize
12237
12238 \family sans
12239 LyX-Code
12240 \end_layout
12241
12242 \begin_layout Itemize
12243
12244 \family sans
12245 Verse
12246 \end_layout
12247
12248 \begin_layout Itemize
12249
12250 \family sans
12251 Quote
12252 \end_layout
12253
12254 \begin_layout Itemize
12255
12256 \family sans
12257 Quotation
12258 \end_layout
12259
12260 \begin_layout Itemize
12261
12262 \family sans
12263 Title
12264 \end_layout
12265
12266 \begin_layout Itemize
12267
12268 \family sans
12269 Author
12270 \end_layout
12271
12272 \begin_layout Itemize
12273
12274 \family sans
12275 Date
12276 \end_layout
12277
12278 \begin_layout Itemize
12279
12280 \family sans
12281 Abstract
12282 \end_layout
12283
12284 \begin_layout Itemize
12285
12286 \family sans
12287 Bibliography
12288 \end_layout
12289
12290 \begin_layout Itemize
12291
12292 \family sans
12293 Address
12294 \end_layout
12295
12296 \begin_layout Itemize
12297
12298 \family sans
12299 RightAddress
12300 \end_layout
12301
12302 \begin_layout Itemize
12303
12304 \family sans
12305 Caption
12306 \end_layout
12307
12308 \begin_layout Itemize
12309
12310 \family sans
12311 Comment
12312 \end_layout
12313
12314 \begin_layout Standard
12315 \begin_inset ERT
12316 status open
12317
12318 \begin_layout Plain Layout
12319
12320
12321 \backslash
12322 end{multicols}
12323 \end_layout
12324
12325 \end_inset
12326
12327
12328 \end_layout
12329
12330 \begin_layout Standard
12331 That is, all the major environments apart from the sectioning environments.
12332  Since foils are essentially self-contained sections, with a title and body,
12333  
12334 \family sans
12335 Foil
12336 \family default
12337 TeX provides specific commands for starting new foils and these are:
12338 \end_layout
12339
12340 \begin_layout Itemize
12341
12342 \family sans
12343 Foilhead
12344 \end_layout
12345
12346 \begin_layout Itemize
12347
12348 \family sans
12349 Rotatefoilhead
12350 \end_layout
12351
12352 \begin_layout Standard
12353 LyX also provides slightly modified versions of these two environments called:
12354 \end_layout
12355
12356 \begin_layout Itemize
12357
12358 \family sans
12359 ShortFoilhead
12360 \end_layout
12361
12362 \begin_layout Itemize
12363
12364 \family sans
12365 ShortRotatefoilhead
12366 \end_layout
12367
12368 \begin_layout Standard
12369 and the differences will be explained in the next section.
12370 \end_layout
12371
12372 \begin_layout Standard
12373 Since foils are often used in presenting ideas or new theorems and such
12374  
12375 \family sans
12376 Foil
12377 \family default
12378 TeX also provides a comprehensive box of goodies for presenting them:
12379 \end_layout
12380
12381 \begin_layout Standard
12382 \begin_inset ERT
12383 status open
12384
12385 \begin_layout Plain Layout
12386
12387
12388 \backslash
12389 begin{multicols}{2}
12390 \end_layout
12391
12392 \end_inset
12393
12394
12395 \end_layout
12396
12397 \begin_layout Itemize
12398
12399 \family sans
12400 Theorem
12401 \end_layout
12402
12403 \begin_layout Itemize
12404
12405 \family sans
12406 Lemma
12407 \end_layout
12408
12409 \begin_layout Itemize
12410
12411 \family sans
12412 Corollary
12413 \end_layout
12414
12415 \begin_layout Itemize
12416
12417 \family sans
12418 Proposition
12419 \end_layout
12420
12421 \begin_layout Itemize
12422
12423 \family sans
12424 Definition
12425 \end_layout
12426
12427 \begin_layout Itemize
12428
12429 \family sans
12430 Proof
12431 \end_layout
12432
12433 \begin_layout Itemize
12434
12435 \family sans
12436 Theorem*
12437 \end_layout
12438
12439 \begin_layout Itemize
12440
12441 \family sans
12442 Lemma*
12443 \end_layout
12444
12445 \begin_layout Itemize
12446
12447 \family sans
12448 Corollary*
12449 \end_layout
12450
12451 \begin_layout Itemize
12452
12453 \family sans
12454 Proposition*
12455 \end_layout
12456
12457 \begin_layout Itemize
12458
12459 \family sans
12460 Definition*
12461 \end_layout
12462
12463 \begin_layout Standard
12464 \begin_inset ERT
12465 status open
12466
12467 \begin_layout Plain Layout
12468
12469
12470 \backslash
12471 end{multicols}
12472 \end_layout
12473
12474 \end_inset
12475
12476
12477 \end_layout
12478
12479 \begin_layout Standard
12480 The starred versions are unnumbered while the unstarred versions are numbered.
12481  There are also two list environments added by LyX and these are:
12482 \end_layout
12483
12484 \begin_layout Itemize
12485
12486 \family sans
12487 TickList
12488 \end_layout
12489
12490 \begin_layout Itemize
12491
12492 \family sans
12493 CrossList
12494 \end_layout
12495
12496 \begin_layout Standard
12497
12498 \family sans
12499 Foil
12500 \family default
12501 TeX provides some powerful header and footer capabilities that are best
12502  set in the preamble although they may be set at any point in a document.
12503  If you want to change these settings in your document the best place to
12504  do so is at the very top of a foil, 
12505 \emph on
12506 i.e.
12507
12508 \emph default
12509  straight after the foilhead.
12510 \end_layout
12511
12512 \begin_layout Standard
12513 For this purpose, the following command styles are provided [
12514 \shape smallcaps
12515 Martin Vermeer
12516 \shape default
12517 ]:
12518 \end_layout
12519
12520 \begin_layout Standard
12521 \begin_inset ERT
12522 status open
12523
12524 \begin_layout Plain Layout
12525
12526
12527 \backslash
12528 begin{multicols}{2}
12529 \end_layout
12530
12531 \end_inset
12532
12533
12534 \end_layout
12535
12536 \begin_layout Itemize
12537
12538 \family sans
12539 My
12540 \begin_inset space ~
12541 \end_inset
12542
12543 Logo
12544 \end_layout
12545
12546 \begin_layout Itemize
12547
12548 \family sans
12549 Restriction
12550 \end_layout
12551
12552 \begin_layout Itemize
12553
12554 \family sans
12555 Right
12556 \begin_inset space ~
12557 \end_inset
12558
12559 Footer
12560 \end_layout
12561
12562 \begin_layout Itemize
12563
12564 \family sans
12565 Right
12566 \begin_inset space ~
12567 \end_inset
12568
12569 Header
12570 \end_layout
12571
12572 \begin_layout Itemize
12573
12574 \family sans
12575 Left
12576 \begin_inset space ~
12577 \end_inset
12578
12579 Header
12580 \end_layout
12581
12582 \begin_deeper
12583 \begin_layout Standard
12584 \begin_inset space ~
12585 \end_inset
12586
12587
12588 \end_layout
12589
12590 \end_deeper
12591 \begin_layout Standard
12592 \begin_inset ERT
12593 status open
12594
12595 \begin_layout Plain Layout
12596
12597
12598 \backslash
12599 end{multicols}
12600 \end_layout
12601
12602 \end_inset
12603
12604
12605 \end_layout
12606
12607 \begin_layout Standard
12608 There are also a few commands provided by 
12609 \family sans
12610 Foil
12611 \family default
12612 TeX that aren't directly supported by LyX but I'll tell you what they do
12613  and how to use them in section
12614 \begin_inset space ~
12615 \end_inset
12616
12617
12618 \begin_inset CommandInset ref
12619 LatexCommand ref
12620 reference "sec:unsuppfoils"
12621
12622 \end_inset
12623
12624 .
12625 \end_layout
12626
12627 \begin_layout Subsection
12628 Building a Set of Foils
12629 \end_layout
12630
12631 \begin_layout Standard
12632 This section will give a simple introduction to using the different environments
12633  to build a set of foils.
12634  If you want to see an example set of foils take a look at the 
12635 \family typewriter
12636 Foils.lyx
12637 \family default
12638  file accessible from the 
12639 \family sans
12640 \bar under
12641 F
12642 \bar default
12643 ile\SpecialChar \menuseparator
12644
12645 \bar under
12646 O
12647 \bar default
12648 pen\SpecialChar \ldots{}
12649
12650 \family default
12651  dialog under the 
12652 \family sans
12653 Examples
12654 \family default
12655  button.
12656  
12657 \end_layout
12658
12659 \begin_layout Subsubsection
12660 Give It a Title Page
12661 \end_layout
12662
12663 \begin_layout Standard
12664 Unlike other classes that provide 
12665 \family sans
12666 Title
12667 \family default
12668
12669 \family sans
12670 Author
12671 \family default
12672
12673 \family sans
12674 Date
12675 \family default
12676  and 
12677 \family sans
12678 Abstract
12679 \family default
12680  environments, 
12681 \family sans
12682 foils
12683 \family default
12684  creates the title on a page of its own.
12685  If you leave out the 
12686 \family sans
12687 Date
12688 \family default
12689  environment LaTeX will substitute the current date (every time you regenerate
12690  the output).
12691 \end_layout
12692
12693 \begin_layout Subsubsection
12694 Start a New Foil
12695 \end_layout
12696
12697 \begin_layout Standard
12698 As I mentioned earlier, there are four ways of starting a new foil.
12699  For portrait foils you should use 
12700 \family sans
12701 Foilhead
12702 \family default
12703  or 
12704 \family sans
12705 ShortFoilhead.
12706
12707 \family default
12708  The difference between these two environments is the amount of space between
12709  the title of the foil (the foilhead) and the body of the foil.
12710 \end_layout
12711
12712 \begin_layout Standard
12713 Landscape foils are generated using the 
12714 \family sans
12715 Rotatefoilhead
12716 \family default
12717  and 
12718 \family sans
12719 ShortRotatefoilhead
12720 \family default
12721  environments.
12722  Again the only difference is the spacing between foilhead and body.
12723  Both of the short versions have 0.5 inches less separation between the foilhead
12724  and the body.
12725  
12726 \end_layout
12727
12728 \begin_layout Standard
12729 One problem with the support for landscape foils is the requirement that
12730  you have to use the 
12731 \family typewriter
12732 dvips
12733 \family default
12734  driver to generate the PostScript output otherwise the foils won't be rotated.
12735  It is possible to get landscape foils even if you haven't got the 
12736 \family typewriter
12737 dvips
12738 \family default
12739  driver provided you can feed your foils sideways through your printer ;-)
12740 \end_layout
12741
12742 \begin_layout Subsubsection
12743 Theorems, Lemmas, Proofs and more
12744 \end_layout
12745
12746 \begin_layout Standard
12747 Due to a small bug in LyX you can't have two of the same type of these environme
12748 nts directly following each other.
12749  They must be separated by something.
12750  If you try, you will just be extending the previous environment as if you
12751  had merged the two environments together.
12752  So, how do you get around this problem? The simplest option is to insert
12753  some text between the two environments or add a 
12754 \family sans
12755 LaTeX
12756 \family default
12757  environment between the two with just a 
12758 \begin_inset Quotes eld
12759 \end_inset
12760
12761
12762 \family typewriter
12763 %
12764 \family default
12765
12766 \begin_inset Quotes erd
12767 \end_inset
12768
12769  in it.
12770  This will force LyX to produce two separate environments and hence the
12771  correct LaTeX output.
12772  An example is provided in the example file included with the LyX distribution.
12773  Remember, this problem only occurs if you are trying to place two of the
12774  same type of theorem-like environments one directly after the other.
12775 \end_layout
12776
12777 \begin_layout Subsubsection
12778 Lists
12779 \end_layout
12780
12781 \begin_layout Standard
12782 You get all the commonly supported list styles found in other classes as
12783  well as two new ones.
12784  I'll only describe the new ones here.
12785  If you want to find out more about the other list environments check out
12786  the 
12787 \emph on
12788 User's Guide.
12789
12790 \emph default
12791  If you intend to use itemized lists you might also want to read about the
12792  
12793 \family sans
12794 Itemize
12795 \begin_inset space ~
12796 \end_inset
12797
12798 Bullet
12799 \begin_inset space ~
12800 \end_inset
12801
12802 Selection
12803 \family default
12804  dialog described above in section
12805 \begin_inset space ~
12806 \end_inset
12807
12808
12809 \begin_inset CommandInset ref
12810 LatexCommand ref
12811 reference "sec:bullet"
12812
12813 \end_inset
12814
12815 .
12816 \end_layout
12817
12818 \begin_layout Standard
12819 The two new list styles, 
12820 \family sans
12821 TickList
12822 \family default
12823  and 
12824 \family sans
12825 CrossList
12826 \family default
12827 , are designed to make it easier for you to create lists of do's and don'ts
12828  or right and wrong by providing dedicated environments that use a tick
12829  or a cross as the label of the list.
12830  These lists are in fact dedicated variants of the 
12831 \family sans
12832 Itemize
12833 \family default
12834  environment.
12835  They do however require that you have the 
12836 \family typewriter
12837 psnfss
12838 \family default
12839  packages installed.
12840 \end_layout
12841
12842 \begin_layout Subsubsection
12843 Figures and Tables
12844 \end_layout
12845
12846 \begin_layout Standard
12847
12848 \family sans
12849 Foil
12850 \family default
12851 TeX redefines the floating tables and figures so that they appear exactly
12852  where they are in the text rather than pushing them to the top of the page
12853  or to some user specified location.
12854  In fact if you change the float placement settings they are simply ignored.
12855 \end_layout
12856
12857 \begin_layout Subsubsection
12858 Page Headers and Footers
12859 \begin_inset CommandInset label
12860 LatexCommand label
12861 name "sec:foilfoot"
12862
12863 \end_inset
12864
12865
12866 \end_layout
12867
12868 \begin_layout Standard
12869
12870 \family sans
12871 My
12872 \begin_inset space ~
12873 \end_inset
12874
12875 Logo
12876 \family default
12877  and 
12878 \family sans
12879 Restriction
12880 \family default
12881  are two commands used to control the left-footer text string.
12882  The first is meant to allow you to include a graphic logo on your foils
12883  and defaults to 
12884 \begin_inset Quotes eld
12885 \end_inset
12886
12887 -Typeset by 
12888 \family sans
12889 Foil
12890 \family default
12891 TeX-
12892 \begin_inset Quotes erd
12893 \end_inset
12894
12895 .
12896  While the second is meant to provide a classification for the audience,
12897  
12898 \emph on
12899 e.
12900 \begin_inset space \thinspace{}
12901 \end_inset
12902
12903 g.
12904 \emph default
12905
12906 \begin_inset space ~
12907 \end_inset
12908
12909 Confidential.
12910  It is empty by default.
12911 \end_layout
12912
12913 \begin_layout Standard
12914 The remaining page corners can be filled by 
12915 \family sans
12916 Right
12917 \begin_inset space ~
12918 \end_inset
12919
12920 Footer
12921 \family default
12922  (which defaults to page numbers), 
12923 \family sans
12924 Right
12925 \begin_inset space ~
12926 \end_inset
12927
12928 Header
12929 \family default
12930  (top right) and 
12931 \family sans
12932 Left
12933 \begin_inset space ~
12934 \end_inset
12935
12936 Header
12937 \family default
12938  (top left).
12939 \end_layout
12940
12941 \begin_layout Subsection
12942 Unsupported 
12943 \family sans
12944 Foil
12945 \family default
12946 TeX Goodies
12947 \begin_inset CommandInset label
12948 LatexCommand label
12949 name "sec:unsuppfoils"
12950
12951 \end_inset
12952
12953
12954 \end_layout
12955
12956 \begin_layout Standard
12957 All the commands mentioned below need to be set in a 
12958 \family sans
12959 LaTeX
12960 \family default
12961  environment or as 
12962 \family sans
12963 TeX
12964 \family default
12965  within another environment.
12966 \end_layout
12967
12968 \begin_layout Subsubsection
12969 Lengths
12970 \end_layout
12971
12972 \begin_layout Standard
12973 All lengths are adjusted using the 
12974 \family typewriter
12975
12976 \backslash
12977 setlength{
12978 \family default
12979 \emph on
12980 lengthname
12981 \family typewriter
12982 \emph default
12983 }{
12984 \family default
12985 \emph on
12986 newlength
12987 \family typewriter
12988 \emph default
12989 }
12990 \family default
12991  command.
12992  Where 
12993 \emph on
12994 lengthname
12995 \emph default
12996  should be replaced by the name given to the length you want to change and
12997  
12998 \emph on
12999 newlength
13000 \emph default
13001  is the length value.
13002  All lengths should be specified in units of length such as inches (
13003 \family typewriter
13004 in
13005 \family default
13006 ), millimeters (
13007 \family typewriter
13008 mm
13009 \family default
13010 ) or points (
13011 \family typewriter
13012 pt
13013 \family default
13014 ) or relative to some document or font-based length such as 
13015 \family typewriter
13016
13017 \backslash
13018 textwidth
13019 \family default
13020 .
13021  
13022 \end_layout
13023
13024 \begin_layout Standard
13025 It's possible to change the spacing between a foilhead and the body of the
13026  foil by adjusting the length specified by 
13027 \family typewriter
13028
13029 \backslash
13030 foilheadskip
13031 \family default
13032 .
13033  For example, to make 
13034 \emph on
13035 all
13036 \emph default
13037  foilheads 0.5 inches closer to their bodies put the following in the preamble:
13038  
13039 \family typewriter
13040
13041 \backslash
13042 setlength{
13043 \backslash
13044 foilheadskip}{-0.5in}
13045 \end_layout
13046
13047 \begin_layout Standard
13048 The spacings around floats can be adjusted by setting these lengths:
13049 \end_layout
13050
13051 \begin_layout Labeling
13052 \labelwidthstring MMMMMMMMMMM
13053
13054 \family typewriter
13055
13056 \backslash
13057 abovefloatskip
13058 \family default
13059  Separation between the text and the top of the float
13060 \end_layout
13061
13062 \begin_layout Labeling
13063 \labelwidthstring MMMMMMMMMMM
13064
13065 \family typewriter
13066
13067 \backslash
13068 abovecaptionskip
13069 \family default
13070  Separation between the float and the caption
13071 \end_layout
13072
13073 \begin_layout Labeling
13074 \labelwidthstring MMMMMMMMMMM
13075
13076 \family typewriter
13077
13078 \backslash
13079 belowcaptionskip
13080 \family default
13081  Separation between the caption and the following text
13082 \end_layout
13083
13084 \begin_layout Labeling
13085 \labelwidthstring MMMMMMMMMMM
13086
13087 \family typewriter
13088
13089 \backslash
13090 captionwidth
13091 \family default
13092  You can make the captions narrower than the surrounding text by adjusting
13093  this length.
13094  Best done relative to 
13095 \family typewriter
13096
13097 \backslash
13098 textwidth
13099 \family default
13100 .
13101 \end_layout
13102
13103 \begin_layout Standard
13104 There are also several title page related lengths that you may find useful
13105  if you have a long title or several authors:
13106 \end_layout
13107
13108 \begin_layout Labeling
13109 \labelwidthstring MMMMMMMMMMM
13110
13111 \family typewriter
13112
13113 \backslash
13114 abovetitleskip
13115 \family default
13116  Separation from headers to 
13117 \family sans
13118 Title
13119 \end_layout
13120
13121 \begin_layout Labeling
13122 \labelwidthstring MMMMMMMMMMM
13123
13124 \family typewriter
13125
13126 \backslash
13127 titleauthorskip
13128 \family default
13129  between 
13130 \family sans
13131 Title
13132 \family default
13133  and 
13134 \family sans
13135 Author
13136 \family default
13137  environments
13138 \end_layout
13139
13140 \begin_layout Labeling
13141 \labelwidthstring MMMMMMMMMMM
13142
13143 \family typewriter
13144
13145 \backslash
13146 authorauthorskip
13147 \family default
13148  between multiple 
13149 \family sans
13150 Author
13151 \family default
13152  lines
13153 \end_layout
13154
13155 \begin_layout Labeling
13156 \labelwidthstring MMMMMMMMMMM
13157
13158 \family typewriter
13159
13160 \backslash
13161 authordateskip
13162 \family default
13163  between the 
13164 \family sans
13165 Author
13166 \family default
13167  and the 
13168 \family sans
13169 Date
13170 \end_layout
13171
13172 \begin_layout Labeling
13173 \labelwidthstring MMMMMMMMMMM
13174
13175 \family typewriter
13176
13177 \backslash
13178 dateabstractskip
13179 \family default
13180  between the 
13181 \family sans
13182 Date
13183 \family default
13184  and the 
13185 \family sans
13186 Abstract
13187 \end_layout
13188
13189 \begin_layout Standard
13190 The last length related command affects all the list environments.
13191  If you place 
13192 \family typewriter
13193
13194 \backslash
13195 zerolistvertdimens
13196 \family default
13197  
13198 \emph on
13199 inside
13200 \emph default
13201  a list environment then all the vertical spacing between the list items
13202  is removed.
13203  Note that this is a command not a length so it doesn't require 
13204 \family typewriter
13205
13206 \backslash
13207 setlength
13208 \family default
13209  like the stuff mentioned above.
13210 \end_layout
13211
13212 \begin_layout Subsubsection
13213 Headers and Footers
13214 \end_layout
13215
13216 \begin_layout Standard
13217 The 
13218 \family typewriter
13219
13220 \backslash
13221 LogoOn
13222 \family default
13223  and 
13224 \family typewriter
13225
13226 \backslash
13227 LogoOff
13228 \family default
13229  commands control whether the logo in the 
13230 \family sans
13231 MyLogo
13232 \family default
13233  definition appear on a given page.
13234  If you put 
13235 \family typewriter
13236
13237 \backslash
13238 LogoOff
13239 \family default
13240  in the preamble then none of the foils will have the logo on them.
13241  If you don't want the logo on a particular page place the 
13242 \family typewriter
13243
13244 \backslash
13245 LogoOff
13246 \family default
13247  directly after the foilhead of that page and the 
13248 \family typewriter
13249
13250 \backslash
13251 LogoOn
13252 \family default
13253  directly after the next foilhead.
13254 \end_layout
13255
13256 \begin_layout Standard
13257 If you decide to use the 
13258 \family sans
13259 fancy
13260 \family default
13261  page style setting in the 
13262 \family sans
13263 Document
13264 \begin_inset space ~
13265 \end_inset
13266
13267 Layout
13268 \family default
13269  dialog you should probably add 
13270 \family typewriter
13271
13272 \backslash
13273 let
13274 \backslash
13275 headwidth
13276 \backslash
13277 textwidth
13278 \family default
13279  to your preamble so headers and footers on landscape pages are correctly
13280  placed when rotated.
13281  This is due to some clashes between the page layouts provided by the 
13282 \family sans
13283 fancyheadings
13284 \family default
13285  package and the 
13286 \family sans
13287 foils
13288 \family default
13289  class.
13290 \end_layout
13291
13292 \begin_layout Section
13293 Latex8 (IEEE Conference Papers)
13294 \end_layout
13295
13296 \begin_layout Standard
13297 by 
13298 \noun on
13299 Allan Rae
13300 \end_layout
13301
13302 \begin_layout Subsection
13303 Introduction
13304 \end_layout
13305
13306 \begin_layout Standard
13307 Since this class is specifically for writing submissions to IEEE sponsored
13308  conferences I strongly recommend that you get a copy of their Authors Kit.
13309  The 
13310 \family sans
13311 latex.sty
13312 \family default
13313  package and associated bibliography style file is included in the kit.
13314  The Authors Kit is usually sent out by email once your initial submission
13315  has been accepted.
13316  There is a lot of useful information in the Authors Kit explaining formatting
13317  restrictions and so on and I will assume you have read this since that
13318  means I don't have to repeat it all here.
13319 \end_layout
13320
13321 \begin_layout Subsection
13322 Getting Started
13323 \end_layout
13324
13325 \begin_layout Standard
13326 [AR\SpecialChar \@.
13327  more to come]
13328 \end_layout
13329
13330 \begin_layout Subsection
13331 Supported Environments
13332 \end_layout
13333
13334 \begin_layout Itemize
13335
13336 \family sans
13337 Standard
13338 \end_layout
13339
13340 \begin_layout Itemize
13341
13342 \family sans
13343 Title
13344 \end_layout
13345
13346 \begin_layout Itemize
13347
13348 \family sans
13349 Author
13350 \end_layout
13351
13352 \begin_layout Itemize
13353
13354 \family sans
13355 E-mail
13356 \end_layout
13357
13358 \begin_layout Itemize
13359
13360 \family sans
13361 Affiliation
13362 \end_layout
13363
13364 \begin_layout Itemize
13365
13366 \family sans
13367 Abstract
13368 \end_layout
13369
13370 \begin_layout Itemize
13371
13372 \family sans
13373 Section
13374 \end_layout
13375
13376 \begin_layout Itemize
13377
13378 \family sans
13379 SubSection
13380 \end_layout
13381
13382 \begin_layout Itemize
13383
13384 \family sans
13385 Caption
13386 \end_layout
13387
13388 \begin_layout Subsection
13389 Differences Between Screen and Paper
13390 \end_layout
13391
13392 \begin_layout Standard
13393 There are slight differences in appearance mainly with the presentation
13394  of section counters.
13395  On screen the trailing period of the section counter is missing but it
13396  will appear in the output so don't let this worry you.
13397 \end_layout
13398
13399 \begin_layout Section
13400 Hollywood (Hollywood spec scripts)
13401 \end_layout
13402
13403 \begin_layout Standard
13404 by 
13405 \shape smallcaps
13406 Garst Reese
13407 \end_layout
13408
13409 \begin_layout Subsection
13410 Introduction
13411 \end_layout
13412
13413 \begin_layout Standard
13414 Getting the format of a Hollywood script right is a 
13415 \begin_inset Quotes eld
13416 \end_inset
13417
13418 rite of passage.
13419 \begin_inset Quotes erd
13420 \end_inset
13421
13422  It is designed to make the readers focus on content and to be easy and
13423  familiar for the actors to read.
13424  Each page of a script should be one minute of film.
13425  Nothing goes in a script that you cannot see or hear on screen.
13426  The courier 12 pt font should be used throughout.
13427  No italics.
13428 \end_layout
13429
13430 \begin_layout Subsection
13431 Special problems
13432 \end_layout
13433
13434 \begin_layout Standard
13435 Speakers' lines should NEVER break in mid-sentence.
13436  If a speaker's lines continue over a page break, repeat the 
13437 \family sans
13438 Speaker
13439 \family default
13440  title followed by (Cont'd).
13441 \end_layout
13442
13443 \begin_layout Subsection
13444 Special features
13445 \end_layout
13446
13447 \begin_layout Standard
13448 Insert the 
13449 \family sans
13450 Speaker
13451 \family default
13452  names as labels then cross-reference the label to insert the name.
13453  The cross-reference dialog will show the current cast of characters.
13454  You can use this to insert the speaker name in narratives also.
13455 \end_layout
13456
13457 \begin_layout Subsection
13458 Paper size and Margins
13459 \end_layout
13460
13461 \begin_layout Standard
13462 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
13463 \end_layout
13464
13465 \begin_layout Subsection
13466 Environments
13467 \end_layout
13468
13469 \begin_layout Standard
13470 The following environments are available.
13471  You can use hollywood.bind to get the bind keys shown at the right.
13472 \end_layout
13473
13474 \begin_layout Itemize
13475
13476 \family sans
13477 Standard
13478 \begin_inset Newline newline
13479 \end_inset
13480
13481
13482 \family default
13483 Used where nothing else works.
13484  Try to avoid it.
13485 \end_layout
13486
13487 \begin_layout Itemize
13488
13489 \family sans
13490 FADE_IN
13491 \family default
13492 :
13493 \begin_inset space \hfill{}
13494 \end_inset
13495
13496
13497 \family sans
13498 M-z S-I
13499 \family default
13500
13501 \begin_inset Newline newline
13502 \end_inset
13503
13504 Usually followed by something like 
13505 \begin_inset Quotes eld
13506 \end_inset
13507
13508 on Sally waking up.
13509 \begin_inset Quotes erd
13510 \end_inset
13511
13512
13513 \end_layout
13514
13515 \begin_layout Itemize
13516
13517 \family sans
13518 INT:
13519 \begin_inset space \hfill{}
13520 \end_inset
13521
13522 M-z i
13523 \begin_inset Newline newline
13524 \end_inset
13525
13526
13527 \family default
13528 Introduces a new INTERIOR camera set-up.
13529  Always followed by DAY or NIGHT, or something similar to define the lighting
13530  required.
13531  Everthing on this line in CAPS.
13532 \end_layout
13533
13534 \begin_layout Itemize
13535
13536 \family sans
13537 EXT:
13538 \begin_inset space \hfill{}
13539 \end_inset
13540
13541 M-z e
13542 \begin_inset Newline newline
13543 \end_inset
13544
13545
13546 \family default
13547 Introduces a new EXTERIOR camera set-up.
13548  Everthing on this line in CAPS.
13549 \end_layout
13550
13551 \begin_layout Itemize
13552
13553 \family sans
13554 Speaker
13555 \begin_inset space \hfill{}
13556 \end_inset
13557
13558 M-z s
13559 \begin_inset Newline newline
13560 \end_inset
13561
13562
13563 \family default
13564 The character speaking.
13565 \end_layout
13566
13567 \begin_layout Itemize
13568
13569 \family sans
13570 Parenthetical
13571 \begin_inset space \hfill{}
13572 \end_inset
13573
13574 M-z p
13575 \begin_inset Newline newline
13576 \end_inset
13577
13578
13579 \family default
13580 Instructions to the speaker.
13581  The () are automatically inserted, but only the ( will show in LyX.
13582  Both will be printed.
13583 \end_layout
13584
13585 \begin_layout Itemize
13586
13587 \family sans
13588 Dialogue
13589 \begin_inset space \hfill{}
13590 \end_inset
13591
13592 M-z d
13593 \begin_inset Newline newline
13594 \end_inset
13595
13596
13597 \family default
13598 What the 
13599 \family sans
13600 Speaker
13601 \family default
13602  says.
13603 \end_layout
13604
13605 \begin_layout Itemize
13606
13607 \family sans
13608 Transition
13609 \begin_inset space \hfill{}
13610 \end_inset
13611
13612 M-z t
13613 \begin_inset Newline newline
13614 \end_inset
13615
13616
13617 \family default
13618 Camera movement instruction.
13619  e.
13620 \begin_inset space \thinspace{}
13621 \end_inset
13622
13623 g.
13624 \begin_inset space ~
13625 \end_inset
13626
13627 CUT TO:
13628 \end_layout
13629
13630 \begin_layout Itemize
13631
13632 \family sans
13633 FADE OUT:
13634 \begin_inset space \hfill{}
13635 \end_inset
13636
13637 M-z S-I
13638 \end_layout
13639
13640 \begin_layout Itemize
13641
13642 \family sans
13643 Author
13644 \begin_inset space \hfill{}
13645 \end_inset
13646
13647 M-z S-A
13648 \end_layout
13649
13650 \begin_layout Itemize
13651
13652 \family sans
13653 Title
13654 \begin_inset space \hfill{}
13655 \end_inset
13656
13657 M-z S-T
13658 \end_layout
13659
13660 \begin_layout Itemize
13661
13662 \family sans
13663 Right_Address
13664 \begin_inset space \hfill{}
13665 \end_inset
13666
13667 M-z r
13668 \end_layout
13669
13670 \begin_layout Subsection
13671 Script jargon
13672 \end_layout
13673
13674 \begin_layout Itemize
13675 (O.S) --- off screen
13676 \end_layout
13677
13678 \begin_layout Itemize
13679 (V.0) --- voice over
13680 \end_layout
13681
13682 \begin_layout Itemize
13683 b.g.
13684  --- background
13685 \end_layout
13686
13687 \begin_layout Itemize
13688 C.U.
13689  --- close-up
13690 \end_layout
13691
13692 \begin_layout Itemize
13693 PAN --- camera movement
13694 \end_layout
13695
13696 \begin_layout Itemize
13697 INSERT --- cut to close-up of
13698 \end_layout
13699
13700 \begin_layout Section
13701 Broadway
13702 \end_layout
13703
13704 \begin_layout Standard
13705 by 
13706 \shape smallcaps
13707 Garst Reese
13708 \end_layout
13709
13710 \begin_layout Subsection
13711 Introduction
13712 \end_layout
13713
13714 \begin_layout Standard
13715 Broadway is for writing plays.
13716  The format is more decorative than Hollywood, and much less standardized.
13717  This format should be suitable for workshops.
13718 \end_layout
13719
13720 \begin_layout Subsection
13721 Special problems
13722 \end_layout
13723
13724 \begin_layout Standard
13725 The same as in Hollywood.
13726 \end_layout
13727
13728 \begin_layout Subsection
13729 Special features
13730 \end_layout
13731
13732 \begin_layout Standard
13733 Insert the 
13734 \family sans
13735 Speaker
13736 \family default
13737  names as labels then cross-reference the label to insert the name.
13738  The cross-reference dialog will show the current cast of characters.
13739 \end_layout
13740
13741 \begin_layout Subsection
13742 Paper size and Margins
13743 \end_layout
13744
13745 \begin_layout Standard
13746 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
13747 \end_layout
13748
13749 \begin_layout Subsection
13750 Environments
13751 \end_layout
13752
13753 \begin_layout Standard
13754 The following environments are available.
13755  You can use broadway.bind to get the bind keys shown at the right.
13756 \end_layout
13757
13758 \begin_layout Itemize
13759
13760 \family sans
13761 Standard
13762 \begin_inset Newline newline
13763 \end_inset
13764
13765
13766 \family default
13767 You should not have to use this, but it is here for anything that does not
13768  fit otherwise.
13769 \end_layout
13770
13771 \begin_layout Itemize
13772
13773 \family sans
13774 Narrative
13775 \begin_inset space \hfill{}
13776 \end_inset
13777
13778 M-z n
13779 \begin_inset Newline newline
13780 \end_inset
13781
13782
13783 \family default
13784 Used to describe stage setting and the action.
13785  First use of speaker names in all CAPs.
13786 \end_layout
13787
13788 \begin_layout Itemize
13789
13790 \family sans
13791 ACT
13792 \begin_inset space \hfill{}
13793 \end_inset
13794
13795 M-z a
13796 \begin_inset Newline newline
13797 \end_inset
13798
13799
13800 \family default
13801 Automatically numbered.
13802  On screen it will be arabic, but will print as Roman.
13803 \end_layout
13804
13805 \begin_layout Itemize
13806
13807 \family sans
13808 ACT*
13809 \begin_inset space \hfill{}
13810 \end_inset
13811
13812 M-z S at
13813 \begin_inset Newline newline
13814 \end_inset
13815
13816
13817 \family default
13818 Subtitle for 
13819 \family sans
13820 ACT.
13821
13822 \family default
13823  It is just centered text.
13824 \end_layout
13825
13826 \begin_layout Itemize
13827
13828 \family sans
13829 SCENE
13830 \begin_inset space \hfill{}
13831 \end_inset
13832
13833 M-z S-S
13834 \begin_inset Newline newline
13835 \end_inset
13836
13837
13838 \family default
13839 Not automatically numbered.
13840  You supply the number.
13841  This is because I couldn't figure out how.
13842 \end_layout
13843
13844 \begin_layout Itemize
13845
13846 \family sans
13847 AT_RISE:
13848 \begin_inset space \hfill{}
13849 \end_inset
13850
13851 M-z S-R
13852 \begin_inset Newline newline
13853 \end_inset
13854
13855
13856 \family default
13857 A special case of Narrative to describe the setting and action as the curtain
13858  rises.
13859 \end_layout
13860
13861 \begin_layout Itemize
13862
13863 \family sans
13864 Speaker
13865 \begin_inset space \hfill{}
13866 \end_inset
13867
13868 M-z s
13869 \begin_inset Newline newline
13870 \end_inset
13871
13872
13873 \family default
13874 The speaker's (actor's) title, centered in all CAPS.
13875 \end_layout
13876
13877 \begin_layout Itemize
13878
13879 \family sans
13880 Parenthetical
13881 \begin_inset space \hfill{}
13882 \end_inset
13883
13884 M-z p
13885 \begin_inset Newline newline
13886 \end_inset
13887
13888
13889 \family default
13890 Instructions to the speaker.
13891  The parentheses are automatically inserted.
13892  The ( will appear on screen, but both will be in the printed play.
13893  This environment is only used within 
13894 \family sans
13895 Dialogue
13896 \family default
13897 .
13898 \end_layout
13899
13900 \begin_layout Itemize
13901
13902 \family sans
13903 Dialogue
13904 \begin_inset space \hfill{}
13905 \end_inset
13906
13907 M-z d
13908 \begin_inset Newline newline
13909 \end_inset
13910
13911
13912 \family default
13913 What the Speaker says.
13914 \end_layout
13915
13916 \begin_layout Itemize
13917
13918 \family sans
13919 CURTAIN
13920 \begin_inset space \hfill{}
13921 \end_inset
13922
13923 M-z S-C
13924 \begin_inset Newline newline
13925 \end_inset
13926
13927
13928 \family default
13929 The curtain comes down.
13930 \end_layout
13931
13932 \begin_layout Itemize
13933
13934 \family sans
13935 Title
13936 \begin_inset space \hfill{}
13937 \end_inset
13938
13939 M-z S-T
13940 \end_layout
13941
13942 \begin_layout Itemize
13943
13944 \family sans
13945 Author
13946 \begin_inset space \hfill{}
13947 \end_inset
13948
13949 M-z S-A
13950 \end_layout
13951
13952 \begin_layout Itemize
13953
13954 \family sans
13955 Right_Address
13956 \begin_inset space \hfill{}
13957 \end_inset
13958
13959 M-z r
13960 \end_layout
13961
13962 \begin_layout Standard
13963 Hello there.
13964 \end_layout
13965
13966 \begin_layout Section
13967 RevTeX4
13968 \end_layout
13969
13970 \begin_layout Standard
13971 by 
13972 \noun on
13973 Amir Karger
13974 \end_layout
13975
13976 \begin_layout Standard
13977 \begin_inset VSpace bigskip
13978 \end_inset
13979
13980
13981 \end_layout
13982
13983 \begin_layout Standard
13984 \noindent
13985 The 
13986 \family sans
13987 Revtex
13988 \begin_inset space ~
13989 \end_inset
13990
13991 4
13992 \family default
13993  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
13994 \begin_inset Formula $\beta$
13995 \end_inset
13996
13997  release of May, 1999) class.
13998 \end_layout
13999
14000 \begin_layout Standard
14001 LyX has a 
14002 \family sans
14003 Revtex
14004 \family default
14005  textclass, which works with RevTeX 3.1.
14006  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14007  That means that it doesn't interact very well with LyX, which requires
14008  LaTeX2e, although it has been kludged to work.
14009  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14010  LyX with the 
14011 \family sans
14012 RevTeX
14013 \begin_inset space ~
14014 \end_inset
14015
14016 4
14017 \family default
14018  textclass should also be pretty easy to use.
14019 \end_layout
14020
14021 \begin_layout Standard
14022 These documents are supposed to be used in 
14023 \emph on
14024 addition
14025 \emph default
14026  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14027  macros, and assume you'll know what to put in the preamble if necessary.
14028 \end_layout
14029
14030 \begin_layout Subsection
14031 Installation
14032 \end_layout
14033
14034 \begin_layout Standard
14035 All you need to do is install RevTeX 4, as described in the package's README
14036  file.
14037  The package can be found at The RevTeX 4 Web Site 
14038 \begin_inset Flex URL
14039 status collapsed
14040
14041 \begin_layout Plain Layout
14042
14043 http://publish.aps.org/revtex4/
14044 \end_layout
14045
14046 \end_inset
14047
14048 .
14049  Install it somewhere that LaTeX can see it.
14050  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14051  (i.e., not the directory where you installed the class file.) Then, if you
14052  reconfigure LyX, it will find the class file and let you use the RevTeX4
14053  textclass.
14054 \end_layout
14055
14056 \begin_layout Standard
14057 Probably the easiest way to get started is either to import a RevTeX 4 document
14058  using 
14059 \family typewriter
14060 tex2lyx
14061 \family default
14062 , or to use the 
14063 \family sans
14064 Revtex
14065 \begin_inset space ~
14066 \end_inset
14067
14068 4
14069 \family default
14070  template, found in the templates directory.
14071 \end_layout
14072
14073 \begin_layout Subsection
14074 Preamble Matter
14075 \end_layout
14076
14077 \begin_layout Standard
14078 Optional arguments to 
14079 \family typewriter
14080
14081 \backslash
14082 documentclass
14083 \family default
14084 , like 
14085 \begin_inset Quotes eld
14086 \end_inset
14087
14088 preprint
14089 \begin_inset Quotes erd
14090 \end_inset
14091
14092  and 
14093 \begin_inset Quotes eld
14094 \end_inset
14095
14096 aps
14097 \begin_inset Quotes erd
14098 \end_inset
14099
14100 , go in the 
14101 \family sans
14102 E
14103 \bar under
14104 x
14105 \bar default
14106 tra
14107 \begin_inset space ~
14108 \end_inset
14109
14110 Options
14111 \family default
14112  field in the 
14113 \family sans
14114 Document
14115 \begin_inset space ~
14116 \end_inset
14117
14118 Layout
14119 \family default
14120  dialog, as usual.
14121  Remember that in RevTeX, at least one optional argument is required! 
14122 \end_layout
14123
14124 \begin_layout Standard
14125 Other preamble matter, like 
14126 \family typewriter
14127
14128 \backslash
14129 draft
14130 \family default
14131  etc.
14132 \begin_inset space ~
14133 \end_inset
14134
14135 goes in the 
14136 \family sans
14137 La
14138 \family default
14139 T
14140 \family sans
14141 eX
14142 \begin_inset space ~
14143 \end_inset
14144
14145 Preamble
14146 \family default
14147  dialog, also as usual.
14148 \end_layout
14149
14150 \begin_layout Subsection
14151 Layouts
14152 \end_layout
14153
14154 \begin_layout Standard
14155 The layouts basically correspond to the commands in RevTeX4.0.
14156  For example, the Email layout corresponds to 
14157 \family typewriter
14158
14159 \backslash
14160 email{}
14161 \family default
14162 .
14163  Note that (at least as of RevTeX 4.0 Beta), the 
14164 \family sans
14165 Address
14166 \family default
14167  and 
14168 \family sans
14169 Affiliation
14170 \family default
14171  layouts are exactly equivalent, so you shouldn't need to use both.
14172 \begin_inset Foot
14173 status collapsed
14174
14175 \begin_layout Plain Layout
14176 In case you're curious, both were included so that 
14177 \family typewriter
14178 tex2lyx
14179 \family default
14180  would be able to translate both 
14181 \family typewriter
14182
14183 \backslash
14184 address
14185 \family default
14186  and 
14187 \family typewriter
14188
14189 \backslash
14190 affiliation
14191 \family default
14192 .
14193 \end_layout
14194
14195 \end_inset
14196
14197
14198 \end_layout
14199
14200 \begin_layout Subsection
14201 Important Notes
14202 \end_layout
14203
14204 \begin_layout Standard
14205 There are a couple of important unique aspects of RevTeX 4 which might cause
14206  bugs that will be even more confusing in LyX.
14207 \end_layout
14208
14209 \begin_layout Standard
14210 In RevTeX, the 
14211 \family typewriter
14212
14213 \backslash
14214 thanks
14215 \family default
14216  command goes 
14217 \emph on
14218 outside
14219 \emph default
14220  the 
14221 \family typewriter
14222
14223 \backslash
14224 author
14225 \family default
14226  command.
14227  The LyX equivalent is that there is a separate Thanks layout.
14228  Do 
14229 \emph on
14230 not
14231 \emph default
14232  write footnotes in the 
14233 \family sans
14234 Author
14235 \family default
14236  layout, or weird things may happen.
14237  See the RevTeX 4 documentation for more details.
14238 \end_layout
14239
14240 \begin_layout Standard
14241 Also, the 
14242 \family sans
14243 Author
14244 \begin_inset space ~
14245 \end_inset
14246
14247 Email
14248 \family default
14249
14250 \family sans
14251 Author
14252 \begin_inset space ~
14253 \end_inset
14254
14255 URL
14256 \family default
14257 , and 
14258 \family sans
14259 Thanks
14260 \family default
14261  layouts must be placed 
14262 \emph on
14263 in between
14264 \emph default
14265  the 
14266 \family sans
14267 Author
14268 \family default
14269  layout and the corresponding 
14270 \family sans
14271 Address
14272 \family default
14273  (or equivalent 
14274 \family sans
14275 Affiliation
14276 \family default
14277 ) layout.
14278  If you put the 
14279 \family sans
14280 Thanks
14281 \family default
14282  after the 
14283 \family sans
14284 Address
14285 \family default
14286 , the LaTeX won't compile.
14287 \end_layout
14288
14289 \begin_layout Subsection
14290 Drawbacks
14291 \end_layout
14292
14293 \begin_layout Standard
14294 The main problem with this layout is that you can't use the optional arguments
14295  to layouts like Email and Title.
14296  (The problem is not unique to this layout; you can't use optional arguments
14297  to the Section layouts either.) This means that after you export that file
14298  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
14299  need to edit the LaTeX file with a text editor to add the optional arguments
14300  to set, e.
14301 \begin_inset space \thinspace{}
14302 \end_inset
14303
14304 g., the running title for the page headers.
14305  Lacking these layouts makes the 
14306 \family typewriter
14307
14308 \backslash
14309 altaffiliation
14310 \family default
14311  (and the equivalent 
14312 \family typewriter
14313
14314 \backslash
14315 altaddress
14316 \family default
14317 ) useless, so the corresponding layouts don't exist, and will have to be
14318  added by hand.
14319 \begin_inset Foot
14320 status collapsed
14321
14322 \begin_layout Plain Layout
14323
14324 \emph on
14325 Note from JMarc:
14326 \emph default
14327  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
14328  has not been updated yet to take advantage of it.
14329 \end_layout
14330
14331 \end_inset
14332
14333  
14334 \end_layout
14335
14336 \begin_layout Section
14337 Article (mwart), book (mwbk) and report (mwrep)
14338 \begin_inset OptArg
14339 status collapsed
14340
14341 \begin_layout Plain Layout
14342 The 
14343 \family typewriter
14344 mw
14345 \family default
14346  Classes
14347 \end_layout
14348
14349 \end_inset
14350
14351
14352 \end_layout
14353
14354 \begin_layout Standard
14355 by 
14356 \noun on
14357 Tomasz Luczak
14358 \end_layout
14359
14360 \begin_layout Standard
14361 The LyX document classes 
14362 \emph on
14363 article (mwart)
14364 \emph default
14365
14366 \emph on
14367 report (mwrep)
14368 \emph default
14369  and 
14370 \emph on
14371 book
14372 \emph default
14373  
14374 \emph on
14375 (mwbk)
14376 \emph default
14377  correspond to the LaTeX document classes 
14378 \family typewriter
14379 mwart.cls
14380 \family default
14381
14382 \family typewriter
14383 mwrep.cls
14384 \family default
14385  and 
14386 \family typewriter
14387 mwbk.cls
14388 \family default
14389 , resp.
14390  They are replacements for the standard document classes 
14391 \family typewriter
14392 article.cls
14393 \family default
14394
14395 \family typewriter
14396 report.cls
14397 \family default
14398  and 
14399 \family typewriter
14400 book.cls
14401 \family default
14402 , resp., and fit better to Polish typography conventions in a number of points.
14403  
14404 \end_layout
14405
14406 \begin_layout Standard
14407 Basic differences:
14408 \end_layout
14409
14410 \begin_layout Itemize
14411 Unnumbered titles (with star, eg.
14412  
14413 \family sans
14414 Section*
14415 \family default
14416 ) are added into table of contents,
14417 \end_layout
14418
14419 \begin_layout Itemize
14420 Additional page styles:
14421 \end_layout
14422
14423 \begin_deeper
14424 \begin_layout Description
14425 uheadings header with separated lines,
14426 \end_layout
14427
14428 \begin_layout Description
14429 myheadings custom header, contents headers via commands: 
14430 \family typewriter
14431
14432 \backslash
14433 markright
14434 \family default
14435  and 
14436 \family typewriter
14437
14438 \backslash
14439 markboth
14440 \family default
14441 ,
14442 \end_layout
14443
14444 \begin_layout Description
14445 myuheadings custom header with separated lines,
14446 \end_layout
14447
14448 \begin_layout Description
14449 outer page number is placed on outer side of page
14450 \end_layout
14451
14452 \end_deeper
14453 \begin_layout Itemize
14454 Options 
14455 \end_layout
14456
14457 \begin_deeper
14458 \begin_layout Description
14459 rmheadings serif titles --- default,
14460 \end_layout
14461
14462 \begin_layout Description
14463 sfheadings sansserif titles,
14464 \end_layout
14465
14466 \begin_layout Description
14467 authortitle on title page first placed is author next title --- default,
14468 \end_layout
14469
14470 \begin_layout Description
14471 titleauthor on title page first placed is title next author,
14472 \end_layout
14473
14474 \begin_layout Description
14475 withmarginpar reserve place on page for margins.
14476 \end_layout
14477
14478 \end_deeper
14479 \begin_layout Section
14480 Elsevier Journals
14481 \end_layout
14482
14483 \begin_layout Standard
14484 By 
14485 \noun on
14486 Rod Pinna
14487 \end_layout
14488
14489 \begin_layout Standard
14490 Elsevier Science Publishers B.V.
14491  provides a standard LaTeX document class (
14492 \family typewriter
14493 elsart.cls
14494 \family default
14495 ) for submitting articles to their various journals.
14496  The style file can be downloaded directly from their web site: 
14497 \begin_inset Flex URL
14498 status collapsed
14499
14500 \begin_layout Plain Layout
14501
14502 http://authors.elsevier.com/
14503 \end_layout
14504
14505 \end_inset
14506
14507 .
14508  Instructions are supplied along with the class file, which details the
14509  requirements of the publishers.
14510  LyX includes package that allows for the use of this class, by a layout
14511  and a template file.
14512  Installation of the class file is the same as for any other LaTeX package;
14513  instructions are provided in the Elsevier documentation.
14514 \end_layout
14515
14516 \begin_layout Standard
14517 To make use of 
14518 \family typewriter
14519 elsart.cls
14520 \family default
14521 , a file 
14522 \family typewriter
14523 elsart.layout
14524 \family default
14525  is supplied.
14526  As the Elsevier class file is based mainly on the standard article class,
14527  most of the normal functionality is provided.
14528  The Elsevier class defines a number of mathematical environments, which
14529  are similar to the AMS environments.
14530  These commands are all described in the Elsevier documentation, and are
14531  available in LyX.
14532 \end_layout
14533
14534 \begin_layout Standard
14535 The easiest way to use the Elsevier style is to base documents on the included
14536  template file.
14537  It is best not to use options such as fancy headings or the geometry package,
14538  as elements such as these are defined by Elsevier in their style file.
14539  Ideally, no extra packages except those mentioned in the Elsevier documentation
14540  should be used.
14541  Essentially, Elsevier require as 
14542 \begin_inset Quotes eld
14543 \end_inset
14544
14545 clean
14546 \begin_inset Quotes erd
14547 \end_inset
14548
14549  a LaTeX file as possible, as their intention is to take the supplied file
14550  and replace the class file with one for the particular journal to which
14551  the paper has been submitted.
14552  This also means that not too much time should be spent on the formating
14553  of the document.
14554  When it comes to be published, this will change anyway.
14555  The rest of the usage for this layout is substantially the same as for
14556  the normal article class.
14557  For details of what Elsevier do and don't allow, refer to their documentation.
14558 \end_layout
14559
14560 \begin_layout Section
14561 Memoir
14562 \end_layout
14563
14564 \begin_layout Standard
14565 By 
14566 \noun on
14567 Jürgen Spitzmüller
14568 \end_layout
14569
14570 \begin_layout Subsection
14571 Overview
14572 \end_layout
14573
14574 \begin_layout Standard
14575 Memoir is a very powerful and constantly evolving class.
14576  It has been designed with regard to fictional and non-fictional literature.
14577  Its aim is to let the user have maximum control over the typesetting of
14578  his document.
14579  Memoir is based on the standard book class, but it can also emulate the
14580  article class (see below).
14581 \end_layout
14582
14583 \begin_layout Standard
14584 Peter Wilson, the developer of Memoir, is known as the author of lots of
14585  useful packages in the LaTeX world.
14586  Most of them have been merged with Memoir.
14587  Therefore, it is much easier to layout the table of contents, appendices,
14588  chapter designs and such.
14589  LyX, though, does not support all of these goodies natively.
14590  Some of them might be added to forthcoming releases
14591 \begin_inset Foot
14592 status collapsed
14593
14594 \begin_layout Plain Layout
14595 You are invited to send suggestions to 
14596 \begin_inset Flex URL
14597 status collapsed
14598
14599 \begin_layout Plain Layout
14600
14601 lyx-devel@lists.lyx.org
14602 \end_layout
14603
14604 \end_inset
14605
14606 .
14607 \end_layout
14608
14609 \end_inset
14610
14611 , lots will probably never, due to the limitations of LyX's framework.
14612  Of course you can still use all features with the help of some native LaTeX
14613  commands (ERT
14614 \begin_inset Foot
14615 status collapsed
14616
14617 \begin_layout Plain Layout
14618 Cf.
14619 \begin_inset ERT
14620 status collapsed
14621
14622 \begin_layout Plain Layout
14623
14624
14625 \backslash
14626  
14627 \end_layout
14628
14629 \end_inset
14630
14631 section
14632 \begin_inset space ~
14633 \end_inset
14634
14635
14636 \begin_inset CommandInset ref
14637 LatexCommand ref
14638 reference "sec:Inserting-LaTeX-Code"
14639
14640 \end_inset
14641
14642  for details.
14643 \end_layout
14644
14645 \end_inset
14646
14647 ).
14648  In this section, we can only list those features which are natively supported
14649  by LyX.
14650  For detailed descriptions (and for the rest of features) we are recommending
14651  to have a look at the detailed manual of the Memoir class
14652 \begin_inset Foot
14653 status collapsed
14654
14655 \begin_layout Plain Layout
14656 Cf.
14657 \begin_inset ERT
14658 status collapsed
14659
14660 \begin_layout Plain Layout
14661
14662
14663 \backslash
14664  
14665 \end_layout
14666
14667 \end_inset
14668
14669
14670 \begin_inset Flex URL
14671 status collapsed
14672
14673 \begin_layout Plain Layout
14674
14675 CTAN:/macros/latex/memoir/memman.pdf
14676 \end_layout
14677
14678 \end_inset
14679
14680 .
14681 \end_layout
14682
14683 \end_inset
14684
14685 , which is not only a user guide for the class, but also both a comprehensive
14686  description on good typesetting and a superb example for good typesetting
14687  itself.
14688 \end_layout
14689
14690 \begin_layout Subsection
14691 Basic features and restrictions
14692 \end_layout
14693
14694 \begin_layout Standard
14695 Memoir supports basically all features of the standard book classes.
14696  There are, however, some differences, as follows:
14697 \end_layout
14698
14699 \begin_layout Description
14700 Font
14701 \begin_inset space ~
14702 \end_inset
14703
14704 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14705 \end_layout
14706
14707 \begin_layout Description
14708 Page
14709 \begin_inset space ~
14710 \end_inset
14711
14712 style: The fancy page style is not supported, due to a command clash between
14713  Memoir and the fancyhdr package (they are both defining a command with
14714  the same name, which confuses LaTeX).
14715  Instead, Memoir comes with a bunch of own page styles (see 
14716 \family sans
14717 Layout\SpecialChar \menuseparator
14718 Document\SpecialChar \menuseparator
14719 Page
14720 \begin_inset space ~
14721 \end_inset
14722
14723 Style
14724 \family default
14725 ).
14726  If you want to use these for the chapter pages, you have to use the command
14727  
14728 \family typewriter
14729
14730 \backslash
14731 chapterstyle
14732 \family default
14733  in the main text or in preamble (e.
14734 \begin_inset space \thinspace{}
14735 \end_inset
14736
14737 g.
14738 \begin_inset space ~
14739 \end_inset
14740
14741
14742 \family typewriter
14743
14744 \backslash
14745 chapterstyle{companion}
14746 \family default
14747 ).
14748 \end_layout
14749
14750 \begin_layout Description
14751 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14752  an optional argument in the standard classes.
14753  With this, you can specify an alternative version of the title for the
14754  table of contents and the headers (for instance, if the title is too long).
14755  In LyX, you can do this via 
14756 \family sans
14757 Insert\SpecialChar \menuseparator
14758 Short
14759 \begin_inset space ~
14760 \end_inset
14761
14762 Title
14763 \family default
14764  at the beginning of a chapter/section.
14765  Memoir features a second optional argument and thus separates the table
14766  of contents from the header.
14767  You can define three variants of a title with this: one for the main text,
14768  one for the table of contents, and one for the headers.
14769  Simply insert two optional arguments if you need this feature, the first
14770  one containing the short title for the Table of Contents, the second one
14771  containing an alternative short title for the headers.
14772 \end_layout
14773
14774 \begin_layout Description
14775 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14776  of contents, the list of figures and the list of table start a new page
14777  automatically.
14778  Memoir does not follow this route.
14779  You have to insert a page break yourself, if you want to have one.
14780 \end_layout
14781
14782 \begin_layout Description
14783 Titlepage: For some unknown reason, Memoir uses pagination on the title
14784  page (in the standard classes, title pages are 
14785 \begin_inset Quotes eld
14786 \end_inset
14787
14788 empty
14789 \begin_inset Quotes erd
14790 \end_inset
14791
14792 , i
14793 \begin_inset space \thinspace{}
14794 \end_inset
14795
14796 e.
14797 \begin_inset space ~
14798 \end_inset
14799
14800 without pagina).
14801  If you want an empty title page, type 
14802 \family typewriter
14803
14804 \backslash
14805 aliaspagestyle{title}{empty}
14806 \family default
14807  in the preamble.
14808 \end_layout
14809
14810 \begin_layout Description
14811 Article: With the class option 
14812 \emph on
14813 article
14814 \emph default
14815  (to be inserted in 
14816 \family sans
14817 Layout\SpecialChar \menuseparator
14818 Document\SpecialChar \menuseparator
14819 Extra
14820 \begin_inset space ~
14821 \end_inset
14822
14823 Options
14824 \family default
14825 ), you can emulate article style.
14826  That is, counters (footnotes, figures, tables etc.) will not be reset on
14827  new chapters, chapters don't start a new page (but are---in contrary to
14828  
14829 \begin_inset Quotes eld
14830 \end_inset
14831
14832 real
14833 \begin_inset Quotes erd
14834 \end_inset
14835
14836  article classes---still allowed), parts, though, use their own page, as
14837  in book.
14838 \end_layout
14839
14840 \begin_layout Description
14841 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14842  font commands, which have been used in the old LaTeX version 2.09 (e.
14843 \begin_inset space \thinspace{}
14844 \end_inset
14845
14846 g.
14847 \begin_inset space ~
14848 \end_inset
14849
14850
14851 \family typewriter
14852
14853 \backslash
14854 rm
14855 \family default
14856
14857 \family typewriter
14858
14859 \backslash
14860 it
14861 \family default
14862 ).
14863  It produces an error and stops LaTeX whenever such a command appears.
14864  The class option 
14865 \emph on
14866 oldfontcommands
14867 \emph default
14868  reallows the commands and spits out warnings instead (which does at least
14869  not stop LaTeX).
14870  Since a lot of packages and particularly BibTeX style files are still using
14871  those commands, we have decided to use this option by default.
14872 \end_layout
14873
14874 \begin_layout Subsection
14875 Extra features
14876 \end_layout
14877
14878 \begin_layout Standard
14879 We will only describe the features supported by LyX (which is not much currently
14880 ).
14881  Please consult the Memoir manual
14882 \begin_inset Foot
14883 status collapsed
14884
14885 \begin_layout Plain Layout
14886 Cf.
14887 \begin_inset ERT
14888 status collapsed
14889
14890 \begin_layout Plain Layout
14891
14892
14893 \backslash
14894  
14895 \end_layout
14896
14897 \end_inset
14898
14899
14900 \begin_inset Flex URL
14901 status collapsed
14902
14903 \begin_layout Plain Layout
14904
14905 CTAN:/macros/latex/memoir/memman.pdf
14906 \end_layout
14907
14908 \end_inset
14909
14910 .
14911 \end_layout
14912
14913 \end_inset
14914
14915  for details.
14916 \end_layout
14917
14918 \begin_layout Description
14919 Abstract: You may wonder why an abstract is an extra feature.
14920  Well, it is in book class.
14921  Usually books don't have abstracts.
14922  Memoir, however, has.
14923  You can use it wherever and how often you like.
14924 \end_layout
14925
14926 \begin_layout Description
14927 Chapterprecis: You may know this from belletristic: The contents of a chapter
14928  is shortly described below the title and also in the table of contents
14929  (e.
14930 \begin_inset space \thinspace{}
14931 \end_inset
14932
14933 g.
14934 \begin_inset space ~
14935 \end_inset
14936
14937
14938 \emph on
14939 Our hero arrives in Troia; he loses some friends; he finds others
14940 \emph default
14941 ).
14942  Chapterprecis does exactly this.
14943  It is therefore only sensible below a chapter.
14944 \end_layout
14945
14946 \begin_layout Description
14947 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14948  The epigraph environment provides an elegant way of typesetting such a
14949  motto.
14950  The motto itself (text) and its author (source) are divided by a short
14951  line.
14952  Unfortunately, we have to fool LyX a bit here again, since the environment
14953  needs two arguments (text and source).
14954  In this case, we have to use curly brackets (in TeX mode) between the two
14955  arguments: 
14956 \emph on
14957 <smart slogan>
14958 \emph default
14959  
14960 \family typewriter
14961 }{
14962 \family default
14963  
14964 \emph on
14965 <author of the slogan>.
14966 \end_layout
14967
14968 \begin_layout Description
14969 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14970  complex figurative poems).
14971  LyX can only support a few of them.
14972  One is poemtitle, which is a centered title for poems, which will also
14973  be added to the table of contents (verse is the standard environment for
14974  poems.
14975  Memoir has some enhanced versions of verse, but you need to use ERT, because
14976  they have to be nested inside regular verse environments, which is not
14977  possible with LyX).
14978 \end_layout
14979
14980 \begin_layout Description
14981 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14982 \end_layout
14983
14984 \begin_layout Chapter
14985 LyX Features needing Extra Software
14986 \end_layout
14987
14988 \begin_layout Section
14989 Checking TeX
14990 \end_layout
14991
14992 \begin_layout Standard
14993 by 
14994 \noun on
14995 Asger Alstrup
14996 \end_layout
14997
14998 \begin_layout Subsection
14999 Introduction
15000 \end_layout
15001
15002 \begin_layout Standard
15003 When you to have the 
15004 \family typewriter
15005 chktex
15006 \family default
15007  program installed, you'll find in the 
15008 \family sans
15009 Tools
15010 \family default
15011  menu the entry 
15012 \family sans
15013 Check
15014 \begin_inset space ~
15015 \end_inset
15016
15017 TeX
15018 \family default
15019  command.
15020  You can get 
15021 \family typewriter
15022 chktex
15023 \family default
15024  it from CTAN, 
15025 \begin_inset CommandInset href
15026 LatexCommand href
15027 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
15028
15029 \end_inset
15030
15031 .
15032 \end_layout
15033
15034 \begin_layout Standard
15035 The 
15036 \family sans
15037 ChkTeX
15038 \family default
15039  package is a program that was written by 
15040 \noun on
15041 Jens T.
15042  Berger Thielemann
15043 \noun default
15044  in frustration because some constructs in LaTeX are sometimes non-intuitive,
15045  and easy to forget.
15046  The program runs over your LaTeX file and checks the integrity of the file,
15047  and flags some common errors.
15048  In other technical words, it is 
15049 \family typewriter
15050 Lint
15051 \family default
15052  for LaTeX.
15053 \end_layout
15054
15055 \begin_layout Standard
15056 Well, what is a syntax checker doing in LyX which is supposed to produce
15057  correct LaTeX anyways? The answer is simple: Just as 
15058 \family typewriter
15059 Lint
15060 \family default
15061  not only checks the 
15062 \emph on
15063 syntax
15064 \emph default
15065  of C programs, but also does 
15066 \emph on
15067 semantic
15068 \emph default
15069  checks for type-errors, 
15070 \family sans
15071 ChkTeX
15072 \family default
15073  catches some common 
15074 \emph on
15075 typographic
15076 \emph default
15077  errors, in addition to the syntactical ones.
15078  Specifically, 
15079 \family sans
15080 ChkTeX
15081 \family default
15082  is capable of detecting several common errors, such as
15083 \end_layout
15084
15085 \begin_layout Itemize
15086 Ellipsis detection:
15087 \begin_inset Newline newline
15088 \end_inset
15089
15090 Use \SpecialChar \ldots{}
15091  instead of ...
15092 \end_layout
15093
15094 \begin_layout Itemize
15095 No space in front of/after parenthesis:
15096 \begin_inset Newline newline
15097 \end_inset
15098
15099 ( wrong spacing )
15100 \end_layout
15101
15102 \begin_layout Itemize
15103 Enforcement of normal space after common abbreviations:
15104 \begin_inset Newline newline
15105 \end_inset
15106
15107 e.
15108  g.
15109  is too wide spacing.
15110 \end_layout
15111
15112 \begin_layout Itemize
15113 Enforcement of end-of-sentence space when the last sentence ends with a
15114  capital letter:
15115 \begin_inset Newline newline
15116 \end_inset
15117
15118 This is a TEST.
15119  And this is wrong spacing.
15120 \end_layout
15121
15122 \begin_layout Itemize
15123 Space in front of labels and similar commands:
15124 \begin_inset Newline newline
15125 \end_inset
15126
15127 The label should stick right up to the text to avoid falling to a wrong
15128  page.
15129  
15130 \begin_inset CommandInset label
15131 LatexCommand label
15132 name "sec:chktex"
15133
15134 \end_inset
15135
15136  
15137 \begin_inset Foot
15138 status collapsed
15139
15140 \begin_layout Plain Layout
15141 This footnote is in danger of falling off to a wrong page
15142 \end_layout
15143
15144 \end_inset
15145
15146  The label is separated too much.
15147 \end_layout
15148
15149 \begin_layout Itemize
15150 Space in front of references, instead of hard spaces:
15151 \begin_inset Newline newline
15152 \end_inset
15153
15154 In you are in bad luck, the text will break right between the referenced
15155  text and reference number, and that's a pity.
15156  See section 
15157 \begin_inset CommandInset ref
15158 LatexCommand ref
15159 reference "sec:chktex"
15160
15161 \end_inset
15162
15163 .
15164 \end_layout
15165
15166 \begin_layout Itemize
15167 Use of 
15168 \begin_inset Quotes eld
15169 \end_inset
15170
15171 x
15172 \begin_inset Quotes erd
15173 \end_inset
15174
15175  instead of 
15176 \begin_inset Formula $\times$
15177 \end_inset
15178
15179  between numbers:
15180 \begin_inset Newline newline
15181 \end_inset
15182
15183 2x2 looks cheap compared to 
15184 \begin_inset Formula $2\times2$
15185 \end_inset
15186
15187 .
15188 \end_layout
15189
15190 \begin_layout Standard
15191 and more \SpecialChar \ldots{}
15192  It is an invaluable tool when you are 
15193 \begin_inset Quotes eld
15194 \end_inset
15195
15196 finishing up
15197 \begin_inset Quotes erd
15198 \end_inset
15199
15200  your document before printing, and you should run it right after the obligatory
15201  spelling check, and before you go fine tuning the typesetting.
15202 \end_layout
15203
15204 \begin_layout Subsection
15205 How to use it
15206 \end_layout
15207
15208 \begin_layout Standard
15209 If you have the program installed, usage is as simple as choosing 
15210 \family sans
15211 \bar under
15212 T
15213 \bar default
15214 ools\SpecialChar \menuseparator
15215
15216 \bar under
15217 C
15218 \bar default
15219 heck
15220 \begin_inset space ~
15221 \end_inset
15222
15223 TeX
15224 \family default
15225 .
15226  This will make LyX generate a LaTeX file of your document, start 
15227 \family sans
15228 ChkTeX
15229 \family default
15230  to check it, and then make LyX insert 
15231 \begin_inset Quotes eld
15232 \end_inset
15233
15234 error boxes
15235 \begin_inset Quotes erd
15236 \end_inset
15237
15238  with the warnings from 
15239 \family sans
15240 ChkTeX
15241 \family default
15242 , if there were any.
15243  The warnings will be placed close to the point of the mistake, and you
15244  can quickly find them by using the 
15245 \family sans
15246 \bar under
15247 N
15248 \bar default
15249 avigate\SpecialChar \menuseparator
15250
15251 \bar under
15252 E
15253 \bar default
15254 rror
15255 \family default
15256  menu item, or the shortcut key 
15257 \family sans
15258 C-g
15259 \family default
15260  from the default 
15261 \family typewriter
15262 cua
15263 \family default
15264  bind file.
15265  Open the error boxes by clicking on them with the mouse, or use the shortcut
15266  key 
15267 \family sans
15268 C-i
15269 \family default
15270  from 
15271 \family typewriter
15272 cua
15273 \family default
15274  bindings, or the corresponding 
15275 \family sans
15276 C-o
15277 \family default
15278  for the alternate 
15279 \family typewriter
15280 emacs
15281 \family default
15282  bind file.
15283  Read the warning and correct the mistake, if it is a mistake.
15284  If you have trouble understanding what the warning is about, you can safely
15285  ignore it.
15286  Remember that there is a hidden layer between the document on screen and
15287  the technical details in invoking 
15288 \family sans
15289 ChkTeX
15290 \family default
15291 , and this gap can make some warnings seem arcane or just right down plain
15292  silly.
15293 \end_layout
15294
15295 \begin_layout Standard
15296 This document is an excellent testing bed for the feature, and it should
15297  provide quite a few warnings for you to fiddle with.
15298  Since computers are only so smart, expect most of the warnings to be false
15299  alarms, though.
15300 \end_layout
15301
15302 \begin_layout Subsection
15303 How to fine tune it
15304 \end_layout
15305
15306 \begin_layout Standard
15307 Sometimes, you'll find that 
15308 \family sans
15309 ChkTeX
15310 \family default
15311  makes more noise than suits your mood.
15312  Then you can choose not to use it, wait until your mood changes, or try
15313  to customize 
15314 \family sans
15315 ChkTeX
15316 \family default
15317  to get better along with you.
15318  Another choice in the most desperate situations is to use 
15319 \family sans
15320 \bar under
15321 V
15322 \bar default
15323 iew\SpecialChar \menuseparator
15324
15325 \bar under
15326 R
15327 \bar default
15328 emove
15329 \begin_inset space ~
15330 \end_inset
15331
15332 All
15333 \begin_inset space ~
15334 \end_inset
15335
15336 Error
15337 \begin_inset space ~
15338 \end_inset
15339
15340 Boxes
15341 \family default
15342 , which will get rid of all warnings instantly.
15343 \end_layout
15344
15345 \begin_layout Standard
15346 Although 
15347 \family sans
15348 ChkTeX
15349 \family default
15350  
15351 \emph on
15352 is
15353 \emph default
15354  very configurable and extensible, you shouldn't expect to solve all problems
15355  with 
15356 \family sans
15357 ChkTeX
15358 \family default
15359  in LyX this way.
15360  Since LyX has to generate a somewhat special LaTeX file to be able to match
15361  the line numbers from the 
15362 \family sans
15363 ChkTeX
15364 \family default
15365  output
15366 \begin_inset Foot
15367 status collapsed
15368
15369 \begin_layout Plain Layout
15370 You can inspect the specific output from 
15371 \family sans
15372 chktex
15373 \family default
15374  by using 
15375 \family sans
15376 Edit\SpecialChar \menuseparator
15377 View
15378 \begin_inset space ~
15379 \end_inset
15380
15381 LaTeX
15382 \begin_inset space ~
15383 \end_inset
15384
15385 Log
15386 \family default
15387  right after a 
15388 \family sans
15389 chktex
15390 \family default
15391  run.
15392 \end_layout
15393
15394 \end_inset
15395
15396  to the internal document structure, some of the warnings will not seen
15397  to appear correctly.
15398  There are two things you can do about this:
15399 \end_layout
15400
15401 \begin_layout Itemize
15402 Fine tune the 
15403 \family sans
15404 ChkTeX
15405 \family default
15406  invocation command line in 
15407 \family sans
15408 Preferences
15409 \family default
15410  (tabs 
15411 \family sans
15412 Outputs
15413 \family default
15414
15415 \family sans
15416 Misc
15417 \family default
15418 ), or the global 
15419 \family sans
15420 ChkTeX
15421 \family default
15422  installation configuration file (usually with the file 
15423 \family typewriter
15424 chktexrc
15425 \family default
15426 ).
15427  See below to learn what warnings can be enabled and disabled on the command
15428  line.
15429  
15430 \end_layout
15431
15432 \begin_layout Itemize
15433 Export your document as a raw LaTeX file using 
15434 \family sans
15435 \bar under
15436 F
15437 \bar default
15438 ile\SpecialChar \menuseparator
15439
15440 \bar under
15441 E
15442 \bar default
15443 xport\SpecialChar \menuseparator
15444
15445 \bar under
15446 L
15447 \bar default
15448 aTeX
15449 \family default
15450  and run 
15451 \family typewriter
15452 chktex
15453 \family default
15454  manually on that.
15455  Invoked in this way, it can be a hassle to find the corresponding place
15456  in the document inside LyX, but with a little patience, you should be able
15457  to do it.
15458 \end_layout
15459
15460 \begin_layout Standard
15461 Here follows the warning messages that can be enabled and disabled in 
15462 \family sans
15463 Preferences
15464 \family default
15465 .
15466  Use 
15467 \family typewriter
15468 -n#
15469 \family default
15470  to disable a warning, and 
15471 \family typewriter
15472 -w#
15473 \family default
15474  to enable a warning.
15475  The emphasized entries are disabled by default, because the default is
15476  "
15477 \family typewriter
15478 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
15479 \family default
15480 ".
15481 \end_layout
15482
15483 \begin_layout Standard
15484 Notice that you should only use the options that enable and disable warnings,
15485  because LyX relies on some of the other command line parameters to be set
15486  in a specific way to have a chance to communicate with 
15487 \family typewriter
15488 chktex
15489 \family default
15490 .
15491 \end_layout
15492
15493 \begin_layout Enumerate
15494
15495 \size small
15496 \emph on
15497 Command terminated with space.
15498 \end_layout
15499
15500 \begin_layout Enumerate
15501
15502 \size small
15503 Non-breaking space (
15504 \begin_inset Quotes eld
15505 \end_inset
15506
15507
15508 \family typewriter
15509 ~
15510 \family default
15511
15512 \begin_inset Quotes erd
15513 \end_inset
15514
15515 ) should have been used.
15516 \end_layout
15517
15518 \begin_layout Enumerate
15519
15520 \size small
15521 \emph on
15522 You should enclose the previous parenthesis with 
15523 \begin_inset Quotes eld
15524 \end_inset
15525
15526
15527 \family typewriter
15528 {}
15529 \family default
15530
15531 \begin_inset Quotes erd
15532 \end_inset
15533
15534 .
15535 \end_layout
15536
15537 \begin_layout Enumerate
15538
15539 \size small
15540 Italic correction (
15541 \begin_inset Quotes eld
15542 \end_inset
15543
15544
15545 \family typewriter
15546
15547 \backslash
15548 /
15549 \family default
15550
15551 \begin_inset Quotes erd
15552 \end_inset
15553
15554 ) found in non-italic buffer.
15555 \end_layout
15556
15557 \begin_layout Enumerate
15558
15559 \size small
15560 Italic correction (
15561 \begin_inset Quotes eld
15562 \end_inset
15563
15564
15565 \family typewriter
15566
15567 \backslash
15568 /
15569 \family default
15570
15571 \begin_inset Quotes erd
15572 \end_inset
15573
15574 ) found more than once.
15575 \end_layout
15576
15577 \begin_layout Enumerate
15578
15579 \size small
15580 \emph on
15581 No italic correction (
15582 \begin_inset Quotes eld
15583 \end_inset
15584
15585
15586 \family typewriter
15587
15588 \backslash
15589 /
15590 \family default
15591
15592 \begin_inset Quotes erd
15593 \end_inset
15594
15595 ) found.
15596 \end_layout
15597
15598 \begin_layout Enumerate
15599
15600 \size small
15601 Accent command 
15602 \begin_inset Quotes eld
15603 \end_inset
15604
15605
15606 \family typewriter
15607 cmd
15608 \family default
15609
15610 \begin_inset Quotes erd
15611 \end_inset
15612
15613  needs use of 
15614 \begin_inset Quotes eld
15615 \end_inset
15616
15617
15618 \family typewriter
15619 cmd
15620 \family default
15621
15622 \begin_inset Quotes erd
15623 \end_inset
15624
15625 .
15626 \end_layout
15627
15628 \begin_layout Enumerate
15629
15630 \size small
15631 Wrong length of dash may have been used.
15632 \end_layout
15633
15634 \begin_layout Enumerate
15635
15636 \size small
15637 \emph on
15638 \begin_inset Quotes eld
15639 \end_inset
15640
15641
15642 \family typewriter
15643 %s
15644 \family default
15645
15646 \begin_inset Quotes erd
15647 \end_inset
15648
15649  expected, found 
15650 \begin_inset Quotes eld
15651 \end_inset
15652
15653
15654 \family typewriter
15655 %s
15656 \family default
15657
15658 \begin_inset Quotes erd
15659 \end_inset
15660
15661 .
15662 \end_layout
15663
15664 \begin_layout Enumerate
15665
15666 \size small
15667 Solo 
15668 \begin_inset Quotes eld
15669 \end_inset
15670
15671
15672 \family typewriter
15673 %s
15674 \family default
15675
15676 \begin_inset Quotes erd
15677 \end_inset
15678
15679  found.
15680 \end_layout
15681
15682 \begin_layout Enumerate
15683
15684 \size small
15685 You should use 
15686 \begin_inset Quotes eld
15687 \end_inset
15688
15689
15690 \family typewriter
15691 %s
15692 \family default
15693
15694 \begin_inset Quotes erd
15695 \end_inset
15696
15697  to achieve an ellipsis.
15698 \end_layout
15699
15700 \begin_layout Enumerate
15701
15702 \size small
15703 Inter-word spacing (
15704 \begin_inset Quotes eld
15705 \end_inset
15706
15707
15708 \family typewriter
15709
15710 \backslash
15711
15712 \family default
15713  
15714 \begin_inset Quotes eld
15715 \end_inset
15716
15717 ) should perhaps be used.
15718 \end_layout
15719
15720 \begin_layout Enumerate
15721
15722 \size small
15723 Inter-sentence spacing (
15724 \begin_inset Quotes eld
15725 \end_inset
15726
15727
15728 \family typewriter
15729
15730 \backslash
15731 @
15732 \family default
15733
15734 \begin_inset Quotes erd
15735 \end_inset
15736
15737 ) should perhaps be used.
15738 \end_layout
15739
15740 \begin_layout Enumerate
15741
15742 \size small
15743 Could not find argument for command.
15744 \end_layout
15745
15746 \begin_layout Enumerate
15747
15748 \size small
15749 No match found for 
15750 \begin_inset Quotes eld
15751 \end_inset
15752
15753
15754 \family typewriter
15755 %s
15756 \family default
15757
15758 \begin_inset Quotes erd
15759 \end_inset
15760
15761 .
15762 \end_layout
15763
15764 \begin_layout Enumerate
15765
15766 \size small
15767 Math mode still on at end of LaTeX file.
15768 \end_layout
15769
15770 \begin_layout Enumerate
15771
15772 \size small
15773 Number of 
15774 \begin_inset Quotes eld
15775 \end_inset
15776
15777
15778 \family typewriter
15779 char
15780 \family default
15781
15782 \begin_inset Quotes erd
15783 \end_inset
15784
15785  doesn't match the number of 
15786 \begin_inset Quotes eld
15787 \end_inset
15788
15789
15790 \family typewriter
15791 char
15792 \family default
15793
15794 \begin_inset Quotes erd
15795 \end_inset
15796
15797 .
15798 \end_layout
15799
15800 \begin_layout Enumerate
15801
15802 \size small
15803 You should use either 
15804 \family typewriter
15805
15806 \begin_inset Quotes eld
15807 \end_inset
15808
15809
15810 \family default
15811  or 
15812 \family typewriter
15813
15814 \begin_inset Quotes erd
15815 \end_inset
15816
15817
15818 \family default
15819  as an alternative to 
15820 \begin_inset Quotes eld
15821 \end_inset
15822
15823
15824 \family typewriter
15825 "
15826 \family default
15827
15828 \begin_inset Quotes erd
15829 \end_inset
15830
15831 .
15832 \end_layout
15833
15834 \begin_layout Enumerate
15835
15836 \size small
15837 You should use "
15838 \family typewriter
15839 '
15840 \family default
15841 " (ASCII 39) instead of "
15842 \family typewriter
15843 ´
15844 \family default
15845 " (ASCII 180).
15846 \end_layout
15847
15848 \begin_layout Enumerate
15849
15850 \size small
15851 User-specified pattern found.
15852 \end_layout
15853
15854 \begin_layout Enumerate
15855
15856 \size small
15857 This command might not be intended.
15858 \end_layout
15859
15860 \begin_layout Enumerate
15861
15862 \size small
15863 \emph on
15864 Comment displayed.
15865 \end_layout
15866
15867 \begin_layout Enumerate
15868
15869 \size small
15870 Either 
15871 \family typewriter
15872 ''
15873 \backslash
15874 ,'
15875 \family default
15876  or 
15877 \family typewriter
15878 '
15879 \backslash
15880 ,''
15881 \family default
15882  will look better.
15883 \end_layout
15884
15885 \begin_layout Enumerate
15886
15887 \size small
15888 Delete this space to maintain correct page references.
15889 \end_layout
15890
15891 \begin_layout Enumerate
15892
15893 \size small
15894 \emph on
15895 You might wish to put this between a pair of 
15896 \begin_inset Quotes eld
15897 \end_inset
15898
15899
15900 \family typewriter
15901 {}
15902 \family default
15903
15904 \begin_inset Quotes erd
15905 \end_inset
15906
15907 .
15908 \end_layout
15909
15910 \begin_layout Enumerate
15911
15912 \size small
15913 You ought to remove spaces in front of punctuation.
15914 \end_layout
15915
15916 \begin_layout Enumerate
15917
15918 \size small
15919 Could not execute LaTeX command.
15920 \end_layout
15921
15922 \begin_layout Enumerate
15923
15924 \size small
15925 Don't use 
15926 \family typewriter
15927
15928 \backslash
15929 /
15930 \family default
15931  in front of small punctuation.
15932 \end_layout
15933
15934 \begin_layout Enumerate
15935
15936 \family typewriter
15937 \size small
15938 $
15939 \backslash
15940 times$
15941 \family default
15942  may look prettier here.
15943 \end_layout
15944
15945 \begin_layout Enumerate
15946
15947 \size small
15948 \emph on
15949 Multiple spaces detected in output.
15950 \end_layout
15951
15952 \begin_layout Enumerate
15953
15954 \size small
15955 This text may be ignored.
15956 \end_layout
15957
15958 \begin_layout Enumerate
15959
15960 \size small
15961 Use 
15962 \family typewriter
15963
15964 \begin_inset Quotes eld
15965 \end_inset
15966
15967
15968 \family default
15969  to begin quotation, not 
15970 \family typewriter
15971 '
15972 \family default
15973 .
15974 \end_layout
15975
15976 \begin_layout Enumerate
15977
15978 \size small
15979 Use 
15980 \family typewriter
15981 '
15982 \family default
15983  to end quotation, not 
15984 \family typewriter
15985
15986 \begin_inset Quotes eld
15987 \end_inset
15988
15989
15990 \family default
15991 .
15992 \end_layout
15993
15994 \begin_layout Enumerate
15995
15996 \size small
15997 Don't mix quotes.
15998 \end_layout
15999
16000 \begin_layout Enumerate
16001
16002 \size small
16003 You should perhaps use 
16004 \begin_inset Quotes eld
16005 \end_inset
16006
16007
16008 \family typewriter
16009 cmd
16010 \family default
16011
16012 \begin_inset Quotes erd
16013 \end_inset
16014
16015  instead.
16016 \end_layout
16017
16018 \begin_layout Enumerate
16019
16020 \size small
16021 You should put a space in front of/after parenthesis.
16022 \end_layout
16023
16024 \begin_layout Enumerate
16025
16026 \size small
16027 You should avoid spaces in front of/after parenthesis.
16028 \end_layout
16029
16030 \begin_layout Enumerate
16031
16032 \size small
16033 \emph on
16034 You should not use punctuation in front of/after quotes.
16035 \end_layout
16036
16037 \begin_layout Enumerate
16038
16039 \size small
16040 Double space found.
16041 \end_layout
16042
16043 \begin_layout Enumerate
16044
16045 \size small
16046 You should put punctuation outside inner/inside display math mode.
16047 \end_layout
16048
16049 \begin_layout Enumerate
16050
16051 \size small
16052 You ought to not use primitive TeX in LaTeX code.
16053 \end_layout
16054
16055 \begin_layout Enumerate
16056
16057 \size small
16058 You should remove spaces in front of 
16059 \begin_inset Quotes eld
16060 \end_inset
16061
16062
16063 \family typewriter
16064 %s
16065 \family default
16066
16067 \begin_inset Quotes erd
16068 \end_inset
16069
16070
16071 \end_layout
16072
16073 \begin_layout Enumerate
16074
16075 \size small
16076 \begin_inset Quotes eld
16077 \end_inset
16078
16079
16080 \family typewriter
16081 %s
16082 \family default
16083
16084 \begin_inset Quotes erd
16085 \end_inset
16086
16087  is normally not followed by 
16088 \begin_inset Quotes eld
16089 \end_inset
16090
16091
16092 \family typewriter
16093 %c
16094 \family default
16095
16096 \begin_inset Quotes erd
16097 \end_inset
16098
16099 .
16100 \end_layout
16101
16102 \begin_layout Standard
16103 In later versions of LyX, we hope to provide a more complete interface to
16104  this tool (and it's smaller cousin 
16105 \family typewriter
16106 lacheck
16107 \family default
16108 ) to exploit the full power of it.
16109  But it's not exactly useless as it is now: go try it on one of your existing
16110  documents of a certain length and be surprised.
16111 \end_layout
16112
16113 \begin_layout Section
16114 Version Control in LyX
16115 \end_layout
16116
16117 \begin_layout Standard
16118 by
16119 \noun on
16120  Lars Gullik Bjønnes
16121 \end_layout
16122
16123 \begin_layout Subsection
16124 Introduction
16125 \end_layout
16126
16127 \begin_layout Standard
16128 A friend of mine wanted to try LyX for a group project.
16129  When he didn't find support for version control or file locking, he dropped
16130  it.
16131  This angered me a bit, so I thought that I should at least make support
16132  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
16133  This has now been done.
16134  LyX now supports some of the most basic RCS commands.
16135  If you need to something a bit more sophisticated you will have to do that
16136  manually in an xterm.
16137 \end_layout
16138
16139 \begin_layout Standard
16140 Before you begin to use the version control features in LyX, you should
16141  read 
16142 \begin_inset Quotes eld
16143 \end_inset
16144
16145 rcsintro
16146 \begin_inset Quotes erd
16147 \end_inset
16148
16149  (a man file, read it with 
16150 \family typewriter
16151 man rcsintro
16152 \family default
16153 ).
16154  This file describes all the basic features of RCS.
16155  You should especially notice the comment about a RCS directory, and the
16156  notion of a master RCS file (the file ending in 
16157 \family typewriter
16158 ,v
16159 \family default
16160 ).
16161 \end_layout
16162
16163 \begin_layout Standard
16164 Also, as there is only basic CVS/SVN implementation you should be familiar
16165  with CVS/SVN usage before start using it under LyX.
16166 \end_layout
16167
16168 \begin_layout Standard
16169 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
16170  package---no guarantees are made for older versions.
16171 \end_layout
16172
16173 \begin_layout Subsection
16174 RCS commands in LyX
16175 \end_layout
16176
16177 \begin_layout Standard
16178 The following sections describe the RCS commands supported by LyX.
16179  You can find them in the 
16180 \family sans
16181 \bar under
16182 F
16183 \bar default
16184 ile\SpecialChar \menuseparator
16185
16186 \bar under
16187 V
16188 \bar default
16189 ersion
16190 \begin_inset space ~
16191 \end_inset
16192
16193 Control
16194 \family default
16195  submenu.
16196 \end_layout
16197
16198 \begin_layout Subsubsection
16199
16200 \family sans
16201 Register
16202 \end_layout
16203
16204 \begin_layout Standard
16205 If your document is not under revision control, this is the only item shown
16206  in the menu.
16207  And if it is under revision control, the 
16208 \family sans
16209 \bar under
16210 R
16211 \bar default
16212 egister
16213 \family default
16214  item is not visible.
16215  
16216 \end_layout
16217
16218 \begin_layout Standard
16219 This command registers your document with RCS (unless you are under the
16220  directory managed by CVS)\SpecialChar \@.
16221  You are asked interactively to supply an initial
16222  description of the document.
16223  The document is now set in Read-Only mode and you have to 
16224 \family sans
16225 Check
16226 \begin_inset space ~
16227 \end_inset
16228
16229 Out
16230 \begin_inset space ~
16231 \end_inset
16232
16233 For
16234 \begin_inset space ~
16235 \end_inset
16236
16237 Edit
16238 \family default
16239 , before making any changes to it.
16240  A document under revision control has a 
16241 \begin_inset Quotes eld
16242 \end_inset
16243
16244 [RCS:<version> <locker>]
16245 \begin_inset Quotes erd
16246 \end_inset
16247
16248  item tagged to the filename in the minibuffer.
16249 \end_layout
16250
16251 \begin_layout Standard
16252 RCS command that is run: 
16253 \family typewriter
16254 ci -q -u -i -t-"<initial description>" <file-name>
16255 \end_layout
16256
16257 \begin_layout Standard
16258 Read 
16259 \family typewriter
16260 man ci
16261 \family default
16262  to understand the switches.
16263  
16264 \end_layout
16265
16266 \begin_layout Subsubsection
16267
16268 \family sans
16269 Check In Changes
16270 \end_layout
16271
16272 \begin_layout Standard
16273 When you are finished editing a file, you check in your changes.
16274  When you do this, you are asked for a description of the changes.
16275  This is stored in the history log.
16276  The version number is bumped, your changes are applied to the master RCS
16277  file, the document is unlocked and set to Read-Only mode.
16278  
16279 \end_layout
16280
16281 \begin_layout Standard
16282 RCS command: 
16283 \family typewriter
16284 ci -q -u -m"<description>" <file-name>
16285 \end_layout
16286
16287 \begin_layout Subsubsection
16288
16289 \family sans
16290 Check Out For Edit
16291 \end_layout
16292
16293 \begin_layout Standard
16294 By doing this you lock the document so that only you can edit it.
16295  This will also make the document Read-Write only for you.
16296  You will usually continue editing for a while and when you are finished
16297  you check in your changes.
16298  The status line is changed to reflect that you have locked the file.
16299  
16300 \end_layout
16301
16302 \begin_layout Standard
16303 RCS command: 
16304 \family typewriter
16305 co -q -l <file-name>
16306 \end_layout
16307
16308 \begin_layout Subsubsection
16309
16310 \family sans
16311 Revert To Repository Version
16312 \end_layout
16313
16314 \begin_layout Standard
16315 This will discard all changes made to the document since the last check
16316  in.
16317  You get a warning before changes are discarded.
16318 \end_layout
16319
16320 \begin_layout Standard
16321 RCS command: 
16322 \family typewriter
16323 co -f -u<version> <file-name>
16324 \end_layout
16325
16326 \begin_layout Subsubsection
16327
16328 \family sans
16329 Undo Last Checkin
16330 \end_layout
16331
16332 \begin_layout Standard
16333 This makes as if the last check in never happened.
16334  No changes are made to the document loaded into LyX, but the last version
16335  is removed from the master RCS file.
16336  
16337 \end_layout
16338
16339 \begin_layout Standard
16340 RCS command: 
16341 \family typewriter
16342 rcs -o<version> <file-name>
16343 \end_layout
16344
16345 \begin_layout Subsubsection
16346
16347 \family sans
16348 Show History
16349 \end_layout
16350
16351 \begin_layout Standard
16352 This show the complete history of the RCS document.
16353  The output of 
16354 \family typewriter
16355 rlog <file-name>
16356 \family default
16357  is shown in a browser.
16358  See 
16359 \family typewriter
16360 man rlog
16361 \family default
16362  for more info.
16363 \end_layout
16364
16365 \begin_layout Subsection
16366 CVS commands in LyX
16367 \end_layout
16368
16369 \begin_layout Standard
16370 CVS is now partially supported by LyX.
16371  You can find the commands in the 
16372 \family sans
16373 \bar under
16374 F
16375 \bar default
16376 ile\SpecialChar \menuseparator
16377
16378 \bar under
16379 V
16380 \bar default
16381 ersion
16382 \begin_inset space ~
16383 \end_inset
16384
16385 Control
16386 \family default
16387  submenu.
16388 \end_layout
16389
16390 \begin_layout Subsubsection
16391
16392 \family sans
16393 Register
16394 \end_layout
16395
16396 \begin_layout Standard
16397 If your document is not under revision control, this is the only item shown
16398  in the menu.
16399  And if it is under revision control, the 
16400 \family sans
16401 \bar under
16402 R
16403 \bar default
16404 egister
16405 \family default
16406  item is not visible.
16407  
16408 \end_layout
16409
16410 \begin_layout Standard
16411 This command registers in CVS your document ONLY in case you have already
16412  the documents directory under CVS control (in particular 
16413 \family typewriter
16414 CVS/Entries
16415 \family default
16416  file exists).
16417  This means you have to checkout the archive by yourself.
16418  
16419 \end_layout
16420
16421 \begin_layout Standard
16422 Then you are asked interactively to supply an initial description of the
16423  document.
16424  Don't forget that registered file is not yet commited.
16425 \end_layout
16426
16427 \begin_layout Standard
16428 CVS command that is run: 
16429 \family typewriter
16430 cvs -q add -m
16431 \begin_inset Quotes erd
16432 \end_inset
16433
16434 <entered message>" 
16435 \begin_inset Quotes eld
16436 \end_inset
16437
16438 <file-name>
16439 \begin_inset Quotes erd
16440 \end_inset
16441
16442
16443 \end_layout
16444
16445 \begin_layout Standard
16446 Read 
16447 \family typewriter
16448 man svn
16449 \family default
16450  to understand the switches.
16451  
16452 \end_layout
16453
16454 \begin_layout Subsubsection
16455
16456 \family sans
16457 Check In Changes
16458 \end_layout
16459
16460 \begin_layout Standard
16461 When you are finished editing a file, you commit your changes.
16462  When you do this, you are asked for a description of the changes.
16463  After that changes are commited.
16464 \end_layout
16465
16466 \begin_layout Standard
16467 CVS command: 
16468 \family typewriter
16469 cvs -q commit -m"<description>" <file-name>
16470 \end_layout
16471
16472 \begin_layout Subsubsection
16473
16474 \family sans
16475 Revert To Repository Version
16476 \end_layout
16477
16478 \begin_layout Standard
16479 This will discard all changes made to the document since the last check
16480  in.
16481  You get a warning before changes are discarded.
16482  Firstly the file is deleted, secondly CVS update command is run.
16483 \end_layout
16484
16485 \begin_layout Standard
16486 CVS command: 
16487 \family typewriter
16488 cvs update 
16489 \begin_inset Quotes eld
16490 \end_inset
16491
16492 <file-name>
16493 \begin_inset Quotes erd
16494 \end_inset
16495
16496
16497 \end_layout
16498
16499 \begin_layout Subsubsection
16500
16501 \family sans
16502 Show History
16503 \end_layout
16504
16505 \begin_layout Standard
16506 This show the complete history of the CVS document.
16507  The output of 
16508 \family typewriter
16509 cvs log 
16510 \begin_inset Quotes eld
16511 \end_inset
16512
16513 <file-name>
16514 \begin_inset Quotes erd
16515 \end_inset
16516
16517
16518 \family default
16519  is shown in a browser.
16520 \end_layout
16521
16522 \begin_layout Subsection
16523 SVN commands in LyX
16524 \end_layout
16525
16526 \begin_layout Standard
16527 SVN is now partially supported by LyX.
16528  You can find the commands in the 
16529 \family sans
16530 \bar under
16531 F
16532 \bar default
16533 ile\SpecialChar \menuseparator
16534
16535 \bar under
16536 V
16537 \bar default
16538 ersion
16539 \begin_inset space ~
16540 \end_inset
16541
16542 Control
16543 \family default
16544  submenu.
16545  Please note that if you use password protected access to repository via
16546  ssh, you will be asked on termial window.
16547 \end_layout
16548
16549 \begin_layout Subsubsection
16550
16551 \family sans
16552 Register
16553 \end_layout
16554
16555 \begin_layout Standard
16556 If your document is not under revision control, this is the only item shown
16557  in the menu.
16558  And if it is under revision control, the 
16559 \family sans
16560 \bar under
16561 R
16562 \bar default
16563 egister
16564 \family default
16565  item is not visible.
16566  
16567 \end_layout
16568
16569 \begin_layout Standard
16570 This command registers in SVN your document ONLY in case you have already
16571  the documents directory under SVN control (in particular 
16572 \family typewriter
16573 .svn/entries
16574 \family default
16575  file exists).
16576  This means you have to checkout the archive by yourself.
16577  
16578 \end_layout
16579
16580 \begin_layout Standard
16581 Then you are asked interactively to supply an initial description of the
16582  document.
16583  Don't forget that registered file is not yet commited.
16584 \end_layout
16585
16586 \begin_layout Standard
16587 SVN command that is run: 
16588 \family typewriter
16589 snv add -q 
16590 \begin_inset Quotes eld
16591 \end_inset
16592
16593 <file-name>
16594 \begin_inset Quotes erd
16595 \end_inset
16596
16597
16598 \end_layout
16599
16600 \begin_layout Standard
16601 Read 
16602 \family typewriter
16603 man svn
16604 \family default
16605  to understand the switches.
16606  
16607 \end_layout
16608
16609 \begin_layout Subsubsection
16610
16611 \family sans
16612 Check In Changes
16613 \end_layout
16614
16615 \begin_layout Standard
16616 When you are finished editing a file, you commit your changes.
16617  When you do this, you are asked for a description of the changes.
16618  After that changes are commited.
16619 \end_layout
16620
16621 \begin_layout Standard
16622 SVN command: 
16623 \family typewriter
16624 svn commit -q -m"<description>" <file-name>
16625 \end_layout
16626
16627 \begin_layout Subsubsection
16628
16629 \family sans
16630 Check Out For Edit
16631 \end_layout
16632
16633 \begin_layout Standard
16634 Updates the changes of this file from the repository.
16635  Be sure you understand SVN merging and conflicts resolving before using
16636  this function, because all conflicts has to be done manually by you!
16637 \end_layout
16638
16639 \begin_layout Standard
16640 RCS command: 
16641 \family typewriter
16642 svn update 
16643 \begin_inset Quotes eld
16644 \end_inset
16645
16646 <file-name>
16647 \begin_inset Quotes erd
16648 \end_inset
16649
16650
16651 \end_layout
16652
16653 \begin_layout Subsubsection
16654
16655 \family sans
16656 Revert To Repository Version
16657 \end_layout
16658
16659 \begin_layout Standard
16660 This will discard all changes made to the document since the last check
16661  in.
16662  You get a warning before changes are discarded.
16663  
16664 \end_layout
16665
16666 \begin_layout Standard
16667 CVS command: 
16668 \family typewriter
16669 svn revert -q 
16670 \begin_inset Quotes eld
16671 \end_inset
16672
16673 <file-name>
16674 \begin_inset Quotes erd
16675 \end_inset
16676
16677
16678 \end_layout
16679
16680 \begin_layout Subsubsection
16681
16682 \family sans
16683 Show History
16684 \end_layout
16685
16686 \begin_layout Standard
16687 This show the complete history of the SVN document.
16688  The output of 
16689 \family typewriter
16690 svn log 
16691 \begin_inset Quotes eld
16692 \end_inset
16693
16694 <file-name>
16695 \begin_inset Quotes erd
16696 \end_inset
16697
16698
16699 \family default
16700  is shown in a browser.
16701 \end_layout
16702
16703 \begin_layout Section
16704 Literate Programming
16705 \end_layout
16706
16707 \begin_layout Standard
16708 Updated by 
16709 \noun on
16710 Kayvan Sylvan 
16711 \noun default
16712 (kayvan@sylvan.com)
16713 \noun on
16714
16715 \noun default
16716 original documentation written by 
16717 \noun on
16718 Edmar Wienskoski Jr.
16719
16720 \noun default
16721  (edmar-w-jr@technologist.com)
16722 \end_layout
16723
16724 \begin_layout Subsection
16725 Introduction
16726 \end_layout
16727
16728 \begin_layout Standard
16729 The main purpose of this documentation is to show you how to use LyX for
16730  literate programming.
16731  Where it is assumed that you are familiar with this programming technique,
16732  and know what 
16733 \begin_inset Quotes eld
16734 \end_inset
16735
16736 tangling
16737 \begin_inset Quotes erd
16738 \end_inset
16739
16740  and 
16741 \begin_inset Quotes eld
16742 \end_inset
16743
16744 weaving
16745 \begin_inset Quotes erd
16746 \end_inset
16747
16748  means.
16749  If that is not the case, please follow the web links provided in the following
16750  sections.
16751  There is a lot of good documentation out there covering old development
16752  history to the latest tools tips.
16753 \end_layout
16754
16755 \begin_layout Standard
16756 It is also assumed that you are familiar with LyX itself to a point that
16757  you are comfortable changing your LyX preferences, and X resources file.
16758  If that is not the case please refer to other LyX documentation to cover
16759  your specific needs.
16760 \end_layout
16761
16762 \begin_layout Subsection
16763 Literate Programming
16764 \end_layout
16765
16766 \begin_layout Standard
16767 From the Literate Programming FAQ: 
16768 \end_layout
16769
16770 \begin_layout Quotation
16771 Literate programming is the combination of documentation and source together
16772  in a fashion suited for reading by human beings.
16773  In fact, literate programs should be enjoyable reading, even inviting!
16774  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
16775  and documentation in a single file.
16776  Literate programming tools then parse the file to produce either readable
16777  documentation or compilable source.
16778  The WEB style of literate programming was created by D.E.
16779  Knuth during the development of his TeX typesetting software.
16780  
16781 \end_layout
16782
16783 \begin_layout Standard
16784 Another excerpt says:
16785 \end_layout
16786
16787 \begin_layout Quotation
16788
16789 \emph on
16790 How is literate programming different from verbose commenting?
16791 \end_layout
16792
16793 \begin_layout Quotation
16794 There are three distinguishing characteristics.
16795  In order of importance, they are: 
16796 \end_layout
16797
16798 \begin_deeper
16799 \begin_layout Itemize
16800 flexible order of elaboration 
16801 \end_layout
16802
16803 \begin_layout Itemize
16804 automatic support for browsing 
16805 \end_layout
16806
16807 \begin_layout Itemize
16808 typeset documentation, especially diagrams and mathematics 
16809 \end_layout
16810
16811 \end_deeper
16812 \begin_layout Standard
16813 Now that I sparked your curiosity, take a look in the references.
16814 \end_layout
16815
16816 \begin_layout Subsubsection
16817 References
16818 \end_layout
16819
16820 \begin_layout Standard
16821 The complete Literate Programming FAQ can be found at:
16822 \end_layout
16823
16824 \begin_layout Quote
16825 Literate Programming FAQ 
16826 \begin_inset Flex URL
16827 status collapsed
16828
16829 \begin_layout Plain Layout
16830
16831 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
16832 \end_layout
16833
16834 \end_inset
16835
16836
16837 \end_layout
16838
16839 \begin_layout Standard
16840 The FAQ lists 23 (twenty three!) different literate programming tools.
16841  Where some are specialized or 
16842 \begin_inset Quotes eld
16843 \end_inset
16844
16845 tailored
16846 \begin_inset Quotes erd
16847 \end_inset
16848
16849  for particular programming languages, while other have general scope.
16850  I selected 
16851 \noun on
16852 Noweb
16853 \noun default
16854  for my own use for several reasons:
16855 \end_layout
16856
16857 \begin_layout Itemize
16858 It can generate the documentation either in LaTeX or HTML.
16859 \end_layout
16860
16861 \begin_layout Itemize
16862 It has a open architecture, i.e., it is easy to plug in new filters and to
16863  perform special processing that you may need.
16864  
16865 \end_layout
16866
16867 \begin_layout Itemize
16868 There is a good selection of filters available already (the HTML is one
16869  of them).
16870 \end_layout
16871
16872 \begin_layout Itemize
16873 It is free.
16874 \end_layout
16875
16876 \begin_layout Standard
16877 The Noweb web page can be found at: 
16878 \end_layout
16879
16880 \begin_layout Quote
16881 Noweb home page 
16882 \begin_inset Flex URL
16883 status collapsed
16884
16885 \begin_layout Plain Layout
16886
16887 http://www.cs.virginia.edu/~nr/noweb/
16888 \end_layout
16889
16890 \end_inset
16891
16892
16893 \end_layout
16894
16895 \begin_layout Standard
16896 Starting from there you can reach many other interesting links and even
16897  some literate program examples.
16898 \end_layout
16899
16900 \begin_layout Subsection
16901 \begin_inset CommandInset label
16902 LatexCommand label
16903 name "sub:LyX-and-Literate"
16904
16905 \end_inset
16906
16907 LyX and Literate Programming
16908 \end_layout
16909
16910 \begin_layout Standard
16911 The LyX support for Literate Programming is provided by using the generic
16912  LyX convertors mechanism.
16913  This support is provided in a 
16914 \begin_inset Quotes eld
16915 \end_inset
16916
16917 Noweb independent
16918 \begin_inset Quotes erd
16919 \end_inset
16920
16921  way, i.e., you will be able to use this new LyX feature with some other literate
16922  programming tool of your choice by just changing your LyX preferences.
16923 \end_layout
16924
16925 \begin_layout Subsubsection
16926 Generating documents and code (weaving and tangling)
16927 \end_layout
16928
16929 \begin_layout Paragraph
16930 Selecting the document class
16931 \end_layout
16932
16933 \begin_layout Standard
16934 If you have installed Noweb and LyX successfully, whenever you open a new
16935  document or try to change the document class of an existing one, you will
16936  find that there are three new document classes available:
16937 \end_layout
16938
16939 \begin_layout Itemize
16940 Article (Noweb)
16941 \end_layout
16942
16943 \begin_layout Itemize
16944 Book (Noweb)
16945 \end_layout
16946
16947 \begin_layout Itemize
16948 Report (Noweb)
16949 \end_layout
16950
16951 \begin_layout Standard
16952 You must select one of them to create your literate documents from.
16953  
16954 \end_layout
16955
16956 \begin_layout Standard
16957 Note that literate documents are not limited to these three classes.
16958  New classes can be generated from other styles like letter or in combination
16959  with other class variations like Article (AMS).
16960  If you have special needs that cannot be covered by one of the existing
16961  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
16962  will arrange to insert a new entry, or teach you how to do it.
16963 \begin_inset Foot
16964 status collapsed
16965
16966 \begin_layout Plain Layout
16967 It is very simple, it involves the creation of a file with four lines, and
16968  re-running of the auto configuration.
16969 \end_layout
16970
16971 \end_inset
16972
16973  Moreover, if you use a literate tool other than Noweb you may need to create
16974  a new set of document classes for it.
16975 \end_layout
16976
16977 \begin_layout Paragraph
16978 Typing code in
16979 \end_layout
16980
16981 \begin_layout Standard
16982 LyX enables you to write code with a layout named 
16983 \noun on
16984 Scrap
16985 \noun default
16986 .
16987 \begin_inset Foot
16988 status collapsed
16989
16990 \begin_layout Plain Layout
16991 The equivalent Noweb term is 
16992 \begin_inset Quotes eld
16993 \end_inset
16994
16995 Chunk
16996 \begin_inset Quotes erd
16997 \end_inset
16998
16999 .
17000  For historical reasons, I got used to the term 
17001 \begin_inset Quotes eld
17002 \end_inset
17003
17004 scrap
17005 \begin_inset Quotes erd
17006 \end_inset
17007
17008  introduced by other literate tool named Nuweb, which I used for many years
17009  before rendering myself to Noweb.
17010 \end_layout
17011
17012 \end_inset
17013
17014  Noweb delimits scraps like this:
17015 \end_layout
17016
17017 \begin_layout LyX-Code
17018 <<My scrap>>=
17019 \end_layout
17020
17021 \begin_layout LyX-Code
17022   code
17023 \end_layout
17024
17025 \begin_layout LyX-Code
17026   more code
17027 \end_layout
17028
17029 \begin_layout LyX-Code
17030   even more code
17031 \end_layout
17032
17033 \begin_layout LyX-Code
17034   @
17035 \end_layout
17036
17037 \begin_layout Standard
17038 The problem is that whatever is written in between the << and the 
17039 \family typewriter
17040 @
17041 \family default
17042  must be taken literally, i.e., LyX should be prevented from making any special
17043  interpretation of what has been written.
17044  This is handled by a special layout named Scrap, that works like a normal
17045  paragraph but has a free spacing capability.
17046 \end_layout
17047
17048 \begin_layout Standard
17049 The down side of the Scrap paragraph layout is that consecutive paragraphs
17050  of code will be spaced with one empty line in the source code and also
17051  in the printed documentation.
17052  The work around is to enter each line of code within a single Scrap, with
17053  a newline (ctrl-return).
17054  The example above will look like this:
17055 \begin_inset Foot
17056 status collapsed
17057
17058 \begin_layout Plain Layout
17059 If you have a printed version of this document you will not see any difference
17060  between the previous example and this one.
17061 \end_layout
17062
17063 \end_inset
17064
17065
17066 \end_layout
17067
17068 \begin_layout LyX-Code
17069 <<My scrap>>=
17070 \begin_inset Newline newline
17071 \end_inset
17072
17073   code
17074 \begin_inset Newline newline
17075 \end_inset
17076
17077   more code
17078 \begin_inset Newline newline
17079 \end_inset
17080
17081   even more code
17082 \begin_inset Newline newline
17083 \end_inset
17084
17085   @
17086 \end_layout
17087
17088 \begin_layout Standard
17089 This layout works fine.
17090  The only real inconvenience is that you have to type ctrl-return instead
17091  of a plain return.
17092 \begin_inset Foot
17093 status collapsed
17094
17095 \begin_layout Plain Layout
17096 It is in my list of 
17097 \begin_inset Quotes eld
17098 \end_inset
17099
17100 improvements
17101 \begin_inset Quotes erd
17102 \end_inset
17103
17104  to fix that.
17105 \end_layout
17106
17107 \end_inset
17108
17109
17110 \end_layout
17111
17112 \begin_layout Standard
17113 As a special note, you can also use the 
17114 \begin_inset Quotes eld
17115 \end_inset
17116
17117 %def
17118 \begin_inset Quotes erd
17119 \end_inset
17120
17121  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
17122 rence:
17123 \end_layout
17124
17125 \begin_layout LyX-Code
17126 <<My scrap>>=
17127 \begin_inset Newline newline
17128 \end_inset
17129
17130   def some_function(args):
17131 \begin_inset Newline newline
17132 \end_inset
17133
17134     "This is the doc string for this function."
17135 \begin_inset Newline newline
17136 \end_inset
17137
17138     print "My args: ", args
17139 \end_layout
17140
17141 \begin_layout LyX-Code
17142 @ %def some_function
17143 \end_layout
17144
17145 \begin_layout Standard
17146 For an example of this usage and the resulting cross-reference output, look
17147  at the Literate python program in 
17148 \emph on
17149 LIBDIR/examples/listerrors.lyx
17150 \emph default
17151  which should make this all clear.
17152 \end_layout
17153
17154 \begin_layout Paragraph
17155 Generating the documentation
17156 \end_layout
17157
17158 \begin_layout Standard
17159 At this point you already have a new document file with a proper document
17160  class, and with some code and text on it.
17161  How do I print it? The answer is simple, you select 
17162 \family sans
17163 \bar under
17164 V
17165 \bar default
17166 iew\SpecialChar \menuseparator
17167
17168 \bar under
17169 D
17170 \bar default
17171 VI,
17172 \family default
17173  etc.
17174  Just like you would do for a plain document.
17175  No special procedure is required.
17176 \end_layout
17177
17178 \begin_layout Standard
17179 To help orientate you, I will now explain what happens inside LyX:
17180 \end_layout
17181
17182 \begin_layout Enumerate
17183 When the 
17184 \family sans
17185 \bar under
17186 U
17187 \bar default
17188 pdate\SpecialChar \menuseparator
17189
17190 \bar under
17191 D
17192 \bar default
17193 VI
17194 \family default
17195  menu option is chosen, a LaTeX file is generated.
17196  
17197 \end_layout
17198
17199 \begin_deeper
17200 \begin_layout Standard
17201 If the document is of any literate class the generated file will be named
17202  with an extension name defined by the 
17203 \begin_inset Quotes eld
17204 \end_inset
17205
17206 literate
17207 \begin_inset Quotes erd
17208 \end_inset
17209
17210  format (defined in the Preferences panel), otherwise the file will have
17211  the usual 
17212 \family typewriter
17213 .tex
17214 \family default
17215  extension.
17216 \end_layout
17217
17218 \end_deeper
17219 \begin_layout Enumerate
17220 Note that the only difference so far is in the name of the file, no special
17221  processing is required by LyX.
17222  Given that you formatted the code using the Scrap layout that, by itself,
17223  takes care of the business.
17224 \end_layout
17225
17226 \begin_layout Enumerate
17227 If the document is of any literate class LyX will then use the internal
17228  LyX to Noweb converter, followed by the Noweb to LaTeX converter
17229 \begin_inset Foot
17230 status collapsed
17231
17232 \begin_layout Plain Layout
17233 The converters are defined in the 
17234 \family sans
17235 \bar under
17236 T
17237 \bar default
17238 ools\SpecialChar \menuseparator
17239
17240 \bar under
17241 P
17242 \bar default
17243 references
17244 \family default
17245  panel, under the 
17246 \begin_inset Quotes eld
17247 \end_inset
17248
17249 Conversion
17250 \begin_inset Quotes erd
17251 \end_inset
17252
17253  tab.
17254  See section 
17255 \begin_inset CommandInset ref
17256 LatexCommand ref
17257 reference "sub:converters"
17258
17259 \end_inset
17260
17261  of the 
17262 \emph on
17263 Customization
17264 \emph default
17265  manual for general information about converters.
17266 \end_layout
17267
17268 \end_inset
17269
17270  to generate the LaTeX file.
17271 \end_layout
17272
17273 \begin_deeper
17274 \begin_layout Standard
17275 Otherwise it will just skip this step.
17276 \end_layout
17277
17278 \end_deeper
17279 \begin_layout Enumerate
17280 Finally, LaTeX is invoked and the regular post processing continues as in
17281  a plain document.
17282 \end_layout
17283
17284 \begin_layout Standard
17285 Independence from a particular 
17286 \begin_inset Quotes eld
17287 \end_inset
17288
17289 literate tool
17290 \begin_inset Quotes erd
17291 \end_inset
17292
17293  is easily achieved by changing the commands that are run by the various
17294  converters.
17295 \end_layout
17296
17297 \begin_layout Paragraph
17298 Generating the code
17299 \end_layout
17300
17301 \begin_layout Standard
17302 When the build menu option is chosen or the corresponding button in the
17303  toolbar is pressed, a LaTeX file is generated just like step 1 above.
17304  Next, LyX invokes the 
17305 \family typewriter
17306 Noweb->Program
17307 \family default
17308  converter.
17309  This converter needs to be defined by the user and is not installed by
17310  default, though the Program format is.
17311  This converter (like any other converter) will have two parts:
17312 \end_layout
17313
17314 \begin_layout Enumerate
17315 The converter program itself.
17316  This program performs the conversion from the one format to the other (in
17317  this case, from the Noweb format to the Program pseudo-format).
17318 \end_layout
17319
17320 \begin_layout Enumerate
17321 The error log parser.
17322  This is a program whose sole purpose is to rewrite error messages in a
17323  format that LyX understands.
17324  This makes it possible for LyX to place error boxes in the right places
17325  in the file buffer.
17326 \end_layout
17327
17328 \begin_layout Standard
17329 The first part, the 
17330 \begin_inset Quotes eld
17331 \end_inset
17332
17333 Converter
17334 \begin_inset Quotes erd
17335 \end_inset
17336
17337  setting, should be set to 
17338 \begin_inset Quotes eld
17339 \end_inset
17340
17341
17342 \family typewriter
17343 build-script $$i
17344 \family default
17345
17346 \begin_inset Quotes erd
17347 \end_inset
17348
17349 .
17350  This basically means that LyX will call 
17351 \begin_inset Quotes eld
17352 \end_inset
17353
17354 build-script
17355 \begin_inset Quotes erd
17356 \end_inset
17357
17358  (a program or script) with the name of the Noweb file (normally a file
17359  in the LyX temp directory).
17360  
17361 \end_layout
17362
17363 \begin_layout Standard
17364 This is an implementation of 
17365 \begin_inset Quotes eld
17366 \end_inset
17367
17368 build-script
17369 \begin_inset Quotes erd
17370 \end_inset
17371
17372  that you can place in a directory on your path:
17373 \end_layout
17374
17375 \begin_layout LyX-Code
17376 #!/bin/sh
17377 \end_layout
17378
17379 \begin_layout LyX-Code
17380 #
17381 \end_layout
17382
17383 \begin_layout LyX-Code
17384 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
17385 \end_layout
17386
17387 \begin_layout Standard
17388 The next part of the converter setting is the 
17389 \begin_inset Quotes eld
17390 \end_inset
17391
17392 Flags
17393 \begin_inset Quotes erd
17394 \end_inset
17395
17396  which is to be set to 
17397 \begin_inset Quotes eld
17398 \end_inset
17399
17400
17401 \family typewriter
17402 parselog=listerrors
17403 \family default
17404
17405 \begin_inset Quotes erd
17406 \end_inset
17407
17408 .
17409  This will run any errors that are generated by the 
17410 \begin_inset Quotes eld
17411 \end_inset
17412
17413 build-script
17414 \begin_inset Quotes erd
17415 \end_inset
17416
17417  process through the 
17418 \begin_inset Quotes eld
17419 \end_inset
17420
17421 listerrors
17422 \begin_inset Quotes erd
17423 \end_inset
17424
17425  program.
17426 \end_layout
17427
17428 \begin_layout Standard
17429 The converter code looks in 
17430 \emph on
17431 MYLYXDIR/scripts
17432 \emph default
17433  first, then in 
17434 \emph on
17435 LIBDIR/scripts
17436 \emph default
17437  then on the path for the 
17438 \begin_inset Quotes eld
17439 \end_inset
17440
17441 listerrors
17442 \begin_inset Quotes erd
17443 \end_inset
17444
17445  program.
17446 \end_layout
17447
17448 \begin_layout Standard
17449 The build will normally take place in LyX's temporary directory, so the
17450  files produced by the conversion will be in that directory.
17451  LyX will copy out what it regards as the `main' file, but the 
17452 \family typewriter
17453 Noweb->Program
17454 \family default
17455  conversion may produce several files, and so most of these would then be
17456  deleted when LyX was closed.
17457  The present solution is to use a `copier',
17458 \begin_inset Foot
17459 status collapsed
17460
17461 \begin_layout Plain Layout
17462 See section 
17463 \begin_inset CommandInset ref
17464 LatexCommand ref
17465 reference "sec:converters-etc"
17466
17467 \end_inset
17468
17469  of the 
17470 \emph on
17471 Customization
17472 \emph default
17473  manual for information on these.
17474 \end_layout
17475
17476 \end_inset
17477
17478  in this case, the 
17479 \family typewriter
17480 ext_copy.py
17481 \family default
17482  script in its default mode, so that the entire contents of the temporary
17483  directory is copied.
17484  More will get copied than is needed, to be sure, but nothing will be lost.
17485  If, however, you know what extensions the generated files will have, this
17486  can be improved by using the 
17487 \family typewriter
17488 -e
17489 \family default
17490  option to 
17491 \family typewriter
17492 ext_copy
17493 \family default
17494 .
17495  This option takes a comma-separated list of extensions to copy.
17496  So, for example, if the conversion will generate only files with the extensions
17497  
17498 \family typewriter
17499 .c
17500 \family default
17501  and 
17502 \family typewriter
17503 .h
17504 \family default
17505 , then the correct definition would be:
17506 \end_layout
17507
17508 \begin_layout LyX-Code
17509 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
17510 \end_layout
17511
17512 \begin_layout Standard
17513 The result will be that only files with these two extensions will be copied
17514  out.
17515 \end_layout
17516
17517 \begin_layout Paragraph
17518 Build instructions in the document
17519 \end_layout
17520
17521 \begin_layout Standard
17522 The last piece of the integration between LyX and noweb is the 
17523 \begin_inset Quotes eld
17524 \end_inset
17525
17526 build-script
17527 \begin_inset Quotes erd
17528 \end_inset
17529
17530  scrap.
17531  Generally, the instructions for building your program should be embedded
17532  in a scrap of its own.
17533  The noweb-specific 
17534 \begin_inset Quotes eld
17535 \end_inset
17536
17537 build-script
17538 \begin_inset Quotes erd
17539 \end_inset
17540
17541  above uses the notangle command to look for this scrap (called 
17542 \begin_inset Quotes eld
17543 \end_inset
17544
17545 build-script
17546 \begin_inset Quotes erd
17547 \end_inset
17548
17549 ) and runs its contents through 
17550 \begin_inset Quotes eld
17551 \end_inset
17552
17553 sh
17554 \begin_inset Quotes erd
17555 \end_inset
17556
17557 .
17558 \end_layout
17559
17560 \begin_layout Standard
17561 Typically, such a scrap would look something like this:
17562 \end_layout
17563
17564 \begin_layout LyX-Code
17565 <<build-script>>=
17566 \begin_inset Newline newline
17567 \end_inset
17568
17569 #!/bin/sh
17570 \begin_inset Newline newline
17571 \end_inset
17572
17573
17574 \begin_inset Newline newline
17575 \end_inset
17576
17577 if [ -z "${NOWEB_SOURCE}" ]
17578 \begin_inset Newline newline
17579 \end_inset
17580
17581 then
17582 \begin_inset Newline newline
17583 \end_inset
17584
17585   NOWEB_SOURCE=myfile.nw
17586 \begin_inset Newline newline
17587 \end_inset
17588
17589 fi
17590 \begin_inset Newline newline
17591 \end_inset
17592
17593 [...
17594  code to extract files ...]
17595 \begin_inset Newline newline
17596 \end_inset
17597
17598 [...
17599  code to compile files ...]
17600 \begin_inset Newline newline
17601 \end_inset
17602
17603 @
17604 \end_layout
17605
17606 \begin_layout Standard
17607 Look in 
17608 \emph on
17609 LIBDIR/examples/listerrors.lyx
17610 \emph default
17611  or in 
17612 \emph on
17613 LIBDIR/examples/Literate.lyx
17614 \emph default
17615  which implement two versions of the 
17616 \begin_inset Quotes eld
17617 \end_inset
17618
17619 listerrors
17620 \begin_inset Quotes erd
17621 \end_inset
17622
17623  program for some illustrations of how all of these pieces go together or
17624  in 
17625 \emph on
17626 LIBDIR/examples/noweb2lyx.lyx.
17627
17628 \emph default
17629  Interestingly, these three files show off the language-indepence of the
17630  LyX literate programming support since they are written in Python, C and
17631  Perl respectively.
17632 \end_layout
17633
17634 \begin_layout Subsubsection
17635 Configuring LyX
17636 \end_layout
17637
17638 \begin_layout Standard
17639 All the Literate Programming support is configured by the 
17640 \family sans
17641 \bar under
17642 T
17643 \bar default
17644 ools\SpecialChar \menuseparator
17645
17646 \bar under
17647 P
17648 \bar default
17649 references
17650 \family default
17651  panel in the 
17652 \begin_inset Quotes eld
17653 \end_inset
17654
17655 Conversion
17656 \begin_inset Quotes erd
17657 \end_inset
17658
17659  tab.
17660  The important parts are:
17661 \end_layout
17662
17663 \begin_layout Description
17664 the
17665 \begin_inset space ~
17666 \end_inset
17667
17668
17669 \begin_inset Quotes eld
17670 \end_inset
17671
17672 literate
17673 \begin_inset Quotes erd
17674 \end_inset
17675
17676
17677 \begin_inset space ~
17678 \end_inset
17679
17680 format Set up via the Formats tab, this is where the Noweb-specific pieces
17681  are set up.
17682  The 
17683 \family sans
17684 GUI Name
17685 \family default
17686  is set to 
17687 \family typewriter
17688 NoWeb
17689 \family default
17690 , the file extension is set to 
17691 \family typewriter
17692 .nw
17693 \family default
17694 .
17695  This tells LyX to create a file with a 
17696 \family typewriter
17697 .nw
17698 \family default
17699  extension in the first step of the conversion process.
17700 \end_layout
17701
17702 \begin_layout Description
17703 the
17704 \begin_inset space ~
17705 \end_inset
17706
17707
17708 \family sans
17709 Program
17710 \family default
17711
17712 \begin_inset space ~
17713 \end_inset
17714
17715 format This is an empty format whose sole purpose is to be the endpoint
17716  of a conversion (which then allows us to set up a converter for it).
17717 \end_layout
17718
17719 \begin_layout Description
17720
17721 \family sans
17722 NoWeb
17723 \family default
17724 ->
17725 \family sans
17726 LaTeX
17727 \family default
17728  This converter performs the 
17729 \begin_inset Quotes eld
17730 \end_inset
17731
17732 weaving
17733 \begin_inset Quotes erd
17734 \end_inset
17735
17736  of the literate document.
17737  For Noweb, it is set to 
17738 \begin_inset Quotes eld
17739 \end_inset
17740
17741
17742 \family typewriter
17743 noweave -delay -index $$i > $$o
17744 \family default
17745
17746 \begin_inset Quotes erd
17747 \end_inset
17748
17749
17750 \end_layout
17751
17752 \begin_layout Description
17753
17754 \family sans
17755 NoWeb
17756 \family default
17757 ->
17758 \family sans
17759 Program
17760 \family default
17761  This performs the 
17762 \begin_inset Quotes eld
17763 \end_inset
17764
17765 tangling step
17766 \begin_inset Quotes erd
17767 \end_inset
17768
17769 .
17770  As stated above, the Converter is set to 
17771 \begin_inset Quotes eld
17772 \end_inset
17773
17774
17775 \family typewriter
17776 build-script $$i
17777 \family default
17778
17779 \begin_inset Quotes erd
17780 \end_inset
17781
17782 , with Flags set to 
17783 \begin_inset Quotes eld
17784 \end_inset
17785
17786
17787 \family typewriter
17788 originaldir,parselog=listerrors
17789 \family default
17790
17791 \begin_inset Quotes erd
17792 \end_inset
17793
17794 .
17795 \end_layout
17796
17797 \begin_layout Subsubsection
17798 Debug extensions
17799 \end_layout
17800
17801 \begin_layout Standard
17802 There is also a new function implemented in the LyX server, the 
17803 \begin_inset Quotes eld
17804 \end_inset
17805
17806 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
17807  
17808 \end_layout
17809
17810 \begin_layout Standard
17811 When debugging code with ddd/gdb, it is possible to invoke a text editor
17812  at the current execution position with a single key stroke.
17813  The default ddd configuration for that is shift-ctrl-V.
17814  It happens that you can define the editor command line invocation in ddd
17815  by accessing the 
17816 \family sans
17817 \bar under
17818 E
17819 \bar default
17820 dit\SpecialChar \menuseparator
17821
17822 \bar under
17823 P
17824 \bar default
17825 references\SpecialChar \menuseparator
17826
17827 \bar under
17828 H
17829 \bar default
17830 elpers
17831 \family default
17832  dialog and changing the "Edit Sources" entry.
17833 \end_layout
17834
17835 \begin_layout Standard
17836 I take advantage of the new created LyX server function and this ddd feature,
17837  and set 
17838 \begin_inset Quotes eld
17839 \end_inset
17840
17841 Edit Sources
17842 \begin_inset Quotes erd
17843 \end_inset
17844
17845  to:
17846 \end_layout
17847
17848 \begin_layout LyX-Code
17849 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
17850 \end_layout
17851
17852 \begin_layout Standard
17853 With this, whenever you are using ddd and find a point in the program that
17854  you want to edit, you just press shift-ctrl-V (in the ddd window), and
17855  ddd you forward this information to LyX through the LyX server and then
17856  the LyX window will show the same file with the cursor at the same position
17857  ddd was pointing to.
17858  No more guessing or long scrolling to locate a point in the program back
17859  from debugging !
17860 \end_layout
17861
17862 \begin_layout Standard
17863 Note however that you must enable the LyX server to get this feature working
17864  (it is disabled by default).
17865  You can enable it in 
17866 \family sans
17867 Preferences
17868 \family default
17869  (tabs 
17870 \family sans
17871 Inputs
17872 \family default
17873
17874 \family sans
17875 Paths
17876 \family default
17877 ) by entering in the 
17878 \family sans
17879 LyXserver pipe
17880 \family default
17881  a path like 
17882 \begin_inset Quotes eld
17883 \end_inset
17884
17885
17886 \family typewriter
17887 /home/<your-home-directory>/.lyx/lyxpipe
17888 \family default
17889
17890 \begin_inset Quotes erd
17891 \end_inset
17892
17893
17894 \end_layout
17895
17896 \begin_layout Standard
17897 Read the LyX server documentation in the 
17898 \emph on
17899 Customization Manual
17900 \emph default
17901  for further information.
17902 \end_layout
17903
17904 \begin_layout Subsubsection
17905 Toolbar extensions
17906 \end_layout
17907
17908 \begin_layout Standard
17909 There are six new buttons that can be added to your LyX toolbar.
17910  Five of these buttons are short cuts to layout styles: 
17911 \family sans
17912 Standard
17913 \family default
17914
17915 \family sans
17916 Section
17917 \family default
17918
17919 \family sans
17920 LaTeX
17921 \family default
17922
17923 \family sans
17924 LyX-Code
17925 \family default
17926 , and 
17927 \family sans
17928 Scrap
17929 \family default
17930 .
17931  The last one is a short cut to the 
17932 \begin_inset Quotes eld
17933 \end_inset
17934
17935 Build Program
17936 \begin_inset Quotes erd
17937 \end_inset
17938
17939  File menu entry.
17940  
17941 \end_layout
17942
17943 \begin_layout Standard
17944 LyX has a range of buttons that are available for tool bar customization.
17945  In my toolbar I like to combine the six short cuts above with two more:
17946  One for 
17947 \family sans
17948 \bar under
17949 V
17950 \bar default
17951 iew
17952 \family default
17953 \SpecialChar \menuseparator
17954
17955 \family sans
17956 \bar under
17957 U
17958 \bar default
17959 pdate
17960 \family default
17961 \SpecialChar \menuseparator
17962
17963 \family sans
17964 \bar under
17965 D
17966 \bar default
17967 VI
17968 \family default
17969  and the other for 
17970 \family sans
17971 \bar under
17972 V
17973 \bar default
17974 iew\SpecialChar \menuseparator
17975
17976 \bar under
17977 D
17978 \bar default
17979 VI
17980 \family default
17981  File menu entries.
17982  Here is how it looks like:
17983 \end_layout
17984
17985 \begin_layout LyX-Code
17986 Toolbar
17987 \end_layout
17988
17989 \begin_layout LyX-Code
17990   Layouts
17991 \end_layout
17992
17993 \begin_layout LyX-Code
17994   Icon "layout Standard"
17995 \end_layout
17996
17997 \begin_layout LyX-Code
17998   Icon "layout Section"
17999 \end_layout
18000
18001 \begin_layout LyX-Code
18002   Icon "layout LaTeX"
18003 \end_layout
18004
18005 \begin_layout LyX-Code
18006   Icon "layout LyX-Code"
18007 \end_layout
18008
18009 \begin_layout LyX-Code
18010   Icon "layout Scrap"
18011 \end_layout
18012
18013 \begin_layout LyX-Code
18014   Separator
18015 \end_layout
18016
18017 \begin_layout LyX-Code
18018   Icon "buffer-view"
18019 \end_layout
18020
18021 \begin_layout LyX-Code
18022   Icon "buffer-typeset"
18023 \end_layout
18024
18025 \begin_layout LyX-Code
18026   Icon "build-program"
18027 \end_layout
18028
18029 \begin_layout LyX-Code
18030   Separator
18031 \end_layout
18032
18033 \begin_layout LyX-Code
18034 .
18035 \end_layout
18036
18037 \begin_layout LyX-Code
18038 .
18039 \end_layout
18040
18041 \begin_layout LyX-Code
18042 .
18043 \end_layout
18044
18045 \begin_layout LyX-Code
18046 End
18047 \end_layout
18048
18049 \begin_layout Subsubsection
18050 Colors customization
18051 \end_layout
18052
18053 \begin_layout Standard
18054 There are a number of colors in LyX that can be customized in 
18055 \family sans
18056 Preferences
18057 \family default
18058 .
18059  One of the things that bothers people is the LaTeX font color.
18060  The default color is red, since the scraps uses LaTeX font, and there is
18061  a lot of scraps in literate documents, you may get tired of seeing everything
18062  in red.
18063  You can change it by going to the tabs 
18064 \family sans
18065 Look&Feel
18066 \family default
18067
18068 \family sans
18069 Colors.
18070 \end_layout
18071
18072 \begin_layout Standard
18073 The next thing is the visible presence of the newline character in the screen.
18074  You can choose the color of this particular character and make it blend
18075  in the background.
18076  I recommend you choosing a color that is close to the background but not
18077  equal, that way you still can see it is there, but it is not bothering
18078  you anymore.
18079  
18080 \end_layout
18081
18082 \begin_layout Chapter
18083 Secrets of the LaTeX Masters
18084 \begin_inset CommandInset label
18085 LatexCommand label
18086 name "cha:secrets"
18087
18088 \end_inset
18089
18090
18091 \end_layout
18092
18093 \begin_layout Standard
18094 Though LyX is a powerful tool, it cannot hope to support everything that
18095  can be done with pure TeX/LaTeX.
18096  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
18097  as long as you are not afraid to use that 
18098 \begin_inset Quotes eld
18099 \end_inset
18100
18101 TeX
18102 \begin_inset Quotes erd
18103 \end_inset
18104
18105  button on the toolbar or add things to the LaTeX preamble.
18106  This section lists some tips, tricks, and otherwise cool ideas to give
18107  your document that extra little flair.
18108  
18109 \emph on
18110 Do try this at home
18111 \emph default
18112 , just start with something a little smaller and less important than your
18113  dissertation!
18114 \end_layout
18115
18116 \begin_layout Standard
18117 Most ideas in this section require less common files in your LaTeX installation.
18118  If you have a system like teTeX, most will already be available.
18119  A few, however, will need to be downloaded from one of the CTAN archives.
18120  Often, there are several ways to do something, or several LaTeX style files
18121  which do the same thing.
18122  We do not endorse one choice over another, we simply claim that we have
18123  done a particular task with a particular file.
18124  Put on your wizard hat, keep an eye out for dragons, and let us begin.
18125 \end_layout
18126
18127 \begin_layout Section
18128 Multiple Columns
18129 \end_layout
18130
18131 \begin_layout Standard
18132 by 
18133 \noun on
18134 Lars Gullik Bjønnes
18135 \end_layout
18136
18137 \begin_layout Subsection
18138 Purpose
18139 \end_layout
18140
18141 \begin_layout Standard
18142 The aim for this chapter
18143 \begin_inset Foot
18144 status collapsed
18145
18146 \begin_layout Plain Layout
18147 Editor's note: Lars' original chapter was a masterful description of how
18148  to use the 
18149 \family typewriter
18150 multicol
18151 \family default
18152  package.
18153  However, it was too long to flow smoothly in this document.
18154  I have therefore chosen to excerpt the most important sections here (sorry,
18155  Lars); you can read the original chapter (and more of the story!) in the
18156  example file 
18157 \family typewriter
18158 examples/multicol.lyx
18159 \family default
18160 .
18161  --- mer
18162 \end_layout
18163
18164 \end_inset
18165
18166  is to show how the LaTeX package 
18167 \family typewriter
18168 multicol
18169 \family default
18170  can be used in a LyX document.
18171  As LyX doesn't support the 
18172 \family typewriter
18173 multicol
18174 \family default
18175  package natively yet, we have to use some small hacks.
18176  By reading this section it should be obvious how to do this.
18177 \end_layout
18178
18179 \begin_layout Subsection
18180 Limitations 
18181 \end_layout
18182
18183 \begin_layout Standard
18184 The 
18185 \family typewriter
18186 multicol
18187 \family default
18188  package allows switching between one and multicolumn format on the same
18189  page.
18190  Footnotes are handled correctly (for the most part), but will be placed
18191  at the bottom of the page and not under each column.
18192  LaTeX's float mechanism, however, is partly disabled in the current implementat
18193 ion.
18194  At the moment only page-wide floats can be used within the scope of the
18195  environment.
18196 \end_layout
18197
18198 \begin_layout Subsection
18199 Examples
18200 \end_layout
18201
18202 \begin_layout Subsubsection
18203 Two columns
18204 \end_layout
18205
18206 \begin_layout Standard
18207 If you want to have two columns in your text, you have use LaTeX mode to
18208  insert 
18209 \family typewriter
18210
18211 \backslash
18212 begin{multicols}{2}
18213 \family default
18214  at the point where you want the two column layout to start, and then 
18215 \family typewriter
18216
18217 \backslash
18218 end{multicols}
18219 \family default
18220  where you want it to end.
18221  Like this:
18222 \end_layout
18223
18224 \begin_layout Standard
18225 \begin_inset ERT
18226 status open
18227
18228 \begin_layout Plain Layout
18229
18230
18231 \backslash
18232 begin{multicols}{2}
18233 \end_layout
18234
18235 \end_inset
18236
18237
18238 \end_layout
18239
18240 \begin_layout Standard
18241 \noindent
18242
18243 \series bold
18244 \size small
18245 The Adventure of the Empty House
18246 \series default
18247
18248 \begin_inset Newline newline
18249 \end_inset
18250
18251 by 
18252 \noun on
18253 Sir Arthur Conan Doyle
18254 \end_layout
18255
18256 \begin_layout Standard
18257
18258 \size small
18259 It was in the spring of the year 1894 that all London was interested, and
18260  the fashionable world dismayed, by the murder of the Honourable Ronald
18261  Adair under most unusual and inexplicable circumstances.
18262  The public has already learned those particulars of the crime which came
18263  out in the police investigation, but a good deal was suppressed upon that
18264  occasion, since the case for the prosecution was so overwhelmingly strong
18265  that it was not necessary to bring forward all the facts.
18266  Only now, at the end of nearly ten years, am I allowed to supply those
18267  missing links which make up the whole of that remarkable chain.
18268  The crime was of interest in itself, but that interest was as nothing to
18269  me compared to the inconceivable sequel, which afforded me the greatest
18270  shock and surprise of any event in my adventurous life.
18271  Even now, after this long interval, I find myself thrilling as I think
18272  of it, and feeling once more that sudden flood of joy, amazement, and increduli
18273 ty which utterly submerged my mind.
18274  Let me say to that public, which has shown some interest in those glimpses
18275  which I have occasionally given them of the thoughts and actions of a very
18276  remarkable man, that they are not to blame me if I have not shared my knowledge
18277  with them, for I should have considered it my first duty to do so, had
18278  I not been barred by a positive prohibition from his own lips, which was
18279  only withdrawn upon the third of last month.
18280 \end_layout
18281
18282 \begin_layout Standard
18283 \begin_inset ERT
18284 status open
18285
18286 \begin_layout Plain Layout
18287
18288
18289 \backslash
18290 end{multicols}
18291 \end_layout
18292
18293 \end_inset
18294
18295
18296 \end_layout
18297
18298 \begin_layout Subsubsection
18299 Multiple columns
18300 \end_layout
18301
18302 \begin_layout Standard
18303 The same pattern is used when you want more than two columns:
18304 \end_layout
18305
18306 \begin_layout Standard
18307 \begin_inset ERT
18308 status open
18309
18310 \begin_layout Plain Layout
18311
18312
18313 \backslash
18314 begin{multicols}{3}
18315 \end_layout
18316
18317 \end_inset
18318
18319
18320 \end_layout
18321
18322 \begin_layout Standard
18323
18324 \size footnotesize
18325 It can be imagined that my close intimacy with Sherlock Holmes had interested
18326  me deeply in crime, and that after his disappearance I never failed to
18327  read with care the various problems which came before the public.
18328  And I even attempted, more than once, for my own private satisfaction,
18329  to employ his methods in their solution, though with indifferent success.
18330  There was none, however, which appealed to me like this tragedy of Ronald
18331  Adair.
18332  As I read the evidence at the inquest, which led up to a verdict of willful
18333  murder against some person or persons unknown, I realized more clearly
18334  than I had ever done the loss which the community had sustained by the
18335  death of Sherlock Holmes.
18336  There were points about this strange business which would, I was sure,
18337  have specially appealed to him, and the efforts of the police would have
18338  been supplemented, or more probably anticipated, by the trained observation
18339  and the alert mind of the first criminal agent in Europe.
18340  All day, as I drove upon my round, I turned over the case in my mind and
18341  found no explanation which appeared to me to be adequate.
18342  At the risk of telling a twice-told tale, I will recapitulate the facts
18343  as they were known to the public at the conclusion of the inquest.
18344 \end_layout
18345
18346 \begin_layout Standard
18347 \begin_inset ERT
18348 status open
18349
18350 \begin_layout Plain Layout
18351
18352
18353 \backslash
18354 end{multicols}
18355 \end_layout
18356
18357 \end_inset
18358
18359
18360 \end_layout
18361
18362 \begin_layout Standard
18363 You can have more than 3 columns if you want to, but that might not be very
18364  pleasant for the eye.
18365 \end_layout
18366
18367 \begin_layout Subsubsection
18368 Columns inside columns
18369 \end_layout
18370
18371 \begin_layout Standard
18372 You can even have columns inside columns:
18373 \end_layout
18374
18375 \begin_layout Standard
18376 \begin_inset ERT
18377 status open
18378
18379 \begin_layout Plain Layout
18380
18381
18382 \backslash
18383 begin{multicols}{2}
18384 \end_layout
18385
18386 \end_inset
18387
18388
18389 \end_layout
18390
18391 \begin_layout Standard
18392
18393 \size footnotesize
18394 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
18395  at that time governor of one of the Australian colonies.
18396  Adair's mother had returned from Australia to undergo the operation for
18397  cataract, and she, her son Ronald, and her daughter Hilda were living together
18398  at 427 Park Lane.
18399 \end_layout
18400
18401 \begin_layout Standard
18402 \begin_inset ERT
18403 status open
18404
18405 \begin_layout Plain Layout
18406
18407
18408 \backslash
18409 begin{multicols}{2}
18410 \end_layout
18411
18412 \end_inset
18413
18414
18415 \end_layout
18416
18417 \begin_layout Standard
18418
18419 \size footnotesize
18420 The youth moved in the best society--had, so far as was known, no enemies
18421  and no particular vices.
18422  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
18423  had been broken off by mutual consent some months before, and there was
18424  no sign that it had left any very profound feeling behind it.
18425  For the rest {sic} the man's life moved in a narrow and conventional circle,
18426  for his habits were quiet and his nature unemotional.
18427  Yet it was upon this easy-going young aristocrat that death came, in most
18428  strange and unexpected form, between the hours of ten and eleven-twenty
18429  on the night of March 30, 1894.
18430 \end_layout
18431
18432 \begin_layout Standard
18433 \begin_inset ERT
18434 status open
18435
18436 \begin_layout Plain Layout
18437
18438
18439 \backslash
18440 end{multicols}
18441 \end_layout
18442
18443 \end_inset
18444
18445
18446 \end_layout
18447
18448 \begin_layout Standard
18449
18450 \size footnotesize
18451 Ronald Adair was fond of cards--playing continually, but never for such
18452  stakes as would hurt him.
18453  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
18454  It was shown that, after dinner on the day of his death, he had played
18455  a rubber of whist at the latter club.
18456  He had also played there in the afternoon.
18457
18458 \size default
18459  
18460 \size footnotesize
18461 The evidence of those who had played with him-- Mr.
18462  Murray, Sir John Hardy, and Colonel Moran--showed that the game was whist,
18463  and that there was a fairly equal fall of the cards.
18464  Adair might have lost five pounds, but not more.
18465  His fortune was a considerable one, and such a loss could not in any way
18466  affect him.
18467  He had played nearly every day at one club or other, but he was a cautious
18468  player, and usually rose a winner.
18469  It came out in evidence that, in partnership with Colonel Moran, he had
18470  actually won as much as four hundred and twenty pounds in a sitting, some
18471  weeks before, from Godfrey Milner and Lord Balmoral.
18472  So much for his recent history as it came out at the inquest.
18473 \end_layout
18474
18475 \begin_layout Standard
18476 \begin_inset ERT
18477 status open
18478
18479 \begin_layout Plain Layout
18480
18481
18482 \backslash
18483 end{multicols}
18484 \end_layout
18485
18486 \end_inset
18487
18488
18489 \end_layout
18490
18491 \begin_layout Standard
18492 Please do read the file 
18493 \family typewriter
18494 examples/multicol.lyx
18495 \family default
18496  for more advanced examples including column and header spacing, vertical
18497  separator lines, and more.
18498 \end_layout
18499
18500 \begin_layout Section
18501 Numbering in the 
18502 \family sans
18503 Enumerate
18504 \family default
18505  Paragraph Environment
18506 \begin_inset OptArg
18507 status collapsed
18508
18509 \begin_layout Plain Layout
18510 Numbering in Enumerate
18511 \end_layout
18512
18513 \end_inset
18514
18515
18516 \end_layout
18517
18518 \begin_layout Standard
18519 by 
18520 \noun on
18521 John Weiss
18522 \end_layout
18523
18524 \begin_layout Standard
18525 \begin_inset VSpace bigskip
18526 \end_inset
18527
18528
18529 \end_layout
18530
18531 \begin_layout Standard
18532 \noindent
18533 The default numbering for the 
18534 \family sans
18535 Enumerate
18536 \family default
18537  paragraph environment begins with Arabic numbers and ends with uppercase
18538  letters.
18539  Suppose, however, you wanted a different type of numbering scheme.
18540  Here's a quickie example of how to change the numbering scheme:
18541 \end_layout
18542
18543 \begin_layout LyX-Code
18544
18545 \backslash
18546 renewcommand{
18547 \backslash
18548 labelenumi}{
18549 \backslash
18550 Roman{enumi}.}
18551 \end_layout
18552
18553 \begin_layout LyX-Code
18554
18555 \backslash
18556 renewcommand{
18557 \backslash
18558 labelenumii}{
18559 \backslash
18560 Alph{enumii}.}
18561 \end_layout
18562
18563 \begin_layout LyX-Code
18564
18565 \backslash
18566 renewcommand{
18567 \backslash
18568 labelenumiii}{
18569 \backslash
18570 arabic{enumiii}.}
18571 \end_layout
18572
18573 \begin_layout LyX-Code
18574
18575 \backslash
18576 renewcommand{
18577 \backslash
18578 labelenumiv}{
18579 \backslash
18580 alph{enumiv}.)}
18581 \end_layout
18582
18583 \begin_layout Standard
18584 \SpecialChar \ldots{}
18585  which changes the numbering scheme to uppercase Roman numerals, uppercase
18586  letters, Arabic numbers, and lowercase letter.
18587 \end_layout
18588
18589 \begin_layout Standard
18590 Additionally, the previous example also adds a little bit extra to the numbering
18591  scheme.
18592  For example, the first level label actually looks like: 
18593 \begin_inset Quotes eld
18594 \end_inset
18595
18596 I.
18597 \begin_inset Quotes erd
18598 \end_inset
18599
18600 .
18601  For ease of reading, we'll describe what the numbering schemes look like
18602  using a notation something like this: <
18603 \begin_inset Quotes eld
18604 \end_inset
18605
18606 I.
18607 \begin_inset Quotes erd
18608 \end_inset
18609
18610 ,
18611 \begin_inset space ~
18612 \end_inset
18613
18614
18615 \begin_inset Quotes erd
18616 \end_inset
18617
18618 A.
18619 \begin_inset Quotes erd
18620 \end_inset
18621
18622 ,
18623 \begin_inset space ~
18624 \end_inset
18625
18626
18627 \begin_inset Quotes erd
18628 \end_inset
18629
18630 1.
18631 \begin_inset Quotes erd
18632 \end_inset
18633
18634 ,
18635 \begin_inset space ~
18636 \end_inset
18637
18638
18639 \begin_inset Quotes eld
18640 \end_inset
18641
18642 a.)
18643 \begin_inset Quotes erd
18644 \end_inset
18645
18646 >.
18647  
18648 \end_layout
18649
18650 \begin_layout Standard
18651 As you can see in the example, there is a label command for each nesting
18652  level, 
18653 \family typewriter
18654
18655 \backslash
18656 labelenumi
18657 \family default
18658  \SpecialChar \ldots{}
18659  
18660 \family typewriter
18661
18662 \backslash
18663 labelenumiv
18664 \family default
18665 , as well as a counter, 
18666 \family typewriter
18667 enumi
18668 \family default
18669  \SpecialChar \ldots{}
18670  
18671 \family typewriter
18672 enumiv
18673 \family default
18674 .
18675  There are also five 
18676 \begin_inset Quotes eld
18677 \end_inset
18678
18679 number printing
18680 \begin_inset Quotes erd
18681 \end_inset
18682
18683  commands, 
18684 \family typewriter
18685
18686 \backslash
18687 arabic{}
18688 \family default
18689
18690 \family typewriter
18691
18692 \backslash
18693 roman{}
18694 \family default
18695
18696 \family typewriter
18697
18698 \backslash
18699 Roman{}
18700 \family default
18701
18702 \family typewriter
18703
18704 \backslash
18705 alph{}
18706 \family default
18707 , and 
18708 \family typewriter
18709
18710 \backslash
18711 Alph{}
18712 \family default
18713 , each of which take one counter as an argument.
18714  You can add characters before or after these, but there's no need to add
18715  spaces.
18716 \end_layout
18717
18718 \begin_layout Standard
18719 You can get really fancy with these.
18720  For example:
18721 \end_layout
18722
18723 \begin_layout LyX-Code
18724
18725 \backslash
18726 renewcommand{
18727 \backslash
18728 labelenumi}{
18729 \backslash
18730 #
18731 \backslash
18732 Alph{enumi}
18733 \backslash
18734 #}
18735 \end_layout
18736
18737 \begin_layout LyX-Code
18738
18739 \backslash
18740 renewcommand{
18741 \backslash
18742 labelenumii}{
18743 \backslash
18744 Alph{enumi}.
18745 \backslash
18746 arabic{enumii}}
18747 \end_layout
18748
18749 \begin_layout LyX-Code
18750
18751 \backslash
18752 renewcommand{
18753 \backslash
18754 labelenumiii}{
18755 \backslash
18756 alph{enumiii}+}
18757 \end_layout
18758
18759 \begin_layout LyX-Code
18760
18761 \backslash
18762 renewcommand{
18763 \backslash
18764 labelenumiv}{(
18765 \backslash
18766 roman{enumiv})}
18767 \end_layout
18768
18769 \begin_layout Standard
18770 produces the somewhat out of hand numbering scheme: <
18771 \begin_inset Quotes eld
18772 \end_inset
18773
18774 #A#
18775 \begin_inset Quotes erd
18776 \end_inset
18777
18778 ,
18779 \begin_inset space ~
18780 \end_inset
18781
18782
18783 \begin_inset Quotes erd
18784 \end_inset
18785
18786 A.1
18787 \begin_inset Quotes erd
18788 \end_inset
18789
18790 ,
18791 \begin_inset space ~
18792 \end_inset
18793
18794
18795 \begin_inset Quotes erd
18796 \end_inset
18797
18798 a+
18799 \begin_inset Quotes erd
18800 \end_inset
18801
18802 ,
18803 \begin_inset space ~
18804 \end_inset
18805
18806
18807 \begin_inset Quotes eld
18808 \end_inset
18809
18810 (i)
18811 \begin_inset Quotes erd
18812 \end_inset
18813
18814 >.
18815  
18816 \end_layout
18817
18818 \begin_layout Standard
18819
18820 \end_layout
18821
18822 \begin_layout Section
18823 Dropped Capitals
18824 \end_layout
18825
18826 \begin_layout Standard
18827 by 
18828 \noun on
18829 Mike Ressler
18830 \end_layout
18831
18832 \begin_layout Standard
18833 \begin_inset VSpace bigskip
18834 \end_inset
18835
18836
18837 \end_layout
18838
18839 \begin_layout Standard
18840 \noindent
18841 \begin_inset ERT
18842 status collapsed
18843
18844 \begin_layout Plain Layout
18845
18846
18847 \backslash
18848 newfont{
18849 \backslash
18850 tmpfont}{cmr17 scaled 2500}{
18851 \backslash
18852 tmpfont T}
18853 \backslash
18854 vspace*{-8.4ex}
18855 \end_layout
18856
18857 \end_inset
18858
18859
18860 \end_layout
18861
18862 \begin_layout Standard
18863 \noindent
18864 \begin_inset ERT
18865 status open
18866
18867 \begin_layout Plain Layout
18868
18869
18870 \backslash
18871 hangindent=3.3em 
18872 \backslash
18873 hangafter=-3
18874 \end_layout
18875
18876 \end_inset
18877
18878  hose of you who like the style of old books probably also like 
18879 \begin_inset Quotes eld
18880 \end_inset
18881
18882 dropped capitals
18883 \begin_inset Quotes erd
18884 \end_inset
18885
18886 ---those large capital letters which begin each new chapter or section.
18887  Implementing them with plain LyX/LaTeX is straightforward (assuming you
18888  know some plain TeX!) but does require a lot of work and many iterations,
18889  as you can see by all the ugly TeX-mode stuff at the beginning of this
18890  paragraph.
18891 \end_layout
18892
18893 \begin_layout Standard
18894 \begin_inset ERT
18895 status open
18896
18897 \begin_layout Plain Layout
18898
18899
18900 \backslash
18901 verb+
18902 \backslash
18903 bigdrop{-1em}{3}{ptmri}{T}+
18904 \end_layout
18905
18906 \end_inset
18907
18908 here is a much easier way of doing this, of course.
18909  The 
18910 \family typewriter
18911 dropcaps
18912 \family default
18913  (or the newer 
18914 \family typewriter
18915 dropping
18916 \family default
18917 ) package from CTAN allows a simple way to add such letters to your documents.
18918  Since this package is not a standard part of teTeX, I can't demonstrate
18919  it within this document, but if you copy this paragraph to a new document,
18920  delete the 
18921 \begin_inset Quotes eld
18922 \end_inset
18923
18924
18925 \family typewriter
18926
18927 \backslash
18928 verb
18929 \family default
18930
18931 \begin_inset Quotes erd
18932 \end_inset
18933
18934  and the pluses from the TeX code at the beginning of the paragraph, and
18935  add 
18936 \family typewriter
18937
18938 \backslash
18939 usepackage{dropcaps}
18940 \family default
18941  to your LaTeX preamble, you will get a nice Times Roman Italic 
18942 \begin_inset Quotes eld
18943 \end_inset
18944
18945 T
18946 \begin_inset Quotes erd
18947 \end_inset
18948
18949 , whose height is three lines of text and which protrudes 1 em into the
18950  margin.
18951  (Make certain you have copied 
18952 \begin_inset Quotes eld
18953 \end_inset
18954
18955
18956 \family typewriter
18957 dropcaps.sty
18958 \family default
18959
18960 \begin_inset Quotes erd
18961 \end_inset
18962
18963  into a directory where TeX can see it.) The first argument is the amount
18964  of indentation; in this case the negative sign moves it into the margin.
18965  The second argument is the height of the letter in number of lines of text.
18966  The third argument is the font name: virtually anything which has a tfm
18967  file should work (wade through the 
18968 \family typewriter
18969 .../texmf/fonts/tfm
18970 \family default
18971  directory for possibilities).
18972  My personal favorite is 
18973 \begin_inset Quotes eld
18974 \end_inset
18975
18976
18977 \family typewriter
18978 yinit
18979 \family default
18980
18981 \begin_inset Quotes erd
18982 \end_inset
18983
18984 , a fancy German font specifically designed for dropped capitals.
18985  The fourth argument is the letter (or letters) to be dropped.
18986  The 
18987 \family typewriter
18988 dropping
18989 \family default
18990  package also offers the 
18991 \family typewriter
18992
18993 \backslash
18994 bigdrop
18995 \family default
18996  command, as well as a slightly simplified 
18997 \family typewriter
18998
18999 \backslash
19000 dropping
19001 \family default
19002  command.
19003 \end_layout
19004
19005 \begin_layout Section
19006 Non-standard Paragraph Shapes
19007 \end_layout
19008
19009 \begin_layout Standard
19010 by 
19011 \noun on
19012 Mike Ressler
19013 \end_layout
19014
19015 \begin_layout Standard
19016 \begin_inset VSpace bigskip
19017 \end_inset
19018
19019
19020 \end_layout
19021
19022 \begin_layout Standard
19023 \begin_inset ERT
19024 status collapsed
19025
19026 \begin_layout Plain Layout
19027
19028
19029 \backslash
19030 begin{sloppypar}
19031 \end_layout
19032
19033 \end_inset
19034
19035
19036 \end_layout
19037
19038 \begin_layout Standard
19039 \begin_inset ERT
19040 status collapsed
19041
19042 \begin_layout Plain Layout
19043
19044
19045 \backslash
19046 newdimen
19047 \backslash
19048 varunit 
19049 \end_layout
19050
19051 \begin_layout Plain Layout
19052
19053
19054 \backslash
19055 setlength{
19056 \backslash
19057 varunit}{4.5in}
19058 \end_layout
19059
19060 \end_inset
19061
19062
19063 \end_layout
19064
19065 \begin_layout Standard
19066 \noindent
19067 \begin_inset ERT
19068 status collapsed
19069
19070 \begin_layout Plain Layout
19071
19072
19073 \backslash
19074 parshape 19 0.45
19075 \backslash
19076 varunit 0.332
19077 \backslash
19078 varunit
19079 \end_layout
19080
19081 \begin_layout Plain Layout
19082
19083 0.40
19084 \backslash
19085 varunit 0.300
19086 \backslash
19087 varunit
19088 \end_layout
19089
19090 \begin_layout Plain Layout
19091
19092 0.35
19093 \backslash
19094 varunit 0.293
19095 \backslash
19096 varunit
19097 \end_layout
19098
19099 \begin_layout Plain Layout
19100
19101 0.30
19102 \backslash
19103 varunit 0.300
19104 \backslash
19105 varunit
19106 \end_layout
19107
19108 \begin_layout Plain Layout
19109
19110 0.25
19111 \backslash
19112 varunit 0.317
19113 \backslash
19114 varunit
19115 \end_layout
19116
19117 \begin_layout Plain Layout
19118
19119 0.20
19120 \backslash
19121 varunit 0.342
19122 \backslash
19123 varunit
19124 \end_layout
19125
19126 \begin_layout Plain Layout
19127
19128 0.15
19129 \backslash
19130 varunit 0.373
19131 \backslash
19132 varunit
19133 \end_layout
19134
19135 \begin_layout Plain Layout
19136
19137 0.10
19138 \backslash
19139 varunit 0.410
19140 \backslash
19141 varunit
19142 \end_layout
19143
19144 \begin_layout Plain Layout
19145
19146 0.05
19147 \backslash
19148 varunit 0.453
19149 \backslash
19150 varunit
19151 \end_layout
19152
19153 \begin_layout Plain Layout
19154
19155 0.00
19156 \backslash
19157 varunit 0.500
19158 \backslash
19159 varunit
19160 \end_layout
19161
19162 \begin_layout Plain Layout
19163
19164 0.05
19165 \backslash
19166 varunit 0.453
19167 \backslash
19168 varunit
19169 \end_layout
19170
19171 \begin_layout Plain Layout
19172
19173 0.10
19174 \backslash
19175 varunit 0.410
19176 \backslash
19177 varunit
19178 \end_layout
19179
19180 \begin_layout Plain Layout
19181
19182 0.15
19183 \backslash
19184 varunit 0.373
19185 \backslash
19186 varunit
19187 \end_layout
19188
19189 \begin_layout Plain Layout
19190
19191 0.20
19192 \backslash
19193 varunit 0.342
19194 \backslash
19195 varunit
19196 \end_layout
19197
19198 \begin_layout Plain Layout
19199
19200 0.25
19201 \backslash
19202 varunit 0.317
19203 \backslash
19204 varunit
19205 \end_layout
19206
19207 \begin_layout Plain Layout
19208
19209 0.30
19210 \backslash
19211 varunit 0.300
19212 \backslash
19213 varunit
19214 \end_layout
19215
19216 \begin_layout Plain Layout
19217
19218 0.35
19219 \backslash
19220 varunit 0.293
19221 \backslash
19222 varunit
19223 \end_layout
19224
19225 \begin_layout Plain Layout
19226
19227 0.40
19228 \backslash
19229 varunit 0.300
19230 \backslash
19231 varunit
19232 \end_layout
19233
19234 \begin_layout Plain Layout
19235
19236 0.45
19237 \backslash
19238 varunit 0.332
19239 \backslash
19240 varunit
19241 \end_layout
19242
19243 \begin_layout Plain Layout
19244
19245 \end_layout
19246
19247 \end_inset
19248
19249 There are times when the tyranny of rectangular paragraphs must be overthrown.
19250  In such situations, a call to the delightful plain TeX command 
19251 \family typewriter
19252
19253 \backslash
19254 parshape
19255 \family default
19256  is called for.
19257  As you can see, completely arbitrary shapes can be laid out with a suitable
19258  set of linelength definitions.
19259  While this parshape may look a bit silly and useless, one could conceive
19260  of situations such as finely tuned dropped capitals, word wrapping around
19261  non-rectangular graphics, etc.
19262  which will benefit from such handcrafting.
19263 \end_layout
19264
19265 \begin_layout Standard
19266 \begin_inset VSpace bigskip
19267 \end_inset
19268
19269
19270 \end_layout
19271
19272 \begin_layout Standard
19273 The syntax is 
19274 \family typewriter
19275
19276 \backslash
19277 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
19278  #nindent #nlength
19279 \family default
19280 , where 
19281 \family typewriter
19282 numlines
19283 \family default
19284  is the number of lines of text which define the paragraph.
19285  If there turn out to be fewer lines, the shape is truncated; if there are
19286  more, the excess lines have the same dimensions as the last line of the
19287  definition.
19288  The 
19289 \family typewriter
19290 #nindent
19291 \family default
19292  and 
19293 \family typewriter
19294 #nlength
19295 \family default
19296  entries specify the indentation of the line from the left margin, and the
19297  length of the line as measured from that point.
19298  The shape applies only to the current paragraph; everything is reset to
19299  normal for the next paragraph.
19300 \end_layout
19301
19302 \begin_layout Standard
19303 \begin_inset ERT
19304 status collapsed
19305
19306 \begin_layout Plain Layout
19307
19308
19309 \backslash
19310 end{sloppypar}
19311 \end_layout
19312
19313 \end_inset
19314
19315
19316 \end_layout
19317
19318 \begin_layout Section
19319 Summary
19320 \end_layout
19321
19322 \begin_layout Standard
19323 As you can see, the examples in this section range from the useful to the
19324  whimsical.
19325  While I don't expect that anyone will ever need the paragraph shape demonstrate
19326 d in the last section, the important point is that you can do almost anything
19327  you want in LyX if you are willing to figure out how to do it in TeX and
19328  LaTeX.
19329  TeX is a fantastically powerful typesetting system and all that power is
19330  available to you since LyX uses it as its backend.
19331  Happy LyXing!
19332 \end_layout
19333
19334 \end_body
19335 \end_document