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