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