]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
A couple minor changes in the User's Guide.
[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 lyxeditor.exe
5716 \end_layout
5717
5718 \end_inset
5719
5720  program (which is installed by default on Cygwin along with the LyX executable).
5721  Select 
5722 \begin_inset Flex CharStyle:Code
5723 status collapsed
5724
5725 \begin_layout Plain Layout
5726 lyxeditor.exe
5727 \end_layout
5728
5729 \end_inset
5730
5731  and then specify the program arguments 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 , omit the 
5752 \begin_inset Flex CharStyle:Code
5753 status collapsed
5754
5755 \begin_layout Plain Layout
5756 -g
5757 \end_layout
5758
5759 \end_inset
5760
5761  option and be sure to specify the LyXServer pipe path in the LyX preferences.
5762 \end_layout
5763
5764 \begin_layout Standard
5765 In yap, reverse search is triggered by double-click.
5766 \end_layout
5767
5768 \begin_layout Subsubsection*
5769 SumatraPDF (Cygwin)
5770 \end_layout
5771
5772 \begin_layout Standard
5773 In order to use SumatraPDF for inverse search, enter 
5774 \begin_inset Flex CharStyle:Code
5775 status collapsed
5776
5777 \begin_layout Plain Layout
5778 SumatraPDF.sh
5779 \end_layout
5780
5781 \end_inset
5782
5783  in the viewer setting in 
5784 \begin_inset Flex CharStyle:MenuItem
5785 status collapsed
5786
5787 \begin_layout Plain Layout
5788 Preferences\SpecialChar \menuseparator
5789 File Handling\SpecialChar \menuseparator
5790 File formats\SpecialChar \menuseparator
5791 PDF (pdflatex)
5792 \end_layout
5793
5794 \end_inset
5795
5796 , where 
5797 \begin_inset Flex CharStyle:Code
5798 status collapsed
5799
5800 \begin_layout Plain Layout
5801 SumatraPDF.sh
5802 \end_layout
5803
5804 \end_inset
5805
5806  is the following script (to be placed in your command PATH, 
5807 \begin_inset Flex CharStyle:Code
5808 status collapsed
5809
5810 \begin_layout Plain Layout
5811 /usr/local/bin
5812 \end_layout
5813
5814 \end_inset
5815
5816  being the best choice):
5817 \end_layout
5818
5819 \begin_layout LyX-Code
5820 #!/bin/bash
5821 \begin_inset Newline newline
5822 \end_inset
5823
5824 cd $(dirname $1)
5825 \begin_inset Newline newline
5826 \end_inset
5827
5828 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
5829 \end_layout
5830
5831 \begin_layout Standard
5832 This wrapper script is needed because SumatraPDF is a native Windows application
5833  and does not understand the posix paths used by the Cygwin version of LyX.
5834  If SumatraPDF.exe is not in your command PATH, use its full posix path in
5835  the script above.
5836  The 
5837 \begin_inset Flex CharStyle:Code
5838 status collapsed
5839
5840 \begin_layout Plain Layout
5841 -g
5842 \end_layout
5843
5844 \end_inset
5845
5846  enables communication via the 
5847 \emph on
5848 lyxsocket
5849 \emph default
5850 .
5851  Again, omit the 
5852 \begin_inset Flex CharStyle:Code
5853 status collapsed
5854
5855 \begin_layout Plain Layout
5856 -g
5857 \end_layout
5858
5859 \end_inset
5860
5861  option if you want to use the 
5862 \emph on
5863 lyxpipe
5864 \emph default
5865 , and be sure to specify the LyXServer pipe path in the LyX preferences.
5866 \end_layout
5867
5868 \begin_layout Standard
5869 Reverse search is triggered by double-click.
5870 \end_layout
5871
5872 \begin_layout Chapter
5873 Special Document Classes
5874 \end_layout
5875
5876 \begin_layout Section
5877 A&A Paper
5878 \end_layout
5879
5880 \begin_layout Standard
5881 by 
5882 \noun on
5883 Peter Sütterlin
5884 \end_layout
5885
5886 \begin_layout Subsection
5887 Introduction
5888 \end_layout
5889
5890 \begin_layout Standard
5891 This section describes how LyX can be used to write articles for submission
5892  to the scientific journal 
5893 \emph on
5894 Astronomy and Astrophysics
5895 \emph default
5896  (www.edpsciences.fr/aa/ 
5897 \begin_inset Flex URL
5898 status collapsed
5899
5900 \begin_layout Plain Layout
5901
5902 http://www.edpsciences.fr/aa/
5903 \end_layout
5904
5905 \end_inset
5906
5907 ) using Version 5.01 of the document class 
5908 \family typewriter
5909 aa.cls
5910 \family default
5911 .
5912  This package can be downloaded from the ftp site
5913 \end_layout
5914
5915 \begin_layout Standard
5916 \begin_inset VSpace medskip
5917 \end_inset
5918
5919
5920 \end_layout
5921
5922 \begin_layout Standard
5923 \align center
5924 \begin_inset Flex URL
5925 status collapsed
5926
5927 \begin_layout Plain Layout
5928
5929 ftp://ftp.edpsciences.org/pub/aa/readme.html
5930 \end_layout
5931
5932 \end_inset
5933
5934
5935 \end_layout
5936
5937 \begin_layout Standard
5938 \begin_inset VSpace medskip
5939 \end_inset
5940
5941
5942 \end_layout
5943
5944 \begin_layout Standard
5945 A manual comes together with that package, and this text is not meant to
5946  replace the original manual but merely a short guide how to realize the
5947  correct form of your paper.
5948  
5949 \end_layout
5950
5951 \begin_layout Standard
5952 Please note that the publisher of the journal was changed from Springer
5953  to EDP Sciences starting January 1, 2001.
5954  That change implicated also some slight changes of the style files, namely
5955  the removal of the thesaurus command.
5956  The LyX class aa supports the newest version of these style files, V 5.01.
5957  If you have an older version installed, please upgrade.
5958  For compatibility, the old (version 4) layout has been kept as 
5959 \family sans
5960 article (A&A V4)
5961 \family default
5962 .
5963  Please refer to the comments in 
5964 \family typewriter
5965 LyXDir/layouts/aapaper.layout
5966 \family default
5967 .
5968 \end_layout
5969
5970 \begin_layout Subsection
5971 Getting started
5972 \end_layout
5973
5974 \begin_layout Standard
5975 It is recommended you start from the example template distributed with LyX.
5976  If you are not using a template, note the following settings:
5977 \end_layout
5978
5979 \begin_layout Itemize
5980 Select 
5981 \family sans
5982 article (A&A)
5983 \family default
5984  in the 
5985 \family sans
5986 Document\SpecialChar \menuseparator
5987 Settings
5988 \family default
5989  dialog (OK, that one was obvious).
5990 \end_layout
5991
5992 \begin_layout Itemize
5993 Don't change the option 
5994 \family sans
5995 Page
5996 \begin_inset space ~
5997 \end_inset
5998
5999 style
6000 \family default
6001 : Leave it set to 
6002 \family sans
6003 default
6004 \family default
6005 .
6006  The whole layout is done by the macros, you shouldn't change anything.
6007 \end_layout
6008
6009 \begin_layout Subsection
6010 The header block
6011 \end_layout
6012
6013 \begin_layout Standard
6014 First thing to enter is the header information.
6015  It consists of seven entries, of which some are optional.
6016  They are
6017 \end_layout
6018
6019 \begin_layout Itemize
6020
6021 \family sans
6022 Title
6023 \family default
6024 : [required] 
6025 \end_layout
6026
6027 \begin_layout Itemize
6028
6029 \family sans
6030 Subtitle
6031 \family default
6032 : [optional] 
6033 \end_layout
6034
6035 \begin_layout Itemize
6036
6037 \family sans
6038 Author
6039 \family default
6040 : [required]
6041 \end_layout
6042
6043 \begin_layout Itemize
6044
6045 \family sans
6046 Address
6047 \family default
6048 : [required]
6049 \end_layout
6050
6051 \begin_layout Itemize
6052
6053 \family sans
6054 Offprints
6055 \family default
6056 : [optional] if more than one author: whom to contact for offprint requests.
6057 \end_layout
6058
6059 \begin_layout Itemize
6060
6061 \family sans
6062 Mail
6063 \family default
6064 : [optional] mail address for contacts.
6065 \end_layout
6066
6067 \begin_layout Itemize
6068
6069 \family sans
6070 Date
6071 \family default
6072 : [required].
6073  Suggested format is 
6074 \family typewriter
6075 Received: <date>; Accepted <date> 
6076 \end_layout
6077
6078 \begin_layout Standard
6079 There is no need to issue the 
6080 \family typewriter
6081
6082 \backslash
6083 maketitle
6084 \family default
6085  command, this is done automatically by LyX when the header is finished.
6086  Although the order of the single header entries doesn't matter it is advised
6087  to keep the above sequence, just to get the best optics and meets the layout
6088  of the real document.
6089 \end_layout
6090
6091 \begin_layout Standard
6092 If you want to place footnotes in the header block, e.
6093 \begin_inset space \thinspace{}
6094 \end_inset
6095
6096 g.
6097 \begin_inset space \space{}
6098 \end_inset
6099
6100 to state your present address, just use the standard footnote via the menu
6101  
6102 \family sans
6103 Insert\SpecialChar \menuseparator
6104 Footnote.
6105
6106 \family default
6107  LyX will automagically use the term 
6108 \family typewriter
6109
6110 \backslash
6111 thanks{}
6112 \family default
6113  in that case.
6114 \end_layout
6115
6116 \begin_layout Standard
6117 In addition to these topics, the macros use three additional LaTeX commands
6118  that have no counterpart in LyX:
6119 \end_layout
6120
6121 \begin_layout Itemize
6122
6123 \family typewriter
6124
6125 \backslash
6126 and
6127 \family default
6128  to separate different names for more than one author and institute, respectivel
6129 y.
6130 \end_layout
6131
6132 \begin_layout Itemize
6133
6134 \family typewriter
6135
6136 \backslash
6137 inst{<nr>}
6138 \family default
6139 to mark corresponding author/institute pairs.
6140  The institutes are numbered sequentially as they appear in the 
6141 \family sans
6142 Address
6143 \family default
6144  field, so you have to put a marker to each author.
6145 \end_layout
6146
6147 \begin_layout Itemize
6148
6149 \family typewriter
6150
6151 \backslash
6152 email{address}
6153 \family default
6154  to supply an email address for fast contact.
6155 \end_layout
6156
6157 \begin_layout Standard
6158 In all cases, the appropriate command has to be entered in LyX and marked
6159  as LaTeX code.
6160  See the examples.
6161  
6162 \end_layout
6163
6164 \begin_layout Subsection
6165 The abstract
6166 \end_layout
6167
6168 \begin_layout Standard
6169 The abstract should immediately follow the header block.
6170  With version 5 the abstract environment was changed to a command, and there
6171  is now a resctriction to only one paragraph.
6172  In addition, it should contain an entry with the keywords.
6173  This is not yet implemented for LyX, therefore you have to enter the LaTeX
6174  command 
6175 \family typewriter
6176
6177 \backslash
6178 keywords{}
6179 \family default
6180  by hand and mark it as LaTeX code.
6181  Refer to the example paper.
6182 \end_layout
6183
6184 \begin_layout Subsection
6185 Supported environments
6186 \end_layout
6187
6188 \begin_layout Standard
6189 The A&A paper layout supports the following environments for structuring
6190  your text:
6191 \end_layout
6192
6193 \begin_layout Itemize
6194
6195 \family sans
6196 Standard
6197 \end_layout
6198
6199 \begin_layout Itemize
6200
6201 \family sans
6202 Section
6203 \end_layout
6204
6205 \begin_layout Itemize
6206
6207 \family sans
6208 Subsection
6209 \end_layout
6210
6211 \begin_layout Itemize
6212
6213 \family sans
6214 Subsubsection
6215 \end_layout
6216
6217 \begin_layout Itemize
6218
6219 \family sans
6220 Itemize
6221 \end_layout
6222
6223 \begin_layout Itemize
6224
6225 \family sans
6226 Enumerate
6227 \end_layout
6228
6229 \begin_layout Itemize
6230
6231 \family sans
6232 Description
6233 \end_layout
6234
6235 \begin_layout Itemize
6236
6237 \family sans
6238 Caption
6239 \end_layout
6240
6241 \begin_layout Itemize
6242
6243 \family sans
6244 Abstract
6245 \end_layout
6246
6247 \begin_layout Itemize
6248
6249 \family sans
6250 Acknowledgment
6251 \end_layout
6252
6253 \begin_layout Itemize
6254
6255 \family sans
6256 Bibliography
6257 \end_layout
6258
6259 \begin_layout Itemize
6260
6261 \family sans
6262 LaTeX
6263 \end_layout
6264
6265 \begin_layout Subsection
6266 Commands not supported by LyX
6267 \end_layout
6268
6269 \begin_layout Standard
6270 Some commands are not yet supported by the 
6271 \family sans
6272 paper (A&A)
6273 \family default
6274  layout for LyX.
6275  Some have already been mentioned.
6276  For the sake of completeness, they are listed all together here:
6277 \end_layout
6278
6279 \begin_layout Itemize
6280
6281 \family typewriter
6282
6283 \backslash
6284 and
6285 \end_layout
6286
6287 \begin_layout Itemize
6288
6289 \family typewriter
6290
6291 \backslash
6292 email
6293 \end_layout
6294
6295 \begin_layout Itemize
6296
6297 \family typewriter
6298
6299 \backslash
6300 appendix
6301 \end_layout
6302
6303 \begin_layout Itemize
6304
6305 \family typewriter
6306
6307 \backslash
6308 authorrunning
6309 \end_layout
6310
6311 \begin_layout Itemize
6312
6313 \family typewriter
6314
6315 \backslash
6316 inst{}
6317 \end_layout
6318
6319 \begin_layout Itemize
6320
6321 \family typewriter
6322
6323 \backslash
6324 keywords{}
6325 \end_layout
6326
6327 \begin_layout Itemize
6328
6329 \family typewriter
6330
6331 \backslash
6332 object{}
6333 \end_layout
6334
6335 \begin_layout Itemize
6336
6337 \family typewriter
6338
6339 \backslash
6340 titlerunning{}
6341 \end_layout
6342
6343 \begin_layout Standard
6344 If you want to use any of these commands, you have to enter them yourself.
6345  
6346 \series bold
6347 Do not forget to mark them as LaTeX code!
6348 \end_layout
6349
6350 \begin_layout Subsection
6351 Figure and Table Floats
6352 \end_layout
6353
6354 \begin_layout Standard
6355 LyX provides support for the necessary float environments 
6356 \family sans
6357 figure, figure*, table
6358 \family default
6359  and 
6360 \family sans
6361 table*
6362 \family default
6363 , therefore we won't tell much about it here.
6364  Refer to the 
6365 \emph on
6366 User's
6367 \begin_inset space ~
6368 \end_inset
6369
6370 Guide
6371 \emph default
6372 .
6373  Just remember that tables should be left-aligned.
6374  For that, select the table and change the alignment in 
6375 \family sans
6376 Edit\SpecialChar \menuseparator
6377 Paragraph
6378 \begin_inset space ~
6379 \end_inset
6380
6381 Settings.
6382 \end_layout
6383
6384 \begin_layout Standard
6385 There is only one special thing: the figures with caption besides the figure.
6386  To create such a figure, you have to do the following:
6387 \end_layout
6388
6389 \begin_layout Enumerate
6390 Create a wide figure float: 
6391 \family sans
6392 Insert\SpecialChar \menuseparator
6393 Float\SpecialChar \menuseparator
6394 Figure
6395 \family default
6396 , then right click in the figure and select 
6397 \family sans
6398 \bar under
6399 S
6400 \bar default
6401 pan
6402 \begin_inset space ~
6403 \end_inset
6404
6405 columns
6406 \family default
6407 .
6408 \end_layout
6409
6410 \begin_layout Enumerate
6411 Enter your caption text.
6412 \end_layout
6413
6414 \begin_layout Enumerate
6415 Press 
6416 \family sans
6417 Return
6418 \family default
6419  to move the cursor above the caption.
6420 \end_layout
6421
6422 \begin_layout Enumerate
6423 Insert your figure
6424 \end_layout
6425
6426 \begin_layout Enumerate
6427 Position the cursor behind the figure and insert a horizontal fill: 
6428 \family sans
6429 Insert\SpecialChar \menuseparator
6430 Special
6431 \begin_inset space ~
6432 \end_inset
6433
6434 Character\SpecialChar \menuseparator
6435 Horizontal
6436 \begin_inset space ~
6437 \end_inset
6438
6439 Fill
6440 \family default
6441 .
6442 \end_layout
6443
6444 \begin_layout Enumerate
6445 Switch to LaTeX mode: 
6446 \family sans
6447 M-c
6448 \begin_inset space ~
6449 \end_inset
6450
6451 t
6452 \family default
6453 .
6454 \end_layout
6455
6456 \begin_layout Enumerate
6457 Enter 
6458 \family typewriter
6459
6460 \backslash
6461 parbox[b]{55mm}{
6462 \family default
6463 .
6464  
6465 \series bold
6466 Do not close the brace!
6467 \end_layout
6468
6469 \begin_layout Enumerate
6470 Position the cursor behind the caption text, switch to LaTeX mode and insert
6471  the closing brace: 
6472 \family sans
6473 M-c
6474 \begin_inset space ~
6475 \end_inset
6476
6477 t
6478 \family default
6479  
6480 \family typewriter
6481 }
6482 \family default
6483 .
6484 \end_layout
6485
6486 \begin_layout Standard
6487 Also, refer to the figures in the example paper.
6488 \end_layout
6489
6490 \begin_layout Subsection
6491 Referee layout
6492 \end_layout
6493
6494 \begin_layout Standard
6495 For submission, the paper has to be formated in a special double-spacing
6496  layout.
6497  For this purpose, you have to give the option 
6498 \family typewriter
6499 referee
6500 \family default
6501  to the documentclass.
6502  This must be done using the extra class options field in the 
6503 \family sans
6504 Document\SpecialChar \menuseparator
6505 Settings
6506 \family default
6507  dialog.
6508  Just enter the string 
6509 \family typewriter
6510 referee
6511 \family default
6512  there.
6513 \end_layout
6514
6515 \begin_layout Subsection
6516 The example paper
6517 \end_layout
6518
6519 \begin_layout Standard
6520 The 
6521 \family sans
6522 Examples
6523 \family default
6524  directory contains an example paper written with LyX.
6525  It is the example paper from the original macro package, translated to
6526  LyX.
6527  Use it for inspiration, and compare the original LaTeX code with LyX way
6528  of writing.
6529 \end_layout
6530
6531 \begin_layout Section
6532 AASTeX
6533 \end_layout
6534
6535 \begin_layout Standard
6536 by 
6537 \noun on
6538 Mike Ressler
6539 \end_layout
6540
6541 \begin_layout Subsection
6542 Introduction
6543 \end_layout
6544
6545 \begin_layout Standard
6546 AASTeX is a set of macros produced by the American Astronomical Society
6547  to facilitate electronic manuscript submission to the three journals they
6548  publish: the Astrophysical Journal (including the Letters and Supplement),
6549  the Astronomical Journal, and the Publications of the Astronomical Society
6550  of the Pacific.
6551  LyX has proven to be an excellent tool for generating these documents,
6552  especially given its equation, citation, and figure handling capabilities.
6553  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
6554  is the version described here, or higher.
6555  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
6556  incompatible with LyX.
6557  The AASTeX package may be downloaded from the AASTeX Web site
6558 \end_layout
6559
6560 \begin_layout Standard
6561 \begin_inset VSpace medskip
6562 \end_inset
6563
6564
6565 \end_layout
6566
6567 \begin_layout Standard
6568 \align center
6569 \begin_inset Flex URL
6570 status collapsed
6571
6572 \begin_layout Plain Layout
6573
6574 http://www.journals.uchicago.edu/AAS/AASTeX
6575 \end_layout
6576
6577 \end_inset
6578
6579
6580 \end_layout
6581
6582 \begin_layout Standard
6583 \begin_inset VSpace medskip
6584 \end_inset
6585
6586
6587 \end_layout
6588
6589 \begin_layout Standard
6590 A complete user guide is contained in that package and you should familiarize
6591  yourself with it thoroughly before embarking on writing a paper in LyX.
6592  LyX will not reduce the need to figure out all the AASTeX commands, it
6593  will only reduce the drudgery of typing everything in.
6594  It is your responsibility to ensure that the final exported LaTeX document
6595  conforms completely to the requirements of the journal to which you are
6596  submitting your paper.
6597 \end_layout
6598
6599 \begin_layout Subsection
6600 Starting a New Paper
6601 \end_layout
6602
6603 \begin_layout Standard
6604 I strongly suggest that you start with the AASTeX template file.
6605  Click on 
6606 \family sans
6607 File\SpecialChar \menuseparator
6608 New from
6609 \family default
6610  
6611 \family sans
6612 Template
6613 \family default
6614 , enter the new file name, then choose the 
6615 \family typewriter
6616 aastex.lyx
6617 \family default
6618  template.
6619  This will show the most common fields found in a manuscript.
6620  Simply overwrite the existing text (including the brackets, 
6621 \family typewriter
6622 <>
6623 \family default
6624 ) with the correct information.
6625  Many of the AASTeX commands and environments can be implemented directly
6626  in LyX, but some cannot: most noticeably 
6627 \family typewriter
6628
6629 \backslash
6630 altaffilmark
6631 \family default
6632  and 
6633 \family typewriter
6634
6635 \backslash
6636 altaffiltext
6637 \family default
6638 , which should stick out like a sore thumb if you actually just opened the
6639  template file.
6640  For commands such as these, the LaTeX code must be entered directly and
6641  marked as such.
6642  Such commands are referred to as TeX code, or Evil Red Text.
6643  I tried to minimize the amount of TeX code needed in an AASTeX document,
6644  but there is still a bit more required than any of us would like.
6645 \end_layout
6646
6647 \begin_layout Subsection
6648 Finishing Your Paper
6649 \end_layout
6650
6651 \begin_layout Standard
6652 When the paper is finished to your satisfaction and previews/prints correctly,
6653  there are a few 
6654 \begin_inset Quotes eld
6655 \end_inset
6656
6657 postprocessing
6658 \begin_inset Quotes erd
6659 \end_inset
6660
6661  actions which need to be done before you submit it to the journals.
6662  
6663 \end_layout
6664
6665 \begin_layout Enumerate
6666 Export your paper as a LaTeX file (
6667 \family sans
6668 File\SpecialChar \menuseparator
6669 Export\SpecialChar \menuseparator
6670 LaTeX
6671 \family default
6672 ).
6673  
6674 \end_layout
6675
6676 \begin_layout Enumerate
6677 Edit the resulting 
6678 \family typewriter
6679 .tex
6680 \family default
6681  file with your favorite text editor
6682 \end_layout
6683
6684 \begin_deeper
6685 \begin_layout Enumerate
6686 remove the comment lines before the 
6687 \family typewriter
6688
6689 \backslash
6690 documentclass
6691 \family default
6692  command
6693 \end_layout
6694
6695 \begin_layout Enumerate
6696 remove the 
6697 \family typewriter
6698
6699 \backslash
6700 usepackage...{fontenc}
6701 \family default
6702  line if it appears (usually just after 
6703 \family typewriter
6704
6705 \backslash
6706 documentclass
6707 \family default
6708 }; also remove the 
6709 \family typewriter
6710
6711 \backslash
6712 secnumdepth
6713 \family default
6714  line if it appears.
6715 \end_layout
6716
6717 \begin_layout Enumerate
6718 remove everything between (and including) the 
6719 \family typewriter
6720
6721 \backslash
6722 makeatletter
6723 \family default
6724  and 
6725 \family typewriter
6726
6727 \backslash
6728 makeatother
6729 \family default
6730  commands, except for any commands you specifically put into the LaTeX preamble
6731  (which should appear immediately after the 
6732 \begin_inset Quotes eld
6733 \end_inset
6734
6735 User specified LaTeX commands
6736 \begin_inset Quotes erd
6737 \end_inset
6738
6739  comment in the 
6740 \family typewriter
6741 .tex
6742 \family default
6743  file).
6744 \end_layout
6745
6746 \end_deeper
6747 \begin_layout Enumerate
6748 Run the resulting file through LaTeX to make sure it still processes correctly.
6749 \end_layout
6750
6751 \begin_layout Enumerate
6752 Reread the journal requirements to make sure your filenames and formats
6753  are correct.
6754 \end_layout
6755
6756 \begin_layout Enumerate
6757 Submit it.
6758 \end_layout
6759
6760 \begin_layout Subsection
6761 Comments On Specific Commands
6762 \end_layout
6763
6764 \begin_layout Standard
6765 I will not describe the detailed usage of the individual AASTeX commands:
6766  the AASTeX User Guide (
6767 \family typewriter
6768 aasguide.tex
6769 \family default
6770 ) gives a good description of each.
6771  Thus it's probably easiest for me to go down the list as found in the guide
6772  and offer comments where necessary.
6773  So let's begin \SpecialChar \ldots{}
6774
6775 \end_layout
6776
6777 \begin_layout Subsubsection
6778 Things that work as expected
6779 \end_layout
6780
6781 \begin_layout Standard
6782 \begin_inset ERT
6783 status open
6784
6785 \begin_layout Plain Layout
6786
6787
6788 \backslash
6789 begin{sloppypar}
6790 \end_layout
6791
6792 \end_inset
6793
6794
6795 \end_layout
6796
6797 \begin_layout Standard
6798 Because they work as you might expect, I simply list them and the section
6799  they are found in: 
6800 \family typewriter
6801
6802 \backslash
6803 documentclass
6804 \family default
6805  (2.1.1), 
6806 \family typewriter
6807
6808 \backslash
6809 begin{document}
6810 \family default
6811  (2.2), 
6812 \family typewriter
6813
6814 \backslash
6815 title
6816 \family default
6817  (2.3), 
6818 \family typewriter
6819
6820 \backslash
6821 author
6822 \family default
6823  (2.3), 
6824 \family typewriter
6825
6826 \backslash
6827 affil
6828 \family default
6829  (2.3), 
6830 \family typewriter
6831
6832 \backslash
6833 abstract
6834 \family default
6835  (2.4), 
6836 \family typewriter
6837
6838 \backslash
6839 keywords
6840 \family default
6841  (2.5), 
6842 \family typewriter
6843
6844 \backslash
6845 section
6846 \family default
6847  (2.7), 
6848 \family typewriter
6849
6850 \backslash
6851 subsection
6852 \family default
6853  (2.7), 
6854 \family typewriter
6855
6856 \backslash
6857 subsubsection
6858 \family default
6859  (2.7), 
6860 \family typewriter
6861
6862 \backslash
6863 paragraph
6864 \family default
6865  (2.7), 
6866 \family typewriter
6867
6868 \backslash
6869 facility
6870 \family default
6871  (2.10), 
6872 \family typewriter
6873
6874 \backslash
6875 begin{displaymath}
6876 \family default
6877  (2.12), 
6878 \family typewriter
6879
6880 \backslash
6881 begin{equation}
6882 \family default
6883  (2.12), 
6884 \family typewriter
6885
6886 \backslash
6887 begin{eqnarray}
6888 \family default
6889  (2.12), 
6890 \family typewriter
6891
6892 \backslash
6893 begin{mathletters}
6894 \family default
6895  (2.12), 
6896 \family typewriter
6897
6898 \backslash
6899 begin{thebibliography}
6900 \family default
6901  (2.13.1), 
6902 \family typewriter
6903
6904 \backslash
6905 bibitem
6906 \family default
6907  (2.13.2), all the cite commands and their variations (2.13.2), the generic
6908  graphicx figure commands (2.14.1), 
6909 \family typewriter
6910
6911 \backslash
6912 begin{table}
6913 \family default
6914  (2.15.4), 
6915 \family typewriter
6916
6917 \backslash
6918 begin{tabular}
6919 \family default
6920  (2.15.4), 
6921 \family typewriter
6922
6923 \backslash
6924 caption
6925 \family default
6926  (2.15.4), 
6927 \family typewriter
6928
6929 \backslash
6930 label
6931 \family default
6932  (2.15.4, amongst other places), 
6933 \family typewriter
6934
6935 \backslash
6936 tablerefs
6937 \family default
6938  (2.15.5), 
6939 \family typewriter
6940
6941 \backslash
6942 tablecomments
6943 \family default
6944  (2.15.5), 
6945 \family typewriter
6946
6947 \backslash
6948 url
6949 \family default
6950  (2.17.4), 
6951 \family typewriter
6952
6953 \backslash
6954 end{document}
6955 \family default
6956  (2.18).
6957 \end_layout
6958
6959 \begin_layout Standard
6960 The following style options also work correctly: 
6961 \family typewriter
6962 longabstract
6963 \family default
6964  (2.4), 
6965 \family typewriter
6966 preprint
6967 \family default
6968  (3.2.1), 
6969 \family typewriter
6970 preprint2
6971 \family default
6972  (3.2.2), 
6973 \family typewriter
6974 eqsecnum
6975 \family default
6976  (3.3), 
6977 \family typewriter
6978 flushrt
6979 \family default
6980  (3.4).
6981  Simply put them in the 
6982 \family sans
6983 Options
6984 \family default
6985  box in 
6986 \family sans
6987 Layout\SpecialChar \menuseparator
6988 Document
6989 \family default
6990 .
6991 \end_layout
6992
6993 \begin_layout Standard
6994 \begin_inset ERT
6995 status open
6996
6997 \begin_layout Plain Layout
6998
6999
7000 \backslash
7001 end{sloppypar}
7002 \end_layout
7003
7004 \end_inset
7005
7006
7007 \end_layout
7008
7009 \begin_layout Subsubsection
7010 Things that work, but require more comment
7011 \end_layout
7012
7013 \begin_layout Standard
7014 The following items work, but require a little more discussion:
7015 \end_layout
7016
7017 \begin_layout Itemize
7018 These items are reserved for use by the journal editors, but you can put
7019  them into the LaTeX preamble if you feel compelled to do so: 
7020 \family typewriter
7021
7022 \backslash
7023 received
7024 \family default
7025
7026 \family typewriter
7027
7028 \backslash
7029 revised
7030 \family default
7031
7032 \family typewriter
7033
7034 \backslash
7035 accepted
7036 \family default
7037
7038 \family typewriter
7039
7040 \backslash
7041 ccc
7042 \family default
7043
7044 \family typewriter
7045
7046 \backslash
7047 cpright
7048 \family default
7049  (all from 2.1.3)
7050 \end_layout
7051
7052 \begin_layout Itemize
7053 These items may be placed in the LaTeX preamble, and are included as blanks
7054  in the template file: 
7055 \family typewriter
7056
7057 \backslash
7058 slugcomment
7059 \family default
7060  (2.1.4), 
7061 \family typewriter
7062
7063 \backslash
7064 shorttitle
7065 \family default
7066  (2.1.5), 
7067 \family typewriter
7068
7069 \backslash
7070 shortauthors
7071 \family default
7072  (2.1.5)
7073 \end_layout
7074
7075 \begin_layout Itemize
7076
7077 \family typewriter
7078
7079 \backslash
7080 email
7081 \family default
7082  (2.3) â€“ can only be used 
7083 \begin_inset Quotes eld
7084 \end_inset
7085
7086 standalone
7087 \begin_inset Quotes erd
7088 \end_inset
7089
7090 , not in the middle of a paragraph.
7091  Use TeX code if you need to embed it.
7092 \end_layout
7093
7094 \begin_layout Itemize
7095
7096 \family typewriter
7097
7098 \backslash
7099 and
7100 \family default
7101  (2.3) â€“ will have extra {} after it.
7102  This should not cause an error.
7103 \end_layout
7104
7105 \begin_layout Itemize
7106
7107 \family typewriter
7108
7109 \backslash
7110 notetoeditor
7111 \family default
7112  (2.6) â€“ can only be used 
7113 \begin_inset Quotes eld
7114 \end_inset
7115
7116 standalone
7117 \begin_inset Quotes erd
7118 \end_inset
7119
7120 , not in the middle of a paragraph.
7121  Use TeX code if you need to embed it.
7122 \end_layout
7123
7124 \begin_layout Itemize
7125
7126 \family typewriter
7127
7128 \backslash
7129 placetable
7130 \family default
7131  (2.8) â€“ can't insert a cross-reference tag, you must type the tag name by
7132  hand
7133 \end_layout
7134
7135 \begin_layout Itemize
7136
7137 \family typewriter
7138
7139 \backslash
7140 placefigure
7141 \family default
7142  (2.8) â€“ same as for 
7143 \family typewriter
7144
7145 \backslash
7146 placetable
7147 \end_layout
7148
7149 \begin_layout Itemize
7150
7151 \family typewriter
7152
7153 \backslash
7154 acknowledgements
7155 \family default
7156  (2.9) â€“ will have extra {} after it.
7157  This should not cause an error.
7158 \end_layout
7159
7160 \begin_layout Itemize
7161
7162 \family typewriter
7163
7164 \backslash
7165 appendix
7166 \family default
7167  (2.11) â€“ will have extra {} after it.
7168  This should not cause an error.
7169 \end_layout
7170
7171 \begin_layout Itemize
7172
7173 \family typewriter
7174
7175 \backslash
7176 figcaption
7177 \family default
7178  (2.14.2) â€“ you can insert an optional filename argument by placing the cursor
7179  at the beginning of the text and selecting 
7180 \family sans
7181 Insert\SpecialChar \menuseparator
7182 Short Title
7183 \family default
7184 .
7185  
7186 \begin_inset Quotes eld
7187 \end_inset
7188
7189 Short Title
7190 \begin_inset Quotes erd
7191 \end_inset
7192
7193  inserts an optional argument of the type needed by 
7194 \family typewriter
7195
7196 \backslash
7197 figcaption
7198 \family default
7199 .
7200  Hopefully it will be renamed someday.
7201 \end_layout
7202
7203 \begin_layout Itemize
7204
7205 \family typewriter
7206
7207 \backslash
7208 objectname
7209 \family default
7210  (2.17.1) â€“ same as 
7211 \family typewriter
7212
7213 \backslash
7214 figcaption
7215 \family default
7216  for the catalog ID optional parameter
7217 \end_layout
7218
7219 \begin_layout Itemize
7220
7221 \family typewriter
7222
7223 \backslash
7224 dataset
7225 \family default
7226  (2.17.1) â€“ same as 
7227 \family typewriter
7228
7229 \backslash
7230 figcaption
7231 \family default
7232  for the catalog ID optional parameter
7233 \end_layout
7234
7235 \begin_layout Subsubsection
7236 Things not implemented, use TeX code
7237 \end_layout
7238
7239 \begin_layout Standard
7240 \begin_inset ERT
7241 status open
7242
7243 \begin_layout Plain Layout
7244
7245
7246 \backslash
7247 begin{sloppypar}
7248 \end_layout
7249
7250 \end_inset
7251
7252
7253 \end_layout
7254
7255 \begin_layout Standard
7256
7257 \family typewriter
7258
7259 \backslash
7260 altaffilmark
7261 \family default
7262  (2.3), 
7263 \family typewriter
7264
7265 \backslash
7266 altaffiltext
7267 \family default
7268  (2.3), 
7269 \family typewriter
7270
7271 \backslash
7272 eqnum
7273 \family default
7274  (2.12), 
7275 \family typewriter
7276
7277 \backslash
7278 setcounter{equation}
7279 \family default
7280  (2.12), Journal name abbreviations (2.13.4), 
7281 \family typewriter
7282
7283 \backslash
7284 figurenum
7285 \family default
7286  (2.14.1), 
7287 \family typewriter
7288
7289 \backslash
7290 epsscale
7291 \family default
7292  (2.14.1), 
7293 \family typewriter
7294
7295 \backslash
7296 plotone
7297 \family default
7298  (2.14.1), 
7299 \family typewriter
7300
7301 \backslash
7302 plottwo
7303 \family default
7304  (2.14.1), 
7305 \family typewriter
7306
7307 \backslash
7308 tablenum
7309 \family default
7310  (2.15.4), 
7311 \family typewriter
7312
7313 \backslash
7314 tableline
7315 \family default
7316  (2.15.4, insert it as the first element in the lefthand cell after where
7317  you want it.
7318  Don't use any of LyX's rules in the table), 
7319 \family typewriter
7320
7321 \backslash
7322 tablenotemark
7323 \family default
7324  (2.15.5), 
7325 \family typewriter
7326
7327 \backslash
7328 tablenotetext
7329 \family default
7330  (2.15.5), much of Misc (2.17, except 
7331 \family typewriter
7332
7333 \backslash
7334 objectname
7335 \family default
7336
7337 \family typewriter
7338
7339 \backslash
7340 dataset
7341 \family default
7342
7343 \family typewriter
7344
7345 \backslash
7346 url
7347 \family default
7348 , and 
7349 \family typewriter
7350
7351 \backslash
7352 email
7353 \family default
7354 ; see above), 
7355 \family typewriter
7356
7357 \backslash
7358 singlespace
7359 \family default
7360  (3.1), 
7361 \family typewriter
7362
7363 \backslash
7364 doublespace
7365 \family default
7366  (3.1), 
7367 \family typewriter
7368
7369 \backslash
7370 onecolumn
7371 \family default
7372  (3.2), 
7373 \family typewriter
7374
7375 \backslash
7376 twocolumn
7377 \family default
7378  (3.2)
7379 \end_layout
7380
7381 \begin_layout Standard
7382 \begin_inset ERT
7383 status open
7384
7385 \begin_layout Plain Layout
7386
7387
7388 \backslash
7389 end{sloppypar}
7390 \end_layout
7391
7392 \end_inset
7393
7394
7395 \end_layout
7396
7397 \begin_layout Subsubsection
7398 Things that cannot be implemented
7399 \end_layout
7400
7401 \begin_layout Standard
7402 \SpecialChar \ldots{}
7403  at least in any meaningful sort of way, so I suggest ignoring them.
7404  They are the references environment (2.13.3), and the deluxetable environment
7405  (2.15).
7406  If you really, really need to use deluxetable, I suggest editing it in
7407  a separate file with a text editor, then using 
7408 \family sans
7409 Insert\SpecialChar \menuseparator
7410 Child
7411 \begin_inset space ~
7412 \end_inset
7413
7414 Document
7415 \family default
7416  to include it in your LyX document.
7417  See the 
7418 \family typewriter
7419 aas_sample.lyx
7420 \family default
7421  file to see an example of this.
7422 \end_layout
7423
7424 \begin_layout Subsection
7425 FAQs, Tips, Tricks, and Other Ruminations
7426 \end_layout
7427
7428 \begin_layout Subsubsection
7429 Getting LyX and AASTeX to cooperate
7430 \end_layout
7431
7432 \begin_layout Standard
7433 It can be a bit tricky to get LyX to recognize a new layout and document
7434  class.
7435  When all else fails, do this:
7436 \end_layout
7437
7438 \begin_layout Enumerate
7439 Make certain that LaTeX can find AASTeX.
7440  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7441  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
7442 \family typewriter
7443 sample.tex
7444 \family default
7445 .
7446 \end_layout
7447
7448 \begin_layout Enumerate
7449 Make certain that 
7450 \family typewriter
7451 aastex.layout
7452 \family default
7453  appears in LyX's 
7454 \family typewriter
7455 layouts
7456 \family default
7457  folder
7458 \end_layout
7459
7460 \begin_layout Enumerate
7461 Rerun 
7462 \family sans
7463 Tools\SpecialChar \menuseparator
7464 Reconfigure
7465 \family default
7466  in LyX, then restart LyX.
7467 \end_layout
7468
7469 \begin_layout Enumerate
7470 Open a regular new file, not from a template.
7471  Does AASTeX appear in the class list in 
7472 \family sans
7473 Document\SpecialChar \menuseparator
7474 Settings
7475 \family default
7476 ?
7477 \end_layout
7478
7479 \begin_layout Standard
7480 If you get a warning from an existing AASTeX document about not being able
7481  to find the AASTeX layout or a message about 
7482 \begin_inset Quotes eld
7483 \end_inset
7484
7485 You should not mix title layouts with normal ones
7486 \begin_inset Quotes erd
7487 \end_inset
7488
7489 , things haven't been installed correctly.
7490 \end_layout
7491
7492 \begin_layout Subsubsection
7493 LaTeX error processing a table 
7494 \end_layout
7495
7496 \begin_layout Standard
7497 LyX, by default, attempts to center the table caption/title.
7498  This seems to produce a bad interaction in AASTeX so you should click somewhere
7499  in the caption/title, then select 
7500 \family sans
7501 Edit\SpecialChar \menuseparator
7502 Paragraph
7503 \begin_inset space ~
7504 \end_inset
7505
7506 Settings
7507 \family default
7508 , then set the 
7509 \family sans
7510 Alignment
7511 \family default
7512  to 
7513 \family sans
7514 Block
7515 \family default
7516 .
7517  This took care of it for me.
7518 \end_layout
7519
7520 \begin_layout Subsubsection
7521 References
7522 \end_layout
7523
7524 \begin_layout Standard
7525 A couple of things: 1) I have noticed some funny spacing in the reference
7526  entries in the text.
7527  When you enter the bibliography item data, make sure their is 
7528 \emph on
7529 no
7530 \emph default
7531  space between the last author and the parenthesis setting off the year;
7532  
7533 \emph on
7534 e.
7535 \begin_inset space \thinspace{}
7536 \end_inset
7537
7538 g.
7539 \begin_inset space \space{}
7540 \end_inset
7541
7542
7543 \emph default
7544 type 
7545 \family typewriter
7546 Ressler(1992)
7547 \family default
7548 , not 
7549 \family typewriter
7550 Ressler (1992)
7551 \family default
7552 .
7553  2) Entering the references at all is not obvious.
7554  The easiest thing is to start typing your first reference at the end of
7555  the document, then mark it as type 
7556 \family sans
7557 References
7558 \family default
7559 .
7560  That will put a small gray box in front of what you just typed.
7561  Click on the box to fill in the rest of the information.
7562  For new references, go to the end of an existing reference and press return.
7563  That will create a new line with its own box, etc.
7564 \end_layout
7565
7566 \begin_layout Subsubsection
7567 Including EPS files
7568 \end_layout
7569
7570 \begin_layout Standard
7571 Even though AASTeX provides its own figure commands (
7572 \family typewriter
7573
7574 \backslash
7575 plotone
7576 \family default
7577 , for example), I much prefer LaTeX's standard figure commands (with the
7578  default graphicx).
7579  You can insert the 
7580 \family typewriter
7581
7582 \backslash
7583 plotone
7584 \family default
7585 , etc.
7586 \begin_inset space ~
7587 \end_inset
7588
7589 commands as TeX code into a Figure Float box if you desire, but I never
7590  have much luck getting the layout right.
7591  With the standard graphics, LyX will insert a 
7592 \family typewriter
7593
7594 \backslash
7595 usepackage{graphicx}
7596 \family default
7597  command into the LaTeX preamble and handle the figures in the standard
7598  LaTeX2e way, interspersing the figures in the text.
7599  I believe ApJ accepts figures exactly this way now; AJ might still use
7600  the 
7601 \begin_inset Quotes eld
7602 \end_inset
7603
7604 stack everything at the end
7605 \begin_inset Quotes erd
7606 \end_inset
7607
7608  technique.
7609 \end_layout
7610
7611 \begin_layout Subsubsection
7612 Things I could have done, but didn't
7613 \end_layout
7614
7615 \begin_layout Standard
7616 There are a few 
7617 \begin_inset Quotes eld
7618 \end_inset
7619
7620 pretty
7621 \begin_inset Quotes erd
7622 \end_inset
7623
7624  things I could have implemented, but chose not to.
7625  For instance, I saw no point in double-spacing the text in the LyX window,
7626  even though it is double-spaced in the paper manuscript.
7627  Also, I chose not to make separate layouts for the preprint and preprint2
7628  styles.
7629  Since I assume you will spend most of your time in the plain manuscript
7630  mode anyway, I decided not to chew up more disk space with this.
7631  
7632 \end_layout
7633
7634 \begin_layout Subsection
7635 Final Caveat
7636 \end_layout
7637
7638 \begin_layout Standard
7639 Your mileage may vary.
7640  I've now had papers published by both ApJ and AJ that have had 98% of the
7641  effort done in LyX; the last 2% was the LaTeX post-processing and a few
7642  cleanups.
7643  I have had no trouble with the submission process, and I'm sure the journals
7644  were never aware that there might be a difference.
7645  So, go forth and publish!
7646 \end_layout
7647
7648 \begin_layout Section
7649 AMS LaTeX
7650 \end_layout
7651
7652 \begin_layout Standard
7653 by 
7654 \noun on
7655 David Johnson; updated by Richard Heck
7656 \end_layout
7657
7658 \begin_layout Standard
7659 \begin_inset VSpace bigskip
7660 \end_inset
7661
7662
7663 \end_layout
7664
7665 \begin_layout Standard
7666 \noindent
7667 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
7668  papers to be submitted to American Mathematical Society publications.
7669  The layouts are not tailored to a specific journal, but easily can be.
7670  You should refer to the AMS documentation for specific instructions for
7671  each journal (usually it will entail only changing a single line in the
7672  TeX output).
7673  That documentation is available on the Web at 
7674 \begin_inset Flex URL
7675 status open
7676
7677 \begin_layout Plain Layout
7678
7679 http://www.ams.org
7680 \end_layout
7681
7682 \end_inset
7683
7684  or by ftp at 
7685 \begin_inset Flex URL
7686 status open
7687
7688 \begin_layout Plain Layout
7689
7690 ftp://ftp.ams.org/pub/tex/amslatex/
7691 \end_layout
7692
7693 \end_inset
7694
7695 .
7696  These layouts are appropriate, and useful, for any mathematical writing.
7697  
7698 \end_layout
7699
7700 \begin_layout Standard
7701 There are two basic AMS LaTeX layouts: 
7702 \end_layout
7703
7704 \begin_layout Itemize
7705 amsart: The standard AMS article format.
7706 \end_layout
7707
7708 \begin_layout Itemize
7709 amsbook: the standard AMS book (really, monograph) format.
7710  
7711 \end_layout
7712
7713 \begin_layout Standard
7714 The layouts themselves contain only the minimum necessary to use the AMS
7715  classes.
7716  They do not, in particular, contain any of the `theorem' environments used
7717  for setting theorems, lemmas, and the like.
7718  These are contained, instead, in the 
7719 \begin_inset Flex CharStyle:Code
7720 status collapsed
7721
7722 \begin_layout Plain Layout
7723 Theorems (AMS)
7724 \end_layout
7725
7726 \end_inset
7727
7728  module, which is loaded by default when when you select one of the AMS
7729  classes.
7730  (It can also be used with other classes and can be removed, if you would
7731  rather use something else.) Less commonly used environments are in the 
7732 \begin_inset Flex CharStyle:Code
7733 status collapsed
7734
7735 \begin_layout Plain Layout
7736 Theorems (AMS-Extended)
7737 \end_layout
7738
7739 \end_inset
7740
7741  module, which must be loaded manually.
7742 \end_layout
7743
7744 \begin_layout Standard
7745 By default, theorems and the like are numbered consecutively throughout
7746  the document, but this may be modified by loading the module 
7747 \begin_inset Flex CharStyle:Code
7748 status collapsed
7749
7750 \begin_layout Plain Layout
7751 Theorems (Order by Section)
7752 \end_layout
7753
7754 \end_inset
7755
7756  or, if you are using 
7757 \begin_inset Flex CharStyle:Code
7758 status collapsed
7759
7760 \begin_layout Plain Layout
7761 book (AMS)
7762 \end_layout
7763
7764 \end_inset
7765
7766 , the module 
7767 \begin_inset Flex CharStyle:Code
7768 status collapsed
7769
7770 \begin_layout Plain Layout
7771 Theorems (Order by Chapter)
7772 \end_layout
7773
7774 \end_inset
7775
7776 .
7777  These will number the results as 
7778 \begin_inset Formula $n.m$
7779 \end_inset
7780
7781 , where the first number refers to the section (or chapter) and the second
7782  refers to the total number of results so far in that section (or chapter).
7783  Many environments are also available unnumbered.
7784  These are indicated by an asterisk at the end.
7785  If you happen to want 
7786 \emph on
7787 only
7788 \emph default
7789  unnumbered results, the the module 
7790 \begin_inset Flex CharStyle:Code
7791 status collapsed
7792
7793 \begin_layout Plain Layout
7794 Theorems (Starred)
7795 \end_layout
7796
7797 \end_inset
7798
7799  provides that option.
7800 \end_layout
7801
7802 \begin_layout Standard
7803 Note that these modules do not 
7804 \emph on
7805 have
7806 \emph default
7807  to be used with the AMS classes.
7808  It is perfectly possible to use the 
7809 \begin_inset Flex CharStyle:Code
7810 status collapsed
7811
7812 \begin_layout Plain Layout
7813 Theorems (AMS)
7814 \end_layout
7815
7816 \end_inset
7817
7818  module, and the others mentioned, with other classes, such as 
7819 \begin_inset Flex CharStyle:Code
7820 status collapsed
7821
7822 \begin_layout Plain Layout
7823 article
7824 \end_layout
7825
7826 \end_inset
7827
7828
7829 \begin_inset Flex CharStyle:Code
7830 status collapsed
7831
7832 \begin_layout Plain Layout
7833 report
7834 \end_layout
7835
7836 \end_inset
7837
7838
7839 \begin_inset Flex CharStyle:Code
7840 status collapsed
7841
7842 \begin_layout Plain Layout
7843 book (KOMA-script)
7844 \end_layout
7845
7846 \end_inset
7847
7848 , and so forth.
7849 \end_layout
7850
7851 \begin_layout Subsection
7852 What these layouts provide
7853 \end_layout
7854
7855 \begin_layout Standard
7856 There is a long list of included environments provided by these layouts.
7857  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
7858  variety of `theorem' environments.
7859  However, the AMS recommends the environments that are available in LyX.
7860  
7861 \end_layout
7862
7863 \begin_layout Standard
7864 The following environments—as well as the standard environments, such as
7865  
7866 \begin_inset Flex CharStyle:Noun
7867 status collapsed
7868
7869 \begin_layout Plain Layout
7870 section
7871 \end_layout
7872
7873 \end_inset
7874
7875
7876 \begin_inset Flex CharStyle:Noun
7877 status collapsed
7878
7879 \begin_layout Plain Layout
7880 bibliography
7881 \end_layout
7882
7883 \end_inset
7884
7885
7886 \begin_inset Flex CharStyle:Noun
7887 status collapsed
7888
7889 \begin_layout Plain Layout
7890 title
7891 \end_layout
7892
7893 \end_inset
7894
7895
7896 \begin_inset Flex CharStyle:Noun
7897 status collapsed
7898
7899 \begin_layout Plain Layout
7900 author
7901 \end_layout
7902
7903 \end_inset
7904
7905 , and 
7906 \begin_inset Flex CharStyle:Noun
7907 status collapsed
7908
7909 \begin_layout Plain Layout
7910 date
7911 \end_layout
7912
7913 \end_inset
7914
7915 —are provided by 
7916 \begin_inset Flex CharStyle:Code
7917 status collapsed
7918
7919 \begin_layout Plain Layout
7920 article (AMS)
7921 \end_layout
7922
7923 \end_inset
7924
7925  and 
7926 \begin_inset Flex CharStyle:Code
7927 status collapsed
7928
7929 \begin_layout Plain Layout
7930 book (AMS)
7931 \end_layout
7932
7933 \end_inset
7934
7935 :
7936 \end_layout
7937
7938 \begin_layout Description
7939 Address This should be the author's permanent address.
7940 \end_layout
7941
7942 \begin_layout Description
7943 Current
7944 \begin_inset space ~
7945 \end_inset
7946
7947 Address This should be the author's temporary address at the time of submission,
7948  if different from the Address.
7949 \end_layout
7950
7951 \begin_layout Description
7952 Email Author's e-mail address
7953 \end_layout
7954
7955 \begin_layout Description
7956 URL Author's Web address, if desired.
7957 \end_layout
7958
7959 \begin_layout Description
7960 Keywords Key words or phrases used to identify specific topics discussed
7961  in the paper.
7962 \end_layout
7963
7964 \begin_layout Description
7965 Subjectclass These refer to the AMS Subject Classifications, published and
7966  described in 
7967 \emph on
7968 Mathematical Reviews
7969 \emph default
7970 .
7971  These are also available online at the AMS cites listed above.
7972 \end_layout
7973
7974 \begin_layout Description
7975 Thanks
7976 \end_layout
7977
7978 \begin_layout Description
7979 Dedicatory
7980 \end_layout
7981
7982 \begin_layout Description
7983 Translator
7984 \end_layout
7985
7986 \begin_layout Standard
7987 The following environments are provided by both the 
7988 \begin_inset Flex CharStyle:Code
7989 status collapsed
7990
7991 \begin_layout Plain Layout
7992 Theorems
7993 \end_layout
7994
7995 \end_inset
7996
7997  and 
7998 \begin_inset Flex CharStyle:Code
7999 status collapsed
8000
8001 \begin_layout Plain Layout
8002 Theorems (AMS)
8003 \end_layout
8004
8005 \end_inset
8006
8007  modules, in the latter case in both starred (unnumbered) and unstarred
8008  (numbered) versions.
8009  These same environments are provided only in the starred versions by the
8010  
8011 \begin_inset Flex CharStyle:Code
8012 status collapsed
8013
8014 \begin_layout Plain Layout
8015 Theorems (Starred)
8016 \end_layout
8017
8018 \end_inset
8019
8020  module:
8021 \end_layout
8022
8023 \begin_layout Theorem
8024 This is typically used for the statements of major results.
8025  
8026 \end_layout
8027
8028 \begin_layout Corollary*
8029 This is used for statements which follow fairly directly from previous statement
8030 s.
8031  Again, these can be major results.
8032  
8033 \end_layout
8034
8035 \begin_layout Lemma
8036 These are smaller results needed to prove other statements.
8037 \end_layout
8038
8039 \begin_layout Proposition
8040 These are less major results which (hopefully) add to the general theory
8041  being discussed.
8042 \end_layout
8043
8044 \begin_layout Conjecture
8045 These are statements provided without justification, which the author does
8046  not know how to prove, but which seem to be true (to the author, at least).
8047 \end_layout
8048
8049 \begin_layout Definition*
8050 Guess what this is for.
8051  The font is different for this environment than for the previous ones.
8052  
8053 \end_layout
8054
8055 \begin_layout Example*
8056 Used for examples illustrating proven results.
8057 \end_layout
8058
8059 \begin_layout Problem
8060 It's not really known what this is for.
8061  You should figure it out.
8062 \end_layout
8063
8064 \begin_layout Exercise*
8065 Write a description for this one.
8066 \end_layout
8067
8068 \begin_layout Remark
8069 This environment is also a type of theorem, usually a lesser sort of observation.
8070 \end_layout
8071
8072 \begin_layout Claim*
8073 Often used in the course of giving a proof of a larger result.
8074 \end_layout
8075
8076 \begin_layout Case
8077 Generally, these are used to break up long arguments, using specific instances
8078  of some condition.
8079  
8080 \end_layout
8081
8082 \begin_layout Case
8083 The numbering scheme for cases is on its own, not together with other numbered
8084  statements.
8085  
8086 \end_layout
8087
8088 \begin_layout Proof
8089 At the end of this environment, a QED symbol (usually a square, but it can
8090  vary with different styles) is placed.
8091  If you want to have other environments within this one—for example, Case
8092  environments—and have the QED symbol appear only after them, then the other
8093  environments need to be nested within the proof environment.
8094  See the section 
8095 \emph on
8096 Nesting Environments
8097 \emph default
8098  of the 
8099 \emph on
8100 User's Guide
8101 \emph default
8102  for information on nesting.
8103 \end_layout
8104
8105 \begin_layout Standard
8106 And these environments are provided by 
8107 \begin_inset Flex CharStyle:Code
8108 status collapsed
8109
8110 \begin_layout Plain Layout
8111 Theorems (AMS-Extended)
8112 \end_layout
8113
8114 \end_inset
8115
8116 :
8117 \end_layout
8118
8119 \begin_layout Criterion*
8120 A required condition.
8121 \end_layout
8122
8123 \begin_layout Algorithm*
8124 A general procedure to be used.
8125 \end_layout
8126
8127 \begin_layout Axiom*
8128 This is a property or statement taken as true within the system being discussed.
8129 \end_layout
8130
8131 \begin_layout Condition*
8132 Sometimes used to state a condition assumed within the present context of
8133  discussion.
8134 \end_layout
8135
8136 \begin_layout Note*
8137 Similar to a Remark.
8138 \end_layout
8139
8140 \begin_layout Notation*
8141 Used for the explanation of, yes, notation.
8142 \end_layout
8143
8144 \begin_layout Summary
8145 Do we really need to tell you? 
8146 \end_layout
8147
8148 \begin_layout Acknowledgement*
8149 Acknowledgement.
8150 \end_layout
8151
8152 \begin_layout Conclusion*
8153 Sometimes used at the end of a long train of argument.
8154 \end_layout
8155
8156 \begin_layout Fact
8157 Used in a way similar to Proposition, though perhaps lower on the scale.
8158 \end_layout
8159
8160 \begin_layout Standard
8161 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8162  fonts packages.
8163  They need to be available on your system in order to use these environments.
8164 \end_layout
8165
8166 \begin_layout Section
8167 AGU journals (
8168 \family sans
8169 aguplus
8170 \family default
8171 )
8172 \end_layout
8173
8174 \begin_layout Standard
8175 by 
8176 \shape smallcaps
8177 Martin Vermeer
8178 \end_layout
8179
8180 \begin_layout Subsection
8181 Description
8182 \end_layout
8183
8184 \begin_layout Standard
8185 These are the layout files for some of the journals of the American Geophysical
8186  Society.
8187  It is assumed that you have both the AGU's own class files and AGUplus
8188  installed (everything to be found at
8189 \begin_inset Flex URL
8190 status collapsed
8191
8192 \begin_layout Plain Layout
8193
8194 ftp://ftp.agu.org/journals/latex/journals
8195 \end_layout
8196
8197 \end_inset
8198
8199 ).
8200 \end_layout
8201
8202 \begin_layout Subsection
8203 New styles
8204 \end_layout
8205
8206 \begin_layout Standard
8207 Redefined are 
8208 \family sans
8209 Paragraph
8210 \family default
8211
8212 \family sans
8213 Paragraph*
8214 \family default
8215 .
8216  They are still called this in the LyX GUI, though their LaTeX equivalents
8217  in the AGU classes are 
8218 \family sans
8219 Subsubsubsection
8220 \family default
8221  and 
8222 \family sans
8223 Subsubsubsection*
8224 \family default
8225 .
8226 \end_layout
8227
8228 \begin_layout Standard
8229 Newly defined styles are 
8230 \family sans
8231 Left_Header
8232 \family default
8233
8234 \family sans
8235 Right_Header
8236 \family default
8237
8238 \family sans
8239 Received
8240 \family default
8241
8242 \family sans
8243 Revised
8244 \family default
8245
8246 \family sans
8247 Accepted
8248 \family default
8249
8250 \family sans
8251 CCC
8252 \family default
8253
8254 \family sans
8255 PaperId
8256 \family default
8257
8258 \family sans
8259 AuthorAddr
8260 \family default
8261
8262 \family sans
8263 SlugComment
8264 \family default
8265 .
8266  These are mostly manuscript attributes and defined in the AGU class documentati
8267 on.
8268 \end_layout
8269
8270 \begin_layout Standard
8271 I suspect this is still badly incomplete.
8272 \end_layout
8273
8274 \begin_layout Subsection
8275 New floats
8276 \end_layout
8277
8278 \begin_layout Standard
8279
8280 \family sans
8281 Planotable
8282 \family default
8283  and 
8284 \family sans
8285 Plate
8286 \family default
8287 .
8288  We also have a new 
8289 \family sans
8290 Table_Caption
8291 \family default
8292 .
8293 \end_layout
8294
8295 \begin_layout Subsection
8296 Supported journals
8297 \end_layout
8298
8299 \begin_layout Itemize
8300
8301 \emph on
8302 Journal of Geophysical Research
8303 \emph default
8304
8305 \family typewriter
8306 jgrga.layout
8307 \family default
8308  â€” Martin Vermeer
8309 \end_layout
8310
8311 \begin_layout Standard
8312 Add your own, it isn't so hard! Look at the 
8313 \family typewriter
8314 jgrga.layout
8315 \family default
8316  example and 
8317 \family typewriter
8318 aguplus.inc
8319 \family default
8320 .
8321 \end_layout
8322
8323 \begin_layout Subsection
8324 Bugs and things to remember
8325 \end_layout
8326
8327 \begin_layout Standard
8328 In order to use the new layouts, you must remember to do the following for
8329  a new document:
8330 \end_layout
8331
8332 \begin_layout Enumerate
8333
8334 \emph on
8335 Turn off babel
8336 \emph default
8337 .
8338  This can be done in the 
8339 \family sans
8340 Layout\SpecialChar \menuseparator
8341 Document
8342 \family default
8343  or 
8344 \family sans
8345 Document\SpecialChar \menuseparator
8346 Settings
8347 \family default
8348  menu item.
8349  (AGU articles are always in English, right? So 
8350 \emph on
8351 don't
8352 \emph default
8353  choose a language.)
8354 \end_layout
8355
8356 \begin_layout Enumerate
8357 Enter 
8358 \family typewriter
8359 jgrga
8360 \family default
8361  into the document's 
8362 \family sans
8363 Extra Options
8364 \family default
8365  field.
8366  (Yes, this is a bug.)
8367 \end_layout
8368
8369 \begin_layout Enumerate
8370 Make sure you use the 
8371 \family typewriter
8372 agu.bst
8373 \family default
8374  bibliography style, by entering 
8375 \family sans
8376 agu
8377 \family default
8378  into the second field of the BibTeX inset.
8379  None of the standard styles will do.
8380 \end_layout
8381
8382 \begin_layout Section
8383 Broadway
8384 \end_layout
8385
8386 \begin_layout Standard
8387 by 
8388 \shape smallcaps
8389 Garst Reese
8390 \end_layout
8391
8392 \begin_layout Subsection
8393 Introduction
8394 \end_layout
8395
8396 \begin_layout Standard
8397 Broadway is for writing plays.
8398  The format is more decorative than Hollywood, and much less standardized.
8399  This format should be suitable for workshops.
8400 \end_layout
8401
8402 \begin_layout Subsection
8403 Special problems
8404 \end_layout
8405
8406 \begin_layout Standard
8407 The same as in Hollywood.
8408 \end_layout
8409
8410 \begin_layout Subsection
8411 Special features
8412 \end_layout
8413
8414 \begin_layout Standard
8415 Insert the 
8416 \family sans
8417 Speaker
8418 \family default
8419  names as labels then cross-reference the label to insert the name.
8420  The cross-reference dialog will show the current cast of characters.
8421 \end_layout
8422
8423 \begin_layout Subsection
8424 Paper size and Margins
8425 \end_layout
8426
8427 \begin_layout Standard
8428 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
8429 \end_layout
8430
8431 \begin_layout Subsection
8432 Environments
8433 \end_layout
8434
8435 \begin_layout Standard
8436 The following environments are available.
8437  You can use broadway.bind to get the bind keys shown at the right.
8438 \end_layout
8439
8440 \begin_layout Itemize
8441
8442 \family sans
8443 Standard
8444 \begin_inset Newline newline
8445 \end_inset
8446
8447
8448 \family default
8449 You should not have to use this, but it is here for anything that does not
8450  fit otherwise.
8451 \end_layout
8452
8453 \begin_layout Itemize
8454
8455 \family sans
8456 Narrative
8457 \begin_inset space \hfill{}
8458 \end_inset
8459
8460 M-z n
8461 \begin_inset Newline newline
8462 \end_inset
8463
8464
8465 \family default
8466 Used to describe stage setting and the action.
8467  First use of speaker names in all CAPs.
8468 \end_layout
8469
8470 \begin_layout Itemize
8471
8472 \family sans
8473 ACT
8474 \begin_inset space \hfill{}
8475 \end_inset
8476
8477 M-z a
8478 \begin_inset Newline newline
8479 \end_inset
8480
8481
8482 \family default
8483 Automatically numbered.
8484  On screen it will be arabic, but will print as Roman.
8485 \end_layout
8486
8487 \begin_layout Itemize
8488
8489 \family sans
8490 ACT*
8491 \begin_inset space \hfill{}
8492 \end_inset
8493
8494 M-z S at
8495 \begin_inset Newline newline
8496 \end_inset
8497
8498
8499 \family default
8500 Subtitle for 
8501 \family sans
8502 ACT.
8503
8504 \family default
8505  It is just centered text.
8506 \end_layout
8507
8508 \begin_layout Itemize
8509
8510 \family sans
8511 SCENE
8512 \begin_inset space \hfill{}
8513 \end_inset
8514
8515 M-z S-S
8516 \begin_inset Newline newline
8517 \end_inset
8518
8519
8520 \family default
8521 Not automatically numbered.
8522  You supply the number.
8523  This is because I couldn't figure out how.
8524 \end_layout
8525
8526 \begin_layout Itemize
8527
8528 \family sans
8529 AT_RISE:
8530 \begin_inset space \hfill{}
8531 \end_inset
8532
8533 M-z S-R
8534 \begin_inset Newline newline
8535 \end_inset
8536
8537
8538 \family default
8539 A special case of Narrative to describe the setting and action as the curtain
8540  rises.
8541 \end_layout
8542
8543 \begin_layout Itemize
8544
8545 \family sans
8546 Speaker
8547 \begin_inset space \hfill{}
8548 \end_inset
8549
8550 M-z s
8551 \begin_inset Newline newline
8552 \end_inset
8553
8554
8555 \family default
8556 The speaker's (actor's) title, centered in all CAPS.
8557 \end_layout
8558
8559 \begin_layout Itemize
8560
8561 \family sans
8562 Parenthetical
8563 \begin_inset space \hfill{}
8564 \end_inset
8565
8566 M-z p
8567 \begin_inset Newline newline
8568 \end_inset
8569
8570
8571 \family default
8572 Instructions to the speaker.
8573  The parentheses are automatically inserted.
8574  The ( will appear on screen, but both will be in the printed play.
8575  This environment is only used within 
8576 \family sans
8577 Dialogue
8578 \family default
8579 .
8580 \end_layout
8581
8582 \begin_layout Itemize
8583
8584 \family sans
8585 Dialogue
8586 \begin_inset space \hfill{}
8587 \end_inset
8588
8589 M-z d
8590 \begin_inset Newline newline
8591 \end_inset
8592
8593
8594 \family default
8595 What the Speaker says.
8596 \end_layout
8597
8598 \begin_layout Itemize
8599
8600 \family sans
8601 CURTAIN
8602 \begin_inset space \hfill{}
8603 \end_inset
8604
8605 M-z S-C
8606 \begin_inset Newline newline
8607 \end_inset
8608
8609
8610 \family default
8611 The curtain comes down.
8612 \end_layout
8613
8614 \begin_layout Itemize
8615
8616 \family sans
8617 Title
8618 \begin_inset space \hfill{}
8619 \end_inset
8620
8621 M-z S-T
8622 \end_layout
8623
8624 \begin_layout Itemize
8625
8626 \family sans
8627 Author
8628 \begin_inset space \hfill{}
8629 \end_inset
8630
8631 M-z S-A
8632 \end_layout
8633
8634 \begin_layout Itemize
8635
8636 \family sans
8637 Right_Address
8638 \begin_inset space \hfill{}
8639 \end_inset
8640
8641 M-z r
8642 \end_layout
8643
8644 \begin_layout Standard
8645 Hello there.
8646 \end_layout
8647
8648 \begin_layout Section
8649 Dinbrief
8650 \end_layout
8651
8652 \begin_layout Standard
8653 The document class 
8654 \family sans
8655 dinbrief
8656 \family default
8657  can be used to type letters according to German conventions.
8658  A template file is included in 
8659 \family typewriter
8660 .../lyx/share/templates
8661 \family default
8662  for you to use as a starting point.
8663 \end_layout
8664
8665 \begin_layout Section
8666 EGS journals (
8667 \family sans
8668 egs
8669 \family default
8670 )
8671 \end_layout
8672
8673 \begin_layout Standard
8674 by 
8675 \shape smallcaps
8676 Martin Vermeer
8677 \end_layout
8678
8679 \begin_layout Subsection
8680 Description
8681 \end_layout
8682
8683 \begin_layout Standard
8684 This is the layout file for the European Geophysical Society journals.
8685  The needed 
8686 \family typewriter
8687 egs.cls
8688 \family default
8689  can be downloaded from the web site of the EGS under 
8690 \begin_inset Flex URL
8691 status collapsed
8692
8693 \begin_layout Plain Layout
8694
8695 www.copernicus.org
8696 \end_layout
8697
8698 \end_inset
8699
8700 .
8701 \end_layout
8702
8703 \begin_layout Subsection
8704 New styles
8705 \end_layout
8706
8707 \begin_layout Standard
8708
8709 \family sans
8710 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
8711  Accepted
8712 \family default
8713
8714 \family sans
8715 Offsets
8716 \family default
8717 .
8718  The current layout file is unfortunately very unmodular and would benefit
8719  from using the various 
8720 \family typewriter
8721 std*.inc
8722 \family default
8723  file inclusions.
8724 \end_layout
8725
8726 \begin_layout Section
8727 Elsevier Journals
8728 \end_layout
8729
8730 \begin_layout Standard
8731 By 
8732 \noun on
8733 Rod Pinna
8734 \end_layout
8735
8736 \begin_layout Standard
8737 Elsevier Science Publishers B.V.
8738  provides a standard LaTeX document class (
8739 \family typewriter
8740 elsart.cls
8741 \family default
8742 ) for submitting articles to their various journals.
8743  The style file can be downloaded directly from their web site: 
8744 \begin_inset Flex URL
8745 status collapsed
8746
8747 \begin_layout Plain Layout
8748
8749 http://authors.elsevier.com/
8750 \end_layout
8751
8752 \end_inset
8753
8754 .
8755  Instructions are supplied along with the class file, which details the
8756  requirements of the publishers.
8757  LyX includes package that allows for the use of this class, by a layout
8758  and a template file.
8759  Installation of the class file is the same as for any other LaTeX package;
8760  instructions are provided in the Elsevier documentation.
8761 \end_layout
8762
8763 \begin_layout Standard
8764 To make use of 
8765 \family typewriter
8766 elsart.cls
8767 \family default
8768 , a file 
8769 \family typewriter
8770 elsart.layout
8771 \family default
8772  is supplied.
8773  As the Elsevier class file is based mainly on the standard article class,
8774  most of the normal functionality is provided.
8775  The Elsevier class defines a number of mathematical environments, which
8776  are similar to the AMS environments.
8777  These commands are all described in the Elsevier documentation, and are
8778  available in LyX.
8779 \end_layout
8780
8781 \begin_layout Standard
8782 The easiest way to use the Elsevier style is to base documents on the included
8783  template file.
8784  It is best not to use options such as fancy headings or the geometry package,
8785  as elements such as these are defined by Elsevier in their style file.
8786  Ideally, no extra packages except those mentioned in the Elsevier documentation
8787  should be used.
8788  Essentially, Elsevier require as 
8789 \begin_inset Quotes eld
8790 \end_inset
8791
8792 clean
8793 \begin_inset Quotes erd
8794 \end_inset
8795
8796  a LaTeX file as possible, as their intention is to take the supplied file
8797  and replace the class file with one for the particular journal to which
8798  the paper has been submitted.
8799  This also means that not too much time should be spent on the formating
8800  of the document.
8801  When it comes to be published, this will change anyway.
8802  The rest of the usage for this layout is substantially the same as for
8803  the normal article class.
8804  For details of what Elsevier do and don't allow, refer to their documentation.
8805 \end_layout
8806
8807 \begin_layout Section
8808 Foils [aka 
8809 \family sans
8810 FoilTeX
8811 \family default
8812 ]
8813 \begin_inset CommandInset label
8814 LatexCommand label
8815 name "sec:foiltex"
8816
8817 \end_inset
8818
8819
8820 \end_layout
8821
8822 \begin_layout Standard
8823 by 
8824 \noun on
8825 Allan Rae
8826 \end_layout
8827
8828 \begin_layout Subsection
8829 Introduction
8830 \end_layout
8831
8832 \begin_layout Standard
8833 This section describes how to use LyX to make slides for overhead projectors.
8834  There are two document classes that can do this: the default slides class
8835  and the 
8836 \family sans
8837 FoilTeX
8838 \family default
8839  slides class.
8840  This section documents the latter.
8841 \end_layout
8842
8843 \begin_layout Standard
8844 I'm going to say this again, nice and clear, so that there's no misunderstanding
8845 :
8846 \end_layout
8847
8848 \begin_layout Standard
8849 \begin_inset VSpace bigskip
8850 \end_inset
8851
8852
8853 \end_layout
8854
8855 \begin_layout Standard
8856 \align center
8857
8858 \size large
8859 This section documents the class 
8860 \begin_inset Quotes eld
8861 \end_inset
8862
8863
8864 \family sans
8865 slides (FoilTeX)
8866 \family default
8867
8868 \begin_inset Quotes erd
8869 \end_inset
8870
8871  
8872 \emph on
8873 only.
8874 \end_layout
8875
8876 \begin_layout Standard
8877 \begin_inset VSpace bigskip
8878 \end_inset
8879
8880
8881 \end_layout
8882
8883 \begin_layout Standard
8884 If you're looking for the documentation for 
8885 \begin_inset Quotes eld
8886 \end_inset
8887
8888
8889 \family sans
8890 slides (default)
8891 \family default
8892
8893 \begin_inset Quotes erd
8894 \end_inset
8895
8896 , check out section
8897 \begin_inset space ~
8898 \end_inset
8899
8900
8901 \begin_inset CommandInset ref
8902 LatexCommand ref
8903 reference "sec:slitex"
8904
8905 \end_inset
8906
8907 .
8908  If your machine doesn't have the 
8909 \family sans
8910 foils
8911 \family default
8912  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 ] installed, you'll probably have to use the default 
8925 \family sans
8926 slides
8927 \family default
8928  class, which isn't quite as good as 
8929 \family sans
8930 foils.
8931 \end_layout
8932
8933 \begin_layout Standard
8934 The 
8935 \family sans
8936 foils
8937 \family default
8938  class is designed for use with version 2.1 of the 
8939 \family sans
8940 foils.cls
8941 \family default
8942  LaTeX class file which is now an integral part of LaTeX2e.
8943 \end_layout
8944
8945 \begin_layout Subsection
8946 Getting Started
8947 \end_layout
8948
8949 \begin_layout Standard
8950 Obviously, to use this document class, you need to select 
8951 \begin_inset Quotes eld
8952 \end_inset
8953
8954
8955 \family sans
8956 slides (FoilTeX)
8957 \family default
8958
8959 \begin_inset Quotes erd
8960 \end_inset
8961
8962  from the 
8963 \family sans
8964 Class
8965 \family default
8966  entry in the 
8967 \family sans
8968 Document
8969 \begin_inset space ~
8970 \end_inset
8971
8972 Layout
8973 \family default
8974  dialog.
8975  There are some settings in the 
8976 \family sans
8977 Document
8978 \begin_inset space ~
8979 \end_inset
8980
8981 Layout
8982 \family default
8983  dialog that you should know about that are specific to this class:
8984 \end_layout
8985
8986 \begin_layout Itemize
8987 Don't change the options 
8988 \family sans
8989 Sides
8990 \family default
8991  and 
8992 \family sans
8993 Columns
8994 \family default
8995  on the 
8996 \family sans
8997 Document
8998 \begin_inset space ~
8999 \end_inset
9000
9001 Layout
9002 \family default
9003  dialog.
9004  They're ignored by the 
9005 \family sans
9006 foils
9007 \family default
9008  class.
9009 \end_layout
9010
9011 \begin_layout Itemize
9012 The default font size is 20
9013 \begin_inset space \thinspace{}
9014 \end_inset
9015
9016 pt with the other options being 17
9017 \begin_inset space \thinspace{}
9018 \end_inset
9019
9020 pt, 25
9021 \begin_inset space \thinspace{}
9022 \end_inset
9023
9024 pt and 30
9025 \begin_inset space \thinspace{}
9026 \end_inset
9027
9028 pt.
9029 \end_layout
9030
9031 \begin_layout Itemize
9032 The default font is 
9033 \family sans
9034 sans
9035 \family default
9036  
9037 \family sans
9038 serif
9039 \family default
9040  but all math equations are still typeset in the usual roman font.
9041 \end_layout
9042
9043 \begin_layout Itemize
9044
9045 \family sans
9046 FoilTeX
9047 \family default
9048  supports A4 and Letter paper sizes as well as a special size for working
9049  with 35
9050 \begin_inset space \thinspace{}
9051 \end_inset
9052
9053 mm slides.
9054  It doesn't support A5, B5, legal or executive paper sizes.
9055 \end_layout
9056
9057 \begin_layout Itemize
9058 Don't bother changing the 
9059 \family sans
9060 Float Placement
9061 \family default
9062  settings because they are ignored anyway.
9063  All floats appear where they are defined in the text.
9064 \end_layout
9065
9066 \begin_layout Itemize
9067 The 
9068 \family sans
9069 Pagestyle
9070 \family default
9071  setting behaves a bit differently for this class.
9072  
9073 \family sans
9074 FoilTeX
9075 \family default
9076  provides extensive footer and header capabilities including a user-defined
9077  logo.
9078  See section
9079 \begin_inset space ~
9080 \end_inset
9081
9082
9083 \begin_inset CommandInset ref
9084 LatexCommand ref
9085 reference "sec:foilfoot"
9086
9087 \end_inset
9088
9089  for more details.
9090  The title page is treated differently to all other pages in the document
9091  and is 
9092 \emph on
9093 always
9094 \emph default
9095  unnumbered and 
9096 \emph on
9097 always
9098 \emph default
9099  has the logo centered at the bottom of the page (if one is defined).
9100  The possible page style choices and what they do are as follows:
9101 \end_layout
9102
9103 \begin_deeper
9104 \begin_layout Labeling
9105 \labelwidthstring MMMMMMM
9106
9107 \family sans
9108 \series bold
9109 empty
9110 \family default
9111 \series default
9112  The final output contains no page numbers, or other headers or footers
9113  (except footnotes of course).
9114  
9115 \end_layout
9116
9117 \begin_layout Labeling
9118 \labelwidthstring MMMMMMM
9119
9120 \family sans
9121 \series bold
9122 plain
9123 \family default
9124 \series default
9125  The final output contains page numbers centered at the bottom of the page.
9126  No other headings or footers (other than footnotes).
9127 \end_layout
9128
9129 \begin_layout Labeling
9130 \labelwidthstring MMMMMMM
9131
9132 \series bold
9133 foilheadings
9134 \series default
9135  Page numbers in lower right corner.
9136  Additional headers and footers are also shown.
9137  This is also the default.
9138 \end_layout
9139
9140 \begin_layout Labeling
9141 \labelwidthstring MMMMMMM
9142
9143 \series bold
9144 fancy
9145 \series default
9146  Gives you access to the 
9147 \family sans
9148 fancyheadings
9149 \family default
9150  package although its use with 
9151 \family sans
9152 FoilTeX
9153 \family default
9154  is discouraged by the writer of the 
9155 \family sans
9156 FoilTeX
9157 \family default
9158  package because of some potential page layout clashes.
9159 \end_layout
9160
9161 \end_deeper
9162 \begin_layout Subsubsection
9163 Extra Options
9164 \end_layout
9165
9166 \begin_layout Standard
9167 The following options may be used in the extra class options in the 
9168 \family sans
9169 Document\SpecialChar \menuseparator
9170 Settings
9171 \family default
9172  dialog.
9173 \end_layout
9174
9175 \begin_layout Labeling
9176 \labelwidthstring MMMMMMx
9177
9178 \series bold
9179 35mmSlide
9180 \series default
9181  This sets up the page layout for 7.33
9182 \begin_inset space \thinspace{}
9183 \end_inset
9184
9185 in by 11
9186 \begin_inset space \thinspace{}
9187 \end_inset
9188
9189 in paper, which is about the same aspect ratio as a 35
9190 \begin_inset space \thinspace{}
9191 \end_inset
9192
9193 mm slide, making it a bit easier to work with this medium.
9194 \end_layout
9195
9196 \begin_layout Labeling
9197 \labelwidthstring MMMMMMx
9198
9199 \series bold
9200 headrule
9201 \series default
9202  Places a rule across the page below the header on every page except the
9203  title page.
9204 \end_layout
9205
9206 \begin_layout Labeling
9207 \labelwidthstring MMMMMMx
9208
9209 \series bold
9210 footrule
9211 \series default
9212  Places a rule across the page above the footer on every page except the
9213  title page.
9214 \end_layout
9215
9216 \begin_layout Labeling
9217 \labelwidthstring MMMMMMx
9218
9219 \series bold
9220 dvips
9221 \series default
9222  This is automatically set each time you create a new 
9223 \family sans
9224 foils
9225 \family default
9226  document.
9227  This option tells 
9228 \family sans
9229 FoilTeX
9230 \family default
9231  to use the dvips driver to rotate those pages that are set as landscape
9232  foils.
9233 \end_layout
9234
9235 \begin_layout Labeling
9236 \labelwidthstring MMMMMMx
9237
9238 \series bold
9239 landscape
9240 \series default
9241  Simply changes the page dimensions to those of a landscape page but doesn't
9242  do any rotation.
9243  Thus if you use this option you need to use an external program to rotate
9244  each page or feed your paper through your printer as landscape.
9245  Note that this option effectively reverses the roles of the 
9246 \family sans
9247 Foilhead
9248 \family default
9249  and 
9250 \family sans
9251 Rotatefoilhead
9252 \family default
9253  environments (don't worry these are described in the next section).
9254 \end_layout
9255
9256 \begin_layout Labeling
9257 \labelwidthstring MMMMMMx
9258
9259 \series bold
9260 leqno
9261 \series default
9262  Equation numbers on the left.
9263 \end_layout
9264
9265 \begin_layout Labeling
9266 \labelwidthstring MMMMMMx
9267
9268 \series bold
9269 fleqn
9270 \series default
9271  Flush-left equations.
9272 \end_layout
9273
9274 \begin_layout Subsection
9275 Supported Environments
9276 \end_layout
9277
9278 \begin_layout Standard
9279 Most of the environments commonly supported in other classes are also supported
9280  by the 
9281 \family sans
9282 foils
9283 \family default
9284  class.
9285  There are several additional environments provided by 
9286 \family sans
9287 FoilTeX
9288 \family default
9289  as well as a couple added by LyX.
9290  The following environments are shared with other classes:
9291 \end_layout
9292
9293 \begin_layout Standard
9294 \begin_inset ERT
9295 status open
9296
9297 \begin_layout Plain Layout
9298
9299
9300 \backslash
9301 begin{multicols}{2}
9302 \end_layout
9303
9304 \end_inset
9305
9306
9307 \end_layout
9308
9309 \begin_layout Itemize
9310
9311 \family sans
9312 Standard
9313 \end_layout
9314
9315 \begin_layout Itemize
9316
9317 \family sans
9318 Itemize
9319 \end_layout
9320
9321 \begin_layout Itemize
9322
9323 \family sans
9324 Enumerate
9325 \end_layout
9326
9327 \begin_layout Itemize
9328
9329 \family sans
9330 Description
9331 \end_layout
9332
9333 \begin_layout Itemize
9334
9335 \family sans
9336 List
9337 \end_layout
9338
9339 \begin_layout Itemize
9340
9341 \family sans
9342 LyX-Code
9343 \end_layout
9344
9345 \begin_layout Itemize
9346
9347 \family sans
9348 Verse
9349 \end_layout
9350
9351 \begin_layout Itemize
9352
9353 \family sans
9354 Quote
9355 \end_layout
9356
9357 \begin_layout Itemize
9358
9359 \family sans
9360 Quotation
9361 \end_layout
9362
9363 \begin_layout Itemize
9364
9365 \family sans
9366 Title
9367 \end_layout
9368
9369 \begin_layout Itemize
9370
9371 \family sans
9372 Author
9373 \end_layout
9374
9375 \begin_layout Itemize
9376
9377 \family sans
9378 Date
9379 \end_layout
9380
9381 \begin_layout Itemize
9382
9383 \family sans
9384 Abstract
9385 \end_layout
9386
9387 \begin_layout Itemize
9388
9389 \family sans
9390 Bibliography
9391 \end_layout
9392
9393 \begin_layout Itemize
9394
9395 \family sans
9396 Address
9397 \end_layout
9398
9399 \begin_layout Itemize
9400
9401 \family sans
9402 RightAddress
9403 \end_layout
9404
9405 \begin_layout Itemize
9406
9407 \family sans
9408 Caption
9409 \end_layout
9410
9411 \begin_layout Itemize
9412
9413 \family sans
9414 Comment
9415 \end_layout
9416
9417 \begin_layout Standard
9418 \begin_inset ERT
9419 status open
9420
9421 \begin_layout Plain Layout
9422
9423
9424 \backslash
9425 end{multicols}
9426 \end_layout
9427
9428 \end_inset
9429
9430
9431 \end_layout
9432
9433 \begin_layout Standard
9434 That is, all the major environments apart from the sectioning environments.
9435  Since foils are essentially self-contained sections, with a title and body,
9436  
9437 \family sans
9438 FoilTeX
9439 \family default
9440  provides specific commands for starting new foils and these are:
9441 \end_layout
9442
9443 \begin_layout Itemize
9444
9445 \family sans
9446 Foilhead
9447 \end_layout
9448
9449 \begin_layout Itemize
9450
9451 \family sans
9452 Rotatefoilhead
9453 \end_layout
9454
9455 \begin_layout Standard
9456 LyX also provides slightly modified versions of these two environments called:
9457 \end_layout
9458
9459 \begin_layout Itemize
9460
9461 \family sans
9462 ShortFoilhead
9463 \end_layout
9464
9465 \begin_layout Itemize
9466
9467 \family sans
9468 ShortRotatefoilhead
9469 \end_layout
9470
9471 \begin_layout Standard
9472 and the differences will be explained in the next section.
9473 \end_layout
9474
9475 \begin_layout Standard
9476 Since foils are often used in presenting ideas or new theorems and such
9477  
9478 \family sans
9479 FoilTeX
9480 \family default
9481  also provides a comprehensive box of goodies for presenting them:
9482 \end_layout
9483
9484 \begin_layout Standard
9485 \begin_inset ERT
9486 status open
9487
9488 \begin_layout Plain Layout
9489
9490
9491 \backslash
9492 begin{multicols}{2}
9493 \end_layout
9494
9495 \end_inset
9496
9497
9498 \end_layout
9499
9500 \begin_layout Itemize
9501
9502 \family sans
9503 Theorem
9504 \end_layout
9505
9506 \begin_layout Itemize
9507
9508 \family sans
9509 Lemma
9510 \end_layout
9511
9512 \begin_layout Itemize
9513
9514 \family sans
9515 Corollary
9516 \end_layout
9517
9518 \begin_layout Itemize
9519
9520 \family sans
9521 Proposition
9522 \end_layout
9523
9524 \begin_layout Itemize
9525
9526 \family sans
9527 Definition
9528 \end_layout
9529
9530 \begin_layout Itemize
9531
9532 \family sans
9533 Proof
9534 \end_layout
9535
9536 \begin_layout Itemize
9537
9538 \family sans
9539 Theorem*
9540 \end_layout
9541
9542 \begin_layout Itemize
9543
9544 \family sans
9545 Lemma*
9546 \end_layout
9547
9548 \begin_layout Itemize
9549
9550 \family sans
9551 Corollary*
9552 \end_layout
9553
9554 \begin_layout Itemize
9555
9556 \family sans
9557 Proposition*
9558 \end_layout
9559
9560 \begin_layout Itemize
9561
9562 \family sans
9563 Definition*
9564 \end_layout
9565
9566 \begin_layout Standard
9567 \begin_inset ERT
9568 status open
9569
9570 \begin_layout Plain Layout
9571
9572
9573 \backslash
9574 end{multicols}
9575 \end_layout
9576
9577 \end_inset
9578
9579
9580 \end_layout
9581
9582 \begin_layout Standard
9583 The starred versions are unnumbered while the unstarred versions are numbered.
9584  There are also two list environments added by LyX and these are:
9585 \end_layout
9586
9587 \begin_layout Itemize
9588
9589 \family sans
9590 TickList
9591 \end_layout
9592
9593 \begin_layout Itemize
9594
9595 \family sans
9596 CrossList
9597 \end_layout
9598
9599 \begin_layout Standard
9600
9601 \family sans
9602 FoilTeX
9603 \family default
9604  provides some powerful header and footer capabilities that are best set
9605  in the preamble although they may be set at any point in a document.
9606  If you want to change these settings in your document the best place to
9607  do so is at the very top of a foil, i.
9608 \begin_inset space \thinspace{}
9609 \end_inset
9610
9611 g.
9612 \emph on
9613
9614 \begin_inset space \space{}
9615 \end_inset
9616
9617
9618 \emph default
9619 straight after the foilhead.
9620 \end_layout
9621
9622 \begin_layout Standard
9623 For this purpose, the following command styles are provided [
9624 \shape smallcaps
9625 Martin Vermeer
9626 \shape default
9627 ]:
9628 \end_layout
9629
9630 \begin_layout Standard
9631 \begin_inset ERT
9632 status open
9633
9634 \begin_layout Plain Layout
9635
9636
9637 \backslash
9638 begin{multicols}{2}
9639 \end_layout
9640
9641 \end_inset
9642
9643
9644 \end_layout
9645
9646 \begin_layout Itemize
9647
9648 \family sans
9649 My
9650 \begin_inset space ~
9651 \end_inset
9652
9653 Logo
9654 \end_layout
9655
9656 \begin_layout Itemize
9657
9658 \family sans
9659 Restriction
9660 \end_layout
9661
9662 \begin_layout Itemize
9663
9664 \family sans
9665 Right
9666 \begin_inset space ~
9667 \end_inset
9668
9669 Footer
9670 \end_layout
9671
9672 \begin_layout Itemize
9673
9674 \family sans
9675 Right
9676 \begin_inset space ~
9677 \end_inset
9678
9679 Header
9680 \end_layout
9681
9682 \begin_layout Itemize
9683
9684 \family sans
9685 Left
9686 \begin_inset space ~
9687 \end_inset
9688
9689 Header
9690 \end_layout
9691
9692 \begin_deeper
9693 \begin_layout Standard
9694 \begin_inset space ~
9695 \end_inset
9696
9697
9698 \end_layout
9699
9700 \end_deeper
9701 \begin_layout Standard
9702 \begin_inset ERT
9703 status open
9704
9705 \begin_layout Plain Layout
9706
9707
9708 \backslash
9709 end{multicols}
9710 \end_layout
9711
9712 \end_inset
9713
9714
9715 \end_layout
9716
9717 \begin_layout Standard
9718 There are also a few commands provided by 
9719 \family sans
9720 FoilTeX
9721 \family default
9722  that aren't directly supported by LyX but I'll tell you what they do and
9723  how to use them in section
9724 \begin_inset space ~
9725 \end_inset
9726
9727
9728 \begin_inset CommandInset ref
9729 LatexCommand ref
9730 reference "sec:unsuppfoils"
9731
9732 \end_inset
9733
9734 .
9735 \end_layout
9736
9737 \begin_layout Subsection
9738 Building a Set of Foils
9739 \end_layout
9740
9741 \begin_layout Standard
9742 This section will give a simple introduction to using the different environments
9743  to build a set of foils.
9744  If you want to see an example set of foils, take a look at the 
9745 \family typewriter
9746 Foils.lyx
9747 \family default
9748  file you find in LyX's 
9749 \family typewriter
9750 examples
9751 \family default
9752  folder.
9753 \end_layout
9754
9755 \begin_layout Subsubsection
9756 Give It a Title Page
9757 \end_layout
9758
9759 \begin_layout Standard
9760 Unlike other classes that provide 
9761 \family sans
9762 Title
9763 \family default
9764
9765 \family sans
9766 Author
9767 \family default
9768
9769 \family sans
9770 Date
9771 \family default
9772  and 
9773 \family sans
9774 Abstract
9775 \family default
9776  environments, 
9777 \family sans
9778 foils
9779 \family default
9780  creates the title on a page of its own.
9781  If you leave out the 
9782 \family sans
9783 Date
9784 \family default
9785  environment LaTeX will substitute the current date (every time you regenerate
9786  the output).
9787 \end_layout
9788
9789 \begin_layout Subsubsection
9790 Start a New Foil
9791 \end_layout
9792
9793 \begin_layout Standard
9794 As I mentioned earlier, there are four ways of starting a new foil.
9795  For portrait foils you should use 
9796 \family sans
9797 Foilhead
9798 \family default
9799  or 
9800 \family sans
9801 ShortFoilhead.
9802
9803 \family default
9804  The difference between these two environments is the amount of space between
9805  the title of the foil (the foilhead) and the body of the foil.
9806 \end_layout
9807
9808 \begin_layout Standard
9809 Landscape foils are generated using the 
9810 \family sans
9811 Rotatefoilhead
9812 \family default
9813  and 
9814 \family sans
9815 ShortRotatefoilhead
9816 \family default
9817  environments.
9818  Again the only difference is the spacing between foilhead and body.
9819  Both of the short versions have 0.5 inches less separation between the foilhead
9820  and the body.
9821  
9822 \end_layout
9823
9824 \begin_layout Standard
9825 One problem with the support for landscape foils is the requirement that
9826  you have to use the 
9827 \family typewriter
9828 dvips
9829 \family default
9830  driver to generate the PostScript output otherwise the foils won't be rotated.
9831  It is possible to get landscape foils even if you haven't got the 
9832 \family typewriter
9833 dvips
9834 \family default
9835  driver provided you can feed your foils sideways through your printer ;-)
9836 \end_layout
9837
9838 \begin_layout Subsubsection
9839 Theorems, Lemmas, Proofs and more
9840 \end_layout
9841
9842 \begin_layout Standard
9843 Due to a small bug in LyX you can't have two of the same type of these environme
9844 nts directly following each other.
9845  They must be separated by something.
9846  If you try, you will just be extending the previous environment as if you
9847  had merged the two environments together.
9848  So, how do you get around this problem? The simplest option is to insert
9849  some text between the two environments or add a 
9850 \family sans
9851 LaTeX
9852 \family default
9853  environment between the two with just a 
9854 \begin_inset Quotes eld
9855 \end_inset
9856
9857
9858 \family typewriter
9859 %
9860 \family default
9861
9862 \begin_inset Quotes erd
9863 \end_inset
9864
9865  in it.
9866  This will force LyX to produce two separate environments and hence the
9867  correct LaTeX output.
9868  An example is provided in the example file included with the LyX distribution.
9869  Remember, this problem only occurs if you are trying to place two of the
9870  same type of theorem-like environments one directly after the other.
9871 \end_layout
9872
9873 \begin_layout Subsubsection
9874 Lists
9875 \end_layout
9876
9877 \begin_layout Standard
9878 You get all the commonly supported list styles found in other classes as
9879  well as two new ones.
9880  I'll only describe the new ones here.
9881  If you want to find out more about the other list environments check out
9882  the 
9883 \emph on
9884 User's Guide.
9885
9886 \emph default
9887  If you intend to use itemized lists you might also want to read about the
9888  
9889 \family sans
9890 Itemize
9891 \begin_inset space ~
9892 \end_inset
9893
9894 Bullet
9895 \begin_inset space ~
9896 \end_inset
9897
9898 Selection
9899 \family default
9900  dialog described above in section
9901 \begin_inset space ~
9902 \end_inset
9903
9904
9905 \begin_inset CommandInset ref
9906 LatexCommand ref
9907 reference "sec:bullet"
9908
9909 \end_inset
9910
9911 .
9912 \end_layout
9913
9914 \begin_layout Standard
9915 The two new list styles, 
9916 \family sans
9917 TickList
9918 \family default
9919  and 
9920 \family sans
9921 CrossList
9922 \family default
9923 , are designed to make it easier for you to create lists of do's and don'ts
9924  or right and wrong by providing dedicated environments that use a tick
9925  or a cross as the label of the list.
9926  These lists are in fact dedicated variants of the 
9927 \family sans
9928 Itemize
9929 \family default
9930  environment.
9931  They do however require that you have the 
9932 \family typewriter
9933 psnfss
9934 \family default
9935  packages installed.
9936 \end_layout
9937
9938 \begin_layout Subsubsection
9939 Figures and Tables
9940 \end_layout
9941
9942 \begin_layout Standard
9943
9944 \family sans
9945 FoilTeX
9946 \family default
9947  redefines the floating tables and figures so that they appear exactly where
9948  they are in the text rather than pushing them to the top of the page or
9949  to some user specified location.
9950  In fact if you change the float placement settings they are simply ignored.
9951 \end_layout
9952
9953 \begin_layout Subsubsection
9954 Page Headers and Footers
9955 \begin_inset CommandInset label
9956 LatexCommand label
9957 name "sec:foilfoot"
9958
9959 \end_inset
9960
9961
9962 \end_layout
9963
9964 \begin_layout Standard
9965
9966 \family sans
9967 My
9968 \begin_inset space ~
9969 \end_inset
9970
9971 Logo
9972 \family default
9973  and 
9974 \family sans
9975 Restriction
9976 \family default
9977  are two commands used to control the left-footer text string.
9978  The first is meant to allow you to include a graphic logo on your foils
9979  and defaults to 
9980 \begin_inset Quotes eld
9981 \end_inset
9982
9983 -Typeset by 
9984 \family sans
9985 FoilTeX
9986 \family default
9987 -
9988 \begin_inset Quotes erd
9989 \end_inset
9990
9991 .
9992  While the second is meant to provide a classification for the audience,
9993  
9994 \emph on
9995 e.
9996 \begin_inset space \thinspace{}
9997 \end_inset
9998
9999 g.
10000 \emph default
10001
10002 \begin_inset space \space{}
10003 \end_inset
10004
10005 Confidential.
10006  It is empty by default.
10007 \end_layout
10008
10009 \begin_layout Standard
10010 The remaining page corners can be filled by 
10011 \family sans
10012 Right
10013 \begin_inset space ~
10014 \end_inset
10015
10016 Footer
10017 \family default
10018  (which defaults to page numbers), 
10019 \family sans
10020 Right
10021 \begin_inset space ~
10022 \end_inset
10023
10024 Header
10025 \family default
10026  (top right) and 
10027 \family sans
10028 Left
10029 \begin_inset space ~
10030 \end_inset
10031
10032 Header
10033 \family default
10034  (top left).
10035 \end_layout
10036
10037 \begin_layout Subsection
10038 Unsupported 
10039 \family sans
10040 FoilTeX
10041 \family default
10042  Goodies
10043 \begin_inset CommandInset label
10044 LatexCommand label
10045 name "sec:unsuppfoils"
10046
10047 \end_inset
10048
10049
10050 \end_layout
10051
10052 \begin_layout Standard
10053 All the commands mentioned below need to be set in a 
10054 \family sans
10055 LaTeX
10056 \family default
10057  environment or as 
10058 \family sans
10059 TeX
10060 \family default
10061  within another environment.
10062 \end_layout
10063
10064 \begin_layout Subsubsection
10065 Lengths
10066 \end_layout
10067
10068 \begin_layout Standard
10069 All lengths are adjusted using the 
10070 \family typewriter
10071
10072 \backslash
10073 setlength{
10074 \family default
10075 \emph on
10076 lengthname
10077 \family typewriter
10078 \emph default
10079 }{
10080 \family default
10081 \emph on
10082 newlength
10083 \family typewriter
10084 \emph default
10085 }
10086 \family default
10087  command.
10088  Where 
10089 \emph on
10090 lengthname
10091 \emph default
10092  should be replaced by the name given to the length you want to change and
10093  
10094 \emph on
10095 newlength
10096 \emph default
10097  is the length value.
10098  All lengths should be specified in units of length such as inches (
10099 \family typewriter
10100 in
10101 \family default
10102 ), millimeters (
10103 \family typewriter
10104 mm
10105 \family default
10106 ) or points (
10107 \family typewriter
10108 pt
10109 \family default
10110 ) or relative to some document or font-based length such as 
10111 \family typewriter
10112
10113 \backslash
10114 textwidth
10115 \family default
10116 .
10117  
10118 \end_layout
10119
10120 \begin_layout Standard
10121 It's possible to change the spacing between a foilhead and the body of the
10122  foil by adjusting the length specified by 
10123 \family typewriter
10124
10125 \backslash
10126 foilheadskip
10127 \family default
10128 .
10129  For example, to make 
10130 \emph on
10131 all
10132 \emph default
10133  foilheads 0.5
10134 \begin_inset space \space{}
10135 \end_inset
10136
10137 in closer to their bodies put the following in the preamble: 
10138 \family typewriter
10139
10140 \backslash
10141 setlength{
10142 \backslash
10143 foilheadskip}{-0.5in}
10144 \end_layout
10145
10146 \begin_layout Standard
10147 The spacings around floats can be adjusted by setting these lengths:
10148 \end_layout
10149
10150 \begin_layout Labeling
10151 \labelwidthstring MMMMMMMMMMM
10152
10153 \family typewriter
10154
10155 \backslash
10156 abovefloatskip
10157 \family default
10158  Separation between the text and the top of the float
10159 \end_layout
10160
10161 \begin_layout Labeling
10162 \labelwidthstring MMMMMMMMMMM
10163
10164 \family typewriter
10165
10166 \backslash
10167 abovecaptionskip
10168 \family default
10169  Separation between the float and the caption
10170 \end_layout
10171
10172 \begin_layout Labeling
10173 \labelwidthstring MMMMMMMMMMM
10174
10175 \family typewriter
10176
10177 \backslash
10178 belowcaptionskip
10179 \family default
10180  Separation between the caption and the following text
10181 \end_layout
10182
10183 \begin_layout Labeling
10184 \labelwidthstring MMMMMMMMMMM
10185
10186 \family typewriter
10187
10188 \backslash
10189 captionwidth
10190 \family default
10191  You can make the captions narrower than the surrounding text by adjusting
10192  this length.
10193  Best done relative to 
10194 \family typewriter
10195
10196 \backslash
10197 textwidth
10198 \family default
10199 .
10200 \end_layout
10201
10202 \begin_layout Standard
10203 There are also several title page related lengths that you may find useful
10204  if you have a long title or several authors:
10205 \end_layout
10206
10207 \begin_layout Labeling
10208 \labelwidthstring MMMMMMMMMMM
10209
10210 \family typewriter
10211
10212 \backslash
10213 abovetitleskip
10214 \family default
10215  Separation from headers to 
10216 \family sans
10217 Title
10218 \end_layout
10219
10220 \begin_layout Labeling
10221 \labelwidthstring MMMMMMMMMMM
10222
10223 \family typewriter
10224
10225 \backslash
10226 titleauthorskip
10227 \family default
10228  between 
10229 \family sans
10230 Title
10231 \family default
10232  and 
10233 \family sans
10234 Author
10235 \family default
10236  environments
10237 \end_layout
10238
10239 \begin_layout Labeling
10240 \labelwidthstring MMMMMMMMMMM
10241
10242 \family typewriter
10243
10244 \backslash
10245 authorauthorskip
10246 \family default
10247  between multiple 
10248 \family sans
10249 Author
10250 \family default
10251  lines
10252 \end_layout
10253
10254 \begin_layout Labeling
10255 \labelwidthstring MMMMMMMMMMM
10256
10257 \family typewriter
10258
10259 \backslash
10260 authordateskip
10261 \family default
10262  between the 
10263 \family sans
10264 Author
10265 \family default
10266  and the 
10267 \family sans
10268 Date
10269 \end_layout
10270
10271 \begin_layout Labeling
10272 \labelwidthstring MMMMMMMMMMM
10273
10274 \family typewriter
10275
10276 \backslash
10277 dateabstractskip
10278 \family default
10279  between the 
10280 \family sans
10281 Date
10282 \family default
10283  and the 
10284 \family sans
10285 Abstract
10286 \end_layout
10287
10288 \begin_layout Standard
10289 The last length related command affects all the list environments.
10290  If you place 
10291 \family typewriter
10292
10293 \backslash
10294 zerolistvertdimens
10295 \family default
10296  
10297 \emph on
10298 inside
10299 \emph default
10300  a list environment then all the vertical spacing between the list items
10301  is removed.
10302  Note that this is a command not a length so it doesn't require 
10303 \family typewriter
10304
10305 \backslash
10306 setlength
10307 \family default
10308  like the stuff mentioned above.
10309 \end_layout
10310
10311 \begin_layout Subsubsection
10312 Headers and Footers
10313 \end_layout
10314
10315 \begin_layout Standard
10316 The 
10317 \family typewriter
10318
10319 \backslash
10320 LogoOn
10321 \family default
10322  and 
10323 \family typewriter
10324
10325 \backslash
10326 LogoOff
10327 \family default
10328  commands control whether the logo in the 
10329 \family sans
10330 MyLogo
10331 \family default
10332  definition appear on a given page.
10333  If you put 
10334 \family typewriter
10335
10336 \backslash
10337 LogoOff
10338 \family default
10339  in the preamble then none of the foils will have the logo on them.
10340  If you don't want the logo on a particular page place the 
10341 \family typewriter
10342
10343 \backslash
10344 LogoOff
10345 \family default
10346  directly after the foilhead of that page and the 
10347 \family typewriter
10348
10349 \backslash
10350 LogoOn
10351 \family default
10352  directly after the next foilhead.
10353 \end_layout
10354
10355 \begin_layout Standard
10356 If you decide to use the 
10357 \family sans
10358 fancy
10359 \family default
10360  page style setting in the 
10361 \family sans
10362 Document
10363 \begin_inset space ~
10364 \end_inset
10365
10366 Layout
10367 \family default
10368  dialog you should probably add 
10369 \family typewriter
10370
10371 \backslash
10372 let
10373 \backslash
10374 headwidth
10375 \backslash
10376 textwidth
10377 \family default
10378  to your preamble so headers and footers on landscape pages are correctly
10379  placed when rotated.
10380  This is due to some clashes between the page layouts provided by the 
10381 \family sans
10382 fancyheadings
10383 \family default
10384  package and the 
10385 \family sans
10386 foils
10387 \family default
10388  class.
10389 \end_layout
10390
10391 \begin_layout Section
10392 Hollywood (Hollywood spec scripts)
10393 \end_layout
10394
10395 \begin_layout Standard
10396 by 
10397 \shape smallcaps
10398 Garst Reese
10399 \end_layout
10400
10401 \begin_layout Subsection
10402 Introduction
10403 \end_layout
10404
10405 \begin_layout Standard
10406 Getting the format of a Hollywood script right is a 
10407 \begin_inset Quotes eld
10408 \end_inset
10409
10410 rite of passage.
10411 \begin_inset Quotes erd
10412 \end_inset
10413
10414  It is designed to make the readers focus on content and to be easy and
10415  familiar for the actors to read.
10416  Each page of a script should be one minute of film.
10417  Nothing goes in a script that you cannot see or hear on screen.
10418  The courier 12 pt font should be used throughout.
10419  No italics.
10420 \end_layout
10421
10422 \begin_layout Subsection
10423 Special problems
10424 \end_layout
10425
10426 \begin_layout Standard
10427 Speakers' lines should NEVER break in mid-sentence.
10428  If a speaker's lines continue over a page break, repeat the 
10429 \family sans
10430 Speaker
10431 \family default
10432  title followed by (Cont'd).
10433 \end_layout
10434
10435 \begin_layout Subsection
10436 Special features
10437 \end_layout
10438
10439 \begin_layout Standard
10440 Insert the 
10441 \family sans
10442 Speaker
10443 \family default
10444  names as labels then cross-reference the label to insert the name.
10445  The cross-reference dialog will show the current cast of characters.
10446  You can use this to insert the speaker name in narratives also.
10447 \end_layout
10448
10449 \begin_layout Subsection
10450 Paper size and Margins
10451 \end_layout
10452
10453 \begin_layout Standard
10454 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10455 \end_layout
10456
10457 \begin_layout Subsection
10458 Environments
10459 \end_layout
10460
10461 \begin_layout Standard
10462 The following environments are available.
10463  You can use hollywood.bind to get the bind keys shown at the right.
10464 \end_layout
10465
10466 \begin_layout Itemize
10467
10468 \family sans
10469 Standard
10470 \begin_inset Newline newline
10471 \end_inset
10472
10473
10474 \family default
10475 Used where nothing else works.
10476  Try to avoid it.
10477 \end_layout
10478
10479 \begin_layout Itemize
10480
10481 \family sans
10482 FADE_IN
10483 \family default
10484 :
10485 \begin_inset space \hfill{}
10486 \end_inset
10487
10488
10489 \family sans
10490 M-z S-I
10491 \family default
10492
10493 \begin_inset Newline newline
10494 \end_inset
10495
10496 Usually followed by something like 
10497 \begin_inset Quotes eld
10498 \end_inset
10499
10500 on Sally waking up.
10501 \begin_inset Quotes erd
10502 \end_inset
10503
10504
10505 \end_layout
10506
10507 \begin_layout Itemize
10508
10509 \family sans
10510 INT:
10511 \begin_inset space \hfill{}
10512 \end_inset
10513
10514 M-z i
10515 \begin_inset Newline newline
10516 \end_inset
10517
10518
10519 \family default
10520 Introduces a new INTERIOR camera set-up.
10521  Always followed by DAY or NIGHT, or something similar to define the lighting
10522  required.
10523  Everthing on this line in CAPS.
10524 \end_layout
10525
10526 \begin_layout Itemize
10527
10528 \family sans
10529 EXT:
10530 \begin_inset space \hfill{}
10531 \end_inset
10532
10533 M-z e
10534 \begin_inset Newline newline
10535 \end_inset
10536
10537
10538 \family default
10539 Introduces a new EXTERIOR camera set-up.
10540  Everthing on this line in CAPS.
10541 \end_layout
10542
10543 \begin_layout Itemize
10544
10545 \family sans
10546 Speaker
10547 \begin_inset space \hfill{}
10548 \end_inset
10549
10550 M-z s
10551 \begin_inset Newline newline
10552 \end_inset
10553
10554
10555 \family default
10556 The character speaking.
10557 \end_layout
10558
10559 \begin_layout Itemize
10560
10561 \family sans
10562 Parenthetical
10563 \begin_inset space \hfill{}
10564 \end_inset
10565
10566 M-z p
10567 \begin_inset Newline newline
10568 \end_inset
10569
10570
10571 \family default
10572 Instructions to the speaker.
10573  The () are automatically inserted, but only the ( will show in LyX.
10574  Both will be printed.
10575 \end_layout
10576
10577 \begin_layout Itemize
10578
10579 \family sans
10580 Dialogue
10581 \begin_inset space \hfill{}
10582 \end_inset
10583
10584 M-z d
10585 \begin_inset Newline newline
10586 \end_inset
10587
10588
10589 \family default
10590 What the 
10591 \family sans
10592 Speaker
10593 \family default
10594  says.
10595 \end_layout
10596
10597 \begin_layout Itemize
10598
10599 \family sans
10600 Transition
10601 \begin_inset space \hfill{}
10602 \end_inset
10603
10604 M-z t
10605 \begin_inset Newline newline
10606 \end_inset
10607
10608
10609 \family default
10610 Camera movement instruction.
10611  e.
10612 \begin_inset space \thinspace{}
10613 \end_inset
10614
10615 g.
10616 \begin_inset space \space{}
10617 \end_inset
10618
10619 CUT TO:
10620 \end_layout
10621
10622 \begin_layout Itemize
10623
10624 \family sans
10625 FADE OUT:
10626 \begin_inset space \hfill{}
10627 \end_inset
10628
10629 M-z S-I
10630 \end_layout
10631
10632 \begin_layout Itemize
10633
10634 \family sans
10635 Author
10636 \begin_inset space \hfill{}
10637 \end_inset
10638
10639 M-z S-A
10640 \end_layout
10641
10642 \begin_layout Itemize
10643
10644 \family sans
10645 Title
10646 \begin_inset space \hfill{}
10647 \end_inset
10648
10649 M-z S-T
10650 \end_layout
10651
10652 \begin_layout Itemize
10653
10654 \family sans
10655 Right_Address
10656 \begin_inset space \hfill{}
10657 \end_inset
10658
10659 M-z r
10660 \end_layout
10661
10662 \begin_layout Subsection
10663 Script jargon
10664 \end_layout
10665
10666 \begin_layout Itemize
10667 (O.S) â€” off screen
10668 \end_layout
10669
10670 \begin_layout Itemize
10671 (V.0) â€” voice over
10672 \end_layout
10673
10674 \begin_layout Itemize
10675 b.
10676 \begin_inset space \thinspace{}
10677 \end_inset
10678
10679 g.
10680  â€” background
10681 \end_layout
10682
10683 \begin_layout Itemize
10684 C.U.
10685  â€” close-up
10686 \end_layout
10687
10688 \begin_layout Itemize
10689 PAN â€” camera movement
10690 \end_layout
10691
10692 \begin_layout Itemize
10693 INSERT â€” cut to close-up of
10694 \end_layout
10695
10696 \begin_layout Section
10697 ijmpc and ijmpd
10698 \end_layout
10699
10700 \begin_layout Standard
10701 by 
10702 \noun on
10703 Panayotis Papasotiriou
10704 \end_layout
10705
10706 \begin_layout Subsection
10707 Overview
10708 \end_layout
10709
10710 \begin_layout Standard
10711 The ijmpc package is a set of macros that facilitates electronic manuscript
10712  submission to the 
10713 \emph on
10714 International Journal of Modern Physics C
10715 \emph default
10716 .
10717  Similarly, the ijmpd package is for creating manuscripts to be submitted
10718  to the 
10719 \emph on
10720 International Journal of Modern Physics D
10721 \emph default
10722 .
10723  Both journals are published by World Scientific.
10724  The corresponding document classes are named 
10725 \family typewriter
10726 ws-ijmpc.cls
10727 \family default
10728  and 
10729 \family typewriter
10730 ws-ijmpd.cls
10731 \family default
10732 , respectively.
10733  These files, together with instructions for the authors, can be downloaded
10734  from the sites 
10735 \begin_inset Flex URL
10736 status collapsed
10737
10738 \begin_layout Plain Layout
10739
10740 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
10741 \end_layout
10742
10743 \end_inset
10744
10745  and 
10746 \begin_inset Flex URL
10747 status collapsed
10748
10749 \begin_layout Plain Layout
10750
10751 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
10752 \end_layout
10753
10754 \end_inset
10755
10756 .
10757  Both packages are modified versions of the standard 
10758 \begin_inset Quotes eld
10759 \end_inset
10760
10761 article
10762 \begin_inset Quotes erd
10763 \end_inset
10764
10765  package, and they are almost (but not exactly) identical.
10766  Most of their features are supported by LyX.
10767  I have used LyX successfully to write articles submitted to both journals
10768  without any problem.
10769 \end_layout
10770
10771 \begin_layout Subsection
10772 Writing a paper
10773 \end_layout
10774
10775 \begin_layout Standard
10776 As usual, the easiest way to write a paper is to start with a template.
10777  Click on 
10778 \family sans
10779 File\SpecialChar \menuseparator
10780 New from
10781 \family default
10782  
10783 \family sans
10784 \bar under
10785 T
10786 \bar default
10787 emplate
10788 \family default
10789 , then choose the 
10790 \family typewriter
10791 ijmpc.lyx
10792 \family default
10793  or 
10794 \family typewriter
10795 ijmpd.lyx
10796 \family default
10797  template.
10798  This will give an (almost) empty document that includes the most common
10799  fields found in a manuscript.
10800  Simply overwrite the existing text (including the brackets, 
10801 \family typewriter
10802 <>
10803 \family default
10804 ) with your text.
10805  You should keep in mind the following remarks.
10806 \end_layout
10807
10808 \begin_layout Enumerate
10809 LyX won't let you change the font size and the page style of the document,
10810  because such modifications are not allowed by both packages.
10811 \end_layout
10812
10813 \begin_layout Enumerate
10814 The language of the document should not be changed.
10815  Before previewing your paper, be sure that the babel package is not used.
10816  To do this, click on 
10817 \family sans
10818 Tools\SpecialChar \menuseparator
10819 Preferences
10820 \family default
10821 , select the 
10822 \family sans
10823 Lang Opts
10824 \family default
10825  tab, deselect the 
10826 \family sans
10827 Use babel
10828 \family default
10829  checkbox in the language settings, and click on 
10830 \family sans
10831 Apply
10832 \family default
10833  (or 
10834 \family sans
10835 Save
10836 \family default
10837 , if you wish to make this change permanent).
10838 \end_layout
10839
10840 \begin_layout Enumerate
10841 The 
10842 \begin_inset Quotes eld
10843 \end_inset
10844
10845 Keywords
10846 \begin_inset Quotes erd
10847 \end_inset
10848
10849  style must be used to define keywords.
10850 \end_layout
10851
10852 \begin_layout Enumerate
10853 The ijmpc package provides a style named 
10854 \begin_inset Quotes eld
10855 \end_inset
10856
10857 Classification Codes
10858 \begin_inset Quotes erd
10859 \end_inset
10860
10861 , which can be used to define classification codes, such as PACS numbers.
10862  Note that this facility is not supported by the ijmpd package.
10863 \end_layout
10864
10865 \begin_layout Enumerate
10866 Several new environments are available: 
10867 \begin_inset Quotes eld
10868 \end_inset
10869
10870 Definition
10871 \begin_inset Quotes erd
10872 \end_inset
10873
10874
10875 \begin_inset Quotes eld
10876 \end_inset
10877
10878 Step
10879 \begin_inset Quotes erd
10880 \end_inset
10881
10882
10883 \begin_inset Quotes eld
10884 \end_inset
10885
10886 Example
10887 \begin_inset Quotes erd
10888 \end_inset
10889
10890
10891 \begin_inset Quotes eld
10892 \end_inset
10893
10894 Remark
10895 \begin_inset Quotes erd
10896 \end_inset
10897
10898
10899 \begin_inset Quotes eld
10900 \end_inset
10901
10902 Notation
10903 \begin_inset Quotes erd
10904 \end_inset
10905
10906
10907 \begin_inset Quotes eld
10908 \end_inset
10909
10910 Theorem
10911 \begin_inset Quotes erd
10912 \end_inset
10913
10914
10915 \begin_inset Quotes eld
10916 \end_inset
10917
10918 Proof
10919 \begin_inset Quotes erd
10920 \end_inset
10921
10922
10923 \begin_inset Quotes eld
10924 \end_inset
10925
10926 Corollary
10927 \begin_inset Quotes erd
10928 \end_inset
10929
10930
10931 \begin_inset Quotes eld
10932 \end_inset
10933
10934 Lemma
10935 \begin_inset Quotes erd
10936 \end_inset
10937
10938
10939 \begin_inset Quotes eld
10940 \end_inset
10941
10942 Proposition
10943 \begin_inset Quotes erd
10944 \end_inset
10945
10946
10947 \begin_inset Quotes eld
10948 \end_inset
10949
10950 Prop
10951 \begin_inset Quotes erd
10952 \end_inset
10953
10954
10955 \begin_inset Quotes eld
10956 \end_inset
10957
10958 Question
10959 \begin_inset Quotes erd
10960 \end_inset
10961
10962
10963 \begin_inset Quotes eld
10964 \end_inset
10965
10966 Claim
10967 \begin_inset Quotes erd
10968 \end_inset
10969
10970 , and 
10971 \begin_inset Quotes eld
10972 \end_inset
10973
10974 Conjecture
10975 \begin_inset Quotes erd
10976 \end_inset
10977
10978 .
10979  Their use is more or less obvious.
10980  LyX supports all these environments; it will use the proper label, text
10981  style, and numbering scheme for each of them.
10982 \end_layout
10983
10984 \begin_layout Enumerate
10985 Both packages use basic citations; the natbib package should not be used.
10986  In LyX, citation references are shown as usual; in the output, citations
10987  are shown as superscripts.
10988  If you want to use a citation as normal text, you should use the 
10989 \family typewriter
10990 refcite
10991 \family default
10992  command, e.
10993 \begin_inset space \thinspace{}
10994 \end_inset
10995
10996 g.
10997 \begin_inset space \space{}
10998 \end_inset
10999
11000
11001 \begin_inset Quotes eld
11002 \end_inset
11003
11004 See Ref.
11005 \begin_inset space \space{}
11006 \end_inset
11007
11008
11009 \family typewriter
11010
11011 \backslash
11012 refcite{key}
11013 \family default
11014
11015 \begin_inset Quotes erd
11016 \end_inset
11017
11018 .
11019 \end_layout
11020
11021 \begin_layout Enumerate
11022 There is no 
11023 \begin_inset Quotes eld
11024 \end_inset
11025
11026 Acknowledgments
11027 \begin_inset Quotes erd
11028 \end_inset
11029
11030  section in both packages.
11031  To put acknowledgments, just use the 
11032 \begin_inset Quotes eld
11033 \end_inset
11034
11035 Section*
11036 \begin_inset Quotes erd
11037 \end_inset
11038
11039  environment.
11040 \end_layout
11041
11042 \begin_layout Enumerate
11043 Appendices may be added to the paper, 
11044 \emph on
11045 after
11046 \emph default
11047  the Acknowledgments and 
11048 \shape italic
11049 before
11050 \shape default
11051  the References.
11052  LyX provides a special environment, called 
11053 \begin_inset Quotes eld
11054 \end_inset
11055
11056 Appendices Section
11057 \begin_inset Quotes erd
11058 \end_inset
11059
11060  which marks the beginning of the appendices.
11061  This environment should be left blank; it just sends a LaTeX command, but
11062  nothing is really printed.
11063  In LyX, the word 
11064 \begin_inset Quotes eld
11065 \end_inset
11066
11067 Appendix
11068 \begin_inset Quotes erd
11069 \end_inset
11070
11071  is printed with blue letters, as a signal that all sections after that
11072  point are appendices.
11073  To write an appendix, use the 
11074 \begin_inset Quotes eld
11075 \end_inset
11076
11077 Appendix
11078 \begin_inset Quotes erd
11079 \end_inset
11080
11081  environment.
11082  LyX will number each appendix with capital letters, as required by both
11083  journals.
11084  Note that 
11085 \begin_inset Quotes eld
11086 \end_inset
11087
11088 Appendices Section
11089 \begin_inset Quotes erd
11090 \end_inset
11091
11092  
11093 \emph on
11094 must
11095 \emph default
11096  be present before the first appendix; if not, all appendices will be numbered
11097  as normal sections in the output.
11098 \end_layout
11099
11100 \begin_layout Enumerate
11101 The ijmpc and the ijmpd packages use the 
11102 \family typewriter
11103 tbl
11104 \family default
11105  command to implement table captions.
11106  As a result, a table created by LyX is printed correctly, but its caption
11107  is ignored.
11108  However, you can use some TeX code to overpass this problem, so that captions
11109  are printed as expected.
11110  To do so, create a float table as usual, remove the caption, and replace
11111  it with the TeX code 
11112 \family typewriter
11113
11114 \backslash
11115 tbl{
11116 \emph on
11117 your table caption
11118 \emph default
11119 }{
11120 \family default
11121  (sic); you must also the TeX code 
11122 \family typewriter
11123 }
11124 \family default
11125  immediately after the tabular material.
11126  Study the example table included in the template files to see how this
11127  trick is implemented.
11128  Alternatively, If you need table captions, you should implement the whole
11129  table float in a 
11130 \family typewriter
11131 .tex
11132 \family default
11133  file, then include this file to the LyX document (
11134 \family sans
11135 Insert\SpecialChar \menuseparator
11136 File\SpecialChar \menuseparator
11137 Child
11138 \begin_inset space ~
11139 \end_inset
11140
11141 Document
11142 \family default
11143 ).
11144  Details on how to create a table float can be found in the files 
11145 \family typewriter
11146 ws-ijmpc.tex
11147 \family default
11148  and 
11149 \family typewriter
11150 ws-ijmpd.tex
11151 \family default
11152 , included in the corresponding packages.
11153 \end_layout
11154
11155 \begin_layout Subsection
11156 Preparing a paper for submission
11157 \end_layout
11158
11159 \begin_layout Standard
11160 Before you submit your paper you must export the LyX document as a LaTeX
11161  file (
11162 \family sans
11163 File\SpecialChar \menuseparator
11164 Export\SpecialChar \menuseparator
11165 LaTeX
11166 \family default
11167 )
11168 \begin_inset Foot
11169 status open
11170
11171 \begin_layout Plain Layout
11172 Actually you have the choice between LaTeX (plain) and pdflatex.
11173  If you intend to use pdflatex to prepare the paper, you should use the
11174  pdflatex option so that included graphics are converted to PDF format,
11175  ready for use by pdflatex.
11176 \end_layout
11177
11178 \end_inset
11179
11180 , then make the following changes to the resulting 
11181 \family typewriter
11182 .tex
11183 \family default
11184  file.
11185 \end_layout
11186
11187 \begin_layout Enumerate
11188 Remove the comment lines before the 
11189 \family typewriter
11190
11191 \backslash
11192 documentclass
11193 \family default
11194  command.
11195 \end_layout
11196
11197 \begin_layout Enumerate
11198 Remove everything between (and including) the 
11199 \family typewriter
11200
11201 \backslash
11202 makeatletter
11203 \family default
11204  and 
11205 \family typewriter
11206
11207 \backslash
11208 makeatother
11209 \family default
11210  commands, except for any commands you specifically put into the LaTeX preamble.
11211 \end_layout
11212
11213 \begin_layout Standard
11214 The modified 
11215 \family typewriter
11216 .tex
11217 \family default
11218  file should be saved and processed through LaTeX as many times as necessary.
11219  You may also want to check the resulting 
11220 \family typewriter
11221 .dvi
11222 \family default
11223  document.
11224 \end_layout
11225
11226 \begin_layout Subsection
11227 Use of TeX code
11228 \end_layout
11229
11230 \begin_layout Standard
11231 The use of TeX code is reduced to two commands, which must be placed at
11232  the top of the document.
11233  If you started writing your paper by using the 
11234 \family typewriter
11235 ijmpc.lyx
11236 \family default
11237  or the 
11238 \family typewriter
11239 ijmpd.lyx
11240 \family default
11241  template, the TeX code needed is already in its place; you usually don't
11242  need to delete it.
11243  You may only modify the first TeX code to specify the information printed
11244  to the top of odd and even pages (authors' names and short paper's title,
11245  respectively).
11246  This TeX code must have the form 
11247 \family typewriter
11248
11249 \backslash
11250 markboth{Authors' Names}{Short Paper's Title}
11251 \family default
11252 .
11253 \end_layout
11254
11255 \begin_layout Section
11256 iopart
11257 \end_layout
11258
11259 \begin_layout Standard
11260 by 
11261 \noun on
11262 Uwe Stöhr
11263 \end_layout
11264
11265 \begin_layout Subsection
11266 Overview
11267 \end_layout
11268
11269 \begin_layout Standard
11270 The iopart package provides a document class to create electronic manuscript
11271  submission to the journals published by the Institute of Physics.
11272  Instructions for the authors how to create a paper using the iopart class
11273  can be downloaded together with the iopart package from the site 
11274 \begin_inset Flex URL
11275 status collapsed
11276
11277 \begin_layout Plain Layout
11278
11279 ftp://ftp.iop.org/pub/journals/latex2e
11280 \end_layout
11281
11282 \end_inset
11283
11284 .
11285 \end_layout
11286
11287 \begin_layout Subsection
11288 Writing a paper
11289 \end_layout
11290
11291 \begin_layout Standard
11292 The easiest way to write a paper is to start with the file 
11293 \emph on
11294 IOP-article.lyx
11295 \emph default
11296  that is available in LyX's examples files folder.
11297  Open this file, save it under a new name, and start writing.
11298  The example file explains how to use the special text environments.
11299  Here are the most important advices:
11300 \end_layout
11301
11302 \begin_layout Itemize
11303 To be able to compile your document to a PDF, PS, or DVI, assure that the
11304  two options 
11305 \family sans
11306 Use AMS math package
11307 \family default
11308  in the document settings under 
11309 \family sans
11310 Math Options
11311 \family default
11312  are not used!
11313 \end_layout
11314
11315 \begin_layout Itemize
11316
11317 \size normal
11318 The title environment defines the kind of your paper.
11319  So use one of the following environments for the title:
11320 \end_layout
11321
11322 \begin_deeper
11323 \begin_layout Itemize
11324
11325 \family sans
11326 \size normal
11327 Title
11328 \family default
11329  for a Paper
11330 \end_layout
11331
11332 \begin_layout Itemize
11333
11334 \family sans
11335 \size normal
11336 Review
11337 \family default
11338  for a Review
11339 \end_layout
11340
11341 \begin_layout Itemize
11342
11343 \family sans
11344 \size normal
11345 Topical
11346 \family default
11347  for a Topical review
11348 \end_layout
11349
11350 \begin_layout Itemize
11351
11352 \family sans
11353 \size normal
11354 Comment
11355 \family default
11356  for a Comment
11357 \end_layout
11358
11359 \begin_layout Itemize
11360
11361 \family sans
11362 \size normal
11363 Note
11364 \family default
11365  for a Note
11366 \end_layout
11367
11368 \begin_layout Itemize
11369
11370 \family sans
11371 \size normal
11372 Paper
11373 \family default
11374  for a Paper (same as Title)
11375 \end_layout
11376
11377 \begin_layout Itemize
11378
11379 \family sans
11380 \size normal
11381 Prelim
11382 \family default
11383  for a Preliminary communication
11384 \end_layout
11385
11386 \begin_layout Itemize
11387
11388 \family sans
11389 \size normal
11390 Rapid
11391 \family default
11392  for a Rapid communication
11393 \end_layout
11394
11395 \begin_layout Itemize
11396
11397 \family sans
11398 \size normal
11399 Letter
11400 \family default
11401  for a Letter to the editor
11402 \end_layout
11403
11404 \end_deeper
11405 \begin_layout Itemize
11406
11407 \size normal
11408 All title environments except of 
11409 \family sans
11410 Letter
11411 \family default
11412  can have an optional short title.
11413 \end_layout
11414
11415 \begin_layout Itemize
11416 There is a general title environment 
11417 \family sans
11418 Article
11419 \family default
11420  which is not directly supported by the LyX.
11421  This can be used as TeX code when your document doesn't fit into one of
11422  the other title types.
11423 \end_layout
11424
11425 \begin_layout Standard
11426 For more informations like hints for special table and formula formatting,
11427  look at the IOP author guidelines.
11428 \end_layout
11429
11430 \begin_layout Section
11431 Kluwer
11432 \end_layout
11433
11434 \begin_layout Standard
11435 by 
11436 \noun on
11437 Panayotis Papasotiriou
11438 \end_layout
11439
11440 \begin_layout Subsection
11441 Overview
11442 \end_layout
11443
11444 \begin_layout Standard
11445 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
11446  that facilitates electronic manuscript submission to the journals they
11447  publish.
11448  Most known of them (at least in my domain of interest) are 
11449 \emph on
11450 Astrophysics and Space Science
11451 \emph default
11452  and 
11453 \emph on
11454 Solar Physics
11455 \emph default
11456 , but there are many others (see a complete list at 
11457 \begin_inset Flex URL
11458 status collapsed
11459
11460 \begin_layout Plain Layout
11461
11462 http://www.wkap.nl/jrnllist.htm/JRNLHOME
11463 \end_layout
11464
11465 \end_inset
11466
11467 ).
11468  The Kluwer package may be downloaded from the site 
11469 \begin_inset Flex URL
11470 status collapsed
11471
11472 \begin_layout Plain Layout
11473
11474 http://www.wkap.nl/kaphtml.htm/STYLEFILES
11475 \end_layout
11476
11477 \end_inset
11478
11479 .
11480  A complete user guide is contained in that package (but it can also be
11481  downloaded separately).
11482 \end_layout
11483
11484 \begin_layout Standard
11485 LyX supports many features of the package but not everything.
11486  However, the TeX code needed is reduced to some 
11487 \begin_inset Quotes eld
11488 \end_inset
11489
11490 peculiar
11491 \begin_inset Quotes erd
11492 \end_inset
11493
11494  commands of the package (see
11495 \begin_inset space ~
11496 \end_inset
11497
11498
11499 \begin_inset CommandInset ref
11500 LatexCommand ref
11501 reference "subsec:kluwer_peculiarities"
11502
11503 \end_inset
11504
11505 ).
11506  I have recently used LyX to write an article submitted to the 
11507 \emph on
11508 Astrophysics and Space Science
11509 \emph default
11510  without any problem.
11511 \end_layout
11512
11513 \begin_layout Subsection
11514 Writing a paper
11515 \end_layout
11516
11517 \begin_layout Standard
11518 The easiest way to write a paper is to start with the Kluwer template file.
11519  Click on 
11520 \family sans
11521 File\SpecialChar \menuseparator
11522 New from
11523 \family default
11524  
11525 \family sans
11526 Template
11527 \family default
11528 , then choose the 
11529 \family typewriter
11530 kluwer.lyx
11531 \family default
11532  template.
11533  This will give an (almost) empty document that includes the most common
11534  fields found in a manuscript and a short description of their use.
11535  As in most templates, simply overwrite the existing text (including the
11536  brackets, 
11537 \family typewriter
11538 <>
11539 \family default
11540 ) with the correct information.
11541 \end_layout
11542
11543 \begin_layout Subsection
11544 Preparing a paper for submission
11545 \end_layout
11546
11547 \begin_layout Standard
11548 As in the AASTeX package, before you submit your paper to a journal you
11549  must 
11550 \begin_inset Quotes eld
11551 \end_inset
11552
11553 postprocess
11554 \begin_inset Quotes erd
11555 \end_inset
11556
11557  it as follows.
11558 \end_layout
11559
11560 \begin_layout Enumerate
11561 Export your paper as a LaTeX file.
11562  To do this, click on 
11563 \family sans
11564 File\SpecialChar \menuseparator
11565 Export\SpecialChar \menuseparator
11566 LaTeX
11567 \family default
11568 .
11569  
11570 \end_layout
11571
11572 \begin_layout Enumerate
11573 Edit the resulting 
11574 \family typewriter
11575 .tex
11576 \family default
11577  file with a text editor and make the following changes
11578 \end_layout
11579
11580 \begin_deeper
11581 \begin_layout Enumerate
11582 remove the comment lines before the 
11583 \family typewriter
11584
11585 \backslash
11586 documentclass
11587 \family default
11588  command,
11589 \end_layout
11590
11591 \begin_layout Enumerate
11592 remove everything between (and including) the 
11593 \family typewriter
11594
11595 \backslash
11596 makeatletter
11597 \family default
11598  and 
11599 \family typewriter
11600
11601 \backslash
11602 makeatother
11603 \family default
11604  commands, except for any commands you specifically put into the LaTeX preamble.
11605 \end_layout
11606
11607 \begin_layout Standard
11608 Save the resulting 
11609 \family typewriter
11610 .tex
11611 \family default
11612  file.
11613 \end_layout
11614
11615 \end_deeper
11616 \begin_layout Enumerate
11617 Run the 
11618 \family typewriter
11619 .tex
11620 \family default
11621  file through LaTeX as many times as necessary (usually up to three).
11622 \end_layout
11623
11624 \begin_layout Enumerate
11625 View the resulting 
11626 \family typewriter
11627 .dvi
11628 \family default
11629  document using, e.
11630 \begin_inset space \thinspace{}
11631 \end_inset
11632
11633 g.
11634 \begin_inset space \space{}
11635 \end_inset
11636
11637
11638 \family sans
11639 xdvi
11640 \family default
11641 , and check if everything is OK (it should, if you didn't make any mistake).
11642 \end_layout
11643
11644 \begin_layout Subsection
11645 \begin_inset Quotes eld
11646 \end_inset
11647
11648 Peculiarities
11649 \begin_inset Quotes erd
11650 \end_inset
11651
11652  of the Kluwer package
11653 \begin_inset CommandInset label
11654 LatexCommand label
11655 name "subsec:kluwer_peculiarities"
11656
11657 \end_inset
11658
11659
11660 \end_layout
11661
11662 \begin_layout Standard
11663 The Kluwer package has the following 
11664 \begin_inset Quotes eld
11665 \end_inset
11666
11667 peculiarities
11668 \begin_inset Quotes erd
11669 \end_inset
11670
11671 .
11672 \end_layout
11673
11674 \begin_layout Enumerate
11675 It is possible to write multiple articles in the same LaTeX file
11676 \begin_inset Foot
11677 status collapsed
11678
11679 \begin_layout Plain Layout
11680 I can't imagine any good reason to do this.
11681 \end_layout
11682
11683 \end_inset
11684
11685 .
11686  Each article must be included in the environment 
11687 \begin_inset Quotes eld
11688 \end_inset
11689
11690 article
11691 \begin_inset Quotes erd
11692 \end_inset
11693
11694 .
11695  Unfortunately, this environment cannot be omitted, even if you write just
11696  one article.
11697  Therefore, each article starts with the command 
11698 \family typewriter
11699
11700 \backslash
11701 begin{article}
11702 \family default
11703  and, obviously, ends with the command 
11704 \family typewriter
11705
11706 \backslash
11707 end{article}
11708 \family default
11709 .
11710  Although this can be implemented in LyX, I didn't included it, since it
11711  looks ugly and can confuse the novice user.
11712  Therefore, you need to enter them directly and mark them as LaTeX code
11713  (the well-known 
11714 \begin_inset Quotes eld
11715 \end_inset
11716
11717 TeX code
11718 \begin_inset Quotes erd
11719 \end_inset
11720
11721 ).
11722 \end_layout
11723
11724 \begin_layout Enumerate
11725 Information given at the beginning of the article (i.
11726 \begin_inset space \thinspace{}
11727 \end_inset
11728
11729 g.
11730 \begin_inset space \space{}
11731 \end_inset
11732
11733 title, subtitle, author, institution, running title, running author, abstract
11734  and keywords) must be included in an environment called 
11735 \begin_inset Quotes eld
11736 \end_inset
11737
11738 opening
11739 \begin_inset Quotes erd
11740 \end_inset
11741
11742 .
11743  This is not implemented in LyX, so you must enter title, subtitle etc.
11744 \begin_inset space ~
11745 \end_inset
11746
11747 between two TeX code lines (
11748 \family typewriter
11749
11750 \backslash
11751 begin{opening}
11752 \family default
11753  and 
11754 \family typewriter
11755
11756 \backslash
11757 end{opening}
11758 \family default
11759 ).
11760 \end_layout
11761
11762 \begin_layout Enumerate
11763 According to the user manual, the label of each bibliography item must be
11764  written as 
11765 \family typewriter
11766
11767 \backslash
11768 protect
11769 \backslash
11770 citeauthoryear{
11771 \family default
11772 \emph on
11773 author(s)
11774 \family typewriter
11775 \emph default
11776 }{
11777 \family default
11778 \emph on
11779 year
11780 \family typewriter
11781 \emph default
11782 }
11783 \family default
11784 .
11785 \end_layout
11786
11787 \begin_layout Standard
11788 The 
11789 \family typewriter
11790 kluwer.lyx
11791 \family default
11792  template takes care of all these 
11793 \begin_inset Quotes eld
11794 \end_inset
11795
11796 peculiarities
11797 \begin_inset Quotes erd
11798 \end_inset
11799
11800 .
11801  If you start a new paper using this template you don't need to do anything
11802  special.
11803  Just 
11804 \end_layout
11805
11806 \begin_layout Enumerate
11807 don't delete the TeX code included in the template, and
11808 \end_layout
11809
11810 \begin_layout Enumerate
11811 copy the example bibliography item included in the template and modify it
11812  as necessary to enter new bibliography items.
11813 \end_layout
11814
11815 \begin_layout Section
11816 Koma-Script
11817 \end_layout
11818
11819 \begin_layout Standard
11820 by 
11821 \noun on
11822 Bernd Rellermeyer
11823 \end_layout
11824
11825 \begin_layout Subsection
11826 Overview
11827 \end_layout
11828
11829 \begin_layout Standard
11830 The LyX document classes 
11831 \emph on
11832 article (koma-script)
11833 \emph default
11834
11835 \emph on
11836 report (koma-script)
11837 \emph default
11838
11839 \emph on
11840 book
11841 \emph default
11842  
11843 \emph on
11844 (koma-script)
11845 \emph default
11846 , and 
11847 \emph on
11848 letter
11849 \emph default
11850  
11851 \emph on
11852 (koma-script)
11853 \emph default
11854  correspond to the LaTeX document classes 
11855 \family typewriter
11856 scrartcl.cls
11857 \family default
11858
11859 \family typewriter
11860 scrreprt.cls
11861 \family default
11862
11863 \family typewriter
11864 scrbook.cls
11865 \family default
11866 , and 
11867 \family typewriter
11868 scrlettr.cls
11869 \family default
11870 , resp.
11871 \begin_inset space ~
11872 \end_inset
11873
11874 of the Koma-Script family.
11875  They are replacements for the standard document classes 
11876 \family typewriter
11877 article.cls
11878 \family default
11879
11880 \family typewriter
11881 report.cls
11882 \family default
11883
11884 \family typewriter
11885 book.cls
11886 \family default
11887  and 
11888 \family typewriter
11889 letter.cls
11890 \family default
11891 , resp., and fit better to European typography conventions in a number of
11892  points.
11893 \end_layout
11894
11895 \begin_layout Itemize
11896 Standard character size is 11pt in 
11897 \emph on
11898 article (koma-script)
11899 \emph default
11900
11901 \emph on
11902 report (koma-script)
11903 \emph default
11904 , and 
11905 \emph on
11906 book (koma-script)
11907 \emph default
11908 , and 12pt in 
11909 \emph on
11910 letter (koma-script)
11911 \emph default
11912 .
11913 \end_layout
11914
11915 \begin_layout Itemize
11916 Headings, labels of the description environment, and a number of elements
11917  of the 
11918 \emph on
11919 letter (koma-script)
11920 \emph default
11921  document class are set in a bold sans serif font.
11922 \begin_inset Foot
11923 status collapsed
11924
11925 \begin_layout Plain Layout
11926 There is a big difference between the bold sans serif old cm fonts and new
11927  ec fonts, especially in the appearance of headings.
11928  In comparison, the ec bold sans serif fonts look a bit thin.
11929  Here the LaTeX package 
11930 \family typewriter
11931 cmsd.sty by
11932 \family default
11933  
11934 \shape smallcaps
11935 Walter Schmidt
11936 \shape default
11937  helps to produce the 
11938 \begin_inset Quotes eld
11939 \end_inset
11940
11941 usual
11942 \begin_inset Quotes erd
11943 \end_inset
11944
11945  appearance when using the ec fonts.
11946 \end_layout
11947
11948 \end_inset
11949
11950  The numbering of chapter headings is made in the same way as the numbering
11951  of section headings, that is without the extra line 
11952 \begin_inset Quotes eld
11953 \end_inset
11954
11955 Chapter\SpecialChar \ldots{}
11956
11957 \begin_inset Quotes erd
11958 \end_inset
11959
11960 .
11961  In addition, the appearance of the headings can be modified by using a
11962  number of options (in LyX to be entered in the field 
11963 \family sans
11964 Extra
11965 \begin_inset space ~
11966 \end_inset
11967
11968 Options
11969 \family default
11970  of the dialog 
11971 \family sans
11972 Layout\SpecialChar \menuseparator
11973 Document
11974 \family default
11975 ).
11976  A detailed German description of these options can be found in the Koma-Script
11977  documentation 
11978 \emph on
11979 scrguide
11980 \emph default
11981 .
11982 \end_layout
11983
11984 \begin_layout Itemize
11985 The main means in the Koma-Script document classes to design the type area
11986  are the options 
11987 \family sans
11988 BCOR
11989 \family default
11990  and 
11991 \family sans
11992 DIV
11993 \family default
11994  (in LyX to be entered in the extra class options field in the dialog 
11995 \family sans
11996 Document\SpecialChar \menuseparator
11997 Settings
11998 \family default
11999 ).
12000  They make a clearer modification of page margins possible as do the options
12001  of the dialog 
12002 \family sans
12003 Document\SpecialChar \menuseparator
12004 Settings
12005 \family default
12006 .
12007  A detailed German description of these and other type area options can
12008  be found in the Koma-Script documentation 
12009 \emph on
12010 scrguide
12011 \emph default
12012 .
12013 \end_layout
12014
12015 \begin_layout Itemize
12016 The LaTeX document classes of the Koma-Script family define a number of
12017  additional commands.
12018  Those part of it which makes sense in LyX is implemented in corresponding
12019  paragraph types.
12020 \end_layout
12021
12022 \begin_layout Standard
12023 A detailed German description of the LaTeX document classes of the Koma-Script
12024  family can be found in the Koma-Script documentation 
12025 \emph on
12026 scrguide
12027 \emph default
12028 .
12029 \begin_inset Foot
12030 status collapsed
12031
12032 \begin_layout Plain Layout
12033 There is an English translation 
12034 \emph on
12035 screnggu
12036 \emph default
12037 , but it is not a complete one.
12038 \end_layout
12039
12040 \end_inset
12041
12042  The following sections describe only those aspects, which are relevant
12043  in LyX.
12044 \end_layout
12045
12046 \begin_layout Subsection
12047 article (koma-script), report (koma-script), and book (koma-script)
12048 \end_layout
12049
12050 \begin_layout Standard
12051 The document classes 
12052 \emph on
12053 article (koma-script)
12054 \emph default
12055
12056 \emph on
12057 report (koma-script)
12058 \emph default
12059 , and 
12060 \emph on
12061 book
12062 \emph default
12063  
12064 \emph on
12065 (koma-script)
12066 \emph default
12067  are implemented in the layout files 
12068 \family typewriter
12069 scrartcl.layout
12070 \family default
12071
12072 \family typewriter
12073 scrreprt.layout
12074 \family default
12075 , and 
12076 \family typewriter
12077 scrbook.layout
12078 \family default
12079 , resp.
12080  They contain all the paragraph types of the corresponding standard document
12081  classes 
12082 \emph on
12083 article
12084 \emph default
12085
12086 \emph on
12087 report
12088 \emph default
12089 , and 
12090 \emph on
12091 book
12092 \emph default
12093 , resp., partly modified, with the exception of the LyX specific 
12094 \family sans
12095 List
12096 \family default
12097 -type, which is replaced by the new 
12098 \family sans
12099 Labeling
12100 \family default
12101 -type having the same functionality.
12102  Beside the 
12103 \family sans
12104 Labeling
12105 \family default
12106 -Type there is a number of new paragraph types added.
12107  They are 
12108 \emph on
12109 not
12110 \emph default
12111  part of 
12112 \emph on
12113 letter (koma-script)
12114 \emph default
12115 .
12116 \end_layout
12117
12118 \begin_layout Itemize
12119
12120 \family sans
12121 Addpart, Addchap
12122 \family default
12123
12124 \family sans
12125 Addsec
12126 \family default
12127 : are equivalents to 
12128 \family sans
12129 Part*, Chapter*
12130 \family default
12131  and 
12132 \family sans
12133 Section*
12134 \family default
12135 , resp., additionally inserting an entry in the table of contents.
12136  
12137 \family sans
12138 Addpart
12139 \family default
12140  and 
12141 \family sans
12142 Addchap
12143 \family default
12144  are not contained in 
12145 \emph on
12146 article (koma-script)
12147 \emph default
12148 .
12149 \end_layout
12150
12151 \begin_layout Itemize
12152
12153 \family sans
12154 Addchap*
12155 \family default
12156
12157 \family sans
12158 Addsec*
12159 \family default
12160 : behave exactly as 
12161 \family sans
12162 Addchap
12163 \family default
12164  and 
12165 \family sans
12166 Addsec
12167 \family default
12168 , resp., additionally clearing running heads.
12169  
12170 \family sans
12171 Addchap*
12172 \family default
12173  is not contained in 
12174 \emph on
12175 article (koma-script)
12176 \emph default
12177 .
12178 \begin_inset Foot
12179 status collapsed
12180
12181 \begin_layout Plain Layout
12182 There is also an 
12183 \family typewriter
12184
12185 \backslash
12186 addpart*
12187 \family default
12188  command in 
12189 \emph on
12190 book (koma-script)
12191 \emph default
12192  and in 
12193 \emph on
12194 report (koma-script)
12195 \emph default
12196 , but since this is identical to 
12197 \family sans
12198 Part*
12199 \family default
12200 , is has not been implemented in LyX.
12201 \end_layout
12202
12203 \end_inset
12204
12205
12206 \end_layout
12207
12208 \begin_layout Itemize
12209
12210 \family sans
12211 Minisec
12212 \family default
12213 : generates a heading directly above the following paragraph in the standard
12214  character size without affecting the structure of the document.
12215 \end_layout
12216
12217 \begin_layout Itemize
12218
12219 \family sans
12220 Captionabove
12221 \family default
12222  and 
12223 \family sans
12224 Captionbelow
12225 \family default
12226  are special captions which respect the different space settings needed
12227  for captions placed above or below an element (if you follow strict typographic
12228  rules, you might want to place table captions always above the table).
12229  You can also use the class option 
12230 \family typewriter
12231 tablecaptionsabove
12232 \family default
12233 , which will switch 
12234 \family sans
12235 caption
12236 \family default
12237  to 
12238 \family sans
12239 captionabove
12240 \family default
12241  for tables and 
12242 \family sans
12243 captionbelow
12244 \family default
12245  for figures.
12246  You need at least Koma-Script version 2.8q to use this.
12247 \end_layout
12248
12249 \begin_layout Itemize
12250
12251 \family sans
12252 Dictum
12253 \family default
12254 : can be used to set a bonmot, e.
12255 \begin_inset space \thinspace{}
12256 \end_inset
12257
12258 g.
12259 \begin_inset space \space{}
12260 \end_inset
12261
12262 at the beginning of a chapter.
12263  If you use the optional argument (
12264 \family sans
12265 Insert\SpecialChar \menuseparator
12266 Short
12267 \begin_inset space ~
12268 \end_inset
12269
12270 Title
12271 \family default
12272 ), you can insert the dictum's author there.
12273  Dictum and author are separated by a line.
12274  You need at least Koma-Script version 2.8q to use this.
12275  
12276 \family sans
12277 Dictum
12278 \family default
12279  is not contained in 
12280 \emph on
12281 article (koma-script)
12282 \emph default
12283 .
12284 \end_layout
12285
12286 \begin_layout Standard
12287 The following types, together with the standard types 
12288 \family sans
12289 Title
12290 \family default
12291
12292 \family sans
12293 Author
12294 \family default
12295 , and 
12296 \family sans
12297 Date
12298 \family default
12299 , form the title area of the document.
12300  They must be entered ahead of the first 
12301 \begin_inset Quotes eld
12302 \end_inset
12303
12304 ordinary
12305 \begin_inset Quotes erd
12306 \end_inset
12307
12308  paragraph.
12309 \begin_inset Foot
12310 status collapsed
12311
12312 \begin_layout Plain Layout
12313 The corresponding LaTeX commands must appear before the 
12314 \family typewriter
12315
12316 \backslash
12317 maketitle
12318 \family default
12319  command.
12320 \end_layout
12321
12322 \end_inset
12323
12324  When such a type is used more than once, the latter usage overwrites the
12325  former one, that means, for every type only the latest usage is valid.
12326  The order of the different types however has, like 
12327 \family sans
12328 Title
12329 \family default
12330
12331 \family sans
12332 Author
12333 \family default
12334 , and 
12335 \family sans
12336 Date
12337 \family default
12338 , no effect on the appearance of the produced document.
12339 \end_layout
12340
12341 \begin_layout Itemize
12342
12343 \family sans
12344 Subject
12345 \family default
12346 : produces a centered paragraph above the ordinary title (
12347 \family sans
12348 Title
12349 \family default
12350
12351 \family sans
12352 Author
12353 \family default
12354
12355 \family sans
12356 Date
12357 \family default
12358 ) for the subject of the document.
12359 \end_layout
12360
12361 \begin_layout Itemize
12362
12363 \family sans
12364 Publishers
12365 \family default
12366 : produces a centered paragraph below the ordinary title (
12367 \family sans
12368 Title
12369 \family default
12370
12371 \family sans
12372 Author
12373 \family default
12374
12375 \family sans
12376 Date
12377 \family default
12378 ) for the publishers' name.
12379 \end_layout
12380
12381 \begin_layout Itemize
12382
12383 \family sans
12384 Dedication
12385 \family default
12386 : in 
12387 \emph on
12388 report (koma-script)
12389 \emph default
12390  and 
12391 \emph on
12392 book (koma-script)
12393 \emph default
12394  produces a centered paragraph on its own page behind the title page, or
12395  in 
12396 \emph on
12397 article (koma-script)
12398 \emph default
12399  produces a centered paragraph below 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
12412 \family sans
12413 Publishers
12414 \family default
12415 ) for a dedication.
12416 \end_layout
12417
12418 \begin_layout Itemize
12419
12420 \family sans
12421 Titlehead
12422 \family default
12423 : produces a left aligned paragraph above the ordinary title (
12424 \family sans
12425 Title
12426 \family default
12427
12428 \family sans
12429 Author
12430 \family default
12431
12432 \family sans
12433 Date
12434 \family default
12435
12436 \family sans
12437 Subject
12438 \family default
12439 ) for a document`s head.
12440 \end_layout
12441
12442 \begin_layout Itemize
12443
12444 \family sans
12445 Uppertitleback
12446 \family default
12447 : produces in a double-sided print in 
12448 \emph on
12449 report (koma-script)
12450 \emph default
12451  and 
12452 \emph on
12453 book (koma-script)
12454 \emph default
12455  a left-aligned paragraph at the top of the title page`s back or has no
12456  effect in a single-sided print or in 
12457 \emph on
12458 article (koma-script)
12459 \emph default
12460 .
12461 \end_layout
12462
12463 \begin_layout Itemize
12464
12465 \family sans
12466 Lowertitleback
12467 \family default
12468 : produces in a double-sided print in 
12469 \emph on
12470 report (koma-script)
12471 \emph default
12472  and 
12473 \emph on
12474 book (koma-script)
12475 \emph default
12476  a left-aligned paragraph at the bottom of the title page`s back or has
12477  no effect in a single-sided print or in 
12478 \emph on
12479 article (koma-script)
12480 \emph default
12481 .
12482 \end_layout
12483
12484 \begin_layout Itemize
12485
12486 \family sans
12487 Extratitle
12488 \family default
12489 : produces a special 
12490 \begin_inset Quotes eld
12491 \end_inset
12492
12493 dirty
12494 \begin_inset Quotes erd
12495 \end_inset
12496
12497  page ahead of the actual document containing a paragraph without special
12498  formatting.
12499 \end_layout
12500
12501 \begin_layout Standard
12502 The layout files for the document classes 
12503 \emph on
12504 article (koma-script)
12505 \emph default
12506
12507 \emph on
12508 report (koma-script)
12509 \emph default
12510 , and 
12511 \emph on
12512 book (koma-script)
12513 \emph default
12514  do include the file 
12515 \family typewriter
12516 scrmacros.inc
12517 \family default
12518 .
12519  This is thought of as a place to define your own types.
12520  Copy scrmacros
12521 \family typewriter
12522 .inc
12523 \family default
12524  in your personal layout directory and edit the file!
12525 \end_layout
12526
12527 \begin_layout Subsection
12528 letter (koma-script)
12529 \end_layout
12530
12531 \begin_layout Standard
12532 \begin_inset ERT
12533 status open
12534
12535 \begin_layout Plain Layout
12536
12537
12538 \backslash
12539 begin{sloppypar}
12540 \end_layout
12541
12542 \end_inset
12543
12544
12545 \end_layout
12546
12547 \begin_layout Standard
12548 \noindent
12549 The document class 
12550 \emph on
12551 letter (koma-script)
12552 \emph default
12553  is implemented in the layout file 
12554 \family typewriter
12555 scrlettr.layout
12556 \family default
12557 .
12558  It contains all the paragraph types of the corresponding standard document
12559  class 
12560 \emph on
12561 letter
12562 \emph default
12563 , partly modified, with the exception of the LyX specific types 
12564 \family sans
12565 LyX-Code
12566 \family default
12567  and 
12568 \family sans
12569 Comment
12570 \family default
12571  and the 
12572 \family sans
12573 List
12574 \family default
12575  type, which is replaced by the new 
12576 \family sans
12577 Labeling
12578 \family default
12579  type.
12580  In addition, it contains, in contrast to the standard document class, the
12581  standard types 
12582 \family sans
12583 LaTeX
12584 \family default
12585
12586 \family sans
12587 Quotation
12588 \family default
12589
12590 \family sans
12591 Quote
12592 \family default
12593 , and 
12594 \family sans
12595 Verse
12596 \family default
12597 .
12598  Furthermore, there are a number of new letter specific types.
12599 \end_layout
12600
12601 \begin_layout Standard
12602 \begin_inset ERT
12603 status open
12604
12605 \begin_layout Plain Layout
12606
12607
12608 \backslash
12609 end{sloppypar}
12610 \end_layout
12611
12612 \end_inset
12613
12614
12615 \end_layout
12616
12617 \begin_layout Standard
12618 The appearance of the letter produced by this document class can be controlled
12619  by a number of LaTeX commands, which you can put in the LaTeX preamble.
12620 \begin_inset Foot
12621 status collapsed
12622
12623 \begin_layout Plain Layout
12624 For example, the standard appearance of the letter`s heading, consisting
12625  of name and address, is quite self-willed.
12626  An 
12627 \begin_inset Quotes eld
12628 \end_inset
12629
12630 ordinary
12631 \begin_inset Quotes erd
12632 \end_inset
12633
12634  heading is produced by the following LaTeX commands in the preamble:
12635 \end_layout
12636
12637 \begin_layout LyX-Code
12638
12639 \backslash
12640 firsthead{
12641 \backslash
12642 parbox[b]{
12643 \backslash
12644 textwidth}
12645 \end_layout
12646
12647 \begin_layout LyX-Code
12648   {
12649 \backslash
12650 ignorespaces 
12651 \backslash
12652 fromname
12653 \backslash
12654
12655 \backslash
12656  
12657 \backslash
12658 ignorespaces 
12659 \backslash
12660 fromaddress}} 
12661 \end_layout
12662
12663 \begin_layout LyX-Code
12664
12665 \backslash
12666 nexthead{
12667 \backslash
12668 parbox[b]{
12669 \backslash
12670 textwidth}
12671 \end_layout
12672
12673 \begin_layout LyX-Code
12674   {
12675 \backslash
12676 ignorespaces 
12677 \backslash
12678 fromname 
12679 \backslash
12680 hfill 
12681 \backslash
12682 ignorespaces 
12683 \backslash
12684 pagename
12685 \backslash
12686  
12687 \backslash
12688 thepage}}
12689 \end_layout
12690
12691 \end_inset
12692
12693  A detailed German description of such LaTeX commands can be found in the
12694  Koma-Script documentation 
12695 \emph on
12696 scrguide
12697 \emph default
12698 .
12699  With it, the letter's author can produce his personal letter layout.
12700 \end_layout
12701
12702 \begin_layout Standard
12703 The types 
12704 \family sans
12705 Letter
12706 \family default
12707  and 
12708 \family sans
12709 Opening
12710 \family default
12711  define the beginning of the letter and must be used in every letter.
12712  To emphasize them in the LyX document class, they are marked with the letter
12713  
12714 \shape italic
12715 L
12716 \shape default
12717  or 
12718 \shape italic
12719 O
12720 \shape default
12721 , resp.
12722 \begin_inset space ~
12723 \end_inset
12724
12725 in the left margin.
12726  It is possible to write any number of letters in one file.
12727  An 
12728 \family sans
12729 Opening
12730 \family default
12731  type produces a new letter using the same addressee and a 
12732 \family sans
12733 Letter
12734 \family default
12735  type produces a new addressee.
12736  The types 
12737 \family sans
12738 Closing
12739 \family default
12740
12741 \family sans
12742 PS
12743 \family default
12744
12745 \family sans
12746 CC
12747 \family default
12748 , and 
12749 \family sans
12750 Encl
12751 \family default
12752  are ordinary paragraph types and can also be used several times in one
12753  and the same letter.
12754 \end_layout
12755
12756 \begin_layout Itemize
12757
12758 \family sans
12759 Letter
12760 \family default
12761 : produces a paragraph for the addressee and implicitly defines the beginning
12762  of the letter.
12763 \end_layout
12764
12765 \begin_layout Itemize
12766
12767 \family sans
12768 Opening
12769 \family default
12770 : produces a paragraph for the form of address and implicitly produces a
12771  new letter.
12772 \end_layout
12773
12774 \begin_layout Itemize
12775
12776 \family sans
12777 Closing
12778 \family default
12779 : produces a paragraph for a close.
12780 \end_layout
12781
12782 \begin_layout Itemize
12783
12784 \family sans
12785 PS
12786 \family default
12787 : produces a paragraph for a postscript.
12788 \end_layout
12789
12790 \begin_layout Itemize
12791
12792 \family sans
12793 CC
12794 \family default
12795 : produces a paragraph for a distribution list.
12796 \end_layout
12797
12798 \begin_layout Itemize
12799
12800 \family sans
12801 Encl
12802 \family default
12803 : produces a paragraph for enclosures.
12804 \end_layout
12805
12806 \begin_layout Standard
12807 The types 
12808 \family sans
12809 Name
12810 \family default
12811
12812 \family sans
12813 Signature
12814 \family default
12815
12816 \family sans
12817 Address
12818 \family default
12819
12820 \family sans
12821 Telephone
12822 \family default
12823
12824 \family sans
12825 Place
12826 \family default
12827
12828 \family sans
12829 Backaddress
12830 \family default
12831
12832 \family sans
12833 Specialmail
12834 \family default
12835
12836 \family sans
12837 Location
12838 \family default
12839
12840 \family sans
12841 Title
12842 \family default
12843 , and 
12844 \family sans
12845 Subject
12846 \family default
12847  are input types provided with a label to enter information, which will
12848  be processed by the document class.
12849 \begin_inset Foot
12850 status open
12851
12852 \begin_layout Plain Layout
12853 It could be seen as a matter of inconsequence, that the types 
12854 \family sans
12855 Letter
12856 \family default
12857  and 
12858 \family sans
12859 Opening
12860 \family default
12861  described above are not such input types as well.
12862  Because of the special meaning of those types, however, I have implemented
12863  them as ordinary paragraph types with a one letter mark in the left margin.
12864  Moreover, it would affect my feeling of symmetry, if the 
12865 \family sans
12866 Opening
12867 \family default
12868  type and the 
12869 \family sans
12870 Closing
12871 \family default
12872  type had such a serious different appearance.
12873 \end_layout
12874
12875 \end_inset
12876
12877  The types must be used ahead of the corresponding 
12878 \family sans
12879 Opening
12880 \family default
12881  type.
12882 \end_layout
12883
12884 \begin_layout Standard
12885 An implementation of these types in a WYSIWYG fashion does not seem to make
12886  sense, because the real appearance of the produced letter does not only
12887  depend on the usage of the particular type, but also on other factors.
12888  For example, a signature entered in the 
12889 \family sans
12890 Signature
12891 \family default
12892  type will in the standard behavior appear in the produced letter only,
12893  when in the same letter also a 
12894 \family sans
12895 Closing
12896 \family default
12897  type is used.
12898  The entered value of the 
12899 \family sans
12900 Telephone
12901 \family default
12902  type will in the standard behavior not appear in the produced letter at
12903  all.
12904  The possibility to design the letter`s heading freely is already indicated
12905  in a footnote above.
12906 \end_layout
12907
12908 \begin_layout Standard
12909 The input types can also be used as empty paragraphs.
12910  This makes sense e.
12911 \begin_inset space \thinspace{}
12912 \end_inset
12913
12914 g.
12915 \begin_inset space \space{}
12916 \end_inset
12917
12918 for the 
12919 \family sans
12920 Signature
12921 \family default
12922  type.
12923  If the 
12924 \family sans
12925 Signature
12926 \family default
12927  type is not used at all, in the standard behavior the value of the 
12928 \family sans
12929 Name
12930 \family default
12931  type is used as signature, whereas if an empty 
12932 \family sans
12933 Signature
12934 \family default
12935  type is used, no signature value is defined.
12936 \end_layout
12937
12938 \begin_layout Standard
12939 By using the input types it is possible to write a letter template, containing
12940  filled input types with your personal dates (name, address, etc.) and empty
12941  input types for other dates you want to enter.
12942 \end_layout
12943
12944 \begin_layout Itemize
12945
12946 \family sans
12947 Name
12948 \family default
12949 : sender's name, in the standard behavior appears as a centered paragraph
12950  in small caps in the letter`s heading.
12951 \end_layout
12952
12953 \begin_layout Itemize
12954
12955 \family sans
12956 Signature
12957 \family default
12958 : sender's signature, in the standard behavior appears below the 
12959 \family sans
12960 Closing
12961 \family default
12962  type.
12963  If no 
12964 \family sans
12965 Signature
12966 \family default
12967  type is used, the value of the 
12968 \family sans
12969 Name
12970 \family default
12971  type appears instead.
12972 \end_layout
12973
12974 \begin_layout Itemize
12975
12976 \family sans
12977 Address
12978 \family default
12979 : sender's address, in the standard behavior appears in a centered paragraph
12980  in the letter`s heading below the sender's name.
12981 \end_layout
12982
12983 \begin_layout Itemize
12984
12985 \family sans
12986 Telephone
12987 \family default
12988 : sender's telephone number, in the standard behavior only sets the LaTeX
12989  variable 
12990 \family typewriter
12991
12992 \backslash
12993 telephonenum
12994 \family default
12995 .
12996 \end_layout
12997
12998 \begin_layout Itemize
12999
13000 \family sans
13001 Place
13002 \family default
13003 : place of the letter`s making.
13004 \end_layout
13005
13006 \begin_layout Itemize
13007
13008 \family sans
13009 Date
13010 \family default
13011 : date of the letter`s making.
13012  
13013 \family sans
13014 Place
13015 \family default
13016  and 
13017 \family sans
13018 Date
13019 \family default
13020 , in the standard behavior, produce the place and the date in a right-aligned
13021  line below the addressee's field.
13022  If an empty 
13023 \family sans
13024 Date
13025 \family default
13026  type is used, neither place nor date appear, independent of the value of
13027  the 
13028 \family sans
13029 Place
13030 \family default
13031  type.
13032  If no 
13033 \family sans
13034 Date
13035 \family default
13036  type is used, the date of the letter `s production is used.
13037 \end_layout
13038
13039 \begin_layout Itemize
13040
13041 \family sans
13042 Backaddress
13043 \family default
13044 : sender`s back address, in the standard behavior appears above the addressee's
13045  field in a small sans serif font.
13046 \end_layout
13047
13048 \begin_layout Itemize
13049
13050 \family sans
13051 Specialmail
13052 \family default
13053 : special mail information, in the standard behavior appears underlined
13054  above the addressee's field below the back address.
13055 \end_layout
13056
13057 \begin_layout Itemize
13058
13059 \family sans
13060 Location
13061 \family default
13062 : additional information, in the standard behavior appears on right side
13063  below the addressee`s field.
13064 \end_layout
13065
13066 \begin_layout Itemize
13067
13068 \family sans
13069 Title
13070 \family default
13071 : the letter's title, in the standard behavior appears in a big, bold, sans
13072  serif font above the subject.
13073 \end_layout
13074
13075 \begin_layout Itemize
13076
13077 \family sans
13078 Subject
13079 \family default
13080 : the letter's subject, in the standard behavior appears in a bold font
13081  above the 
13082 \family sans
13083 Opening
13084 \family default
13085  paragraph.
13086 \end_layout
13087
13088 \begin_layout Standard
13089 The types 
13090 \family sans
13091 Yourref
13092 \family default
13093
13094 \family sans
13095 Yourmail
13096 \family default
13097
13098 \family sans
13099 Myref
13100 \family default
13101
13102 \family sans
13103 Customer
13104 \family default
13105 , and 
13106 \family sans
13107 Invoice
13108 \family default
13109  produce a business letter like line above the 
13110 \family sans
13111 Title
13112 \family default
13113  line containing the fields 
13114 \begin_inset Quotes eld
13115 \end_inset
13116
13117 Your ref.
13118 \begin_inset Quotes erd
13119 \end_inset
13120
13121
13122 \begin_inset Quotes eld
13123 \end_inset
13124
13125 Your letter of
13126 \begin_inset Quotes erd
13127 \end_inset
13128
13129
13130 \begin_inset Quotes eld
13131 \end_inset
13132
13133 Our ref.
13134 \begin_inset Quotes erd
13135 \end_inset
13136
13137
13138 \begin_inset Quotes eld
13139 \end_inset
13140
13141 Customer no.
13142 \begin_inset Quotes erd
13143 \end_inset
13144
13145
13146 \begin_inset Quotes eld
13147 \end_inset
13148
13149 Invoice no.
13150 \begin_inset Quotes erd
13151 \end_inset
13152
13153 , and 
13154 \begin_inset Quotes eld
13155 \end_inset
13156
13157 Date
13158 \begin_inset Quotes erd
13159 \end_inset
13160
13161 .
13162  For the date field, the value of the 
13163 \family sans
13164 Date
13165 \family default
13166  type is used.
13167  If one of these 
13168 \begin_inset Quotes eld
13169 \end_inset
13170
13171 business letter types
13172 \begin_inset Quotes erd
13173 \end_inset
13174
13175  is used, the value of the 
13176 \family sans
13177 Place
13178 \family default
13179  type however does not appear, but only the LaTeX variable 
13180 \family typewriter
13181
13182 \backslash
13183 fromplace
13184 \family default
13185  is set.
13186  The ordinary output of place and date in a right-aligned line below the
13187  addressee`s field is suppressed.
13188  The types are implemented as input types provided with a label and must
13189  be used ahead of the corresponding 
13190 \family sans
13191 Opening
13192 \family default
13193  type.
13194 \end_layout
13195
13196 \begin_layout Itemize
13197
13198 \family sans
13199 Yourref
13200 \family default
13201 : Your ref.
13202 \end_layout
13203
13204 \begin_layout Itemize
13205
13206 \family sans
13207 Yourmail
13208 \family default
13209 : Your letter of.
13210 \end_layout
13211
13212 \begin_layout Itemize
13213
13214 \family sans
13215 Myref
13216 \family default
13217 : Our ref.
13218 \end_layout
13219
13220 \begin_layout Itemize
13221
13222 \family sans
13223 Customer
13224 \family default
13225 : Customer no.
13226 \end_layout
13227
13228 \begin_layout Itemize
13229
13230 \family sans
13231 Invoice
13232 \family default
13233 : Invoice no.
13234 \end_layout
13235
13236 \begin_layout Subsection
13237 The new letter class: letter (koma-script v.2)
13238 \end_layout
13239
13240 \begin_layout Standard
13241 by 
13242 \noun on
13243 Jürgen Spitzmüller
13244 \end_layout
13245
13246 \begin_layout Standard
13247 \begin_inset VSpace medskip
13248 \end_inset
13249
13250
13251 \end_layout
13252
13253 \begin_layout Standard
13254 \noindent
13255 Koma-Script version 2.8 has introduced a new letter class 
13256 \family typewriter
13257 scrlttr2
13258 \family default
13259  which supersedes the now unsupported 
13260 \family typewriter
13261 scrlettr
13262 \family default
13263 .
13264  It has â€” on the LaTeX side â€” a completely new interface and is not compatible
13265  with the old class.
13266  Therefore, LyX supports both, though it is recommended to use the new class.
13267 \end_layout
13268
13269 \begin_layout Standard
13270 This class covers the same functionality as 
13271 \emph on
13272 letter (koma-script),
13273 \emph default
13274  and a few more.
13275  The basic items are 
13276 \family sans
13277 Address
13278 \family default
13279  (receiver's address, same as 
13280 \family sans
13281 Letter
13282 \family default
13283  in the old layout), 
13284 \family sans
13285 Opening
13286 \family default
13287 , and 
13288 \family sans
13289 Closing
13290 \family default
13291 .
13292  
13293 \family sans
13294 NextAddress
13295 \family default
13296  will start a new letter (i.
13297 \begin_inset space \thinspace{}
13298 \end_inset
13299
13300 g.
13301 \begin_inset space \space{}
13302 \end_inset
13303
13304 you can write several letters per document).
13305  New elements are sender's 
13306 \family sans
13307 E-Mail
13308 \family default
13309
13310 \family sans
13311 URL
13312 \family default
13313
13314 \family sans
13315 Fax
13316 \family default
13317
13318 \family sans
13319 Bank
13320 \family default
13321  and the possibility to use a 
13322 \family sans
13323 Logo
13324 \family default
13325  (via 
13326 \family sans
13327 Insert\SpecialChar \menuseparator
13328 Graphics
13329 \family default
13330 ) in the header.
13331 \end_layout
13332
13333 \begin_layout Standard
13334 The biggest improvement is, though, that the letter's layout is configurable
13335  at almost any needs.
13336  This can be done via the preamble or with a special style file (Letter
13337  Class Option, extension 
13338 \family typewriter
13339 *.lco
13340 \family default
13341 ), that will be read in as a class option.
13342 \begin_inset Foot
13343 status collapsed
13344
13345 \begin_layout Plain Layout
13346 The KOMA package comes with some default 
13347 \family typewriter
13348 *.lco
13349 \family default
13350  files.
13351  There is, for instance, a 
13352 \family typewriter
13353 DIN.lco
13354 \family default
13355  file that follows german typesetting rules, or a 
13356 \family typewriter
13357 KOMAold.lco
13358 \family default
13359  that provides the default layout of the old 
13360 \family typewriter
13361 scrlettr
13362 \family default
13363  class.
13364  The latter can be loaded with the class option 
13365 \family typewriter
13366 KOMAold
13367 \family default
13368 , inserted via the 
13369 \family sans
13370 \bar under
13371 L
13372 \bar default
13373 ayout\SpecialChar \menuseparator
13374
13375 \bar under
13376 D
13377 \bar default
13378 ocument\SpecialChar \menuseparator
13379 Extra Options
13380 \family default
13381  field.
13382 \end_layout
13383
13384 \end_inset
13385
13386  Have a look at the 
13387 \emph on
13388 koma-letter2
13389 \emph default
13390  template that is included in LyX for examples.
13391  A detailed description is to be found in the Koma-Script documentation
13392  (
13393 \emph on
13394 scrguide
13395 \emph default
13396 ).
13397 \end_layout
13398
13399 \begin_layout Subsection
13400 Problems
13401 \end_layout
13402
13403 \begin_layout Standard
13404 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
13405  some problems.
13406 \end_layout
13407
13408 \begin_layout Itemize
13409 The chapter number of a 
13410 \family sans
13411 Chapter
13412 \family default
13413  type appears on a line of its own above the chapter heading instead of
13414  appearing in the same line ahead of it.
13415  The cause for that is the LyX internal behavior for the labeltype 
13416 \family sans
13417 Counter_Chapter
13418 \family default
13419  in the layout file.
13420 \end_layout
13421
13422 \begin_layout Itemize
13423 The headings of the types 
13424 \family sans
13425 Addchap
13426 \family default
13427  and 
13428 \family sans
13429 Addsec
13430 \family default
13431  are only put in the 
13432 \begin_inset Quotes eld
13433 \end_inset
13434
13435 true
13436 \begin_inset Quotes erd
13437 \end_inset
13438
13439  LaTeX table of contents, but not in the LyX table of contents (
13440 \family sans
13441 Document\SpecialChar \menuseparator
13442 Table
13443 \begin_inset space ~
13444 \end_inset
13445
13446 of
13447 \begin_inset space ~
13448 \end_inset
13449
13450 Contents
13451 \family default
13452 ).
13453 \end_layout
13454
13455 \begin_layout Itemize
13456 The paragraphs in a 
13457 \emph on
13458 letter
13459 \emph default
13460  document class appear in a skip separation mode, not indented.
13461  This is the standard behavior, no special LaTeX commands are needed for
13462  that.
13463  But in the 
13464 \family sans
13465 Document\SpecialChar \menuseparator
13466 Settings
13467 \family default
13468  dialog the corresponding radio button indicates 
13469 \family sans
13470 Indent
13471 \family default
13472 .
13473  A 
13474 \family sans
13475 Skip
13476 \family default
13477  value always has the effect that extra LaTeX commands are inserted in the
13478  document to produce the gap, which is not what is wanted in this case.
13479 \end_layout
13480
13481 \begin_layout Section
13482 Latex8 (IEEE Conference Papers)
13483 \end_layout
13484
13485 \begin_layout Standard
13486 by 
13487 \noun on
13488 Allan Rae
13489 \end_layout
13490
13491 \begin_layout Subsection
13492 Introduction
13493 \end_layout
13494
13495 \begin_layout Standard
13496 Since this class is specifically for writing submissions to IEEE sponsored
13497  conferences I strongly recommend that you get a copy of their Authors Kit.
13498  The 
13499 \family sans
13500 latex.sty
13501 \family default
13502  package and associated bibliography style file is included in the kit.
13503  The Authors Kit is usually sent out by email once your initial submission
13504  has been accepted.
13505  There is a lot of useful information in the Authors Kit explaining formatting
13506  restrictions and so on and I will assume you have read this since that
13507  means I don't have to repeat it all here.
13508 \end_layout
13509
13510 \begin_layout Subsection
13511 Getting Started
13512 \end_layout
13513
13514 \begin_layout Standard
13515 [AR\SpecialChar \@.
13516  more to come]
13517 \end_layout
13518
13519 \begin_layout Subsection
13520 Supported Environments
13521 \end_layout
13522
13523 \begin_layout Itemize
13524
13525 \family sans
13526 Standard
13527 \end_layout
13528
13529 \begin_layout Itemize
13530
13531 \family sans
13532 Title
13533 \end_layout
13534
13535 \begin_layout Itemize
13536
13537 \family sans
13538 Author
13539 \end_layout
13540
13541 \begin_layout Itemize
13542
13543 \family sans
13544 E-mail
13545 \end_layout
13546
13547 \begin_layout Itemize
13548
13549 \family sans
13550 Affiliation
13551 \end_layout
13552
13553 \begin_layout Itemize
13554
13555 \family sans
13556 Abstract
13557 \end_layout
13558
13559 \begin_layout Itemize
13560
13561 \family sans
13562 Section
13563 \end_layout
13564
13565 \begin_layout Itemize
13566
13567 \family sans
13568 SubSection
13569 \end_layout
13570
13571 \begin_layout Itemize
13572
13573 \family sans
13574 Caption
13575 \end_layout
13576
13577 \begin_layout Subsection
13578 Differences Between Screen and Paper
13579 \end_layout
13580
13581 \begin_layout Standard
13582 There are slight differences in appearance mainly with the presentation
13583  of section counters.
13584  On screen the trailing period of the section counter is missing but it
13585  will appear in the output so don't let this worry you.
13586 \end_layout
13587
13588 \begin_layout Section
13589 Memoir
13590 \end_layout
13591
13592 \begin_layout Standard
13593 By 
13594 \noun on
13595 Jürgen Spitzmüller
13596 \end_layout
13597
13598 \begin_layout Subsection
13599 Overview
13600 \end_layout
13601
13602 \begin_layout Standard
13603 Memoir is a very powerful and constantly evolving class.
13604  It has been designed with regard to fictional and non-fictional literature.
13605  Its aim is to let the user have maximum control over the typesetting of
13606  his document.
13607  Memoir is based on the standard book class, but it can also emulate the
13608  article class (see below).
13609 \end_layout
13610
13611 \begin_layout Standard
13612 Peter Wilson, the developer of Memoir, is known as the author of lots of
13613  useful packages in the LaTeX world.
13614  Most of them have been merged with Memoir.
13615  Therefore, it is much easier to layout the table of contents, appendices,
13616  chapter designs and such.
13617  LyX, though, does not support all of these goodies natively.
13618  Some of them might be added to forthcoming releases
13619 \begin_inset Foot
13620 status collapsed
13621
13622 \begin_layout Plain Layout
13623 You are invited to send suggestions to 
13624 \begin_inset Flex URL
13625 status collapsed
13626
13627 \begin_layout Plain Layout
13628
13629 lyx-devel@lists.lyx.org
13630 \end_layout
13631
13632 \end_inset
13633
13634 .
13635 \end_layout
13636
13637 \end_inset
13638
13639 , lots will probably never, due to the limitations of LyX's framework.
13640  Of course you can still use all features with the help of some native LaTeX
13641  commands (TeX code
13642 \begin_inset Foot
13643 status collapsed
13644
13645 \begin_layout Plain Layout
13646 Cf.
13647 \begin_inset ERT
13648 status collapsed
13649
13650 \begin_layout Plain Layout
13651
13652
13653 \backslash
13654  
13655 \end_layout
13656
13657 \end_inset
13658
13659 section
13660 \begin_inset space ~
13661 \end_inset
13662
13663
13664 \begin_inset CommandInset ref
13665 LatexCommand ref
13666 reference "sec:Inserting-TeX-Code"
13667
13668 \end_inset
13669
13670  for details.
13671 \end_layout
13672
13673 \end_inset
13674
13675 ).
13676  In this section, we can only list those features which are natively supported
13677  by LyX.
13678  For detailed descriptions (and for the rest of features) we are recommending
13679  to have a look at the detailed manual of the Memoir class
13680 \begin_inset Foot
13681 status collapsed
13682
13683 \begin_layout Plain Layout
13684 Cf.
13685 \begin_inset ERT
13686 status collapsed
13687
13688 \begin_layout Plain Layout
13689
13690
13691 \backslash
13692  
13693 \end_layout
13694
13695 \end_inset
13696
13697
13698 \begin_inset Flex URL
13699 status collapsed
13700
13701 \begin_layout Plain Layout
13702
13703 CTAN:/macros/latex/memoir/memman.pdf
13704 \end_layout
13705
13706 \end_inset
13707
13708 .
13709 \end_layout
13710
13711 \end_inset
13712
13713 , which is not only a user guide for the class, but also both a comprehensive
13714  description on good typesetting and a superb example for good typesetting
13715  itself.
13716 \end_layout
13717
13718 \begin_layout Subsection
13719 Basic features and restrictions
13720 \end_layout
13721
13722 \begin_layout Standard
13723 Memoir supports basically all features of the standard book classes.
13724  There are, however, some differences, as follows:
13725 \end_layout
13726
13727 \begin_layout Description
13728 Font
13729 \begin_inset space ~
13730 \end_inset
13731
13732 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
13733 \end_layout
13734
13735 \begin_layout Description
13736 Page
13737 \begin_inset space ~
13738 \end_inset
13739
13740 style: The fancy page style is not supported, due to a command clash between
13741  Memoir and the fancyhdr package (they are both defining a command with
13742  the same name, which confuses LaTeX).
13743  Instead, Memoir comes with a bunch of own page styles (see 
13744 \family sans
13745 Layout\SpecialChar \menuseparator
13746 Document\SpecialChar \menuseparator
13747 Page
13748 \begin_inset space ~
13749 \end_inset
13750
13751 Style
13752 \family default
13753 ).
13754  If you want to use these for the chapter pages, you have to use the command
13755  
13756 \family typewriter
13757
13758 \backslash
13759 chapterstyle
13760 \family default
13761  in the main text or in preamble (e.
13762 \begin_inset space \thinspace{}
13763 \end_inset
13764
13765 g.
13766 \begin_inset space \space{}
13767 \end_inset
13768
13769
13770 \family typewriter
13771
13772 \backslash
13773 chapterstyle{companion}
13774 \family default
13775 ).
13776 \end_layout
13777
13778 \begin_layout Description
13779 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
13780  an optional argument in the standard classes.
13781  With this, you can specify an alternative version of the title for the
13782  table of contents and the headers (for instance, if the title is too long).
13783  In LyX, you can do this via 
13784 \family sans
13785 Insert\SpecialChar \menuseparator
13786 Short
13787 \begin_inset space ~
13788 \end_inset
13789
13790 Title
13791 \family default
13792  at the beginning of a chapter/section.
13793  Memoir features a second optional argument and thus separates the table
13794  of contents from the header.
13795  You can define three variants of a title with this: one for the main text,
13796  one for the table of contents, and one for the headers.
13797  Simply insert two optional arguments if you need this feature, the first
13798  one containing the short title for the Table of Contents, the second one
13799  containing an alternative short title for the headers.
13800 \end_layout
13801
13802 \begin_layout Description
13803 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
13804  of contents, the list of figures and the list of table start a new page
13805  automatically.
13806  Memoir does not follow this route.
13807  You have to insert a page break yourself, if you want to have one.
13808 \end_layout
13809
13810 \begin_layout Description
13811 Titlepage: For some unknown reason, Memoir uses pagination on the title
13812  page (in the standard classes, title pages are 
13813 \begin_inset Quotes eld
13814 \end_inset
13815
13816 empty
13817 \begin_inset Quotes erd
13818 \end_inset
13819
13820 , i.
13821 \begin_inset space \thinspace{}
13822 \end_inset
13823
13824 g.
13825 \begin_inset space \space{}
13826 \end_inset
13827
13828 without pagina).
13829  If you want an empty title page, type 
13830 \family typewriter
13831
13832 \backslash
13833 aliaspagestyle{title}{empty}
13834 \family default
13835  in the preamble.
13836 \end_layout
13837
13838 \begin_layout Description
13839 Article: With the class option 
13840 \emph on
13841 article
13842 \emph default
13843  (to be inserted in 
13844 \family sans
13845 Layout\SpecialChar \menuseparator
13846 Document\SpecialChar \menuseparator
13847 Extra
13848 \begin_inset space ~
13849 \end_inset
13850
13851 Options
13852 \family default
13853 ), you can emulate article style.
13854  That is, counters (footnotes, figures, tables etc.) will not be reset on
13855  new chapters, chapters don't start a new page (but are—in contrary to 
13856 \begin_inset Quotes eld
13857 \end_inset
13858
13859 real
13860 \begin_inset Quotes erd
13861 \end_inset
13862
13863  article classes—still allowed), parts, though, use their own page, as in
13864  book.
13865 \end_layout
13866
13867 \begin_layout Description
13868 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
13869  font commands, which have been used in the old LaTeX version 2.09 (e.
13870 \begin_inset space \thinspace{}
13871 \end_inset
13872
13873 g.
13874 \begin_inset space \space{}
13875 \end_inset
13876
13877
13878 \family typewriter
13879
13880 \backslash
13881 rm
13882 \family default
13883
13884 \family typewriter
13885
13886 \backslash
13887 it
13888 \family default
13889 ).
13890  It produces an error and stops LaTeX whenever such a command appears.
13891  The class option 
13892 \emph on
13893 oldfontcommands
13894 \emph default
13895  reallows the commands and spits out warnings instead (which does at least
13896  not stop LaTeX).
13897  Since a lot of packages and particularly BibTeX style files are still using
13898  those commands, we have decided to use this option by default.
13899 \end_layout
13900
13901 \begin_layout Subsection
13902 Extra features
13903 \end_layout
13904
13905 \begin_layout Standard
13906 We will only describe the features supported by LyX (which is not much currently
13907 ).
13908  Please consult the Memoir manual
13909 \begin_inset Foot
13910 status collapsed
13911
13912 \begin_layout Plain Layout
13913 Cf.
13914 \begin_inset ERT
13915 status collapsed
13916
13917 \begin_layout Plain Layout
13918
13919
13920 \backslash
13921  
13922 \end_layout
13923
13924 \end_inset
13925
13926
13927 \begin_inset Flex URL
13928 status collapsed
13929
13930 \begin_layout Plain Layout
13931
13932 CTAN:/macros/latex/memoir/memman.pdf
13933 \end_layout
13934
13935 \end_inset
13936
13937 .
13938 \end_layout
13939
13940 \end_inset
13941
13942  for details.
13943 \end_layout
13944
13945 \begin_layout Description
13946 Abstract: You may wonder why an abstract is an extra feature.
13947  Well, it is in book class.
13948  Usually books don't have abstracts.
13949  Memoir, however, has.
13950  You can use it wherever and how often you like.
13951 \end_layout
13952
13953 \begin_layout Description
13954 Chapterprecis: You may know this from belletristic: The contents of a chapter
13955  is shortly described below the title and also in the table of contents
13956  (e.
13957 \begin_inset space \thinspace{}
13958 \end_inset
13959
13960 g.
13961 \begin_inset space \space{}
13962 \end_inset
13963
13964
13965 \emph on
13966 Our hero arrives in Troia; he loses some friends; he finds others
13967 \emph default
13968 ).
13969  Chapterprecis does exactly this.
13970  It is therefore only sensible below a chapter.
13971 \end_layout
13972
13973 \begin_layout Description
13974 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
13975  The epigraph environment provides an elegant way of typesetting such a
13976  motto.
13977  The motto itself (text) and its author (source) are divided by a short
13978  line.
13979  Unfortunately, we have to fool LyX a bit here again, since the environment
13980  needs two arguments (text and source).
13981  In this case, we have to use curly brackets (in TeX mode) between the two
13982  arguments: 
13983 \emph on
13984 <smart slogan>
13985 \emph default
13986  
13987 \family typewriter
13988 }{
13989 \family default
13990  
13991 \emph on
13992 <author of the slogan>.
13993 \end_layout
13994
13995 \begin_layout Description
13996 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
13997  complex figurative poems).
13998  LyX can only support a few of them.
13999  One is poemtitle, which is a centered title for poems, which will also
14000  be added to the table of contents (verse is the standard environment for
14001  poems.
14002  Memoir has some enhanced versions of verse, but you need to use TeX code,
14003  because they have to be nested inside regular verse environments, which
14004  is not possible with LyX).
14005 \end_layout
14006
14007 \begin_layout Description
14008 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14009 \end_layout
14010
14011 \begin_layout Section
14012 Article (mwart), book (mwbk) and report (mwrep)
14013 \begin_inset OptArg
14014 status collapsed
14015
14016 \begin_layout Plain Layout
14017 The 
14018 \family typewriter
14019 mw
14020 \family default
14021  Classes
14022 \end_layout
14023
14024 \end_inset
14025
14026
14027 \end_layout
14028
14029 \begin_layout Standard
14030 by 
14031 \noun on
14032 Tomasz Luczak
14033 \end_layout
14034
14035 \begin_layout Standard
14036 The LyX document classes 
14037 \emph on
14038 article (mwart)
14039 \emph default
14040
14041 \emph on
14042 report (mwrep)
14043 \emph default
14044  and 
14045 \emph on
14046 book
14047 \emph default
14048  
14049 \emph on
14050 (mwbk)
14051 \emph default
14052  correspond to the LaTeX document classes 
14053 \family typewriter
14054 mwart.cls
14055 \family default
14056
14057 \family typewriter
14058 mwrep.cls
14059 \family default
14060  and 
14061 \family typewriter
14062 mwbk.cls
14063 \family default
14064 , resp.
14065  They are replacements for the standard document classes 
14066 \family typewriter
14067 article.cls
14068 \family default
14069
14070 \family typewriter
14071 report.cls
14072 \family default
14073  and 
14074 \family typewriter
14075 book.cls
14076 \family default
14077 , resp., and fit better to Polish typography conventions in a number of points.
14078  
14079 \end_layout
14080
14081 \begin_layout Standard
14082 Basic differences:
14083 \end_layout
14084
14085 \begin_layout Itemize
14086 Unnumbered titles (with star, e.
14087 \begin_inset space \thinspace{}
14088 \end_inset
14089
14090 g.
14091 \begin_inset space \space{}
14092 \end_inset
14093
14094
14095 \family sans
14096 Section*
14097 \family default
14098 ) are added into table of contents,
14099 \end_layout
14100
14101 \begin_layout Itemize
14102 Additional page styles:
14103 \end_layout
14104
14105 \begin_deeper
14106 \begin_layout Description
14107 uheadings header with separated lines,
14108 \end_layout
14109
14110 \begin_layout Description
14111 myheadings custom header, contents headers via commands: 
14112 \family typewriter
14113
14114 \backslash
14115 markright
14116 \family default
14117  and 
14118 \family typewriter
14119
14120 \backslash
14121 markboth
14122 \family default
14123 ,
14124 \end_layout
14125
14126 \begin_layout Description
14127 myuheadings custom header with separated lines,
14128 \end_layout
14129
14130 \begin_layout Description
14131 outer page number is placed on outer side of page
14132 \end_layout
14133
14134 \end_deeper
14135 \begin_layout Itemize
14136 Options 
14137 \end_layout
14138
14139 \begin_deeper
14140 \begin_layout Description
14141 rmheadings serif titles â€” default,
14142 \end_layout
14143
14144 \begin_layout Description
14145 sfheadings sansserif titles,
14146 \end_layout
14147
14148 \begin_layout Description
14149 authortitle on title page first placed is author next title â€” default,
14150 \end_layout
14151
14152 \begin_layout Description
14153 titleauthor on title page first placed is title next author,
14154 \end_layout
14155
14156 \begin_layout Description
14157 withmarginpar reserve place on page for margins.
14158 \end_layout
14159
14160 \end_deeper
14161 \begin_layout Section
14162 Paper
14163 \end_layout
14164
14165 \begin_layout Standard
14166 The document class 
14167 \family sans
14168 paper
14169 \family default
14170  provides an alternative to the standard 
14171 \family sans
14172 article
14173 \family default
14174  class.
14175  It provides similar functionality, but you might prefer this layout with
14176  sans serif sections, headings, and more.
14177 \end_layout
14178
14179 \begin_layout Section
14180 RevTeX4
14181 \end_layout
14182
14183 \begin_layout Standard
14184 by 
14185 \noun on
14186 Amir Karger
14187 \end_layout
14188
14189 \begin_layout Standard
14190 \begin_inset VSpace bigskip
14191 \end_inset
14192
14193
14194 \end_layout
14195
14196 \begin_layout Standard
14197 \noindent
14198 The 
14199 \family sans
14200 Revtex
14201 \begin_inset space ~
14202 \end_inset
14203
14204 4
14205 \family default
14206  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
14207 \begin_inset Formula $\beta$
14208 \end_inset
14209
14210  release of May, 1999) class.
14211 \end_layout
14212
14213 \begin_layout Standard
14214 LyX has a 
14215 \family sans
14216 Revtex
14217 \family default
14218  textclass, which works with RevTeX 3.1.
14219  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14220  That means that it doesn't interact very well with LyX, which requires
14221  LaTeX2e, although it has been kludged to work.
14222  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14223  LyX with the 
14224 \family sans
14225 RevTeX
14226 \begin_inset space ~
14227 \end_inset
14228
14229 4
14230 \family default
14231  textclass should also be pretty easy to use.
14232 \end_layout
14233
14234 \begin_layout Standard
14235 These documents are supposed to be used in 
14236 \emph on
14237 addition
14238 \emph default
14239  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14240  macros, and assume you'll know what to put in the preamble if necessary.
14241 \end_layout
14242
14243 \begin_layout Subsection
14244 Installation
14245 \end_layout
14246
14247 \begin_layout Standard
14248 All you need to do is install RevTeX 4, as described in the package's README
14249  file.
14250  The package can be found at The RevTeX 4 Web Site 
14251 \begin_inset Flex URL
14252 status collapsed
14253
14254 \begin_layout Plain Layout
14255
14256 http://publish.aps.org/revtex4/
14257 \end_layout
14258
14259 \end_inset
14260
14261 .
14262  Install it somewhere that LaTeX can see it.
14263  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14264  (i.
14265 \begin_inset space \thinspace{}
14266 \end_inset
14267
14268 g.
14269 \begin_inset space \space{}
14270 \end_inset
14271
14272 not the directory where you installed the class file.) Then, if you reconfigure
14273  LyX, it will find the class file and let you use the RevTeX4 textclass.
14274 \end_layout
14275
14276 \begin_layout Standard
14277 Probably the easiest way to get started is either to import a RevTeX 4 document
14278  using 
14279 \family typewriter
14280 tex2lyx
14281 \family default
14282 , or to use the 
14283 \family sans
14284 Revtex
14285 \begin_inset space ~
14286 \end_inset
14287
14288 4
14289 \family default
14290  template, found in the templates directory.
14291 \end_layout
14292
14293 \begin_layout Subsection
14294 Preamble Matter
14295 \end_layout
14296
14297 \begin_layout Standard
14298 Optional arguments to 
14299 \family typewriter
14300
14301 \backslash
14302 documentclass
14303 \family default
14304 , like 
14305 \begin_inset Quotes eld
14306 \end_inset
14307
14308 preprint
14309 \begin_inset Quotes erd
14310 \end_inset
14311
14312  and 
14313 \begin_inset Quotes eld
14314 \end_inset
14315
14316 aps
14317 \begin_inset Quotes erd
14318 \end_inset
14319
14320 , go in the 
14321 \family sans
14322 E
14323 \bar under
14324 x
14325 \bar default
14326 tra
14327 \begin_inset space ~
14328 \end_inset
14329
14330 Options
14331 \family default
14332  field in the 
14333 \family sans
14334 Document
14335 \begin_inset space ~
14336 \end_inset
14337
14338 Layout
14339 \family default
14340  dialog, as usual.
14341  Remember that in RevTeX, at least one optional argument is required! 
14342 \end_layout
14343
14344 \begin_layout Standard
14345 Other preamble matter, like 
14346 \family typewriter
14347
14348 \backslash
14349 draft
14350 \family default
14351  etc.
14352 \begin_inset space ~
14353 \end_inset
14354
14355 goes in the 
14356 \family sans
14357 LaTeX
14358 \begin_inset space ~
14359 \end_inset
14360
14361 Preamble
14362 \family default
14363  dialog, also as usual.
14364 \end_layout
14365
14366 \begin_layout Subsection
14367 Layouts
14368 \end_layout
14369
14370 \begin_layout Standard
14371 The layouts basically correspond to the commands in RevTeX4.0.
14372  For example, the Email layout corresponds to 
14373 \family typewriter
14374
14375 \backslash
14376 email{}
14377 \family default
14378 .
14379  Note that (at least as of RevTeX 4.0 Beta), the 
14380 \family sans
14381 Address
14382 \family default
14383  and 
14384 \family sans
14385 Affiliation
14386 \family default
14387  layouts are exactly equivalent, so you shouldn't need to use both.
14388 \begin_inset Foot
14389 status collapsed
14390
14391 \begin_layout Plain Layout
14392 In case you're curious, both were included so that 
14393 \family typewriter
14394 tex2lyx
14395 \family default
14396  would be able to translate both 
14397 \family typewriter
14398
14399 \backslash
14400 address
14401 \family default
14402  and 
14403 \family typewriter
14404
14405 \backslash
14406 affiliation
14407 \family default
14408 .
14409 \end_layout
14410
14411 \end_inset
14412
14413
14414 \end_layout
14415
14416 \begin_layout Subsection
14417 Important Notes
14418 \end_layout
14419
14420 \begin_layout Standard
14421 There are a couple of important unique aspects of RevTeX 4 which might cause
14422  bugs that will be even more confusing in LyX.
14423 \end_layout
14424
14425 \begin_layout Standard
14426 In RevTeX, the 
14427 \family typewriter
14428
14429 \backslash
14430 thanks
14431 \family default
14432  command goes 
14433 \emph on
14434 outside
14435 \emph default
14436  the 
14437 \family typewriter
14438
14439 \backslash
14440 author
14441 \family default
14442  command.
14443  The LyX equivalent is that there is a separate Thanks layout.
14444  Do 
14445 \emph on
14446 not
14447 \emph default
14448  write footnotes in the 
14449 \family sans
14450 Author
14451 \family default
14452  layout, or weird things may happen.
14453  See the RevTeX 4 documentation for more details.
14454 \end_layout
14455
14456 \begin_layout Standard
14457 Also, the 
14458 \family sans
14459 Author
14460 \begin_inset space ~
14461 \end_inset
14462
14463 Email
14464 \family default
14465
14466 \family sans
14467 Author
14468 \begin_inset space ~
14469 \end_inset
14470
14471 URL
14472 \family default
14473 , and 
14474 \family sans
14475 Thanks
14476 \family default
14477  layouts must be placed 
14478 \emph on
14479 in between
14480 \emph default
14481  the 
14482 \family sans
14483 Author
14484 \family default
14485  layout and the corresponding 
14486 \family sans
14487 Address
14488 \family default
14489  (or equivalent 
14490 \family sans
14491 Affiliation
14492 \family default
14493 ) layout.
14494  If you put the 
14495 \family sans
14496 Thanks
14497 \family default
14498  after the 
14499 \family sans
14500 Address
14501 \family default
14502 , the LaTeX won't compile.
14503 \end_layout
14504
14505 \begin_layout Subsection
14506 Drawbacks
14507 \end_layout
14508
14509 \begin_layout Standard
14510 The main problem with this layout is that you can't use the optional arguments
14511  to layouts like Email and Title.
14512  (The problem is not unique to this layout; you can't use optional arguments
14513  to the Section layouts either.) This means that after you export that file
14514  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
14515  need to edit the LaTeX file with a text editor to add the optional arguments
14516  to set, e.
14517 \begin_inset space \thinspace{}
14518 \end_inset
14519
14520 g.
14521 \begin_inset space \space{}
14522 \end_inset
14523
14524 the running title for the page headers.
14525  Lacking these layouts makes the 
14526 \family typewriter
14527
14528 \backslash
14529 altaffiliation
14530 \family default
14531  (and the equivalent 
14532 \family typewriter
14533
14534 \backslash
14535 altaddress
14536 \family default
14537 ) useless, so the corresponding layouts don't exist, and will have to be
14538  added by hand.
14539 \begin_inset Foot
14540 status collapsed
14541
14542 \begin_layout Plain Layout
14543
14544 \emph on
14545 Note from JMarc:
14546 \emph default
14547  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
14548  has not been updated yet to take advantage of it.
14549 \end_layout
14550
14551 \end_inset
14552
14553  
14554 \end_layout
14555
14556 \begin_layout Section
14557 Springer Journals (
14558 \family sans
14559 svjour
14560 \family default
14561 )
14562 \end_layout
14563
14564 \begin_layout Standard
14565 by 
14566 \noun on
14567 Martin Vermeer
14568 \end_layout
14569
14570 \begin_layout Subsection
14571 Description
14572 \end_layout
14573
14574 \begin_layout Standard
14575 These are the layout files for some of the journal formats used by Springer
14576  Verlag and listed on 
14577 \begin_inset Flex URL
14578 status collapsed
14579
14580 \begin_layout Plain Layout
14581
14582 http://www.springer.de/author/tex/help-journals.html
14583 \end_layout
14584
14585 \end_inset
14586
14587 , where you should also go to fetch the class files (yes, these are LaTeX2e
14588  now!).
14589  It is a modular system: the things common to all journals are implemented
14590  in 
14591 \family typewriter
14592 svjour.inc
14593 \family default
14594 , which journal-specific layout files (such as, e.
14595 \begin_inset space \thinspace{}
14596 \end_inset
14597
14598 g.
14599 \begin_inset space \space{}
14600 \end_inset
14601
14602
14603 \family typewriter
14604 svjog.layout
14605 \family default
14606  for Journal of Geodesy) can include.
14607 \end_layout
14608
14609 \begin_layout Standard
14610 This means that implementing support for any other Springer journal on this
14611  list is as simple as writing your own 
14612 \family typewriter
14613 sv
14614 \family default
14615 <myjournal>
14616 \family typewriter
14617 .layout
14618 \family default
14619  file following the outline given in 
14620 \family typewriter
14621 svjog.layout
14622 \family default
14623 .
14624  
14625 \end_layout
14626
14627 \begin_layout Standard
14628 It is reasonably well tested only for the Journal of Geodesy.
14629  
14630 \family typewriter
14631 svjour
14632 \family default
14633  and 
14634 \family typewriter
14635 svjog
14636 \family default
14637  come with the standard LyX distribution.
14638  Install the relevant class file (downloaded from Springer) in a proper
14639  directory, reconfigure LaTeX (in the teTeX case by running 
14640 \family typewriter
14641 texhash
14642 \family default
14643 , as root if necessary â€” doesn't LyX take care of this?), reconfigure LyX
14644  and it should work.
14645 \end_layout
14646
14647 \begin_layout Subsection
14648 New styles
14649 \end_layout
14650
14651 \begin_layout Standard
14652 A large number of theorem-like styles â€” 
14653 \family sans
14654 Claim, Conjecture,
14655 \family default
14656  
14657 \family sans
14658 \SpecialChar \ldots{}
14659 Theorem
14660 \family default
14661 .
14662 \end_layout
14663
14664 \begin_layout Standard
14665
14666 \family sans
14667 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
14668  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
14669 \family default
14670 .
14671  See the Springer class file documentation for details.
14672 \end_layout
14673
14674 \begin_layout Subsection
14675 Supported journals
14676 \end_layout
14677
14678 \begin_layout Itemize
14679
14680 \emph on
14681 Journal of Geodesy
14682 \emph default
14683
14684 \family typewriter
14685 svjog.layout
14686 \family default
14687  â€” Martin Vermeer
14688 \end_layout
14689
14690 \begin_layout Itemize
14691
14692 \emph on
14693 Probability Theory and Related Fields
14694 \emph default
14695
14696 \family typewriter
14697 svprobth.layout
14698 \family default
14699  â€” Jean-Marc Lasgouttes
14700 \end_layout
14701
14702 \begin_layout Standard
14703 Add your own, it isn't so hard!
14704 \end_layout
14705
14706 \begin_layout Subsection
14707 Credits
14708 \end_layout
14709
14710 \begin_layout Standard
14711 These files are partly based on the older 
14712 \family typewriter
14713 ejour2.layout
14714 \family default
14715 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
14716  file from Springer.
14717  All this, and the 
14718 \family typewriter
14719 ejour2
14720 \family default
14721  layout, are now defunct.
14722  Jean-Marc Lasgouttes helped out big in making me find my way around the
14723  LyX layout file mechanism.
14724 \end_layout
14725
14726 \begin_layout Subsection
14727 Bugs
14728 \end_layout
14729
14730 \begin_layout Standard
14731 Probably.
14732  But probably less than in the old hacked-LaTeX 
14733 \family typewriter
14734 ejour2
14735 \family default
14736 .
14737 \end_layout
14738
14739 \begin_layout Standard
14740 Limitations e.
14741 \begin_inset space \thinspace{}
14742 \end_inset
14743
14744 g.: does not display the number for theorem-like layouts, just #.
14745 \end_layout
14746
14747 \begin_layout Section
14748 Slides [aka 
14749 \noun on
14750 SliTeX
14751 \noun default
14752 ]
14753 \begin_inset CommandInset label
14754 LatexCommand label
14755 name "sec:slitex"
14756
14757 \end_inset
14758
14759
14760 \end_layout
14761
14762 \begin_layout Standard
14763 by 
14764 \noun on
14765 John Weiss
14766 \noun default
14767  
14768 \end_layout
14769
14770 \begin_layout Subsection
14771 Introduction
14772 \end_layout
14773
14774 \begin_layout Standard
14775 This section describes how to use LyX to make slides for overhead projectors.
14776  There are two document classes that can do this: the default slides class
14777  and the 
14778 \family sans
14779 FoilTeX
14780 \family default
14781  slides class.
14782  This section documents the former.
14783 \end_layout
14784
14785 \begin_layout Standard
14786 I'm going to say this again, nice and clear, so that there's no misunderstanding
14787 :
14788 \end_layout
14789
14790 \begin_layout Standard
14791 \begin_inset VSpace bigskip
14792 \end_inset
14793
14794
14795 \end_layout
14796
14797 \begin_layout Standard
14798 \align center
14799
14800 \size large
14801 This section documents the class 
14802 \begin_inset Quotes eld
14803 \end_inset
14804
14805
14806 \family sans
14807 slides (default)
14808 \family default
14809
14810 \begin_inset Quotes erd
14811 \end_inset
14812
14813  
14814 \emph on
14815 only.
14816 \end_layout
14817
14818 \begin_layout Standard
14819 \begin_inset VSpace bigskip
14820 \end_inset
14821
14822
14823 \end_layout
14824
14825 \begin_layout Standard
14826 If you're looking for the documentation for 
14827 \begin_inset Quotes eld
14828 \end_inset
14829
14830
14831 \family sans
14832 slides (FoilTeX)
14833 \family default
14834
14835 \begin_inset Quotes erd
14836 \end_inset
14837
14838 , check out section
14839 \begin_inset space ~
14840 \end_inset
14841
14842
14843 \begin_inset CommandInset ref
14844 LatexCommand ref
14845 reference "sec:foiltex"
14846
14847 \end_inset
14848
14849 .
14850  The 
14851 \family sans
14852 foils
14853 \family default
14854  class [
14855 \begin_inset Quotes eld
14856 \end_inset
14857
14858
14859 \family sans
14860 slides (FoilTeX)
14861 \family default
14862
14863 \begin_inset Quotes erd
14864 \end_inset
14865
14866 ] is actually somewhat better than the default 
14867 \family sans
14868 slides
14869 \family default
14870  class,
14871 \begin_inset Foot
14872 status collapsed
14873
14874 \begin_layout Plain Layout
14875 \SpecialChar \ldots{}
14876 or so I've been told repeatedly by its advocates.
14877  Having never used it, I have no idea if this claim is true or not.
14878 \end_layout
14879
14880 \end_inset
14881
14882  which this section documents.
14883 \end_layout
14884
14885 \begin_layout Standard
14886 This class is the LaTeX2e improvement of the old 
14887 \noun on
14888 SliTeX
14889 \noun default
14890  package.
14891  Every LaTeX2e distribution includes this class [which I'll just refer to
14892  as 
14893 \begin_inset Quotes eld
14894 \end_inset
14895
14896
14897 \family sans
14898 slides
14899 \family default
14900
14901 \begin_inset Quotes erd
14902 \end_inset
14903
14904  from now on], so you're bound to have it.
14905  As I noted earlier, there are other classes, such as 
14906 \family sans
14907 foils
14908 \family default
14909 , which also produce slides for overhead projectors and do a better job
14910  at it.
14911  However, there are some things which 
14912 \family sans
14913 slides
14914 \family default
14915  can do which the others can't, such as generate overlays.
14916  Read on to learn more!
14917 \end_layout
14918
14919 \begin_layout Subsection
14920 Getting Started
14921 \begin_inset CommandInset label
14922 LatexCommand label
14923 name "sec:slidesetup"
14924
14925 \end_inset
14926
14927
14928 \end_layout
14929
14930 \begin_layout Standard
14931 Obviously, to use this document class, you need to select 
14932 \begin_inset Quotes eld
14933 \end_inset
14934
14935
14936 \family sans
14937 slides (default)
14938 \family default
14939
14940 \begin_inset Quotes erd
14941 \end_inset
14942
14943  from the class list in the 
14944 \family sans
14945 Document\SpecialChar \menuseparator
14946 Settings
14947 \family default
14948  dialog.
14949  There are some other special things you should know about this class:
14950 \end_layout
14951
14952 \begin_layout Itemize
14953 Don't bother changing the options 
14954 \family sans
14955 Sides and Columns
14956 \family default
14957 .
14958  They're not supported by the 
14959 \family sans
14960 slides
14961 \family default
14962  class, anyways.
14963 \end_layout
14964
14965 \begin_layout Itemize
14966 The option 
14967 \family sans
14968 Page
14969 \begin_inset space ~
14970 \end_inset
14971
14972 style
14973 \family default
14974  behaves a bit differently for this class.
14975  The possible choices and what they do are as follows:
14976 \end_layout
14977
14978 \begin_deeper
14979 \begin_layout Description
14980
14981 \family sans
14982 plain
14983 \family default
14984  The final output contains page numbers in the lower right corner.
14985 \end_layout
14986
14987 \begin_layout Description
14988
14989 \family sans
14990 headings
14991 \family default
14992  Like 
14993 \family sans
14994 plain
14995 \family default
14996 , but also prints out any time markers you've put in.
14997  This is the default.
14998 \end_layout
14999
15000 \begin_layout Description
15001
15002 \family sans
15003 empty
15004 \family default
15005  The final output contains no page numbers, time markers, or alignment markers.
15006 \end_layout
15007
15008 \end_deeper
15009 \begin_layout Itemize
15010 The 
15011 \family sans
15012 slides
15013 \family default
15014  class has an extra option: 
15015 \family typewriter
15016 clock
15017 \family default
15018 .
15019  To use it, put 
15020 \begin_inset Quotes eld
15021 \end_inset
15022
15023
15024 \family typewriter
15025 clock
15026 \family default
15027
15028 \begin_inset Quotes erd
15029 \end_inset
15030
15031  in the extra class options.
15032 \end_layout
15033
15034 \begin_deeper
15035 \begin_layout Standard
15036 Using this options allows you to add time markers to 
15037 \family sans
15038 Note
15039 \family default
15040 s.
15041  See section
15042 \begin_inset space ~
15043 \end_inset
15044
15045
15046 \begin_inset CommandInset ref
15047 LatexCommand ref
15048 reference "sec:slideNote"
15049
15050 \end_inset
15051
15052  for more details.
15053 \end_layout
15054
15055 \end_deeper
15056 \begin_layout Standard
15057 You can also use the template file 
15058 \begin_inset Quotes eld
15059 \end_inset
15060
15061
15062 \family typewriter
15063 slides.lyx
15064 \family default
15065
15066 \begin_inset Quotes erd
15067 \end_inset
15068
15069  to automatically set up a document to use the 
15070 \family sans
15071 slides
15072 \family default
15073  class [using 
15074 \family sans
15075 File\SpecialChar \menuseparator
15076 New
15077 \begin_inset space ~
15078 \end_inset
15079
15080 from
15081 \begin_inset space ~
15082 \end_inset
15083
15084 Template
15085 \family default
15086  to open your new document].
15087  The template file also contains some examples of the special paragraph
15088  environments used by this class.
15089  I'll describe those next.
15090 \end_layout
15091
15092 \begin_layout Subsection
15093 Paragraph Environments
15094 \end_layout
15095
15096 \begin_layout Subsubsection
15097 Supported Environments
15098 \end_layout
15099
15100 \begin_layout Standard
15101 The first thing you'll notice when you start up a new 
15102 \family sans
15103 slides
15104 \family default
15105  document is the font size and type: it's the equivalent of the size 
15106 \begin_inset Quotes eld
15107 \end_inset
15108
15109
15110 \family sans
15111 Largest
15112 \family default
15113
15114 \begin_inset Quotes erd
15115 \end_inset
15116
15117  in the 
15118 \family sans
15119 Sans
15120 \begin_inset space ~
15121 \end_inset
15122
15123 Serif
15124 \family default
15125  font.
15126  This is also what's used in the output.
15127  Think of this as a 
15128 \begin_inset Quotes eld
15129 \end_inset
15130
15131 visual cue
15132 \begin_inset Quotes erd
15133 \end_inset
15134
15135  to remind you that this is a slide.
15136  Your final slides will use a larger font; ergo, you'll have less space.
15137  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15138 \end_layout
15139
15140 \begin_layout Standard
15141 The next thing that becomes obvious is the changes to the paragraph environment
15142  pull-down box [at the far-left end of the toolbar].
15143  Most of the paragraph environments you're used to seeing are missing.
15144  There are also five new ones.
15145  That's because the 
15146 \family sans
15147 slides
15148 \family default
15149  class itself only supports certain paragraph environments:
15150 \end_layout
15151
15152 \begin_layout Itemize
15153
15154 \family sans
15155 Standard
15156 \end_layout
15157
15158 \begin_layout Itemize
15159
15160 \family sans
15161 Itemize
15162 \end_layout
15163
15164 \begin_layout Itemize
15165
15166 \family sans
15167 Enumerate
15168 \end_layout
15169
15170 \begin_layout Itemize
15171
15172 \family sans
15173 Description
15174 \end_layout
15175
15176 \begin_layout Itemize
15177
15178 \family sans
15179 List
15180 \end_layout
15181
15182 \begin_layout Itemize
15183
15184 \family sans
15185 Quotation
15186 \end_layout
15187
15188 \begin_layout Itemize
15189
15190 \family sans
15191 Quote
15192 \end_layout
15193
15194 \begin_layout Itemize
15195
15196 \family sans
15197 Verse
15198 \end_layout
15199
15200 \begin_layout Itemize
15201
15202 \family sans
15203 Caption
15204 \end_layout
15205
15206 \begin_layout Itemize
15207
15208 \family sans
15209 LyX-Code
15210 \end_layout
15211
15212 \begin_layout Itemize
15213
15214 \family sans
15215 Comment
15216 \end_layout
15217
15218 \begin_layout Standard
15219 All of the other standard environments, including the section-heading environmen
15220 ts, aren't used in the 
15221 \family sans
15222 slides
15223 \family default
15224  class.
15225 \end_layout
15226
15227 \begin_layout Standard
15228 On the other hand, you'll notice the following new environments:
15229 \end_layout
15230
15231 \begin_layout Itemize
15232
15233 \family sans
15234 Slide
15235 \end_layout
15236
15237 \begin_layout Itemize
15238
15239 \family sans
15240 Overlay
15241 \end_layout
15242
15243 \begin_layout Itemize
15244
15245 \family sans
15246 Note
15247 \end_layout
15248
15249 \begin_layout Itemize
15250
15251 \family sans
15252 InvisibleText
15253 \end_layout
15254
15255 \begin_layout Itemize
15256
15257 \family sans
15258 VisibleText
15259 \end_layout
15260
15261 \begin_layout Standard
15262 These five are kind of quirky, due to a 
15263 \begin_inset Quotes eld
15264 \end_inset
15265
15266 feature
15267 \begin_inset Quotes erd
15268 \end_inset
15269
15270  in LyX.
15271  You see, LyX doesn't permit you to nest any other paragraph environment
15272  into an empty environment.
15273  Now, that's fine and dandy, but it means that you wouldn't be able to start
15274  a slide with anything except plain text.
15275  To deal with this, I've performed a little 
15276 \begin_inset Quotes eld
15277 \end_inset
15278
15279 LaTeX magic.
15280 \begin_inset Quotes erd
15281 \end_inset
15282
15283  
15284 \end_layout
15285
15286 \begin_layout Subsubsection
15287 Quirks of the New Environments
15288 \begin_inset CommandInset label
15289 LatexCommand label
15290 name "sec:slideQuirk"
15291
15292 \end_inset
15293
15294
15295 \end_layout
15296
15297 \begin_layout Standard
15298 All five of the new paragraph environments are somewhat quirky due to inherent
15299  limitiations in the current version of LyX.
15300  As I just mentioned, LyX forbids environments that begin with another environme
15301 nt.
15302  To get around this, the 
15303 \family sans
15304 Slide
15305 \family default
15306  environment isn't a paragraph environment as described in the 
15307 \emph on
15308 User's Guide
15309 \emph default
15310 .
15311  
15312 \end_layout
15313
15314 \begin_layout Standard
15315 You should consider 
15316 \family sans
15317 Slide
15318 \family default
15319
15320 \family sans
15321 Overlay
15322 \family default
15323 , and 
15324 \family sans
15325 Note
15326 \family default
15327  to be 
15328 \begin_inset Quotes eld
15329 \end_inset
15330
15331 pseudo-environments.
15332 \begin_inset Quotes erd
15333 \end_inset
15334
15335  They look like a section heading or a 
15336 \begin_inset Quotes eld
15337 \end_inset
15338
15339
15340 \family sans
15341 Caption
15342 \family default
15343 ,
15344 \begin_inset Quotes erd
15345 \end_inset
15346
15347  but really begin a [and, if necessary, end the previous] paragraph environment.
15348  Likewise, treat 
15349 \family sans
15350 InvisibleText
15351 \family default
15352  and 
15353 \family sans
15354 VisibleText
15355 \family default
15356  as 
15357 \begin_inset Quotes eld
15358 \end_inset
15359
15360 pseudo-commands.
15361 \begin_inset Quotes erd
15362 \end_inset
15363
15364  These two perform some action.
15365 \end_layout
15366
15367 \begin_layout Standard
15368 A common feature of all five environments, 
15369 \family sans
15370 Slide
15371 \family default
15372
15373 \family sans
15374 Overlay
15375 \family default
15376
15377 \family sans
15378 Note
15379 \family default
15380
15381 \family sans
15382 InvisibleText
15383 \family default
15384  and 
15385 \family sans
15386 VisibleText
15387 \family default
15388 , is a rather long-ish label.
15389  The text following this label â€” ordinarily the contents of the paragraph
15390  environment â€” is utterly irrelevant for 
15391 \family sans
15392 Slide
15393 \family default
15394
15395 \family sans
15396 Overlay
15397 \family default
15398
15399 \family sans
15400 Note
15401 \family default
15402
15403 \family sans
15404 InvisibleText
15405 \family default
15406  and 
15407 \family sans
15408 VisibleText
15409 \family default
15410 .
15411  LyX completely ignores it.
15412  In fact, you can leave these five environments completely empty.
15413  
15414 \end_layout
15415
15416 \begin_layout Standard
15417 While you don't 
15418 \emph on
15419 have
15420 \emph default
15421  to put any text after the rather long-ish label, you might want to.
15422  This could be a short description of the contents of the 
15423 \family sans
15424 Slide
15425 \family default
15426 , for example.
15427  In that case, enter in your descriptive comment and hit 
15428 \family sans
15429 Return
15430 \family default
15431  as you normally would.
15432 \end_layout
15433
15434 \begin_layout Standard
15435 If, on the other hand, you don't want to enter in any descriptive text,
15436  you'll hit another LyX quirk.
15437  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
15438  environment until you put something in the old one.
15439  So, do this:
15440 \end_layout
15441
15442 \begin_layout Itemize
15443 Start entering the text that will 
15444 \emph on
15445 follow
15446 \emph default
15447  the new 
15448 \family sans
15449 Slide
15450 \family default
15451
15452 \family sans
15453 Overlay
15454 \family default
15455
15456 \family sans
15457 Note
15458 \family default
15459
15460 \family sans
15461 InvisibleText
15462 \family default
15463  or 
15464 \family sans
15465 VisibleText
15466 \family default
15467 .
15468  
15469 \end_layout
15470
15471 \begin_layout Itemize
15472 Now move to the beginning of that paragraph.
15473  
15474 \end_layout
15475
15476 \begin_layout Itemize
15477 Next, hit 
15478 \family sans
15479 Return
15480 \family default
15481 .
15482  
15483 \end_layout
15484
15485 \begin_layout Itemize
15486 Finally, change this new, empty paragraph to a 
15487 \family sans
15488 Slide
15489 \family default
15490
15491 \family sans
15492 Overlay
15493 \family default
15494
15495 \family sans
15496 Note
15497 \family default
15498
15499 \family sans
15500 InvisibleText
15501 \family default
15502  or 
15503 \family sans
15504 VisibleText
15505 \family default
15506 .
15507  
15508 \end_layout
15509
15510 \begin_layout Standard
15511 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
15512
15513 \end_layout
15514
15515 \begin_layout Subsection
15516 Making a Presentation with 
15517 \family sans
15518 Slide
15519 \family default
15520
15521 \family sans
15522 Overlay
15523 \family default
15524  and 
15525 \family sans
15526 Note
15527 \end_layout
15528
15529 \begin_layout Subsubsection
15530 Using the 
15531 \family sans
15532 Slide
15533 \family default
15534  Environment
15535 \end_layout
15536
15537 \begin_layout Standard
15538 If you're expecting this section to teach you how to actually make a presentatio
15539 n, you'll be sorely disappointed.
15540  Naturally, I'll describe all of the ways the 
15541 \family sans
15542 slides
15543 \family default
15544  class can assist you in preparing the materials for a presentation.
15545  Filling in the contents, however, is up to you.
15546  [Then again, that 
15547 \emph on
15548 is
15549 \emph default
15550  the LyX philosophy.]
15551 \end_layout
15552
15553 \begin_layout Standard
15554 Choosing the 
15555 \family sans
15556 Slide
15557 \family default
15558  environment [in the manner described in section
15559 \begin_inset space ~
15560 \end_inset
15561
15562
15563 \begin_inset CommandInset ref
15564 LatexCommand ref
15565 reference "sec:slideQuirk"
15566
15567 \end_inset
15568
15569 ] tells LyX to begin a new slide [duh].
15570  The label for this environment/
15571 \begin_inset Quotes erd
15572 \end_inset
15573
15574 pseudo-command
15575 \begin_inset Quotes erd
15576 \end_inset
15577
15578  is an 
15579 \begin_inset Quotes eld
15580 \end_inset
15581
15582 ASCII line,
15583 \begin_inset Quotes erd
15584 \end_inset
15585
15586  in cool blue, followed by the label, 
15587 \begin_inset Quotes eld
15588 \end_inset
15589
15590 NewSlide:
15591 \begin_inset Quotes erd
15592 \end_inset
15593
15594 .
15595  Any text or paragraph environments that follow this one go on the new slide.
15596  It's that simple.
15597 \end_layout
15598
15599 \begin_layout Standard
15600 Slides are probably the only time you'll need to forcibly end pages in LyX
15601  (this can be specified in the 
15602 \family sans
15603 Paragraph Layout
15604 \family default
15605  dialog).
15606  In fact, you'll want to, once you finish entering the contents of one slide.
15607  If you've entered more text than can physically fit on a slide, the extra
15608  overflows onto a new slide.
15609  I don't recommend doing this, however, since the overflow slide won't have
15610  any page number on it.
15611  Furthermore, it may interfere with any 
15612 \family sans
15613 Overlay
15614 \family default
15615  you've made to accompany the oversized 
15616 \family sans
15617 Slide
15618 \family default
15619 .
15620 \end_layout
15621
15622 \begin_layout Standard
15623 The 
15624 \family sans
15625 Overlay
15626 \family default
15627  and 
15628 \family sans
15629 Note
15630 \family default
15631  environments work the same way as the 
15632 \family sans
15633 Slide
15634 \family default
15635  environment.
15636  They both create an 
15637 \begin_inset Quotes eld
15638 \end_inset
15639
15640 ASCII line
15641 \begin_inset Quotes erd
15642 \end_inset
15643
15644  followed by a label [
15645 \begin_inset Quotes eld
15646 \end_inset
15647
15648 NewOverlay:
15649 \begin_inset Quotes erd
15650 \end_inset
15651
15652  and 
15653 \begin_inset Quotes eld
15654 \end_inset
15655
15656 NewNote:
15657 \begin_inset Quotes erd
15658 \end_inset
15659
15660 , respectively].
15661  The color is a stunning magenta instead of blue, and the 
15662 \begin_inset Quotes eld
15663 \end_inset
15664
15665 ASCII line
15666 \begin_inset Quotes erd
15667 \end_inset
15668
15669  will look different, in style and in length.
15670  The label fonts of all three also differ from one another.
15671 \end_layout
15672
15673 \begin_layout Standard
15674 As with a 
15675 \family sans
15676 Slide
15677 \family default
15678 , if the contents of a 
15679 \family sans
15680 Note
15681 \family default
15682  or 
15683 \family sans
15684 Overlay
15685 \family default
15686  exceed the physical size of a slide or sheet of paper, the extra will overflow
15687  onto a new sheet.
15688  Again, you should avoid this.
15689  It defeats the whole purpose of 
15690 \family sans
15691 Note
15692 \family default
15693 s and 
15694 \family sans
15695 Overlay
15696 \family default
15697 s.
15698 \end_layout
15699
15700 \begin_layout Subsubsection
15701 Using 
15702 \family sans
15703 Overlay
15704 \family default
15705  with 
15706 \family sans
15707 Slide
15708 \end_layout
15709
15710 \begin_layout Standard
15711 The idea behind an 
15712 \family sans
15713 Overlay
15714 \family default
15715  is a slide that sits atop another slide.
15716  Perhaps you wish to discuss a figure on the main 
15717 \family sans
15718 Slide
15719 \family default
15720  before displaying the text associated with it.
15721  One way to accomplish this is tape a flap of dark paper over the part of
15722  the 
15723 \family sans
15724 Slide
15725 \family default
15726  you want to display later.
15727  This method fails, however, if you wish to overlap one graph with another,
15728  for example.
15729  You would then have to fumble while speaking to align the two separate,
15730  overlapping 
15731 \family sans
15732 Slide
15733 \family default
15734 s to align the two graphs.
15735  The use of an 
15736 \family sans
15737 Overlay
15738 \family default
15739  environment in both cases makes life much easier.
15740 \end_layout
15741
15742 \begin_layout Standard
15743 Each 
15744 \family sans
15745 Overlay
15746 \family default
15747  receives the page number of its 
15748 \begin_inset Quotes eld
15749 \end_inset
15750
15751 parent
15752 \begin_inset Quotes erd
15753 \end_inset
15754
15755  
15756 \family sans
15757 Slide
15758 \family default
15759 , appended by 
15760 \begin_inset Quotes eld
15761 \end_inset
15762
15763
15764 \family typewriter
15765 -a
15766 \family default
15767
15768 \begin_inset Quotes erd
15769 \end_inset
15770
15771 .
15772 \begin_inset Foot
15773 status collapsed
15774
15775 \begin_layout Plain Layout
15776 Presumably, mutliple 
15777 \family sans
15778 Overlay
15779 \family default
15780 s would have 
15781 \begin_inset Quotes eld
15782 \end_inset
15783
15784
15785 \family typewriter
15786 -a
15787 \family default
15788
15789 \begin_inset Quotes erd
15790 \end_inset
15791
15792
15793 \begin_inset Quotes eld
15794 \end_inset
15795
15796
15797 \family typewriter
15798 -b
15799 \family default
15800
15801 \begin_inset Quotes erd
15802 \end_inset
15803
15804
15805 \begin_inset Quotes eld
15806 \end_inset
15807
15808
15809 \family typewriter
15810 -c
15811 \family default
15812
15813 \begin_inset Quotes erd
15814 \end_inset
15815
15816 , etc.
15817 \begin_inset space ~
15818 \end_inset
15819
15820 appended to the page number of the parent 
15821 \family sans
15822 Slide
15823 \family default
15824 .
15825  
15826 \end_layout
15827
15828 \end_inset
15829
15830  Clearly, you want the contents of both the 
15831 \family sans
15832 Slide
15833 \family default
15834  and the 
15835 \family sans
15836 Overlay
15837 \family default
15838  to each fit on a single physical slide! You should probably consider an
15839  
15840 \family sans
15841 Overlay
15842 \family default
15843  as 
15844 \begin_inset Quotes eld
15845 \end_inset
15846
15847 part of
15848 \begin_inset Quotes erd
15849 \end_inset
15850
15851  a 
15852 \family sans
15853 Slide
15854 \family default
15855 .
15856  Indeed, the LyX 
15857 \family sans
15858 slides
15859 \family default
15860  class provides a visual cue for this: the label at the start of an 
15861 \family sans
15862 Overlay
15863 \family default
15864  is shorter than that at the start of a 
15865 \family sans
15866 Slide
15867 \family default
15868 .
15869  Lastly, when you generate printable output, you'll find alignment markers
15870  in all four corners of both the 
15871 \family sans
15872 Overlay
15873 \family default
15874  page and its parent 
15875 \family sans
15876 Slide
15877 \family default
15878 .
15879  These will assist you in lining up the two physical slides.
15880 \end_layout
15881
15882 \begin_layout Standard
15883 The major problem in overlaying two slides is aligning the contents of the
15884  two transparencies.
15885  How much space should you leave for that graph on the second slide? Worse
15886  still, what if you want a graph and a sentence on second slide, but there
15887  is text on the main transparency that goes in between them? You could try
15888  and insert vertical space of the right size.
15889  The better way is to use 
15890 \family sans
15891 InvisibleText
15892 \family default
15893  and 
15894 \family sans
15895 VisibleText
15896 \family default
15897 .
15898 \end_layout
15899
15900 \begin_layout Standard
15901 As their names imply, 
15902 \family sans
15903 InvisibleText
15904 \family default
15905  and 
15906 \family sans
15907 VisibleText
15908 \family default
15909  are two command-like paragraph environments that make all subsequent text
15910  invisible and visible, respectively.
15911  Note from section
15912 \begin_inset space ~
15913 \end_inset
15914
15915
15916 \begin_inset CommandInset ref
15917 LatexCommand ref
15918 reference "sec:slideQuirk"
15919
15920 \end_inset
15921
15922  that you don't place anything 
15923 \emph on
15924 into
15925 \emph default
15926  these two environments, however.
15927  When you create an 
15928 \family sans
15929 InvisibleText
15930 \family default
15931 , it inserts a centered, sky-blue label into the page reading 
15932 \begin_inset Quotes eld
15933 \end_inset
15934
15935 <Invisible Text Follows>
15936 \begin_inset Quotes erd
15937 \end_inset
15938
15939 .
15940  For paragraphs following this label, the parts of the 
15941 \family sans
15942 Slide
15943 \family default
15944  [or 
15945 \family sans
15946 Overlay
15947 \family default
15948 ; it doesn't matter which] where they would be contain instead blank space.
15949  
15950 \end_layout
15951
15952 \begin_layout Standard
15953 For 
15954 \family sans
15955 VisibleText
15956 \family default
15957 , the corresponding centered label is 
15958 \begin_inset Quotes eld
15959 \end_inset
15960
15961 <Visible Text Follows>
15962 \begin_inset Quotes erd
15963 \end_inset
15964
15965  in blazing green.
15966  Paragraphs following this label behave normally.
15967  Note that the beginning of a new 
15968 \family sans
15969 Slide
15970 \family default
15971
15972 \family sans
15973 Overlay
15974 \family default
15975 , or 
15976 \family sans
15977 Note
15978 \family default
15979  automatically shuts off an 
15980 \family sans
15981 InvisibleText
15982 \family default
15983 .
15984  It's therefore not necessary to use 
15985 \family sans
15986 VisibleText
15987 \family default
15988  at the end of a 
15989 \family sans
15990 Slide
15991 \family default
15992 .
15993 \end_layout
15994
15995 \begin_layout Standard
15996 By now, it should be obvious how to create overlay transparencies using
15997  the proper combination of 
15998 \family sans
15999 InvisibleText
16000 \family default
16001  and 
16002 \family sans
16003 VisibleText
16004 \family default
16005  on a 
16006 \family sans
16007 Slide
16008 \family default
16009  and 
16010 \family sans
16011 Overlay
16012 \family default
16013 :
16014 \end_layout
16015
16016 \begin_layout Enumerate
16017 Create a 
16018 \family sans
16019 Slide
16020 \family default
16021 , including everything that will appear on it, whether on the main slide
16022  or on the 
16023 \family sans
16024 Overlay
16025 \family default
16026 .
16027 \end_layout
16028
16029 \begin_layout Enumerate
16030 Before each figure or paragraph that will appear only on the 
16031 \family sans
16032 Overlay
16033 \family default
16034 , insert an 
16035 \family sans
16036 InvisibleText
16037 \family default
16038  environment.
16039  If necessary, insert a 
16040 \family sans
16041 VisibleText
16042 \family default
16043  environment after the 
16044 \family sans
16045 Overlay
16046 \family default
16047 -only text.
16048 \end_layout
16049
16050 \begin_layout Enumerate
16051 Start an 
16052 \family sans
16053 Overlay
16054 \family default
16055  immediately following the 
16056 \family sans
16057 Slide
16058 \family default
16059 .
16060 \end_layout
16061
16062 \begin_layout Enumerate
16063 Copy the contents of this 
16064 \family sans
16065 Slide
16066 \family default
16067  into the 
16068 \family sans
16069 Overlay
16070 \family default
16071 .
16072 \end_layout
16073
16074 \begin_layout Enumerate
16075 Within the 
16076 \family sans
16077 Overlay
16078 \family default
16079 , change all of the 
16080 \family sans
16081 InvisibleText
16082 \family default
16083  lines to 
16084 \family sans
16085 VisibleText
16086 \family default
16087  and vice-versa.
16088 \end_layout
16089
16090 \begin_layout Standard
16091 That's it.
16092  You've just made an 
16093 \family sans
16094 Overlay
16095 \family default
16096 .
16097 \end_layout
16098
16099 \begin_layout Standard
16100 There's one problem with the way I've designed the LyX 
16101 \family sans
16102 slides
16103 \family default
16104  class: you can't make text in the middle of a paragraph invisible, nor
16105  make text in the middle of an invisible paragraph visible again.
16106  To accomplish this feat, you'll need to use some inlined LaTeX codes.
16107 \begin_inset Foot
16108 status collapsed
16109
16110 \begin_layout Plain Layout
16111 The commands of interest are: 
16112 \end_layout
16113
16114 \begin_layout Itemize
16115
16116 \family typewriter
16117 {
16118 \backslash
16119 invisible \SpecialChar \ldots{}
16120  }
16121 \end_layout
16122
16123 \begin_layout Itemize
16124
16125 \family typewriter
16126 {
16127 \backslash
16128 visible \SpecialChar \ldots{}
16129  }
16130 \end_layout
16131
16132 \begin_layout Plain Layout
16133 \SpecialChar \ldots{}
16134 and need to be marked as TeX.
16135  The text whose 
16136 \begin_inset Quotes eld
16137 \end_inset
16138
16139 visibility
16140 \begin_inset Quotes erd
16141 \end_inset
16142
16143  you wish to change goes in between the brackets [and after the 
16144 \family typewriter
16145
16146 \backslash
16147 invisible
16148 \family default
16149  or 
16150 \family typewriter
16151
16152 \backslash
16153 visible
16154 \family default
16155  command].
16156  If you don't know how to mark text as TeX, see the appropriate section
16157  of the 
16158 \emph on
16159 User's Guide
16160 \emph default
16161 .
16162 \end_layout
16163
16164 \end_inset
16165
16166
16167 \end_layout
16168
16169 \begin_layout Subsubsection
16170 Using 
16171 \family sans
16172 Note
16173 \family default
16174  with 
16175 \family sans
16176 Slide
16177 \family default
16178
16179 \begin_inset CommandInset label
16180 LatexCommand label
16181 name "sec:slideNote"
16182
16183 \end_inset
16184
16185
16186 \end_layout
16187
16188 \begin_layout Standard
16189 Like an 
16190 \family sans
16191 Overlay
16192 \family default
16193 , a 
16194 \family sans
16195 Note
16196 \family default
16197  is associated with a 
16198 \begin_inset Quotes eld
16199 \end_inset
16200
16201 parent
16202 \begin_inset Quotes erd
16203 \end_inset
16204
16205  
16206 \family sans
16207 Slide
16208 \family default
16209 .
16210  Here, too, the LyX 
16211 \family sans
16212 slides
16213 \family default
16214  class provides visual cues.
16215  The label for a 
16216 \family sans
16217 Note
16218 \family default
16219  is shorter than that of a 
16220 \family sans
16221 Slide
16222 \family default
16223  [yet longer than that of an 
16224 \family sans
16225 Overlay
16226 \family default
16227 ] and, like the label of an 
16228 \family sans
16229 Overlay
16230 \family default
16231  is shockingly magenta.
16232  Additionally, the printed 
16233 \family sans
16234 Note
16235 \family default
16236  has the page number of its 
16237 \begin_inset Quotes eld
16238 \end_inset
16239
16240 parent
16241 \begin_inset Quotes erd
16242 \end_inset
16243
16244  
16245 \family sans
16246 Slide
16247 \family default
16248 , appended by 
16249 \begin_inset Quotes eld
16250 \end_inset
16251
16252
16253 \family typewriter
16254 -
16255 \family default
16256 1
16257 \begin_inset Quotes erd
16258 \end_inset
16259
16260
16261 \begin_inset Quotes eld
16262 \end_inset
16263
16264
16265 \family typewriter
16266 -
16267 \family default
16268 2
16269 \begin_inset Quotes erd
16270 \end_inset
16271
16272
16273 \begin_inset Quotes eld
16274 \end_inset
16275
16276
16277 \family typewriter
16278 -
16279 \family default
16280 3
16281 \begin_inset Quotes erd
16282 \end_inset
16283
16284 , etc.
16285  You can have multiple 
16286 \family sans
16287 Note
16288 \family default
16289 s associated with a single 
16290 \family sans
16291 Slide
16292 \family default
16293 , and, as with 
16294 \family sans
16295 Slide
16296 \family default
16297  and 
16298 \family sans
16299 Overlay
16300 \family default
16301 , you'll probably want to break up long 
16302 \family sans
16303 Note
16304 \family default
16305 s so that they fit on a single sheet of paper.
16306 \end_layout
16307
16308 \begin_layout Standard
16309 The purpose of a 
16310 \family sans
16311 Note
16312 \family default
16313  is obvious: it contains anything additional you might want to say about
16314  a 
16315 \family sans
16316 Slide
16317 \family default
16318 .
16319  It could also be used as a sheet of reminders for a particular 
16320 \family sans
16321 Slide
16322 \family default
16323 .
16324  In the case of the latter, you might want to make use of time markers.
16325  Currently, the LyX 
16326 \family sans
16327 slides
16328 \family default
16329  class has no 
16330 \begin_inset Quotes eld
16331 \end_inset
16332
16333 native
16334 \begin_inset Quotes erd
16335 \end_inset
16336
16337  support for time markers, a 
16338 \noun on
16339 SliTeX
16340 \noun default
16341  feature.
16342  So, you'll have to resort to using the LaTeX codes.
16343 \end_layout
16344
16345 \begin_layout Standard
16346 To use time markers, you'll need to specify the extra class option 
16347 \begin_inset Quotes eld
16348 \end_inset
16349
16350
16351 \family typewriter
16352 clock
16353 \family default
16354
16355 \begin_inset Quotes erd
16356 \end_inset
16357
16358  [see section
16359 \begin_inset space ~
16360 \end_inset
16361
16362
16363 \begin_inset CommandInset ref
16364 LatexCommand ref
16365 reference "sec:slidesetup"
16366
16367 \end_inset
16368
16369 ].
16370  This option turns on timing marks, which will appear in the lower-left-hand
16371  corner of every 
16372 \family sans
16373 Note
16374 \family default
16375  you generate.
16376  To set what appears in the time marker, you use the LaTeX commands 
16377 \begin_inset Quotes eld
16378 \end_inset
16379
16380
16381 \family typewriter
16382
16383 \backslash
16384 settime{}
16385 \family default
16386
16387 \begin_inset Quotes erd
16388 \end_inset
16389
16390  and 
16391 \begin_inset Quotes eld
16392 \end_inset
16393
16394
16395 \family typewriter
16396
16397 \backslash
16398 addtime{}
16399 \family default
16400
16401 \begin_inset Quotes erd
16402 \end_inset
16403
16404 .
16405  The arguments of both commands are time measured in seconds.
16406  
16407 \begin_inset Quotes eld
16408 \end_inset
16409
16410
16411 \family typewriter
16412
16413 \backslash
16414 settime{}
16415 \family default
16416
16417 \begin_inset Quotes erd
16418 \end_inset
16419
16420  sets the time marker to a given time.
16421  
16422 \begin_inset Quotes eld
16423 \end_inset
16424
16425
16426 \family typewriter
16427
16428 \backslash
16429 addtime{}
16430 \family default
16431
16432 \begin_inset Quotes erd
16433 \end_inset
16434
16435  increments the time marker by the specified amount.
16436  Using time markers and 
16437 \family sans
16438 Note
16439 \family default
16440 s in this fashion, you can remind yourself how much time to spend on a particula
16441
16442 \family sans
16443 Slide
16444 \family default
16445 .
16446 \end_layout
16447
16448 \begin_layout Standard
16449 There's one last feature to describe.
16450  Clearly, you'd like to print out all of your 
16451 \family sans
16452 Slide
16453 \family default
16454 s and 
16455 \family sans
16456 Overlay
16457 \family default
16458 s on transparencies while printing all of your 
16459 \family sans
16460 Note
16461 \family default
16462 s on plain paper.
16463  However, a 
16464 \family sans
16465 Note
16466 \family default
16467  
16468 \emph on
16469 must
16470 \emph default
16471  follow the 
16472 \family sans
16473 Slide
16474 \family default
16475  with which it is associated.
16476  What's a person to do?
16477 \end_layout
16478
16479 \begin_layout Standard
16480 Luckily, there are two LaTeX commands that allow you to select what to print
16481  out.
16482  Both must be placed into the preamble of your document.
16483  The command 
16484 \begin_inset Quotes eld
16485 \end_inset
16486
16487
16488 \family typewriter
16489
16490 \backslash
16491 onlyslides{
16492 \backslash
16493 slides}
16494 \family default
16495
16496 \begin_inset Quotes erd
16497 \end_inset
16498
16499  will cause the output to contain only the 
16500 \family sans
16501 Slide
16502 \family default
16503 s and 
16504 \family sans
16505 Overlay
16506 \family default
16507 s.
16508  Correspondingly, the command 
16509 \begin_inset Quotes eld
16510 \end_inset
16511
16512
16513 \family typewriter
16514
16515 \backslash
16516 onlynotes{
16517 \backslash
16518 notes}
16519 \family default
16520
16521 \begin_inset Quotes erd
16522 \end_inset
16523
16524  prevents the output of anything but 
16525 \family sans
16526 Note
16527 \family default
16528 s.
16529  I'd advise placing both commands in the preamble and initially comment
16530  both out.
16531  You can then preview your entire presentation as you write.
16532  When you're done writing, you can then uncomment one of the two to select
16533  what you want to print.
16534  I like to uncomment 
16535 \begin_inset Quotes eld
16536 \end_inset
16537
16538
16539 \family typewriter
16540
16541 \backslash
16542 onlyslides{
16543 \backslash
16544 slides}
16545 \family default
16546
16547 \begin_inset Quotes erd
16548 \end_inset
16549
16550  , print to a file with 
16551 \begin_inset Quotes eld
16552 \end_inset
16553
16554
16555 \family typewriter
16556 -slides
16557 \family default
16558
16559 \begin_inset Quotes erd
16560 \end_inset
16561
16562  in its name, comment it back out, then uncomment 
16563 \begin_inset Quotes eld
16564 \end_inset
16565
16566
16567 \family typewriter
16568
16569 \backslash
16570 onlynotes{
16571 \backslash
16572 notes}
16573 \family default
16574
16575 \begin_inset Quotes erd
16576 \end_inset
16577
16578  and print to a 
16579 \begin_inset Quotes eld
16580 \end_inset
16581
16582
16583 \family typewriter
16584 *-notes.ps
16585 \family default
16586
16587 \begin_inset Quotes erd
16588 \end_inset
16589
16590  file.
16591  I can then send either file to a printer, loading transparencies or plain
16592  paper as appropriate.
16593 \end_layout
16594
16595 \begin_layout Standard
16596 You can also provide other arguments to the 
16597 \begin_inset Quotes eld
16598 \end_inset
16599
16600
16601 \family typewriter
16602
16603 \backslash
16604 onlyslides{}
16605 \family default
16606
16607 \begin_inset Quotes erd
16608 \end_inset
16609
16610  and 
16611 \begin_inset Quotes eld
16612 \end_inset
16613
16614
16615 \family typewriter
16616
16617 \backslash
16618 onlynotes{}
16619 \family default
16620
16621 \begin_inset Quotes erd
16622 \end_inset
16623
16624  commands.
16625  See a good LaTeX book for details.
16626 \end_layout
16627
16628 \begin_layout Subsection
16629 The 
16630 \family sans
16631 slides
16632 \family default
16633  Class Template File
16634 \end_layout
16635
16636 \begin_layout Standard
16637 I have also provided a template file, 
16638 \begin_inset Quotes eld
16639 \end_inset
16640
16641
16642 \family typewriter
16643 slides.lyx
16644 \family default
16645
16646 \begin_inset Quotes erd
16647 \end_inset
16648
16649 , with the 
16650 \family sans
16651 slides
16652 \family default
16653  class.
16654  To use it, begin your new presentation with 
16655 \family sans
16656 \bar under
16657 F
16658 \bar default
16659 ile\SpecialChar \menuseparator
16660 New
16661 \begin_inset space ~
16662 \end_inset
16663
16664 from
16665 \begin_inset space ~
16666 \end_inset
16667
16668
16669 \bar under
16670 T
16671 \bar default
16672 emplate
16673 \family default
16674 .
16675  Your new LyX presentation file will contain an example 
16676 \family sans
16677 Slide
16678 \family default
16679  â€“ 
16680 \family sans
16681 Overlay
16682 \family default
16683  â€“ 
16684 \family sans
16685 Note
16686 \family default
16687  triplet.
16688  The 
16689 \family sans
16690 Slide
16691 \family default
16692  and 
16693 \family sans
16694 Overlay
16695 \family default
16696  additionally contain an example of the use of 
16697 \family sans
16698 InvisibleText
16699 \family default
16700  and 
16701 \family sans
16702 VisibleText
16703 \family default
16704 .
16705  Lastly, the preamble will contain:
16706 \end_layout
16707
16708 \begin_layout LyX-Code
16709 % Uncomment to print out only slides and overlays
16710 \end_layout
16711
16712 \begin_layout LyX-Code
16713 %
16714 \end_layout
16715
16716 \begin_layout LyX-Code
16717 %
16718 \backslash
16719 onlyslides{
16720 \backslash
16721 slides}
16722 \begin_inset Newline newline
16723 \end_inset
16724
16725  
16726 \end_layout
16727
16728 \begin_layout LyX-Code
16729 % Uncomment to print out only notes
16730 \end_layout
16731
16732 \begin_layout LyX-Code
16733 %
16734 \end_layout
16735
16736 \begin_layout LyX-Code
16737 %
16738 \backslash
16739 onlynotes{
16740 \backslash
16741 notes}
16742 \end_layout
16743
16744 \begin_layout Standard
16745 One final thing: I created this class to support the LaTeX2e 
16746 \begin_inset Quotes eld
16747 \end_inset
16748
16749
16750 \noun on
16751 SliTeX
16752 \noun default
16753  emulation
16754 \begin_inset Quotes erd
16755 \end_inset
16756
16757  class, one of the built-in LaTeX2e classes.
16758  Neither I nor the rest of the LyX Team endorse or oppose the use of this
16759  built-in slide class.
16760  It's here if you want it or need it.
16761  There exist other LaTeX2e classes for creating presentations, such as the
16762  
16763 \family sans
16764 Foils
16765 \family default
16766  class [see section
16767 \begin_inset space ~
16768 \end_inset
16769
16770
16771 \begin_inset CommandInset ref
16772 LatexCommand ref
16773 reference "sec:foiltex"
16774
16775 \end_inset
16776
16777 ] or the 
16778 \begin_inset Quotes eld
16779 \end_inset
16780
16781
16782 \family typewriter
16783 seminar
16784 \family default
16785
16786 \begin_inset Quotes erd
16787 \end_inset
16788
16789  package [present on some TeX distributions].
16790  The latter is not yet supported under LyX.
16791 \begin_inset Foot
16792 status collapsed
16793
16794 \begin_layout Plain Layout
16795 Perhaps you can take on the task\SpecialChar \ldots{}
16796
16797 \end_layout
16798
16799 \end_inset
16800
16801  I know nothing about these other classes.
16802  Try them out to see what sort of alternative they provide.
16803 \end_layout
16804
16805 \begin_layout Chapter
16806 LyX Features needing Extra Software
16807 \end_layout
16808
16809 \begin_layout Section
16810 Checking TeX
16811 \end_layout
16812
16813 \begin_layout Standard
16814 by 
16815 \noun on
16816 Asger Alstrup
16817 \end_layout
16818
16819 \begin_layout Subsection
16820 Introduction
16821 \end_layout
16822
16823 \begin_layout Standard
16824 If you have the 
16825 \family typewriter
16826 chktex
16827 \family default
16828  program installed
16829 \begin_inset Foot
16830 status collapsed
16831
16832 \begin_layout Plain Layout
16833
16834 \family typewriter
16835 chktex
16836 \family default
16837  is not yet available when you are using the LaTeX distribution MiKTeX.
16838 \end_layout
16839
16840 \end_inset
16841
16842 , you'll find in the 
16843 \family sans
16844 Tools
16845 \family default
16846  menu the entry: 
16847 \family sans
16848 Check
16849 \begin_inset space ~
16850 \end_inset
16851
16852 TeX
16853 \family default
16854 .
16855  You can get 
16856 \family typewriter
16857 chktex
16858 \family default
16859  it from CTAN, 
16860 \begin_inset CommandInset href
16861 LatexCommand href
16862 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
16863
16864 \end_inset
16865
16866 .
16867 \end_layout
16868
16869 \begin_layout Standard
16870 The 
16871 \family sans
16872 ChkTeX
16873 \family default
16874  package is a program that was written by 
16875 \begin_inset Flex CharStyle:Noun
16876 status collapsed
16877
16878 \begin_layout Plain Layout
16879 Jens T.
16880 \begin_inset space ~
16881 \end_inset
16882
16883 Berger Thielemann
16884 \end_layout
16885
16886 \end_inset
16887
16888  in frustration because some constructs in LaTeX are sometimes non-intuitive,
16889  and easy to forget.
16890  The program runs over your LaTeX file, checks the integrity of the file,
16891  and flags some common errors.
16892  In other technical words, it is 
16893 \family typewriter
16894 lint
16895 \family default
16896  for LaTeX.
16897 \end_layout
16898
16899 \begin_layout Standard
16900 Well, what is a syntax checker doing in LyX which is supposed to produce
16901  correct LaTeX anyways? The answer is simple: Just as 
16902 \family typewriter
16903 Lint
16904 \family default
16905  not only checks the 
16906 \emph on
16907 syntax
16908 \emph default
16909  of C programs, but also does 
16910 \emph on
16911 semantic
16912 \emph default
16913  checks for type-errors, 
16914 \family sans
16915 ChkTeX
16916 \family default
16917  catches some common 
16918 \emph on
16919 typographic
16920 \emph default
16921  errors, in addition to the syntactical ones.
16922  Specifically, 
16923 \family sans
16924 ChkTeX
16925 \family default
16926  is capable of detecting several common errors, such as
16927 \end_layout
16928
16929 \begin_layout Itemize
16930 Ellipsis detection:
16931 \begin_inset Newline newline
16932 \end_inset
16933
16934 Use \SpecialChar \ldots{}
16935  instead of ...
16936 \end_layout
16937
16938 \begin_layout Itemize
16939 No space in front of/after parenthesis:
16940 \begin_inset Newline newline
16941 \end_inset
16942
16943 ( wrong spacing )
16944 \end_layout
16945
16946 \begin_layout Itemize
16947 Enforcement of normal space after common abbreviations:
16948 \begin_inset Newline newline
16949 \end_inset
16950
16951 e.
16952 \begin_inset space \thinspace{}
16953 \end_inset
16954
16955 g.
16956 \begin_inset space \space{}
16957 \end_inset
16958
16959 is too wide spacing.
16960 \end_layout
16961
16962 \begin_layout Itemize
16963 Enforcement of end-of-sentence space when the last sentence ends with a
16964  capital letter:
16965 \begin_inset Newline newline
16966 \end_inset
16967
16968 This is a TEST.
16969  And this is wrong spacing.
16970 \end_layout
16971
16972 \begin_layout Itemize
16973 Space in front of labels and similar commands:
16974 \begin_inset Newline newline
16975 \end_inset
16976
16977 The label should stick right up to the text to avoid falling to a wrong
16978  page.
16979  
16980 \begin_inset CommandInset label
16981 LatexCommand label
16982 name "sec:chktex"
16983
16984 \end_inset
16985
16986  
16987 \begin_inset Foot
16988 status collapsed
16989
16990 \begin_layout Plain Layout
16991 This footnote is in danger of falling off to a wrong page
16992 \end_layout
16993
16994 \end_inset
16995
16996  The label is separated too much.
16997 \end_layout
16998
16999 \begin_layout Itemize
17000 Space in front of references, instead of hard spaces:
17001 \begin_inset Newline newline
17002 \end_inset
17003
17004 In you are in bad luck, the text will break right between the referenced
17005  text and reference number, and that's a pity.
17006  See section 
17007 \begin_inset CommandInset ref
17008 LatexCommand ref
17009 reference "sec:chktex"
17010
17011 \end_inset
17012
17013 .
17014 \end_layout
17015
17016 \begin_layout Itemize
17017 Use of 
17018 \begin_inset Quotes eld
17019 \end_inset
17020
17021 x
17022 \begin_inset Quotes erd
17023 \end_inset
17024
17025  instead of 
17026 \begin_inset Formula $\times$
17027 \end_inset
17028
17029  between numbers:
17030 \begin_inset Newline newline
17031 \end_inset
17032
17033 2x2 looks cheap compared to 
17034 \begin_inset Formula $2\times2$
17035 \end_inset
17036
17037 .
17038 \end_layout
17039
17040 \begin_layout Standard
17041 and more \SpecialChar \ldots{}
17042  It is an invaluable tool when you are 
17043 \begin_inset Quotes eld
17044 \end_inset
17045
17046 finishing up
17047 \begin_inset Quotes erd
17048 \end_inset
17049
17050  your document before printing, and you should run it right after the obligatory
17051  spelling check, and before you go fine tuning the typesetting.
17052 \end_layout
17053
17054 \begin_layout Subsection
17055 How to use it
17056 \end_layout
17057
17058 \begin_layout Standard
17059 If you have the program installed, usage is as simple as choosing 
17060 \family sans
17061 Tools\SpecialChar \menuseparator
17062 Check
17063 \begin_inset space ~
17064 \end_inset
17065
17066 TeX
17067 \family default
17068 .
17069  This will make LyX generate a LaTeX file of your document, start 
17070 \family sans
17071 ChkTeX
17072 \family default
17073  to check it, and then make LyX insert 
17074 \begin_inset Quotes eld
17075 \end_inset
17076
17077 error boxes
17078 \begin_inset Quotes erd
17079 \end_inset
17080
17081  with the warnings from 
17082 \family sans
17083 ChkTeX
17084 \family default
17085 , if there were any.
17086  The warnings will be placed close to the point of the mistake, and you
17087  can quickly find them by using the 
17088 \family sans
17089 Navigate\SpecialChar \menuseparator
17090 Error
17091 \family default
17092  menu item, or the shortcut key 
17093 \family sans
17094 C-g
17095 \family default
17096  from the default 
17097 \family typewriter
17098 cua
17099 \family default
17100  bind file.
17101  Open the error boxes by clicking on them with the mouse, or use the shortcut
17102  key 
17103 \family sans
17104 C-i
17105 \family default
17106  from 
17107 \family typewriter
17108 cua
17109 \family default
17110  bindings, or the corresponding 
17111 \family sans
17112 C-o
17113 \family default
17114  for the alternate 
17115 \family typewriter
17116 emacs
17117 \family default
17118  bind file.
17119  Read the warning and correct the mistake, if it is a mistake.
17120  If you have trouble understanding what the warning is about, you can safely
17121  ignore it.
17122  Remember that there is a hidden layer between the document on screen and
17123  the technical details in invoking 
17124 \family sans
17125 ChkTeX
17126 \family default
17127 , and this gap can make some warnings seem arcane or just right down plain
17128  silly.
17129 \end_layout
17130
17131 \begin_layout Standard
17132 This document is an excellent testing bed for the feature, and it should
17133  provide quite a few warnings for you to fiddle with.
17134  Since computers are only so smart, expect most of the warnings to be false
17135  alarms, though.
17136 \end_layout
17137
17138 \begin_layout Subsection
17139 How to fine tune it
17140 \end_layout
17141
17142 \begin_layout Standard
17143 Sometimes, you'll find that 
17144 \family sans
17145 ChkTeX
17146 \family default
17147  makes more noise than suits your mood.
17148  Then you can choose not to use it, wait until your mood changes, or try
17149  to customize 
17150 \family sans
17151 ChkTeX
17152 \family default
17153  to get better along with you.
17154  Another choice in the most desperate situations is to use 
17155 \family sans
17156 View\SpecialChar \menuseparator
17157 Remove
17158 \begin_inset space ~
17159 \end_inset
17160
17161 All
17162 \begin_inset space ~
17163 \end_inset
17164
17165 Error
17166 \begin_inset space ~
17167 \end_inset
17168
17169 Boxes
17170 \family default
17171 , which will get rid of all warnings instantly.
17172 \end_layout
17173
17174 \begin_layout Standard
17175 Although 
17176 \family sans
17177 ChkTeX
17178 \family default
17179  
17180 \emph on
17181 is
17182 \emph default
17183  very configurable and extensible, you shouldn't expect to solve all problems
17184  with 
17185 \family sans
17186 ChkTeX
17187 \family default
17188  in LyX this way.
17189  Since LyX has to generate a somewhat special LaTeX file to be able to match
17190  the line numbers from the 
17191 \family sans
17192 ChkTeX
17193 \family default
17194  output
17195 \begin_inset Foot
17196 status collapsed
17197
17198 \begin_layout Plain Layout
17199 You can inspect the specific output from 
17200 \family sans
17201 chktex
17202 \family default
17203  by using 
17204 \family sans
17205 Edit\SpecialChar \menuseparator
17206 View
17207 \begin_inset space ~
17208 \end_inset
17209
17210 LaTeX
17211 \begin_inset space ~
17212 \end_inset
17213
17214 Log
17215 \family default
17216  right after a 
17217 \family sans
17218 chktex
17219 \family default
17220  run.
17221 \end_layout
17222
17223 \end_inset
17224
17225  to the internal document structure, some of the warnings will not seen
17226  to appear correctly.
17227  There are two things you can do about this:
17228 \end_layout
17229
17230 \begin_layout Itemize
17231 Fine tune the 
17232 \family sans
17233 ChkTeX
17234 \family default
17235  invocation command line in 
17236 \family sans
17237 Preferences
17238 \family default
17239  (tabs 
17240 \family sans
17241 Outputs
17242 \family default
17243
17244 \family sans
17245 Misc
17246 \family default
17247 ), or the global 
17248 \family sans
17249 ChkTeX
17250 \family default
17251  installation configuration file (usually with the file 
17252 \family typewriter
17253 chktexrc
17254 \family default
17255 ).
17256  See below to learn what warnings can be enabled and disabled on the command
17257  line.
17258  
17259 \end_layout
17260
17261 \begin_layout Itemize
17262 Export your document as a raw LaTeX file using 
17263 \family sans
17264 File\SpecialChar \menuseparator
17265 Export\SpecialChar \menuseparator
17266 LaTeX
17267 \family default
17268  and run 
17269 \family typewriter
17270 chktex
17271 \family default
17272  manually on that.
17273  Invoked in this way, it can be a hassle to find the corresponding place
17274  in the document inside LyX, but with a little patience, you should be able
17275  to do it.
17276 \end_layout
17277
17278 \begin_layout Standard
17279 Here follows the warning messages that can be enabled and disabled in 
17280 \family sans
17281 Preferences
17282 \family default
17283 .
17284  Use 
17285 \family typewriter
17286 -n#
17287 \family default
17288  to disable a warning, and 
17289 \family typewriter
17290 -w#
17291 \family default
17292  to enable a warning.
17293  The emphasized entries are disabled by default, because the default is
17294  "
17295 \family typewriter
17296 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
17297 \family default
17298 ".
17299 \end_layout
17300
17301 \begin_layout Standard
17302 Notice that you should only use the options that enable and disable warnings,
17303  because LyX relies on some of the other command line parameters to be set
17304  in a specific way to have a chance to communicate with 
17305 \family typewriter
17306 chktex
17307 \family default
17308 .
17309 \end_layout
17310
17311 \begin_layout Enumerate
17312
17313 \size small
17314 \emph on
17315 Command terminated with space.
17316 \end_layout
17317
17318 \begin_layout Enumerate
17319
17320 \size small
17321 Non-breaking space (
17322 \begin_inset Quotes eld
17323 \end_inset
17324
17325
17326 \family typewriter
17327 ~
17328 \family default
17329
17330 \begin_inset Quotes erd
17331 \end_inset
17332
17333 ) should have been used.
17334 \end_layout
17335
17336 \begin_layout Enumerate
17337
17338 \size small
17339 \emph on
17340 You should enclose the previous parenthesis with 
17341 \begin_inset Quotes eld
17342 \end_inset
17343
17344
17345 \family typewriter
17346 {}
17347 \family default
17348
17349 \begin_inset Quotes erd
17350 \end_inset
17351
17352 .
17353 \end_layout
17354
17355 \begin_layout Enumerate
17356
17357 \size small
17358 Italic correction (
17359 \begin_inset Quotes eld
17360 \end_inset
17361
17362
17363 \family typewriter
17364
17365 \backslash
17366 /
17367 \family default
17368
17369 \begin_inset Quotes erd
17370 \end_inset
17371
17372 ) found in non-italic buffer.
17373 \end_layout
17374
17375 \begin_layout Enumerate
17376
17377 \size small
17378 Italic correction (
17379 \begin_inset Quotes eld
17380 \end_inset
17381
17382
17383 \family typewriter
17384
17385 \backslash
17386 /
17387 \family default
17388
17389 \begin_inset Quotes erd
17390 \end_inset
17391
17392 ) found more than once.
17393 \end_layout
17394
17395 \begin_layout Enumerate
17396
17397 \size small
17398 \emph on
17399 No italic correction (
17400 \begin_inset Quotes eld
17401 \end_inset
17402
17403
17404 \family typewriter
17405
17406 \backslash
17407 /
17408 \family default
17409
17410 \begin_inset Quotes erd
17411 \end_inset
17412
17413 ) found.
17414 \end_layout
17415
17416 \begin_layout Enumerate
17417
17418 \size small
17419 Accent command 
17420 \begin_inset Quotes eld
17421 \end_inset
17422
17423
17424 \family typewriter
17425 cmd
17426 \family default
17427
17428 \begin_inset Quotes erd
17429 \end_inset
17430
17431  needs use of 
17432 \begin_inset Quotes eld
17433 \end_inset
17434
17435
17436 \family typewriter
17437 cmd
17438 \family default
17439
17440 \begin_inset Quotes erd
17441 \end_inset
17442
17443 .
17444 \end_layout
17445
17446 \begin_layout Enumerate
17447
17448 \size small
17449 Wrong length of dash may have been used.
17450 \end_layout
17451
17452 \begin_layout Enumerate
17453
17454 \size small
17455 \emph on
17456 \begin_inset Quotes eld
17457 \end_inset
17458
17459
17460 \family typewriter
17461 %s
17462 \family default
17463
17464 \begin_inset Quotes erd
17465 \end_inset
17466
17467  expected, found 
17468 \begin_inset Quotes eld
17469 \end_inset
17470
17471
17472 \family typewriter
17473 %s
17474 \family default
17475
17476 \begin_inset Quotes erd
17477 \end_inset
17478
17479 .
17480 \end_layout
17481
17482 \begin_layout Enumerate
17483
17484 \size small
17485 Solo 
17486 \begin_inset Quotes eld
17487 \end_inset
17488
17489
17490 \family typewriter
17491 %s
17492 \family default
17493
17494 \begin_inset Quotes erd
17495 \end_inset
17496
17497  found.
17498 \end_layout
17499
17500 \begin_layout Enumerate
17501
17502 \size small
17503 You should use 
17504 \begin_inset Quotes eld
17505 \end_inset
17506
17507
17508 \family typewriter
17509 %s
17510 \family default
17511
17512 \begin_inset Quotes erd
17513 \end_inset
17514
17515  to achieve an ellipsis.
17516 \end_layout
17517
17518 \begin_layout Enumerate
17519
17520 \size small
17521 Inter-word spacing (
17522 \begin_inset Quotes eld
17523 \end_inset
17524
17525
17526 \family typewriter
17527
17528 \backslash
17529
17530 \family default
17531  
17532 \begin_inset Quotes eld
17533 \end_inset
17534
17535 ) should perhaps be used.
17536 \end_layout
17537
17538 \begin_layout Enumerate
17539
17540 \size small
17541 Inter-sentence spacing (
17542 \begin_inset Quotes eld
17543 \end_inset
17544
17545
17546 \family typewriter
17547
17548 \backslash
17549 @
17550 \family default
17551
17552 \begin_inset Quotes erd
17553 \end_inset
17554
17555 ) should perhaps be used.
17556 \end_layout
17557
17558 \begin_layout Enumerate
17559
17560 \size small
17561 Could not find argument for command.
17562 \end_layout
17563
17564 \begin_layout Enumerate
17565
17566 \size small
17567 No match found for 
17568 \begin_inset Quotes eld
17569 \end_inset
17570
17571
17572 \family typewriter
17573 %s
17574 \family default
17575
17576 \begin_inset Quotes erd
17577 \end_inset
17578
17579 .
17580 \end_layout
17581
17582 \begin_layout Enumerate
17583
17584 \size small
17585 Math mode still on at end of LaTeX file.
17586 \end_layout
17587
17588 \begin_layout Enumerate
17589
17590 \size small
17591 Number of 
17592 \begin_inset Quotes eld
17593 \end_inset
17594
17595
17596 \family typewriter
17597 char
17598 \family default
17599
17600 \begin_inset Quotes erd
17601 \end_inset
17602
17603  doesn't match the number of 
17604 \begin_inset Quotes eld
17605 \end_inset
17606
17607
17608 \family typewriter
17609 char
17610 \family default
17611
17612 \begin_inset Quotes erd
17613 \end_inset
17614
17615 .
17616 \end_layout
17617
17618 \begin_layout Enumerate
17619
17620 \size small
17621 You should use either 
17622 \family typewriter
17623
17624 \begin_inset Quotes eld
17625 \end_inset
17626
17627
17628 \family default
17629  or 
17630 \family typewriter
17631
17632 \begin_inset Quotes erd
17633 \end_inset
17634
17635
17636 \family default
17637  as an alternative to 
17638 \begin_inset Quotes eld
17639 \end_inset
17640
17641
17642 \family typewriter
17643 "
17644 \family default
17645
17646 \begin_inset Quotes erd
17647 \end_inset
17648
17649 .
17650 \end_layout
17651
17652 \begin_layout Enumerate
17653
17654 \size small
17655 You should use "
17656 \family typewriter
17657 '
17658 \family default
17659 " (ASCII 39) instead of "
17660 \family typewriter
17661 ´
17662 \family default
17663 " (ASCII 180).
17664 \end_layout
17665
17666 \begin_layout Enumerate
17667
17668 \size small
17669 User-specified pattern found.
17670 \end_layout
17671
17672 \begin_layout Enumerate
17673
17674 \size small
17675 This command might not be intended.
17676 \end_layout
17677
17678 \begin_layout Enumerate
17679
17680 \size small
17681 \emph on
17682 Comment displayed.
17683 \end_layout
17684
17685 \begin_layout Enumerate
17686
17687 \size small
17688 Either 
17689 \family typewriter
17690 ''
17691 \backslash
17692 ,'
17693 \family default
17694  or 
17695 \family typewriter
17696 '
17697 \backslash
17698 ,''
17699 \family default
17700  will look better.
17701 \end_layout
17702
17703 \begin_layout Enumerate
17704
17705 \size small
17706 Delete this space to maintain correct page references.
17707 \end_layout
17708
17709 \begin_layout Enumerate
17710
17711 \size small
17712 \emph on
17713 You might wish to put this between a pair of 
17714 \begin_inset Quotes eld
17715 \end_inset
17716
17717
17718 \family typewriter
17719 {}
17720 \family default
17721
17722 \begin_inset Quotes erd
17723 \end_inset
17724
17725 .
17726 \end_layout
17727
17728 \begin_layout Enumerate
17729
17730 \size small
17731 You ought to remove spaces in front of punctuation.
17732 \end_layout
17733
17734 \begin_layout Enumerate
17735
17736 \size small
17737 Could not execute LaTeX command.
17738 \end_layout
17739
17740 \begin_layout Enumerate
17741
17742 \size small
17743 Don't use 
17744 \family typewriter
17745
17746 \backslash
17747 /
17748 \family default
17749  in front of small punctuation.
17750 \end_layout
17751
17752 \begin_layout Enumerate
17753
17754 \family typewriter
17755 \size small
17756 $
17757 \backslash
17758 times$
17759 \family default
17760  may look prettier here.
17761 \end_layout
17762
17763 \begin_layout Enumerate
17764
17765 \size small
17766 \emph on
17767 Multiple spaces detected in output.
17768 \end_layout
17769
17770 \begin_layout Enumerate
17771
17772 \size small
17773 This text may be ignored.
17774 \end_layout
17775
17776 \begin_layout Enumerate
17777
17778 \size small
17779 Use 
17780 \family typewriter
17781
17782 \begin_inset Quotes eld
17783 \end_inset
17784
17785
17786 \family default
17787  to begin quotation, not 
17788 \family typewriter
17789 '
17790 \family default
17791 .
17792 \end_layout
17793
17794 \begin_layout Enumerate
17795
17796 \size small
17797 Use 
17798 \family typewriter
17799 '
17800 \family default
17801  to end quotation, not 
17802 \family typewriter
17803
17804 \begin_inset Quotes eld
17805 \end_inset
17806
17807
17808 \family default
17809 .
17810 \end_layout
17811
17812 \begin_layout Enumerate
17813
17814 \size small
17815 Don't mix quotes.
17816 \end_layout
17817
17818 \begin_layout Enumerate
17819
17820 \size small
17821 You should perhaps use 
17822 \begin_inset Quotes eld
17823 \end_inset
17824
17825
17826 \family typewriter
17827 cmd
17828 \family default
17829
17830 \begin_inset Quotes erd
17831 \end_inset
17832
17833  instead.
17834 \end_layout
17835
17836 \begin_layout Enumerate
17837
17838 \size small
17839 You should put a space in front of/after parenthesis.
17840 \end_layout
17841
17842 \begin_layout Enumerate
17843
17844 \size small
17845 You should avoid spaces in front of/after parenthesis.
17846 \end_layout
17847
17848 \begin_layout Enumerate
17849
17850 \size small
17851 \emph on
17852 You should not use punctuation in front of/after quotes.
17853 \end_layout
17854
17855 \begin_layout Enumerate
17856
17857 \size small
17858 Double space found.
17859 \end_layout
17860
17861 \begin_layout Enumerate
17862
17863 \size small
17864 You should put punctuation outside inner/inside display math mode.
17865 \end_layout
17866
17867 \begin_layout Enumerate
17868
17869 \size small
17870 You ought to not use primitive TeX in LaTeX code.
17871 \end_layout
17872
17873 \begin_layout Enumerate
17874
17875 \size small
17876 You should remove spaces in front of 
17877 \begin_inset Quotes eld
17878 \end_inset
17879
17880
17881 \family typewriter
17882 %s
17883 \family default
17884
17885 \begin_inset Quotes erd
17886 \end_inset
17887
17888
17889 \end_layout
17890
17891 \begin_layout Enumerate
17892
17893 \size small
17894 \begin_inset Quotes eld
17895 \end_inset
17896
17897
17898 \family typewriter
17899 %s
17900 \family default
17901
17902 \begin_inset Quotes erd
17903 \end_inset
17904
17905  is normally not followed by 
17906 \begin_inset Quotes eld
17907 \end_inset
17908
17909
17910 \family typewriter
17911 %c
17912 \family default
17913
17914 \begin_inset Quotes erd
17915 \end_inset
17916
17917 .
17918 \end_layout
17919
17920 \begin_layout Standard
17921 In later versions of LyX, we hope to provide a more complete interface to
17922  this tool (and it's smaller cousin 
17923 \family typewriter
17924 lacheck
17925 \family default
17926 ) to exploit the full power of it.
17927  But it's not exactly useless as it is now: go try it on one of your existing
17928  documents of a certain length and be surprised.
17929 \end_layout
17930
17931 \begin_layout Section
17932 Version Control in LyX
17933 \end_layout
17934
17935 \begin_layout Standard
17936 by
17937 \noun on
17938  Lars Gullik Bjønnes, 
17939 \noun default
17940 updated by 
17941 \noun on
17942 Pavel Sanda
17943 \end_layout
17944
17945 \begin_layout Subsection
17946 Introduction
17947 \end_layout
17948
17949 \begin_layout Standard
17950 A friend of mine wanted to try LyX for a group project.
17951  When he didn't find support for version control or file locking, he dropped
17952  it.
17953  This angered me a bit, so I thought that I should at least make support
17954  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
17955  This has now been done.
17956  LyX now supports some of the most basic RCS commands.
17957  If you need to something a bit more sophisticated you will have to do that
17958  manually in an xterm.
17959 \end_layout
17960
17961 \begin_layout Standard
17962 Before you begin to use the version control features in LyX, you should
17963  read 
17964 \begin_inset Quotes eld
17965 \end_inset
17966
17967 rcsintro
17968 \begin_inset Quotes erd
17969 \end_inset
17970
17971  (a man file, read it with 
17972 \family typewriter
17973 man rcsintro
17974 \family default
17975 ).
17976  This file describes all the basic features of RCS.
17977  You should especially notice the comment about a RCS directory, and the
17978  notion of a master RCS file (the file ending in 
17979 \family typewriter
17980 ,v
17981 \family default
17982 ).
17983 \end_layout
17984
17985 \begin_layout Standard
17986 Later basic CVS/SVN support was added.
17987  You should be familiar with CVS/SVN usage before start using it under LyX.
17988  Most of the log messages are not currently displayed after operations -
17989  you can check them in terminal window if unsure.
17990 \end_layout
17991
17992 \begin_layout Standard
17993 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
17994  package—no guarantees are made for older versions.
17995 \end_layout
17996
17997 \begin_layout Standard
17998 For introducing your own external commands consult vc-command in the manual
17999  of LyX functions.
18000 \end_layout
18001
18002 \begin_layout Subsection
18003 RCS commands in LyX
18004 \end_layout
18005
18006 \begin_layout Standard
18007 The following sections describe the RCS commands supported by LyX.
18008  You can find them in the 
18009 \family sans
18010 File\SpecialChar \menuseparator
18011 Version
18012 \begin_inset space ~
18013 \end_inset
18014
18015 Control
18016 \family default
18017  submenu.
18018  LyX was tested against RCS 5.7.
18019 \end_layout
18020
18021 \begin_layout Subsubsection
18022
18023 \family sans
18024 Register
18025 \end_layout
18026
18027 \begin_layout Standard
18028 If your document is not under revision control, this is the only item shown
18029  in the menu.
18030  And if it is under revision control, the 
18031 \family sans
18032 Register
18033 \family default
18034  item is not visible.
18035  
18036 \end_layout
18037
18038 \begin_layout Standard
18039 This command registers your document with RCS (unless you are under the
18040  directory managed by CVS)\SpecialChar \@.
18041  You are asked interactively to supply an initial
18042  description of the document.
18043  The document is now set in Read-Only mode and you have to 
18044 \family sans
18045 Check
18046 \begin_inset space ~
18047 \end_inset
18048
18049 Out
18050 \begin_inset space ~
18051 \end_inset
18052
18053 For
18054 \begin_inset space ~
18055 \end_inset
18056
18057 Edit
18058 \family default
18059 , before making any changes to it.
18060  A document under revision control has a 
18061 \begin_inset Quotes eld
18062 \end_inset
18063
18064 [RCS:<version> <locker>]
18065 \begin_inset Quotes erd
18066 \end_inset
18067
18068  item tagged to the filename in the minibuffer.
18069 \end_layout
18070
18071 \begin_layout Standard
18072 RCS command that is run: 
18073 \family typewriter
18074 ci -q -u -i -t-"<initial description>" <file-name>
18075 \end_layout
18076
18077 \begin_layout Standard
18078 Read 
18079 \family typewriter
18080 man ci
18081 \family default
18082  to understand the switches.
18083  
18084 \end_layout
18085
18086 \begin_layout Subsubsection
18087
18088 \family sans
18089 Check In Changes
18090 \end_layout
18091
18092 \begin_layout Standard
18093 When you are finished editing a file, you check in your changes.
18094  When you do this, you are asked for a description of the changes.
18095  This is stored in the history log.
18096  The version number is bumped, your changes are applied to the master RCS
18097  file, the document is unlocked and set to Read-Only mode.
18098  
18099 \end_layout
18100
18101 \begin_layout Standard
18102 RCS command: 
18103 \family typewriter
18104 ci -q -u -m"<description>" <file-name>
18105 \end_layout
18106
18107 \begin_layout Subsubsection
18108
18109 \family sans
18110 Check Out For Edit
18111 \end_layout
18112
18113 \begin_layout Standard
18114 By doing this you lock the document so that only you can edit it.
18115  This will also make the document Read-Write only for you.
18116  You will usually continue editing for a while and when you are finished
18117  you check in your changes.
18118  The status line is changed to reflect that you have locked the file.
18119  
18120 \end_layout
18121
18122 \begin_layout Standard
18123 RCS command: 
18124 \family typewriter
18125 co -q -l <file-name>
18126 \end_layout
18127
18128 \begin_layout Subsubsection
18129
18130 \family sans
18131 Revert To Repository Version
18132 \end_layout
18133
18134 \begin_layout Standard
18135 This will discard all changes made to the document since the last check
18136  in.
18137  You get a warning before changes are discarded.
18138 \end_layout
18139
18140 \begin_layout Standard
18141 RCS command: 
18142 \family typewriter
18143 co -f -u<version> <file-name>
18144 \end_layout
18145
18146 \begin_layout Subsubsection
18147
18148 \family sans
18149 Undo Last Checkin
18150 \end_layout
18151
18152 \begin_layout Standard
18153 This makes as if the last check in never happened.
18154  No changes are made to the document loaded into LyX, but the last version
18155  is removed from the master RCS file.
18156  
18157 \end_layout
18158
18159 \begin_layout Standard
18160 RCS command: 
18161 \family typewriter
18162 rcs -o<version> <file-name>
18163 \end_layout
18164
18165 \begin_layout Subsubsection
18166
18167 \family sans
18168 Show History
18169 \end_layout
18170
18171 \begin_layout Standard
18172 This show the complete history of the RCS document.
18173  The output of 
18174 \family typewriter
18175 rlog <file-name>
18176 \family default
18177  is shown in a browser.
18178  See 
18179 \family typewriter
18180 man rlog
18181 \family default
18182  for more info.
18183 \end_layout
18184
18185 \begin_layout Subsection
18186 CVS commands in LyX
18187 \end_layout
18188
18189 \begin_layout Standard
18190 CVS is now partially supported by LyX.
18191  You can find the commands in the 
18192 \family sans
18193 File\SpecialChar \menuseparator
18194 Version
18195 \begin_inset space ~
18196 \end_inset
18197
18198 Control
18199 \family default
18200  submenu.
18201 \end_layout
18202
18203 \begin_layout Subsubsection
18204
18205 \family sans
18206 Register
18207 \end_layout
18208
18209 \begin_layout Standard
18210 If your document is not under revision control, this is the only item shown
18211  in the menu.
18212  And if it is under revision control, the 
18213 \family sans
18214 \bar under
18215 R
18216 \bar default
18217 egister
18218 \family default
18219  item is not visible.
18220  
18221 \end_layout
18222
18223 \begin_layout Standard
18224 This command registers in CVS your document ONLY in case you have already
18225  the documents directory under CVS control (in particular 
18226 \family typewriter
18227 CVS/Entries
18228 \family default
18229  file exists).
18230  This means you have to checkout the archive by yourself.
18231  
18232 \end_layout
18233
18234 \begin_layout Standard
18235 Then you are asked interactively to supply an initial description of the
18236  document.
18237  Don't forget that registered file is not yet commited.
18238 \end_layout
18239
18240 \begin_layout Standard
18241 CVS command that is run: 
18242 \family typewriter
18243 cvs -q add -m
18244 \begin_inset Quotes erd
18245 \end_inset
18246
18247 <entered message>" 
18248 \begin_inset Quotes eld
18249 \end_inset
18250
18251 <file-name>
18252 \begin_inset Quotes erd
18253 \end_inset
18254
18255
18256 \end_layout
18257
18258 \begin_layout Standard
18259 Read 
18260 \family typewriter
18261 man svn
18262 \family default
18263  to understand the switches.
18264  
18265 \end_layout
18266
18267 \begin_layout Subsubsection
18268
18269 \family sans
18270 Check In Changes
18271 \end_layout
18272
18273 \begin_layout Standard
18274 When you are finished editing a file, you commit your changes.
18275  When you do this, you are asked for a description of the changes.
18276  After that changes are commited.
18277 \end_layout
18278
18279 \begin_layout Standard
18280 CVS command: 
18281 \family typewriter
18282 cvs -q commit -m"<description>" "<file-name>"
18283 \end_layout
18284
18285 \begin_layout Subsubsection
18286
18287 \family sans
18288 Revert To Repository Version
18289 \end_layout
18290
18291 \begin_layout Standard
18292 This will discard all changes made to the document since the last check
18293  in.
18294  You get a warning before changes are discarded.
18295  Firstly the file is deleted, secondly CVS update command is run.
18296 \end_layout
18297
18298 \begin_layout Standard
18299 CVS command: 
18300 \family typewriter
18301 cvs update 
18302 \begin_inset Quotes eld
18303 \end_inset
18304
18305 <file-name>
18306 \begin_inset Quotes erd
18307 \end_inset
18308
18309
18310 \end_layout
18311
18312 \begin_layout Subsubsection
18313
18314 \family sans
18315 Show History
18316 \end_layout
18317
18318 \begin_layout Standard
18319 This show the complete history of the CVS document.
18320  The output of 
18321 \family typewriter
18322 cvs log 
18323 \begin_inset Quotes eld
18324 \end_inset
18325
18326 <file-name>
18327 \begin_inset Quotes erd
18328 \end_inset
18329
18330
18331 \family default
18332  is shown in a browser.
18333 \end_layout
18334
18335 \begin_layout Subsection
18336 SVN commands in LyX
18337 \end_layout
18338
18339 \begin_layout Standard
18340 SVN is now partially supported by LyX.
18341  You can find the commands in the 
18342 \family sans
18343 File\SpecialChar \menuseparator
18344 Version
18345 \begin_inset space ~
18346 \end_inset
18347
18348 Control
18349 \family default
18350  submenu.
18351  Please note that if you use password protected access to repository via
18352  ssh, you will be asked in terminal window.
18353  LyX was tested against SVN 1.5 and 1.6
18354 \begin_inset Foot
18355 status collapsed
18356
18357 \begin_layout Plain Layout
18358 Most of the commands will work with 1.4 too, see 
18359 \begin_inset CommandInset ref
18360 LatexCommand ref
18361 reference "sub:SVN-Repo-Update"
18362
18363 \end_inset
18364
18365 .
18366 \end_layout
18367
18368 \end_inset
18369
18370
18371 \end_layout
18372
18373 \begin_layout Subsubsection
18374
18375 \family sans
18376 Register
18377 \end_layout
18378
18379 \begin_layout Standard
18380 If your document is not under revision control, this is the only item shown
18381  in the menu.
18382  And if it is under revision control, the 
18383 \family sans
18384 \bar under
18385 R
18386 \bar default
18387 egister
18388 \family default
18389  item is not visible.
18390  
18391 \end_layout
18392
18393 \begin_layout Standard
18394 This command registers in SVN your document ONLY in case you have already
18395  the documents directory under SVN control (in particular 
18396 \family typewriter
18397 .svn/entries
18398 \family default
18399  file exists).
18400  This means you have to checkout the archive by yourself.
18401  
18402 \end_layout
18403
18404 \begin_layout Standard
18405 Then you are asked interactively to supply an initial description of the
18406  document.
18407  Don't forget that registered file is not yet commited.
18408 \end_layout
18409
18410 \begin_layout Standard
18411 SVN command that is run: 
18412 \family typewriter
18413 svn add -q 
18414 \begin_inset Quotes eld
18415 \end_inset
18416
18417 <file-name>
18418 \begin_inset Quotes erd
18419 \end_inset
18420
18421
18422 \end_layout
18423
18424 \begin_layout Standard
18425 Read 
18426 \family typewriter
18427 man svn
18428 \family default
18429  to understand the switches.
18430  
18431 \end_layout
18432
18433 \begin_layout Subsubsection
18434
18435 \family sans
18436 Check In Changes
18437 \end_layout
18438
18439 \begin_layout Standard
18440 When you are finished editing a file, you commit your changes.
18441  When you do this, you are asked for a description of the changes.
18442  After that changes are commited.
18443 \end_layout
18444
18445 \begin_layout Standard
18446 SVN command:
18447 \begin_inset Foot
18448 status collapsed
18449
18450 \begin_layout Plain Layout
18451 In case locking is not enabled.
18452  See Section 
18453 \begin_inset CommandInset ref
18454 LatexCommand ref
18455 reference "subsec:SVN-File-Locking"
18456
18457 \end_inset
18458
18459 .
18460 \end_layout
18461
18462 \end_inset
18463
18464  
18465 \family typewriter
18466 svn commit -q -m"<description>" <file-name>
18467 \end_layout
18468
18469 \begin_layout Subsubsection
18470
18471 \family sans
18472 Check Out For Edit
18473 \end_layout
18474
18475 \begin_layout Standard
18476 Updates the changes of this file from the repository.
18477  Be sure you understand SVN merging and conflicts resolving before using
18478  this function, because all conflicts has to be resolved manually by you!
18479 \end_layout
18480
18481 \begin_layout Standard
18482 SVN command:
18483 \begin_inset Foot
18484 status collapsed
18485
18486 \begin_layout Plain Layout
18487 Ditto.
18488 \end_layout
18489
18490 \end_inset
18491
18492  
18493 \family typewriter
18494 svn update 
18495 \begin_inset Quotes eld
18496 \end_inset
18497
18498 <file-name>
18499 \begin_inset Quotes erd
18500 \end_inset
18501
18502
18503 \end_layout
18504
18505 \begin_layout Subsubsection
18506
18507 \family sans
18508 Revert To Repository Version
18509 \end_layout
18510
18511 \begin_layout Standard
18512 This will discard all changes made to the document since the last check
18513  in.
18514  You get a warning before changes are discarded.
18515  
18516 \end_layout
18517
18518 \begin_layout Standard
18519 SVN command: 
18520 \family typewriter
18521 svn revert -q 
18522 \begin_inset Quotes eld
18523 \end_inset
18524
18525 <file-name>
18526 \begin_inset Quotes erd
18527 \end_inset
18528
18529
18530 \end_layout
18531
18532 \begin_layout Subsubsection
18533 \begin_inset CommandInset label
18534 LatexCommand label
18535 name "sub:SVN-Repo-Update"
18536
18537 \end_inset
18538
18539 Update of the local directory checkout from repository
18540 \begin_inset Foot
18541 status collapsed
18542
18543 \begin_layout Plain Layout
18544 Note that this command will work only with subversion 
18545 \begin_inset Formula $\geqq1.5$
18546 \end_inset
18547
18548
18549 \end_layout
18550
18551 \end_inset
18552
18553
18554 \end_layout
18555
18556 \begin_layout Standard
18557 All the commands above have one shortcomming - they deal with the current
18558  document only.
18559  Once your document contains pictures, includes external 
18560 \begin_inset Flex CharStyle:Code
18561 status collapsed
18562
18563 \begin_layout Plain Layout
18564 .tex
18565 \end_layout
18566
18567 \end_inset
18568
18569  files and so on administration becomes more complicated.
18570  LyX now supports updating the whole tree in which resides the document
18571 \begin_inset Foot
18572 status collapsed
18573
18574 \begin_layout Plain Layout
18575 One need to organize the files structure so that all external files are
18576  in the same directory or subdirectories of the document.
18577  
18578 \end_layout
18579
18580 \end_inset
18581
18582 .
18583  This become especially useful once you cooperate with people which neither
18584  know about subversion management nor they have ambition to commit additional
18585  material to the repository.
18586  
18587 \end_layout
18588
18589 \begin_layout Standard
18590 \begin_inset Flex CharStyle:Code
18591 status collapsed
18592
18593 \begin_layout Plain Layout
18594 Update local directory from repository
18595 \end_layout
18596
18597 \end_inset
18598
18599  command updates the whole directory and in case of merge conflicts local
18600  version of the files are left, so no unintended data loss occurs.
18601  If local changes are detected user is warned before update starts.
18602 \end_layout
18603
18604 \begin_layout Labeling
18605 \labelwidthstring 00.00.0000
18606 SVN
18607 \begin_inset space ~
18608 \end_inset
18609
18610 commands: 
18611 \begin_inset space ~
18612 \end_inset
18613
18614
18615 \begin_inset Newline newline
18616 \end_inset
18617
18618
18619 \begin_inset Flex CharStyle:Code
18620 status collapsed
18621
18622 \begin_layout Plain Layout
18623 svn diff $path
18624 \end_layout
18625
18626 \end_inset
18627
18628  (Ask if changes are detected.)
18629 \begin_inset Newline newline
18630 \end_inset
18631
18632
18633 \begin_inset Flex CharStyle:Code
18634 status collapsed
18635
18636 \begin_layout Plain Layout
18637 svn update --accept mine-full $path
18638 \end_layout
18639
18640 \end_inset
18641
18642
18643 \end_layout
18644
18645 \begin_layout Standard
18646 where 
18647 \begin_inset Flex CharStyle:Code
18648 status collapsed
18649
18650 \begin_layout Plain Layout
18651 $path
18652 \end_layout
18653
18654 \end_inset
18655
18656  stands for the path to the document.
18657 \end_layout
18658
18659 \begin_layout Subsubsection
18660
18661 \family sans
18662 Show History
18663 \end_layout
18664
18665 \begin_layout Standard
18666 This show the complete history of the SVN document.
18667  The output of 
18668 \family typewriter
18669 svn log 
18670 \begin_inset Quotes eld
18671 \end_inset
18672
18673 <file-name>
18674 \begin_inset Quotes erd
18675 \end_inset
18676
18677
18678 \family default
18679  is shown in a browser.
18680 \end_layout
18681
18682 \begin_layout Subsubsection
18683 File Locking
18684 \begin_inset CommandInset label
18685 LatexCommand label
18686 name "subsec:SVN-File-Locking"
18687
18688 \end_inset
18689
18690
18691 \end_layout
18692
18693 \begin_layout Standard
18694 The file exchange through various revision control systems brings the problem
18695  of merge conflicts in case two different users try to edit the same (parts
18696  of) document.
18697  When such conflict happens it needs manual resolving and one reasonable
18698  alternative is to provide some kind of locking mechanism, which guarantees
18699  that only one user is allowed to edit file at the given time.
18700 \end_layout
18701
18702 \begin_layout Standard
18703 SVN has two mechanisms to provide such kind of mutual exclusivity for file
18704  access - locks and automatical setting of write permissions (see sec.
18705  
18706 \begin_inset CommandInset ref
18707 LatexCommand ref
18708 reference "subsec:Automatical-Locking-Property"
18709
18710 \end_inset
18711
18712 ) based on 
18713 \begin_inset Flex CharStyle:Code
18714 status collapsed
18715
18716 \begin_layout Plain Layout
18717 svn:needs-lock
18718 \end_layout
18719
18720 \end_inset
18721
18722  file svn property
18723 \begin_inset Foot
18724 status open
18725
18726 \begin_layout Plain Layout
18727 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
18728 \end_layout
18729
18730 \end_inset
18731
18732 .
18733  In a case this property is detected for a given document LyX starts to
18734  use SVN locks for document editing automatically and the whole check-in/out
18735  mechanism switches to the same regimen as for RCS.
18736  This in particular means there are two different modes how file is used
18737  in LyX:
18738 \end_layout
18739
18740 \begin_layout Itemize
18741 Unlocked state.
18742  The loaded file is in the read-only mode.
18743  For editation on needs to check-out.
18744  
18745 \emph on
18746 Check-out
18747 \emph default
18748  consists of update from repository and gaining write lock.
18749  If the lock is not possible to obtain, we remain in unlocked state.
18750 \end_layout
18751
18752 \begin_layout Itemize
18753 Locked state.
18754  The loaded file is in the 'normal' edit mode.
18755  No other user is allowed to edit the file.
18756  
18757 \emph on
18758 Check-in
18759 \emph default
18760  consists of commiting changes and releasing write-lock.
18761  If no changes have been made to the document, no commit will be produced
18762 \begin_inset Foot
18763 status collapsed
18764
18765 \begin_layout Plain Layout
18766 Don't be puzzled by the fact that you will be asked for commit message anyway.
18767 \end_layout
18768
18769 \end_inset
18770
18771  and only the write-lock will be released.
18772 \end_layout
18773
18774 \begin_layout Standard
18775 SVN commands:
18776 \end_layout
18777
18778 \begin_layout Labeling
18779 \labelwidthstring 00.00.0000
18780 Check-in:
18781 \family typewriter
18782  svn commit -q -m"<description>" "<file-name>"
18783 \begin_inset Newline newline
18784 \end_inset
18785
18786 svn unlock "<file-name>"
18787 \end_layout
18788
18789 \begin_layout Labeling
18790 \labelwidthstring 00.00.0000
18791 Check-out: 
18792 \family typewriter
18793 svn update "<file-name>"
18794 \begin_inset Newline newline
18795 \end_inset
18796
18797 svn lock "<file-name>"
18798 \end_layout
18799
18800 \begin_layout Subsubsection
18801
18802 \family typewriter
18803 \begin_inset CommandInset label
18804 LatexCommand label
18805 name "subsec:Automatical-Locking-Property"
18806
18807 \end_inset
18808
18809
18810 \family default
18811 Automatical Locking Property
18812 \end_layout
18813
18814 \begin_layout Standard
18815 The above mentioned automatical setting of write permissions of the .lyx
18816  file can be set through
18817 \family sans
18818 \bar under
18819  F
18820 \bar default
18821 ile\SpecialChar \menuseparator
18822
18823 \bar under
18824 V
18825 \bar default
18826 ersion
18827 \begin_inset space ~
18828 \end_inset
18829
18830 Control\SpecialChar \menuseparator
18831
18832 \bar under
18833 T
18834 \bar default
18835 oggle locking property
18836 \family default
18837 .
18838  This command is active only when the file is not locked on the svn server
18839  (i.e.
18840  you need to check-out before proceeding).
18841 \end_layout
18842
18843 \begin_layout Labeling
18844 \labelwidthstring 00.00.0000
18845 SVN
18846 \begin_inset space ~
18847 \end_inset
18848
18849 commands:
18850 \end_layout
18851
18852 \begin_layout Labeling
18853 \labelwidthstring 00.00.0000
18854 Set:
18855 \family typewriter
18856  svn propset svn:needs-lock ON "<file-name>"
18857 \end_layout
18858
18859 \begin_layout Labeling
18860 \labelwidthstring 00.00.0000
18861 Unset: 
18862 \family typewriter
18863 svn propdel svn:needs-lock "<file-name>"
18864 \end_layout
18865
18866 \begin_layout Subsubsection
18867 Revision Information in Documents
18868 \end_layout
18869
18870 \begin_layout Standard
18871 Currently there is no way how to provide such kind of information directly
18872  from LyX.
18873  There are possibilities how to activate it with the help of svn features,
18874  but each has its own drawbacks.
18875 \end_layout
18876
18877 \begin_layout Standard
18878 One possibility is to use svn keywords
18879 \begin_inset Foot
18880 status collapsed
18881
18882 \begin_layout Plain Layout
18883 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
18884 \end_layout
18885
18886 \end_inset
18887
18888 .
18889  In short -- you set file keywords property (e.g.
18890  
18891 \family sans
18892 svn propset svn:keywords 'Rev' file.lyx
18893 \family default
18894 ) and then paste keyword ERT
18895 \begin_inset Foot
18896 status collapsed
18897
18898 \begin_layout Plain Layout
18899 This is an easy way how to ensure that LyX won't break the line in the middle
18900  of keyword tag.
18901 \end_layout
18902
18903 \end_inset
18904
18905  tag in your document (e.g.
18906  
18907 \begin_inset ERT
18908 status open
18909
18910 \begin_layout Plain Layout
18911
18912 $Rev$
18913 \end_layout
18914
18915 \end_inset
18916
18917 ).
18918  This way svn client will automatically substitute revision number (e.g.
18919  
18920 \begin_inset ERT
18921 status open
18922
18923 \begin_layout Plain Layout
18924
18925 $Rev: 59 $
18926 \end_layout
18927
18928 \end_inset
18929
18930 ) after each update and commit.
18931  There are more problems with this approach.
18932  Firstly, the '$' character is used in TeX world for math equations, so
18933  any occurence of math formula 
18934 \begin_inset Formula $Rev$
18935 \end_inset
18936
18937  become 
18938 \begin_inset Formula $Rev:59$
18939 \end_inset
18940
18941  in your LyX document.
18942  Similarly for other keywords like Id, Date, Author, etc.
18943  Secondly svn output is dependent on your locales, so its very easy that
18944  svn would produce some problematic strings once Date is used.
18945  Thirdly you get the whole 'Rev: 59' string in your document instead of
18946  the plain number.
18947  Until subversion implements user's custom keywords it will be hard to use
18948  this approach reliably or let LyX to support it directly .
18949 \end_layout
18950
18951 \begin_layout Standard
18952 The second possibility would be to write your own external-material template
18953  which calls either 
18954 \begin_inset Flex CharStyle:Code
18955 status collapsed
18956
18957 \begin_layout Plain Layout
18958 svnversion
18959 \end_layout
18960
18961 \end_inset
18962
18963  utility or parses the output of 
18964 \begin_inset Flex CharStyle:Code
18965 status collapsed
18966
18967 \begin_layout Plain Layout
18968 svn info file.lyx
18969 \end_layout
18970
18971 \end_inset
18972
18973  command and returns the result back, when typeseting the document.
18974 \end_layout
18975
18976 \begin_layout Subsection
18977 SVN and Windows Environment
18978 \end_layout
18979
18980 \begin_layout Quote
18981 My inclination is to say that if the user cannot figure out the command
18982  line operations on their own fairly quickly, they would be well advised
18983  to use TortoiseSVN.
18984  ---P.
18985  A.
18986  Rubin
18987 \end_layout
18988
18989 \begin_layout Subsubsection
18990 Preparation
18991 \end_layout
18992
18993 \begin_layout Standard
18994 In addition to installing LyX, and having access to a Subversion repository,
18995  the user will need to install the Subversion client program.
18996  A Windows installer for the client program is available from 
18997 \begin_inset CommandInset href
18998 LatexCommand href
18999 name "CollabNet"
19000 target "http://www.collab.net/nonav/downloads/subversion/"
19001
19002 \end_inset
19003
19004 .
19005  The user may also want to install 
19006 \begin_inset CommandInset href
19007 LatexCommand href
19008 name "TortoiseSVN"
19009 target "http://tortoisesvn.tigris.org/"
19010
19011 \end_inset
19012
19013 , which integrates Subversion operations into the context (rightclick) menu
19014  of Windows Explorer.
19015  Operations done outside LyX will typically be more convenient using the
19016  Explorer context menu.
19017  Note that TortoiseSVN is not a replacement for the client program, which
19018  is what LyX itself will use.
19019 \end_layout
19020
19021 \begin_layout Subsubsection
19022 Bringing a document under Subversion control
19023 \end_layout
19024
19025 \begin_layout Standard
19026 Before a LyX document can be brought under version control in Subversion,
19027  its parent directory needs to be under version control.
19028  If the document is being added to a project already in the repository,
19029  this is accomplished by checking the project out to the directory where
19030  the new document will be placed.
19031  If the project itself is not yet under version control (for instance, if
19032  this document starts a new project), the directory must be imported into
19033  the repository.
19034  This is done outside LyX.
19035  Both import and checkout are easily accomplished from the Explorer context
19036  menu using TortoiseSVN, or alternatively can be done using the command
19037  line client at a DOS prompt.
19038  The procedure for importing the project using TortoiseSVN is described
19039  below, assuming an existing repository and a new project being started
19040  in 
19041 \family typewriter
19042 C:
19043 \backslash
19044 new project
19045 \family default
19046 .
19047  For information on using the Subversion client program, run 
19048 \family typewriter
19049 svn --help 
19050 \family default
19051 in a DOS shell.
19052 \end_layout
19053
19054 \begin_layout Enumerate
19055 Locate 
19056 \family typewriter
19057 C:
19058 \backslash
19059 new project 
19060 \family default
19061 in Windows Explorer, right click it, and select 
19062 \family typewriter
19063 TortoiseSVN > Repo-browser
19064 \family default
19065 .
19066  If necessary, adjust the URL for the repository, then click OK.
19067 \end_layout
19068
19069 \begin_layout Enumerate
19070 Right click the level of the repository under which you want to place the
19071  new project folder (typically the top level) and click 
19072 \family typewriter
19073 Create folder\SpecialChar \ldots{}
19074
19075 \family default
19076  Supply a name for the project folder and click OK.
19077  Add a message for the log file if desired, then click OK again.
19078  The new project folder should appear in the repository.
19079  Finally, click OK again to exit the repository browser.
19080 \end_layout
19081
19082 \begin_layout Enumerate
19083 Once again right click 
19084 \family typewriter
19085 C:
19086 \backslash
19087 new project
19088 \family default
19089 , this time selecting SVN Checkout\SpecialChar \ldots{}
19090  Select the URL of the project folder
19091  you just created in the repository, and set the checkout directory to 
19092 \family typewriter
19093 C:
19094 \backslash
19095 new project.
19096
19097 \family default
19098  Click OK.
19099  You will be warned about a non-empty folder; click OK to proceed.
19100  You should now have a 
19101 \family typewriter
19102 .svn
19103 \family default
19104  directory under 
19105 \family typewriter
19106 C:
19107 \backslash
19108 new project.
19109 \end_layout
19110
19111 \begin_layout Enumerate
19112 Create or open your document in LyX and click 
19113 \family sans
19114 \bar under
19115 F
19116 \bar default
19117 ile\SpecialChar \menuseparator
19118
19119 \bar under
19120 V
19121 \bar default
19122 ersion
19123 \begin_inset space ~
19124 \end_inset
19125
19126 Control\SpecialChar \menuseparator
19127
19128 \bar under
19129 R
19130 \bar default
19131 egister.
19132  
19133 \family default
19134 Add a log message and click OK to commit the document to version control.
19135 \end_layout
19136
19137 \begin_layout Standard
19138 From this point onward, you should have full functionality in the 
19139 \family sans
19140 \bar under
19141 F
19142 \bar default
19143 ile\SpecialChar \menuseparator
19144
19145 \bar under
19146 V
19147 \bar default
19148 ersion
19149 \begin_inset space ~
19150 \end_inset
19151
19152 Control
19153 \family default
19154  menu.
19155  You also have the option of checking the document in and out, viewing its
19156  history, etc.
19157  using the TortoiseSVN context menu in Windows Explorer or the Subversion
19158  client program from a command prompt.
19159 \end_layout
19160
19161 \begin_layout Subsection
19162 Further tuning
19163 \end_layout
19164
19165 \begin_layout Standard
19166 With the recent addition of the vc-command function LyX power users are
19167  allowed to create their own commands for revision control.
19168 \end_layout
19169
19170 \begin_layout Standard
19171 As an example you can see how two TortoiseSVN commands could be integrated
19172  directly:
19173 \end_layout
19174
19175 \begin_layout Description
19176 Commit: 
19177 \begin_inset Flex CharStyle:Code
19178 status collapsed
19179
19180 \begin_layout Plain Layout
19181 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
19182 \end_layout
19183
19184 \end_inset
19185
19186
19187 \end_layout
19188
19189 \begin_layout Description
19190 Revert: 
19191 \begin_inset Flex CharStyle:Code
19192 status collapsed
19193
19194 \begin_layout Plain Layout
19195 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
19196 \end_layout
19197
19198 \end_inset
19199
19200
19201 \end_layout
19202
19203 \begin_layout Section
19204 Literate Programming
19205 \end_layout
19206
19207 \begin_layout Standard
19208 Updated by 
19209 \noun on
19210 Kayvan Sylvan 
19211 \noun default
19212 (kayvan@sylvan.com)
19213 \noun on
19214
19215 \noun default
19216 original documentation written by 
19217 \noun on
19218 Edmar Wienskoski Jr.
19219
19220 \noun default
19221  (edmar-w-jr@technologist.com)
19222 \end_layout
19223
19224 \begin_layout Subsection
19225 Introduction
19226 \end_layout
19227
19228 \begin_layout Standard
19229 The main purpose of this documentation is to show you how to use LyX for
19230  literate programming.
19231  Where it is assumed that you are familiar with this programming technique,
19232  and know what 
19233 \begin_inset Quotes eld
19234 \end_inset
19235
19236 tangling
19237 \begin_inset Quotes erd
19238 \end_inset
19239
19240  and 
19241 \begin_inset Quotes eld
19242 \end_inset
19243
19244 weaving
19245 \begin_inset Quotes erd
19246 \end_inset
19247
19248  means.
19249  If that is not the case, please follow the web links provided in the following
19250  sections.
19251  There is a lot of good documentation out there covering old development
19252  history to the latest tools tips.
19253 \end_layout
19254
19255 \begin_layout Standard
19256 It is also assumed that you are familiar with LyX itself to a point that
19257  you are comfortable changing your LyX preferences, and X resources file.
19258  If that is not the case please refer to other LyX documentation to cover
19259  your specific needs.
19260 \end_layout
19261
19262 \begin_layout Subsection
19263 Literate Programming
19264 \end_layout
19265
19266 \begin_layout Standard
19267 From the Literate Programming FAQ: 
19268 \end_layout
19269
19270 \begin_layout Quotation
19271 Literate programming is the combination of documentation and source together
19272  in a fashion suited for reading by human beings.
19273  In fact, literate programs should be enjoyable reading, even inviting!
19274  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
19275  and documentation in a single file.
19276  Literate programming tools then parse the file to produce either readable
19277  documentation or compilable source.
19278  The WEB style of literate programming was created by D.
19279 \begin_inset space \thinspace{}
19280 \end_inset
19281
19282 g.
19283  Knuth during the development of his TeX typesetting software.
19284  
19285 \end_layout
19286
19287 \begin_layout Standard
19288 Another excerpt says:
19289 \end_layout
19290
19291 \begin_layout Quotation
19292
19293 \emph on
19294 How is literate programming different from verbose commenting?
19295 \end_layout
19296
19297 \begin_layout Quotation
19298 There are three distinguishing characteristics.
19299  In order of importance, they are: 
19300 \end_layout
19301
19302 \begin_deeper
19303 \begin_layout Itemize
19304 flexible order of elaboration 
19305 \end_layout
19306
19307 \begin_layout Itemize
19308 automatic support for browsing 
19309 \end_layout
19310
19311 \begin_layout Itemize
19312 typeset documentation, especially diagrams and mathematics 
19313 \end_layout
19314
19315 \end_deeper
19316 \begin_layout Standard
19317 Now that I sparked your curiosity, take a look in the references.
19318 \end_layout
19319
19320 \begin_layout Subsubsection
19321 References
19322 \end_layout
19323
19324 \begin_layout Standard
19325 The complete Literate Programming FAQ can be found at:
19326 \end_layout
19327
19328 \begin_layout Quote
19329 Literate Programming FAQ 
19330 \begin_inset Flex URL
19331 status collapsed
19332
19333 \begin_layout Plain Layout
19334
19335 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
19336 \end_layout
19337
19338 \end_inset
19339
19340
19341 \end_layout
19342
19343 \begin_layout Standard
19344 The FAQ lists 23 (twenty three!) different literate programming tools.
19345  Where some are specialized or 
19346 \begin_inset Quotes eld
19347 \end_inset
19348
19349 tailored
19350 \begin_inset Quotes erd
19351 \end_inset
19352
19353  for particular programming languages, while other have general scope.
19354  I selected 
19355 \noun on
19356 Noweb
19357 \noun default
19358  for my own use for several reasons:
19359 \end_layout
19360
19361 \begin_layout Itemize
19362 It can generate the documentation either in LaTeX or HTML.
19363 \end_layout
19364
19365 \begin_layout Itemize
19366 It has a open architecture, i.
19367 \begin_inset space \thinspace{}
19368 \end_inset
19369
19370 g.
19371 \begin_inset space \space{}
19372 \end_inset
19373
19374 it is easy to plug in new filters and to perform special processing that
19375  you may need.
19376  
19377 \end_layout
19378
19379 \begin_layout Itemize
19380 There is a good selection of filters available already (the HTML is one
19381  of them).
19382 \end_layout
19383
19384 \begin_layout Itemize
19385 It is free.
19386 \end_layout
19387
19388 \begin_layout Standard
19389 The Noweb web page can be found at: 
19390 \end_layout
19391
19392 \begin_layout Quote
19393 Noweb home page 
19394 \begin_inset Flex URL
19395 status collapsed
19396
19397 \begin_layout Plain Layout
19398
19399 http://www.cs.virginia.edu/~nr/noweb/
19400 \end_layout
19401
19402 \end_inset
19403
19404
19405 \end_layout
19406
19407 \begin_layout Standard
19408 Starting from there you can reach many other interesting links and even
19409  some literate program examples.
19410 \end_layout
19411
19412 \begin_layout Subsection
19413 LyX and Literate Programming
19414 \end_layout
19415
19416 \begin_layout Standard
19417 The LyX support for Literate Programming is provided by using the generic
19418  LyX converters mechanism.
19419  This support is provided in a 
19420 \begin_inset Quotes eld
19421 \end_inset
19422
19423 Noweb independent
19424 \begin_inset Quotes erd
19425 \end_inset
19426
19427  way, i.
19428 \begin_inset space \thinspace{}
19429 \end_inset
19430
19431 g.
19432 \begin_inset space \space{}
19433 \end_inset
19434
19435 you will be able to use this new LyX feature with some other literate programmin
19436 g tool of your choice by just changing your LyX preferences.
19437 \end_layout
19438
19439 \begin_layout Subsubsection
19440 Generating documents and code (weaving and tangling)
19441 \end_layout
19442
19443 \begin_layout Paragraph
19444 Selecting the document class
19445 \end_layout
19446
19447 \begin_layout Standard
19448 If you have installed Noweb and LyX successfully, whenever you open a new
19449  document or try to change the document class of an existing one, you will
19450  find that there are three new document classes available:
19451 \end_layout
19452
19453 \begin_layout Itemize
19454 Article (Noweb)
19455 \end_layout
19456
19457 \begin_layout Itemize
19458 Book (Noweb)
19459 \end_layout
19460
19461 \begin_layout Itemize
19462 Report (Noweb)
19463 \end_layout
19464
19465 \begin_layout Standard
19466 You must select one of them to create your literate documents from.
19467  
19468 \end_layout
19469
19470 \begin_layout Standard
19471 Note that literate documents are not limited to these three classes.
19472  New classes can be generated from other styles like letter or in combination
19473  with other class variations like Article (AMS).
19474  If you have special needs that cannot be covered by one of the existing
19475  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
19476  will arrange to insert a new entry, or teach you how to do it.
19477 \begin_inset Foot
19478 status collapsed
19479
19480 \begin_layout Plain Layout
19481 It is very simple, it involves the creation of a file with four lines, and
19482  re-running of the auto configuration.
19483 \end_layout
19484
19485 \end_inset
19486
19487  Moreover, if you use a literate tool other than Noweb you may need to create
19488  a new set of document classes for it.
19489 \end_layout
19490
19491 \begin_layout Paragraph
19492 Typing code in
19493 \end_layout
19494
19495 \begin_layout Standard
19496 LyX enables you to write code with a layout named 
19497 \noun on
19498 Scrap
19499 \noun default
19500 .
19501 \begin_inset Foot
19502 status collapsed
19503
19504 \begin_layout Plain Layout
19505 The equivalent Noweb term is 
19506 \begin_inset Quotes eld
19507 \end_inset
19508
19509 Chunk
19510 \begin_inset Quotes erd
19511 \end_inset
19512
19513 .
19514  For historical reasons, I got used to the term 
19515 \begin_inset Quotes eld
19516 \end_inset
19517
19518 scrap
19519 \begin_inset Quotes erd
19520 \end_inset
19521
19522  introduced by other literate tool named Nuweb, which I used for many years
19523  before rendering myself to Noweb.
19524 \end_layout
19525
19526 \end_inset
19527
19528  Noweb delimits scraps like this:
19529 \end_layout
19530
19531 \begin_layout LyX-Code
19532 <<My scrap>>=
19533 \end_layout
19534
19535 \begin_layout LyX-Code
19536   code
19537 \end_layout
19538
19539 \begin_layout LyX-Code
19540   more code
19541 \end_layout
19542
19543 \begin_layout LyX-Code
19544   even more code
19545 \end_layout
19546
19547 \begin_layout LyX-Code
19548   @
19549 \end_layout
19550
19551 \begin_layout Standard
19552 The problem is that whatever is written in between the << and the 
19553 \family typewriter
19554 @
19555 \family default
19556  must be taken literally, i.
19557 \begin_inset space \thinspace{}
19558 \end_inset
19559
19560 g.
19561 \begin_inset space \space{}
19562 \end_inset
19563
19564 LyX should be prevented from making any special interpretation of what has
19565  been written.
19566  This is handled by a special layout named Scrap, that works like a normal
19567  paragraph but has a free spacing capability.
19568 \end_layout
19569
19570 \begin_layout Standard
19571 The down side of the Scrap paragraph layout is that consecutive paragraphs
19572  of code will be spaced with one empty line in the source code and also
19573  in the printed documentation.
19574  The work around is to enter each line of code within a single Scrap, with
19575  a newline (ctrl-return).
19576  The example above will look like this:
19577 \begin_inset Foot
19578 status collapsed
19579
19580 \begin_layout Plain Layout
19581 If you have a printed version of this document you will not see any difference
19582  between the previous example and this one.
19583 \end_layout
19584
19585 \end_inset
19586
19587
19588 \end_layout
19589
19590 \begin_layout LyX-Code
19591 <<My scrap>>=
19592 \begin_inset Newline newline
19593 \end_inset
19594
19595   code
19596 \begin_inset Newline newline
19597 \end_inset
19598
19599   more code
19600 \begin_inset Newline newline
19601 \end_inset
19602
19603   even more code
19604 \begin_inset Newline newline
19605 \end_inset
19606
19607   @
19608 \end_layout
19609
19610 \begin_layout Standard
19611 This layout works fine.
19612  The only real inconvenience is that you have to type ctrl-return instead
19613  of a plain return.
19614 \begin_inset Foot
19615 status collapsed
19616
19617 \begin_layout Plain Layout
19618 It is in my list of 
19619 \begin_inset Quotes eld
19620 \end_inset
19621
19622 improvements
19623 \begin_inset Quotes erd
19624 \end_inset
19625
19626  to fix that.
19627 \end_layout
19628
19629 \end_inset
19630
19631
19632 \end_layout
19633
19634 \begin_layout Standard
19635 As a special note, you can also use the 
19636 \begin_inset Quotes eld
19637 \end_inset
19638
19639 %def
19640 \begin_inset Quotes erd
19641 \end_inset
19642
19643  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
19644 rence:
19645 \end_layout
19646
19647 \begin_layout LyX-Code
19648 <<My scrap>>=
19649 \begin_inset Newline newline
19650 \end_inset
19651
19652   def some_function(args):
19653 \begin_inset Newline newline
19654 \end_inset
19655
19656     "This is the doc string for this function."
19657 \begin_inset Newline newline
19658 \end_inset
19659
19660     print "My args: ", args
19661 \end_layout
19662
19663 \begin_layout LyX-Code
19664 @ %def some_function
19665 \end_layout
19666
19667 \begin_layout Standard
19668 For an example of this usage and the resulting cross-reference output, look
19669  at the Literate python program in 
19670 \emph on
19671 LIBDIR/examples/listerrors.lyx
19672 \emph default
19673  which should make this all clear.
19674 \end_layout
19675
19676 \begin_layout Paragraph
19677 Generating the documentation
19678 \end_layout
19679
19680 \begin_layout Standard
19681 At this point you already have a new document file with a proper document
19682  class, and with some code and text on it.
19683  How do I print it? The answer is simple, you select 
19684 \family sans
19685 View\SpecialChar \menuseparator
19686 DVI,
19687 \family default
19688  etc.
19689  Just like you would do for a plain document.
19690  No special procedure is required.
19691 \end_layout
19692
19693 \begin_layout Standard
19694 To help orientate you, I will now explain what happens inside LyX:
19695 \end_layout
19696
19697 \begin_layout Enumerate
19698 When the 
19699 \family sans
19700 Update\SpecialChar \menuseparator
19701 DVI
19702 \family default
19703  menu option is chosen, a LaTeX file is generated.
19704  
19705 \end_layout
19706
19707 \begin_deeper
19708 \begin_layout Standard
19709 If the document is of any literate class the generated file will be named
19710  with an extension name defined by the 
19711 \begin_inset Quotes eld
19712 \end_inset
19713
19714 literate
19715 \begin_inset Quotes erd
19716 \end_inset
19717
19718  format (defined in the Preferences panel), otherwise the file will have
19719  the usual 
19720 \family typewriter
19721 .tex
19722 \family default
19723  extension.
19724 \end_layout
19725
19726 \end_deeper
19727 \begin_layout Enumerate
19728 Note that the only difference so far is in the name of the file, no special
19729  processing is required by LyX.
19730  Given that you formatted the code using the Scrap layout that, by itself,
19731  takes care of the business.
19732 \end_layout
19733
19734 \begin_layout Enumerate
19735 If the document is of any literate class LyX will then use the internal
19736  LyX to Noweb converter, followed by the Noweb to LaTeX converter
19737 \begin_inset Foot
19738 status collapsed
19739
19740 \begin_layout Plain Layout
19741 The converters are defined in the 
19742 \family sans
19743 Tools\SpecialChar \menuseparator
19744 Preferences
19745 \family default
19746  panel, under the 
19747 \begin_inset Quotes eld
19748 \end_inset
19749
19750 Conversion
19751 \begin_inset Quotes erd
19752 \end_inset
19753
19754  tab.
19755  See section 
19756 \emph on
19757 Converters
19758 \emph default
19759  of the 
19760 \emph on
19761 Customization
19762 \emph default
19763  manual for general information about converters.
19764 \end_layout
19765
19766 \end_inset
19767
19768  to generate the LaTeX file.
19769 \end_layout
19770
19771 \begin_deeper
19772 \begin_layout Standard
19773 Otherwise it will just skip this step.
19774 \end_layout
19775
19776 \end_deeper
19777 \begin_layout Enumerate
19778 Finally, LaTeX is invoked and the regular post processing continues as in
19779  a plain document.
19780 \end_layout
19781
19782 \begin_layout Standard
19783 Independence from a particular 
19784 \begin_inset Quotes eld
19785 \end_inset
19786
19787 literate tool
19788 \begin_inset Quotes erd
19789 \end_inset
19790
19791  is easily achieved by changing the commands that are run by the various
19792  converters.
19793 \end_layout
19794
19795 \begin_layout Paragraph
19796 Generating the code
19797 \end_layout
19798
19799 \begin_layout Standard
19800 When the build menu option is chosen or the corresponding button in the
19801  toolbar is pressed, a LaTeX file is generated just like step 1 above.
19802  Next, LyX invokes the 
19803 \family typewriter
19804 Noweb->Program
19805 \family default
19806  converter.
19807  This converter needs to be defined by the user and is not installed by
19808  default, though the Program format is.
19809  This converter (like any other converter) will have two parts:
19810 \end_layout
19811
19812 \begin_layout Enumerate
19813 The converter program itself.
19814  This program performs the conversion from the one format to the other (in
19815  this case, from the Noweb format to the Program pseudo-format).
19816 \end_layout
19817
19818 \begin_layout Enumerate
19819 The error log parser.
19820  This is a program whose sole purpose is to rewrite error messages in a
19821  format that LyX understands.
19822  This makes it possible for LyX to place error boxes in the right places
19823  in the file buffer.
19824 \end_layout
19825
19826 \begin_layout Standard
19827 The first part, the 
19828 \begin_inset Quotes eld
19829 \end_inset
19830
19831 Converter
19832 \begin_inset Quotes erd
19833 \end_inset
19834
19835  setting, should be set to 
19836 \begin_inset Quotes eld
19837 \end_inset
19838
19839
19840 \family typewriter
19841 build-script $$i
19842 \family default
19843
19844 \begin_inset Quotes erd
19845 \end_inset
19846
19847 .
19848  This basically means that LyX will call 
19849 \begin_inset Quotes eld
19850 \end_inset
19851
19852 build-script
19853 \begin_inset Quotes erd
19854 \end_inset
19855
19856  (a program or script) with the name of the Noweb file (normally a file
19857  in the LyX temp directory).
19858  
19859 \end_layout
19860
19861 \begin_layout Standard
19862 This is an implementation of 
19863 \begin_inset Quotes eld
19864 \end_inset
19865
19866 build-script
19867 \begin_inset Quotes erd
19868 \end_inset
19869
19870  that you can place in a directory on your path:
19871 \end_layout
19872
19873 \begin_layout LyX-Code
19874 #!/bin/sh
19875 \end_layout
19876
19877 \begin_layout LyX-Code
19878 #
19879 \end_layout
19880
19881 \begin_layout LyX-Code
19882 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
19883 \end_layout
19884
19885 \begin_layout Standard
19886 The next part of the converter setting is the 
19887 \begin_inset Quotes eld
19888 \end_inset
19889
19890 Flags
19891 \begin_inset Quotes erd
19892 \end_inset
19893
19894  which is to be set to 
19895 \begin_inset Quotes eld
19896 \end_inset
19897
19898
19899 \family typewriter
19900 parselog=listerrors
19901 \family default
19902
19903 \begin_inset Quotes erd
19904 \end_inset
19905
19906 .
19907  This will run any errors that are generated by the 
19908 \begin_inset Quotes eld
19909 \end_inset
19910
19911 build-script
19912 \begin_inset Quotes erd
19913 \end_inset
19914
19915  process through the 
19916 \begin_inset Quotes eld
19917 \end_inset
19918
19919 listerrors
19920 \begin_inset Quotes erd
19921 \end_inset
19922
19923  program.
19924 \end_layout
19925
19926 \begin_layout Standard
19927 The converter code looks in 
19928 \emph on
19929 MYLYXDIR/scripts
19930 \emph default
19931  first, then in 
19932 \emph on
19933 LIBDIR/scripts
19934 \emph default
19935  then on the path for the 
19936 \begin_inset Quotes eld
19937 \end_inset
19938
19939 listerrors
19940 \begin_inset Quotes erd
19941 \end_inset
19942
19943  program.
19944 \end_layout
19945
19946 \begin_layout Standard
19947 The build will normally take place in LyX's temporary directory, so the
19948  files produced by the conversion will be in that directory.
19949  LyX will copy out what it regards as the `main' file, but the 
19950 \family typewriter
19951 Noweb->Program
19952 \family default
19953  conversion may produce several files, and so most of these would then be
19954  deleted when LyX was closed.
19955  The present solution is to use a `copier',
19956 \begin_inset Foot
19957 status collapsed
19958
19959 \begin_layout Plain Layout
19960 See section 
19961 \emph on
19962 Copiers
19963 \emph default
19964  of the 
19965 \emph on
19966 Customization
19967 \emph default
19968  manual for information on these.
19969 \end_layout
19970
19971 \end_inset
19972
19973  in this case, the 
19974 \family typewriter
19975 ext_copy.py
19976 \family default
19977  script in its default mode, so that the entire contents of the temporary
19978  directory is copied.
19979  More will get copied than is needed, to be sure, but nothing will be lost.
19980  If, however, you know what extensions the generated files will have, this
19981  can be improved by using the 
19982 \family typewriter
19983 -e
19984 \family default
19985  option to 
19986 \family typewriter
19987 ext_copy
19988 \family default
19989 .
19990  This option takes a comma-separated list of extensions to copy.
19991  So, for example, if the conversion will generate only files with the extensions
19992  
19993 \family typewriter
19994 .c
19995 \family default
19996  and 
19997 \family typewriter
19998 .h
19999 \family default
20000 , then the correct definition would be:
20001 \end_layout
20002
20003 \begin_layout LyX-Code
20004 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
20005 \end_layout
20006
20007 \begin_layout Standard
20008 The result will be that only files with these two extensions will be copied
20009  out.
20010 \end_layout
20011
20012 \begin_layout Paragraph
20013 Build instructions in the document
20014 \end_layout
20015
20016 \begin_layout Standard
20017 The last piece of the integration between LyX and noweb is the 
20018 \begin_inset Quotes eld
20019 \end_inset
20020
20021 build-script
20022 \begin_inset Quotes erd
20023 \end_inset
20024
20025  scrap.
20026  Generally, the instructions for building your program should be embedded
20027  in a scrap of its own.
20028  The noweb-specific 
20029 \begin_inset Quotes eld
20030 \end_inset
20031
20032 build-script
20033 \begin_inset Quotes erd
20034 \end_inset
20035
20036  above uses the notangle command to look for this scrap (called 
20037 \begin_inset Quotes eld
20038 \end_inset
20039
20040 build-script
20041 \begin_inset Quotes erd
20042 \end_inset
20043
20044 ) and runs its contents through 
20045 \begin_inset Quotes eld
20046 \end_inset
20047
20048 sh
20049 \begin_inset Quotes erd
20050 \end_inset
20051
20052 .
20053 \end_layout
20054
20055 \begin_layout Standard
20056 Typically, such a scrap would look something like this:
20057 \end_layout
20058
20059 \begin_layout LyX-Code
20060 <<build-script>>=
20061 \begin_inset Newline newline
20062 \end_inset
20063
20064 #!/bin/sh
20065 \begin_inset Newline newline
20066 \end_inset
20067
20068
20069 \begin_inset Newline newline
20070 \end_inset
20071
20072 if [ -z "${NOWEB_SOURCE}" ]
20073 \begin_inset Newline newline
20074 \end_inset
20075
20076 then
20077 \begin_inset Newline newline
20078 \end_inset
20079
20080   NOWEB_SOURCE=myfile.nw
20081 \begin_inset Newline newline
20082 \end_inset
20083
20084 fi
20085 \begin_inset Newline newline
20086 \end_inset
20087
20088 [...
20089  code to extract files ...]
20090 \begin_inset Newline newline
20091 \end_inset
20092
20093 [...
20094  code to compile files ...]
20095 \begin_inset Newline newline
20096 \end_inset
20097
20098 @
20099 \end_layout
20100
20101 \begin_layout Standard
20102 Look in 
20103 \emph on
20104 LIBDIR/examples/listerrors.lyx
20105 \emph default
20106  or in 
20107 \emph on
20108 LIBDIR/examples/Literate.lyx
20109 \emph default
20110  which implement two versions of the 
20111 \begin_inset Quotes eld
20112 \end_inset
20113
20114 listerrors
20115 \begin_inset Quotes erd
20116 \end_inset
20117
20118  program for some illustrations of how all of these pieces go together or
20119  in 
20120 \emph on
20121 LIBDIR/examples/noweb2lyx.lyx.
20122
20123 \emph default
20124  Interestingly, these three files show off the language-indepence of the
20125  LyX literate programming support since they are written in Python, C and
20126  Perl respectively.
20127 \end_layout
20128
20129 \begin_layout Subsubsection
20130 Configuring LyX
20131 \end_layout
20132
20133 \begin_layout Standard
20134 All the Literate Programming support is configured by the 
20135 \family sans
20136 Tools\SpecialChar \menuseparator
20137 Preferences
20138 \family default
20139  panel in the 
20140 \begin_inset Quotes eld
20141 \end_inset
20142
20143 Conversion
20144 \begin_inset Quotes erd
20145 \end_inset
20146
20147  tab.
20148  The important parts are:
20149 \end_layout
20150
20151 \begin_layout Description
20152 the
20153 \begin_inset space ~
20154 \end_inset
20155
20156
20157 \begin_inset Quotes eld
20158 \end_inset
20159
20160 literate
20161 \begin_inset Quotes erd
20162 \end_inset
20163
20164
20165 \begin_inset space ~
20166 \end_inset
20167
20168 format Set up via the Formats tab, this is where the Noweb-specific pieces
20169  are set up.
20170  The 
20171 \family sans
20172 GUI Name
20173 \family default
20174  is set to 
20175 \family typewriter
20176 NoWeb
20177 \family default
20178 , the file extension is set to 
20179 \family typewriter
20180 .nw
20181 \family default
20182 .
20183  This tells LyX to create a file with a 
20184 \family typewriter
20185 .nw
20186 \family default
20187  extension in the first step of the conversion process.
20188 \end_layout
20189
20190 \begin_layout Description
20191 the
20192 \begin_inset space ~
20193 \end_inset
20194
20195
20196 \family sans
20197 Program
20198 \family default
20199
20200 \begin_inset space ~
20201 \end_inset
20202
20203 format This is an empty format whose sole purpose is to be the endpoint
20204  of a conversion (which then allows us to set up a converter for it).
20205 \end_layout
20206
20207 \begin_layout Description
20208
20209 \family sans
20210 NoWeb
20211 \family default
20212 ->
20213 \family sans
20214 LaTeX
20215 \family default
20216  This converter performs the 
20217 \begin_inset Quotes eld
20218 \end_inset
20219
20220 weaving
20221 \begin_inset Quotes erd
20222 \end_inset
20223
20224  of the literate document.
20225  For Noweb, it is set to 
20226 \begin_inset Quotes eld
20227 \end_inset
20228
20229
20230 \family typewriter
20231 noweave -delay -index $$i > $$o
20232 \family default
20233
20234 \begin_inset Quotes erd
20235 \end_inset
20236
20237
20238 \end_layout
20239
20240 \begin_layout Description
20241
20242 \family sans
20243 NoWeb
20244 \family default
20245 ->
20246 \family sans
20247 Program
20248 \family default
20249  This performs the 
20250 \begin_inset Quotes eld
20251 \end_inset
20252
20253 tangling step
20254 \begin_inset Quotes erd
20255 \end_inset
20256
20257 .
20258  As stated above, the Converter is set to 
20259 \begin_inset Quotes eld
20260 \end_inset
20261
20262
20263 \family typewriter
20264 build-script $$i
20265 \family default
20266
20267 \begin_inset Quotes erd
20268 \end_inset
20269
20270 , with Flags set to 
20271 \begin_inset Quotes eld
20272 \end_inset
20273
20274
20275 \family typewriter
20276 originaldir,parselog=listerrors
20277 \family default
20278
20279 \begin_inset Quotes erd
20280 \end_inset
20281
20282 .
20283 \end_layout
20284
20285 \begin_layout Subsubsection
20286 Debug extensions
20287 \end_layout
20288
20289 \begin_layout Standard
20290 There is also a new function implemented in the LyX server, the 
20291 \begin_inset Quotes eld
20292 \end_inset
20293
20294 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
20295  
20296 \end_layout
20297
20298 \begin_layout Standard
20299 When debugging code with ddd/gdb, it is possible to invoke a text editor
20300  at the current execution position with a single key stroke.
20301  The default ddd configuration for that is shift-ctrl-V.
20302  It happens that you can define the editor command line invocation in ddd
20303  by accessing the 
20304 \family sans
20305 Edit\SpecialChar \menuseparator
20306 Preferences\SpecialChar \menuseparator
20307 Helpers
20308 \family default
20309  dialog and changing the "Edit Sources" entry.
20310 \end_layout
20311
20312 \begin_layout Standard
20313 I take advantage of the new created LyX server function and this ddd feature,
20314  and set 
20315 \begin_inset Quotes eld
20316 \end_inset
20317
20318 Edit Sources
20319 \begin_inset Quotes erd
20320 \end_inset
20321
20322  to:
20323 \end_layout
20324
20325 \begin_layout LyX-Code
20326 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
20327 \end_layout
20328
20329 \begin_layout Standard
20330 With this, whenever you are using ddd and find a point in the program that
20331  you want to edit, you just press shift-ctrl-V (in the ddd window), and
20332  ddd you forward this information to LyX through the LyX server and then
20333  the LyX window will show the same file with the cursor at the same position
20334  ddd was pointing to.
20335  No more guessing or long scrolling to locate a point in the program back
20336  from debugging !
20337 \end_layout
20338
20339 \begin_layout Standard
20340 Note however that you must enable the LyX server to get this feature working
20341  (it is disabled by default).
20342  You can enable it in 
20343 \family sans
20344 Preferences
20345 \family default
20346  (tabs 
20347 \family sans
20348 Inputs
20349 \family default
20350
20351 \family sans
20352 Paths
20353 \family default
20354 ) by entering in the 
20355 \family sans
20356 LyXserver pipe
20357 \family default
20358  a path like 
20359 \begin_inset Quotes eld
20360 \end_inset
20361
20362
20363 \family typewriter
20364 /home/<your-home-directory>/.lyx/lyxpipe
20365 \family default
20366
20367 \begin_inset Quotes erd
20368 \end_inset
20369
20370
20371 \end_layout
20372
20373 \begin_layout Standard
20374 Read the LyX server documentation in the 
20375 \emph on
20376 Customization Manual
20377 \emph default
20378  for further information.
20379 \end_layout
20380
20381 \begin_layout Subsubsection
20382 Toolbar extensions
20383 \end_layout
20384
20385 \begin_layout Standard
20386 There are six new buttons that can be added to your LyX toolbar.
20387  Five of these buttons are short cuts to layout styles: 
20388 \family sans
20389 Standard
20390 \family default
20391
20392 \family sans
20393 Section
20394 \family default
20395
20396 \family sans
20397 LaTeX
20398 \family default
20399
20400 \family sans
20401 LyX-Code
20402 \family default
20403 , and 
20404 \family sans
20405 Scrap
20406 \family default
20407 .
20408  The last one is a short cut to the 
20409 \begin_inset Quotes eld
20410 \end_inset
20411
20412 Build Program
20413 \begin_inset Quotes erd
20414 \end_inset
20415
20416  File menu entry.
20417  
20418 \end_layout
20419
20420 \begin_layout Standard
20421 LyX has a range of buttons that are available for tool bar customization.
20422  In my toolbar I like to combine the six short cuts above with two more:
20423  One for 
20424 \family sans
20425 View
20426 \family default
20427 \SpecialChar \menuseparator
20428
20429 \family sans
20430 Update
20431 \family default
20432 \SpecialChar \menuseparator
20433
20434 \family sans
20435 DVI
20436 \family default
20437  and the other for 
20438 \family sans
20439 View\SpecialChar \menuseparator
20440 DVI
20441 \family default
20442  File menu entries.
20443  Here is how it looks like:
20444 \end_layout
20445
20446 \begin_layout LyX-Code
20447 Toolbar
20448 \end_layout
20449
20450 \begin_layout LyX-Code
20451   Layouts
20452 \end_layout
20453
20454 \begin_layout LyX-Code
20455   Icon "layout Standard"
20456 \end_layout
20457
20458 \begin_layout LyX-Code
20459   Icon "layout Section"
20460 \end_layout
20461
20462 \begin_layout LyX-Code
20463   Icon "layout LaTeX"
20464 \end_layout
20465
20466 \begin_layout LyX-Code
20467   Icon "layout LyX-Code"
20468 \end_layout
20469
20470 \begin_layout LyX-Code
20471   Icon "layout Scrap"
20472 \end_layout
20473
20474 \begin_layout LyX-Code
20475   Separator
20476 \end_layout
20477
20478 \begin_layout LyX-Code
20479   Icon "buffer-view"
20480 \end_layout
20481
20482 \begin_layout LyX-Code
20483   Icon "buffer-typeset"
20484 \end_layout
20485
20486 \begin_layout LyX-Code
20487   Icon "build-program"
20488 \end_layout
20489
20490 \begin_layout LyX-Code
20491   Separator
20492 \end_layout
20493
20494 \begin_layout LyX-Code
20495 .
20496 \end_layout
20497
20498 \begin_layout LyX-Code
20499 .
20500 \end_layout
20501
20502 \begin_layout LyX-Code
20503 .
20504 \end_layout
20505
20506 \begin_layout LyX-Code
20507 End
20508 \end_layout
20509
20510 \begin_layout Subsubsection
20511 Colors customization
20512 \end_layout
20513
20514 \begin_layout Standard
20515 There are a number of colors in LyX that can be customized in 
20516 \family sans
20517 Preferences
20518 \family default
20519 .
20520  One of the things that bothers people is the LaTeX font color.
20521  The default color is red, since the scraps uses LaTeX font, and there is
20522  a lot of scraps in literate documents, you may get tired of seeing everything
20523  in red.
20524  You can change it by going to the tabs 
20525 \family sans
20526 Look&Feel
20527 \family default
20528
20529 \family sans
20530 Colors.
20531 \end_layout
20532
20533 \begin_layout Standard
20534 The next thing is the visible presence of the newline character in the screen.
20535  You can choose the color of this particular character and make it blend
20536  in the background.
20537  I recommend you choosing a color that is close to the background but not
20538  equal, that way you still can see it is there, but it is not bothering
20539  you anymore.
20540  
20541 \end_layout
20542
20543 \begin_layout Chapter
20544 Secrets of the LaTeX Masters
20545 \begin_inset CommandInset label
20546 LatexCommand label
20547 name "cha:secrets"
20548
20549 \end_inset
20550
20551
20552 \end_layout
20553
20554 \begin_layout Standard
20555 Though LyX is a powerful tool, it cannot hope to support everything that
20556  can be done with pure TeX/LaTeX.
20557  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
20558  as long as you are not afraid to use that 
20559 \begin_inset Quotes eld
20560 \end_inset
20561
20562 TeX
20563 \begin_inset Quotes erd
20564 \end_inset
20565
20566  button on the toolbar or add things to the LaTeX preamble.
20567  This section lists some tips, tricks, and otherwise cool ideas to give
20568  your document that extra little flair.
20569  
20570 \emph on
20571 Do try this at home
20572 \emph default
20573 , just start with something a little smaller and less important than your
20574  dissertation!
20575 \end_layout
20576
20577 \begin_layout Standard
20578 Most ideas in this section require less common files in your LaTeX installation.
20579  If you have a system like teTeX, most will already be available.
20580  A few, however, will need to be downloaded from one of the CTAN archives.
20581  Often, there are several ways to do something, or several LaTeX style files
20582  which do the same thing.
20583  We do not endorse one choice over another, we simply claim that we have
20584  done a particular task with a particular file.
20585  Put on your wizard hat, keep an eye out for dragons, and let us begin.
20586 \end_layout
20587
20588 \begin_layout Section
20589 Multiple Columns
20590 \end_layout
20591
20592 \begin_layout Standard
20593 by 
20594 \noun on
20595 Lars Gullik Bjønnes
20596 \end_layout
20597
20598 \begin_layout Subsection
20599 Purpose
20600 \end_layout
20601
20602 \begin_layout Standard
20603 The aim for this chapter
20604 \begin_inset Foot
20605 status collapsed
20606
20607 \begin_layout Plain Layout
20608 Editor's note: Lars' original chapter was a masterful description of how
20609  to use the 
20610 \family typewriter
20611 multicol
20612 \family default
20613  package.
20614  However, it was too long to flow smoothly in this document.
20615  I have therefore chosen to excerpt the most important sections here (sorry,
20616  Lars); you can read the original chapter (and more of the story!) in the
20617  example file 
20618 \family typewriter
20619 examples/multicol.lyx
20620 \family default
20621 .
20622  â€” mer
20623 \end_layout
20624
20625 \end_inset
20626
20627  is to show how the LaTeX package 
20628 \family typewriter
20629 multicol
20630 \family default
20631  can be used in a LyX document.
20632  As LyX doesn't support the 
20633 \family typewriter
20634 multicol
20635 \family default
20636  package natively yet, we have to use some small hacks.
20637  By reading this section it should be obvious how to do this.
20638 \end_layout
20639
20640 \begin_layout Subsection
20641 Limitations 
20642 \end_layout
20643
20644 \begin_layout Standard
20645 The 
20646 \family typewriter
20647 multicol
20648 \family default
20649  package allows switching between one and multicolumn format on the same
20650  page.
20651  Footnotes are handled correctly (for the most part), but will be placed
20652  at the bottom of the page and not under each column.
20653  LaTeX's float mechanism, however, is partly disabled in the current implementat
20654 ion.
20655  At the moment only page-wide floats can be used within the scope of the
20656  environment.
20657 \end_layout
20658
20659 \begin_layout Subsection
20660 Examples
20661 \end_layout
20662
20663 \begin_layout Subsubsection
20664 Two columns
20665 \end_layout
20666
20667 \begin_layout Standard
20668 If you want to have two columns in your text, you have use LaTeX mode to
20669  insert 
20670 \family typewriter
20671
20672 \backslash
20673 begin{multicols}{2}
20674 \family default
20675  at the point where you want the two column layout to start, and then 
20676 \family typewriter
20677
20678 \backslash
20679 end{multicols}
20680 \family default
20681  where you want it to end.
20682  Like this:
20683 \end_layout
20684
20685 \begin_layout Standard
20686 \begin_inset ERT
20687 status open
20688
20689 \begin_layout Plain Layout
20690
20691
20692 \backslash
20693 begin{multicols}{2}
20694 \end_layout
20695
20696 \end_inset
20697
20698
20699 \end_layout
20700
20701 \begin_layout Standard
20702 \noindent
20703
20704 \series bold
20705 \size small
20706 The Adventure of the Empty House
20707 \series default
20708
20709 \begin_inset Newline newline
20710 \end_inset
20711
20712 by 
20713 \noun on
20714 Sir Arthur Conan Doyle
20715 \end_layout
20716
20717 \begin_layout Standard
20718
20719 \size small
20720 It was in the spring of the year 1894 that all London was interested, and
20721  the fashionable world dismayed, by the murder of the Honourable Ronald
20722  Adair under most unusual and inexplicable circumstances.
20723  The public has already learned those particulars of the crime which came
20724  out in the police investigation, but a good deal was suppressed upon that
20725  occasion, since the case for the prosecution was so overwhelmingly strong
20726  that it was not necessary to bring forward all the facts.
20727  Only now, at the end of nearly ten years, am I allowed to supply those
20728  missing links which make up the whole of that remarkable chain.
20729  The crime was of interest in itself, but that interest was as nothing to
20730  me compared to the inconceivable sequel, which afforded me the greatest
20731  shock and surprise of any event in my adventurous life.
20732  Even now, after this long interval, I find myself thrilling as I think
20733  of it, and feeling once more that sudden flood of joy, amazement, and increduli
20734 ty which utterly submerged my mind.
20735  Let me say to that public, which has shown some interest in those glimpses
20736  which I have occasionally given them of the thoughts and actions of a very
20737  remarkable man, that they are not to blame me if I have not shared my knowledge
20738  with them, for I should have considered it my first duty to do so, had
20739  I not been barred by a positive prohibition from his own lips, which was
20740  only withdrawn upon the third of last month.
20741 \end_layout
20742
20743 \begin_layout Standard
20744 \begin_inset ERT
20745 status open
20746
20747 \begin_layout Plain Layout
20748
20749
20750 \backslash
20751 end{multicols}
20752 \end_layout
20753
20754 \end_inset
20755
20756
20757 \end_layout
20758
20759 \begin_layout Subsubsection
20760 Multiple columns
20761 \end_layout
20762
20763 \begin_layout Standard
20764 The same pattern is used when you want more than two columns:
20765 \end_layout
20766
20767 \begin_layout Standard
20768 \begin_inset ERT
20769 status open
20770
20771 \begin_layout Plain Layout
20772
20773
20774 \backslash
20775 begin{multicols}{3}
20776 \end_layout
20777
20778 \end_inset
20779
20780
20781 \end_layout
20782
20783 \begin_layout Standard
20784
20785 \size footnotesize
20786 It can be imagined that my close intimacy with Sherlock Holmes had interested
20787  me deeply in crime, and that after his disappearance I never failed to
20788  read with care the various problems which came before the public.
20789  And I even attempted, more than once, for my own private satisfaction,
20790  to employ his methods in their solution, though with indifferent success.
20791  There was none, however, which appealed to me like this tragedy of Ronald
20792  Adair.
20793  As I read the evidence at the inquest, which led up to a verdict of willful
20794  murder against some person or persons unknown, I realized more clearly
20795  than I had ever done the loss which the community had sustained by the
20796  death of Sherlock Holmes.
20797  There were points about this strange business which would, I was sure,
20798  have specially appealed to him, and the efforts of the police would have
20799  been supplemented, or more probably anticipated, by the trained observation
20800  and the alert mind of the first criminal agent in Europe.
20801  All day, as I drove upon my round, I turned over the case in my mind and
20802  found no explanation which appeared to me to be adequate.
20803  At the risk of telling a twice-told tale, I will recapitulate the facts
20804  as they were known to the public at the conclusion of the inquest.
20805 \end_layout
20806
20807 \begin_layout Standard
20808 \begin_inset ERT
20809 status open
20810
20811 \begin_layout Plain Layout
20812
20813
20814 \backslash
20815 end{multicols}
20816 \end_layout
20817
20818 \end_inset
20819
20820
20821 \end_layout
20822
20823 \begin_layout Standard
20824 You can have more than 3 columns if you want to, but that might not be very
20825  pleasant for the eye.
20826 \end_layout
20827
20828 \begin_layout Subsubsection
20829 Columns inside columns
20830 \end_layout
20831
20832 \begin_layout Standard
20833 You can even have columns inside columns:
20834 \end_layout
20835
20836 \begin_layout Standard
20837 \begin_inset ERT
20838 status open
20839
20840 \begin_layout Plain Layout
20841
20842
20843 \backslash
20844 begin{multicols}{2}
20845 \end_layout
20846
20847 \end_inset
20848
20849
20850 \end_layout
20851
20852 \begin_layout Standard
20853
20854 \size footnotesize
20855 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
20856  at that time governor of one of the Australian colonies.
20857  Adair's mother had returned from Australia to undergo the operation for
20858  cataract, and she, her son Ronald, and her daughter Hilda were living together
20859  at 427 Park Lane.
20860 \end_layout
20861
20862 \begin_layout Standard
20863 \begin_inset ERT
20864 status open
20865
20866 \begin_layout Plain Layout
20867
20868
20869 \backslash
20870 begin{multicols}{2}
20871 \end_layout
20872
20873 \end_inset
20874
20875
20876 \end_layout
20877
20878 \begin_layout Standard
20879
20880 \size footnotesize
20881 The youth moved in the best society–had, so far as was known, no enemies
20882  and no particular vices.
20883  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
20884  had been broken off by mutual consent some months before, and there was
20885  no sign that it had left any very profound feeling behind it.
20886  For the rest {sic} the man's life moved in a narrow and conventional circle,
20887  for his habits were quiet and his nature unemotional.
20888  Yet it was upon this easy-going young aristocrat that death came, in most
20889  strange and unexpected form, between the hours of ten and eleven-twenty
20890  on the night of March 30, 1894.
20891 \end_layout
20892
20893 \begin_layout Standard
20894 \begin_inset ERT
20895 status open
20896
20897 \begin_layout Plain Layout
20898
20899
20900 \backslash
20901 end{multicols}
20902 \end_layout
20903
20904 \end_inset
20905
20906
20907 \end_layout
20908
20909 \begin_layout Standard
20910
20911 \size footnotesize
20912 Ronald Adair was fond of cards–playing continually, but never for such stakes
20913  as would hurt him.
20914  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
20915  It was shown that, after dinner on the day of his death, he had played
20916  a rubber of whist at the latter club.
20917  He had also played there in the afternoon.
20918
20919 \size default
20920  
20921 \size footnotesize
20922 The evidence of those who had played with him– Mr.
20923  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
20924  and that there was a fairly equal fall of the cards.
20925  Adair might have lost five pounds, but not more.
20926  His fortune was a considerable one, and such a loss could not in any way
20927  affect him.
20928  He had played nearly every day at one club or other, but he was a cautious
20929  player, and usually rose a winner.
20930  It came out in evidence that, in partnership with Colonel Moran, he had
20931  actually won as much as four hundred and twenty pounds in a sitting, some
20932  weeks before, from Godfrey Milner and Lord Balmoral.
20933  So much for his recent history as it came out at the inquest.
20934 \end_layout
20935
20936 \begin_layout Standard
20937 \begin_inset ERT
20938 status open
20939
20940 \begin_layout Plain Layout
20941
20942
20943 \backslash
20944 end{multicols}
20945 \end_layout
20946
20947 \end_inset
20948
20949
20950 \end_layout
20951
20952 \begin_layout Standard
20953 Please do read the file 
20954 \family typewriter
20955 examples/multicol.lyx
20956 \family default
20957  for more advanced examples including column and header spacing, vertical
20958  separator lines, and more.
20959 \end_layout
20960
20961 \begin_layout Section
20962 Numbering in the 
20963 \family sans
20964 Enumerate
20965 \family default
20966  Paragraph Environment
20967 \begin_inset OptArg
20968 status collapsed
20969
20970 \begin_layout Plain Layout
20971 Numbering in Enumerate
20972 \end_layout
20973
20974 \end_inset
20975
20976
20977 \end_layout
20978
20979 \begin_layout Standard
20980 by 
20981 \noun on
20982 John Weiss
20983 \end_layout
20984
20985 \begin_layout Standard
20986 \begin_inset VSpace bigskip
20987 \end_inset
20988
20989
20990 \end_layout
20991
20992 \begin_layout Standard
20993 \noindent
20994 The default numbering for the 
20995 \family sans
20996 Enumerate
20997 \family default
20998  paragraph environment begins with Arabic numbers and ends with uppercase
20999  letters.
21000  Suppose, however, you wanted a different type of numbering scheme.
21001  Here's a quickie example of how to change the numbering scheme:
21002 \end_layout
21003
21004 \begin_layout LyX-Code
21005
21006 \backslash
21007 renewcommand{
21008 \backslash
21009 labelenumi}{
21010 \backslash
21011 Roman{enumi}.}
21012 \end_layout
21013
21014 \begin_layout LyX-Code
21015
21016 \backslash
21017 renewcommand{
21018 \backslash
21019 labelenumii}{
21020 \backslash
21021 Alph{enumii}.}
21022 \end_layout
21023
21024 \begin_layout LyX-Code
21025
21026 \backslash
21027 renewcommand{
21028 \backslash
21029 labelenumiii}{
21030 \backslash
21031 arabic{enumiii}.}
21032 \end_layout
21033
21034 \begin_layout LyX-Code
21035
21036 \backslash
21037 renewcommand{
21038 \backslash
21039 labelenumiv}{
21040 \backslash
21041 alph{enumiv}.)}
21042 \end_layout
21043
21044 \begin_layout Standard
21045 \SpecialChar \ldots{}
21046  which changes the numbering scheme to uppercase Roman numerals, uppercase
21047  letters, Arabic numbers, and lowercase letter.
21048 \end_layout
21049
21050 \begin_layout Standard
21051 Additionally, the previous example also adds a little bit extra to the numbering
21052  scheme.
21053  For example, the first level label actually looks like: 
21054 \begin_inset Quotes eld
21055 \end_inset
21056
21057 I.
21058 \begin_inset Quotes erd
21059 \end_inset
21060
21061 .
21062  For ease of reading, we'll describe what the numbering schemes look like
21063  using a notation something like this: <
21064 \begin_inset Quotes eld
21065 \end_inset
21066
21067 I.
21068 \begin_inset Quotes erd
21069 \end_inset
21070
21071 ,
21072 \begin_inset space ~
21073 \end_inset
21074
21075
21076 \begin_inset Quotes erd
21077 \end_inset
21078
21079 A.
21080 \begin_inset Quotes erd
21081 \end_inset
21082
21083 ,
21084 \begin_inset space ~
21085 \end_inset
21086
21087
21088 \begin_inset Quotes erd
21089 \end_inset
21090
21091 1.
21092 \begin_inset Quotes erd
21093 \end_inset
21094
21095 ,
21096 \begin_inset space ~
21097 \end_inset
21098
21099
21100 \begin_inset Quotes eld
21101 \end_inset
21102
21103 a.)
21104 \begin_inset Quotes erd
21105 \end_inset
21106
21107 >.
21108  
21109 \end_layout
21110
21111 \begin_layout Standard
21112 As you can see in the example, there is a label command for each nesting
21113  level, 
21114 \family typewriter
21115
21116 \backslash
21117 labelenumi
21118 \family default
21119  \SpecialChar \ldots{}
21120  
21121 \family typewriter
21122
21123 \backslash
21124 labelenumiv
21125 \family default
21126 , as well as a counter, 
21127 \family typewriter
21128 enumi
21129 \family default
21130  \SpecialChar \ldots{}
21131  
21132 \family typewriter
21133 enumiv
21134 \family default
21135 .
21136  There are also five 
21137 \begin_inset Quotes eld
21138 \end_inset
21139
21140 number printing
21141 \begin_inset Quotes erd
21142 \end_inset
21143
21144  commands, 
21145 \family typewriter
21146
21147 \backslash
21148 arabic{}
21149 \family default
21150
21151 \family typewriter
21152
21153 \backslash
21154 roman{}
21155 \family default
21156
21157 \family typewriter
21158
21159 \backslash
21160 Roman{}
21161 \family default
21162
21163 \family typewriter
21164
21165 \backslash
21166 alph{}
21167 \family default
21168 , and 
21169 \family typewriter
21170
21171 \backslash
21172 Alph{}
21173 \family default
21174 , each of which take one counter as an argument.
21175  You can add characters before or after these, but there's no need to add
21176  spaces.
21177 \end_layout
21178
21179 \begin_layout Standard
21180 You can get really fancy with these.
21181  For example:
21182 \end_layout
21183
21184 \begin_layout LyX-Code
21185
21186 \backslash
21187 renewcommand{
21188 \backslash
21189 labelenumi}{
21190 \backslash
21191 #
21192 \backslash
21193 Alph{enumi}
21194 \backslash
21195 #}
21196 \end_layout
21197
21198 \begin_layout LyX-Code
21199
21200 \backslash
21201 renewcommand{
21202 \backslash
21203 labelenumii}{
21204 \backslash
21205 Alph{enumi}.
21206 \backslash
21207 arabic{enumii}}
21208 \end_layout
21209
21210 \begin_layout LyX-Code
21211
21212 \backslash
21213 renewcommand{
21214 \backslash
21215 labelenumiii}{
21216 \backslash
21217 alph{enumiii}+}
21218 \end_layout
21219
21220 \begin_layout LyX-Code
21221
21222 \backslash
21223 renewcommand{
21224 \backslash
21225 labelenumiv}{(
21226 \backslash
21227 roman{enumiv})}
21228 \end_layout
21229
21230 \begin_layout Standard
21231 produces the somewhat out of hand numbering scheme: <
21232 \begin_inset Quotes eld
21233 \end_inset
21234
21235 #A#
21236 \begin_inset Quotes erd
21237 \end_inset
21238
21239 ,
21240 \begin_inset space ~
21241 \end_inset
21242
21243
21244 \begin_inset Quotes erd
21245 \end_inset
21246
21247 A.1
21248 \begin_inset Quotes erd
21249 \end_inset
21250
21251 ,
21252 \begin_inset space ~
21253 \end_inset
21254
21255
21256 \begin_inset Quotes erd
21257 \end_inset
21258
21259 a+
21260 \begin_inset Quotes erd
21261 \end_inset
21262
21263 ,
21264 \begin_inset space ~
21265 \end_inset
21266
21267
21268 \begin_inset Quotes eld
21269 \end_inset
21270
21271 (i)
21272 \begin_inset Quotes erd
21273 \end_inset
21274
21275 >.
21276  
21277 \end_layout
21278
21279 \begin_layout Standard
21280
21281 \end_layout
21282
21283 \begin_layout Section
21284 Dropped Capitals
21285 \end_layout
21286
21287 \begin_layout Standard
21288 by 
21289 \noun on
21290 Mike Ressler
21291 \end_layout
21292
21293 \begin_layout Standard
21294 \begin_inset VSpace bigskip
21295 \end_inset
21296
21297
21298 \end_layout
21299
21300 \begin_layout Standard
21301 \noindent
21302 \begin_inset ERT
21303 status collapsed
21304
21305 \begin_layout Plain Layout
21306
21307
21308 \backslash
21309 newfont{
21310 \backslash
21311 tmpfont}{cmr17 scaled 2500}{
21312 \backslash
21313 tmpfont T}
21314 \backslash
21315 vspace*{-8.4ex}
21316 \end_layout
21317
21318 \end_inset
21319
21320
21321 \end_layout
21322
21323 \begin_layout Standard
21324 \noindent
21325 \begin_inset ERT
21326 status open
21327
21328 \begin_layout Plain Layout
21329
21330
21331 \backslash
21332 hangindent=3.3em 
21333 \backslash
21334 hangafter=-3
21335 \end_layout
21336
21337 \end_inset
21338
21339  hose of you who like the style of old books probably also like 
21340 \begin_inset Quotes eld
21341 \end_inset
21342
21343 dropped capitals
21344 \begin_inset Quotes erd
21345 \end_inset
21346
21347 —those large capital letters which begin each new chapter or section.
21348  Implementing them with plain LyX/LaTeX is straightforward (assuming you
21349  know some plain TeX!) but does require a lot of work and many iterations,
21350  as you can see by all the ugly TeX-mode stuff at the beginning of this
21351  paragraph.
21352 \end_layout
21353
21354 \begin_layout Standard
21355 \begin_inset ERT
21356 status open
21357
21358 \begin_layout Plain Layout
21359
21360
21361 \backslash
21362 verb+
21363 \backslash
21364 bigdrop{-1em}{3}{ptmri}{T}+
21365 \end_layout
21366
21367 \end_inset
21368
21369 here is a much easier way of doing this, of course.
21370  The 
21371 \family typewriter
21372 dropcaps
21373 \family default
21374  (or the newer 
21375 \family typewriter
21376 dropping
21377 \family default
21378 ) package from CTAN allows a simple way to add such letters to your documents.
21379  Since this package is not a standard part of teTeX, I can't demonstrate
21380  it within this document, but if you copy this paragraph to a new document,
21381  delete the 
21382 \begin_inset Quotes eld
21383 \end_inset
21384
21385
21386 \family typewriter
21387
21388 \backslash
21389 verb
21390 \family default
21391
21392 \begin_inset Quotes erd
21393 \end_inset
21394
21395  and the pluses from the TeX code at the beginning of the paragraph, and
21396  add 
21397 \family typewriter
21398
21399 \backslash
21400 usepackage{dropcaps}
21401 \family default
21402  to your LaTeX preamble, you will get a nice Times Roman Italic 
21403 \begin_inset Quotes eld
21404 \end_inset
21405
21406 T
21407 \begin_inset Quotes erd
21408 \end_inset
21409
21410 , whose height is three lines of text and which protrudes 1 em into the
21411  margin.
21412  (Make certain you have copied 
21413 \begin_inset Quotes eld
21414 \end_inset
21415
21416
21417 \family typewriter
21418 dropcaps.sty
21419 \family default
21420
21421 \begin_inset Quotes erd
21422 \end_inset
21423
21424  into a directory where TeX can see it.) The first argument is the amount
21425  of indentation; in this case the negative sign moves it into the margin.
21426  The second argument is the height of the letter in number of lines of text.
21427  The third argument is the font name: virtually anything which has a tfm
21428  file should work (wade through the 
21429 \family typewriter
21430 .../texmf/fonts/tfm
21431 \family default
21432  directory for possibilities).
21433  My personal favorite is 
21434 \begin_inset Quotes eld
21435 \end_inset
21436
21437
21438 \family typewriter
21439 yinit
21440 \family default
21441
21442 \begin_inset Quotes erd
21443 \end_inset
21444
21445 , a fancy German font specifically designed for dropped capitals.
21446  The fourth argument is the letter (or letters) to be dropped.
21447  The 
21448 \family typewriter
21449 dropping
21450 \family default
21451  package also offers the 
21452 \family typewriter
21453
21454 \backslash
21455 bigdrop
21456 \family default
21457  command, as well as a slightly simplified 
21458 \family typewriter
21459
21460 \backslash
21461 dropping
21462 \family default
21463  command.
21464 \end_layout
21465
21466 \begin_layout Section
21467 Non-standard Paragraph Shapes
21468 \end_layout
21469
21470 \begin_layout Standard
21471 by 
21472 \noun on
21473 Mike Ressler
21474 \end_layout
21475
21476 \begin_layout Standard
21477 \begin_inset VSpace bigskip
21478 \end_inset
21479
21480
21481 \end_layout
21482
21483 \begin_layout Standard
21484 \begin_inset ERT
21485 status collapsed
21486
21487 \begin_layout Plain Layout
21488
21489
21490 \backslash
21491 begin{sloppypar}
21492 \end_layout
21493
21494 \end_inset
21495
21496
21497 \end_layout
21498
21499 \begin_layout Standard
21500 \begin_inset ERT
21501 status collapsed
21502
21503 \begin_layout Plain Layout
21504
21505
21506 \backslash
21507 newdimen
21508 \backslash
21509 varunit 
21510 \end_layout
21511
21512 \begin_layout Plain Layout
21513
21514
21515 \backslash
21516 setlength{
21517 \backslash
21518 varunit}{4.5in}
21519 \end_layout
21520
21521 \end_inset
21522
21523
21524 \end_layout
21525
21526 \begin_layout Standard
21527 \noindent
21528 \begin_inset ERT
21529 status collapsed
21530
21531 \begin_layout Plain Layout
21532
21533
21534 \backslash
21535 parshape 19 0.45
21536 \backslash
21537 varunit 0.332
21538 \backslash
21539 varunit
21540 \end_layout
21541
21542 \begin_layout Plain Layout
21543
21544 0.40
21545 \backslash
21546 varunit 0.300
21547 \backslash
21548 varunit
21549 \end_layout
21550
21551 \begin_layout Plain Layout
21552
21553 0.35
21554 \backslash
21555 varunit 0.293
21556 \backslash
21557 varunit
21558 \end_layout
21559
21560 \begin_layout Plain Layout
21561
21562 0.30
21563 \backslash
21564 varunit 0.300
21565 \backslash
21566 varunit
21567 \end_layout
21568
21569 \begin_layout Plain Layout
21570
21571 0.25
21572 \backslash
21573 varunit 0.317
21574 \backslash
21575 varunit
21576 \end_layout
21577
21578 \begin_layout Plain Layout
21579
21580 0.20
21581 \backslash
21582 varunit 0.342
21583 \backslash
21584 varunit
21585 \end_layout
21586
21587 \begin_layout Plain Layout
21588
21589 0.15
21590 \backslash
21591 varunit 0.373
21592 \backslash
21593 varunit
21594 \end_layout
21595
21596 \begin_layout Plain Layout
21597
21598 0.10
21599 \backslash
21600 varunit 0.410
21601 \backslash
21602 varunit
21603 \end_layout
21604
21605 \begin_layout Plain Layout
21606
21607 0.05
21608 \backslash
21609 varunit 0.453
21610 \backslash
21611 varunit
21612 \end_layout
21613
21614 \begin_layout Plain Layout
21615
21616 0.00
21617 \backslash
21618 varunit 0.500
21619 \backslash
21620 varunit
21621 \end_layout
21622
21623 \begin_layout Plain Layout
21624
21625 0.05
21626 \backslash
21627 varunit 0.453
21628 \backslash
21629 varunit
21630 \end_layout
21631
21632 \begin_layout Plain Layout
21633
21634 0.10
21635 \backslash
21636 varunit 0.410
21637 \backslash
21638 varunit
21639 \end_layout
21640
21641 \begin_layout Plain Layout
21642
21643 0.15
21644 \backslash
21645 varunit 0.373
21646 \backslash
21647 varunit
21648 \end_layout
21649
21650 \begin_layout Plain Layout
21651
21652 0.20
21653 \backslash
21654 varunit 0.342
21655 \backslash
21656 varunit
21657 \end_layout
21658
21659 \begin_layout Plain Layout
21660
21661 0.25
21662 \backslash
21663 varunit 0.317
21664 \backslash
21665 varunit
21666 \end_layout
21667
21668 \begin_layout Plain Layout
21669
21670 0.30
21671 \backslash
21672 varunit 0.300
21673 \backslash
21674 varunit
21675 \end_layout
21676
21677 \begin_layout Plain Layout
21678
21679 0.35
21680 \backslash
21681 varunit 0.293
21682 \backslash
21683 varunit
21684 \end_layout
21685
21686 \begin_layout Plain Layout
21687
21688 0.40
21689 \backslash
21690 varunit 0.300
21691 \backslash
21692 varunit
21693 \end_layout
21694
21695 \begin_layout Plain Layout
21696
21697 0.45
21698 \backslash
21699 varunit 0.332
21700 \backslash
21701 varunit
21702 \end_layout
21703
21704 \begin_layout Plain Layout
21705
21706 \end_layout
21707
21708 \end_inset
21709
21710 There are times when the tyranny of rectangular paragraphs must be overthrown.
21711  In such situations, a call to the delightful plain TeX command 
21712 \family typewriter
21713
21714 \backslash
21715 parshape
21716 \family default
21717  is called for.
21718  As you can see, completely arbitrary shapes can be laid out with a suitable
21719  set of linelength definitions.
21720  While this parshape may look a bit silly and useless, one could conceive
21721  of situations such as finely tuned dropped capitals, word wrapping around
21722  non-rectangular graphics, etc.
21723  which will benefit from such handcrafting.
21724 \end_layout
21725
21726 \begin_layout Standard
21727 \begin_inset VSpace bigskip
21728 \end_inset
21729
21730
21731 \end_layout
21732
21733 \begin_layout Standard
21734 The syntax is 
21735 \family typewriter
21736
21737 \backslash
21738 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
21739  #nindent #nlength
21740 \family default
21741 , where 
21742 \family typewriter
21743 numlines
21744 \family default
21745  is the number of lines of text which define the paragraph.
21746  If there turn out to be fewer lines, the shape is truncated; if there are
21747  more, the excess lines have the same dimensions as the last line of the
21748  definition.
21749  The 
21750 \family typewriter
21751 #nindent
21752 \family default
21753  and 
21754 \family typewriter
21755 #nlength
21756 \family default
21757  entries specify the indentation of the line from the left margin, and the
21758  length of the line as measured from that point.
21759  The shape applies only to the current paragraph; everything is reset to
21760  normal for the next paragraph.
21761 \end_layout
21762
21763 \begin_layout Standard
21764 \begin_inset ERT
21765 status collapsed
21766
21767 \begin_layout Plain Layout
21768
21769
21770 \backslash
21771 end{sloppypar}
21772 \end_layout
21773
21774 \end_inset
21775
21776
21777 \end_layout
21778
21779 \begin_layout Section
21780 Summary
21781 \end_layout
21782
21783 \begin_layout Standard
21784 As you can see, the examples in this section range from the useful to the
21785  whimsical.
21786  While I don't expect that anyone will ever need the paragraph shape demonstrate
21787 d in the last section, the important point is that you can do almost anything
21788  you want in LyX if you are willing to figure out how to do it in TeX and
21789  LaTeX.
21790  TeX is a fantastically powerful typesetting system and all that power is
21791  available to you since LyX uses it as its backend.
21792  Happy LyXing!
21793 \end_layout
21794
21795 \end_body
21796 \end_document