]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Remove duplicate emphasis.
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38   L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
39   {LyX}}
40
41 % used for multi-column text
42 \usepackage{multicol}
43
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
46 \end_preamble
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
49 \begin_modules
50 logicalmkup
51 theorems-ams
52 theorems-ams-extended
53 \end_modules
54 \maintain_unincluded_children false
55 \begin_local_layout
56 Format 7
57 InsetLayout CharStyle:MenuItem
58 LyxType               charstyle
59 LabelString           menu
60 LatexType             command
61 LatexName             menuitem
62 Font
63 Family              Sans
64 EndFont
65 Preamble
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
67 EndPreamble
68 End
69 \end_local_layout
70 \language english
71 \language_package default
72 \inputencoding latin1
73 \fontencoding global
74 \font_roman default
75 \font_sans default
76 \font_typewriter default
77 \font_default_family default
78 \use_non_tex_fonts false
79 \font_sc false
80 \font_osf false
81 \font_sf_scale 100
82 \font_tt_scale 100
83
84 \graphics default
85 \default_output_format default
86 \output_sync 0
87 \bibtex_command default
88 \index_command default
89 \paperfontsize 12
90 \spacing single
91 \use_hyperref true
92 \pdf_title "LyX's Additional Features manual"
93 \pdf_author "LyX Team"
94 \pdf_subject "LyX's additional features documentation"
95 \pdf_keywords "LyX, Documentation, Additional"
96 \pdf_bookmarks true
97 \pdf_bookmarksnumbered true
98 \pdf_bookmarksopen false
99 \pdf_bookmarksopenlevel 1
100 \pdf_breaklinks false
101 \pdf_pdfborder false
102 \pdf_colorlinks true
103 \pdf_backref false
104 \pdf_pdfusetitle false
105 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,  pdfpagelayout=OneColumn, pdfnewwindow=true,  pdfstartview=XYZ, plainpages=false, pdfpagelabels"
106 \papersize default
107 \use_geometry false
108 \use_amsmath 0
109 \use_esint 0
110 \use_mhchem 1
111 \use_mathdots 1
112 \cite_engine basic
113 \use_bibtopic false
114 \use_indices false
115 \paperorientation portrait
116 \suppress_date false
117 \use_refstyle 0
118 \index Index
119 \shortcut idx
120 \color #008000
121 \end_index
122 \secnumdepth 3
123 \tocdepth 3
124 \paragraph_separation indent
125 \paragraph_indentation default
126 \quotes_language english
127 \papercolumns 1
128 \papersides 2
129 \paperpagestyle headings
130 \tracking_changes false
131 \output_changes false
132 \html_math_output 0
133 \html_css_as_file 0
134 \html_be_strict true
135 \end_header
136
137 \begin_body
138
139 \begin_layout Title
140 Additional LyX Features
141 \end_layout
142
143 \begin_layout Author
144 by the LyX Team
145 \begin_inset Foot
146 status collapsed
147
148 \begin_layout Plain Layout
149 \noindent
150 Principal maintainer of this file is
151 \noun on
152  Richard Heck
153 \noun default
154 .
155  If you have comments or error corrections, please send them to the LyX
156  Documentation mailing list, 
157 \begin_inset Flex Code
158 status collapsed
159
160 \begin_layout Plain Layout
161 \noindent
162 <lyx-docs@lists.lyx.org>
163 \end_layout
164
165 \end_inset
166
167 .
168 \end_layout
169
170 \end_inset
171
172  
173 \end_layout
174
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
178
179 \end_inset
180
181
182 \end_layout
183
184 \begin_layout Chapter
185 Introduction
186 \end_layout
187
188 \begin_layout Standard
189 This manual is essentially Part II of the 
190 \emph on
191 User's Guide\SpecialChar \@.
192
193 \emph default
194  The reason for separating this document out is simple: the 
195 \emph on
196 User's Guide
197 \emph default
198  is already quite lengthy, and it contains information on all of the basic
199  features one needs to know in order to prepare most documents.
200  However, the LyX Team has worked to make LyX extensible through various
201  configuration files and external packages.
202  That means that if you want to support the Fizzwizzle LaTeX package, you
203  can create a layout file (or module) for it without having to alter LyX
204  itself.
205  We've already had contributions of several new features this way, and some
206  of them are documented here.
207  There are also some more `advanced' features, such as how to control the
208  presentation of bibliographies and how to work with multi-part documents,
209  that are not covered in the 
210 \emph on
211 User's Guide
212 \emph default
213  and are discussed here.
214 \end_layout
215
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218  control, and SGML support, which require additional software to work properly.
219  There is also a chapter on LyX's support for HTML.
220  And lastly, there's a chapter of LaTeX tools and tips, things you can use
221  to spruce up your documents by directly using the powerful features of
222  LaTeX.
223  After all, LyX 
224 \emph on
225 is
226 \emph default
227  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
228 \end_layout
229
230 \begin_layout Standard
231 If you haven't read the 
232 \emph on
233 Introduction
234 \emph default
235  yet, you are definitely in the wrong manual.
236  The 
237 \emph on
238 Introduction
239 \emph default
240  is the first place to go, since it describes the notation and format of
241  all of the manuals.
242  You should also be thoroughly familiar with the 
243 \emph on
244 User's Guide
245 \emph default
246  and all of the basic features of LyX before attempting to read this one.
247 \end_layout
248
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251  with LaTeX, this first chapter covers the inner workings of LyX and how
252  to direct LyX to generate exactly the LaTeX code you want.
253  It is obviously for more seasoned LyX users.
254 \end_layout
255
256 \begin_layout Chapter
257 LyX and LaTeX
258 \end_layout
259
260 \begin_layout Section
261 How LyX Uses LaTeX
262 \end_layout
263
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266  In it, we'll explain how LyX and LaTeX work together to produce printable
267  output.
268  This is the only place in any of the manuals where we assume you know something
269  about LaTeX.
270 \end_layout
271
272 \begin_layout Standard
273 At one time, LyX was called a 
274 \begin_inset Quotes eld
275 \end_inset
276
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
279 \end_inset
280
281  but that's no longer true.
282  There are frontends to LaTeX out there.
283 \begin_inset Foot
284 status collapsed
285
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288  There are also the LaTeX modes for vi and emacs, of course.
289 \end_layout
290
291 \end_inset
292
293  These are basically text editors with the ability to run LaTeX and mark
294  any errors in the file you're editing.
295  Although LyX 
296 \emph on
297 is
298 \emph default
299  an editor, and it 
300 \emph on
301 does
302 \emph default
303  run LaTeX, and it also indicates errors in the file, it also does much,
304  much more.
305  For one thing, you don't need to know LaTeX to use LyX effectively.
306  And LyX has added its own extensions to LaTeX.
307  Try the following sometime: select 
308 \begin_inset Flex MenuItem
309 status collapsed
310
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
313 LaTeX
314 \end_layout
315
316 \end_inset
317
318  from the 
319 \begin_inset Flex MenuItem
320 status collapsed
321
322 \begin_layout Plain Layout
323 File
324 \end_layout
325
326 \end_inset
327
328  menu (or 
329 \begin_inset Flex MenuItem
330 status collapsed
331
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
334 Source
335 \end_layout
336
337 \end_inset
338
339 ), then look at the preamble of the resulting 
340 \begin_inset Flex Code
341 status collapsed
342
343 \begin_layout Plain Layout
344 .tex
345 \end_layout
346
347 \end_inset
348
349  file.
350  You'll notice a variety of new macros defined specifically by LyX.
351  These macros are defined automatically, according to the features you use
352  in the document.
353 \end_layout
354
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
357  They are:
358 \end_layout
359
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
362 status collapsed
363
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
366 Format
367 \end_layout
368
369 \end_inset
370
371
372 \end_layout
373
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
376 status collapsed
377
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
381 Format
382 \end_layout
383
384 \end_inset
385
386
387 \end_layout
388
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
391 status collapsed
392
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
395 Print
396 \end_layout
397
398 \end_inset
399
400
401 \end_layout
402
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
405 status collapsed
406
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
409 Fax
410 \end_layout
411
412 \end_inset
413
414
415 \end_layout
416
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
419  LaTeX was run.
420  
421 \end_layout
422
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
425 \end_layout
426
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension 
429 \begin_inset Flex Code
430 status collapsed
431
432 \begin_layout Plain Layout
433 .tex
434 \end_layout
435
436 \end_inset
437
438  in place of 
439 \begin_inset Flex Code
440 status collapsed
441
442 \begin_layout Plain Layout
443 .lyx
444 \end_layout
445
446 \end_inset
447
448 .
449 \end_layout
450
451 \begin_layout Enumerate
452 Run LaTeX on the 
453 \begin_inset Flex Code
454 status collapsed
455
456 \begin_layout Plain Layout
457 .tex
458 \end_layout
459
460 \end_inset
461
462  file (maybe several times), and run any other commands (such as 
463 \begin_inset Flex Code
464 status collapsed
465
466 \begin_layout Plain Layout
467 bibtex
468 \end_layout
469
470 \end_inset
471
472  or 
473 \begin_inset Flex Code
474 status collapsed
475
476 \begin_layout Plain Layout
477 makeindex
478 \end_layout
479
480 \end_inset
481
482 ) needed to compile the LaTeX file.
483 \end_layout
484
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
487 \end_layout
488
489 \begin_layout Standard
490 If you've run LaTeX using 
491 \begin_inset Flex MenuItem
492 status collapsed
493
494 \begin_layout Plain Layout
495 View
496 \bar under
497 \SpecialChar \menuseparator
498
499 \bar default
500 DVI
501 \end_layout
502
503 \end_inset
504
505 , LyX then runs a DVI viewer to display the DVI-file.
506  If you've used 
507 \begin_inset Flex MenuItem
508 status collapsed
509
510 \begin_layout Plain Layout
511 View
512 \bar under
513 \SpecialChar \menuseparator
514
515 \bar default
516 PostScript
517 \end_layout
518
519 \end_inset
520
521 , LyX performs further steps:
522 \end_layout
523
524 \begin_layout Itemize
525 Run 
526 \begin_inset Flex Code
527 status collapsed
528
529 \begin_layout Plain Layout
530 dvips
531 \end_layout
532
533 \end_inset
534
535  to convert the DVI file to PostScript.
536 \end_layout
537
538 \begin_layout Itemize
539 Run a PostScript viewer, such as 
540 \begin_inset Flex Code
541 status collapsed
542
543 \begin_layout Plain Layout
544 ghostview
545 \end_layout
546
547 \end_inset
548
549 , to display the PostScript file.
550 \end_layout
551
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
554 \end_layout
555
556 \begin_layout Section
557 Translating LaTeX files into LyX
558 \end_layout
559
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the 
562 \begin_inset Flex MenuItem
563 status collapsed
564
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
568 LaTeX
569 \end_layout
570
571 \end_inset
572
573  command in LyX.
574  This will call a program named 
575 \begin_inset Flex Code
576 status collapsed
577
578 \begin_layout Plain Layout
579 tex2lyx
580 \end_layout
581
582 \end_inset
583
584  which will create a file 
585 \begin_inset Flex Code
586 status collapsed
587
588 \begin_layout Plain Layout
589 foo.lyx
590 \end_layout
591
592 \end_inset
593
594  from the file 
595 \begin_inset Flex Code
596 status collapsed
597
598 \begin_layout Plain Layout
599 foo.tex
600 \end_layout
601
602 \end_inset
603
604 .
605  LyX will then open that file.
606 \begin_inset Foot
607 status collapsed
608
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
611 status collapsed
612
613 \begin_layout Plain Layout
614 tex2lyx
615 \end_layout
616
617 \end_inset
618
619  can also be run from the command line, of course.
620 \end_layout
621
622 \end_inset
623
624
625 \end_layout
626
627 \begin_layout Standard
628 \begin_inset Flex Code
629 status collapsed
630
631 \begin_layout Plain Layout
632 tex2lyx
633 \end_layout
634
635 \end_inset
636
637  will translate most legal LaTeX, but not everything.
638  It will put things it doesn't understand into TeX code, so after translating
639  a file with 
640 \begin_inset Flex Code
641 status collapsed
642
643 \begin_layout Plain Layout
644 tex2lyx
645 \end_layout
646
647 \end_inset
648
649 , you can look for TeX code and hand-edit it until it looks right.
650 \end_layout
651
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
654 \end_layout
655
656 \begin_layout Section
657 \begin_inset CommandInset label
658 LatexCommand label
659 name "sec:Inserting-TeX-Code"
660
661 \end_inset
662
663 Inserting TeX Code into LyX Documents 
664 \end_layout
665
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668  You can always insert TeX code into any LyX document.
669  LyX cannot, and will never be able to, display every possible LaTeX construct.
670  If ever you need to insert LaTeX commands into your LyX document, you can
671  use the 
672 \begin_inset Flex Code
673 status collapsed
674
675 \begin_layout Plain Layout
676 TeX Code
677 \end_layout
678
679 \end_inset
680
681  box, which you can insert into your document with 
682 \begin_inset Flex MenuItem
683 status collapsed
684
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
687 TeX Code
688 \end_layout
689
690 \end_inset
691
692 .
693 \end_layout
694
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697  The code looks like this:
698 \end_layout
699
700 \begin_layout LyX-Code
701
702 \backslash
703 begin{tabular}{ll}
704 \begin_inset Newline newline
705 \end_inset
706
707
708 \backslash
709 begin{minipage}{5cm}
710 \begin_inset Newline newline
711 \end_inset
712
713 This is an example for a minipage environment.
714  You 
715 \begin_inset Newline newline
716 \end_inset
717
718 can put nearly everything in it, even (non-floating) 
719 \begin_inset Newline newline
720 \end_inset
721
722 figures and tables.
723  
724 \begin_inset Newline newline
725 \end_inset
726
727
728 \backslash
729 end{minipage}
730 \begin_inset Newline newline
731 \end_inset
732
733 &
734 \begin_inset Newline newline
735 \end_inset
736
737
738 \backslash
739 begin{minipage}{5cm}
740 \begin_inset Newline newline
741 \end_inset
742
743
744 \backslash
745 begin{verbatim}
746 \begin_inset Newline newline
747 \end_inset
748
749
750 \backslash
751 begin{minipage}{5cm}
752 \begin_inset Newline newline
753 \end_inset
754
755 This ...
756  
757 \begin_inset Newline newline
758 \end_inset
759
760
761 \backslash
762 end{minipage}
763 \begin_inset Newline newline
764 \end_inset
765
766
767 \backslash
768 end{verbatim}
769 \begin_inset Newline newline
770 \end_inset
771
772
773 \backslash
774 end{minipage}
775 \begin_inset Newline newline
776 \end_inset
777
778
779 \backslash
780 end{tabular}
781 \end_layout
782
783 \begin_layout LyX-Code
784
785 \end_layout
786
787 \begin_layout Standard
788 The 
789 \begin_inset Flex Code
790 status collapsed
791
792 \begin_layout Plain Layout
793 TeX Code
794 \end_layout
795
796 \end_inset
797
798  box containing this text is directly after this paragraph.
799  Those of you reading the manual in LyX will only see the TeX code inset.
800  Those reading a printed version of the manuals will see the actual results:
801 \end_layout
802
803 \begin_layout Standard
804 \begin_inset ERT
805 status collapsed
806
807 \begin_layout Plain Layout
808
809
810 \backslash
811 begin{tabular}{ll}
812 \end_layout
813
814 \begin_layout Plain Layout
815
816
817 \backslash
818 begin{minipage}{5cm}
819 \end_layout
820
821 \begin_layout Plain Layout
822
823 This is an example for a minipage environment.
824  You can put nearly everything in it, even (non-floating) figures and tables.
825  
826 \end_layout
827
828 \begin_layout Plain Layout
829
830
831 \backslash
832 end{minipage}
833 \end_layout
834
835 \begin_layout Plain Layout
836
837 &
838 \end_layout
839
840 \begin_layout Plain Layout
841
842
843 \backslash
844 begin{minipage}{5cm}
845 \end_layout
846
847 \begin_layout Plain Layout
848
849
850 \backslash
851 begin{verbatim}
852 \end_layout
853
854 \begin_layout Plain Layout
855
856
857 \backslash
858 begin{minipage}{5cm}
859 \end_layout
860
861 \begin_layout Plain Layout
862
863 This ...
864  
865 \end_layout
866
867 \begin_layout Plain Layout
868
869
870 \backslash
871 end{minipage}
872 \end_layout
873
874 \begin_layout Plain Layout
875
876
877 \backslash
878 end{verbatim}
879 \end_layout
880
881 \begin_layout Plain Layout
882
883
884 \backslash
885 end{minipage}
886 \end_layout
887
888 \begin_layout Plain Layout
889
890
891 \backslash
892 end{tabular}
893 \end_layout
894
895 \end_inset
896
897
898 \end_layout
899
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902  some complex LaTeX structure and then use 
903 \begin_inset Flex MenuItem
904 status collapsed
905
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
908 Child
909 \begin_inset space ~
910 \end_inset
911
912 Document
913 \end_layout
914
915 \end_inset
916
917  to include your file (you should select the type 
918 \begin_inset Flex Code
919 status collapsed
920
921 \begin_layout Plain Layout
922 Input
923 \end_layout
924
925 \end_inset
926
927 ).
928  We recommend that you only do this if you have a 
929 \begin_inset Flex Code
930 status collapsed
931
932 \begin_layout Plain Layout
933 .tex
934 \end_layout
935
936 \end_inset
937
938  file which you 
939 \emph on
940 know
941 \emph default
942  works already.
943  Otherwise, you'll have a big job tracking down LaTeX errors.
944 \end_layout
945
946 \begin_layout Standard
947 There are a few last points to emphasize:
948 \end_layout
949
950 \begin_layout Itemize
951 LyX 
952 \emph on
953 does not
954 \emph default
955  check if your LaTeX code is correct.
956 \end_layout
957
958 \begin_layout Itemize
959 Beware reinventing the wheel.
960 \end_layout
961
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
964  more are coming.
965  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966  feature before you decide you have to do it by hand.
967  Moreover, there are numerous LaTeX packages out there to do all sorts of
968  things, from labels to envelopes to fancy multipage tables.
969  Check out 
970 \begin_inset CommandInset href
971 LatexCommand href
972 name "CTAN"
973 target "http://www.ctan.org/"
974
975 \end_inset
976
977  for details, and see chapter 
978 \begin_inset CommandInset ref
979 LatexCommand ref
980 reference "cha:secrets"
981
982 \end_inset
983
984 .
985 \end_layout
986
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989  sure to check out a good LaTeX book for assistance.
990  There are a number of them listed in the bibliography of the 
991 \emph on
992 User's Guide
993 \emph default
994 .
995 \end_layout
996
997 \begin_layout Section
998 LyX and the LaTeX Preamble
999 \end_layout
1000
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1003 \end_layout
1004
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1007  is good for.
1008  If you don't, the following will give you some ideas—we recommend again
1009  that you consult a LaTeX book for further information.
1010  In any case, you should read the points below, because they explain what
1011  you can do and what you don't need to do in the LaTeX preamble of a LyX
1012  document.
1013 \end_layout
1014
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document, 
1017 \emph on
1018 before
1019 \emph default
1020  the text.
1021  It serves to:
1022 \end_layout
1023
1024 \begin_layout Itemize
1025 Declare the document class.
1026  
1027 \begin_inset Newline newline
1028 \end_inset
1029
1030 LyX already does this for you.
1031  If you're a seasoned LaTeX-nician, and you have a custom document class
1032  you want to use, check out the 
1033 \emph on
1034 Customization Manual
1035 \emph default
1036  for information on how to make LyX interface to it.
1037 \end_layout
1038
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1041  
1042 \begin_inset Newline newline
1043 \end_inset
1044
1045 LaTeX packages provide special commands, which are only available within
1046  a document when the package has been declared in the preamble.
1047  For example, the package 
1048 \begin_inset Flex Code
1049 status collapsed
1050
1051 \begin_layout Plain Layout
1052 indentfirst
1053 \end_layout
1054
1055 \end_inset
1056
1057  forces all paragraphs to be indented.
1058  There are other packages for labels, envelopes, margins, etc.
1059  
1060 \end_layout
1061
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1064  
1065 \begin_inset Newline newline
1066 \end_inset
1067
1068 There are several LaTeX counters and variables which 
1069 \emph on
1070 must
1071 \emph default
1072  be set globally from within the preamble in order to have the desired effect.
1073  (There are variables which you can set and reset inside the document, too.)
1074  Margins are a good example of something which must be set in the preamble.
1075  Another example is the label format for lists.
1076  You can actually set these just about anywhere, but it's best to do it
1077  just once, inside the preamble.
1078 \end_layout
1079
1080 \begin_layout Itemize
1081 Declare user defined commands (with 
1082 \begin_inset Flex Code
1083 status collapsed
1084
1085 \begin_layout Plain Layout
1086
1087 \backslash
1088 newcommand
1089 \end_layout
1090
1091 \end_inset
1092
1093  or 
1094 \begin_inset Flex Code
1095 status collapsed
1096
1097 \begin_layout Plain Layout
1098
1099 \backslash
1100 renewcommand
1101 \end_layout
1102
1103 \end_inset
1104
1105 ).
1106 \begin_inset Newline newline
1107 \end_inset
1108
1109 These are abbreviations for LaTeX commands which appear very often inside
1110  a document.
1111  Although the preamble is a good place to declare such commands, they 
1112 \emph on
1113 can
1114 \emph default
1115  be declared anywhere (before they are used for the first time, of course).
1116  This can be useful if there is a lot of raw LaTeX code in your document,
1117  which normally should not be the case.
1118 \end_layout
1119
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the 
1122 \begin_inset Flex Code
1123 status collapsed
1124
1125 \begin_layout Plain Layout
1126 .tex
1127 \end_layout
1128
1129 \end_inset
1130
1131  file it produces.
1132  This makes LaTeX files generated by LyX portable.
1133 \end_layout
1134
1135 \begin_layout Subsection
1136 Changing the Preamble
1137 \end_layout
1138
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141  can't change them without patching LyX itself.
1142  You can, however, add your own stuff to the preamble by selecting 
1143 \begin_inset Flex MenuItem
1144 status collapsed
1145
1146 \begin_layout Plain Layout
1147 LaTeX
1148 \begin_inset space ~
1149 \end_inset
1150
1151 Preamble
1152 \end_layout
1153
1154 \end_inset
1155
1156  in the 
1157 \begin_inset Flex MenuItem
1158 status collapsed
1159
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1162 Settings
1163 \end_layout
1164
1165 \end_inset
1166
1167  dialog.
1168  LyX adds anything in the 
1169 \begin_inset Flex MenuItem
1170 status collapsed
1171
1172 \begin_layout Plain Layout
1173 Preamble
1174 \end_layout
1175
1176 \end_inset
1177
1178  dialog to its own built-in preamble.
1179  Before adding your own declarations in the preamble, you should make sure
1180  that LyX doesn't already support what you want to do.
1181  (Remember what we said about reinventing the wheel?) Also, 
1182 \emph on
1183 make sure your preamble code is correct
1184 \emph default
1185 .
1186  LyX doesn't check it for you.
1187  If there is an error, you're likely to get an error like 
1188 \begin_inset Quotes eld
1189 \end_inset
1190
1191
1192 \begin_inset Flex Code
1193 status collapsed
1194
1195 \begin_layout Plain Layout
1196 Missing 
1197 \backslash
1198 begin{document}
1199 \end_layout
1200
1201 \end_inset
1202
1203
1204 \begin_inset Quotes erd
1205 \end_inset
1206
1207 .
1208  If you see this error, check your preamble.
1209 \end_layout
1210
1211 \begin_layout Subsection
1212 Examples
1213 \end_layout
1214
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1217  do.
1218 \end_layout
1219
1220 \begin_layout Subsubsection
1221 Example #1: Offsets
1222 \end_layout
1223
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position: 
1226 \begin_inset Flex Code
1227 status collapsed
1228
1229 \begin_layout Plain Layout
1230
1231 \backslash
1232 hoffset
1233 \end_layout
1234
1235 \end_inset
1236
1237  and 
1238 \begin_inset Flex Code
1239 status collapsed
1240
1241 \begin_layout Plain Layout
1242
1243 \backslash
1244 voffset
1245 \end_layout
1246
1247 \end_inset
1248
1249 .
1250  Their names should be self-explanatory.
1251  These variables are useful if you think for a moment about computer labels.
1252  Sometimes, the size of a print medium and the area of the medium that you
1253  can actually print on aren't the same.
1254  This is where 
1255 \begin_inset Flex Code
1256 status collapsed
1257
1258 \begin_layout Plain Layout
1259
1260 \backslash
1261 hoffset
1262 \end_layout
1263
1264 \end_inset
1265
1266  and 
1267 \begin_inset Flex Code
1268 status collapsed
1269
1270 \begin_layout Plain Layout
1271
1272 \backslash
1273 voffset
1274 \end_layout
1275
1276 \end_inset
1277
1278  come in.
1279 \end_layout
1280
1281 \begin_layout Standard
1282 The default values for 
1283 \begin_inset Flex Code
1284 status collapsed
1285
1286 \begin_layout Plain Layout
1287
1288 \backslash
1289 hoffset
1290 \end_layout
1291
1292 \end_inset
1293
1294  and 
1295 \begin_inset Flex Code
1296 status collapsed
1297
1298 \begin_layout Plain Layout
1299
1300 \backslash
1301 voffset
1302 \end_layout
1303
1304 \end_inset
1305
1306  are both 0
1307 \begin_inset space \thinspace{}
1308 \end_inset
1309
1310 points, i.
1311 \begin_inset space \thinspace{}
1312 \end_inset
1313
1314 e.
1315 \begin_inset space \space{}
1316 \end_inset
1317
1318 the page isn't shifted.
1319  Unfortunately, some DVI drivers always seem to shift the page.
1320  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321  If you're using LyX on a system that you don't personally maintain, and
1322  your sysadmin is a doofus, 
1323 \begin_inset Flex Code
1324 status collapsed
1325
1326 \begin_layout Plain Layout
1327
1328 \backslash
1329 hoffset
1330 \end_layout
1331
1332 \end_inset
1333
1334  and 
1335 \begin_inset Flex Code
1336 status collapsed
1337
1338 \begin_layout Plain Layout
1339
1340 \backslash
1341 voffset
1342 \end_layout
1343
1344 \end_inset
1345
1346  can save the day.
1347  Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1349 \end_inset
1350
1351 inches too big.
1352  You can add this to the preamble:
1353 \end_layout
1354
1355 \begin_layout LyX-Code
1356
1357 \backslash
1358 setlength{
1359 \backslash
1360 hoffset}{-0.5 in}
1361 \end_layout
1362
1363 \begin_layout LyX-Code
1364
1365 \backslash
1366 setlength{
1367 \backslash
1368 voffset}{-0.5 in}
1369 \end_layout
1370
1371 \begin_layout Standard
1372 and your margins should now be correct.
1373 \end_layout
1374
1375 \begin_layout Subsubsection
1376 Example #2: Labels
1377 \end_layout
1378
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381  There's a rather nice package, available at your nearest CTAN archive,
1382  for printing sheets of labels: 
1383 \begin_inset Flex Code
1384 status collapsed
1385
1386 \begin_layout Plain Layout
1387 labels.sty
1388 \end_layout
1389
1390 \end_inset
1391
1392 .
1393  Now, your system may not have this package installed by default.
1394  We leave that up to you to check.
1395  You'll also want to read the documentation for it; we're not going to do
1396  that for you.
1397  Since this is an example, however, we'll give you an example of how you
1398  use this package.
1399 \end_layout
1400
1401 \begin_layout Standard
1402 First, make sure you're using the 
1403 \begin_inset Flex Code
1404 status collapsed
1405
1406 \begin_layout Plain Layout
1407 article
1408 \end_layout
1409
1410 \end_inset
1411
1412  document class.
1413  Next, you need to put the following in your preamble:
1414 \end_layout
1415
1416 \begin_layout LyX-Code
1417
1418 \backslash
1419 usepackage{labels}
1420 \end_layout
1421
1422 \begin_layout LyX-Code
1423
1424 \backslash
1425 LabelCols=3
1426 \end_layout
1427
1428 \begin_layout LyX-Code
1429
1430 \backslash
1431 LabelRows=7
1432 \end_layout
1433
1434 \begin_layout LyX-Code
1435
1436 \backslash
1437 LeftBorder=8mm
1438 \end_layout
1439
1440 \begin_layout LyX-Code
1441
1442 \backslash
1443 RightBorder=8mm
1444 \end_layout
1445
1446 \begin_layout LyX-Code
1447
1448 \backslash
1449 TopBorder=9mm
1450 \end_layout
1451
1452 \begin_layout LyX-Code
1453
1454 \backslash
1455 BottomBorder=2mm
1456 \end_layout
1457
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460  You're now ready to print labels, but you'll need to insert LaTeX code,
1461  placing the commands 
1462 \begin_inset Flex Code
1463 status collapsed
1464
1465 \begin_layout Plain Layout
1466
1467 \backslash
1468 begin{labels}
1469 \end_layout
1470
1471 \end_inset
1472
1473  and 
1474 \begin_inset Flex Code
1475 status collapsed
1476
1477 \begin_layout Plain Layout
1478
1479 \backslash
1480 end{labels}
1481 \end_layout
1482
1483 \end_inset
1484
1485  around each label text.
1486  This and other special features of 
1487 \begin_inset Flex Code
1488 status collapsed
1489
1490 \begin_layout Plain Layout
1491 labels.sty
1492 \end_layout
1493
1494 \end_inset
1495
1496  are explained in its documentation.
1497 \end_layout
1498
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501  Maybe that someone is you.
1502 \end_layout
1503
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1506 \end_layout
1507
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of 
1510 \emph on
1511 every
1512 \emph default
1513  paragraph.
1514  As with all of their other weird quirks, most Americans will whine and
1515  moan until they can have their way and indent the first line of all paragraphs.
1516  (Yes, we're joking.
1517  (We are?) 
1518 \emph on
1519 Yeah
1520 \emph default
1521 , we are.)
1522 \end_layout
1523
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526  In books, you typically only indent the first line of a paragraph 
1527 \emph on
1528 if
1529 \emph default
1530  it follows another one.
1531  The idea behind indenting the first line of a paragraph is to distinguish
1532  neighboring paragraphs from one another.
1533  If there is no previous paragraph—for example, if it follows a figure or
1534  is the first paragraph in a section—then there is no need for indentation.
1535  
1536 \end_layout
1537
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540  about such esoteric things; you want your indentation! Add this to the
1541  preamble:
1542 \end_layout
1543
1544 \begin_layout LyX-Code
1545
1546 \backslash
1547 usepackage{indentfirst}
1548 \end_layout
1549
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552  all of your paragraphs will get the indentation the Founding Fathers intended
1553  they should have.
1554 \end_layout
1555
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1558 \end_layout
1559
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562  of the advanced things you can do.
1563  Also, there are more examples and an assortment of LaTeX 
1564 \begin_inset Quotes eld
1565 \end_inset
1566
1567 dirty tricks
1568 \begin_inset Quotes erd
1569 \end_inset
1570
1571  given in Chapter
1572 \begin_inset space ~
1573 \end_inset
1574
1575
1576 \begin_inset CommandInset ref
1577 LatexCommand ref
1578 reference "cha:secrets"
1579
1580 \end_inset
1581
1582 .
1583  
1584 \end_layout
1585
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1588 \end_layout
1589
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1592  going.
1593  It then uses the logfile from the LaTeX run to do a post-mortem.
1594  After analyzing the logfile,LyX displays a dialog listing the errors.
1595  Clicking on any one of them will take you to the position in your LyX file
1596  where the error occurred.
1597 \begin_inset Foot
1598 status collapsed
1599
1600 \begin_layout Plain Layout
1601 Well, usually.
1602  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1603  right line.
1604  There are also cases where LaTeX reports the error on one line, but the
1605  actual error is earlier.
1606  This is not unlike forgetting a closing brace in a program: You'll get
1607  an error, but only later.
1608 \end_layout
1609
1610 \end_inset
1611
1612
1613 \end_layout
1614
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1617  
1618 \begin_inset Flex MenuItem
1619 status collapsed
1620
1621 \begin_layout Plain Layout
1622 Document
1623 \bar under
1624 \SpecialChar \menuseparator
1625
1626 \bar default
1627 Latex
1628 \begin_inset space ~
1629 \end_inset
1630
1631 Log
1632 \end_layout
1633
1634 \end_inset
1635
1636 .
1637  There are some fairly common error messages and warnings.
1638  We'll cover those here.
1639  You should look at a good LaTeX book for a complete listing.
1640 \end_layout
1641
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1644 status collapsed
1645
1646 \begin_layout Plain Layout
1647 LaTeX Warning
1648 \end_layout
1649
1650 \end_inset
1651
1652
1653 \begin_inset Newline newline
1654 \end_inset
1655
1656 Anything beginning with these words is a warning message for the purpose
1657  of 
1658 \begin_inset Quotes eld
1659 \end_inset
1660
1661 debugging
1662 \begin_inset Quotes erd
1663 \end_inset
1664
1665  the LaTeX code itself.
1666  You'll get messages like this if you added or changed cross-references
1667  or bibliography entries, in which case, LaTeX is trying to tell you that
1668  you need to make another run.
1669  You can by-and-large ignore these.
1670 \end_layout
1671
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1674 status collapsed
1675
1676 \begin_layout Plain Layout
1677 LaTeX Font Warning
1678 \end_layout
1679
1680 \end_inset
1681
1682
1683 \begin_inset Newline newline
1684 \end_inset
1685
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687  The rest of the message will often say something about a replacement font
1688  that LaTeX used.
1689  You can safely ignore these, too.
1690 \end_layout
1691
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1694 status collapsed
1695
1696 \begin_layout Plain Layout
1697 Overfull 
1698 \backslash
1699 hbox
1700 \end_layout
1701
1702 \end_inset
1703
1704
1705 \begin_inset Newline newline
1706 \end_inset
1707
1708 LaTeX absolutely 
1709 \emph on
1710 loves
1711 \emph default
1712  to spew these out.
1713  They are warnings about lines that were too long and run past the right
1714  margin.
1715  Almost always, this is unnoticeable in the final output.
1716  (It can be just a point or two.) Or, only one or two characters extend past
1717  the margin.
1718  LaTeX seems to generate at least one of these messages for just about any
1719  document you write.
1720 \begin_inset Newline newline
1721 \end_inset
1722
1723 You can ignore these messages.
1724  Your eyes will tell you if there's a problem with something that's too
1725  wide; just look at the output.
1726 \begin_inset Foot
1727 status collapsed
1728
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in 
1731 \begin_inset Flex MenuItem
1732 status collapsed
1733
1734 \begin_layout Plain Layout
1735 Document
1736 \bar under
1737 \SpecialChar \menuseparator
1738
1739 \bar default
1740 Settings
1741 \end_layout
1742
1743 \end_inset
1744
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1746 \end_layout
1747
1748 \end_inset
1749
1750
1751 \end_layout
1752
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1755 status collapsed
1756
1757 \begin_layout Plain Layout
1758 Underfull 
1759 \backslash
1760 hbox
1761 \end_layout
1762
1763 \end_inset
1764
1765
1766 \begin_inset Newline newline
1767 \end_inset
1768
1769 Not quite as common as its cousin.
1770  LaTeX seems to like to print lines that are a bit too wide as opposed to
1771  ones that are a bit too narrow.
1772  We have no idea why.
1773 \end_layout
1774
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1777 status collapsed
1778
1779 \begin_layout Plain Layout
1780 Overfull 
1781 \backslash
1782 vbox
1783 \end_layout
1784
1785 \end_inset
1786
1787  and 
1788 \begin_inset Flex Code
1789 status collapsed
1790
1791 \begin_layout Plain Layout
1792 Underfull 
1793 \backslash
1794 vbox
1795 \end_layout
1796
1797 \end_inset
1798
1799
1800 \begin_inset Newline newline
1801 \end_inset
1802
1803 Warnings about troubles breaking the page.
1804  Once again, just look at the output.
1805  Your eyes will tell you where something has gone wrong.
1806 \end_layout
1807
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1810 status collapsed
1811
1812 \begin_layout Plain Layout
1813  LaTeX Error: File 
1814 \begin_inset Quotes els
1815 \end_inset
1816
1817 Xxxx
1818 \begin_inset Quotes ers
1819 \end_inset
1820
1821  not found
1822 \end_layout
1823
1824 \end_inset
1825
1826
1827 \begin_inset Newline newline
1828 \end_inset
1829
1830 The file 
1831 \begin_inset Quotes eld
1832 \end_inset
1833
1834 Xxxx
1835 \begin_inset Quotes erd
1836 \end_inset
1837
1838  isn't installed on this system.
1839  This usually appears because some package your document needs isn't installed.
1840  If you didn't touch the preamble or didn't use the 
1841 \begin_inset Flex Code
1842 status collapsed
1843
1844 \begin_layout Plain Layout
1845
1846 \backslash
1847 usepackage{}
1848 \end_layout
1849
1850 \end_inset
1851
1852  command, then one of the packages LyX tried to load is missing.
1853  Use 
1854 \begin_inset Flex MenuItem
1855 status collapsed
1856
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1859 LaTeX Configuration
1860 \end_layout
1861
1862 \end_inset
1863
1864  to get a list of packages that LyX knows about.
1865  This file is updated whenever you reconfigure LyX (using 
1866 \begin_inset Flex MenuItem
1867 status collapsed
1868
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1871 Reconfigure
1872 \end_layout
1873
1874 \end_inset
1875
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1878 \end_inset
1879
1880 If you did use the 
1881 \begin_inset Flex Code
1882 status collapsed
1883
1884 \begin_layout Plain Layout
1885
1886 \backslash
1887 usepackage{}
1888 \end_layout
1889
1890 \end_inset
1891
1892  command and the package in question isn't installed, then you'll need to
1893  install it yourself.
1894 \end_layout
1895
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1898 status collapsed
1899
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1902 \end_layout
1903
1904 \end_inset
1905
1906
1907 \begin_inset Newline newline
1908 \end_inset
1909
1910 Error messages beginning with this are trying to tell you that you specified
1911  a bad or undefined option to a package.
1912  Check the package's documentation.
1913 \end_layout
1914
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1917 status collapsed
1918
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1921 \end_layout
1922
1923 \end_inset
1924
1925
1926 \begin_inset Newline newline
1927 \end_inset
1928
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1930  get one of these.
1931  You may have forgotten to load a package.
1932  In any case, this error message usually means that you used an undefined
1933  command.
1934  
1935 \end_layout
1936
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939  Some are self-explanatory.
1940  These are usually LaTeX messages.
1941  Others are downright cryptic.
1942  These are usually TeX error messages, and we really have 
1943 \emph on
1944 no clue
1945 \emph default
1946  what they mean or how to decipher them.
1947  No-one does.
1948 \end_layout
1949
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1952 \end_layout
1953
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1956 \end_layout
1957
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1960 \end_layout
1961
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964  especially if you see a 
1965 \begin_inset Quotes eld
1966 \end_inset
1967
1968
1969 \begin_inset Flex Code
1970 status collapsed
1971
1972 \begin_layout Plain Layout
1973 Missing 
1974 \backslash
1975 begin{document}
1976 \end_layout
1977
1978 \end_inset
1979
1980
1981 \begin_inset Quotes erd
1982 \end_inset
1983
1984  error—it means that there are errors in the preamble.
1985  Start debugging your preamble.
1986 \end_layout
1987
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990  to the document, the first suspect is your LaTeX distribution itself.
1991  Check for missing packages and install them.
1992 \end_layout
1993
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996  Did you use any of the fine-tuning options in LyX? Specifically, did you
1997  
1998 \emph on
1999 misuse
2000 \emph default
2001  any of them, like trying to manually insert lots of 
2002 \begin_inset Flex Code
2003 status collapsed
2004
2005 \begin_layout Plain Layout
2006 Protected
2007 \begin_inset space ~
2008 \end_inset
2009
2010 Blanks
2011 \end_layout
2012
2013 \end_inset
2014
2015
2016 \begin_inset Flex Code
2017 status collapsed
2018
2019 \begin_layout Plain Layout
2020 Linebreaks
2021 \end_layout
2022
2023 \end_inset
2024
2025 , or 
2026 \begin_inset Flex Code
2027 status collapsed
2028
2029 \begin_layout Plain Layout
2030 Pagebreaks
2031 \end_layout
2032
2033 \end_inset
2034
2035 ? Did you try to kludge something together with these instead of using the
2036  appropriate paragraph environment?
2037 \end_layout
2038
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2041  the rules.
2042  Did you try to pull a fancy maneuver? Did you do something funky inside
2043  a table or an equation, like inserting a graphic into a table cell?
2044 \end_layout
2045
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048  a line? By default, LaTeX is rather strict about how much extra inter-word
2049  spacing it will add in order to break a line.
2050  Preferably, you should rework the paragraph to avoid the problem.
2051  If this isn't an option, you can wrap your text in 
2052 \begin_inset Flex Code
2053 status collapsed
2054
2055 \begin_layout Plain Layout
2056
2057 \backslash
2058 sloppypar
2059 \end_layout
2060
2061 \end_inset
2062
2063  to make LaTeX's line breaking more, well, sloppy.
2064 \end_layout
2065
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068  make sure you're in the limits for nesting environments.
2069  If you nested a bunch of environments to the 
2070 \begin_inset Formula $17^{\mathrm{th}}$
2071 \end_inset
2072
2073  level, that's the problem.
2074  (The limit in LaTeX is five.)
2075 \end_layout
2076
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079  If you have a table or figure that's too wide or long for the page, you
2080  need to:
2081 \end_layout
2082
2083 \begin_deeper
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2086 \end_layout
2087
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2090 \end_layout
2091
2092 \end_deeper
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2096 \end_layout
2097
2098 \begin_layout Standard
2099 If all this doesn't help—well, then 
2100 \emph on
2101 perhaps
2102 \emph default
2103  you might have found a bug in LyX\SpecialChar \ldots{}
2104 .
2105 \end_layout
2106
2107 \begin_layout Chapter
2108 Supplemental Tools
2109 \end_layout
2110
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2113 \end_layout
2114
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2117  in the section 
2118 \emph on
2119 Bibliography databases (BibTeX)
2120 \emph default
2121  of the 
2122 \emph on
2123 User's Guide
2124 \emph default
2125 .
2126  The following subsections explain special bibliography features supported
2127  by LyX.
2128 \end_layout
2129
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2132 \end_layout
2133
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2137 \end_inset
2138
2139 g.
2140 \begin_inset space \space{}
2141 \end_inset
2142
2143
2144 \begin_inset Quotes eld
2145 \end_inset
2146
2147 [12]
2148 \begin_inset Quotes erd
2149 \end_inset
2150
2151 ) to refer to a cited work.
2152  However, in many scientific disciplines, other citation styles are in use.
2153  The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2155 \end_inset
2156
2157 g.
2158 \begin_inset space \space{}
2159 \end_inset
2160
2161
2162 \begin_inset Quotes eld
2163 \end_inset
2164
2165 Knuth 1984a
2166 \begin_inset Quotes erd
2167 \end_inset
2168
2169 ).
2170  LyX supports two packages that provide this style, 
2171 \begin_inset Flex Code
2172 status collapsed
2173
2174 \begin_layout Plain Layout
2175 natbib
2176 \end_layout
2177
2178 \end_inset
2179
2180  and 
2181 \begin_inset Flex Code
2182 status collapsed
2183
2184 \begin_layout Plain Layout
2185 jurabib
2186 \end_layout
2187
2188 \end_inset
2189
2190 .
2191  Both packages have their pros and cons, which cannot be listed in detail.
2192  If you only want to have simple author-year (or author-numerical) style,
2193  or if you want to use one of the countless style files for 
2194 \begin_inset Flex Code
2195 status collapsed
2196
2197 \begin_layout Plain Layout
2198 natbib
2199 \end_layout
2200
2201 \end_inset
2202
2203 , than the established 
2204 \begin_inset Flex Code
2205 status collapsed
2206
2207 \begin_layout Plain Layout
2208 natbib
2209 \end_layout
2210
2211 \end_inset
2212
2213  package is probably your choice.
2214  If you need special features like short title references, ibidem etc., you
2215  might consider the 
2216 \begin_inset Flex Code
2217 status collapsed
2218
2219 \begin_layout Plain Layout
2220 jurabib
2221 \end_layout
2222
2223 \end_inset
2224
2225  package.
2226 \end_layout
2227
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2230  Go to 
2231 \begin_inset Flex MenuItem
2232 status collapsed
2233
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2236 Settings
2237 \end_layout
2238
2239 \end_inset
2240
2241  and select under 
2242 \begin_inset Flex MenuItem
2243 status collapsed
2244
2245 \begin_layout Plain Layout
2246 Bibliography
2247 \end_layout
2248
2249 \end_inset
2250
2251  the option 
2252 \begin_inset Flex MenuItem
2253 status collapsed
2254
2255 \begin_layout Plain Layout
2256 Natbib
2257 \end_layout
2258
2259 \end_inset
2260
2261  or 
2262 \begin_inset Flex MenuItem
2263 status collapsed
2264
2265 \begin_layout Plain Layout
2266 Jurabib
2267 \end_layout
2268
2269 \end_inset
2270
2271 .
2272  With both packages, you will get some extra features in the citation dialog
2273  and you can select the style of the reference (
2274 \begin_inset Quotes eld
2275 \end_inset
2276
2277 Knuth 1984
2278 \begin_inset Quotes erd
2279 \end_inset
2280
2281
2282 \begin_inset Quotes eld
2283 \end_inset
2284
2285 Knuth (1984)
2286 \begin_inset Quotes erd
2287 \end_inset
2288
2289
2290 \begin_inset Quotes eld
2291 \end_inset
2292
2293 Knuth, 1984
2294 \begin_inset Quotes erd
2295 \end_inset
2296
2297
2298 \begin_inset Quotes eld
2299 \end_inset
2300
2301 1984
2302 \begin_inset Quotes erd
2303 \end_inset
2304
2305  etc.).
2306  Note that both packages need specifically designed style files.
2307  They both ship their own, but there are lots of additional style files,
2308  and there is even an interactive style file builder
2309 \begin_inset Foot
2310 status collapsed
2311
2312 \begin_layout Plain Layout
2313 See 
2314 \begin_inset Flex URL
2315 status open
2316
2317 \begin_layout Plain Layout
2318
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2320 \end_layout
2321
2322 \end_inset
2323
2324
2325 \end_layout
2326
2327 \end_inset
2328
2329  for 
2330 \begin_inset Flex Code
2331 status collapsed
2332
2333 \begin_layout Plain Layout
2334 natbib
2335 \end_layout
2336
2337 \end_inset
2338
2339 .
2340 \end_layout
2341
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2344 \end_layout
2345
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348  If you are for instance a historian, the possibility to separate sources
2349  and scientific works is most likely a 
2350 \begin_inset Quotes eld
2351 \end_inset
2352
2353 must have
2354 \begin_inset Quotes erd
2355 \end_inset
2356
2357 .
2358  Unfortunately, BibTeX itself does not allow you to do this.
2359  But with the help of some LaTeX packages, BibTeX can be extended to fit
2360  your needs.
2361 \end_layout
2362
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages, 
2365 \family typewriter
2366 bibtopic
2367 \family default
2368 .
2369 \begin_inset Foot
2370 status collapsed
2371
2372 \begin_layout Plain Layout
2373 Available from 
2374 \begin_inset Flex URL
2375 status open
2376
2377 \begin_layout Plain Layout
2378
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2380 \end_layout
2381
2382 \end_inset
2383
2384
2385 \end_layout
2386
2387 \end_inset
2388
2389  The advantage of this package (compared to other packages like 
2390 \family typewriter
2391 multibib
2392 \family default
2393 ) is that you don't need to define new citation commands.
2394  Instead, you need to prepare different bibliographic databases which include
2395  the entries for the different sections of the bibliography.
2396  For example: If you want to divide your bibliography into the sections
2397  
2398 \begin_inset Quotes eld
2399 \end_inset
2400
2401 Sources
2402 \begin_inset Quotes erd
2403 \end_inset
2404
2405  and 
2406 \begin_inset Quotes eld
2407 \end_inset
2408
2409 Scientific works
2410 \begin_inset Quotes erd
2411 \end_inset
2412
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2415 \end_inset
2416
2417 g.
2418 \begin_inset space \space{}
2419 \end_inset
2420
2421
2422 \begin_inset Flex Code
2423 status collapsed
2424
2425 \begin_layout Plain Layout
2426 sources.bib
2427 \end_layout
2428
2429 \end_inset
2430
2431  and 
2432 \begin_inset Flex Code
2433 status collapsed
2434
2435 \begin_layout Plain Layout
2436 scientific.bib
2437 \end_layout
2438
2439 \end_inset
2440
2441 .
2442  
2443 \end_layout
2444
2445 \begin_layout Standard
2446 Go to 
2447 \begin_inset Flex MenuItem
2448 status collapsed
2449
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2452 Settings
2453 \end_layout
2454
2455 \end_inset
2456
2457  and check under 
2458 \begin_inset Flex MenuItem
2459 status collapsed
2460
2461 \begin_layout Plain Layout
2462 Bibliography
2463 \end_layout
2464
2465 \end_inset
2466
2467  the option 
2468 \begin_inset Flex MenuItem
2469 status collapsed
2470
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2473 \end_layout
2474
2475 \end_inset
2476
2477 .
2478  Now you can insert multiple BibTeX bibliographies, one for each section
2479  of your bibliography.
2480  Returning to our example: Insert the BibTeX bibliography 
2481 \begin_inset Flex Code
2482 status collapsed
2483
2484 \begin_layout Plain Layout
2485 sources.bib
2486 \end_layout
2487
2488 \end_inset
2489
2490  and a second one for the database 
2491 \begin_inset Flex Code
2492 status collapsed
2493
2494 \begin_layout Plain Layout
2495 scientific.bib
2496 \end_layout
2497
2498 \end_inset
2499
2500 .
2501  You are free to use the same or different styles for each section.
2502  Additionally, you can chose if the bibliography section should contain
2503  
2504 \begin_inset Quotes eld
2505 \end_inset
2506
2507 all cited references
2508 \begin_inset Quotes erd
2509 \end_inset
2510
2511  of the specified database(s) (which is the default), 
2512 \begin_inset Quotes eld
2513 \end_inset
2514
2515 all uncited references
2516 \begin_inset Quotes erd
2517 \end_inset
2518
2519  or even 
2520 \begin_inset Quotes eld
2521 \end_inset
2522
2523 all references
2524 \begin_inset Quotes erd
2525 \end_inset
2526
2527 .
2528  This might be useful if you would like to separate your bibliography into
2529  three sections: 
2530 \begin_inset Quotes eld
2531 \end_inset
2532
2533 Cited sources
2534 \begin_inset Quotes erd
2535 \end_inset
2536
2537
2538 \begin_inset Quotes eld
2539 \end_inset
2540
2541 Uncited sources
2542 \begin_inset Quotes erd
2543 \end_inset
2544
2545 , and 
2546 \begin_inset Quotes eld
2547 \end_inset
2548
2549 Scientific works
2550 \begin_inset Quotes erd
2551 \end_inset
2552
2553 .
2554  The titles for the sections can be added as ordinary sections or subsections.
2555  Since 
2556 \begin_inset Flex Code
2557 status collapsed
2558
2559 \begin_layout Plain Layout
2560 bibtopic
2561 \end_layout
2562
2563 \end_inset
2564
2565  removes the bibliography title, you have manually re-add that, too (as
2566  a chapter* or section*, for instance).
2567 \end_layout
2568
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2571 \end_layout
2572
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2576 \end_inset
2577
2578 g.
2579 \begin_inset space \space{}
2580 \end_inset
2581
2582 a bibliography for each section or chapter of the document, are not supported
2583  by BibTeX itself.
2584  But the 
2585 \begin_inset Flex Code
2586 status collapsed
2587
2588 \begin_layout Plain Layout
2589 bibtopic
2590 \end_layout
2591
2592 \end_inset
2593
2594  package, which is used for the creation of sectioned bibliographies in
2595  LyX (see the previous section), provides an easy way to solve this task,
2596  if you are willing to use some 
2597 \begin_inset Flex MenuItem
2598 status collapsed
2599
2600 \begin_layout Plain Layout
2601 TeX Code
2602 \end_layout
2603
2604 \end_inset
2605
2606  (see section
2607 \begin_inset space ~
2608 \end_inset
2609
2610
2611 \begin_inset CommandInset ref
2612 LatexCommand ref
2613 reference "sec:Inserting-TeX-Code"
2614
2615 \end_inset
2616
2617 ).
2618 \begin_inset Foot
2619 status collapsed
2620
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the 
2623 \begin_inset Flex Code
2624 status collapsed
2625
2626 \begin_layout Plain Layout
2627 chapterbib
2628 \end_layout
2629
2630 \end_inset
2631
2632  or 
2633 \begin_inset Flex Code
2634 status collapsed
2635
2636 \begin_layout Plain Layout
2637 bibunits
2638 \end_layout
2639
2640 \end_inset
2641
2642  package, respectively.
2643 \end_layout
2644
2645 \end_inset
2646
2647
2648 \end_layout
2649
2650 \begin_layout Standard
2651 First go to 
2652 \begin_inset Flex MenuItem
2653 status collapsed
2654
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2657 Settings
2658 \end_layout
2659
2660 \end_inset
2661
2662  and under 
2663 \begin_inset Flex MenuItem
2664 status collapsed
2665
2666 \begin_layout Plain Layout
2667 Bibliography
2668 \end_layout
2669
2670 \end_inset
2671
2672  check 
2673 \begin_inset Flex MenuItem
2674 status collapsed
2675
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2678 \end_layout
2679
2680 \end_inset
2681
2682 .
2683  In the document, you have to enclose the sections, which shall contain
2684  their own bibliography (including the BibTeX bibliography itself), between
2685  
2686 \begin_inset Flex Code
2687 status collapsed
2688
2689 \begin_layout Plain Layout
2690
2691 \backslash
2692 begin{btUnit}
2693 \end_layout
2694
2695 \end_inset
2696
2697  and 
2698 \begin_inset Flex Code
2699 status collapsed
2700
2701 \begin_layout Plain Layout
2702
2703 \backslash
2704 end{btUnit}
2705 \end_layout
2706
2707 \end_inset
2708
2709  (those commands have to be inserted as TeX code).
2710  The bibliography will contain all references which have been cited in the
2711  current 
2712 \begin_inset Flex Code
2713 status collapsed
2714
2715 \begin_layout Plain Layout
2716 btUnit
2717 \end_layout
2718
2719 \end_inset
2720
2721 .
2722  
2723 \series bold
2724 Note:
2725 \series default
2726  If you are using this approach, then every citation reference has to be
2727  inside some 
2728 \begin_inset Flex Code
2729 status collapsed
2730
2731 \begin_layout Plain Layout
2732 btUnit
2733 \end_layout
2734
2735 \end_inset
2736
2737 .
2738  Also, the 
2739 \begin_inset Flex Code
2740 status collapsed
2741
2742 \begin_layout Plain Layout
2743 btUnit
2744 \end_layout
2745
2746 \end_inset
2747
2748 s cannot be nested.
2749 \end_layout
2750
2751 \begin_layout Section
2752 Multipart Documents
2753 \end_layout
2754
2755 \begin_layout Subsection
2756 General Operation
2757 \end_layout
2758
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761  to break up the document into several files, or perhaps you have something
2762  where a table may change from time to time, but the preceding text does
2763  not.
2764  In these cases, you should seriously consider using multipart documents.
2765  For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767  Each of these could be its own separate LyX file, with one 
2768 \begin_inset Quotes eld
2769 \end_inset
2770
2771 master
2772 \begin_inset Quotes erd
2773 \end_inset
2774
2775  file which contains the title, authors, abstract, references, etc., plus
2776  the five included files.
2777  It is important to note that each of these files is a full LyX file which
2778  can be formatted and printed on its own, as well as included in a master
2779  file.
2780  Each of these files must have the same document class, however—don't attempt
2781  to mix book classes with article classes.
2782  You may also include LaTeX files; however, these files must not have their
2783  own preamble (i.
2784 \begin_inset space \thinspace{}
2785 \end_inset
2786
2787 g.
2788 \begin_inset space \space{}
2789 \end_inset
2790
2791 everything up to and including the 
2792 \begin_inset Flex Code
2793 status collapsed
2794
2795 \begin_layout Plain Layout
2796
2797 \backslash
2798 begin{document}
2799 \end_layout
2800
2801 \end_inset
2802
2803  line as well as the 
2804 \begin_inset Flex Code
2805 status collapsed
2806
2807 \begin_layout Plain Layout
2808
2809 \backslash
2810 end{document}
2811 \end_layout
2812
2813 \end_inset
2814
2815  line must be deleted) or else errors will be generated when you try to
2816  make a DVI file.
2817 \end_layout
2818
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with 
2821 \begin_inset Flex MenuItem
2822 status collapsed
2823
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2826 ChiId
2827 \begin_inset space ~
2828 \end_inset
2829
2830 Document
2831 \end_layout
2832
2833 \end_inset
2834
2835 .
2836  When you click on this selection a small box is inserted into the file
2837  at the current cursor location.
2838  Clicking on the box raises a dialog which allows you to select the file
2839  to be included, and the method of its inclusion.
2840  
2841 \end_layout
2842
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845  The three inclusion methods are 
2846 \begin_inset Quotes eld
2847 \end_inset
2848
2849 include
2850 \begin_inset Quotes erd
2851 \end_inset
2852
2853
2854 \begin_inset Quotes eld
2855 \end_inset
2856
2857 input
2858 \begin_inset Quotes erd
2859 \end_inset
2860
2861 , and 
2862 \begin_inset Quotes eld
2863 \end_inset
2864
2865 verbatim
2866 \begin_inset Quotes erd
2867 \end_inset
2868
2869 .
2870  The difference between 
2871 \begin_inset Quotes eld
2872 \end_inset
2873
2874 include
2875 \begin_inset Quotes erd
2876 \end_inset
2877
2878  and 
2879 \begin_inset Quotes eld
2880 \end_inset
2881
2882 input
2883 \begin_inset Quotes erd
2884 \end_inset
2885
2886  is really only meaningful to LaTeXperts, but the practical difference is
2887  that files which are 
2888 \begin_inset Quotes eld
2889 \end_inset
2890
2891 included
2892 \begin_inset Quotes erd
2893 \end_inset
2894
2895  are typeset beginning on a new page, while files which are 
2896 \begin_inset Quotes eld
2897 \end_inset
2898
2899 inputted
2900 \begin_inset Quotes erd
2901 \end_inset
2902
2903  are typeset starting on the current page.
2904 \end_layout
2905
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909  all the preamble information.
2910 \end_layout
2911
2912 \begin_layout Standard
2913
2914 \begin_inset Quotes eld
2915 \end_inset
2916
2917 verbatim
2918 \begin_inset Quotes erd
2919 \end_inset
2920
2921  included file allows you to include a file typeset exactly as it appears
2922  in the file, i.
2923 \begin_inset space \thinspace{}
2924 \end_inset
2925
2926 g.
2927 \begin_inset space \space{}
2928 \end_inset
2929
2930 in 
2931 \begin_inset Flex Code
2932 status collapsed
2933
2934 \begin_layout Plain Layout
2935 verbatim
2936 \end_layout
2937
2938 \end_inset
2939
2940  mode, with the characters set in a fixed-width typewriter font.
2941  Normally, spaces in this file are invisible, though two consecutive spaces
2942  are conserved, unlike LyX's normal treatment of spaces.
2943  However, setting the 
2944 \begin_inset Flex MenuItem
2945 status collapsed
2946
2947 \begin_layout Plain Layout
2948 Mark
2949 \begin_inset space ~
2950 \end_inset
2951
2952 spaces
2953 \begin_inset space ~
2954 \end_inset
2955
2956 in
2957 \begin_inset space ~
2958 \end_inset
2959
2960 output
2961 \end_layout
2962
2963 \end_inset
2964
2965  checkbox typesets a mark to unambiguously define the presence of a space.
2966  
2967 \end_layout
2968
2969 \begin_layout Subsection
2970 Cross-References Between Files
2971 \end_layout
2972
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2975 position "t"
2976 hor_pos "c"
2977 has_inner_box 1
2978 inner_pos "t"
2979 use_parbox 0
2980 use_makebox 0
2981 width "100col%"
2982 special "none"
2983 height "1in"
2984 height_special "totalheight"
2985 status open
2986
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989  Need to describe default master documents and how children are opened when
2990  the master is.
2991  [[FIXME]]
2992 \end_layout
2993
2994 \end_inset
2995
2996
2997 \end_layout
2998
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001  First, open all the files in question: let's call them A and B in a two
3002  file example, where B is included in A.
3003  Let's say you insert a label in A, then want to reference it in B.
3004  Open the cross-reference dialog in whilst in document B, and you can select
3005  the 
3006 \begin_inset Quotes eld
3007 \end_inset
3008
3009 buffer
3010 \begin_inset Quotes erd
3011 \end_inset
3012
3013  to use.
3014 \end_layout
3015
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3018 \end_layout
3019
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3022 position "t"
3023 hor_pos "c"
3024 has_inner_box 1
3025 inner_pos "t"
3026 use_parbox 0
3027 use_makebox 0
3028 width "100col%"
3029 special "none"
3030 height "1in"
3031 height_special "totalheight"
3032 status open
3033
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036  There is now material about this on the wiki, and it could be copied here.
3037 \end_layout
3038
3039 \end_inset
3040
3041
3042 \end_layout
3043
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3046  them to a comment.
3047  This way LyX will find the 
3048 \begin_inset Flex Code
3049 status collapsed
3050
3051 \begin_layout Plain Layout
3052 .bib
3053 \end_layout
3054
3055 \end_inset
3056
3057 -files and you can easily insert references without making the bibliography
3058  list visible.
3059 \end_layout
3060
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063  references will look like this: [?], instead of like this: [1].
3064  One solution is to use the LaTeX-package 
3065 \begin_inset Flex Code
3066 status collapsed
3067
3068 \begin_layout Plain Layout
3069 comment
3070 \end_layout
3071
3072 \end_inset
3073
3074  that will only include comments by processing the files separately.
3075  To do this, add in the LaTeX preamble of every subdocument the following:
3076 \end_layout
3077
3078 \begin_layout LyX-Code
3079
3080 \backslash
3081 usepackage{comment}
3082 \end_layout
3083
3084 \begin_layout LyX-Code
3085
3086 \backslash
3087 includecomment{comment}
3088 \end_layout
3089
3090 \begin_layout Standard
3091 See also 
3092 \begin_inset Flex URL
3093 status collapsed
3094
3095 \begin_layout Plain Layout
3096
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3098 \end_layout
3099
3100 \end_inset
3101
3102 .
3103 \end_layout
3104
3105 \begin_layout Section
3106 Fancy Headers and Footers
3107 \end_layout
3108
3109 \begin_layout Standard
3110 The default page layout is rather plain; for an 
3111 \begin_inset Flex Code
3112 status collapsed
3113
3114 \begin_layout Plain Layout
3115 article
3116 \end_layout
3117
3118 \end_inset
3119
3120  document class, all you get is a centered page number at the bottom of
3121  the page.
3122  This document uses KOMA-script's book class, so it appears to be a bit
3123  fancier.
3124  But to really put on a show, you need to set the document page style to
3125  
3126 \begin_inset Quotes eld
3127 \end_inset
3128
3129 fancy
3130 \begin_inset Quotes erd
3131 \end_inset
3132
3133 , as mentioned in the 
3134 \emph on
3135 User Guide
3136 \emph default
3137 .
3138  This section describes the LaTeX code you need to insert in your LaTeX
3139  preamble in order to get the desired effects.
3140 \end_layout
3141
3142 \begin_layout Standard
3143 For more information on fancy headers, see the 
3144 \begin_inset Flex Code
3145 status collapsed
3146
3147 \begin_layout Plain Layout
3148 fancyhdr
3149 \end_layout
3150
3151 \end_inset
3152
3153  package documentation.
3154  (
3155 \begin_inset Flex URL
3156 status collapsed
3157
3158 \begin_layout Plain Layout
3159
3160 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3161 \end_layout
3162
3163 \end_inset
3164
3165 )
3166 \end_layout
3167
3168 \begin_layout Standard
3169 The page header is divided into three fields, not surprisingly labeled 
3170 \begin_inset Quotes eld
3171 \end_inset
3172
3173 left
3174 \begin_inset Quotes erd
3175 \end_inset
3176
3177
3178 \begin_inset Quotes eld
3179 \end_inset
3180
3181 center
3182 \begin_inset Quotes erd
3183 \end_inset
3184
3185 , and 
3186 \begin_inset Quotes eld
3187 \end_inset
3188
3189 right
3190 \begin_inset Quotes erd
3191 \end_inset
3192
3193 .
3194  The footer is also divided into these three fields.
3195  The LaTeX commands to set these fields in the simplest manner are 
3196 \begin_inset Flex Code
3197 status collapsed
3198
3199 \begin_layout Plain Layout
3200
3201 \backslash
3202 lhead
3203 \end_layout
3204
3205 \end_inset
3206
3207
3208 \begin_inset Flex Code
3209 status collapsed
3210
3211 \begin_layout Plain Layout
3212
3213 \backslash
3214 chead
3215 \end_layout
3216
3217 \end_inset
3218
3219
3220 \begin_inset Flex Code
3221 status collapsed
3222
3223 \begin_layout Plain Layout
3224
3225 \backslash
3226 rhead
3227 \end_layout
3228
3229 \end_inset
3230
3231
3232 \begin_inset Flex Code
3233 status collapsed
3234
3235 \begin_layout Plain Layout
3236
3237 \backslash
3238 lfoot
3239 \end_layout
3240
3241 \end_inset
3242
3243 , etc.
3244  Suppose you wish to put your name in the upper left hand corner of each
3245  page.
3246  Simply insert the following command in the preamble: 
3247 \end_layout
3248
3249 \begin_layout Standard
3250
3251 \family typewriter
3252
3253 \backslash
3254 lhead{John Q.
3255  DocWriter}
3256 \end_layout
3257
3258 \begin_layout Standard
3259 You will now see your name in the upper left.
3260  If a field has a default entry that you would like to get rid of (often
3261  the page number appears in the central footer, simply include a command
3262  with a blank argument, e.
3263 \begin_inset space \thinspace{}
3264 \end_inset
3265
3266 g.:
3267 \end_layout
3268
3269 \begin_layout Standard
3270
3271 \family typewriter
3272
3273 \backslash
3274 cfoot{}
3275 \end_layout
3276
3277 \begin_layout Standard
3278 Let's get really fancy: lets put the section number with the word 
3279 \begin_inset Quotes eld
3280 \end_inset
3281
3282 Section
3283 \begin_inset Quotes erd
3284 \end_inset
3285
3286  (e.
3287 \begin_inset space \thinspace{}
3288 \end_inset
3289
3290 g.
3291 \begin_inset space \space{}
3292 \end_inset
3293
3294 Section 3) in the upper left, the page number (e.
3295 \begin_inset space \thinspace{}
3296 \end_inset
3297
3298 g.
3299 \begin_inset space \space{}
3300 \end_inset
3301
3302 Page 4) in the upper right, your name in the lower left, and the date in
3303  the lower right.
3304  The following commands should now appear in the preamble:
3305 \end_layout
3306
3307 \begin_layout Standard
3308
3309 \family typewriter
3310
3311 \backslash
3312 lhead{Section 
3313 \backslash
3314 thesection}
3315 \end_layout
3316
3317 \begin_layout Standard
3318
3319 \family typewriter
3320
3321 \backslash
3322 chead{}
3323 \end_layout
3324
3325 \begin_layout Standard
3326
3327 \family typewriter
3328
3329 \backslash
3330 rhead{Page 
3331 \backslash
3332 thepage}
3333 \end_layout
3334
3335 \begin_layout Standard
3336
3337 \family typewriter
3338
3339 \backslash
3340 lfoot{John Q.
3341  DocWriter}
3342 \end_layout
3343
3344 \begin_layout Standard
3345
3346 \family typewriter
3347
3348 \backslash
3349 cfoot{}
3350 \end_layout
3351
3352 \begin_layout Standard
3353
3354 \family typewriter
3355
3356 \backslash
3357 rfoot{
3358 \backslash
3359 today}
3360 \end_layout
3361
3362 \begin_layout Standard
3363 The commands 
3364 \begin_inset Flex Code
3365 status collapsed
3366
3367 \begin_layout Plain Layout
3368
3369 \backslash
3370 thesection
3371 \end_layout
3372
3373 \end_inset
3374
3375  and 
3376 \begin_inset Flex Code
3377 status collapsed
3378
3379 \begin_layout Plain Layout
3380
3381 \backslash
3382 thepage
3383 \end_layout
3384
3385 \end_inset
3386
3387  access LaTeX's section and page counters, and so print out the current
3388  section and page numbers.
3389  
3390 \begin_inset Flex Code
3391 status collapsed
3392
3393 \begin_layout Plain Layout
3394
3395 \backslash
3396 today
3397 \end_layout
3398
3399 \end_inset
3400
3401  simply prints out today's date.
3402 \end_layout
3403
3404 \begin_layout Standard
3405 The thicknesses of the horizontal rules drawn beneath the header and above
3406  the footer can also be modified.
3407  If you don't want one of the rules, set its thickness to 0.
3408  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3409  Use commands
3410 \family typewriter
3411  
3412 \family default
3413 like 
3414 \begin_inset Flex Code
3415 status collapsed
3416
3417 \begin_layout Plain Layout
3418
3419 \backslash
3420 renewcommand{
3421 \backslash
3422 headrulewidth}{0.4pt}
3423 \end_layout
3424
3425 \end_inset
3426
3427  and 
3428 \begin_inset Flex Code
3429 status collapsed
3430
3431 \begin_layout Plain Layout
3432
3433 \backslash
3434 renewcommand{
3435 \backslash
3436 footrulewidth}{0.4pt}
3437 \end_layout
3438
3439 \end_inset
3440
3441  to set the thicknesses.
3442 \end_layout
3443
3444 \begin_layout Standard
3445 You can switch the header/footer settings on and off for individual pages
3446  using commands like 
3447 \begin_inset Flex Code
3448 status collapsed
3449
3450 \begin_layout Plain Layout
3451
3452 \backslash
3453 thispagestyle{empty}
3454 \end_layout
3455
3456 \end_inset
3457
3458
3459 \begin_inset Flex Code
3460 status collapsed
3461
3462 \begin_layout Plain Layout
3463
3464 \backslash
3465 thispagestyle{plain}
3466 \end_layout
3467
3468 \end_inset
3469
3470 , and 
3471 \begin_inset Flex Code
3472 status collapsed
3473
3474 \begin_layout Plain Layout
3475
3476 \backslash
3477 thispagestyle{fancy}
3478 \end_layout
3479
3480 \end_inset
3481
3482 .
3483  Simply insert them in the text on the page you want changed and mark them
3484  as TeX code.
3485  In fact, title pages are marked as plain by default, while following pages
3486  are marked fancy when using the global fancy setting.
3487 \end_layout
3488
3489 \begin_layout Standard
3490 As a final example, it is possible to include an image in the header or
3491  footer.
3492  Suppose you want to put a company logo in the upper lefthand corner.
3493  You might try something like
3494 \end_layout
3495
3496 \begin_layout Standard
3497
3498 \family typewriter
3499
3500 \backslash
3501 lhead{
3502 \backslash
3503 resizebox{1in}{!}{
3504 \backslash
3505 includegraphics{logo.eps}}}
3506 \end_layout
3507
3508 \begin_layout Standard
3509 \noindent
3510 (you may need to preface this with 
3511 \begin_inset Flex Code
3512 status collapsed
3513
3514 \begin_layout Plain Layout
3515 \noindent
3516
3517 \backslash
3518 usepackage{graphics}
3519 \end_layout
3520
3521 \end_inset
3522
3523  if you don't include graphics elsewhere in your document).
3524 \end_layout
3525
3526 \begin_layout Section
3527 Itemize Bullet Selection
3528 \begin_inset CommandInset label
3529 LatexCommand label
3530 name "sec:bullet"
3531
3532 \end_inset
3533
3534
3535 \end_layout
3536
3537 \begin_layout Standard
3538 by
3539 \noun on
3540  Allan Rae
3541 \end_layout
3542
3543 \begin_layout Subsection
3544 Introduction
3545 \end_layout
3546
3547 \begin_layout Standard
3548 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3549  Using this dialog you can easily specify what bullet shape to use at each
3550  level of an itemized list.
3551  These settings are document-wide so you won't be able to specify different
3552  sets of bullets for different paragraphs.
3553 \begin_inset Foot
3554 status collapsed
3555
3556 \begin_layout Plain Layout
3557 Well, actually you can but you'll have to do it by hand.
3558 \end_layout
3559
3560 \end_inset
3561
3562
3563 \end_layout
3564
3565 \begin_layout Subsection
3566 How it looks
3567 \end_layout
3568
3569 \begin_layout Standard
3570 Open the dialog by selecting the 
3571 \begin_inset Flex MenuItem
3572 status collapsed
3573
3574 \begin_layout Plain Layout
3575 Document\SpecialChar \menuseparator
3576 Settings
3577 \end_layout
3578
3579 \end_inset
3580
3581  menu item and then select the 
3582 \begin_inset Flex MenuItem
3583 status collapsed
3584
3585 \begin_layout Plain Layout
3586 Bullets
3587 \end_layout
3588
3589 \end_inset
3590
3591  tab.
3592 \end_layout
3593
3594 \begin_layout Standard
3595 The dialog provides you with a table of bullet shapes.
3596  A column of buttons on the left of the table provides access to the six
3597  different panels of bullet shapes.
3598  The row of buttons across the top is used to select which bullet depth
3599  you are changing.
3600  A text entry under the table shows the currently selected bullet shape's
3601  LaTeX equivalent and this can be edited if desired.
3602  If you do modify the text you will also need to specify any needed packages
3603  in the LaTeX preamble.
3604 \end_layout
3605
3606 \begin_layout Standard
3607 The six panels are divided up by the packages they require.
3608  The following table shows the mappings from button name to LaTeX packages.
3609 \end_layout
3610
3611 \begin_layout Standard
3612 \align center
3613 \begin_inset Tabular
3614 <lyxtabular version="3" rows="7" columns="2">
3615 <features tabularvalignment="middle">
3616 <column alignment="center" valignment="top" width="0pt">
3617 <column alignment="center" valignment="top" width="0pt">
3618 <row>
3619 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3620 \begin_inset Text
3621
3622 \begin_layout Plain Layout
3623
3624 \family roman
3625 \series medium
3626 \shape up
3627 \size normal
3628 \emph off
3629 \bar no
3630 \noun off
3631 \color none
3632 Button
3633 \end_layout
3634
3635 \end_inset
3636 </cell>
3637 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3638 \begin_inset Text
3639
3640 \begin_layout Plain Layout
3641
3642 \family roman
3643 \series medium
3644 \shape up
3645 \size normal
3646 \emph off
3647 \bar no
3648 \noun off
3649 \color none
3650 Packages Required
3651 \end_layout
3652
3653 \end_inset
3654 </cell>
3655 </row>
3656 <row>
3657 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3658 \begin_inset Text
3659
3660 \begin_layout Plain Layout
3661
3662 \family sans
3663 \series medium
3664 \shape up
3665 \size normal
3666 \emph off
3667 \bar no
3668 \noun off
3669 \color none
3670 Standard
3671 \end_layout
3672
3673 \end_inset
3674 </cell>
3675 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3676 \begin_inset Text
3677
3678 \begin_layout Plain Layout
3679
3680 \series medium
3681 \shape up
3682 \size normal
3683 \emph off
3684 \bar no
3685 \noun off
3686 \color none
3687 base LaTeX
3688 \end_layout
3689
3690 \end_inset
3691 </cell>
3692 </row>
3693 <row>
3694 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3695 \begin_inset Text
3696
3697 \begin_layout Plain Layout
3698
3699 \family sans
3700 \series medium
3701 \shape up
3702 \size normal
3703 \emph off
3704 \bar no
3705 \noun off
3706 \color none
3707 Maths
3708 \end_layout
3709
3710 \end_inset
3711 </cell>
3712 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3713 \begin_inset Text
3714
3715 \begin_layout Plain Layout
3716
3717 \family typewriter
3718 \series medium
3719 \shape up
3720 \size normal
3721 \emph off
3722 \bar no
3723 \noun off
3724 \color none
3725 amssymb.sty
3726 \end_layout
3727
3728 \end_inset
3729 </cell>
3730 </row>
3731 <row>
3732 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3733 \begin_inset Text
3734
3735 \begin_layout Plain Layout
3736
3737 \family sans
3738 \series medium
3739 \shape up
3740 \size normal
3741 \emph off
3742 \bar no
3743 \noun off
3744 \color none
3745 Ding1
3746 \end_layout
3747
3748 \end_inset
3749 </cell>
3750 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3751 \begin_inset Text
3752
3753 \begin_layout Plain Layout
3754
3755 \family typewriter
3756 \series medium
3757 \shape up
3758 \size normal
3759 \emph off
3760 \bar no
3761 \noun off
3762 \color none
3763 pifont.sty
3764 \end_layout
3765
3766 \end_inset
3767 </cell>
3768 </row>
3769 <row>
3770 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3771 \begin_inset Text
3772
3773 \begin_layout Plain Layout
3774
3775 \family sans
3776 \series medium
3777 \shape up
3778 \size normal
3779 \emph off
3780 \bar no
3781 \noun off
3782 \color none
3783 Ding2
3784 \end_layout
3785
3786 \end_inset
3787 </cell>
3788 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3789 \begin_inset Text
3790
3791 \begin_layout Plain Layout
3792
3793 \family typewriter
3794 \series medium
3795 \shape up
3796 \size normal
3797 \emph off
3798 \bar no
3799 \noun off
3800 \color none
3801 pifont.sty
3802 \end_layout
3803
3804 \end_inset
3805 </cell>
3806 </row>
3807 <row>
3808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3809 \begin_inset Text
3810
3811 \begin_layout Plain Layout
3812
3813 \family sans
3814 \series medium
3815 \shape up
3816 \size normal
3817 \emph off
3818 \bar no
3819 \noun off
3820 \color none
3821 Ding3
3822 \end_layout
3823
3824 \end_inset
3825 </cell>
3826 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3827 \begin_inset Text
3828
3829 \begin_layout Plain Layout
3830
3831 \family typewriter
3832 \series medium
3833 \shape up
3834 \size normal
3835 \emph off
3836 \bar no
3837 \noun off
3838 \color none
3839 pifont.sty
3840 \end_layout
3841
3842 \end_inset
3843 </cell>
3844 </row>
3845 <row>
3846 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3847 \begin_inset Text
3848
3849 \begin_layout Plain Layout
3850
3851 \family sans
3852 \series medium
3853 \shape up
3854 \size normal
3855 \emph off
3856 \bar no
3857 \noun off
3858 \color none
3859 Ding4
3860 \end_layout
3861
3862 \end_inset
3863 </cell>
3864 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3865 \begin_inset Text
3866
3867 \begin_layout Plain Layout
3868
3869 \family typewriter
3870 \series medium
3871 \shape up
3872 \size normal
3873 \emph off
3874 \bar no
3875 \noun off
3876 \color none
3877 pifont.sty
3878 \end_layout
3879
3880 \end_inset
3881 </cell>
3882 </row>
3883 </lyxtabular>
3884
3885 \end_inset
3886
3887
3888 \end_layout
3889
3890 \begin_layout Standard
3891 LyX doesn't stop you using bullets from packages you don't have.
3892  If you get errors from LaTeX when you try to view or print the file, then
3893  it is likely you are missing a package.
3894 \begin_inset Foot
3895 status collapsed
3896
3897 \begin_layout Plain Layout
3898 LyX doesn't restrict your use since you may be editing locally and exporting
3899  elsewhere.
3900 \end_layout
3901
3902 \end_inset
3903
3904
3905 \end_layout
3906
3907 \begin_layout Subsection
3908 How to use it
3909 \end_layout
3910
3911 \begin_layout Standard
3912 Select which bullet depth you want to change then select the bullet shape
3913  and size.
3914  Any changes will not be visible in LyX, but are visible when viewing the
3915  document.
3916 \end_layout
3917
3918 \begin_layout Standard
3919 You can reset a bullet shape to the default simply by clicking your right
3920  mouse button on the appropriate bullet depth button.
3921 \begin_inset Foot
3922 status collapsed
3923
3924 \begin_layout Plain Layout
3925 If you 
3926 \emph on
3927 really
3928 \emph default
3929  want to have multiple sets of paragraphs with different sets of bullets
3930  in each, then you're going to have to get your hands dirty with TeX code.
3931  The bullet selection dialog can help though because it provides you with
3932  the LaTeX code for a wide range of bullet shapes.
3933  To make your own custom paragraphs you have the following options:
3934 \end_layout
3935
3936 \begin_layout Plain Layout
3937 \begin_inset ERT
3938 status open
3939
3940 \begin_layout Plain Layout
3941
3942
3943 \backslash
3944 let
3945 \backslash
3946 savelabelitemi=
3947 \backslash
3948 labelitemi
3949 \end_layout
3950
3951 \end_inset
3952
3953
3954 \end_layout
3955
3956 \begin_layout Plain Layout
3957 \begin_inset ERT
3958 status open
3959
3960 \begin_layout Plain Layout
3961
3962
3963 \backslash
3964 renewcommand
3965 \backslash
3966 labelitemi[0]{
3967 \backslash
3968 small
3969 \backslash
3970 (
3971 \backslash
3972 sharp
3973 \backslash
3974 )}
3975 \end_layout
3976
3977 \end_inset
3978
3979
3980 \end_layout
3981
3982 \begin_layout Itemize
3983 Use the LaTeX command 
3984 \begin_inset Flex Code
3985 status collapsed
3986
3987 \begin_layout Plain Layout
3988
3989 \backslash
3990 renewcommand{}{}
3991 \end_layout
3992
3993 \end_inset
3994
3995  to specify a new bullet shape for a given depth.
3996  You'll also need to save the current bullet shape so you can restore it
3997  again afterwards.
3998  In this itemized list the following LaTeX code was used to change the bullet
3999  used for the first depth.
4000 \end_layout
4001
4002 \begin_deeper
4003 \begin_layout LyX-Code
4004
4005 \backslash
4006 let
4007 \backslash
4008 savelabelitemi=
4009 \backslash
4010 labelitemi 
4011 \end_layout
4012
4013 \begin_layout LyX-Code
4014
4015 \backslash
4016 renewcommand
4017 \backslash
4018 labelitemi[0]{
4019 \backslash
4020 small
4021 \backslash
4022 (
4023 \backslash
4024 sharp
4025 \backslash
4026 )}
4027 \end_layout
4028
4029 \end_deeper
4030 \begin_layout Itemize
4031 Note that the itemize depth is specified in Roman numerals as part of the
4032  
4033 \family typewriter
4034
4035 \backslash
4036 labelitem
4037 \family default
4038  command.
4039 \end_layout
4040
4041 \begin_layout Itemize
4042 \begin_inset ERT
4043 status open
4044
4045 \begin_layout Plain Layout
4046
4047 [
4048 \backslash
4049 (
4050 \backslash
4051 star
4052 \backslash
4053 )]
4054 \end_layout
4055
4056 \end_inset
4057
4058  Specify each individual entry by starting each item with the bullet shape
4059  enclosed in square brackets and set as 
4060 \begin_inset Flex MenuItem
4061 status collapsed
4062
4063 \begin_layout Plain Layout
4064 TeX Code
4065 \end_layout
4066
4067 \end_inset
4068
4069 .
4070  For example, this item was started with 
4071 \begin_inset Flex Code
4072 status collapsed
4073
4074 \begin_layout Plain Layout
4075 [
4076 \backslash
4077 (
4078 \backslash
4079 star
4080 \backslash
4081 )]
4082 \end_layout
4083
4084 \end_inset
4085
4086 .
4087 \end_layout
4088
4089 \begin_layout Plain Layout
4090 \begin_inset ERT
4091 status open
4092
4093 \begin_layout Plain Layout
4094
4095
4096 \backslash
4097 renewcommand
4098 \backslash
4099 labelitemi[0]{
4100 \backslash
4101 savelabelitemi}
4102 \end_layout
4103
4104 \end_inset
4105
4106
4107 \end_layout
4108
4109 \begin_layout Plain Layout
4110 You'll also need to revert the labelitem back to its previous setting for
4111  the global bullet shape settings to remain in effect.
4112  The way used here was:
4113 \end_layout
4114
4115 \begin_layout LyX-Code
4116
4117 \backslash
4118 renewcommand
4119 \backslash
4120 labelitemi[0]{
4121 \backslash
4122 savelabelitemi}
4123 \end_layout
4124
4125 \end_inset
4126
4127
4128 \end_layout
4129
4130 \begin_layout Chapter
4131 LyX and the World Wide Web
4132 \end_layout
4133
4134 \begin_layout Standard
4135 LyX has long supported the export of documents to various web-friendly formats,
4136  such as HTML.
4137  Before verson 2.0, however, HTML export was always accomplished by the use
4138  of external converters.
4139 \begin_inset Foot
4140 status collapsed
4141
4142 \begin_layout Plain Layout
4143 For details on the use of external converters with LyX, see the 
4144 \emph on
4145 Converters
4146 \emph default
4147  section of the Customization manual.
4148 \end_layout
4149
4150 \end_inset
4151
4152  These fall into two large groups: there are converters that use LaTeX as
4153  an intermediate format, such as 
4154 \begin_inset Flex Code
4155 status collapsed
4156
4157 \begin_layout Plain Layout
4158 htlatex
4159 \end_layout
4160
4161 \end_inset
4162
4163
4164 \begin_inset Flex Code
4165 status collapsed
4166
4167 \begin_layout Plain Layout
4168 html2latex
4169 \end_layout
4170
4171 \end_inset
4172
4173 , and 
4174 \begin_inset Flex Code
4175 status collapsed
4176
4177 \begin_layout Plain Layout
4178 plastex
4179 \end_layout
4180
4181 \end_inset
4182
4183 , relying upon LyX to produce the LaTeX; and there is a converter that works
4184  directly on LyX files, 
4185 \begin_inset Flex Code
4186 status collapsed
4187
4188 \begin_layout Plain Layout
4189 eLyXer
4190 \end_layout
4191
4192 \end_inset
4193
4194 .
4195  All of these have different advantages and disadvantages.
4196  
4197 \end_layout
4198
4199 \begin_layout Standard
4200 The LaTeX-based converters have the advantage that, in principle, they know
4201  everything about the exported document that LaTeX does.
4202  Such converters do not care, for example, if a certain block of code was
4203  produced by LyX or was Evil Red Text.
4204  These converters know about 
4205 \begin_inset Flex Code
4206 status collapsed
4207
4208 \begin_layout Plain Layout
4209 aux
4210 \end_layout
4211
4212 \end_inset
4213
4214  files, counters, and references, and can often make use of the 
4215 \begin_inset Flex Code
4216 status collapsed
4217
4218 \begin_layout Plain Layout
4219 bbl
4220 \end_layout
4221
4222 \end_inset
4223
4224  files generated by BibTeX.
4225  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4226  said that only TeX itself understands TeX---and LaTeX-based converters
4227  will often choke on what seem to be quite simple constructs; complex ones
4228  can throw them completely, and as of this writing, for example, the 
4229 \emph on
4230 Embedded Objects
4231 \emph default
4232  manual will not export with 
4233 \begin_inset Flex Code
4234 status collapsed
4235
4236 \begin_layout Plain Layout
4237 htlatex
4238 \end_layout
4239
4240 \end_inset
4241
4242 , though the others will.
4243  The other issue concerns how math is handled.
4244  These converters typically convert the formulae into little pictures that
4245  are then linked from the HTML document.
4246  Since these are actually generated by LaTeX, they are accurate.
4247  But they do not scale well, and just getting them to look as if they are
4248  actually meant to be in your document---so that the font sizes seem to
4249  be roughly the same---can be a challenge.
4250 \end_layout
4251
4252 \begin_layout Standard
4253 Alex Fernandez's 
4254 \begin_inset Flex Code
4255 status collapsed
4256
4257 \begin_layout Plain Layout
4258 eLyXer
4259 \end_layout
4260
4261 \end_inset
4262
4263  (
4264 \begin_inset CommandInset href
4265 LatexCommand href
4266 name "http://elyxer.nongnu.org/"
4267 target "http://elyxer.nongnu.org/"
4268
4269 \end_inset
4270
4271 ) solves some of these problems.
4272  In particular, the formulae it produces scale perfectly, since it renders
4273  math using a combination of HTML and CSS rather than converting the formulae
4274  to images.
4275  But even moderately complex formula are rendered less well than with 
4276 \begin_inset Flex Code
4277 status collapsed
4278
4279 \begin_layout Plain Layout
4280 htlatex
4281 \end_layout
4282
4283 \end_inset
4284
4285 ; this reflects the limitations of HTML.
4286 \begin_inset Foot
4287 status collapsed
4288
4289 \begin_layout Plain Layout
4290 That said, 
4291 \begin_inset Flex Code
4292 status collapsed
4293
4294 \begin_layout Plain Layout
4295 eLyXer
4296 \end_layout
4297
4298 \end_inset
4299
4300  can also use jsMath and MathJax for equations, but this setting is only
4301  available globally and requires one to have access to a server that runs
4302  the backend.
4303 \end_layout
4304
4305 \end_inset
4306
4307  More importantly (as of version 1.1.1, at least), 
4308 \begin_inset Flex Code
4309 status collapsed
4310
4311 \begin_layout Plain Layout
4312 eLyXer
4313 \end_layout
4314
4315 \end_inset
4316
4317  has limited support for math macros and no support for user-defined paragraph
4318  or character styles.
4319  These limitations make 
4320 \begin_inset Flex Code
4321 status collapsed
4322
4323 \begin_layout Plain Layout
4324 eLyXer
4325 \end_layout
4326
4327 \end_inset
4328
4329  unsuitable for many of the documents LyX users produce.
4330  In principle, of course, these problems could be solved, but the LyX developers
4331  have decided to follow a different path and have made LyX itself capable
4332  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4333  plaintext.
4334 \end_layout
4335
4336 \begin_layout Standard
4337 As of this writing, XHTML output remains under development and should probably
4338  be regarded as 
4339 \begin_inset Quotes eld
4340 \end_inset
4341
4342 experimental
4343 \begin_inset Quotes erd
4344 \end_inset
4345
4346 .
4347 \begin_inset Foot
4348 status collapsed
4349
4350 \begin_layout Plain Layout
4351 The file 
4352 \begin_inset Flex Code
4353 status collapsed
4354
4355 \begin_layout Plain Layout
4356 development/HTML.notes
4357 \end_layout
4358
4359 \end_inset
4360
4361 , which can be found in the LyX source tree or 
4362 \begin_inset CommandInset href
4363 LatexCommand href
4364 name "accessed online"
4365 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4366
4367 \end_inset
4368
4369 , usually contains up-to-date information about the state of XHTML output.
4370  See also the list of XHTML bugs on 
4371 \begin_inset CommandInset href
4372 LatexCommand href
4373 name "the bug tracker"
4374 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4375
4376 \end_inset
4377
4378 .
4379 \end_layout
4380
4381 \end_inset
4382
4383  Still, the developers have chosen this approach because it has several
4384  potential advantages over the other two.
4385 \end_layout
4386
4387 \begin_layout Standard
4388 These advantages are primarily due to the fact that the XHTML output routines,
4389  since they are part of LyX, know everything LyX knows about the document
4390  being exported.
4391 \begin_inset Foot
4392 status collapsed
4393
4394 \begin_layout Plain Layout
4395 Another advantage is that, since these routines are internal to LyX, they
4396  are immune to changes in LyX's file format, or to changes in the semantics
4397  of existing insets.
4398 \end_layout
4399
4400 \end_inset
4401
4402  So they know about the table of contents (as displayed in the outline),
4403  about the counters associated with different paragraph styles, and about
4404  user-defined styles.
4405  The XHTML output routines know what LyX knows about internationalization,
4406  too, so they will output 
4407 \begin_inset Quotes eld
4408 \end_inset
4409
4410 Chapter 1
4411 \begin_inset Quotes erd
4412 \end_inset
4413
4414  or 
4415 \begin_inset Quotes eld
4416 \end_inset
4417
4418
4419 \lang ngerman
4420 Kapitel
4421 \lang english
4422  1
4423 \begin_inset Quotes erd
4424 \end_inset
4425
4426 , depending upon the language in effect at the time.
4427  
4428 \end_layout
4429
4430 \begin_layout Standard
4431 Quite generally, the output routines know what LyX knows about document
4432  layout, that is, about how the document is to be rendered on screen.
4433  We use this information when we output the document as XHTML.
4434  In particular, LyX 
4435 \emph on
4436 automatically
4437 \emph default
4438  generates CSS style information corresponding to the layout information
4439  it uses to render the document on screen: if section headings are supposed
4440  to be sans-serif and bold as seen in LyX, then (by default) they will be
4441  sans-serif and bold when viewed in a web browser, too.
4442  And this is true not just for pre-defined styles, like Section, but for
4443  any style, including user-defined styles.
4444  Indeed, the XHTML output routines make no distinction between user-defined
4445  paragraph and character styles and LyX's own pre-defined styles: in each
4446  case, everything LyX knows about the styles is contained in the layout
4447  files.
4448  And much the same is true as regards pre-defined textual insets, such as
4449  footnotes, and various custom insets.
4450  
4451 \end_layout
4452
4453 \begin_layout Standard
4454 The result is that XHTML output can be customized and extended in exactly
4455  the same way LaTeX output can be customized and extended: through layout
4456  files and modules.
4457  See chapter five of the 
4458 \emph on
4459 Customization 
4460 \emph default
4461 manual for the details.
4462 \end_layout
4463
4464 \begin_layout Standard
4465 The remainder of this chapter contains more detailed information on XHTML
4466  output, its limitations, and ways to work around those limitations.
4467 \end_layout
4468
4469 \begin_layout Section
4470 Math Output in XHTML
4471 \end_layout
4472
4473 \begin_layout Standard
4474 LyX offers four choices for how math is rendered.
4475  These have various advantages and disadvantages:
4476 \end_layout
4477
4478 \begin_layout Itemize
4479 MathML
4480 \begin_inset Newline newline
4481 \end_inset
4482
4483 MathML is a dialect of XML designed specifically for mathematics on the
4484  web, and it typically renders very well in browsers that support it.
4485  The disadvantage is that not all browsers support MathML, and support is
4486  not complete even in the Gecko-based browsers, such as Firefox.
4487 \begin_inset Newline newline
4488 \end_inset
4489
4490 If LyX is unable to render a formula as MathML---for example, if the formula
4491  uses the 
4492 \begin_inset Flex Code
4493 status collapsed
4494
4495 \begin_layout Plain Layout
4496 xymatrix
4497 \end_layout
4498
4499 \end_inset
4500
4501  package or ERT---then it will instead output the formula as an image.
4502  
4503 \end_layout
4504
4505 \begin_layout Itemize
4506 HTML
4507 \begin_inset Newline newline
4508 \end_inset
4509
4510 As mentioned above, 
4511 \begin_inset Flex Code
4512 status collapsed
4513
4514 \begin_layout Plain Layout
4515 elyxer
4516 \end_layout
4517
4518 \end_inset
4519
4520  outputs math as HTML, styled by CSS.
4521 \begin_inset Foot
4522 status collapsed
4523
4524 \begin_layout Plain Layout
4525 LyX has borrowed some of the CSS for its HTML output from 
4526 \begin_inset Flex Code
4527 status collapsed
4528
4529 \begin_layout Plain Layout
4530 elyxer
4531 \end_layout
4532
4533 \end_inset
4534
4535 .
4536 \end_layout
4537
4538 \end_inset
4539
4540  For simple formulae, this can work quite well, though with more complicated
4541  formulae it tends to break down.
4542  Still, this method has the advantage that it is very widely supported and
4543  so it may be appropriate for documents that contain only a little, fairly
4544  simple math.
4545 \begin_inset Newline newline
4546 \end_inset
4547
4548 If Lyx is unable to render a formula as HTML---for example, if the formula
4549  uses the 
4550 \begin_inset Flex Code
4551 status collapsed
4552
4553 \begin_layout Plain Layout
4554 xymatrix
4555 \end_layout
4556
4557 \end_inset
4558
4559  package or ERT---then it will instead output the formula as an image.
4560  
4561 \end_layout
4562
4563 \begin_layout Itemize
4564 Images
4565 \begin_inset Newline newline
4566 \end_inset
4567
4568 Like 
4569 \begin_inset Flex Code
4570 status collapsed
4571
4572 \begin_layout Plain Layout
4573 htlatex
4574 \end_layout
4575
4576 \end_inset
4577
4578 , LyX will output formulae as images, the very same images, in fact, that
4579  are used for instant preview.
4580 \begin_inset Foot
4581 status collapsed
4582
4583 \begin_layout Plain Layout
4584 Instant preview does 
4585 \emph on
4586 not 
4587 \emph default
4588 have to be on for images to be output, however.
4589 \end_layout
4590
4591 \end_inset
4592
4593  The advantage to this method is that the images are simply generated by
4594  LaTeX, so they are very accurate.
4595  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4596  so they do not scale terribly well, and one cannot copy them, etc.
4597  (As of this writing, there are also problems about equation numbering.
4598  See 
4599 \begin_inset CommandInset href
4600 LatexCommand href
4601 name "bug 6894"
4602 target "http://www.lyx.org/trac/ticket/6894"
4603
4604 \end_inset
4605
4606 .)
4607 \begin_inset Newline newline
4608 \end_inset
4609
4610 The size of the images can be controlled by setting the 
4611 \begin_inset Quotes eld
4612 \end_inset
4613
4614 Math Images Scaling
4615 \begin_inset Quotes erd
4616 \end_inset
4617
4618  parameter under 
4619 \begin_inset Flex MenuItem
4620 status collapsed
4621
4622 \begin_layout Plain Layout
4623 Document\SpecialChar \menuseparator
4624 Settings\SpecialChar \menuseparator
4625 Output
4626 \end_layout
4627
4628 \end_inset
4629
4630 .
4631 \begin_inset Foot
4632 status collapsed
4633
4634 \begin_layout Plain Layout
4635 For those who want to know, this controls the resolution of the image in
4636  dots per inch and is based upon a default of 75 dpi.
4637 \end_layout
4638
4639 \end_inset
4640
4641
4642 \begin_inset Newline newline
4643 \end_inset
4644
4645 If LyX for some reason fails to create an image for a formula (e.g., if a
4646  required LaTeX package is not installed), then it will fall back to outputing
4647  the raw LaTeX.
4648 \end_layout
4649
4650 \begin_layout Itemize
4651 LaTeX
4652 \begin_inset Newline newline
4653 \end_inset
4654
4655 Finally, LyX will happily output math as LaTeX.
4656  As well as being the output of last resort, this method can be used with
4657  such tools as 
4658 \begin_inset CommandInset href
4659 LatexCommand href
4660 name "jsMath"
4661 target "http://www.math.union.edu/~dpvc/jsMath/"
4662
4663 \end_inset
4664
4665 , which uses JavaScript to render LaTeX embedded in HTML documents.
4666  LyX wraps the LaTeX in either a 
4667 \begin_inset Flex Code
4668 status collapsed
4669
4670 \begin_layout Plain Layout
4671 span
4672 \end_layout
4673
4674 \end_inset
4675
4676  (for inline formulas) or 
4677 \begin_inset Flex Code
4678 status collapsed
4679
4680 \begin_layout Plain Layout
4681 div
4682 \end_layout
4683
4684 \end_inset
4685
4686  (for displayed formulas) with 
4687 \begin_inset Flex Code
4688 status collapsed
4689
4690 \begin_layout Plain Layout
4691 class='math'
4692 \end_layout
4693
4694 \end_inset
4695
4696 , as is required for jsMath.
4697 \end_layout
4698
4699 \begin_layout Standard
4700 One of these output methods must be selected under 
4701 \begin_inset Flex MenuItem
4702 status collapsed
4703
4704 \begin_layout Plain Layout
4705 Document\SpecialChar \menuseparator
4706 Settings\SpecialChar \menuseparator
4707 Output
4708 \end_layout
4709
4710 \end_inset
4711
4712 .
4713  By default, LyX outputs MathML.
4714  This is a document-wide setting, therefore.
4715 \end_layout
4716
4717 \begin_layout Standard
4718 Eventually, LyX will offer the user the option to select an alternate output
4719  method for a particular inset, say, one that isn't being rendered very
4720  well by MathML.
4721 \begin_inset Foot
4722 status collapsed
4723
4724 \begin_layout Plain Layout
4725 That said, since LyX falls back to images if the inset contains ERT, then
4726  one can force output as an image by putting some harmless ERT into the
4727  math, for example: 
4728 \begin_inset Formula $a=b\relax$
4729 \end_inset
4730
4731 .
4732 \end_layout
4733
4734 \end_inset
4735
4736
4737 \end_layout
4738
4739 \begin_layout Section
4740 Bibliography and Citations
4741 \end_layout
4742
4743 \begin_layout Standard
4744 XHTML output fully supports bibliographies and citations.
4745  
4746 \end_layout
4747
4748 \begin_layout Standard
4749 Citation labels are generated by the same machinery that generates LyX's
4750  on-screen labels, so the labels will look in the output much as they do
4751  in LyX, though better.
4752  If you are using numerical citations, then LyX will output numerical labels,
4753  such as [1] or [17], rather than simply showing the citation key in square
4754  brackets, as it does on-screen.
4755  If you are using author-year citations, then LyX will add lowercase letters
4756  to the years, just as BibTeX does, if it finds more than one citation for
4757  a given author-year combination.
4758  The labels will be printed with the bibliography entries.
4759  Note that there is, at present, no way to customize the appearance of the
4760  labels, for example, to choose between square brackets and parentheses.
4761 \end_layout
4762
4763 \begin_layout Standard
4764 Bibliography output is handled by the same machinery that handles the presentati
4765 on of reference information in the citation dialog, so you will see in the
4766  XHTML output pretty much what you would see if you were to look at a given
4767  entry in the citation dialog.
4768  The formatting can be customized in your layout file or, preferably, in
4769  a module.
4770  See the 
4771 \emph on
4772 Customization
4773 \emph default
4774  manual for the details.
4775 \end_layout
4776
4777 \begin_layout Standard
4778 The main defect at present is that cross-referenced information is printed
4779  with every entry with which it is associated.
4780  So you can see things like this:
4781 \end_layout
4782
4783 \begin_layout Quote
4784 Jason Stanley, 
4785 \begin_inset Quotes eld
4786 \end_inset
4787
4788 Context and Logical Form
4789 \begin_inset Quotes erd
4790 \end_inset
4791
4792 , in 
4793 \emph on
4794 Language in Context: Selected Essays
4795 \emph default
4796  (Oxford: Oxford University Press, 2007), pp.
4797  30--68.
4798 \end_layout
4799
4800 \begin_layout Quote
4801 Jason Stanley, 
4802 \begin_inset Quotes eld
4803 \end_inset
4804
4805 Semantics in Context
4806 \begin_inset Quotes erd
4807 \end_inset
4808
4809 , in 
4810 \emph on
4811 Language in Context: Selected Essays
4812 \emph default
4813  (Oxford: Oxford University Press, 2007), pp.
4814  201--30.
4815 \end_layout
4816
4817 \begin_layout Standard
4818 This should be fixed before long.
4819 \end_layout
4820
4821 \begin_layout Standard
4822 There is no support at present for sectioned bibliographies.
4823  If you have multiple bibliographies, then LyX will print the same bibliography
4824  over and over.
4825 \end_layout
4826
4827 \begin_layout Section
4828 Indexes
4829 \end_layout
4830
4831 \begin_layout Standard
4832 LyX will happily export indexes as XHTML, but with certain limitations at
4833  the moment.
4834 \end_layout
4835
4836 \begin_layout Standard
4837 Index export will be most reliable when you do not attempt to use the fancy
4838  constructs that are described in the section on indexes in the 
4839 \emph on
4840 User's Guide
4841 \emph default
4842 .
4843 \begin_inset Foot
4844 status collapsed
4845
4846 \begin_layout Plain Layout
4847 The main issue here is that LyX itself does not really handle these.
4848  It just lets you enter what you would have to enter in raw LaTeX.
4849 \end_layout
4850
4851 \end_inset
4852
4853  We'll describe how they are handled using the subsection headings from
4854  that section.
4855 \end_layout
4856
4857 \begin_layout Itemize
4858 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4859  these, but the entries must be separated by 
4860 \begin_inset Quotes eld
4861 \end_inset
4862
4863  ! 
4864 \begin_inset Quotes erd
4865 \end_inset
4866
4867 , that is, there must be spaces around the exclamation point.
4868  This is because it is otherwise too difficult to check for escaped exclamation
4869  points, ones in math, and so forth.
4870 \end_layout
4871
4872 \begin_layout Itemize
4873 Page Ranges: There is no support at all for page ranges, since these make
4874  no sense with XHMTL.
4875  Instead, you will just get two index entries, one at either end.
4876 \end_layout
4877
4878 \begin_layout Itemize
4879 Cross-referencing: There is no support for cross-referencing.
4880  If LyX finds an entry containing the 
4881 \begin_inset Quotes eld
4882 \end_inset
4883
4884 |see\SpecialChar \ldots{}
4885
4886 \begin_inset Quotes erd
4887 \end_inset
4888
4889  construct, it is just dropped, and the rest is treated as an ordinary index
4890  entry.
4891 \end_layout
4892
4893 \begin_layout Itemize
4894 Index Entry Order: LyX does support attempts to fix the sorting order.
4895  It will take what is before the first `@' it finds and use that for sorting,
4896  taking what follows the first `@' to be the actual entry.
4897  At present, LyX does not check for escaped `@', so do not try to index
4898  email addresses.
4899 \end_layout
4900
4901 \begin_layout Itemize
4902 Index Entry Layout: You can format entries by using the text style dialog,
4903  or by using any other method available within LyX itself.
4904  There is no support for constructs like: 
4905 \begin_inset Quotes eld
4906 \end_inset
4907
4908 entry|textbf
4909 \begin_inset Quotes erd
4910 \end_inset
4911
4912 .
4913  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4914  and everything that follows it.
4915 \end_layout
4916
4917 \begin_layout Itemize
4918 Multiple Indexes: There is no support for multiple indexes.
4919  Rather, all index entries will be printed as one large index.
4920  To avoid our printing several versions of the index, we print only the
4921  main index, so make sure you have one.
4922 \end_layout
4923
4924 \begin_layout Section
4925 Nomenclature and Glossary
4926 \end_layout
4927
4928 \begin_layout Standard
4929 There is at present no support for glossaries.
4930  Adding it would be fairly trivial, and welcome.
4931 \end_layout
4932
4933 \begin_layout Chapter
4934 The LyX Server
4935 \end_layout
4936
4937 \begin_layout Section
4938 Introduction
4939 \end_layout
4940
4941 \begin_layout Standard
4942 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4943  and retrieve information about the LyX internal state.
4944  This is only intended for advanced users, but they should find it useful.
4945  It is by writing to the LyX server, for example, that bibliography managers,
4946  such as JabRef, are able to 
4947 \begin_inset Quotes eld
4948 \end_inset
4949
4950 push
4951 \begin_inset Quotes erd
4952 \end_inset
4953
4954  citations to LyX.
4955 \end_layout
4956
4957 \begin_layout Section
4958 Starting the LyX Server
4959 \end_layout
4960
4961 \begin_layout Standard
4962 The LyX server works through the use of a pair of named pipes.
4963  These are usually located in 
4964 \begin_inset Flex Code
4965 status collapsed
4966
4967 \begin_layout Plain Layout
4968 UserDir
4969 \end_layout
4970
4971 \end_inset
4972
4973 , (except on Windows, where 
4974 \emph on
4975 local
4976 \emph default
4977  named pipes are special objects located in 
4978 \begin_inset Flex Code
4979 status collapsed
4980
4981 \begin_layout Plain Layout
4982
4983 \backslash
4984
4985 \backslash
4986 .
4987 \backslash
4988 pipe
4989 \end_layout
4990
4991 \end_inset
4992
4993 ) and have the names 
4994 \begin_inset Quotes eld
4995 \end_inset
4996
4997
4998 \begin_inset Flex Code
4999 status collapsed
5000
5001 \begin_layout Plain Layout
5002 lyxpipe.in
5003 \end_layout
5004
5005 \end_inset
5006
5007
5008 \begin_inset Quotes erd
5009 \end_inset
5010
5011  and 
5012 \begin_inset Quotes eld
5013 \end_inset
5014
5015
5016 \begin_inset Flex Code
5017 status collapsed
5018
5019 \begin_layout Plain Layout
5020 lyxpipe.out
5021 \end_layout
5022
5023 \end_inset
5024
5025
5026 \begin_inset Quotes erd
5027 \end_inset
5028
5029 .
5030  External programs write into 
5031 \begin_inset Flex Code
5032 status collapsed
5033
5034 \begin_layout Plain Layout
5035 lyxpipe.in
5036 \end_layout
5037
5038 \end_inset
5039
5040  and read back data from 
5041 \begin_inset Flex Code
5042 status collapsed
5043
5044 \begin_layout Plain Layout
5045 lyxpipe.out
5046 \end_layout
5047
5048 \end_inset
5049
5050 .
5051  The stem of the pipe names can be defined in the 
5052 \begin_inset Flex MenuItem
5053 status collapsed
5054
5055 \begin_layout Plain Layout
5056 Tools\SpecialChar \menuseparator
5057 Preferences
5058 \end_layout
5059
5060 \end_inset
5061
5062  dialog, for example 
5063 \begin_inset Flex Code
5064 status collapsed
5065
5066 \begin_layout Plain Layout
5067 "/home/myhome/lyxpipe"
5068 \end_layout
5069
5070 \end_inset
5071
5072 , or 
5073 \begin_inset Flex Code
5074 status collapsed
5075
5076 \begin_layout Plain Layout
5077 "
5078 \backslash
5079
5080 \backslash
5081 .
5082 \backslash
5083 pipe
5084 \backslash
5085 lyxpipe"
5086 \end_layout
5087
5088 \end_inset
5089
5090  on Windows (but any working path can be used).
5091  You 
5092 \emph on
5093 must
5094 \emph default
5095  configure this manually in order for the server to start.
5096 \end_layout
5097
5098 \begin_layout Standard
5099 LyX will add the '
5100 \begin_inset Flex Code
5101 status collapsed
5102
5103 \begin_layout Plain Layout
5104 .in
5105 \end_layout
5106
5107 \end_inset
5108
5109 ' and '
5110 \begin_inset Flex Code
5111 status collapsed
5112
5113 \begin_layout Plain Layout
5114 .out
5115 \end_layout
5116
5117 \end_inset
5118
5119 ' to create the pipes.
5120  If one of the pipes already exists, LyX will assume that another LyX process
5121  is already running and will not start the server.
5122  On POSIX (Unix like) systems, if for some other reason, an unused 
5123 \begin_inset Quotes eld
5124 \end_inset
5125
5126 stale
5127 \begin_inset Quotes erd
5128 \end_inset
5129
5130  pipe is left in existence when LyX closes, then LyX will try to delete
5131  it.
5132  If this fails for some reason, you will need to delete the pipes manually
5133  and then restart LyX.
5134  On Windows, pipes are deleted by the OS on program termination or crash,
5135  so 
5136 \begin_inset Quotes eld
5137 \end_inset
5138
5139 stale
5140 \begin_inset Quotes erd
5141 \end_inset
5142
5143  pipes should not be possible.
5144 \end_layout
5145
5146 \begin_layout Standard
5147 To have several LyX processes with servers at the same time, you have to
5148  use different configurations, perhaps by using separate user directories,
5149  each with its own 
5150 \begin_inset Flex Code
5151 status collapsed
5152
5153 \begin_layout Plain Layout
5154 preferences
5155 \end_layout
5156
5157 \end_inset
5158
5159  file, for each process.
5160 \end_layout
5161
5162 \begin_layout Standard
5163 If you are developing a client program, you might find it useful to enable
5164  debugging information from the LyX server.
5165  Do this by starting LyX as 
5166 \begin_inset Flex Code
5167 status collapsed
5168
5169 \begin_layout Plain Layout
5170 lyx -dbg lyxserver
5171 \end_layout
5172
5173 \end_inset
5174
5175 .
5176 \end_layout
5177
5178 \begin_layout Standard
5179 You can find a complete example client written in C in the source distribution
5180  as 
5181 \begin_inset Flex Code
5182 status collapsed
5183
5184 \begin_layout Plain Layout
5185 development/lyxserver/server_monitor.c
5186 \end_layout
5187
5188 \end_inset
5189
5190 .
5191 \end_layout
5192
5193 \begin_layout Standard
5194 Another useful tool is command-line based client you will find in 
5195 \begin_inset Flex Code
5196 status collapsed
5197
5198 \begin_layout Plain Layout
5199 src/client/lyxclient
5200 \end_layout
5201
5202 \end_inset
5203
5204 .
5205 \end_layout
5206
5207 \begin_layout Section
5208 Normal communication
5209 \end_layout
5210
5211 \begin_layout Standard
5212 To issue a LyX call, the client writes a line of ASCII text into the input
5213  pipe.
5214  This line has the following format:
5215 \end_layout
5216
5217 \begin_layout Quote
5218 LYXCMD:
5219 \emph on
5220 clientname
5221 \emph default
5222 :
5223 \emph on
5224 function
5225 \emph default
5226 :
5227 \emph on
5228 argument
5229 \end_layout
5230
5231 \begin_layout Description
5232 clientname is a name that the client can choose arbitrarily.
5233  Its only use is that LyX will echo it if it sends an answer—so a client
5234  can dispatch results from different requesters.
5235 \end_layout
5236
5237 \begin_layout Description
5238 function is the function you want LyX to perform.
5239  It is the same as the commands you'd use in the minibuffer.
5240 \end_layout
5241
5242 \begin_layout Description
5243 argument is an optional argument which is meaningful only to some functions
5244  (for instance, the 
5245 \begin_inset Quotes eld
5246 \end_inset
5247
5248 self-insert
5249 \begin_inset Quotes erd
5250 \end_inset
5251
5252  LFUN will insert the argument as text at the cursor position).
5253 \end_layout
5254
5255 \begin_layout Standard
5256 The answer from LyX will arrive in the output pipe and be of the form
5257 \end_layout
5258
5259 \begin_layout Quote
5260 INFO:
5261 \emph on
5262 clientname
5263 \emph default
5264 :
5265 \emph on
5266 function
5267 \emph default
5268 :
5269 \emph on
5270 data
5271 \end_layout
5272
5273 \begin_layout Standard
5274 where 
5275 \emph on
5276 clientname
5277 \emph default
5278  and 
5279 \emph on
5280 function
5281 \emph default
5282  are just echoed from the command request, while 
5283 \emph on
5284 data
5285 \emph default
5286  is more or less useful information filled according to how the command
5287  execution worked out.
5288  Some commands, such as 
5289 \begin_inset Quotes eld
5290 \end_inset
5291
5292 font-state
5293 \begin_inset Quotes erd
5294 \end_inset
5295
5296 , will return information about the internal state of LyX, while other will
5297  return an empty data-response.
5298  This means that the command execution went fine.
5299 \end_layout
5300
5301 \begin_layout Standard
5302 In case of errors, the response from LyX will have this form
5303 \end_layout
5304
5305 \begin_layout Quote
5306 ERROR:
5307 \emph on
5308 clientname
5309 \emph default
5310 :
5311 \emph on
5312 function
5313 \emph default
5314 :
5315 \emph on
5316 error message
5317 \end_layout
5318
5319 \begin_layout Standard
5320 where the 
5321 \emph on
5322 error message
5323 \emph default
5324  should contain an explanation of why the command failed.
5325 \end_layout
5326
5327 \begin_layout Standard
5328 Examples:
5329 \end_layout
5330
5331 \begin_layout LyX-Code
5332 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5333 \begin_inset Newline newline
5334 \end_inset
5335
5336 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5337 \begin_inset Newline newline
5338 \end_inset
5339
5340 read a <~/.lyxpipe.out
5341 \begin_inset Newline newline
5342 \end_inset
5343
5344 echo $a
5345 \end_layout
5346
5347 \begin_layout Section
5348 Notification
5349 \end_layout
5350
5351 \begin_layout Standard
5352 LyX can notify clients of events going on asynchronously.
5353  Currently it will only do this if the user binds a key sequence with the
5354  function 
5355 \begin_inset Quotes eld
5356 \end_inset
5357
5358 notify
5359 \begin_inset Quotes erd
5360 \end_inset
5361
5362 .
5363  The format of the string LyX sends is as follows:
5364 \end_layout
5365
5366 \begin_layout Quote
5367 \begin_inset Flex Code
5368 status collapsed
5369
5370 \begin_layout Plain Layout
5371 NOTIFY:
5372 \end_layout
5373
5374 \end_inset
5375
5376
5377 \emph on
5378 key-sequence
5379 \end_layout
5380
5381 \begin_layout Standard
5382 where 
5383 \emph on
5384 key-sequence
5385 \emph default
5386  is the printed representation of the key sequence that was actually typed
5387  by the user.
5388 \end_layout
5389
5390 \begin_layout Standard
5391 This mechanism can be used to extend LyX's command set and implement macros.
5392  Bind some key sequence to 
5393 \begin_inset Quotes eld
5394 \end_inset
5395
5396 notify
5397 \begin_inset Quotes erd
5398 \end_inset
5399
5400 .
5401  Then start a client that listens on the output pipe, dispatches the command
5402  according to the sequence, and starts a function that may use LyX calls
5403  and LyX requests to issue a command or a series of commands to LyX.
5404 \end_layout
5405
5406 \begin_layout Section
5407 The simple LyX Server Protocol
5408 \end_layout
5409
5410 \begin_layout Standard
5411 LyX implements a simple protocol that can be used for session management.
5412  All messages are of the form
5413 \end_layout
5414
5415 \begin_layout Quote
5416 LYXSRV:
5417 \emph on
5418 clientname
5419 \emph default
5420 :
5421 \emph on
5422 protocol message
5423 \end_layout
5424
5425 \begin_layout Standard
5426 where 
5427 \emph on
5428 protocol message
5429 \emph default
5430  can be 
5431 \begin_inset Quotes eld
5432 \end_inset
5433
5434 hello
5435 \begin_inset Quotes erd
5436 \end_inset
5437
5438  or 
5439 \begin_inset Quotes eld
5440 \end_inset
5441
5442 bye
5443 \begin_inset Quotes erd
5444 \end_inset
5445
5446 .
5447  If 
5448 \begin_inset Quotes eld
5449 \end_inset
5450
5451 hello
5452 \begin_inset Quotes erd
5453 \end_inset
5454
5455  is received from a client, LyX will report back to inform the client that
5456  it's listening to it's messages, while 
5457 \begin_inset Quotes eld
5458 \end_inset
5459
5460 bye
5461 \begin_inset Quotes erd
5462 \end_inset
5463
5464  sent from LyX will inform clients that LyX is closing.
5465 \end_layout
5466
5467 \begin_layout Section
5468 Reverse DVI/PDF search
5469 \end_layout
5470
5471 \begin_layout Standard
5472 Some DVI/PDF viewers
5473 \begin_inset Foot
5474 status collapsed
5475
5476 \begin_layout Plain Layout
5477 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5478  Skim on Mac OSX and SumatraPDF on Windows.
5479 \end_layout
5480
5481 \end_inset
5482
5483  provide 
5484 \emph on
5485 reverse search
5486 \emph default
5487  facility (also called 
5488 \emph on
5489 inverse search
5490 \emph default
5491 ).
5492  This means that you can tell LyX to put the cursor to a specific line in
5493  the document by clicking at the respective position in the DVI/PDF output.
5494  To achieve this, the viewer must be able to communicate with LyX.
5495  This is done via the LyX server either by using the named pipe (
5496 \emph on
5497 lyxpipe
5498 \emph default
5499 ), or the UNIX domain socket (
5500 \emph on
5501 lyxsocket
5502 \emph default
5503 ) that LyX creates in its temporary directory (this is the way the 
5504 \begin_inset Flex Code
5505 status collapsed
5506
5507 \begin_layout Plain Layout
5508 lyxclient
5509 \end_layout
5510
5511 \end_inset
5512
5513  program communicates with LyX).
5514  In some cases, you need a helper script that mediates between the viewer
5515  and LyX, in others, the viewer can communicate with LyX directly.
5516  This depends on the selected viewer and on your operating system.
5517  The same applies to the way viewers need to be configured and the way the
5518  reverse search is actually performed.
5519  In what follows, we will thus describe how to setup reverse search for
5520  specific viewers.
5521  Before we turn to this, though, we will explain what needs to be done generally
5522  to enable reverse search in the DVI/PDF output.
5523 \end_layout
5524
5525 \begin_layout Subsection
5526 \begin_inset CommandInset label
5527 LatexCommand label
5528 name "sub:rev-search"
5529
5530 \end_inset
5531
5532 Automatic setup
5533 \end_layout
5534
5535 \begin_layout Standard
5536 In most cases LyX will do the work for you by enabling 
5537 \begin_inset Flex MenuItem
5538 status collapsed
5539
5540 \begin_layout Plain Layout
5541 Document\SpecialChar \menuseparator
5542 Output\SpecialChar \menuseparator
5543 Synchronize with Output
5544 \end_layout
5545
5546 \end_inset
5547
5548 .
5549  In such a case LyX will automatically insert the necessary SyncTeX macro
5550  (for PDF) or load the srcltx package (for DVI) respectively.
5551  This option can be easily reached also on 
5552 \begin_inset Flex Code
5553 status collapsed
5554
5555 \begin_layout Plain Layout
5556 View/Update
5557 \end_layout
5558
5559 \end_inset
5560
5561  Toolbar.
5562 \end_layout
5563
5564 \begin_layout Standard
5565 If you need a different setting, you can select or input a custom macro
5566  from the drop down box just below 
5567 \begin_inset Flex MenuItem
5568 status collapsed
5569
5570 \begin_layout Plain Layout
5571 Document\SpecialChar \menuseparator
5572 Output\SpecialChar \menuseparator
5573 Synchronize with Output
5574 \end_layout
5575
5576 \end_inset
5577
5578 .
5579 \end_layout
5580
5581 \begin_layout Standard
5582 Please note that including the 
5583 \begin_inset Flex Code
5584 status collapsed
5585
5586 \begin_layout Plain Layout
5587 srcltx
5588 \end_layout
5589
5590 \end_inset
5591
5592  package or 
5593 \begin_inset Flex Code
5594 status collapsed
5595
5596 \begin_layout Plain Layout
5597 src-specials
5598 \end_layout
5599
5600 \end_inset
5601
5602  sometimes has an undesired impact on the typesetting.
5603  Thus, you should switch output synchronization off for the final typesetting
5604  if you use the 
5605 \begin_inset Flex Code
5606 status collapsed
5607
5608 \begin_layout Plain Layout
5609 srcltx
5610 \end_layout
5611
5612 \end_inset
5613
5614  package or 
5615 \begin_inset Flex Code
5616 status collapsed
5617
5618 \begin_layout Plain Layout
5619 src-specials
5620 \end_layout
5621
5622 \end_inset
5623
5624 .
5625 \end_layout
5626
5627 \begin_layout Standard
5628 In case you need some more special settings that are not covered by the
5629  automatic settings, read the next section about how to set up output synchroniz
5630 ation manually.
5631  If the automatic setup suits your needs, you can readily jump to section
5632 \begin_inset space ~
5633 \end_inset
5634
5635
5636 \begin_inset CommandInset ref
5637 LatexCommand ref
5638 reference "sub:configuring-viewers"
5639
5640 \end_inset
5641
5642 , where the necessary configuration steps in your viewer -- needed both
5643  with the automatic and the manual setup -- are described.
5644 \end_layout
5645
5646 \begin_layout Subsection
5647 Manual setup
5648 \end_layout
5649
5650 \begin_layout Standard
5651 LaTeX provides several different methods for reverse search.
5652  Some are built-in in the 
5653 \begin_inset Flex Code
5654 status collapsed
5655
5656 \begin_layout Plain Layout
5657 latex/pdflatex
5658 \end_layout
5659
5660 \end_inset
5661
5662  program, some are provided by external packages.
5663  Your choice depends on whether your LaTeX distribution already provides
5664  a given method (the built-in methods are rather new) and whether your viewer
5665  can cope with it.
5666  The available methods are described in the following.
5667 \end_layout
5668
5669 \begin_layout Subsubsection*
5670 Built-in DVI-search via src-specials (DVI only) 
5671 \end_layout
5672
5673 \begin_layout Standard
5674 This method provides the DVI file with the necessary information for reverse
5675  search.
5676  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5677  distribution should include it), and it works reliably.
5678  To enable it, change the 
5679 \begin_inset Flex MenuItem
5680 status collapsed
5681
5682 \begin_layout Plain Layout
5683 LaT
5684 \begin_inset ERT
5685 status collapsed
5686
5687 \begin_layout Plain Layout
5688
5689 {}
5690 \end_layout
5691
5692 \end_inset
5693
5694 eX (plain)->DVI
5695 \end_layout
5696
5697 \end_inset
5698
5699  or 
5700 \begin_inset Flex MenuItem
5701 status collapsed
5702
5703 \begin_layout Plain Layout
5704 LaT
5705 \begin_inset ERT
5706 status collapsed
5707
5708 \begin_layout Plain Layout
5709
5710 {}
5711 \end_layout
5712
5713 \end_inset
5714
5715 eX (plain)->DraftDVI
5716 \end_layout
5717
5718 \end_inset
5719
5720  converter in 
5721 \begin_inset Flex MenuItem
5722 status collapsed
5723
5724 \begin_layout Plain Layout
5725 Preferences\SpecialChar \menuseparator
5726 File Handling\SpecialChar \menuseparator
5727 Converters
5728 \end_layout
5729
5730 \end_inset
5731
5732  to 
5733 \begin_inset Flex Code
5734 status collapsed
5735
5736 \begin_layout Plain Layout
5737 latex -src-specials $$i
5738 \end_layout
5739
5740 \end_inset
5741
5742 .
5743  If this doesn't work, check if your TeX engine needs different options
5744  (the syntax might differ in some distributions).
5745 \end_layout
5746
5747 \begin_layout Subsubsection*
5748 External Packages (PDFSync and scrltx) 
5749 \end_layout
5750
5751 \begin_layout Standard
5752 The packages 
5753 \emph on
5754 pdfsync
5755 \emph default
5756  and 
5757 \emph on
5758 scrltx
5759 \emph default
5760  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5761  respectively.
5762  In order to enable it, load the packages in the LyX preamble: 
5763 \end_layout
5764
5765 \begin_layout Itemize
5766 \begin_inset Flex Code
5767 status collapsed
5768
5769 \begin_layout Plain Layout
5770
5771 \backslash
5772 usepackage{pdfsync}
5773 \end_layout
5774
5775 \end_inset
5776
5777  for reverse PDF search,
5778 \end_layout
5779
5780 \begin_layout Itemize
5781  
5782 \begin_inset Flex Code
5783 status collapsed
5784
5785 \begin_layout Plain Layout
5786
5787 \backslash
5788 usepackage[active]{srcltx}
5789 \end_layout
5790
5791 \end_inset
5792
5793  for reverse DVI search.
5794 \end_layout
5795
5796 \begin_layout Standard
5797 If you want to be able to perform both DVI and PDF reverse searches, you
5798  can also insert in the preamble the following lines
5799 \end_layout
5800
5801 \begin_layout LyX-Code
5802
5803 \backslash
5804 usepackage{ifpdf}
5805 \begin_inset Newline newline
5806 \end_inset
5807
5808
5809 \backslash
5810 ifpdf
5811 \begin_inset Newline newline
5812 \end_inset
5813
5814   
5815 \backslash
5816 usepackage{pdfsync}
5817 \begin_inset Newline newline
5818 \end_inset
5819
5820
5821 \backslash
5822 else
5823 \begin_inset Newline newline
5824 \end_inset
5825
5826   
5827 \backslash
5828 usepackage[active]{srcltx}
5829 \begin_inset Newline newline
5830 \end_inset
5831
5832
5833 \backslash
5834 fi
5835 \end_layout
5836
5837 \begin_layout Standard
5838 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5839  right package will be used.
5840 \end_layout
5841
5842 \begin_layout Standard
5843 Note that PDFSync might affect the output layout of your document.
5844  It is therefore advised to disable PDFsync for final documents.
5845 \end_layout
5846
5847 \begin_layout Subsubsection*
5848 Built-in reverse search via SyncTeX (DVI and PDF) 
5849 \end_layout
5850
5851 \begin_layout Standard
5852 Recent versions of 
5853 \begin_inset Flex Code
5854 status collapsed
5855
5856 \begin_layout Plain Layout
5857 (pdf)latex
5858 \end_layout
5859
5860 \end_inset
5861
5862  have built-in support for both PDF and DVI reverse search.
5863  This so-called 
5864 \emph on
5865 SyncTeX
5866 \emph default
5867  facility is basically the result of the integration of the PDFSync package
5868  to the pdftex program and its merge with the 
5869 \emph on
5870 scr-specials
5871 \emph default
5872  approach.
5873  You need at least TeXLive 2008 or a recent MikTeX distribution in order
5874  to use it.
5875  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5876  already provide SyncTeX support.
5877 \end_layout
5878
5879 \begin_layout Standard
5880 To enable SyncTeX for DVI output, change the 
5881 \begin_inset Flex MenuItem
5882 status collapsed
5883
5884 \begin_layout Plain Layout
5885 LaT
5886 \begin_inset ERT
5887 status collapsed
5888
5889 \begin_layout Plain Layout
5890
5891 {}
5892 \end_layout
5893
5894 \end_inset
5895
5896 eX (plain) -> DVI
5897 \end_layout
5898
5899 \end_inset
5900
5901  or 
5902 \begin_inset Flex MenuItem
5903 status collapsed
5904
5905 \begin_layout Plain Layout
5906 LaT
5907 \begin_inset ERT
5908 status collapsed
5909
5910 \begin_layout Plain Layout
5911
5912 {}
5913 \end_layout
5914
5915 \end_inset
5916
5917 eX (plain) -> DraftDVI
5918 \end_layout
5919
5920 \end_inset
5921
5922  converter in 
5923 \begin_inset Flex MenuItem
5924 status collapsed
5925
5926 \begin_layout Plain Layout
5927 Preferences\SpecialChar \menuseparator
5928 File Handling\SpecialChar \menuseparator
5929 Converters
5930 \end_layout
5931
5932 \end_inset
5933
5934  to 
5935 \begin_inset Flex Code
5936 status collapsed
5937
5938 \begin_layout Plain Layout
5939 latex -synctex=1 $$i
5940 \end_layout
5941
5942 \end_inset
5943
5944 , and for PDF output, change the 
5945 \begin_inset Flex MenuItem
5946 status collapsed
5947
5948 \begin_layout Plain Layout
5949 LaT
5950 \begin_inset ERT
5951 status collapsed
5952
5953 \begin_layout Plain Layout
5954
5955 {}
5956 \end_layout
5957
5958 \end_inset
5959
5960 eX (pdflatex) -> PDF (pdflatex)
5961 \end_layout
5962
5963 \end_inset
5964
5965  or converter to 
5966 \begin_inset Flex Code
5967 status collapsed
5968
5969 \begin_layout Plain Layout
5970 pdflatex -synctex=1 $$i
5971 \end_layout
5972
5973 \end_inset
5974
5975 .
5976  Check the documentation of your viewer whether the viewer needs to be configure
5977 d for the use with SyncTeX.
5978 \begin_inset Foot
5979 status collapsed
5980
5981 \begin_layout Plain Layout
5982 The 
5983 \begin_inset Flex Code
5984 status collapsed
5985
5986 \begin_layout Plain Layout
5987 -synctex=1
5988 \end_layout
5989
5990 \end_inset
5991
5992  option enables gzip compression.
5993  If your viewer does not support it, you should instead use 
5994 \begin_inset Flex Code
5995 status collapsed
5996
5997 \begin_layout Plain Layout
5998 -synctex=-1
5999 \end_layout
6000
6001 \end_inset
6002
6003 .
6004 \end_layout
6005
6006 \end_inset
6007
6008
6009 \end_layout
6010
6011 \begin_layout Subsection
6012 Configuring and using specific viewers
6013 \begin_inset CommandInset label
6014 LatexCommand label
6015 name "sub:configuring-viewers"
6016
6017 \end_inset
6018
6019
6020 \end_layout
6021
6022 \begin_layout Subsubsection*
6023 Xdvi (all platforms)
6024 \end_layout
6025
6026 \begin_layout Standard
6027 If you use 
6028 \begin_inset Flex Code
6029 status collapsed
6030
6031 \begin_layout Plain Layout
6032 xdvi
6033 \end_layout
6034
6035 \end_inset
6036
6037 , you don't need to do anything else for performing a reverse DVI search,
6038  as LyX already provides the necessary hooks for automatically using the
6039  
6040 \begin_inset Flex Code
6041 status collapsed
6042
6043 \begin_layout Plain Layout
6044 lyxclient
6045 \end_layout
6046
6047 \end_inset
6048
6049  program.
6050  Just setup your document as described above (reverse search is triggered
6051  by Ctrl-click or Alt-click on Mac OSX, respectively).
6052 \end_layout
6053
6054 \begin_layout Standard
6055 However, if for whatever reason you want to use the named pipe instead of
6056  the socket for communicating with LyX, simply change the DVI viewer in
6057  
6058 \begin_inset Flex MenuItem
6059 status collapsed
6060
6061 \begin_layout Plain Layout
6062 Preferences\SpecialChar \menuseparator
6063 File Handling\SpecialChar \menuseparator
6064 File formats
6065 \end_layout
6066
6067 \end_inset
6068
6069  to
6070 \begin_inset Foot
6071 status collapsed
6072
6073 \begin_layout Plain Layout
6074 On Mac OSX you have to use 
6075 \begin_inset Flex Code
6076 status collapsed
6077
6078 \begin_layout Plain Layout
6079 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6080 \end_layout
6081
6082 \end_inset
6083
6084
6085 \end_layout
6086
6087 \end_inset
6088
6089  
6090 \begin_inset Flex Code
6091 status collapsed
6092
6093 \begin_layout Plain Layout
6094 xdvi -editor 'lyxeditor.sh %f %l'
6095 \end_layout
6096
6097 \end_inset
6098
6099 , where 
6100 \begin_inset Flex Code
6101 status collapsed
6102
6103 \begin_layout Plain Layout
6104 lyxeditor.sh
6105 \end_layout
6106
6107 \end_inset
6108
6109  is a suitable script.
6110  For example, a minimal shell script is the following one:
6111 \end_layout
6112
6113 \begin_layout LyX-Code
6114 #!/bin/sh
6115 \begin_inset Newline newline
6116 \end_inset
6117
6118 LYXPIPE="/path/to/lyxpipe"
6119 \begin_inset Newline newline
6120 \end_inset
6121
6122 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6123 \begin_inset Newline newline
6124 \end_inset
6125
6126 echo "$COMMAND" > "${LYXPIPE}".in || exit
6127 \begin_inset Newline newline
6128 \end_inset
6129
6130 read < "${LYXPIPE}".out || exit
6131 \end_layout
6132
6133 \begin_layout Standard
6134 where 
6135 \begin_inset Flex Code
6136 status collapsed
6137
6138 \begin_layout Plain Layout
6139 /path/to/lyxpipe
6140 \end_layout
6141
6142 \end_inset
6143
6144  is the Ly
6145 \begin_inset ERT
6146 status collapsed
6147
6148 \begin_layout Plain Layout
6149
6150 {}
6151 \end_layout
6152
6153 \end_inset
6154
6155 XServer pipe path specified in 
6156 \begin_inset Flex MenuItem
6157 status collapsed
6158
6159 \begin_layout Plain Layout
6160 Preferences\SpecialChar \menuseparator
6161 Paths
6162 \end_layout
6163
6164 \end_inset
6165
6166 .
6167 \begin_inset Foot
6168 status collapsed
6169
6170 \begin_layout Plain Layout
6171 In the 
6172 \begin_inset Flex Code
6173 status collapsed
6174
6175 \begin_layout Plain Layout
6176 development/tools
6177 \end_layout
6178
6179 \end_inset
6180
6181  folder of a source distribution you can find a 
6182 \begin_inset Flex Code
6183 status collapsed
6184
6185 \begin_layout Plain Layout
6186 lyxeditor
6187 \end_layout
6188
6189 \end_inset
6190
6191  script which is able to locate the 
6192 \emph on
6193 lyxpipe
6194 \emph default
6195  based on your preferences.
6196 \end_layout
6197
6198 \end_inset
6199
6200
6201 \end_layout
6202
6203 \begin_layout Subsubsection*
6204 MacDviX (Mac OSX)
6205 \end_layout
6206
6207 \begin_layout Standard
6208 At the end of 
6209 \begin_inset Flex Code
6210 status collapsed
6211
6212 \begin_layout Plain Layout
6213 /Applications/MacDviX_Folder/calleditor.script
6214 \end_layout
6215
6216 \end_inset
6217
6218 , add the following lines:
6219 \end_layout
6220
6221 \begin_layout LyX-Code
6222 /Applications/Ly
6223 \begin_inset ERT
6224 status collapsed
6225
6226 \begin_layout Plain Layout
6227
6228 {}
6229 \end_layout
6230
6231 \end_inset
6232
6233 X.app/Contents/MacOS/lyxeditor "$2" $1
6234 \begin_inset Newline newline
6235 \end_inset
6236
6237 exit 1
6238 \end_layout
6239
6240 \begin_layout Standard
6241 Modify the lines accordingly if you install LyX somewhere else than in the
6242  Applications folder.
6243 \end_layout
6244
6245 \begin_layout Standard
6246 Reverse search is triggered by Alt-click (OPTION-click).
6247 \end_layout
6248
6249 \begin_layout Subsubsection*
6250 Skim (Mac OSX)
6251 \end_layout
6252
6253 \begin_layout Standard
6254 Enter 
6255 \begin_inset Flex Code
6256 status collapsed
6257
6258 \begin_layout Plain Layout
6259 open -a Skim.app $$i
6260 \end_layout
6261
6262 \end_inset
6263
6264  to the viewer setting in 
6265 \begin_inset Flex MenuItem
6266 status collapsed
6267
6268 \begin_layout Plain Layout
6269 Preferences\SpecialChar \menuseparator
6270 File Handling\SpecialChar \menuseparator
6271 File formats\SpecialChar \menuseparator
6272 PDF (pdflatex)
6273 \end_layout
6274
6275 \end_inset
6276
6277 , and then in 
6278 \begin_inset Flex MenuItem
6279 status collapsed
6280
6281 \begin_layout Plain Layout
6282 Skim\SpecialChar \menuseparator
6283 Preferences\SpecialChar \menuseparator
6284 Sync
6285 \end_layout
6286
6287 \end_inset
6288
6289  select Ly
6290 \begin_inset ERT
6291 status collapsed
6292
6293 \begin_layout Plain Layout
6294
6295 {}
6296 \end_layout
6297
6298 \end_inset
6299
6300 X.
6301 \end_layout
6302
6303 \begin_layout Standard
6304 Reverse search is triggered by COMMAND-SHIFT-click
6305 \end_layout
6306
6307 \begin_layout Subsubsection*
6308 Okular (KDE)
6309 \end_layout
6310
6311 \begin_layout Standard
6312 Go to 
6313 \begin_inset Flex MenuItem
6314 status collapsed
6315
6316 \begin_layout Plain Layout
6317 Settings\SpecialChar \menuseparator
6318 Configure Okular\SpecialChar \ldots{}
6319 \SpecialChar \menuseparator
6320 Editor
6321 \end_layout
6322
6323 \end_inset
6324
6325 , select 
6326 \begin_inset Quotes eld
6327 \end_inset
6328
6329 Custom Text Editor
6330 \begin_inset Quotes erd
6331 \end_inset
6332
6333  and add the command 
6334 \begin_inset Flex Code
6335 status collapsed
6336
6337 \begin_layout Plain Layout
6338 lyxclient -g %f %l
6339 \end_layout
6340
6341 \end_inset
6342
6343 .
6344 \end_layout
6345
6346 \begin_layout Standard
6347 Reverse search is triggered by SHIFT-click.
6348 \end_layout
6349
6350 \begin_layout Subsubsection*
6351 YAP (Windows)
6352 \end_layout
6353
6354 \begin_layout Standard
6355 Launch yap, choose its 
6356 \begin_inset Flex MenuItem
6357 status collapsed
6358
6359 \begin_layout Plain Layout
6360 View\SpecialChar \menuseparator
6361 Options
6362 \end_layout
6363
6364 \end_inset
6365
6366  menu and select the 
6367 \begin_inset Quotes eld
6368 \end_inset
6369
6370 Inverse DVI Search
6371 \begin_inset Quotes erd
6372 \end_inset
6373
6374  tab.
6375  Click on the 
6376 \begin_inset Quotes eld
6377 \end_inset
6378
6379 New\SpecialChar \ldots{}
6380
6381 \begin_inset Quotes erd
6382 \end_inset
6383
6384  button and, in the window that opens, enter 
6385 \begin_inset Quotes eld
6386 \end_inset
6387
6388 LyX Editor
6389 \begin_inset Quotes erd
6390 \end_inset
6391
6392  (or any other name you like) in the 
6393 \begin_inset Quotes eld
6394 \end_inset
6395
6396 Name:
6397 \begin_inset Quotes erd
6398 \end_inset
6399
6400  field.
6401  Now click on the button labeled 
6402 \begin_inset Quotes eld
6403 \end_inset
6404
6405 \SpecialChar \ldots{}
6406
6407 \begin_inset Quotes erd
6408 \end_inset
6409
6410  to open a file dialog and navigate to the directory containing the batch
6411  file 
6412 \begin_inset Flex Code
6413 status collapsed
6414
6415 \begin_layout Plain Layout
6416 lyxeditor.bat
6417 \end_layout
6418
6419 \end_inset
6420
6421  (see below).
6422  Select 
6423 \begin_inset Flex Code
6424 status collapsed
6425
6426 \begin_layout Plain Layout
6427 lyxeditor.bat
6428 \end_layout
6429
6430 \end_inset
6431
6432  and then specify the program arguments as 
6433 \begin_inset Flex Code
6434 status collapsed
6435
6436 \begin_layout Plain Layout
6437 %f %l
6438 \end_layout
6439
6440 \end_inset
6441
6442 .
6443  The 
6444 \begin_inset Flex Code
6445 status collapsed
6446
6447 \begin_layout Plain Layout
6448 lyxeditor.bat
6449 \end_layout
6450
6451 \end_inset
6452
6453  wrapper is used for communicating with LyX through the 
6454 \emph on
6455 lyxpipe
6456 \emph default
6457  and is as follows:
6458 \end_layout
6459
6460 \begin_layout LyX-Code
6461 @echo off
6462 \begin_inset Newline newline
6463 \end_inset
6464
6465 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6466 \backslash
6467
6468 \backslash
6469 .
6470 \backslash
6471 pipe
6472 \backslash
6473 lyxpipe.in
6474 \begin_inset Newline newline
6475 \end_inset
6476
6477 type 
6478 \backslash
6479
6480 \backslash
6481 .
6482 \backslash
6483 pipe
6484 \backslash
6485 lyxpipe.out
6486 \end_layout
6487
6488 \begin_layout Standard
6489 Make sure that the LyXServer pipe path you specified in LyX is 
6490 \begin_inset Flex Code
6491 status collapsed
6492
6493 \begin_layout Plain Layout
6494
6495 \backslash
6496
6497 \backslash
6498 .
6499 \backslash
6500 pipe
6501 \backslash
6502 lyxpipe
6503 \end_layout
6504
6505 \end_inset
6506
6507 , otherwise change the 
6508 \begin_inset Flex Code
6509 status collapsed
6510
6511 \begin_layout Plain Layout
6512 lyxeditor.bat
6513 \end_layout
6514
6515 \end_inset
6516
6517  wrapper accordingly.
6518 \end_layout
6519
6520 \begin_layout Standard
6521 In yap, reverse search is triggered by double-click.
6522 \end_layout
6523
6524 \begin_layout Subsubsection*
6525 SumatraPDF (Windows)
6526 \end_layout
6527
6528 \begin_layout Standard
6529 In order to use SumatraPDF for inverse search, enter 
6530 \begin_inset Flex Code
6531 status collapsed
6532
6533 \begin_layout Plain Layout
6534 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6535 \end_layout
6536
6537 \end_inset
6538
6539  in the viewer setting in 
6540 \begin_inset Flex MenuItem
6541 status collapsed
6542
6543 \begin_layout Plain Layout
6544 Preferences\SpecialChar \menuseparator
6545 File Handling\SpecialChar \menuseparator
6546 File formats\SpecialChar \menuseparator
6547 PDF (pdflatex)
6548 \end_layout
6549
6550 \end_inset
6551
6552 , where 
6553 \begin_inset Flex Code
6554 status collapsed
6555
6556 \begin_layout Plain Layout
6557 lyxeditor.bat
6558 \end_layout
6559
6560 \end_inset
6561
6562  is the previous wrapper.
6563  If SumatraPDF.exe is not in your command PATH, use its full file name.
6564 \end_layout
6565
6566 \begin_layout Standard
6567 Reverse search is triggered by double-click.
6568 \end_layout
6569
6570 \begin_layout Subsubsection*
6571 YAP (Cygwin)
6572 \end_layout
6573
6574 \begin_layout Standard
6575 First of all, make sure that yap is your default DVI viewer in the Windows
6576  environment, then launch it, choose its 
6577 \begin_inset Flex MenuItem
6578 status collapsed
6579
6580 \begin_layout Plain Layout
6581 View\SpecialChar \menuseparator
6582 Options
6583 \end_layout
6584
6585 \end_inset
6586
6587  menu and select the 
6588 \begin_inset Quotes eld
6589 \end_inset
6590
6591 Inverse DVI Search
6592 \begin_inset Quotes erd
6593 \end_inset
6594
6595  tab.
6596  Click on the 
6597 \begin_inset Quotes eld
6598 \end_inset
6599
6600 New\SpecialChar \ldots{}
6601
6602 \begin_inset Quotes erd
6603 \end_inset
6604
6605  button and, in the window that opens, enter 
6606 \begin_inset Quotes eld
6607 \end_inset
6608
6609 LyX Editor
6610 \begin_inset Quotes erd
6611 \end_inset
6612
6613  (or any other name you like) in the 
6614 \begin_inset Quotes eld
6615 \end_inset
6616
6617 Name:
6618 \begin_inset Quotes erd
6619 \end_inset
6620
6621  field.
6622  Now click on the button labeled 
6623 \begin_inset Quotes eld
6624 \end_inset
6625
6626 \SpecialChar \ldots{}
6627
6628 \begin_inset Quotes erd
6629 \end_inset
6630
6631  to open a file dialog and navigate to the directory containing the 
6632 \begin_inset Flex Code
6633 status collapsed
6634
6635 \begin_layout Plain Layout
6636 lyxeditor.exe
6637 \end_layout
6638
6639 \end_inset
6640
6641  program (which is installed by default on Cygwin along with the LyX executable).
6642  Select 
6643 \begin_inset Flex Code
6644 status collapsed
6645
6646 \begin_layout Plain Layout
6647 lyxeditor.exe
6648 \end_layout
6649
6650 \end_inset
6651
6652  and then specify the program arguments as 
6653 \begin_inset Flex Code
6654 status collapsed
6655
6656 \begin_layout Plain Layout
6657 -g %f %l
6658 \end_layout
6659
6660 \end_inset
6661
6662 .
6663  In this way, you will be using the 
6664 \emph on
6665 lyxsocket
6666 \emph default
6667  for communicating with LyX.
6668  If, for whatever reason, you want to use the 
6669 \emph on
6670 lyxpipe
6671 \emph default
6672 , omit the 
6673 \begin_inset Flex Code
6674 status collapsed
6675
6676 \begin_layout Plain Layout
6677 -g
6678 \end_layout
6679
6680 \end_inset
6681
6682  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6683 \end_layout
6684
6685 \begin_layout Standard
6686 In yap, reverse search is triggered by double-click.
6687 \end_layout
6688
6689 \begin_layout Subsubsection*
6690 SumatraPDF (Cygwin)
6691 \end_layout
6692
6693 \begin_layout Standard
6694 In order to use SumatraPDF for inverse search, enter 
6695 \begin_inset Flex Code
6696 status collapsed
6697
6698 \begin_layout Plain Layout
6699 SumatraPDF.sh
6700 \end_layout
6701
6702 \end_inset
6703
6704  in the viewer setting in 
6705 \begin_inset Flex MenuItem
6706 status collapsed
6707
6708 \begin_layout Plain Layout
6709 Preferences\SpecialChar \menuseparator
6710 File Handling\SpecialChar \menuseparator
6711 File formats\SpecialChar \menuseparator
6712 PDF (pdflatex)
6713 \end_layout
6714
6715 \end_inset
6716
6717 , where 
6718 \begin_inset Flex Code
6719 status collapsed
6720
6721 \begin_layout Plain Layout
6722 SumatraPDF.sh
6723 \end_layout
6724
6725 \end_inset
6726
6727  is the following script (to be placed in your command PATH, 
6728 \begin_inset Flex Code
6729 status collapsed
6730
6731 \begin_layout Plain Layout
6732 /usr/local/bin
6733 \end_layout
6734
6735 \end_inset
6736
6737  being the best choice):
6738 \end_layout
6739
6740 \begin_layout LyX-Code
6741 #!/bin/bash
6742 \begin_inset Newline newline
6743 \end_inset
6744
6745 cd $(dirname $1)
6746 \begin_inset Newline newline
6747 \end_inset
6748
6749 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6750 \end_layout
6751
6752 \begin_layout Standard
6753 This wrapper script is needed because SumatraPDF is a native Windows application
6754  and does not understand the posix paths used by the Cygwin version of LyX.
6755  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6756  the script above.
6757  The 
6758 \begin_inset Flex Code
6759 status collapsed
6760
6761 \begin_layout Plain Layout
6762 -g
6763 \end_layout
6764
6765 \end_inset
6766
6767  enables communication via the 
6768 \emph on
6769 lyxsocket
6770 \emph default
6771 .
6772  Again, omit the 
6773 \begin_inset Flex Code
6774 status collapsed
6775
6776 \begin_layout Plain Layout
6777 -g
6778 \end_layout
6779
6780 \end_inset
6781
6782  option if you want to use the 
6783 \emph on
6784 lyxpipe
6785 \emph default
6786 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6787 \end_layout
6788
6789 \begin_layout Standard
6790 Reverse search is triggered by double-click.
6791 \end_layout
6792
6793 \begin_layout Section
6794 Forward search
6795 \end_layout
6796
6797 \begin_layout Standard
6798 Forward search is, as the name implies, in a sense the 
6799 \begin_inset Quotes eld
6800 \end_inset
6801
6802 opposite
6803 \begin_inset Quotes erd
6804 \end_inset
6805
6806  to reverse search.
6807  It allows you to let the viewer jump to a given position from within LyX.
6808  If forward search is set up (as described in what follows), you can put
6809  the cursor anywhere in your LyX document, and hit 
6810 \begin_inset Flex MenuItem
6811 status collapsed
6812
6813 \begin_layout Plain Layout
6814 Navigate\SpecialChar \menuseparator
6815 Forward search
6816 \end_layout
6817
6818 \end_inset
6819
6820  (or select 
6821 \begin_inset Flex MenuItem
6822 status collapsed
6823
6824 \begin_layout Plain Layout
6825 Forward search
6826 \end_layout
6827
6828 \end_inset
6829
6830  in the context menu via right mouse click), and then the viewer will jump
6831  to that position as well.
6832  This implies, of course, that your viewer supports this function.
6833 \end_layout
6834
6835 \begin_layout Standard
6836 To make forward search possible, you first need to provide the generated
6837  output PDF/DVI file with additional information about the TeX sources.
6838  This can be done via the methods described in the section 
6839 \begin_inset CommandInset ref
6840 LatexCommand ref
6841 reference "sub:rev-search"
6842
6843 \end_inset
6844
6845 .
6846 \end_layout
6847
6848 \begin_layout Standard
6849 Additionally, you need to configure LyX for using your viewers in 
6850 \begin_inset Flex MenuItem
6851 status collapsed
6852
6853 \begin_layout Plain Layout
6854 Tools\SpecialChar \menuseparator
6855 Preferences\SpecialChar \menuseparator
6856 Output\SpecialChar \menuseparator
6857 General
6858 \end_layout
6859
6860 \end_inset
6861
6862 .
6863  We provide a range of tested configurations for some viewers, which you
6864  can select from the drop down list.
6865  If none of these configurations suits you, you have to find out and enter
6866  a suitable configuration yourself.
6867  The definition syntax uses the following placeholders: 
6868 \end_layout
6869
6870 \begin_layout Itemize
6871 \noindent
6872 \begin_inset Flex Code
6873 status collapsed
6874
6875 \begin_layout Plain Layout
6876 $$n
6877 \end_layout
6878
6879 \end_inset
6880
6881 : row number
6882 \end_layout
6883
6884 \begin_layout Itemize
6885 \noindent
6886 \begin_inset Flex Code
6887 status collapsed
6888
6889 \begin_layout Plain Layout
6890 $$t
6891 \end_layout
6892
6893 \end_inset
6894
6895 : name of the (temporary) exported .tex file
6896 \end_layout
6897
6898 \begin_layout Itemize
6899 \noindent
6900 \begin_inset Flex Code
6901 status collapsed
6902
6903 \begin_layout Plain Layout
6904 $$o
6905 \end_layout
6906
6907 \end_inset
6908
6909 : name of the exported output file (either dvi or pdf, depending on which
6910  one exists in the temporary directory)
6911 \end_layout
6912
6913 \begin_layout Standard
6914 Note that only some of the viewers provide full forward search functionality,
6915  among them yap, xdvi, okular and Sumatra PDF
6916 \begin_inset Foot
6917 status collapsed
6918
6919 \begin_layout Plain Layout
6920 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6921 ip
6922 \end_layout
6923
6924 \end_inset
6925
6926 .
6927  While many of the widespread PDF viewers (most notably Adobe Reader) do
6928  not support forward search at all, some other viewers -- e.
6929 \begin_inset space \thinspace{}
6930 \end_inset
6931
6932 g.
6933  evince and xpdf -- allow at least to reload the document and jump to a
6934  specific page of the file, so you can at least navigate 
6935 \begin_inset Quotes eld
6936 \end_inset
6937
6938 near
6939 \begin_inset Quotes erd
6940 \end_inset
6941
6942 .
6943  These latter functionality is provided by an external call of synctex (see
6944  the predefined example configurations).
6945  
6946 \end_layout
6947
6948 \begin_layout Standard
6949 Forward search works both with DVI and PDF output.
6950  LyX simply checks which preview format you have used before (i.
6951 \begin_inset space \thinspace{}
6952 \end_inset
6953
6954 e., which format is already there in the temporary directory) and chooses
6955  the appropriate configuration for the respective format.
6956  
6957 \end_layout
6958
6959 \begin_layout Chapter
6960 Special Document Classes
6961 \end_layout
6962
6963 \begin_layout Section
6964 A&A Paper
6965 \end_layout
6966
6967 \begin_layout Standard
6968 by 
6969 \noun on
6970 Peter Sütterlin
6971 \end_layout
6972
6973 \begin_layout Subsection
6974 Introduction
6975 \end_layout
6976
6977 \begin_layout Standard
6978 This section describes how LyX can be used to write articles for submission
6979  to the scientific journal 
6980 \emph on
6981 Astronomy and Astrophysics
6982 \emph default
6983  (www.edpsciences.fr/aa/ 
6984 \begin_inset Flex URL
6985 status collapsed
6986
6987 \begin_layout Plain Layout
6988
6989 http://www.edpsciences.fr/aa/
6990 \end_layout
6991
6992 \end_inset
6993
6994 ) using Version 5.01 of the document class 
6995 \family typewriter
6996 aa.cls
6997 \family default
6998 .
6999  This package can be downloaded from the ftp site
7000 \end_layout
7001
7002 \begin_layout Standard
7003 \begin_inset VSpace medskip
7004 \end_inset
7005
7006
7007 \end_layout
7008
7009 \begin_layout Standard
7010 \align center
7011 \begin_inset Flex URL
7012 status collapsed
7013
7014 \begin_layout Plain Layout
7015
7016 ftp://ftp.edpsciences.org/pub/aa/readme.html
7017 \end_layout
7018
7019 \end_inset
7020
7021
7022 \end_layout
7023
7024 \begin_layout Standard
7025 \begin_inset VSpace medskip
7026 \end_inset
7027
7028
7029 \end_layout
7030
7031 \begin_layout Standard
7032 A manual comes together with that package, and this text is not meant to
7033  replace the original manual but is merely a short guide in how to realize
7034  the correct form of your paper.
7035  
7036 \end_layout
7037
7038 \begin_layout Standard
7039 Please note that the publisher of the journal was changed from Springer
7040  to EDP Sciences starting January 1, 2001.
7041  That change involved also some slight changes to the style files, namely
7042  the removal of the thesaurus command.
7043  The LyX class aa supports the newest version of these style files, V 5.01.
7044  If you have an older version installed, please upgrade.
7045  For compatibility, the old (version 4) layout has been kept as 
7046 \family sans
7047 article (A&A V4)
7048 \family default
7049 .
7050  Please refer to the comments in 
7051 \family typewriter
7052 LyXDir/layouts/aapaper.layout
7053 \family default
7054 .
7055 \end_layout
7056
7057 \begin_layout Subsection
7058 Getting started
7059 \end_layout
7060
7061 \begin_layout Standard
7062 It is recommended you start from the example template distributed with LyX.
7063  If you are not using a template, note the following settings:
7064 \end_layout
7065
7066 \begin_layout Itemize
7067 Select 
7068 \family sans
7069 article (A&A)
7070 \family default
7071  in the 
7072 \family sans
7073 Document\SpecialChar \menuseparator
7074 Settings
7075 \family default
7076  dialog (OK, that one was obvious).
7077 \end_layout
7078
7079 \begin_layout Itemize
7080 Don't change the option 
7081 \family sans
7082 Page
7083 \begin_inset space ~
7084 \end_inset
7085
7086 style
7087 \family default
7088 : Leave it set to 
7089 \family sans
7090 default
7091 \family default
7092 .
7093  The whole layout is done by the macros, you shouldn't change anything.
7094 \end_layout
7095
7096 \begin_layout Subsection
7097 The header block
7098 \end_layout
7099
7100 \begin_layout Standard
7101 First thing to enter is the header information.
7102  It consists of seven entries, of which some are optional.
7103  They are
7104 \end_layout
7105
7106 \begin_layout Itemize
7107
7108 \family sans
7109 Title
7110 \family default
7111 : [required] 
7112 \end_layout
7113
7114 \begin_layout Itemize
7115
7116 \family sans
7117 Subtitle
7118 \family default
7119 : [optional] 
7120 \end_layout
7121
7122 \begin_layout Itemize
7123
7124 \family sans
7125 Author
7126 \family default
7127 : [required]
7128 \end_layout
7129
7130 \begin_layout Itemize
7131
7132 \family sans
7133 Address
7134 \family default
7135 : [required]
7136 \end_layout
7137
7138 \begin_layout Itemize
7139
7140 \family sans
7141 Offprints
7142 \family default
7143 : [optional] if more than one author: whom to contact for offprint requests.
7144 \end_layout
7145
7146 \begin_layout Itemize
7147
7148 \family sans
7149 Mail
7150 \family default
7151 : [optional] mail address for contacts.
7152 \end_layout
7153
7154 \begin_layout Itemize
7155
7156 \family sans
7157 Date
7158 \family default
7159 : [required].
7160  Suggested format is 
7161 \family typewriter
7162 Received: <date>; Accepted <date> 
7163 \end_layout
7164
7165 \begin_layout Standard
7166 There is no need to issue the 
7167 \family typewriter
7168
7169 \backslash
7170 maketitle
7171 \family default
7172  command, this is done automatically by LyX when the header is finished.
7173  Although the order of the single header entries doesn't matter it is advised
7174  to keep the above sequence, just to get the best optics and meets the layout
7175  of the real document.
7176 \end_layout
7177
7178 \begin_layout Standard
7179 If you want to place footnotes in the header block, e.
7180 \begin_inset space \thinspace{}
7181 \end_inset
7182
7183 g.
7184 \begin_inset space \space{}
7185 \end_inset
7186
7187 to state your present address, just use the standard footnote via the menu
7188  
7189 \family sans
7190 Insert\SpecialChar \menuseparator
7191 Footnote.
7192
7193 \family default
7194  LyX will automagically use the term 
7195 \family typewriter
7196
7197 \backslash
7198 thanks{}
7199 \family default
7200  in that case.
7201 \end_layout
7202
7203 \begin_layout Standard
7204 In addition to these topics, the macros use three additional LaTeX commands
7205  that have no counterpart in LyX:
7206 \end_layout
7207
7208 \begin_layout Itemize
7209
7210 \family typewriter
7211
7212 \backslash
7213 and
7214 \family default
7215  to separate different names for more than one author and institute, respectivel
7216 y.
7217 \end_layout
7218
7219 \begin_layout Itemize
7220
7221 \family typewriter
7222
7223 \backslash
7224 inst{<nr>}
7225 \family default
7226 to mark corresponding author/institute pairs.
7227  The institutes are numbered sequentially as they appear in the 
7228 \family sans
7229 Address
7230 \family default
7231  field, so you have to put a marker to each author.
7232 \end_layout
7233
7234 \begin_layout Itemize
7235
7236 \family typewriter
7237
7238 \backslash
7239 email{address}
7240 \family default
7241  to supply an email address for fast contact.
7242 \end_layout
7243
7244 \begin_layout Standard
7245 In all cases, the appropriate command has to be entered in LyX and marked
7246  as LaTeX code.
7247  See the examples.
7248  
7249 \end_layout
7250
7251 \begin_layout Subsection
7252 The abstract
7253 \end_layout
7254
7255 \begin_layout Standard
7256 The abstract should immediately follow the header block.
7257  With version 5 the abstract environment was changed to a command, and there
7258  is now a resctriction to only one paragraph.
7259  In addition, it should contain an entry with the keywords.
7260  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7261  command 
7262 \family typewriter
7263
7264 \backslash
7265 keywords{}
7266 \family default
7267  by hand and mark it as LaTeX code.
7268  Refer to the example paper.
7269 \end_layout
7270
7271 \begin_layout Subsection
7272 Supported environments
7273 \end_layout
7274
7275 \begin_layout Standard
7276 The A&A paper layout supports the following environments for structuring
7277  your text:
7278 \end_layout
7279
7280 \begin_layout Itemize
7281
7282 \family sans
7283 Standard
7284 \end_layout
7285
7286 \begin_layout Itemize
7287
7288 \family sans
7289 Section
7290 \end_layout
7291
7292 \begin_layout Itemize
7293
7294 \family sans
7295 Subsection
7296 \end_layout
7297
7298 \begin_layout Itemize
7299
7300 \family sans
7301 Subsubsection
7302 \end_layout
7303
7304 \begin_layout Itemize
7305
7306 \family sans
7307 Itemize
7308 \end_layout
7309
7310 \begin_layout Itemize
7311
7312 \family sans
7313 Enumerate
7314 \end_layout
7315
7316 \begin_layout Itemize
7317
7318 \family sans
7319 Description
7320 \end_layout
7321
7322 \begin_layout Itemize
7323
7324 \family sans
7325 Caption
7326 \end_layout
7327
7328 \begin_layout Itemize
7329
7330 \family sans
7331 Abstract
7332 \end_layout
7333
7334 \begin_layout Itemize
7335
7336 \family sans
7337 Acknowledgment
7338 \end_layout
7339
7340 \begin_layout Itemize
7341
7342 \family sans
7343 Bibliography
7344 \end_layout
7345
7346 \begin_layout Itemize
7347
7348 \family sans
7349 LaTeX
7350 \end_layout
7351
7352 \begin_layout Subsection
7353 Commands not supported by LyX
7354 \end_layout
7355
7356 \begin_layout Standard
7357 Some commands are not yet supported by the 
7358 \family sans
7359 paper (A&A)
7360 \family default
7361  layout for LyX.
7362  Some have already been mentioned.
7363  For the sake of completeness, they are listed all together here:
7364 \end_layout
7365
7366 \begin_layout Itemize
7367
7368 \family typewriter
7369
7370 \backslash
7371 and
7372 \end_layout
7373
7374 \begin_layout Itemize
7375
7376 \family typewriter
7377
7378 \backslash
7379 email
7380 \end_layout
7381
7382 \begin_layout Itemize
7383
7384 \family typewriter
7385
7386 \backslash
7387 appendix
7388 \end_layout
7389
7390 \begin_layout Itemize
7391
7392 \family typewriter
7393
7394 \backslash
7395 authorrunning
7396 \end_layout
7397
7398 \begin_layout Itemize
7399
7400 \family typewriter
7401
7402 \backslash
7403 inst{}
7404 \end_layout
7405
7406 \begin_layout Itemize
7407
7408 \family typewriter
7409
7410 \backslash
7411 keywords{}
7412 \end_layout
7413
7414 \begin_layout Itemize
7415
7416 \family typewriter
7417
7418 \backslash
7419 object{}
7420 \end_layout
7421
7422 \begin_layout Itemize
7423
7424 \family typewriter
7425
7426 \backslash
7427 titlerunning{}
7428 \end_layout
7429
7430 \begin_layout Standard
7431 If you want to use any of these commands, you have to enter them yourself.
7432  
7433 \series bold
7434 Do not forget to mark them as LaTeX code!
7435 \end_layout
7436
7437 \begin_layout Subsection
7438 Figure and Table Floats
7439 \end_layout
7440
7441 \begin_layout Standard
7442 LyX provides support for the necessary float environments 
7443 \family sans
7444 figure, figure*, table
7445 \family default
7446  and 
7447 \family sans
7448 table*
7449 \family default
7450 , therefore we won't tell much about it here.
7451  Refer to the 
7452 \emph on
7453 User's
7454 \begin_inset space ~
7455 \end_inset
7456
7457 Guide
7458 \emph default
7459 .
7460  Just remember that tables should be left-aligned.
7461  For that, select the table and change the alignment in 
7462 \family sans
7463 Edit\SpecialChar \menuseparator
7464 Paragraph
7465 \begin_inset space ~
7466 \end_inset
7467
7468 Settings.
7469 \end_layout
7470
7471 \begin_layout Standard
7472 There is only one special thing: the figures with caption besides the figure.
7473  To create such a figure, you have to do the following:
7474 \end_layout
7475
7476 \begin_layout Enumerate
7477 Create a wide figure float: 
7478 \family sans
7479 Insert\SpecialChar \menuseparator
7480 Float\SpecialChar \menuseparator
7481 Figure
7482 \family default
7483 , then right click in the figure and select 
7484 \family sans
7485 \bar under
7486 S
7487 \bar default
7488 pan
7489 \begin_inset space ~
7490 \end_inset
7491
7492 columns
7493 \family default
7494 .
7495 \end_layout
7496
7497 \begin_layout Enumerate
7498 Enter your caption text.
7499 \end_layout
7500
7501 \begin_layout Enumerate
7502 Press 
7503 \family sans
7504 Return
7505 \family default
7506  to move the cursor above the caption.
7507 \end_layout
7508
7509 \begin_layout Enumerate
7510 Insert your figure
7511 \end_layout
7512
7513 \begin_layout Enumerate
7514 Position the cursor behind the figure and insert a horizontal fill: 
7515 \family sans
7516 Insert\SpecialChar \menuseparator
7517 Special
7518 \begin_inset space ~
7519 \end_inset
7520
7521 Character\SpecialChar \menuseparator
7522 Horizontal
7523 \begin_inset space ~
7524 \end_inset
7525
7526 Fill
7527 \family default
7528 .
7529 \end_layout
7530
7531 \begin_layout Enumerate
7532 Switch to LaTeX mode: 
7533 \family sans
7534 M-c
7535 \begin_inset space ~
7536 \end_inset
7537
7538 t
7539 \family default
7540 .
7541 \end_layout
7542
7543 \begin_layout Enumerate
7544 Enter 
7545 \family typewriter
7546
7547 \backslash
7548 parbox[b]{55mm}{
7549 \family default
7550 .
7551  
7552 \series bold
7553 Do not close the brace!
7554 \end_layout
7555
7556 \begin_layout Enumerate
7557 Position the cursor behind the caption text, switch to LaTeX mode and insert
7558  the closing brace: 
7559 \family sans
7560 M-c
7561 \begin_inset space ~
7562 \end_inset
7563
7564 t
7565 \family default
7566  
7567 \family typewriter
7568 }
7569 \family default
7570 .
7571 \end_layout
7572
7573 \begin_layout Standard
7574 Also, refer to the figures in the example paper.
7575 \end_layout
7576
7577 \begin_layout Subsection
7578 Referee layout
7579 \end_layout
7580
7581 \begin_layout Standard
7582 For submission, the paper has to be formated in a special double-spacing
7583  layout.
7584  For this purpose, you have to give the option 
7585 \family typewriter
7586 referee
7587 \family default
7588  to the documentclass.
7589  This must be done using the extra class options field in the 
7590 \family sans
7591 Document\SpecialChar \menuseparator
7592 Settings
7593 \family default
7594  dialog.
7595  Just enter the string 
7596 \family typewriter
7597 referee
7598 \family default
7599  there.
7600 \end_layout
7601
7602 \begin_layout Subsection
7603 The example paper
7604 \end_layout
7605
7606 \begin_layout Standard
7607 The 
7608 \family sans
7609 Examples
7610 \family default
7611  directory contains an example paper written with LyX.
7612  It is the example paper from the original macro package, translated to
7613  LyX.
7614  Use it for inspiration, and compare the original LaTeX code with LyX way
7615  of writing.
7616 \end_layout
7617
7618 \begin_layout Section
7619 AASTeX
7620 \end_layout
7621
7622 \begin_layout Standard
7623 by 
7624 \noun on
7625 Mike Ressler
7626 \end_layout
7627
7628 \begin_layout Subsection
7629 Introduction
7630 \end_layout
7631
7632 \begin_layout Standard
7633 AASTeX is a set of macros produced by the American Astronomical Society
7634  to facilitate electronic manuscript submission to the three journals they
7635  publish: the Astrophysical Journal (including the Letters and Supplement),
7636  the Astronomical Journal, and the Publications of the Astronomical Society
7637  of the Pacific.
7638  LyX has proven to be an excellent tool for generating these documents,
7639  especially given its equation, citation, and figure handling capabilities.
7640  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7641  is the version described here, or higher.
7642  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7643  incompatible with LyX.
7644  The AASTeX package may be downloaded from the AASTeX Web site
7645 \end_layout
7646
7647 \begin_layout Standard
7648 \begin_inset VSpace medskip
7649 \end_inset
7650
7651
7652 \end_layout
7653
7654 \begin_layout Standard
7655 \align center
7656 \begin_inset Flex URL
7657 status collapsed
7658
7659 \begin_layout Plain Layout
7660
7661 http://www.journals.uchicago.edu/AAS/AASTeX
7662 \end_layout
7663
7664 \end_inset
7665
7666
7667 \end_layout
7668
7669 \begin_layout Standard
7670 \begin_inset VSpace medskip
7671 \end_inset
7672
7673
7674 \end_layout
7675
7676 \begin_layout Standard
7677 A complete user guide is contained in that package and you should familiarize
7678  yourself with it thoroughly before embarking on writing a paper in LyX.
7679  LyX will not reduce the need to figure out all the AASTeX commands, it
7680  will only reduce the drudgery of typing everything in.
7681  It is your responsibility to ensure that the final exported LaTeX document
7682  conforms completely to the requirements of the journal to which you are
7683  submitting your paper.
7684 \end_layout
7685
7686 \begin_layout Subsection
7687 Starting a New Paper
7688 \end_layout
7689
7690 \begin_layout Standard
7691 I strongly suggest that you start with the AASTeX template file.
7692  Click on 
7693 \family sans
7694 File\SpecialChar \menuseparator
7695 New from
7696 \family default
7697  
7698 \family sans
7699 Template
7700 \family default
7701 , enter the new file name, then choose the 
7702 \family typewriter
7703 aastex.lyx
7704 \family default
7705  template.
7706  This will show the most common fields found in a manuscript.
7707  Simply overwrite the existing text (including the brackets, 
7708 \family typewriter
7709 <>
7710 \family default
7711 ) with the correct information.
7712  Many of the AASTeX commands and environments can be implemented directly
7713  in LyX, but some cannot: most noticeably 
7714 \family typewriter
7715
7716 \backslash
7717 altaffilmark
7718 \family default
7719  and 
7720 \family typewriter
7721
7722 \backslash
7723 altaffiltext
7724 \family default
7725 , which should stick out like a sore thumb if you actually just opened the
7726  template file.
7727  For commands such as these, the LaTeX code must be entered directly and
7728  marked as such.
7729  Such commands are referred to as TeX code, or Evil Red Text.
7730  I tried to minimize the amount of TeX code needed in an AASTeX document,
7731  but there is still a bit more required than any of us would like.
7732 \end_layout
7733
7734 \begin_layout Subsection
7735 Finishing Your Paper
7736 \end_layout
7737
7738 \begin_layout Standard
7739 When the paper is finished to your satisfaction and previews/prints correctly,
7740  there are a few 
7741 \begin_inset Quotes eld
7742 \end_inset
7743
7744 postprocessing
7745 \begin_inset Quotes erd
7746 \end_inset
7747
7748  actions which need to be done before you submit it to the journals.
7749  
7750 \end_layout
7751
7752 \begin_layout Enumerate
7753 Export your paper as a LaTeX file (
7754 \family sans
7755 File\SpecialChar \menuseparator
7756 Export\SpecialChar \menuseparator
7757 LaTeX
7758 \family default
7759 ).
7760  
7761 \end_layout
7762
7763 \begin_layout Enumerate
7764 Edit the resulting 
7765 \family typewriter
7766 .tex
7767 \family default
7768  file with your favorite text editor
7769 \end_layout
7770
7771 \begin_deeper
7772 \begin_layout Enumerate
7773 remove the comment lines before the 
7774 \family typewriter
7775
7776 \backslash
7777 documentclass
7778 \family default
7779  command
7780 \end_layout
7781
7782 \begin_layout Enumerate
7783 remove the 
7784 \family typewriter
7785
7786 \backslash
7787 usepackage...{fontenc}
7788 \family default
7789  line if it appears (usually just after 
7790 \family typewriter
7791
7792 \backslash
7793 documentclass
7794 \family default
7795 }; also remove the 
7796 \family typewriter
7797
7798 \backslash
7799 secnumdepth
7800 \family default
7801  line if it appears.
7802 \end_layout
7803
7804 \begin_layout Enumerate
7805 remove everything between (and including) the 
7806 \family typewriter
7807
7808 \backslash
7809 makeatletter
7810 \family default
7811  and 
7812 \family typewriter
7813
7814 \backslash
7815 makeatother
7816 \family default
7817  commands, except for any commands you specifically put into the LaTeX preamble
7818  (which should appear immediately after the 
7819 \begin_inset Quotes eld
7820 \end_inset
7821
7822 User specified LaTeX commands
7823 \begin_inset Quotes erd
7824 \end_inset
7825
7826  comment in the 
7827 \family typewriter
7828 .tex
7829 \family default
7830  file).
7831 \end_layout
7832
7833 \end_deeper
7834 \begin_layout Enumerate
7835 Run the resulting file through LaTeX to make sure it still processes correctly.
7836 \end_layout
7837
7838 \begin_layout Enumerate
7839 Reread the journal requirements to make sure your filenames and formats
7840  are correct.
7841 \end_layout
7842
7843 \begin_layout Enumerate
7844 Submit it.
7845 \end_layout
7846
7847 \begin_layout Subsection
7848 Comments On Specific Commands
7849 \end_layout
7850
7851 \begin_layout Standard
7852 I will not describe the detailed usage of the individual AASTeX commands:
7853  the AASTeX User Guide (
7854 \family typewriter
7855 aasguide.tex
7856 \family default
7857 ) gives a good description of each.
7858  Thus it's probably easiest for me to go down the list as found in the guide
7859  and offer comments where necessary.
7860  So let's begin \SpecialChar \ldots{}
7861
7862 \end_layout
7863
7864 \begin_layout Subsubsection
7865 Things that work as expected
7866 \end_layout
7867
7868 \begin_layout Standard
7869 \begin_inset ERT
7870 status open
7871
7872 \begin_layout Plain Layout
7873
7874
7875 \backslash
7876 begin{sloppypar}
7877 \end_layout
7878
7879 \end_inset
7880
7881
7882 \end_layout
7883
7884 \begin_layout Standard
7885 Because they work as you might expect, I simply list them and the section
7886  they are found in: 
7887 \family typewriter
7888
7889 \backslash
7890 documentclass
7891 \family default
7892  (2.1.1), 
7893 \family typewriter
7894
7895 \backslash
7896 begin{document}
7897 \family default
7898  (2.2), 
7899 \family typewriter
7900
7901 \backslash
7902 title
7903 \family default
7904  (2.3), 
7905 \family typewriter
7906
7907 \backslash
7908 author
7909 \family default
7910  (2.3), 
7911 \family typewriter
7912
7913 \backslash
7914 affil
7915 \family default
7916  (2.3), 
7917 \family typewriter
7918
7919 \backslash
7920 abstract
7921 \family default
7922  (2.4), 
7923 \family typewriter
7924
7925 \backslash
7926 keywords
7927 \family default
7928  (2.5), 
7929 \family typewriter
7930
7931 \backslash
7932 section
7933 \family default
7934  (2.7), 
7935 \family typewriter
7936
7937 \backslash
7938 subsection
7939 \family default
7940  (2.7), 
7941 \family typewriter
7942
7943 \backslash
7944 subsubsection
7945 \family default
7946  (2.7), 
7947 \family typewriter
7948
7949 \backslash
7950 paragraph
7951 \family default
7952  (2.7), 
7953 \family typewriter
7954
7955 \backslash
7956 facility
7957 \family default
7958  (2.10), 
7959 \family typewriter
7960
7961 \backslash
7962 begin{displaymath}
7963 \family default
7964  (2.12), 
7965 \family typewriter
7966
7967 \backslash
7968 begin{equation}
7969 \family default
7970  (2.12), 
7971 \family typewriter
7972
7973 \backslash
7974 begin{eqnarray}
7975 \family default
7976  (2.12), 
7977 \family typewriter
7978
7979 \backslash
7980 begin{mathletters}
7981 \family default
7982  (2.12), 
7983 \family typewriter
7984
7985 \backslash
7986 begin{thebibliography}
7987 \family default
7988  (2.13.1), 
7989 \family typewriter
7990
7991 \backslash
7992 bibitem
7993 \family default
7994  (2.13.2), all the cite commands and their variations (2.13.2), the generic
7995  graphicx figure commands (2.14.1), 
7996 \family typewriter
7997
7998 \backslash
7999 begin{table}
8000 \family default
8001  (2.15.4), 
8002 \family typewriter
8003
8004 \backslash
8005 begin{tabular}
8006 \family default
8007  (2.15.4), 
8008 \family typewriter
8009
8010 \backslash
8011 caption
8012 \family default
8013  (2.15.4), 
8014 \family typewriter
8015
8016 \backslash
8017 label
8018 \family default
8019  (2.15.4, amongst other places), 
8020 \family typewriter
8021
8022 \backslash
8023 tablerefs
8024 \family default
8025  (2.15.5), 
8026 \family typewriter
8027
8028 \backslash
8029 tablecomments
8030 \family default
8031  (2.15.5), 
8032 \family typewriter
8033
8034 \backslash
8035 url
8036 \family default
8037  (2.17.4), 
8038 \family typewriter
8039
8040 \backslash
8041 end{document}
8042 \family default
8043  (2.18).
8044 \end_layout
8045
8046 \begin_layout Standard
8047 The following style options also work correctly: 
8048 \family typewriter
8049 longabstract
8050 \family default
8051  (2.4), 
8052 \family typewriter
8053 preprint
8054 \family default
8055  (3.2.1), 
8056 \family typewriter
8057 preprint2
8058 \family default
8059  (3.2.2), 
8060 \family typewriter
8061 eqsecnum
8062 \family default
8063  (3.3), 
8064 \family typewriter
8065 flushrt
8066 \family default
8067  (3.4).
8068  Simply put them in the 
8069 \family sans
8070 Options
8071 \family default
8072  box in 
8073 \family sans
8074 Layout\SpecialChar \menuseparator
8075 Document
8076 \family default
8077 .
8078 \end_layout
8079
8080 \begin_layout Standard
8081 \begin_inset ERT
8082 status open
8083
8084 \begin_layout Plain Layout
8085
8086
8087 \backslash
8088 end{sloppypar}
8089 \end_layout
8090
8091 \end_inset
8092
8093
8094 \end_layout
8095
8096 \begin_layout Subsubsection
8097 Things that work, but require more comment
8098 \end_layout
8099
8100 \begin_layout Standard
8101 The following items work, but require a little more discussion:
8102 \end_layout
8103
8104 \begin_layout Itemize
8105 These items are reserved for use by the journal editors, but you can put
8106  them into the LaTeX preamble if you feel compelled to do so: 
8107 \family typewriter
8108
8109 \backslash
8110 received
8111 \family default
8112
8113 \family typewriter
8114
8115 \backslash
8116 revised
8117 \family default
8118
8119 \family typewriter
8120
8121 \backslash
8122 accepted
8123 \family default
8124
8125 \family typewriter
8126
8127 \backslash
8128 ccc
8129 \family default
8130
8131 \family typewriter
8132
8133 \backslash
8134 cpright
8135 \family default
8136  (all from 2.1.3)
8137 \end_layout
8138
8139 \begin_layout Itemize
8140 These items may be placed in the LaTeX preamble, and are included as blanks
8141  in the template file: 
8142 \family typewriter
8143
8144 \backslash
8145 slugcomment
8146 \family default
8147  (2.1.4), 
8148 \family typewriter
8149
8150 \backslash
8151 shorttitle
8152 \family default
8153  (2.1.5), 
8154 \family typewriter
8155
8156 \backslash
8157 shortauthors
8158 \family default
8159  (2.1.5)
8160 \end_layout
8161
8162 \begin_layout Itemize
8163
8164 \family typewriter
8165
8166 \backslash
8167 email
8168 \family default
8169  (2.3) – can only be used 
8170 \begin_inset Quotes eld
8171 \end_inset
8172
8173 standalone
8174 \begin_inset Quotes erd
8175 \end_inset
8176
8177 , not in the middle of a paragraph.
8178  Use TeX code if you need to embed it.
8179 \end_layout
8180
8181 \begin_layout Itemize
8182
8183 \family typewriter
8184
8185 \backslash
8186 and
8187 \family default
8188  (2.3) – will have extra {} after it.
8189  This should not cause an error.
8190 \end_layout
8191
8192 \begin_layout Itemize
8193
8194 \family typewriter
8195
8196 \backslash
8197 notetoeditor
8198 \family default
8199  (2.6) – can only be used 
8200 \begin_inset Quotes eld
8201 \end_inset
8202
8203 standalone
8204 \begin_inset Quotes erd
8205 \end_inset
8206
8207 , not in the middle of a paragraph.
8208  Use TeX code if you need to embed it.
8209 \end_layout
8210
8211 \begin_layout Itemize
8212
8213 \family typewriter
8214
8215 \backslash
8216 placetable
8217 \family default
8218  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8219  hand
8220 \end_layout
8221
8222 \begin_layout Itemize
8223
8224 \family typewriter
8225
8226 \backslash
8227 placefigure
8228 \family default
8229  (2.8) – same as for 
8230 \family typewriter
8231
8232 \backslash
8233 placetable
8234 \end_layout
8235
8236 \begin_layout Itemize
8237
8238 \family typewriter
8239
8240 \backslash
8241 acknowledgements
8242 \family default
8243  (2.9) – will have extra {} after it.
8244  This should not cause an error.
8245 \end_layout
8246
8247 \begin_layout Itemize
8248
8249 \family typewriter
8250
8251 \backslash
8252 appendix
8253 \family default
8254  (2.11) – will have extra {} after it.
8255  This should not cause an error.
8256 \end_layout
8257
8258 \begin_layout Itemize
8259
8260 \family typewriter
8261
8262 \backslash
8263 figcaption
8264 \family default
8265  (2.14.2) – you can insert an optional filename argument by placing the cursor
8266  at the beginning of the text and selecting 
8267 \family sans
8268 Insert\SpecialChar \menuseparator
8269 Short Title
8270 \family default
8271 .
8272  
8273 \begin_inset Quotes eld
8274 \end_inset
8275
8276 Short Title
8277 \begin_inset Quotes erd
8278 \end_inset
8279
8280  inserts an optional argument of the type needed by 
8281 \family typewriter
8282
8283 \backslash
8284 figcaption
8285 \family default
8286 .
8287  Hopefully it will be renamed someday.
8288 \end_layout
8289
8290 \begin_layout Itemize
8291
8292 \family typewriter
8293
8294 \backslash
8295 objectname
8296 \family default
8297  (2.17.1) – same as 
8298 \family typewriter
8299
8300 \backslash
8301 figcaption
8302 \family default
8303  for the catalog ID optional parameter
8304 \end_layout
8305
8306 \begin_layout Itemize
8307
8308 \family typewriter
8309
8310 \backslash
8311 dataset
8312 \family default
8313  (2.17.1) – same as 
8314 \family typewriter
8315
8316 \backslash
8317 figcaption
8318 \family default
8319  for the catalog ID optional parameter
8320 \end_layout
8321
8322 \begin_layout Subsubsection
8323 Things not implemented, use TeX code
8324 \end_layout
8325
8326 \begin_layout Standard
8327 \begin_inset ERT
8328 status open
8329
8330 \begin_layout Plain Layout
8331
8332
8333 \backslash
8334 begin{sloppypar}
8335 \end_layout
8336
8337 \end_inset
8338
8339
8340 \end_layout
8341
8342 \begin_layout Standard
8343
8344 \family typewriter
8345
8346 \backslash
8347 altaffilmark
8348 \family default
8349  (2.3), 
8350 \family typewriter
8351
8352 \backslash
8353 altaffiltext
8354 \family default
8355  (2.3), 
8356 \family typewriter
8357
8358 \backslash
8359 eqnum
8360 \family default
8361  (2.12), 
8362 \family typewriter
8363
8364 \backslash
8365 setcounter{equation}
8366 \family default
8367  (2.12), Journal name abbreviations (2.13.4), 
8368 \family typewriter
8369
8370 \backslash
8371 figurenum
8372 \family default
8373  (2.14.1), 
8374 \family typewriter
8375
8376 \backslash
8377 epsscale
8378 \family default
8379  (2.14.1), 
8380 \family typewriter
8381
8382 \backslash
8383 plotone
8384 \family default
8385  (2.14.1), 
8386 \family typewriter
8387
8388 \backslash
8389 plottwo
8390 \family default
8391  (2.14.1), 
8392 \family typewriter
8393
8394 \backslash
8395 tablenum
8396 \family default
8397  (2.15.4), 
8398 \family typewriter
8399
8400 \backslash
8401 tableline
8402 \family default
8403  (2.15.4, insert it as the first element in the lefthand cell after where
8404  you want it.
8405  Don't use any of LyX's rules in the table), 
8406 \family typewriter
8407
8408 \backslash
8409 tablenotemark
8410 \family default
8411  (2.15.5), 
8412 \family typewriter
8413
8414 \backslash
8415 tablenotetext
8416 \family default
8417  (2.15.5), much of Misc (2.17, except 
8418 \family typewriter
8419
8420 \backslash
8421 objectname
8422 \family default
8423
8424 \family typewriter
8425
8426 \backslash
8427 dataset
8428 \family default
8429
8430 \family typewriter
8431
8432 \backslash
8433 url
8434 \family default
8435 , and 
8436 \family typewriter
8437
8438 \backslash
8439 email
8440 \family default
8441 ; see above), 
8442 \family typewriter
8443
8444 \backslash
8445 singlespace
8446 \family default
8447  (3.1), 
8448 \family typewriter
8449
8450 \backslash
8451 doublespace
8452 \family default
8453  (3.1), 
8454 \family typewriter
8455
8456 \backslash
8457 onecolumn
8458 \family default
8459  (3.2), 
8460 \family typewriter
8461
8462 \backslash
8463 twocolumn
8464 \family default
8465  (3.2)
8466 \end_layout
8467
8468 \begin_layout Standard
8469 \begin_inset ERT
8470 status open
8471
8472 \begin_layout Plain Layout
8473
8474
8475 \backslash
8476 end{sloppypar}
8477 \end_layout
8478
8479 \end_inset
8480
8481
8482 \end_layout
8483
8484 \begin_layout Subsubsection
8485 Things that cannot be implemented
8486 \end_layout
8487
8488 \begin_layout Standard
8489 \SpecialChar \ldots{}
8490  at least in any meaningful sort of way, so I suggest ignoring them.
8491  They are the references environment (2.13.3), and the deluxetable environment
8492  (2.15).
8493  If you really, really need to use deluxetable, I suggest editing it in
8494  a separate file with a text editor, then using 
8495 \family sans
8496 Insert\SpecialChar \menuseparator
8497 Child
8498 \begin_inset space ~
8499 \end_inset
8500
8501 Document
8502 \family default
8503  to include it in your LyX document.
8504  See the 
8505 \family typewriter
8506 aas_sample.lyx
8507 \family default
8508  file to see an example of this.
8509 \end_layout
8510
8511 \begin_layout Subsection
8512 FAQs, Tips, Tricks, and Other Ruminations
8513 \end_layout
8514
8515 \begin_layout Subsubsection
8516 Getting LyX and AASTeX to cooperate
8517 \end_layout
8518
8519 \begin_layout Standard
8520 It can be a bit tricky to get LyX to recognize a new layout and document
8521  class.
8522  When all else fails, do this:
8523 \end_layout
8524
8525 \begin_layout Enumerate
8526 Make certain that LaTeX can find AASTeX.
8527  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8528  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8529 \family typewriter
8530 sample.tex
8531 \family default
8532 .
8533 \end_layout
8534
8535 \begin_layout Enumerate
8536 Make certain that 
8537 \family typewriter
8538 aastex.layout
8539 \family default
8540  appears in LyX's 
8541 \family typewriter
8542 layouts
8543 \family default
8544  folder
8545 \end_layout
8546
8547 \begin_layout Enumerate
8548 Rerun 
8549 \family sans
8550 Tools\SpecialChar \menuseparator
8551 Reconfigure
8552 \family default
8553  in LyX, then restart LyX.
8554 \end_layout
8555
8556 \begin_layout Enumerate
8557 Open a regular new file, not from a template.
8558  Does AASTeX appear in the class list in 
8559 \family sans
8560 Document\SpecialChar \menuseparator
8561 Settings
8562 \family default
8563 ?
8564 \end_layout
8565
8566 \begin_layout Standard
8567 If you get a warning from an existing AASTeX document about not being able
8568  to find the AASTeX layout or a message about 
8569 \begin_inset Quotes eld
8570 \end_inset
8571
8572 You should not mix title layouts with normal ones
8573 \begin_inset Quotes erd
8574 \end_inset
8575
8576 , things haven't been installed correctly.
8577 \end_layout
8578
8579 \begin_layout Subsubsection
8580 LaTeX error processing a table 
8581 \end_layout
8582
8583 \begin_layout Standard
8584 LyX, by default, attempts to center the table caption/title.
8585  This seems to produce a bad interaction in AASTeX so you should click somewhere
8586  in the caption/title, then select 
8587 \family sans
8588 Edit\SpecialChar \menuseparator
8589 Paragraph
8590 \begin_inset space ~
8591 \end_inset
8592
8593 Settings
8594 \family default
8595 , then set the 
8596 \family sans
8597 Alignment
8598 \family default
8599  to 
8600 \family sans
8601 Block
8602 \family default
8603 .
8604  This took care of it for me.
8605 \end_layout
8606
8607 \begin_layout Subsubsection
8608 References
8609 \end_layout
8610
8611 \begin_layout Standard
8612 A couple of things: 1) I have noticed some funny spacing in the reference
8613  entries in the text.
8614  When you enter the bibliography item data, make sure their is 
8615 \emph on
8616 no
8617 \emph default
8618  space between the last author and the parenthesis setting off the year;
8619  
8620 \emph on
8621 e.
8622 \begin_inset space \thinspace{}
8623 \end_inset
8624
8625 g.
8626 \begin_inset space \space{}
8627 \end_inset
8628
8629
8630 \emph default
8631 type 
8632 \family typewriter
8633 Ressler(1992)
8634 \family default
8635 , not 
8636 \family typewriter
8637 Ressler (1992)
8638 \family default
8639 .
8640  2) Entering the references at all is not obvious.
8641  The easiest thing is to start typing your first reference at the end of
8642  the document, then mark it as type 
8643 \family sans
8644 References
8645 \family default
8646 .
8647  That will put a small gray box in front of what you just typed.
8648  Click on the box to fill in the rest of the information.
8649  For new references, go to the end of an existing reference and press return.
8650  That will create a new line with its own box, etc.
8651 \end_layout
8652
8653 \begin_layout Subsubsection
8654 Including EPS files
8655 \end_layout
8656
8657 \begin_layout Standard
8658 Even though AASTeX provides its own figure commands (
8659 \family typewriter
8660
8661 \backslash
8662 plotone
8663 \family default
8664 , for example), I much prefer LaTeX's standard figure commands (with the
8665  default graphicx).
8666  You can insert the 
8667 \family typewriter
8668
8669 \backslash
8670 plotone
8671 \family default
8672 , etc.
8673 \begin_inset space ~
8674 \end_inset
8675
8676 commands as TeX code into a Figure Float box if you desire, but I never
8677  have much luck getting the layout right.
8678  With the standard graphics, LyX will insert a 
8679 \family typewriter
8680
8681 \backslash
8682 usepackage{graphicx}
8683 \family default
8684  command into the LaTeX preamble and handle the figures in the standard
8685  LaTeX2e way, interspersing the figures in the text.
8686  I believe ApJ accepts figures exactly this way now; AJ might still use
8687  the 
8688 \begin_inset Quotes eld
8689 \end_inset
8690
8691 stack everything at the end
8692 \begin_inset Quotes erd
8693 \end_inset
8694
8695  technique.
8696 \end_layout
8697
8698 \begin_layout Subsubsection
8699 Things I could have done, but didn't
8700 \end_layout
8701
8702 \begin_layout Standard
8703 There are a few 
8704 \begin_inset Quotes eld
8705 \end_inset
8706
8707 pretty
8708 \begin_inset Quotes erd
8709 \end_inset
8710
8711  things I could have implemented, but chose not to.
8712  For instance, I saw no point in double-spacing the text in the LyX window,
8713  even though it is double-spaced in the paper manuscript.
8714  Also, I chose not to make separate layouts for the preprint and preprint2
8715  styles.
8716  Since I assume you will spend most of your time in the plain manuscript
8717  mode anyway, I decided not to chew up more disk space with this.
8718  
8719 \end_layout
8720
8721 \begin_layout Subsection
8722 Final Caveat
8723 \end_layout
8724
8725 \begin_layout Standard
8726 Your mileage may vary.
8727  I've now had papers published by both ApJ and AJ that have had 98% of the
8728  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8729  cleanups.
8730  I have had no trouble with the submission process, and I'm sure the journals
8731  were never aware that there might be a difference.
8732  So, go forth and publish!
8733 \end_layout
8734
8735 \begin_layout Section
8736 AMS LaTeX
8737 \end_layout
8738
8739 \begin_layout Standard
8740 by 
8741 \noun on
8742 David Johnson; updated by Richard Heck
8743 \end_layout
8744
8745 \begin_layout Standard
8746 \begin_inset VSpace bigskip
8747 \end_inset
8748
8749
8750 \end_layout
8751
8752 \begin_layout Standard
8753 \noindent
8754 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8755  papers to be submitted to American Mathematical Society publications.
8756  The layouts are not tailored to a specific journal, but easily can be.
8757  You should refer to the AMS documentation for specific instructions for
8758  each journal (usually it will entail only changing a single line in the
8759  TeX output).
8760  That documentation is available on the Web at 
8761 \begin_inset Flex URL
8762 status open
8763
8764 \begin_layout Plain Layout
8765
8766 http://www.ams.org
8767 \end_layout
8768
8769 \end_inset
8770
8771  or by ftp at 
8772 \begin_inset Flex URL
8773 status open
8774
8775 \begin_layout Plain Layout
8776
8777 ftp://ftp.ams.org/pub/tex/amslatex/
8778 \end_layout
8779
8780 \end_inset
8781
8782 .
8783  These layouts are appropriate, and useful, for any mathematical writing.
8784  
8785 \end_layout
8786
8787 \begin_layout Standard
8788 There are two basic AMS LaTeX layouts: 
8789 \end_layout
8790
8791 \begin_layout Itemize
8792 amsart: The standard AMS article format.
8793 \end_layout
8794
8795 \begin_layout Itemize
8796 amsbook: the standard AMS book (really, monograph) format.
8797  
8798 \end_layout
8799
8800 \begin_layout Standard
8801 The layouts themselves contain only the minimum necessary to use the AMS
8802  classes.
8803  They do not, in particular, contain any of the `theorem' environments used
8804  for setting theorems, lemmas, and the like.
8805  These are contained, instead, in the 
8806 \begin_inset Flex Code
8807 status collapsed
8808
8809 \begin_layout Plain Layout
8810 Theorems (AMS)
8811 \end_layout
8812
8813 \end_inset
8814
8815  module, which is loaded by default when when you select one of the AMS
8816  classes.
8817  (It can also be used with other classes and can be removed, if you would
8818  rather use something else.) Less commonly used environments are in the 
8819 \begin_inset Flex Code
8820 status collapsed
8821
8822 \begin_layout Plain Layout
8823 Theorems (AMS-Extended)
8824 \end_layout
8825
8826 \end_inset
8827
8828  module, which must be loaded manually.
8829 \end_layout
8830
8831 \begin_layout Standard
8832 By default, theorems and the like are numbered consecutively throughout
8833  the document, but this may be modified by loading the module 
8834 \begin_inset Flex Code
8835 status collapsed
8836
8837 \begin_layout Plain Layout
8838 Theorems (Order by Section)
8839 \end_layout
8840
8841 \end_inset
8842
8843  or, if you are using 
8844 \begin_inset Flex Code
8845 status collapsed
8846
8847 \begin_layout Plain Layout
8848 book (AMS)
8849 \end_layout
8850
8851 \end_inset
8852
8853 , the module 
8854 \begin_inset Flex Code
8855 status collapsed
8856
8857 \begin_layout Plain Layout
8858 Theorems (Order by Chapter)
8859 \end_layout
8860
8861 \end_inset
8862
8863 .
8864  These will number the results as 
8865 \begin_inset Formula $n.m$
8866 \end_inset
8867
8868 , where the first number refers to the section (or chapter) and the second
8869  refers to the total number of results so far in that section (or chapter).
8870  Many environments are also available unnumbered.
8871  These are indicated by an asterisk at the end.
8872  If you happen to want 
8873 \emph on
8874 only
8875 \emph default
8876  unnumbered results, the module 
8877 \begin_inset Flex Code
8878 status collapsed
8879
8880 \begin_layout Plain Layout
8881 Theorems (Starred)
8882 \end_layout
8883
8884 \end_inset
8885
8886  provides that option.
8887 \end_layout
8888
8889 \begin_layout Standard
8890 Note that these modules do not 
8891 \emph on
8892 have
8893 \emph default
8894  to be used with the AMS classes.
8895  It is perfectly possible to use the 
8896 \begin_inset Flex Code
8897 status collapsed
8898
8899 \begin_layout Plain Layout
8900 Theorems (AMS)
8901 \end_layout
8902
8903 \end_inset
8904
8905  module, and the others mentioned, with other classes, such as 
8906 \begin_inset Flex Code
8907 status collapsed
8908
8909 \begin_layout Plain Layout
8910 article
8911 \end_layout
8912
8913 \end_inset
8914
8915
8916 \begin_inset Flex Code
8917 status collapsed
8918
8919 \begin_layout Plain Layout
8920 report
8921 \end_layout
8922
8923 \end_inset
8924
8925
8926 \begin_inset Flex Code
8927 status collapsed
8928
8929 \begin_layout Plain Layout
8930 book (KOMA-script)
8931 \end_layout
8932
8933 \end_inset
8934
8935 , and so forth.
8936 \end_layout
8937
8938 \begin_layout Subsection
8939 What these layouts provide
8940 \end_layout
8941
8942 \begin_layout Standard
8943 There is a long list of included environments provided by these layouts.
8944  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8945  variety of `theorem' environments.
8946  However, the AMS recommends the environments that are available in LyX.
8947  
8948 \end_layout
8949
8950 \begin_layout Standard
8951 The following environments—as well as the standard environments, such as
8952  
8953 \begin_inset Flex Noun
8954 status collapsed
8955
8956 \begin_layout Plain Layout
8957 section
8958 \end_layout
8959
8960 \end_inset
8961
8962
8963 \begin_inset Flex Noun
8964 status collapsed
8965
8966 \begin_layout Plain Layout
8967 bibliography
8968 \end_layout
8969
8970 \end_inset
8971
8972
8973 \begin_inset Flex Noun
8974 status collapsed
8975
8976 \begin_layout Plain Layout
8977 title
8978 \end_layout
8979
8980 \end_inset
8981
8982
8983 \begin_inset Flex Noun
8984 status collapsed
8985
8986 \begin_layout Plain Layout
8987 author
8988 \end_layout
8989
8990 \end_inset
8991
8992 , and 
8993 \begin_inset Flex Noun
8994 status collapsed
8995
8996 \begin_layout Plain Layout
8997 date
8998 \end_layout
8999
9000 \end_inset
9001
9002 —are provided by 
9003 \begin_inset Flex Code
9004 status collapsed
9005
9006 \begin_layout Plain Layout
9007 article (AMS)
9008 \end_layout
9009
9010 \end_inset
9011
9012  and 
9013 \begin_inset Flex Code
9014 status collapsed
9015
9016 \begin_layout Plain Layout
9017 book (AMS)
9018 \end_layout
9019
9020 \end_inset
9021
9022 :
9023 \end_layout
9024
9025 \begin_layout Description
9026 Address This should be the author's permanent address.
9027 \end_layout
9028
9029 \begin_layout Description
9030 Current
9031 \begin_inset space ~
9032 \end_inset
9033
9034 Address This should be the author's temporary address at the time of submission,
9035  if different from the Address.
9036 \end_layout
9037
9038 \begin_layout Description
9039 Email Author's e-mail address
9040 \end_layout
9041
9042 \begin_layout Description
9043 URL Author's Web address, if desired.
9044 \end_layout
9045
9046 \begin_layout Description
9047 Keywords Key words or phrases used to identify specific topics discussed
9048  in the paper.
9049 \end_layout
9050
9051 \begin_layout Description
9052 Subjectclass These refer to the AMS Subject Classifications, published and
9053  described in 
9054 \emph on
9055 Mathematical Reviews
9056 \emph default
9057 .
9058  These are also available online at the AMS cites listed above.
9059 \end_layout
9060
9061 \begin_layout Description
9062 Thanks
9063 \end_layout
9064
9065 \begin_layout Description
9066 Dedicatory
9067 \end_layout
9068
9069 \begin_layout Description
9070 Translator
9071 \end_layout
9072
9073 \begin_layout Standard
9074 The following environments are provided by both the 
9075 \begin_inset Flex Code
9076 status collapsed
9077
9078 \begin_layout Plain Layout
9079 Theorems
9080 \end_layout
9081
9082 \end_inset
9083
9084  and 
9085 \begin_inset Flex Code
9086 status collapsed
9087
9088 \begin_layout Plain Layout
9089 Theorems (AMS)
9090 \end_layout
9091
9092 \end_inset
9093
9094  modules, in the latter case in both starred (unnumbered) and unstarred
9095  (numbered) versions.
9096  These same environments are provided only in the starred versions by the
9097  
9098 \begin_inset Flex Code
9099 status collapsed
9100
9101 \begin_layout Plain Layout
9102 Theorems (Starred)
9103 \end_layout
9104
9105 \end_inset
9106
9107  module:
9108 \end_layout
9109
9110 \begin_layout Theorem
9111 This is typically used for the statements of major results.
9112  
9113 \end_layout
9114
9115 \begin_layout Corollary*
9116 This is used for statements which follow fairly directly from previous statement
9117 s.
9118  Again, these can be major results.
9119  
9120 \end_layout
9121
9122 \begin_layout Lemma
9123 These are smaller results needed to prove other statements.
9124 \end_layout
9125
9126 \begin_layout Proposition
9127 These are less major results which (hopefully) add to the general theory
9128  being discussed.
9129 \end_layout
9130
9131 \begin_layout Conjecture
9132 These are statements provided without justification, which the author does
9133  not know how to prove, but which seem to be true (to the author, at least).
9134 \end_layout
9135
9136 \begin_layout Definition*
9137 Guess what this is for.
9138  The font is different for this environment than for the previous ones.
9139  
9140 \end_layout
9141
9142 \begin_layout Example*
9143 Used for examples illustrating proven results.
9144 \end_layout
9145
9146 \begin_layout Problem
9147 It's not really known what this is for.
9148  You should figure it out.
9149 \end_layout
9150
9151 \begin_layout Exercise*
9152 Write a description for this one.
9153 \end_layout
9154
9155 \begin_layout Remark
9156 This environment is also a type of theorem, usually a lesser sort of observation.
9157 \end_layout
9158
9159 \begin_layout Claim*
9160 Often used in the course of giving a proof of a larger result.
9161 \end_layout
9162
9163 \begin_layout Case
9164 Generally, these are used to break up long arguments, using specific instances
9165  of some condition.
9166  
9167 \end_layout
9168
9169 \begin_layout Case
9170 The numbering scheme for cases is on its own, not together with other numbered
9171  statements.
9172  
9173 \end_layout
9174
9175 \begin_layout Proof
9176 At the end of this environment, a QED symbol (usually a square, but it can
9177  vary with different styles) is placed.
9178  If you want to have other environments within this one—for example, Case
9179  environments—and have the QED symbol appear only after them, then the other
9180  environments need to be nested within the proof environment.
9181  See the section 
9182 \emph on
9183 Nesting Environments
9184 \emph default
9185  of the 
9186 \emph on
9187 User's Guide
9188 \emph default
9189  for information on nesting.
9190 \end_layout
9191
9192 \begin_layout Standard
9193 And these environments are provided by 
9194 \begin_inset Flex Code
9195 status collapsed
9196
9197 \begin_layout Plain Layout
9198 Theorems (AMS-Extended)
9199 \end_layout
9200
9201 \end_inset
9202
9203 :
9204 \end_layout
9205
9206 \begin_layout Criterion*
9207 A required condition.
9208 \end_layout
9209
9210 \begin_layout Algorithm*
9211 A general procedure to be used.
9212 \end_layout
9213
9214 \begin_layout Axiom*
9215 This is a property or statement taken as true within the system being discussed.
9216 \end_layout
9217
9218 \begin_layout Condition*
9219 Sometimes used to state a condition assumed within the present context of
9220  discussion.
9221 \end_layout
9222
9223 \begin_layout Note*
9224 Similar to a Remark.
9225 \end_layout
9226
9227 \begin_layout Notation*
9228 Used for the explanation of, yes, notation.
9229 \end_layout
9230
9231 \begin_layout Summary
9232 Do we really need to tell you? 
9233 \end_layout
9234
9235 \begin_layout Acknowledgement*
9236 Acknowledgement.
9237 \end_layout
9238
9239 \begin_layout Conclusion*
9240 Sometimes used at the end of a long train of argument.
9241 \end_layout
9242
9243 \begin_layout Fact
9244 Used in a way similar to Proposition, though perhaps lower on the scale.
9245 \end_layout
9246
9247 \begin_layout Standard
9248 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9249  fonts packages.
9250  They need to be available on your system in order to use these environments.
9251 \end_layout
9252
9253 \begin_layout Section
9254 AGU journals (
9255 \family sans
9256 aguplus
9257 \family default
9258 )
9259 \end_layout
9260
9261 \begin_layout Standard
9262 by 
9263 \shape smallcaps
9264 Martin Vermeer
9265 \end_layout
9266
9267 \begin_layout Subsection
9268 Description
9269 \end_layout
9270
9271 \begin_layout Standard
9272 These are the layout files for some of the journals of the American Geophysical
9273  Society.
9274  It is assumed that you have both the AGU's own class files and AGUplus
9275  installed (everything to be found at
9276 \begin_inset Flex URL
9277 status collapsed
9278
9279 \begin_layout Plain Layout
9280
9281 ftp://ftp.agu.org/journals/latex/journals
9282 \end_layout
9283
9284 \end_inset
9285
9286 ).
9287 \end_layout
9288
9289 \begin_layout Subsection
9290 New styles
9291 \end_layout
9292
9293 \begin_layout Standard
9294 Redefined are 
9295 \family sans
9296 Paragraph
9297 \family default
9298
9299 \family sans
9300 Paragraph*
9301 \family default
9302 .
9303  They are still called this in the LyX GUI, though their LaTeX equivalents
9304  in the AGU classes are 
9305 \family sans
9306 Subsubsubsection
9307 \family default
9308  and 
9309 \family sans
9310 Subsubsubsection*
9311 \family default
9312 .
9313 \end_layout
9314
9315 \begin_layout Standard
9316 Newly defined styles are 
9317 \family sans
9318 Left_Header
9319 \family default
9320
9321 \family sans
9322 Right_Header
9323 \family default
9324
9325 \family sans
9326 Received
9327 \family default
9328
9329 \family sans
9330 Revised
9331 \family default
9332
9333 \family sans
9334 Accepted
9335 \family default
9336
9337 \family sans
9338 CCC
9339 \family default
9340
9341 \family sans
9342 PaperId
9343 \family default
9344
9345 \family sans
9346 AuthorAddr
9347 \family default
9348
9349 \family sans
9350 SlugComment
9351 \family default
9352 .
9353  These are mostly manuscript attributes and defined in the AGU class documentati
9354 on.
9355 \end_layout
9356
9357 \begin_layout Standard
9358 I suspect this is still badly incomplete.
9359 \end_layout
9360
9361 \begin_layout Subsection
9362 New floats
9363 \end_layout
9364
9365 \begin_layout Standard
9366
9367 \family sans
9368 Planotable
9369 \family default
9370  and 
9371 \family sans
9372 Plate
9373 \family default
9374 .
9375  We also have a new 
9376 \family sans
9377 Table_Caption
9378 \family default
9379 .
9380 \end_layout
9381
9382 \begin_layout Subsection
9383 Supported journals
9384 \end_layout
9385
9386 \begin_layout Itemize
9387
9388 \emph on
9389 Journal of Geophysical Research
9390 \emph default
9391
9392 \family typewriter
9393 jgrga.layout
9394 \family default
9395  — Martin Vermeer
9396 \end_layout
9397
9398 \begin_layout Standard
9399 Add your own, it isn't so hard! Look at the 
9400 \family typewriter
9401 jgrga.layout
9402 \family default
9403  example and 
9404 \family typewriter
9405 aguplus.inc
9406 \family default
9407 .
9408 \end_layout
9409
9410 \begin_layout Subsection
9411 Bugs and things to remember
9412 \end_layout
9413
9414 \begin_layout Standard
9415 In order to use the new layouts, you must remember to do the following for
9416  a new document:
9417 \end_layout
9418
9419 \begin_layout Enumerate
9420
9421 \emph on
9422 Turn off babel
9423 \emph default
9424 .
9425  This can be done in the 
9426 \family sans
9427 Layout\SpecialChar \menuseparator
9428 Document
9429 \family default
9430  or 
9431 \family sans
9432 Document\SpecialChar \menuseparator
9433 Settings
9434 \family default
9435  menu item.
9436  (AGU articles are always in English, right? So 
9437 \emph on
9438 don't
9439 \emph default
9440  choose a language.)
9441 \end_layout
9442
9443 \begin_layout Enumerate
9444 Enter 
9445 \family typewriter
9446 jgrga
9447 \family default
9448  into the document's 
9449 \family sans
9450 Extra Options
9451 \family default
9452  field.
9453  (Yes, this is a bug.)
9454 \end_layout
9455
9456 \begin_layout Enumerate
9457 Make sure you use the 
9458 \family typewriter
9459 agu.bst
9460 \family default
9461  bibliography style, by entering 
9462 \family sans
9463 agu
9464 \family default
9465  into the second field of the BibTeX inset.
9466  None of the standard styles will do.
9467 \end_layout
9468
9469 \begin_layout Section
9470 Broadway
9471 \end_layout
9472
9473 \begin_layout Standard
9474 by 
9475 \shape smallcaps
9476 Garst Reese
9477 \end_layout
9478
9479 \begin_layout Subsection
9480 Introduction
9481 \end_layout
9482
9483 \begin_layout Standard
9484 Broadway is for writing plays.
9485  The format is more decorative than Hollywood, and much less standardized.
9486  This format should be suitable for workshops.
9487 \end_layout
9488
9489 \begin_layout Subsection
9490 Special problems
9491 \end_layout
9492
9493 \begin_layout Standard
9494 The same as in Hollywood.
9495 \end_layout
9496
9497 \begin_layout Subsection
9498 Special features
9499 \end_layout
9500
9501 \begin_layout Standard
9502 Insert the 
9503 \family sans
9504 Speaker
9505 \family default
9506  names as labels then cross-reference the label to insert the name.
9507  The cross-reference dialog will show the current cast of characters.
9508 \end_layout
9509
9510 \begin_layout Subsection
9511 Paper size and Margins
9512 \end_layout
9513
9514 \begin_layout Standard
9515 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9516 \end_layout
9517
9518 \begin_layout Subsection
9519 Environments
9520 \end_layout
9521
9522 \begin_layout Standard
9523 The following environments are available.
9524  You can use broadway.bind to get the bind keys shown at the right.
9525 \end_layout
9526
9527 \begin_layout Itemize
9528
9529 \family sans
9530 Standard
9531 \begin_inset Newline newline
9532 \end_inset
9533
9534
9535 \family default
9536 You should not have to use this, but it is here for anything that does not
9537  fit otherwise.
9538 \end_layout
9539
9540 \begin_layout Itemize
9541
9542 \family sans
9543 Narrative
9544 \begin_inset space \hfill{}
9545 \end_inset
9546
9547 M-z n
9548 \begin_inset Newline newline
9549 \end_inset
9550
9551
9552 \family default
9553 Used to describe stage setting and the action.
9554  First use of speaker names in all CAPs.
9555 \end_layout
9556
9557 \begin_layout Itemize
9558
9559 \family sans
9560 ACT
9561 \begin_inset space \hfill{}
9562 \end_inset
9563
9564 M-z a
9565 \begin_inset Newline newline
9566 \end_inset
9567
9568
9569 \family default
9570 Automatically numbered.
9571  On screen it will be arabic, but will print as Roman.
9572 \end_layout
9573
9574 \begin_layout Itemize
9575
9576 \family sans
9577 ACT*
9578 \begin_inset space \hfill{}
9579 \end_inset
9580
9581 M-z S at
9582 \begin_inset Newline newline
9583 \end_inset
9584
9585
9586 \family default
9587 Subtitle for 
9588 \family sans
9589 ACT.
9590
9591 \family default
9592  It is just centered text.
9593 \end_layout
9594
9595 \begin_layout Itemize
9596
9597 \family sans
9598 SCENE
9599 \begin_inset space \hfill{}
9600 \end_inset
9601
9602 M-z S-S
9603 \begin_inset Newline newline
9604 \end_inset
9605
9606
9607 \family default
9608 Not automatically numbered.
9609  You supply the number.
9610  This is because I couldn't figure out how.
9611 \end_layout
9612
9613 \begin_layout Itemize
9614
9615 \family sans
9616 AT_RISE:
9617 \begin_inset space \hfill{}
9618 \end_inset
9619
9620 M-z S-R
9621 \begin_inset Newline newline
9622 \end_inset
9623
9624
9625 \family default
9626 A special case of Narrative to describe the setting and action as the curtain
9627  rises.
9628 \end_layout
9629
9630 \begin_layout Itemize
9631
9632 \family sans
9633 Speaker
9634 \begin_inset space \hfill{}
9635 \end_inset
9636
9637 M-z s
9638 \begin_inset Newline newline
9639 \end_inset
9640
9641
9642 \family default
9643 The speaker's (actor's) title, centered in all CAPS.
9644 \end_layout
9645
9646 \begin_layout Itemize
9647
9648 \family sans
9649 Parenthetical
9650 \begin_inset space \hfill{}
9651 \end_inset
9652
9653 M-z p
9654 \begin_inset Newline newline
9655 \end_inset
9656
9657
9658 \family default
9659 Instructions to the speaker.
9660  The parentheses are automatically inserted.
9661  The ( will appear on screen, but both will be in the printed play.
9662  This environment is only used within 
9663 \family sans
9664 Dialogue
9665 \family default
9666 .
9667 \end_layout
9668
9669 \begin_layout Itemize
9670
9671 \family sans
9672 Dialogue
9673 \begin_inset space \hfill{}
9674 \end_inset
9675
9676 M-z d
9677 \begin_inset Newline newline
9678 \end_inset
9679
9680
9681 \family default
9682 What the Speaker says.
9683 \end_layout
9684
9685 \begin_layout Itemize
9686
9687 \family sans
9688 CURTAIN
9689 \begin_inset space \hfill{}
9690 \end_inset
9691
9692 M-z S-C
9693 \begin_inset Newline newline
9694 \end_inset
9695
9696
9697 \family default
9698 The curtain comes down.
9699 \end_layout
9700
9701 \begin_layout Itemize
9702
9703 \family sans
9704 Title
9705 \begin_inset space \hfill{}
9706 \end_inset
9707
9708 M-z S-T
9709 \end_layout
9710
9711 \begin_layout Itemize
9712
9713 \family sans
9714 Author
9715 \begin_inset space \hfill{}
9716 \end_inset
9717
9718 M-z S-A
9719 \end_layout
9720
9721 \begin_layout Itemize
9722
9723 \family sans
9724 Right_Address
9725 \begin_inset space \hfill{}
9726 \end_inset
9727
9728 M-z r
9729 \end_layout
9730
9731 \begin_layout Standard
9732 Hello there.
9733 \end_layout
9734
9735 \begin_layout Section
9736 Dinbrief
9737 \end_layout
9738
9739 \begin_layout Standard
9740 The document class 
9741 \family sans
9742 dinbrief
9743 \family default
9744  can be used to type letters according to German conventions.
9745  A template file is included in 
9746 \family typewriter
9747 .../lyx/share/templates
9748 \family default
9749  for you to use as a starting point.
9750 \end_layout
9751
9752 \begin_layout Section
9753 EGS journals (
9754 \family sans
9755 egs
9756 \family default
9757 )
9758 \end_layout
9759
9760 \begin_layout Standard
9761 by 
9762 \shape smallcaps
9763 Martin Vermeer
9764 \end_layout
9765
9766 \begin_layout Subsection
9767 Description
9768 \end_layout
9769
9770 \begin_layout Standard
9771 This is the layout file for the European Geophysical Society journals.
9772  The needed 
9773 \family typewriter
9774 egs.cls
9775 \family default
9776  can be downloaded from the web site of the EGS under 
9777 \begin_inset Flex URL
9778 status collapsed
9779
9780 \begin_layout Plain Layout
9781
9782 www.copernicus.org
9783 \end_layout
9784
9785 \end_inset
9786
9787 .
9788 \end_layout
9789
9790 \begin_layout Subsection
9791 New styles
9792 \end_layout
9793
9794 \begin_layout Standard
9795
9796 \family sans
9797 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9798  Accepted
9799 \family default
9800
9801 \family sans
9802 Offsets
9803 \family default
9804 .
9805  The current layout file is unfortunately very unmodular and would benefit
9806  from using the various 
9807 \family typewriter
9808 std*.inc
9809 \family default
9810  file inclusions.
9811 \end_layout
9812
9813 \begin_layout Section
9814 Elsevier Journals
9815 \end_layout
9816
9817 \begin_layout Standard
9818 By 
9819 \noun on
9820 Rod Pinna
9821 \end_layout
9822
9823 \begin_layout Standard
9824 Elsevier Science Publishers B.V.
9825  provides a standard LaTeX document class (
9826 \family typewriter
9827 elsart.cls
9828 \family default
9829 ) for submitting articles to their various journals.
9830  The style file can be downloaded directly from their web site: 
9831 \begin_inset Flex URL
9832 status collapsed
9833
9834 \begin_layout Plain Layout
9835
9836 http://www.elsevier.com/wps/find/authorsview.authors/latex
9837 \end_layout
9838
9839 \end_inset
9840
9841 .
9842  Instructions are supplied along with the class file, which details the
9843  requirements of the publishers.
9844  LyX includes a package that allows for the use of this class, by a layout
9845  and a template file.
9846  Installation of the class file is the same as for any other LaTeX package;
9847  instructions are provided in the Elsevier documentation.
9848 \end_layout
9849
9850 \begin_layout Standard
9851 To make use of 
9852 \family typewriter
9853 elsart.cls
9854 \family default
9855 , a file 
9856 \family typewriter
9857 elsart.layout
9858 \family default
9859  is supplied.
9860  As the Elsevier class file is based mainly on the standard article class,
9861  most of the normal functionality is provided.
9862  The Elsevier class defines a number of mathematical environments, which
9863  are similar to the AMS environments.
9864  These commands are all described in the Elsevier documentation, and are
9865  available in LyX.
9866 \end_layout
9867
9868 \begin_layout Standard
9869 The easiest way to use the Elsevier style is to base documents on the included
9870  template file.
9871  It is best not to use options such as fancy headings or the geometry package,
9872  as elements such as these are defined by Elsevier in their style file.
9873  Ideally, no extra packages except those mentioned in the Elsevier documentation
9874  should be used.
9875  Essentially, Elsevier require as 
9876 \begin_inset Quotes eld
9877 \end_inset
9878
9879 clean
9880 \begin_inset Quotes erd
9881 \end_inset
9882
9883  a LaTeX file as possible, as their intention is to take the supplied file
9884  and replace the class file with one for the particular journal to which
9885  the paper has been submitted.
9886  This also means that not too much time should be spent on the formating
9887  of the document.
9888  When it comes to be published, this will change anyway.
9889  The rest of the usage for this layout is substantially the same as for
9890  the normal article class.
9891  For details of what Elsevier do and don't allow, refer to their documentation.
9892 \end_layout
9893
9894 \begin_layout Section
9895 Foils [aka 
9896 \family sans
9897 FoilTeX
9898 \family default
9899 ]
9900 \begin_inset CommandInset label
9901 LatexCommand label
9902 name "sec:foiltex"
9903
9904 \end_inset
9905
9906
9907 \end_layout
9908
9909 \begin_layout Standard
9910 by 
9911 \noun on
9912 Allan Rae
9913 \end_layout
9914
9915 \begin_layout Subsection
9916 Introduction
9917 \end_layout
9918
9919 \begin_layout Standard
9920 This section describes how to use LyX to make slides for overhead projectors.
9921  There are two document classes that can do this: the default slides class
9922  and the 
9923 \family sans
9924 FoilTeX
9925 \family default
9926  slides class.
9927  This section documents the latter.
9928 \end_layout
9929
9930 \begin_layout Standard
9931 I'm going to say this again, nice and clear, so that there's no misunderstanding
9932 :
9933 \end_layout
9934
9935 \begin_layout Standard
9936 \begin_inset VSpace bigskip
9937 \end_inset
9938
9939
9940 \end_layout
9941
9942 \begin_layout Standard
9943 \align center
9944
9945 \size large
9946 This section documents the class 
9947 \begin_inset Quotes eld
9948 \end_inset
9949
9950
9951 \family sans
9952 slides (FoilTeX)
9953 \family default
9954
9955 \begin_inset Quotes erd
9956 \end_inset
9957
9958  
9959 \emph on
9960 only.
9961 \end_layout
9962
9963 \begin_layout Standard
9964 \begin_inset VSpace bigskip
9965 \end_inset
9966
9967
9968 \end_layout
9969
9970 \begin_layout Standard
9971 If you're looking for the documentation for 
9972 \begin_inset Quotes eld
9973 \end_inset
9974
9975
9976 \family sans
9977 slides (default)
9978 \family default
9979
9980 \begin_inset Quotes erd
9981 \end_inset
9982
9983 , check out section
9984 \begin_inset space ~
9985 \end_inset
9986
9987
9988 \begin_inset CommandInset ref
9989 LatexCommand ref
9990 reference "sec:slitex"
9991
9992 \end_inset
9993
9994 .
9995  If your machine doesn't have the 
9996 \family sans
9997 foils
9998 \family default
9999  class [
10000 \begin_inset Quotes eld
10001 \end_inset
10002
10003
10004 \family sans
10005 slides (FoilTeX)
10006 \family default
10007
10008 \begin_inset Quotes erd
10009 \end_inset
10010
10011 ] installed, you'll probably have to use the default 
10012 \family sans
10013 slides
10014 \family default
10015  class, which isn't quite as good as 
10016 \family sans
10017 foils.
10018 \end_layout
10019
10020 \begin_layout Standard
10021 The 
10022 \family sans
10023 foils
10024 \family default
10025  class is designed for use with version 2.1 of the 
10026 \family sans
10027 foils.cls
10028 \family default
10029  LaTeX class file which is now an integral part of LaTeX2e.
10030 \end_layout
10031
10032 \begin_layout Subsection
10033 Getting Started
10034 \end_layout
10035
10036 \begin_layout Standard
10037 Obviously, to use this document class, you need to select 
10038 \begin_inset Quotes eld
10039 \end_inset
10040
10041
10042 \family sans
10043 slides (FoilTeX)
10044 \family default
10045
10046 \begin_inset Quotes erd
10047 \end_inset
10048
10049  from the 
10050 \family sans
10051 Class
10052 \family default
10053  entry in the 
10054 \family sans
10055 Document
10056 \begin_inset space ~
10057 \end_inset
10058
10059 Layout
10060 \family default
10061  dialog.
10062  There are some settings in the 
10063 \family sans
10064 Document
10065 \begin_inset space ~
10066 \end_inset
10067
10068 Layout
10069 \family default
10070  dialog that you should know about that are specific to this class:
10071 \end_layout
10072
10073 \begin_layout Itemize
10074 Don't change the options 
10075 \family sans
10076 Sides
10077 \family default
10078  and 
10079 \family sans
10080 Columns
10081 \family default
10082  on the 
10083 \family sans
10084 Document
10085 \begin_inset space ~
10086 \end_inset
10087
10088 Layout
10089 \family default
10090  dialog.
10091  They're ignored by the 
10092 \family sans
10093 foils
10094 \family default
10095  class.
10096 \end_layout
10097
10098 \begin_layout Itemize
10099 The default font size is 20
10100 \begin_inset space \thinspace{}
10101 \end_inset
10102
10103 pt with the other options being 17
10104 \begin_inset space \thinspace{}
10105 \end_inset
10106
10107 pt, 25
10108 \begin_inset space \thinspace{}
10109 \end_inset
10110
10111 pt and 30
10112 \begin_inset space \thinspace{}
10113 \end_inset
10114
10115 pt.
10116 \end_layout
10117
10118 \begin_layout Itemize
10119 The default font is 
10120 \family sans
10121 sans
10122 \family default
10123  
10124 \family sans
10125 serif
10126 \family default
10127  but all math equations are still typeset in the usual roman font.
10128 \end_layout
10129
10130 \begin_layout Itemize
10131
10132 \family sans
10133 FoilTeX
10134 \family default
10135  supports A4 and Letter paper sizes as well as a special size for working
10136  with 35
10137 \begin_inset space \thinspace{}
10138 \end_inset
10139
10140 mm slides.
10141  It doesn't support A5, B5, legal or executive paper sizes.
10142 \end_layout
10143
10144 \begin_layout Itemize
10145 Don't bother changing the 
10146 \family sans
10147 Float Placement
10148 \family default
10149  settings because they are ignored anyway.
10150  All floats appear where they are defined in the text.
10151 \end_layout
10152
10153 \begin_layout Itemize
10154 The 
10155 \family sans
10156 Pagestyle
10157 \family default
10158  setting behaves a bit differently for this class.
10159  
10160 \family sans
10161 FoilTeX
10162 \family default
10163  provides extensive footer and header capabilities including a user-defined
10164  logo.
10165  See section
10166 \begin_inset space ~
10167 \end_inset
10168
10169
10170 \begin_inset CommandInset ref
10171 LatexCommand ref
10172 reference "sec:foilfoot"
10173
10174 \end_inset
10175
10176  for more details.
10177  The title page is treated differently to all other pages in the document
10178  and is 
10179 \emph on
10180 always
10181 \emph default
10182  unnumbered and 
10183 \emph on
10184 always
10185 \emph default
10186  has the logo centered at the bottom of the page (if one is defined).
10187  The possible page style choices and what they do are as follows:
10188 \end_layout
10189
10190 \begin_deeper
10191 \begin_layout Labeling
10192 \labelwidthstring MMMMMMM
10193
10194 \family sans
10195 \series bold
10196 empty
10197 \family default
10198 \series default
10199  The final output contains no page numbers, or other headers or footers
10200  (except footnotes of course).
10201  
10202 \end_layout
10203
10204 \begin_layout Labeling
10205 \labelwidthstring MMMMMMM
10206
10207 \family sans
10208 \series bold
10209 plain
10210 \family default
10211 \series default
10212  The final output contains page numbers centered at the bottom of the page.
10213  No other headings or footers (other than footnotes).
10214 \end_layout
10215
10216 \begin_layout Labeling
10217 \labelwidthstring MMMMMMM
10218
10219 \series bold
10220 foilheadings
10221 \series default
10222  Page numbers in lower right corner.
10223  Additional headers and footers are also shown.
10224  This is also the default.
10225 \end_layout
10226
10227 \begin_layout Labeling
10228 \labelwidthstring MMMMMMM
10229
10230 \series bold
10231 fancy
10232 \series default
10233  Gives you access to the 
10234 \family sans
10235 fancyheadings
10236 \family default
10237  package although its use with 
10238 \family sans
10239 FoilTeX
10240 \family default
10241  is discouraged by the writer of the 
10242 \family sans
10243 FoilTeX
10244 \family default
10245  package because of some potential page layout clashes.
10246 \end_layout
10247
10248 \end_deeper
10249 \begin_layout Subsubsection
10250 Extra Options
10251 \end_layout
10252
10253 \begin_layout Standard
10254 The following options may be used in the extra class options in the 
10255 \family sans
10256 Document\SpecialChar \menuseparator
10257 Settings
10258 \family default
10259  dialog.
10260 \end_layout
10261
10262 \begin_layout Labeling
10263 \labelwidthstring MMMMMMx
10264
10265 \series bold
10266 35mmSlide
10267 \series default
10268  This sets up the page layout for 7.33
10269 \begin_inset space \thinspace{}
10270 \end_inset
10271
10272 in by 11
10273 \begin_inset space \thinspace{}
10274 \end_inset
10275
10276 in paper, which is about the same aspect ratio as a 35
10277 \begin_inset space \thinspace{}
10278 \end_inset
10279
10280 mm slide, making it a bit easier to work with this medium.
10281 \end_layout
10282
10283 \begin_layout Labeling
10284 \labelwidthstring MMMMMMx
10285
10286 \series bold
10287 headrule
10288 \series default
10289  Places a rule across the page below the header on every page except the
10290  title page.
10291 \end_layout
10292
10293 \begin_layout Labeling
10294 \labelwidthstring MMMMMMx
10295
10296 \series bold
10297 footrule
10298 \series default
10299  Places a rule across the page above the footer on every page except the
10300  title page.
10301 \end_layout
10302
10303 \begin_layout Labeling
10304 \labelwidthstring MMMMMMx
10305
10306 \series bold
10307 dvips
10308 \series default
10309  This is automatically set each time you create a new 
10310 \family sans
10311 foils
10312 \family default
10313  document.
10314  This option tells 
10315 \family sans
10316 FoilTeX
10317 \family default
10318  to use the dvips driver to rotate those pages that are set as landscape
10319  foils.
10320 \end_layout
10321
10322 \begin_layout Labeling
10323 \labelwidthstring MMMMMMx
10324
10325 \series bold
10326 landscape
10327 \series default
10328  Simply changes the page dimensions to those of a landscape page but doesn't
10329  do any rotation.
10330  Thus if you use this option you need to use an external program to rotate
10331  each page or feed your paper through your printer as landscape.
10332  Note that this option effectively reverses the roles of the 
10333 \family sans
10334 Foilhead
10335 \family default
10336  and 
10337 \family sans
10338 Rotatefoilhead
10339 \family default
10340  environments (don't worry these are described in the next section).
10341 \end_layout
10342
10343 \begin_layout Labeling
10344 \labelwidthstring MMMMMMx
10345
10346 \series bold
10347 leqno
10348 \series default
10349  Equation numbers on the left.
10350 \end_layout
10351
10352 \begin_layout Labeling
10353 \labelwidthstring MMMMMMx
10354
10355 \series bold
10356 fleqn
10357 \series default
10358  Flush-left equations.
10359 \end_layout
10360
10361 \begin_layout Subsection
10362 Supported Environments
10363 \end_layout
10364
10365 \begin_layout Standard
10366 Most of the environments commonly supported in other classes are also supported
10367  by the 
10368 \family sans
10369 foils
10370 \family default
10371  class.
10372  There are several additional environments provided by 
10373 \family sans
10374 FoilTeX
10375 \family default
10376  as well as a couple added by LyX.
10377  The following environments are shared with other classes:
10378 \end_layout
10379
10380 \begin_layout Standard
10381 \begin_inset ERT
10382 status open
10383
10384 \begin_layout Plain Layout
10385
10386
10387 \backslash
10388 begin{multicols}{2}
10389 \end_layout
10390
10391 \end_inset
10392
10393
10394 \end_layout
10395
10396 \begin_layout Itemize
10397
10398 \family sans
10399 Standard
10400 \end_layout
10401
10402 \begin_layout Itemize
10403
10404 \family sans
10405 Itemize
10406 \end_layout
10407
10408 \begin_layout Itemize
10409
10410 \family sans
10411 Enumerate
10412 \end_layout
10413
10414 \begin_layout Itemize
10415
10416 \family sans
10417 Description
10418 \end_layout
10419
10420 \begin_layout Itemize
10421
10422 \family sans
10423 List
10424 \end_layout
10425
10426 \begin_layout Itemize
10427
10428 \family sans
10429 LyX-Code
10430 \end_layout
10431
10432 \begin_layout Itemize
10433
10434 \family sans
10435 Verse
10436 \end_layout
10437
10438 \begin_layout Itemize
10439
10440 \family sans
10441 Quote
10442 \end_layout
10443
10444 \begin_layout Itemize
10445
10446 \family sans
10447 Quotation
10448 \end_layout
10449
10450 \begin_layout Itemize
10451
10452 \family sans
10453 Title
10454 \end_layout
10455
10456 \begin_layout Itemize
10457
10458 \family sans
10459 Author
10460 \end_layout
10461
10462 \begin_layout Itemize
10463
10464 \family sans
10465 Date
10466 \end_layout
10467
10468 \begin_layout Itemize
10469
10470 \family sans
10471 Abstract
10472 \end_layout
10473
10474 \begin_layout Itemize
10475
10476 \family sans
10477 Bibliography
10478 \end_layout
10479
10480 \begin_layout Itemize
10481
10482 \family sans
10483 Address
10484 \end_layout
10485
10486 \begin_layout Itemize
10487
10488 \family sans
10489 RightAddress
10490 \end_layout
10491
10492 \begin_layout Itemize
10493
10494 \family sans
10495 Caption
10496 \end_layout
10497
10498 \begin_layout Itemize
10499
10500 \family sans
10501 Comment
10502 \end_layout
10503
10504 \begin_layout Standard
10505 \begin_inset ERT
10506 status open
10507
10508 \begin_layout Plain Layout
10509
10510
10511 \backslash
10512 end{multicols}
10513 \end_layout
10514
10515 \end_inset
10516
10517
10518 \end_layout
10519
10520 \begin_layout Standard
10521 That is, all the major environments apart from the sectioning environments.
10522  Since foils are essentially self-contained sections, with a title and body,
10523  
10524 \family sans
10525 FoilTeX
10526 \family default
10527  provides specific commands for starting new foils and these are:
10528 \end_layout
10529
10530 \begin_layout Itemize
10531
10532 \family sans
10533 Foilhead
10534 \end_layout
10535
10536 \begin_layout Itemize
10537
10538 \family sans
10539 Rotatefoilhead
10540 \end_layout
10541
10542 \begin_layout Standard
10543 LyX also provides slightly modified versions of these two environments called:
10544 \end_layout
10545
10546 \begin_layout Itemize
10547
10548 \family sans
10549 ShortFoilhead
10550 \end_layout
10551
10552 \begin_layout Itemize
10553
10554 \family sans
10555 ShortRotatefoilhead
10556 \end_layout
10557
10558 \begin_layout Standard
10559 and the differences will be explained in the next section.
10560 \end_layout
10561
10562 \begin_layout Standard
10563 Since foils are often used in presenting ideas or new theorems and such
10564  
10565 \family sans
10566 FoilTeX
10567 \family default
10568  also provides a comprehensive box of goodies for presenting them:
10569 \end_layout
10570
10571 \begin_layout Standard
10572 \begin_inset ERT
10573 status open
10574
10575 \begin_layout Plain Layout
10576
10577
10578 \backslash
10579 begin{multicols}{2}
10580 \end_layout
10581
10582 \end_inset
10583
10584
10585 \end_layout
10586
10587 \begin_layout Itemize
10588
10589 \family sans
10590 Theorem
10591 \end_layout
10592
10593 \begin_layout Itemize
10594
10595 \family sans
10596 Lemma
10597 \end_layout
10598
10599 \begin_layout Itemize
10600
10601 \family sans
10602 Corollary
10603 \end_layout
10604
10605 \begin_layout Itemize
10606
10607 \family sans
10608 Proposition
10609 \end_layout
10610
10611 \begin_layout Itemize
10612
10613 \family sans
10614 Definition
10615 \end_layout
10616
10617 \begin_layout Itemize
10618
10619 \family sans
10620 Proof
10621 \end_layout
10622
10623 \begin_layout Itemize
10624
10625 \family sans
10626 Theorem*
10627 \end_layout
10628
10629 \begin_layout Itemize
10630
10631 \family sans
10632 Lemma*
10633 \end_layout
10634
10635 \begin_layout Itemize
10636
10637 \family sans
10638 Corollary*
10639 \end_layout
10640
10641 \begin_layout Itemize
10642
10643 \family sans
10644 Proposition*
10645 \end_layout
10646
10647 \begin_layout Itemize
10648
10649 \family sans
10650 Definition*
10651 \end_layout
10652
10653 \begin_layout Standard
10654 \begin_inset ERT
10655 status open
10656
10657 \begin_layout Plain Layout
10658
10659
10660 \backslash
10661 end{multicols}
10662 \end_layout
10663
10664 \end_inset
10665
10666
10667 \end_layout
10668
10669 \begin_layout Standard
10670 The starred versions are unnumbered while the unstarred versions are numbered.
10671  There are also two list environments added by LyX and these are:
10672 \end_layout
10673
10674 \begin_layout Itemize
10675
10676 \family sans
10677 TickList
10678 \end_layout
10679
10680 \begin_layout Itemize
10681
10682 \family sans
10683 CrossList
10684 \end_layout
10685
10686 \begin_layout Standard
10687
10688 \family sans
10689 FoilTeX
10690 \family default
10691  provides some powerful header and footer capabilities that are best set
10692  in the preamble although they may be set at any point in a document.
10693  If you want to change these settings in your document the best place to
10694  do so is at the very top of a foil, i.
10695 \begin_inset space \thinspace{}
10696 \end_inset
10697
10698 g.
10699 \emph on
10700
10701 \begin_inset space \space{}
10702 \end_inset
10703
10704
10705 \emph default
10706 straight after the foilhead.
10707 \end_layout
10708
10709 \begin_layout Standard
10710 For this purpose, the following command styles are provided [
10711 \shape smallcaps
10712 Martin Vermeer
10713 \shape default
10714 ]:
10715 \end_layout
10716
10717 \begin_layout Standard
10718 \begin_inset ERT
10719 status open
10720
10721 \begin_layout Plain Layout
10722
10723
10724 \backslash
10725 begin{multicols}{2}
10726 \end_layout
10727
10728 \end_inset
10729
10730
10731 \end_layout
10732
10733 \begin_layout Itemize
10734
10735 \family sans
10736 My
10737 \begin_inset space ~
10738 \end_inset
10739
10740 Logo
10741 \end_layout
10742
10743 \begin_layout Itemize
10744
10745 \family sans
10746 Restriction
10747 \end_layout
10748
10749 \begin_layout Itemize
10750
10751 \family sans
10752 Right
10753 \begin_inset space ~
10754 \end_inset
10755
10756 Footer
10757 \end_layout
10758
10759 \begin_layout Itemize
10760
10761 \family sans
10762 Right
10763 \begin_inset space ~
10764 \end_inset
10765
10766 Header
10767 \end_layout
10768
10769 \begin_layout Itemize
10770
10771 \family sans
10772 Left
10773 \begin_inset space ~
10774 \end_inset
10775
10776 Header
10777 \end_layout
10778
10779 \begin_deeper
10780 \begin_layout Standard
10781 \begin_inset space ~
10782 \end_inset
10783
10784
10785 \end_layout
10786
10787 \end_deeper
10788 \begin_layout Standard
10789 \begin_inset ERT
10790 status open
10791
10792 \begin_layout Plain Layout
10793
10794
10795 \backslash
10796 end{multicols}
10797 \end_layout
10798
10799 \end_inset
10800
10801
10802 \end_layout
10803
10804 \begin_layout Standard
10805 There are also a few commands provided by 
10806 \family sans
10807 FoilTeX
10808 \family default
10809  that aren't directly supported by LyX but I'll tell you what they do and
10810  how to use them in section
10811 \begin_inset space ~
10812 \end_inset
10813
10814
10815 \begin_inset CommandInset ref
10816 LatexCommand ref
10817 reference "sec:unsuppfoils"
10818
10819 \end_inset
10820
10821 .
10822 \end_layout
10823
10824 \begin_layout Subsection
10825 Building a Set of Foils
10826 \end_layout
10827
10828 \begin_layout Standard
10829 This section will give a simple introduction to using the different environments
10830  to build a set of foils.
10831  If you want to see an example set of foils, take a look at the 
10832 \family typewriter
10833 Foils.lyx
10834 \family default
10835  file you find in LyX's 
10836 \family typewriter
10837 examples
10838 \family default
10839  folder.
10840 \end_layout
10841
10842 \begin_layout Subsubsection
10843 Give It a Title Page
10844 \end_layout
10845
10846 \begin_layout Standard
10847 Unlike other classes that provide 
10848 \family sans
10849 Title
10850 \family default
10851
10852 \family sans
10853 Author
10854 \family default
10855
10856 \family sans
10857 Date
10858 \family default
10859  and 
10860 \family sans
10861 Abstract
10862 \family default
10863  environments, 
10864 \family sans
10865 foils
10866 \family default
10867  creates the title on a page of its own.
10868  If you leave out the 
10869 \family sans
10870 Date
10871 \family default
10872  environment LaTeX will substitute the current date (every time you regenerate
10873  the output).
10874 \end_layout
10875
10876 \begin_layout Subsubsection
10877 Start a New Foil
10878 \end_layout
10879
10880 \begin_layout Standard
10881 As I mentioned earlier, there are four ways of starting a new foil.
10882  For portrait foils you should use 
10883 \family sans
10884 Foilhead
10885 \family default
10886  or 
10887 \family sans
10888 ShortFoilhead.
10889
10890 \family default
10891  The difference between these two environments is the amount of space between
10892  the title of the foil (the foilhead) and the body of the foil.
10893 \end_layout
10894
10895 \begin_layout Standard
10896 Landscape foils are generated using the 
10897 \family sans
10898 Rotatefoilhead
10899 \family default
10900  and 
10901 \family sans
10902 ShortRotatefoilhead
10903 \family default
10904  environments.
10905  Again the only difference is the spacing between foilhead and body.
10906  Both of the short versions have 0.5 inches less separation between the foilhead
10907  and the body.
10908  
10909 \end_layout
10910
10911 \begin_layout Standard
10912 One problem with the support for landscape foils is the requirement that
10913  you have to use the 
10914 \family typewriter
10915 dvips
10916 \family default
10917  driver to generate the PostScript output otherwise the foils won't be rotated.
10918  It is possible to get landscape foils even if you haven't got the 
10919 \family typewriter
10920 dvips
10921 \family default
10922  driver provided you can feed your foils sideways through your printer ;-)
10923 \end_layout
10924
10925 \begin_layout Subsubsection
10926 Theorems, Lemmas, Proofs and more
10927 \end_layout
10928
10929 \begin_layout Standard
10930 Due to a small bug in LyX you can't have two of the same type of these environme
10931 nts directly following each other.
10932  They must be separated by something.
10933  If you try, you will just be extending the previous environment as if you
10934  had merged the two environments together.
10935  So, how do you get around this problem? The simplest option is to insert
10936  some text between the two environments or add a 
10937 \family sans
10938 LaTeX
10939 \family default
10940  environment between the two with just a 
10941 \begin_inset Quotes eld
10942 \end_inset
10943
10944
10945 \family typewriter
10946 %
10947 \family default
10948
10949 \begin_inset Quotes erd
10950 \end_inset
10951
10952  in it.
10953  This will force LyX to produce two separate environments and hence the
10954  correct LaTeX output.
10955  An example is provided in the example file included with the LyX distribution.
10956  Remember, this problem only occurs if you are trying to place two of the
10957  same type of theorem-like environments one directly after the other.
10958 \end_layout
10959
10960 \begin_layout Subsubsection
10961 Lists
10962 \end_layout
10963
10964 \begin_layout Standard
10965 You get all the commonly supported list styles found in other classes as
10966  well as two new ones.
10967  I'll only describe the new ones here.
10968  If you want to find out more about the other list environments check out
10969  the 
10970 \emph on
10971 User's Guide.
10972
10973 \emph default
10974  If you intend to use itemized lists you might also want to read about the
10975  
10976 \family sans
10977 Itemize
10978 \begin_inset space ~
10979 \end_inset
10980
10981 Bullet
10982 \begin_inset space ~
10983 \end_inset
10984
10985 Selection
10986 \family default
10987  dialog described above in section
10988 \begin_inset space ~
10989 \end_inset
10990
10991
10992 \begin_inset CommandInset ref
10993 LatexCommand ref
10994 reference "sec:bullet"
10995
10996 \end_inset
10997
10998 .
10999 \end_layout
11000
11001 \begin_layout Standard
11002 The two new list styles, 
11003 \family sans
11004 TickList
11005 \family default
11006  and 
11007 \family sans
11008 CrossList
11009 \family default
11010 , are designed to make it easier for you to create lists of do's and don'ts
11011  or right and wrong by providing dedicated environments that use a tick
11012  or a cross as the label of the list.
11013  These lists are in fact dedicated variants of the 
11014 \family sans
11015 Itemize
11016 \family default
11017  environment.
11018  They do however require that you have the 
11019 \family typewriter
11020 psnfss
11021 \family default
11022  packages installed.
11023 \end_layout
11024
11025 \begin_layout Subsubsection
11026 Figures and Tables
11027 \end_layout
11028
11029 \begin_layout Standard
11030
11031 \family sans
11032 FoilTeX
11033 \family default
11034  redefines the floating tables and figures so that they appear exactly where
11035  they are in the text rather than pushing them to the top of the page or
11036  to some user specified location.
11037  In fact if you change the float placement settings they are simply ignored.
11038 \end_layout
11039
11040 \begin_layout Subsubsection
11041 Page Headers and Footers
11042 \begin_inset CommandInset label
11043 LatexCommand label
11044 name "sec:foilfoot"
11045
11046 \end_inset
11047
11048
11049 \end_layout
11050
11051 \begin_layout Standard
11052
11053 \family sans
11054 My
11055 \begin_inset space ~
11056 \end_inset
11057
11058 Logo
11059 \family default
11060  and 
11061 \family sans
11062 Restriction
11063 \family default
11064  are two commands used to control the left-footer text string.
11065  The first is meant to allow you to include a graphic logo on your foils
11066  and defaults to 
11067 \begin_inset Quotes eld
11068 \end_inset
11069
11070 -Typeset by 
11071 \family sans
11072 FoilTeX
11073 \family default
11074 -
11075 \begin_inset Quotes erd
11076 \end_inset
11077
11078 .
11079  While the second is meant to provide a classification for the audience,
11080  
11081 \emph on
11082 e.
11083 \begin_inset space \thinspace{}
11084 \end_inset
11085
11086 g.
11087 \emph default
11088
11089 \begin_inset space \space{}
11090 \end_inset
11091
11092 Confidential.
11093  It is empty by default.
11094 \end_layout
11095
11096 \begin_layout Standard
11097 The remaining page corners can be filled by 
11098 \family sans
11099 Right
11100 \begin_inset space ~
11101 \end_inset
11102
11103 Footer
11104 \family default
11105  (which defaults to page numbers), 
11106 \family sans
11107 Right
11108 \begin_inset space ~
11109 \end_inset
11110
11111 Header
11112 \family default
11113  (top right) and 
11114 \family sans
11115 Left
11116 \begin_inset space ~
11117 \end_inset
11118
11119 Header
11120 \family default
11121  (top left).
11122 \end_layout
11123
11124 \begin_layout Subsection
11125 Unsupported 
11126 \family sans
11127 FoilTeX
11128 \family default
11129  Goodies
11130 \begin_inset CommandInset label
11131 LatexCommand label
11132 name "sec:unsuppfoils"
11133
11134 \end_inset
11135
11136
11137 \end_layout
11138
11139 \begin_layout Standard
11140 All the commands mentioned below need to be set in a 
11141 \family sans
11142 LaTeX
11143 \family default
11144  environment or as 
11145 \family sans
11146 TeX
11147 \family default
11148  within another environment.
11149 \end_layout
11150
11151 \begin_layout Subsubsection
11152 Lengths
11153 \end_layout
11154
11155 \begin_layout Standard
11156 All lengths are adjusted using the 
11157 \family typewriter
11158
11159 \backslash
11160 setlength{
11161 \family default
11162 \emph on
11163 lengthname
11164 \family typewriter
11165 \emph default
11166 }{
11167 \family default
11168 \emph on
11169 newlength
11170 \family typewriter
11171 \emph default
11172 }
11173 \family default
11174  command.
11175  Where 
11176 \emph on
11177 lengthname
11178 \emph default
11179  should be replaced by the name given to the length you want to change and
11180  
11181 \emph on
11182 newlength
11183 \emph default
11184  is the length value.
11185  All lengths should be specified in units of length such as inches (
11186 \family typewriter
11187 in
11188 \family default
11189 ), millimeters (
11190 \family typewriter
11191 mm
11192 \family default
11193 ) or points (
11194 \family typewriter
11195 pt
11196 \family default
11197 ) or relative to some document or font-based length such as 
11198 \family typewriter
11199
11200 \backslash
11201 textwidth
11202 \family default
11203 .
11204  
11205 \end_layout
11206
11207 \begin_layout Standard
11208 It's possible to change the spacing between a foilhead and the body of the
11209  foil by adjusting the length specified by 
11210 \family typewriter
11211
11212 \backslash
11213 foilheadskip
11214 \family default
11215 .
11216  For example, to make 
11217 \emph on
11218 all
11219 \emph default
11220  foilheads 0.5
11221 \begin_inset space \space{}
11222 \end_inset
11223
11224 in closer to their bodies put the following in the preamble: 
11225 \family typewriter
11226
11227 \backslash
11228 setlength{
11229 \backslash
11230 foilheadskip}{-0.5in}
11231 \end_layout
11232
11233 \begin_layout Standard
11234 The spacings around floats can be adjusted by setting these lengths:
11235 \end_layout
11236
11237 \begin_layout Labeling
11238 \labelwidthstring MMMMMMMMMMM
11239
11240 \family typewriter
11241
11242 \backslash
11243 abovefloatskip
11244 \family default
11245  Separation between the text and the top of the float
11246 \end_layout
11247
11248 \begin_layout Labeling
11249 \labelwidthstring MMMMMMMMMMM
11250
11251 \family typewriter
11252
11253 \backslash
11254 abovecaptionskip
11255 \family default
11256  Separation between the float and the caption
11257 \end_layout
11258
11259 \begin_layout Labeling
11260 \labelwidthstring MMMMMMMMMMM
11261
11262 \family typewriter
11263
11264 \backslash
11265 belowcaptionskip
11266 \family default
11267  Separation between the caption and the following text
11268 \end_layout
11269
11270 \begin_layout Labeling
11271 \labelwidthstring MMMMMMMMMMM
11272
11273 \family typewriter
11274
11275 \backslash
11276 captionwidth
11277 \family default
11278  You can make the captions narrower than the surrounding text by adjusting
11279  this length.
11280  Best done relative to 
11281 \family typewriter
11282
11283 \backslash
11284 textwidth
11285 \family default
11286 .
11287 \end_layout
11288
11289 \begin_layout Standard
11290 There are also several title page related lengths that you may find useful
11291  if you have a long title or several authors:
11292 \end_layout
11293
11294 \begin_layout Labeling
11295 \labelwidthstring MMMMMMMMMMM
11296
11297 \family typewriter
11298
11299 \backslash
11300 abovetitleskip
11301 \family default
11302  Separation from headers to 
11303 \family sans
11304 Title
11305 \end_layout
11306
11307 \begin_layout Labeling
11308 \labelwidthstring MMMMMMMMMMM
11309
11310 \family typewriter
11311
11312 \backslash
11313 titleauthorskip
11314 \family default
11315  between 
11316 \family sans
11317 Title
11318 \family default
11319  and 
11320 \family sans
11321 Author
11322 \family default
11323  environments
11324 \end_layout
11325
11326 \begin_layout Labeling
11327 \labelwidthstring MMMMMMMMMMM
11328
11329 \family typewriter
11330
11331 \backslash
11332 authorauthorskip
11333 \family default
11334  between multiple 
11335 \family sans
11336 Author
11337 \family default
11338  lines
11339 \end_layout
11340
11341 \begin_layout Labeling
11342 \labelwidthstring MMMMMMMMMMM
11343
11344 \family typewriter
11345
11346 \backslash
11347 authordateskip
11348 \family default
11349  between the 
11350 \family sans
11351 Author
11352 \family default
11353  and the 
11354 \family sans
11355 Date
11356 \end_layout
11357
11358 \begin_layout Labeling
11359 \labelwidthstring MMMMMMMMMMM
11360
11361 \family typewriter
11362
11363 \backslash
11364 dateabstractskip
11365 \family default
11366  between the 
11367 \family sans
11368 Date
11369 \family default
11370  and the 
11371 \family sans
11372 Abstract
11373 \end_layout
11374
11375 \begin_layout Standard
11376 The last length related command affects all the list environments.
11377  If you place 
11378 \family typewriter
11379
11380 \backslash
11381 zerolistvertdimens
11382 \family default
11383  
11384 \emph on
11385 inside
11386 \emph default
11387  a list environment then all the vertical spacing between the list items
11388  is removed.
11389  Note that this is a command not a length so it doesn't require 
11390 \family typewriter
11391
11392 \backslash
11393 setlength
11394 \family default
11395  like the stuff mentioned above.
11396 \end_layout
11397
11398 \begin_layout Subsubsection
11399 Headers and Footers
11400 \end_layout
11401
11402 \begin_layout Standard
11403 The 
11404 \family typewriter
11405
11406 \backslash
11407 LogoOn
11408 \family default
11409  and 
11410 \family typewriter
11411
11412 \backslash
11413 LogoOff
11414 \family default
11415  commands control whether the logo in the 
11416 \family sans
11417 MyLogo
11418 \family default
11419  definition appear on a given page.
11420  If you put 
11421 \family typewriter
11422
11423 \backslash
11424 LogoOff
11425 \family default
11426  in the preamble then none of the foils will have the logo on them.
11427  If you don't want the logo on a particular page place the 
11428 \family typewriter
11429
11430 \backslash
11431 LogoOff
11432 \family default
11433  directly after the foilhead of that page and the 
11434 \family typewriter
11435
11436 \backslash
11437 LogoOn
11438 \family default
11439  directly after the next foilhead.
11440 \end_layout
11441
11442 \begin_layout Standard
11443 If you decide to use the 
11444 \family sans
11445 fancy
11446 \family default
11447  page style setting in the 
11448 \family sans
11449 Document
11450 \begin_inset space ~
11451 \end_inset
11452
11453 Layout
11454 \family default
11455  dialog you should probably add 
11456 \family typewriter
11457
11458 \backslash
11459 let
11460 \backslash
11461 headwidth
11462 \backslash
11463 textwidth
11464 \family default
11465  to your preamble so headers and footers on landscape pages are correctly
11466  placed when rotated.
11467  This is due to some clashes between the page layouts provided by the 
11468 \family sans
11469 fancyheadings
11470 \family default
11471  package and the 
11472 \family sans
11473 foils
11474 \family default
11475  class.
11476 \end_layout
11477
11478 \begin_layout Section
11479 Hollywood (Hollywood spec scripts)
11480 \end_layout
11481
11482 \begin_layout Standard
11483 by 
11484 \shape smallcaps
11485 Garst Reese
11486 \end_layout
11487
11488 \begin_layout Subsection
11489 Introduction
11490 \end_layout
11491
11492 \begin_layout Standard
11493 Getting the format of a Hollywood script right is a 
11494 \begin_inset Quotes eld
11495 \end_inset
11496
11497 rite of passage.
11498 \begin_inset Quotes erd
11499 \end_inset
11500
11501  It is designed to make the readers focus on content and to be easy and
11502  familiar for the actors to read.
11503  Each page of a script should be one minute of film.
11504  Nothing goes in a script that you cannot see or hear on screen.
11505  The courier 12 pt font should be used throughout.
11506  No italics.
11507 \end_layout
11508
11509 \begin_layout Subsection
11510 Special problems
11511 \end_layout
11512
11513 \begin_layout Standard
11514 Speakers' lines should NEVER break in mid-sentence.
11515  If a speaker's lines continue over a page break, repeat the 
11516 \family sans
11517 Speaker
11518 \family default
11519  title followed by (Cont'd).
11520 \end_layout
11521
11522 \begin_layout Subsection
11523 Special features
11524 \end_layout
11525
11526 \begin_layout Standard
11527 Insert the 
11528 \family sans
11529 Speaker
11530 \family default
11531  names as labels then cross-reference the label to insert the name.
11532  The cross-reference dialog will show the current cast of characters.
11533  You can use this to insert the speaker name in narratives also.
11534 \end_layout
11535
11536 \begin_layout Subsection
11537 Paper size and Margins
11538 \end_layout
11539
11540 \begin_layout Standard
11541 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11542 \end_layout
11543
11544 \begin_layout Subsection
11545 Environments
11546 \end_layout
11547
11548 \begin_layout Standard
11549 The following environments are available.
11550  You can use hollywood.bind to get the bind keys shown at the right.
11551 \end_layout
11552
11553 \begin_layout Itemize
11554
11555 \family sans
11556 Standard
11557 \begin_inset Newline newline
11558 \end_inset
11559
11560
11561 \family default
11562 Used where nothing else works.
11563  Try to avoid it.
11564 \end_layout
11565
11566 \begin_layout Itemize
11567
11568 \family sans
11569 FADE_IN
11570 \family default
11571 :
11572 \begin_inset space \hfill{}
11573 \end_inset
11574
11575
11576 \family sans
11577 M-z S-I
11578 \family default
11579
11580 \begin_inset Newline newline
11581 \end_inset
11582
11583 Usually followed by something like 
11584 \begin_inset Quotes eld
11585 \end_inset
11586
11587 on Sally waking up.
11588 \begin_inset Quotes erd
11589 \end_inset
11590
11591
11592 \end_layout
11593
11594 \begin_layout Itemize
11595
11596 \family sans
11597 INT:
11598 \begin_inset space \hfill{}
11599 \end_inset
11600
11601 M-z i
11602 \begin_inset Newline newline
11603 \end_inset
11604
11605
11606 \family default
11607 Introduces a new INTERIOR camera set-up.
11608  Always followed by DAY or NIGHT, or something similar to define the lighting
11609  required.
11610  Everthing on this line in CAPS.
11611 \end_layout
11612
11613 \begin_layout Itemize
11614
11615 \family sans
11616 EXT:
11617 \begin_inset space \hfill{}
11618 \end_inset
11619
11620 M-z e
11621 \begin_inset Newline newline
11622 \end_inset
11623
11624
11625 \family default
11626 Introduces a new EXTERIOR camera set-up.
11627  Everthing on this line in CAPS.
11628 \end_layout
11629
11630 \begin_layout Itemize
11631
11632 \family sans
11633 Speaker
11634 \begin_inset space \hfill{}
11635 \end_inset
11636
11637 M-z s
11638 \begin_inset Newline newline
11639 \end_inset
11640
11641
11642 \family default
11643 The character speaking.
11644 \end_layout
11645
11646 \begin_layout Itemize
11647
11648 \family sans
11649 Parenthetical
11650 \begin_inset space \hfill{}
11651 \end_inset
11652
11653 M-z p
11654 \begin_inset Newline newline
11655 \end_inset
11656
11657
11658 \family default
11659 Instructions to the speaker.
11660  The () are automatically inserted, but only the ( will show in LyX.
11661  Both will be printed.
11662 \end_layout
11663
11664 \begin_layout Itemize
11665
11666 \family sans
11667 Dialogue
11668 \begin_inset space \hfill{}
11669 \end_inset
11670
11671 M-z d
11672 \begin_inset Newline newline
11673 \end_inset
11674
11675
11676 \family default
11677 What the 
11678 \family sans
11679 Speaker
11680 \family default
11681  says.
11682 \end_layout
11683
11684 \begin_layout Itemize
11685
11686 \family sans
11687 Transition
11688 \begin_inset space \hfill{}
11689 \end_inset
11690
11691 M-z t
11692 \begin_inset Newline newline
11693 \end_inset
11694
11695
11696 \family default
11697 Camera movement instruction.
11698  e.
11699 \begin_inset space \thinspace{}
11700 \end_inset
11701
11702 g.
11703 \begin_inset space \space{}
11704 \end_inset
11705
11706 CUT TO:
11707 \end_layout
11708
11709 \begin_layout Itemize
11710
11711 \family sans
11712 FADE OUT:
11713 \begin_inset space \hfill{}
11714 \end_inset
11715
11716 M-z S-I
11717 \end_layout
11718
11719 \begin_layout Itemize
11720
11721 \family sans
11722 Author
11723 \begin_inset space \hfill{}
11724 \end_inset
11725
11726 M-z S-A
11727 \end_layout
11728
11729 \begin_layout Itemize
11730
11731 \family sans
11732 Title
11733 \begin_inset space \hfill{}
11734 \end_inset
11735
11736 M-z S-T
11737 \end_layout
11738
11739 \begin_layout Itemize
11740
11741 \family sans
11742 Right_Address
11743 \begin_inset space \hfill{}
11744 \end_inset
11745
11746 M-z r
11747 \end_layout
11748
11749 \begin_layout Subsection
11750 Script jargon
11751 \end_layout
11752
11753 \begin_layout Itemize
11754 (O.S) — off screen
11755 \end_layout
11756
11757 \begin_layout Itemize
11758 (V.0) — voice over
11759 \end_layout
11760
11761 \begin_layout Itemize
11762 b.
11763 \begin_inset space \thinspace{}
11764 \end_inset
11765
11766 g.
11767  — background
11768 \end_layout
11769
11770 \begin_layout Itemize
11771 C.U.
11772  — close-up
11773 \end_layout
11774
11775 \begin_layout Itemize
11776 PAN — camera movement
11777 \end_layout
11778
11779 \begin_layout Itemize
11780 INSERT — cut to close-up of
11781 \end_layout
11782
11783 \begin_layout Section
11784 ijmpc and ijmpd
11785 \end_layout
11786
11787 \begin_layout Standard
11788 by 
11789 \noun on
11790 Panayotis Papasotiriou
11791 \end_layout
11792
11793 \begin_layout Subsection
11794 Overview
11795 \end_layout
11796
11797 \begin_layout Standard
11798 The ijmpc package is a set of macros that facilitates electronic manuscript
11799  submission to the 
11800 \emph on
11801 International Journal of Modern Physics C
11802 \emph default
11803 .
11804  Similarly, the ijmpd package is for creating manuscripts to be submitted
11805  to the 
11806 \emph on
11807 International Journal of Modern Physics D
11808 \emph default
11809 .
11810  Both journals are published by World Scientific.
11811  The corresponding document classes are named 
11812 \family typewriter
11813 ws-ijmpc.cls
11814 \family default
11815  and 
11816 \family typewriter
11817 ws-ijmpd.cls
11818 \family default
11819 , respectively.
11820  These files, together with instructions for the authors, can be downloaded
11821  from the sites 
11822 \begin_inset Flex URL
11823 status collapsed
11824
11825 \begin_layout Plain Layout
11826
11827 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11828 \end_layout
11829
11830 \end_inset
11831
11832  and 
11833 \begin_inset Flex URL
11834 status collapsed
11835
11836 \begin_layout Plain Layout
11837
11838 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11839 \end_layout
11840
11841 \end_inset
11842
11843 .
11844  Both packages are modified versions of the standard 
11845 \begin_inset Quotes eld
11846 \end_inset
11847
11848 article
11849 \begin_inset Quotes erd
11850 \end_inset
11851
11852  package, and they are almost (but not exactly) identical.
11853  Most of their features are supported by LyX.
11854  I have used LyX successfully to write articles submitted to both journals
11855  without any problem.
11856 \end_layout
11857
11858 \begin_layout Subsection
11859 Writing a paper
11860 \end_layout
11861
11862 \begin_layout Standard
11863 As usual, the easiest way to write a paper is to start with a template.
11864  Click on 
11865 \family sans
11866 File\SpecialChar \menuseparator
11867 New from
11868 \family default
11869  
11870 \family sans
11871 \bar under
11872 T
11873 \bar default
11874 emplate
11875 \family default
11876 , then choose the 
11877 \family typewriter
11878 ijmpc.lyx
11879 \family default
11880  or 
11881 \family typewriter
11882 ijmpd.lyx
11883 \family default
11884  template.
11885  This will give an (almost) empty document that includes the most common
11886  fields found in a manuscript.
11887  Simply overwrite the existing text (including the brackets, 
11888 \family typewriter
11889 <>
11890 \family default
11891 ) with your text.
11892  You should keep in mind the following remarks.
11893 \end_layout
11894
11895 \begin_layout Enumerate
11896 LyX won't let you change the font size and the page style of the document,
11897  because such modifications are not allowed by both packages.
11898 \end_layout
11899
11900 \begin_layout Enumerate
11901 The language of the document should not be changed.
11902  Before previewing your paper, be sure that the babel package is not used.
11903  To do this, click on 
11904 \family sans
11905 Tools\SpecialChar \menuseparator
11906 Preferences
11907 \family default
11908 , select the 
11909 \family sans
11910 Lang Opts
11911 \family default
11912  tab, deselect the 
11913 \family sans
11914 Use babel
11915 \family default
11916  checkbox in the language settings, and click on 
11917 \family sans
11918 Apply
11919 \family default
11920  (or 
11921 \family sans
11922 Save
11923 \family default
11924 , if you wish to make this change permanent).
11925 \end_layout
11926
11927 \begin_layout Enumerate
11928 The 
11929 \begin_inset Quotes eld
11930 \end_inset
11931
11932 Keywords
11933 \begin_inset Quotes erd
11934 \end_inset
11935
11936  style must be used to define keywords.
11937 \end_layout
11938
11939 \begin_layout Enumerate
11940 The ijmpc package provides a style named 
11941 \begin_inset Quotes eld
11942 \end_inset
11943
11944 Classification Codes
11945 \begin_inset Quotes erd
11946 \end_inset
11947
11948 , which can be used to define classification codes, such as PACS numbers.
11949  Note that this facility is not supported by the ijmpd package.
11950 \end_layout
11951
11952 \begin_layout Enumerate
11953 Several new environments are available: 
11954 \begin_inset Quotes eld
11955 \end_inset
11956
11957 Definition
11958 \begin_inset Quotes erd
11959 \end_inset
11960
11961
11962 \begin_inset Quotes eld
11963 \end_inset
11964
11965 Step
11966 \begin_inset Quotes erd
11967 \end_inset
11968
11969
11970 \begin_inset Quotes eld
11971 \end_inset
11972
11973 Example
11974 \begin_inset Quotes erd
11975 \end_inset
11976
11977
11978 \begin_inset Quotes eld
11979 \end_inset
11980
11981 Remark
11982 \begin_inset Quotes erd
11983 \end_inset
11984
11985
11986 \begin_inset Quotes eld
11987 \end_inset
11988
11989 Notation
11990 \begin_inset Quotes erd
11991 \end_inset
11992
11993
11994 \begin_inset Quotes eld
11995 \end_inset
11996
11997 Theorem
11998 \begin_inset Quotes erd
11999 \end_inset
12000
12001
12002 \begin_inset Quotes eld
12003 \end_inset
12004
12005 Proof
12006 \begin_inset Quotes erd
12007 \end_inset
12008
12009
12010 \begin_inset Quotes eld
12011 \end_inset
12012
12013 Corollary
12014 \begin_inset Quotes erd
12015 \end_inset
12016
12017
12018 \begin_inset Quotes eld
12019 \end_inset
12020
12021 Lemma
12022 \begin_inset Quotes erd
12023 \end_inset
12024
12025
12026 \begin_inset Quotes eld
12027 \end_inset
12028
12029 Proposition
12030 \begin_inset Quotes erd
12031 \end_inset
12032
12033
12034 \begin_inset Quotes eld
12035 \end_inset
12036
12037 Prop
12038 \begin_inset Quotes erd
12039 \end_inset
12040
12041
12042 \begin_inset Quotes eld
12043 \end_inset
12044
12045 Question
12046 \begin_inset Quotes erd
12047 \end_inset
12048
12049
12050 \begin_inset Quotes eld
12051 \end_inset
12052
12053 Claim
12054 \begin_inset Quotes erd
12055 \end_inset
12056
12057 , and 
12058 \begin_inset Quotes eld
12059 \end_inset
12060
12061 Conjecture
12062 \begin_inset Quotes erd
12063 \end_inset
12064
12065 .
12066  Their use is more or less obvious.
12067  LyX supports all these environments; it will use the proper label, text
12068  style, and numbering scheme for each of them.
12069 \end_layout
12070
12071 \begin_layout Enumerate
12072 Both packages use basic citations; the natbib package should not be used.
12073  In LyX, citation references are shown as usual; in the output, citations
12074  are shown as superscripts.
12075  If you want to use a citation as normal text, you should use the 
12076 \family typewriter
12077 refcite
12078 \family default
12079  command, e.
12080 \begin_inset space \thinspace{}
12081 \end_inset
12082
12083 g.
12084 \begin_inset space \space{}
12085 \end_inset
12086
12087
12088 \begin_inset Quotes eld
12089 \end_inset
12090
12091 See Ref.
12092 \begin_inset space \space{}
12093 \end_inset
12094
12095
12096 \family typewriter
12097
12098 \backslash
12099 refcite{key}
12100 \family default
12101
12102 \begin_inset Quotes erd
12103 \end_inset
12104
12105 .
12106 \end_layout
12107
12108 \begin_layout Enumerate
12109 There is no 
12110 \begin_inset Quotes eld
12111 \end_inset
12112
12113 Acknowledgments
12114 \begin_inset Quotes erd
12115 \end_inset
12116
12117  section in both packages.
12118  To put acknowledgments, just use the 
12119 \begin_inset Quotes eld
12120 \end_inset
12121
12122 Section*
12123 \begin_inset Quotes erd
12124 \end_inset
12125
12126  environment.
12127 \end_layout
12128
12129 \begin_layout Enumerate
12130 Appendices may be added to the paper, 
12131 \emph on
12132 after
12133 \emph default
12134  the Acknowledgments and 
12135 \shape italic
12136 before
12137 \shape default
12138  the References.
12139  LyX provides a special environment, called 
12140 \begin_inset Quotes eld
12141 \end_inset
12142
12143 Appendices Section
12144 \begin_inset Quotes erd
12145 \end_inset
12146
12147  which marks the beginning of the appendices.
12148  This environment should be left blank; it just sends a LaTeX command, but
12149  nothing is really printed.
12150  In LyX, the word 
12151 \begin_inset Quotes eld
12152 \end_inset
12153
12154 Appendix
12155 \begin_inset Quotes erd
12156 \end_inset
12157
12158  is printed with blue letters, as a signal that all sections after that
12159  point are appendices.
12160  To write an appendix, use the 
12161 \begin_inset Quotes eld
12162 \end_inset
12163
12164 Appendix
12165 \begin_inset Quotes erd
12166 \end_inset
12167
12168  environment.
12169  LyX will number each appendix with capital letters, as required by both
12170  journals.
12171  Note that 
12172 \begin_inset Quotes eld
12173 \end_inset
12174
12175 Appendices Section
12176 \begin_inset Quotes erd
12177 \end_inset
12178
12179  
12180 \emph on
12181 must
12182 \emph default
12183  be present before the first appendix; if not, all appendices will be numbered
12184  as normal sections in the output.
12185 \end_layout
12186
12187 \begin_layout Enumerate
12188 The ijmpc and the ijmpd packages use the 
12189 \family typewriter
12190 tbl
12191 \family default
12192  command to implement table captions.
12193  As a result, a table created by LyX is printed correctly, but its caption
12194  is ignored.
12195  However, you can use some TeX code to overcome this problem, so that captions
12196  are printed as expected.
12197  To do so, create a float table as usual, remove the caption, and replace
12198  it with the TeX code 
12199 \family typewriter
12200
12201 \backslash
12202 tbl{
12203 \emph on
12204 your table caption
12205 \emph default
12206 }{
12207 \family default
12208  (sic); you must also the TeX code 
12209 \family typewriter
12210 }
12211 \family default
12212  immediately after the tabular material.
12213  Study the example table included in the template files to see how this
12214  trick is implemented.
12215  Alternatively, If you need table captions, you should implement the whole
12216  table float in a 
12217 \family typewriter
12218 .tex
12219 \family default
12220  file, then include this file to the LyX document (
12221 \family sans
12222 Insert\SpecialChar \menuseparator
12223 File\SpecialChar \menuseparator
12224 Child
12225 \begin_inset space ~
12226 \end_inset
12227
12228 Document
12229 \family default
12230 ).
12231  Details on how to create a table float can be found in the files 
12232 \family typewriter
12233 ws-ijmpc.tex
12234 \family default
12235  and 
12236 \family typewriter
12237 ws-ijmpd.tex
12238 \family default
12239 , included in the corresponding packages.
12240 \end_layout
12241
12242 \begin_layout Subsection
12243 Preparing a paper for submission
12244 \end_layout
12245
12246 \begin_layout Standard
12247 Before you submit your paper you must export the LyX document as a LaTeX
12248  file (
12249 \family sans
12250 File\SpecialChar \menuseparator
12251 Export\SpecialChar \menuseparator
12252 LaTeX
12253 \family default
12254 )
12255 \begin_inset Foot
12256 status open
12257
12258 \begin_layout Plain Layout
12259 Actually you have the choice between LaTeX (plain) and pdflatex.
12260  If you intend to use pdflatex to prepare the paper, you should use the
12261  pdflatex option so that included graphics are converted to PDF format,
12262  ready for use by pdflatex.
12263 \end_layout
12264
12265 \end_inset
12266
12267 , then make the following changes to the resulting 
12268 \family typewriter
12269 .tex
12270 \family default
12271  file.
12272 \end_layout
12273
12274 \begin_layout Enumerate
12275 Remove the comment lines before the 
12276 \family typewriter
12277
12278 \backslash
12279 documentclass
12280 \family default
12281  command.
12282 \end_layout
12283
12284 \begin_layout Enumerate
12285 Remove everything between (and including) the 
12286 \family typewriter
12287
12288 \backslash
12289 makeatletter
12290 \family default
12291  and 
12292 \family typewriter
12293
12294 \backslash
12295 makeatother
12296 \family default
12297  commands, except for any commands you specifically put into the LaTeX preamble.
12298 \end_layout
12299
12300 \begin_layout Standard
12301 The modified 
12302 \family typewriter
12303 .tex
12304 \family default
12305  file should be saved and processed through LaTeX as many times as necessary.
12306  You may also want to check the resulting 
12307 \family typewriter
12308 .dvi
12309 \family default
12310  document.
12311 \end_layout
12312
12313 \begin_layout Subsection
12314 Use of TeX code
12315 \end_layout
12316
12317 \begin_layout Standard
12318 The use of TeX code is reduced to two commands, which must be placed at
12319  the top of the document.
12320  If you started writing your paper by using the 
12321 \family typewriter
12322 ijmpc.lyx
12323 \family default
12324  or the 
12325 \family typewriter
12326 ijmpd.lyx
12327 \family default
12328  template, the TeX code needed is already in its place; you usually don't
12329  need to delete it.
12330  You may only modify the first TeX code to specify the information printed
12331  to the top of odd and even pages (authors' names and short paper's title,
12332  respectively).
12333  This TeX code must have the form 
12334 \family typewriter
12335
12336 \backslash
12337 markboth{Authors' Names}{Short Paper's Title}
12338 \family default
12339 .
12340 \end_layout
12341
12342 \begin_layout Section
12343 iopart
12344 \end_layout
12345
12346 \begin_layout Standard
12347 by 
12348 \noun on
12349 Uwe Stöhr
12350 \end_layout
12351
12352 \begin_layout Subsection
12353 Overview
12354 \end_layout
12355
12356 \begin_layout Standard
12357 The iopart package provides a document class to create electronic manuscript
12358  submission to the journals published by the Institute of Physics.
12359  Instructions for the authors how to create a paper using the iopart class
12360  can be downloaded together with the iopart package from the site 
12361 \begin_inset Flex URL
12362 status collapsed
12363
12364 \begin_layout Plain Layout
12365
12366 ftp://ftp.iop.org/pub/journals/latex2e
12367 \end_layout
12368
12369 \end_inset
12370
12371 .
12372 \end_layout
12373
12374 \begin_layout Subsection
12375 Writing a paper
12376 \end_layout
12377
12378 \begin_layout Standard
12379 The easiest way to write a paper is to start with the file 
12380 \emph on
12381 IOP-article.lyx
12382 \emph default
12383  that is available in LyX's examples files folder.
12384  Open this file, save it under a new name, and start writing.
12385  The example file explains how to use the special text environments.
12386  Here are the most important advices:
12387 \end_layout
12388
12389 \begin_layout Itemize
12390 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12391  two options 
12392 \family sans
12393 Use AMS math package
12394 \family default
12395  in the document settings under 
12396 \family sans
12397 Math Options
12398 \family default
12399  are not used!
12400 \end_layout
12401
12402 \begin_layout Itemize
12403
12404 \size normal
12405 The title environment defines the kind of your paper.
12406  So use one of the following environments for the title:
12407 \end_layout
12408
12409 \begin_deeper
12410 \begin_layout Itemize
12411
12412 \family sans
12413 \size normal
12414 Title
12415 \family default
12416  for a Paper
12417 \end_layout
12418
12419 \begin_layout Itemize
12420
12421 \family sans
12422 \size normal
12423 Review
12424 \family default
12425  for a Review
12426 \end_layout
12427
12428 \begin_layout Itemize
12429
12430 \family sans
12431 \size normal
12432 Topical
12433 \family default
12434  for a Topical review
12435 \end_layout
12436
12437 \begin_layout Itemize
12438
12439 \family sans
12440 \size normal
12441 Comment
12442 \family default
12443  for a Comment
12444 \end_layout
12445
12446 \begin_layout Itemize
12447
12448 \family sans
12449 \size normal
12450 Note
12451 \family default
12452  for a Note
12453 \end_layout
12454
12455 \begin_layout Itemize
12456
12457 \family sans
12458 \size normal
12459 Paper
12460 \family default
12461  for a Paper (same as Title)
12462 \end_layout
12463
12464 \begin_layout Itemize
12465
12466 \family sans
12467 \size normal
12468 Prelim
12469 \family default
12470  for a Preliminary communication
12471 \end_layout
12472
12473 \begin_layout Itemize
12474
12475 \family sans
12476 \size normal
12477 Rapid
12478 \family default
12479  for a Rapid communication
12480 \end_layout
12481
12482 \begin_layout Itemize
12483
12484 \family sans
12485 \size normal
12486 Letter
12487 \family default
12488  for a Letter to the editor
12489 \end_layout
12490
12491 \end_deeper
12492 \begin_layout Itemize
12493
12494 \size normal
12495 All title environments except of 
12496 \family sans
12497 Letter
12498 \family default
12499  can have an optional short title.
12500 \end_layout
12501
12502 \begin_layout Itemize
12503 There is a general title environment 
12504 \family sans
12505 Article
12506 \family default
12507  which is not directly supported by the LyX.
12508  This can be used as TeX code when your document doesn't fit into one of
12509  the other title types.
12510 \end_layout
12511
12512 \begin_layout Standard
12513 For more informations like hints for special table and formula formatting,
12514  look at the IOP author guidelines.
12515 \end_layout
12516
12517 \begin_layout Section
12518 Kluwer
12519 \end_layout
12520
12521 \begin_layout Standard
12522 by 
12523 \noun on
12524 Panayotis Papasotiriou
12525 \end_layout
12526
12527 \begin_layout Subsection
12528 Overview
12529 \end_layout
12530
12531 \begin_layout Standard
12532 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12533  that facilitates electronic manuscript submission to the journals they
12534  publish.
12535  Most known of them (at least in my domain of interest) are 
12536 \emph on
12537 Astrophysics and Space Science
12538 \emph default
12539  and 
12540 \emph on
12541 Solar Physics
12542 \emph default
12543 , but there are many others (see a complete list at 
12544 \begin_inset Flex URL
12545 status open
12546
12547 \begin_layout Plain Layout
12548
12549 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12550 \end_layout
12551
12552 \end_inset
12553
12554 ).
12555  The Kluwer package may be downloaded from the site 
12556 \begin_inset Flex URL
12557 status collapsed
12558
12559 \begin_layout Plain Layout
12560
12561 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12562 \end_layout
12563
12564 \end_inset
12565
12566 .
12567  A complete user guide is contained in that package (but it can also be
12568  downloaded separately).
12569 \end_layout
12570
12571 \begin_layout Standard
12572 LyX supports many features of the package but not everything.
12573  However, the TeX code needed is reduced to some 
12574 \begin_inset Quotes eld
12575 \end_inset
12576
12577 peculiar
12578 \begin_inset Quotes erd
12579 \end_inset
12580
12581  commands of the package (see
12582 \begin_inset space ~
12583 \end_inset
12584
12585
12586 \begin_inset CommandInset ref
12587 LatexCommand ref
12588 reference "subsec:kluwer_peculiarities"
12589
12590 \end_inset
12591
12592 ).
12593  I have recently used LyX to write an article submitted to the 
12594 \emph on
12595 Astrophysics and Space Science
12596 \emph default
12597  without any problem.
12598 \end_layout
12599
12600 \begin_layout Subsection
12601 Writing a paper
12602 \end_layout
12603
12604 \begin_layout Standard
12605 The easiest way to write a paper is to start with the Kluwer template file.
12606  Click on 
12607 \family sans
12608 File\SpecialChar \menuseparator
12609 New from
12610 \family default
12611  
12612 \family sans
12613 Template
12614 \family default
12615 , then choose the 
12616 \family typewriter
12617 kluwer.lyx
12618 \family default
12619  template.
12620  This will give an (almost) empty document that includes the most common
12621  fields found in a manuscript and a short description of their use.
12622  As in most templates, simply overwrite the existing text (including the
12623  brackets, 
12624 \family typewriter
12625 <>
12626 \family default
12627 ) with the correct information.
12628 \end_layout
12629
12630 \begin_layout Subsection
12631 Preparing a paper for submission
12632 \end_layout
12633
12634 \begin_layout Standard
12635 As in the AASTeX package, before you submit your paper to a journal you
12636  must 
12637 \begin_inset Quotes eld
12638 \end_inset
12639
12640 postprocess
12641 \begin_inset Quotes erd
12642 \end_inset
12643
12644  it as follows.
12645 \end_layout
12646
12647 \begin_layout Enumerate
12648 Export your paper as a LaTeX file.
12649  To do this, click on 
12650 \family sans
12651 File\SpecialChar \menuseparator
12652 Export\SpecialChar \menuseparator
12653 LaTeX
12654 \family default
12655 .
12656  
12657 \end_layout
12658
12659 \begin_layout Enumerate
12660 Edit the resulting 
12661 \family typewriter
12662 .tex
12663 \family default
12664  file with a text editor and make the following changes
12665 \end_layout
12666
12667 \begin_deeper
12668 \begin_layout Enumerate
12669 remove the comment lines before the 
12670 \family typewriter
12671
12672 \backslash
12673 documentclass
12674 \family default
12675  command,
12676 \end_layout
12677
12678 \begin_layout Enumerate
12679 remove everything between (and including) the 
12680 \family typewriter
12681
12682 \backslash
12683 makeatletter
12684 \family default
12685  and 
12686 \family typewriter
12687
12688 \backslash
12689 makeatother
12690 \family default
12691  commands, except for any commands you specifically put into the LaTeX preamble.
12692 \end_layout
12693
12694 \begin_layout Standard
12695 Save the resulting 
12696 \family typewriter
12697 .tex
12698 \family default
12699  file.
12700 \end_layout
12701
12702 \end_deeper
12703 \begin_layout Enumerate
12704 Run the 
12705 \family typewriter
12706 .tex
12707 \family default
12708  file through LaTeX as many times as necessary (usually up to three).
12709 \end_layout
12710
12711 \begin_layout Enumerate
12712 View the resulting 
12713 \family typewriter
12714 .dvi
12715 \family default
12716  document using, e.
12717 \begin_inset space \thinspace{}
12718 \end_inset
12719
12720 g.
12721 \begin_inset space \space{}
12722 \end_inset
12723
12724
12725 \family sans
12726 xdvi
12727 \family default
12728 , and check if everything is OK (it should, if you didn't make any mistake).
12729 \end_layout
12730
12731 \begin_layout Subsection
12732 \begin_inset Quotes eld
12733 \end_inset
12734
12735 Peculiarities
12736 \begin_inset Quotes erd
12737 \end_inset
12738
12739  of the Kluwer package
12740 \begin_inset CommandInset label
12741 LatexCommand label
12742 name "subsec:kluwer_peculiarities"
12743
12744 \end_inset
12745
12746
12747 \end_layout
12748
12749 \begin_layout Standard
12750 The Kluwer package has the following 
12751 \begin_inset Quotes eld
12752 \end_inset
12753
12754 peculiarities
12755 \begin_inset Quotes erd
12756 \end_inset
12757
12758 .
12759 \end_layout
12760
12761 \begin_layout Enumerate
12762 It is possible to write multiple articles in the same LaTeX file
12763 \begin_inset Foot
12764 status collapsed
12765
12766 \begin_layout Plain Layout
12767 I can't imagine any good reason to do this.
12768 \end_layout
12769
12770 \end_inset
12771
12772 .
12773  Each article must be included in the environment 
12774 \begin_inset Quotes eld
12775 \end_inset
12776
12777 article
12778 \begin_inset Quotes erd
12779 \end_inset
12780
12781 .
12782  Unfortunately, this environment cannot be omitted, even if you write just
12783  one article.
12784  Therefore, each article starts with the command 
12785 \family typewriter
12786
12787 \backslash
12788 begin{article}
12789 \family default
12790  and, obviously, ends with the command 
12791 \family typewriter
12792
12793 \backslash
12794 end{article}
12795 \family default
12796 .
12797  Although this can be implemented in LyX, I didn't included it, since it
12798  looks ugly and can confuse the novice user.
12799  Therefore, you need to enter them directly and mark them as LaTeX code
12800  (the well-known 
12801 \begin_inset Quotes eld
12802 \end_inset
12803
12804 TeX code
12805 \begin_inset Quotes erd
12806 \end_inset
12807
12808 ).
12809 \end_layout
12810
12811 \begin_layout Enumerate
12812 Information given at the beginning of the article (i.
12813 \begin_inset space \thinspace{}
12814 \end_inset
12815
12816 g.
12817 \begin_inset space \space{}
12818 \end_inset
12819
12820 title, subtitle, author, institution, running title, running author, abstract
12821  and keywords) must be included in an environment called 
12822 \begin_inset Quotes eld
12823 \end_inset
12824
12825 opening
12826 \begin_inset Quotes erd
12827 \end_inset
12828
12829 .
12830  This is not implemented in LyX, so you must enter title, subtitle etc.
12831 \begin_inset space ~
12832 \end_inset
12833
12834 between two TeX code lines (
12835 \family typewriter
12836
12837 \backslash
12838 begin{opening}
12839 \family default
12840  and 
12841 \family typewriter
12842
12843 \backslash
12844 end{opening}
12845 \family default
12846 ).
12847 \end_layout
12848
12849 \begin_layout Enumerate
12850 According to the user manual, the label of each bibliography item must be
12851  written as 
12852 \family typewriter
12853
12854 \backslash
12855 protect
12856 \backslash
12857 citeauthoryear{
12858 \family default
12859 \emph on
12860 author(s)
12861 \family typewriter
12862 \emph default
12863 }{
12864 \family default
12865 \emph on
12866 year
12867 \family typewriter
12868 \emph default
12869 }
12870 \family default
12871 .
12872 \end_layout
12873
12874 \begin_layout Standard
12875 The 
12876 \family typewriter
12877 kluwer.lyx
12878 \family default
12879  template takes care of all these 
12880 \begin_inset Quotes eld
12881 \end_inset
12882
12883 peculiarities
12884 \begin_inset Quotes erd
12885 \end_inset
12886
12887 .
12888  If you start a new paper using this template you don't need to do anything
12889  special.
12890  Just 
12891 \end_layout
12892
12893 \begin_layout Enumerate
12894 don't delete the TeX code included in the template, and
12895 \end_layout
12896
12897 \begin_layout Enumerate
12898 copy the example bibliography item included in the template and modify it
12899  as necessary to enter new bibliography items.
12900 \end_layout
12901
12902 \begin_layout Section
12903 Koma-Script
12904 \end_layout
12905
12906 \begin_layout Standard
12907 by 
12908 \noun on
12909 Bernd Rellermeyer
12910 \end_layout
12911
12912 \begin_layout Subsection
12913 Overview
12914 \end_layout
12915
12916 \begin_layout Standard
12917 The LyX document classes 
12918 \emph on
12919 article (koma-script)
12920 \emph default
12921
12922 \emph on
12923 report (koma-script)
12924 \emph default
12925
12926 \emph on
12927 book
12928 \emph default
12929  
12930 \emph on
12931 (koma-script)
12932 \emph default
12933 , and 
12934 \emph on
12935 letter
12936 \emph default
12937  
12938 \emph on
12939 (koma-script)
12940 \emph default
12941  correspond to the LaTeX document classes 
12942 \family typewriter
12943 scrartcl.cls
12944 \family default
12945
12946 \family typewriter
12947 scrreprt.cls
12948 \family default
12949
12950 \family typewriter
12951 scrbook.cls
12952 \family default
12953 , and 
12954 \family typewriter
12955 scrlettr.cls
12956 \family default
12957 , resp.
12958 \begin_inset space ~
12959 \end_inset
12960
12961 of the Koma-Script family.
12962  They are replacements for the standard document classes 
12963 \family typewriter
12964 article.cls
12965 \family default
12966
12967 \family typewriter
12968 report.cls
12969 \family default
12970
12971 \family typewriter
12972 book.cls
12973 \family default
12974  and 
12975 \family typewriter
12976 letter.cls
12977 \family default
12978 , resp., and fit better to European typography conventions in a number of
12979  points.
12980 \end_layout
12981
12982 \begin_layout Itemize
12983 Standard character size is 11pt in 
12984 \emph on
12985 article (koma-script)
12986 \emph default
12987
12988 \emph on
12989 report (koma-script)
12990 \emph default
12991 , and 
12992 \emph on
12993 book (koma-script)
12994 \emph default
12995 , and 12pt in 
12996 \emph on
12997 letter (koma-script)
12998 \emph default
12999 .
13000 \end_layout
13001
13002 \begin_layout Itemize
13003 Headings, labels of the description environment, and a number of elements
13004  of the 
13005 \emph on
13006 letter (koma-script)
13007 \emph default
13008  document class are set in a bold sans serif font.
13009 \begin_inset Foot
13010 status collapsed
13011
13012 \begin_layout Plain Layout
13013 There is a big difference between the bold sans serif old cm fonts and new
13014  ec fonts, especially in the appearance of headings.
13015  In comparison, the ec bold sans serif fonts look a bit thin.
13016  Here the LaTeX package 
13017 \family typewriter
13018 cmsd.sty by
13019 \family default
13020  
13021 \shape smallcaps
13022 Walter Schmidt
13023 \shape default
13024  helps to produce the 
13025 \begin_inset Quotes eld
13026 \end_inset
13027
13028 usual
13029 \begin_inset Quotes erd
13030 \end_inset
13031
13032  appearance when using the ec fonts.
13033 \end_layout
13034
13035 \end_inset
13036
13037  The numbering of chapter headings is made in the same way as the numbering
13038  of section headings, that is without the extra line 
13039 \begin_inset Quotes eld
13040 \end_inset
13041
13042 Chapter\SpecialChar \ldots{}
13043
13044 \begin_inset Quotes erd
13045 \end_inset
13046
13047 .
13048  In addition, the appearance of the headings can be modified by using a
13049  number of options (in LyX to be entered in the field 
13050 \family sans
13051 Extra
13052 \begin_inset space ~
13053 \end_inset
13054
13055 Options
13056 \family default
13057  of the dialog 
13058 \family sans
13059 Layout\SpecialChar \menuseparator
13060 Document
13061 \family default
13062 ).
13063  
13064 \end_layout
13065
13066 \begin_layout Itemize
13067 The main means in the Koma-Script document classes to design the type area
13068  are the options 
13069 \family sans
13070 BCOR
13071 \family default
13072  and 
13073 \family sans
13074 DIV
13075 \family default
13076  (in LyX to be entered in the extra class options field in the dialog 
13077 \family sans
13078 Document\SpecialChar \menuseparator
13079 Settings
13080 \family default
13081 ).
13082  They make a clearer modification of page margins possible as do the options
13083  of the dialog 
13084 \family sans
13085 Document\SpecialChar \menuseparator
13086 Settings
13087 \family default
13088 .
13089  
13090 \end_layout
13091
13092 \begin_layout Itemize
13093 The LaTeX document classes of the Koma-Script family define a number of
13094  additional commands.
13095  Those part of it which makes sense in LyX is implemented in corresponding
13096  paragraph types.
13097 \end_layout
13098
13099 \begin_layout Standard
13100 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13101  can be found in the Koma-Script documentation 
13102 \emph on
13103 scrguide
13104 \emph default
13105  (German) and 
13106 \emph on
13107 scrguien
13108 \emph default
13109  (English).
13110 \end_layout
13111
13112 \begin_layout Subsection
13113 article (koma-script), report (koma-script), and book (koma-script)
13114 \end_layout
13115
13116 \begin_layout Standard
13117 The document classes 
13118 \emph on
13119 article (koma-script)
13120 \emph default
13121
13122 \emph on
13123 report (koma-script)
13124 \emph default
13125 , and 
13126 \emph on
13127 book
13128 \emph default
13129  
13130 \emph on
13131 (koma-script)
13132 \emph default
13133  are implemented in the layout files 
13134 \family typewriter
13135 scrartcl.layout
13136 \family default
13137
13138 \family typewriter
13139 scrreprt.layout
13140 \family default
13141 , and 
13142 \family typewriter
13143 scrbook.layout
13144 \family default
13145 , resp.
13146  They contain all the paragraph types of the corresponding standard document
13147  classes 
13148 \emph on
13149 article
13150 \emph default
13151
13152 \emph on
13153 report
13154 \emph default
13155 , and 
13156 \emph on
13157 book
13158 \emph default
13159 , resp., partly modified, with the exception of the LyX specific 
13160 \family sans
13161 List
13162 \family default
13163 -type, which is replaced by the new 
13164 \family sans
13165 Labeling
13166 \family default
13167 -type having the same functionality.
13168  Beside the 
13169 \family sans
13170 Labeling
13171 \family default
13172 -Type there is a number of new paragraph types added.
13173  They are 
13174 \emph on
13175 not
13176 \emph default
13177  part of 
13178 \emph on
13179 letter (koma-script)
13180 \emph default
13181 .
13182 \end_layout
13183
13184 \begin_layout Itemize
13185
13186 \family sans
13187 Addpart, Addchap
13188 \family default
13189
13190 \family sans
13191 Addsec
13192 \family default
13193 : are equivalents to 
13194 \family sans
13195 Part*, Chapter*
13196 \family default
13197  and 
13198 \family sans
13199 Section*
13200 \family default
13201 , resp., additionally inserting an entry in the table of contents.
13202  
13203 \family sans
13204 Addpart
13205 \family default
13206  and 
13207 \family sans
13208 Addchap
13209 \family default
13210  are not contained in 
13211 \emph on
13212 article (koma-script)
13213 \emph default
13214 .
13215 \end_layout
13216
13217 \begin_layout Itemize
13218
13219 \family sans
13220 Addchap*
13221 \family default
13222
13223 \family sans
13224 Addsec*
13225 \family default
13226 : behave exactly as 
13227 \family sans
13228 Addchap
13229 \family default
13230  and 
13231 \family sans
13232 Addsec
13233 \family default
13234 , resp., additionally clearing running heads.
13235  
13236 \family sans
13237 Addchap*
13238 \family default
13239  is not contained in 
13240 \emph on
13241 article (koma-script)
13242 \emph default
13243 .
13244 \begin_inset Foot
13245 status collapsed
13246
13247 \begin_layout Plain Layout
13248 There is also an 
13249 \family typewriter
13250
13251 \backslash
13252 addpart*
13253 \family default
13254  command in 
13255 \emph on
13256 book (koma-script)
13257 \emph default
13258  and in 
13259 \emph on
13260 report (koma-script)
13261 \emph default
13262 , but since this is identical to 
13263 \family sans
13264 Part*
13265 \family default
13266 , is has not been implemented in LyX.
13267 \end_layout
13268
13269 \end_inset
13270
13271
13272 \end_layout
13273
13274 \begin_layout Itemize
13275
13276 \family sans
13277 Minisec
13278 \family default
13279 : generates a heading directly above the following paragraph in the standard
13280  character size without affecting the structure of the document.
13281 \end_layout
13282
13283 \begin_layout Itemize
13284
13285 \family sans
13286 Captionabove
13287 \family default
13288  and 
13289 \family sans
13290 Captionbelow
13291 \family default
13292  are special captions which respect the different space settings needed
13293  for captions placed above or below an element (if you follow strict typographic
13294  rules, you might want to place table captions always above the table).
13295  You can also use the class option 
13296 \family typewriter
13297 tablecaptionsabove
13298 \family default
13299 , which will switch 
13300 \family sans
13301 caption
13302 \family default
13303  to 
13304 \family sans
13305 captionabove
13306 \family default
13307  for tables and 
13308 \family sans
13309 captionbelow
13310 \family default
13311  for figures.
13312  You need at least Koma-Script version 2.8q to use this.
13313 \end_layout
13314
13315 \begin_layout Itemize
13316
13317 \family sans
13318 Dictum
13319 \family default
13320 : can be used to set a bonmot, e.
13321 \begin_inset space \thinspace{}
13322 \end_inset
13323
13324 g.
13325 \begin_inset space \space{}
13326 \end_inset
13327
13328 at the beginning of a chapter.
13329  If you use the optional argument (
13330 \family sans
13331 Insert\SpecialChar \menuseparator
13332 Short
13333 \begin_inset space ~
13334 \end_inset
13335
13336 Title
13337 \family default
13338 ), you can insert the dictum's author there.
13339  Dictum and author are separated by a line.
13340  You need at least Koma-Script version 2.8q to use this.
13341  
13342 \family sans
13343 Dictum
13344 \family default
13345  is not contained in 
13346 \emph on
13347 article (koma-script)
13348 \emph default
13349 .
13350 \end_layout
13351
13352 \begin_layout Standard
13353 The following types, together with the standard types 
13354 \family sans
13355 Title
13356 \family default
13357
13358 \family sans
13359 Author
13360 \family default
13361 , and 
13362 \family sans
13363 Date
13364 \family default
13365 , form the title area of the document.
13366  They must be entered ahead of the first 
13367 \begin_inset Quotes eld
13368 \end_inset
13369
13370 ordinary
13371 \begin_inset Quotes erd
13372 \end_inset
13373
13374  paragraph.
13375 \begin_inset Foot
13376 status collapsed
13377
13378 \begin_layout Plain Layout
13379 The corresponding LaTeX commands must appear before the 
13380 \family typewriter
13381
13382 \backslash
13383 maketitle
13384 \family default
13385  command.
13386 \end_layout
13387
13388 \end_inset
13389
13390  When such a type is used more than once, the latter usage overwrites the
13391  former one, that means, for every type only the latest usage is valid.
13392  The order of the different types however has, like 
13393 \family sans
13394 Title
13395 \family default
13396
13397 \family sans
13398 Author
13399 \family default
13400 , and 
13401 \family sans
13402 Date
13403 \family default
13404 , no effect on the appearance of the produced document.
13405 \end_layout
13406
13407 \begin_layout Itemize
13408
13409 \family sans
13410 Subject
13411 \family default
13412 : produces a centered paragraph above the ordinary title (
13413 \family sans
13414 Title
13415 \family default
13416
13417 \family sans
13418 Author
13419 \family default
13420
13421 \family sans
13422 Date
13423 \family default
13424 ) for the subject of the document.
13425 \end_layout
13426
13427 \begin_layout Itemize
13428
13429 \family sans
13430 Publishers
13431 \family default
13432 : produces a centered paragraph below the ordinary title (
13433 \family sans
13434 Title
13435 \family default
13436
13437 \family sans
13438 Author
13439 \family default
13440
13441 \family sans
13442 Date
13443 \family default
13444 ) for the publishers' name.
13445 \end_layout
13446
13447 \begin_layout Itemize
13448
13449 \family sans
13450 Dedication
13451 \family default
13452 : in 
13453 \emph on
13454 report (koma-script)
13455 \emph default
13456  and 
13457 \emph on
13458 book (koma-script)
13459 \emph default
13460  produces a centered paragraph on its own page behind the title page, or
13461  in 
13462 \emph on
13463 article (koma-script)
13464 \emph default
13465  produces a centered paragraph below the ordinary title (
13466 \family sans
13467 Title
13468 \family default
13469
13470 \family sans
13471 Author
13472 \family default
13473
13474 \family sans
13475 Date
13476 \family default
13477
13478 \family sans
13479 Publishers
13480 \family default
13481 ) for a dedication.
13482 \end_layout
13483
13484 \begin_layout Itemize
13485
13486 \family sans
13487 Titlehead
13488 \family default
13489 : produces a left aligned paragraph above the ordinary title (
13490 \family sans
13491 Title
13492 \family default
13493
13494 \family sans
13495 Author
13496 \family default
13497
13498 \family sans
13499 Date
13500 \family default
13501
13502 \family sans
13503 Subject
13504 \family default
13505 ) for a document`s head.
13506 \end_layout
13507
13508 \begin_layout Itemize
13509
13510 \family sans
13511 Uppertitleback
13512 \family default
13513 : produces in a double-sided print in 
13514 \emph on
13515 report (koma-script)
13516 \emph default
13517  and 
13518 \emph on
13519 book (koma-script)
13520 \emph default
13521  a left-aligned paragraph at the top of the title page`s back or has no
13522  effect in a single-sided print or in 
13523 \emph on
13524 article (koma-script)
13525 \emph default
13526 .
13527 \end_layout
13528
13529 \begin_layout Itemize
13530
13531 \family sans
13532 Lowertitleback
13533 \family default
13534 : produces in a double-sided print in 
13535 \emph on
13536 report (koma-script)
13537 \emph default
13538  and 
13539 \emph on
13540 book (koma-script)
13541 \emph default
13542  a left-aligned paragraph at the bottom of the title page`s back or has
13543  no effect in a single-sided print or in 
13544 \emph on
13545 article (koma-script)
13546 \emph default
13547 .
13548 \end_layout
13549
13550 \begin_layout Itemize
13551
13552 \family sans
13553 Extratitle
13554 \family default
13555 : produces a special 
13556 \begin_inset Quotes eld
13557 \end_inset
13558
13559 dirty
13560 \begin_inset Quotes erd
13561 \end_inset
13562
13563  page ahead of the actual document containing a paragraph without special
13564  formatting.
13565 \end_layout
13566
13567 \begin_layout Standard
13568 The layout files for the document classes 
13569 \emph on
13570 article (koma-script)
13571 \emph default
13572
13573 \emph on
13574 report (koma-script)
13575 \emph default
13576 , and 
13577 \emph on
13578 book (koma-script)
13579 \emph default
13580  do include the file 
13581 \family typewriter
13582 scrmacros.inc
13583 \family default
13584 .
13585  This is thought of as a place to define your own types.
13586  Copy scrmacros
13587 \family typewriter
13588 .inc
13589 \family default
13590  in your personal layout directory and edit the file!
13591 \end_layout
13592
13593 \begin_layout Subsection
13594 letter (koma-script)
13595 \end_layout
13596
13597 \begin_layout Standard
13598 \begin_inset ERT
13599 status open
13600
13601 \begin_layout Plain Layout
13602
13603
13604 \backslash
13605 begin{sloppypar}
13606 \end_layout
13607
13608 \end_inset
13609
13610
13611 \end_layout
13612
13613 \begin_layout Standard
13614 \noindent
13615 The document class 
13616 \emph on
13617 letter (koma-script)
13618 \emph default
13619  is implemented in the layout file 
13620 \family typewriter
13621 scrlettr.layout
13622 \family default
13623 .
13624  It contains all the paragraph types of the corresponding standard document
13625  class 
13626 \emph on
13627 letter
13628 \emph default
13629 , partly modified, with the exception of the LyX specific types 
13630 \family sans
13631 LyX-Code
13632 \family default
13633  and 
13634 \family sans
13635 Comment
13636 \family default
13637  and the 
13638 \family sans
13639 List
13640 \family default
13641  type, which is replaced by the new 
13642 \family sans
13643 Labeling
13644 \family default
13645  type.
13646  In addition, it contains, in contrast to the standard document class, the
13647  standard types 
13648 \family sans
13649 LaTeX
13650 \family default
13651
13652 \family sans
13653 Quotation
13654 \family default
13655
13656 \family sans
13657 Quote
13658 \family default
13659 , and 
13660 \family sans
13661 Verse
13662 \family default
13663 .
13664  Furthermore, there are a number of new letter specific types.
13665 \end_layout
13666
13667 \begin_layout Standard
13668 \begin_inset ERT
13669 status open
13670
13671 \begin_layout Plain Layout
13672
13673
13674 \backslash
13675 end{sloppypar}
13676 \end_layout
13677
13678 \end_inset
13679
13680
13681 \end_layout
13682
13683 \begin_layout Standard
13684 The appearance of the letter produced by this document class can be controlled
13685  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13686 \begin_inset Foot
13687 status collapsed
13688
13689 \begin_layout Plain Layout
13690 For example, the standard appearance of the letter`s heading, consisting
13691  of name and address, is quite self-willed.
13692  An 
13693 \begin_inset Quotes eld
13694 \end_inset
13695
13696 ordinary
13697 \begin_inset Quotes erd
13698 \end_inset
13699
13700  heading is produced by the following LaTeX commands in the preamble:
13701 \end_layout
13702
13703 \begin_layout LyX-Code
13704
13705 \backslash
13706 firsthead{
13707 \backslash
13708 parbox[b]{
13709 \backslash
13710 textwidth}
13711 \end_layout
13712
13713 \begin_layout LyX-Code
13714   {
13715 \backslash
13716 ignorespaces 
13717 \backslash
13718 fromname
13719 \backslash
13720
13721 \backslash
13722  
13723 \backslash
13724 ignorespaces 
13725 \backslash
13726 fromaddress}} 
13727 \end_layout
13728
13729 \begin_layout LyX-Code
13730
13731 \backslash
13732 nexthead{
13733 \backslash
13734 parbox[b]{
13735 \backslash
13736 textwidth}
13737 \end_layout
13738
13739 \begin_layout LyX-Code
13740   {
13741 \backslash
13742 ignorespaces 
13743 \backslash
13744 fromname 
13745 \backslash
13746 hfill 
13747 \backslash
13748 ignorespaces 
13749 \backslash
13750 pagename
13751 \backslash
13752  
13753 \backslash
13754 thepage}}
13755 \end_layout
13756
13757 \end_inset
13758
13759  A detailed German description of such LaTeX commands can be found in the
13760  Koma-Script documentation 
13761 \emph on
13762 scrguide
13763 \emph default
13764 .
13765  With it, the letter's author can produce his personal letter layout.
13766 \end_layout
13767
13768 \begin_layout Standard
13769 The types 
13770 \family sans
13771 Letter
13772 \family default
13773  and 
13774 \family sans
13775 Opening
13776 \family default
13777  define the beginning of the letter and must be used in every letter.
13778  To emphasize them in the LyX document class, they are marked with the letter
13779  
13780 \shape italic
13781 L
13782 \shape default
13783  or 
13784 \shape italic
13785 O
13786 \shape default
13787 , resp.
13788 \begin_inset space ~
13789 \end_inset
13790
13791 in the left margin.
13792  It is possible to write any number of letters in one file.
13793  An 
13794 \family sans
13795 Opening
13796 \family default
13797  type produces a new letter using the same addressee and a 
13798 \family sans
13799 Letter
13800 \family default
13801  type produces a new addressee.
13802  The types 
13803 \family sans
13804 Closing
13805 \family default
13806
13807 \family sans
13808 PS
13809 \family default
13810
13811 \family sans
13812 CC
13813 \family default
13814 , and 
13815 \family sans
13816 Encl
13817 \family default
13818  are ordinary paragraph types and can also be used several times in one
13819  and the same letter.
13820 \end_layout
13821
13822 \begin_layout Itemize
13823
13824 \family sans
13825 Letter
13826 \family default
13827 : produces a paragraph for the addressee and implicitly defines the beginning
13828  of the letter.
13829 \end_layout
13830
13831 \begin_layout Itemize
13832
13833 \family sans
13834 Opening
13835 \family default
13836 : produces a paragraph for the form of address and implicitly produces a
13837  new letter.
13838 \end_layout
13839
13840 \begin_layout Itemize
13841
13842 \family sans
13843 Closing
13844 \family default
13845 : produces a paragraph for a close.
13846 \end_layout
13847
13848 \begin_layout Itemize
13849
13850 \family sans
13851 PS
13852 \family default
13853 : produces a paragraph for a postscript.
13854 \end_layout
13855
13856 \begin_layout Itemize
13857
13858 \family sans
13859 CC
13860 \family default
13861 : produces a paragraph for a distribution list.
13862 \end_layout
13863
13864 \begin_layout Itemize
13865
13866 \family sans
13867 Encl
13868 \family default
13869 : produces a paragraph for enclosures.
13870 \end_layout
13871
13872 \begin_layout Standard
13873 The types 
13874 \family sans
13875 Name
13876 \family default
13877
13878 \family sans
13879 Signature
13880 \family default
13881
13882 \family sans
13883 Address
13884 \family default
13885
13886 \family sans
13887 Telephone
13888 \family default
13889
13890 \family sans
13891 Place
13892 \family default
13893
13894 \family sans
13895 Backaddress
13896 \family default
13897
13898 \family sans
13899 Specialmail
13900 \family default
13901
13902 \family sans
13903 Location
13904 \family default
13905
13906 \family sans
13907 Title
13908 \family default
13909 , and 
13910 \family sans
13911 Subject
13912 \family default
13913  are input types provided with a label to enter information, which will
13914  be processed by the document class.
13915 \begin_inset Foot
13916 status open
13917
13918 \begin_layout Plain Layout
13919 It could be seen as a matter of inconsequence, that the types 
13920 \family sans
13921 Letter
13922 \family default
13923  and 
13924 \family sans
13925 Opening
13926 \family default
13927  described above are not such input types as well.
13928  Because of the special meaning of those types, however, I have implemented
13929  them as ordinary paragraph types with a one letter mark in the left margin.
13930  Moreover, it would affect my feeling of symmetry, if the 
13931 \family sans
13932 Opening
13933 \family default
13934  type and the 
13935 \family sans
13936 Closing
13937 \family default
13938  type had such a serious different appearance.
13939 \end_layout
13940
13941 \end_inset
13942
13943  The types must be used ahead of the corresponding 
13944 \family sans
13945 Opening
13946 \family default
13947  type.
13948 \end_layout
13949
13950 \begin_layout Standard
13951 An implementation of these types in a WYSIWYG fashion does not seem to make
13952  sense, because the real appearance of the produced letter does not only
13953  depend on the usage of the particular type, but also on other factors.
13954  For example, a signature entered in the 
13955 \family sans
13956 Signature
13957 \family default
13958  type will in the standard behavior appear in the produced letter only,
13959  when in the same letter also a 
13960 \family sans
13961 Closing
13962 \family default
13963  type is used.
13964  The entered value of the 
13965 \family sans
13966 Telephone
13967 \family default
13968  type will in the standard behavior not appear in the produced letter at
13969  all.
13970  The possibility to design the letter`s heading freely is already indicated
13971  in a footnote above.
13972 \end_layout
13973
13974 \begin_layout Standard
13975 The input types can also be used as empty paragraphs.
13976  This makes sense e.
13977 \begin_inset space \thinspace{}
13978 \end_inset
13979
13980 g.
13981 \begin_inset space \space{}
13982 \end_inset
13983
13984 for the 
13985 \family sans
13986 Signature
13987 \family default
13988  type.
13989  If the 
13990 \family sans
13991 Signature
13992 \family default
13993  type is not used at all, in the standard behavior the value of the 
13994 \family sans
13995 Name
13996 \family default
13997  type is used as signature, whereas if an empty 
13998 \family sans
13999 Signature
14000 \family default
14001  type is used, no signature value is defined.
14002 \end_layout
14003
14004 \begin_layout Standard
14005 By using the input types it is possible to write a letter template, containing
14006  filled input types with your personal dates (name, address, etc.) and empty
14007  input types for other dates you want to enter.
14008 \end_layout
14009
14010 \begin_layout Itemize
14011
14012 \family sans
14013 Name
14014 \family default
14015 : sender's name, in the standard behavior appears as a centered paragraph
14016  in small caps in the letter`s heading.
14017 \end_layout
14018
14019 \begin_layout Itemize
14020
14021 \family sans
14022 Signature
14023 \family default
14024 : sender's signature, in the standard behavior appears below the 
14025 \family sans
14026 Closing
14027 \family default
14028  type.
14029  If no 
14030 \family sans
14031 Signature
14032 \family default
14033  type is used, the value of the 
14034 \family sans
14035 Name
14036 \family default
14037  type appears instead.
14038 \end_layout
14039
14040 \begin_layout Itemize
14041
14042 \family sans
14043 Address
14044 \family default
14045 : sender's address, in the standard behavior appears in a centered paragraph
14046  in the letter`s heading below the sender's name.
14047 \end_layout
14048
14049 \begin_layout Itemize
14050
14051 \family sans
14052 Telephone
14053 \family default
14054 : sender's telephone number, in the standard behavior only sets the LaTeX
14055  variable 
14056 \family typewriter
14057
14058 \backslash
14059 telephonenum
14060 \family default
14061 .
14062 \end_layout
14063
14064 \begin_layout Itemize
14065
14066 \family sans
14067 Place
14068 \family default
14069 : place of the letter`s making.
14070 \end_layout
14071
14072 \begin_layout Itemize
14073
14074 \family sans
14075 Date
14076 \family default
14077 : date of the letter`s making.
14078  
14079 \family sans
14080 Place
14081 \family default
14082  and 
14083 \family sans
14084 Date
14085 \family default
14086 , in the standard behavior, produce the place and the date in a right-aligned
14087  line below the addressee's field.
14088  If an empty 
14089 \family sans
14090 Date
14091 \family default
14092  type is used, neither place nor date appear, independent of the value of
14093  the 
14094 \family sans
14095 Place
14096 \family default
14097  type.
14098  If no 
14099 \family sans
14100 Date
14101 \family default
14102  type is used, the date of the letter `s production is used.
14103 \end_layout
14104
14105 \begin_layout Itemize
14106
14107 \family sans
14108 Backaddress
14109 \family default
14110 : sender`s back address, in the standard behavior appears above the addressee's
14111  field in a small sans serif font.
14112 \end_layout
14113
14114 \begin_layout Itemize
14115
14116 \family sans
14117 Specialmail
14118 \family default
14119 : special mail information, in the standard behavior appears underlined
14120  above the addressee's field below the back address.
14121 \end_layout
14122
14123 \begin_layout Itemize
14124
14125 \family sans
14126 Location
14127 \family default
14128 : additional information, in the standard behavior appears on right side
14129  below the addressee`s field.
14130 \end_layout
14131
14132 \begin_layout Itemize
14133
14134 \family sans
14135 Title
14136 \family default
14137 : the letter's title, in the standard behavior appears in a big, bold, sans
14138  serif font above the subject.
14139 \end_layout
14140
14141 \begin_layout Itemize
14142
14143 \family sans
14144 Subject
14145 \family default
14146 : the letter's subject, in the standard behavior appears in a bold font
14147  above the 
14148 \family sans
14149 Opening
14150 \family default
14151  paragraph.
14152 \end_layout
14153
14154 \begin_layout Standard
14155 The types 
14156 \family sans
14157 Yourref
14158 \family default
14159
14160 \family sans
14161 Yourmail
14162 \family default
14163
14164 \family sans
14165 Myref
14166 \family default
14167
14168 \family sans
14169 Customer
14170 \family default
14171 , and 
14172 \family sans
14173 Invoice
14174 \family default
14175  produce a business letter like line above the 
14176 \family sans
14177 Title
14178 \family default
14179  line containing the fields 
14180 \begin_inset Quotes eld
14181 \end_inset
14182
14183 Your ref.
14184 \begin_inset Quotes erd
14185 \end_inset
14186
14187
14188 \begin_inset Quotes eld
14189 \end_inset
14190
14191 Your letter of
14192 \begin_inset Quotes erd
14193 \end_inset
14194
14195
14196 \begin_inset Quotes eld
14197 \end_inset
14198
14199 Our ref.
14200 \begin_inset Quotes erd
14201 \end_inset
14202
14203
14204 \begin_inset Quotes eld
14205 \end_inset
14206
14207 Customer no.
14208 \begin_inset Quotes erd
14209 \end_inset
14210
14211
14212 \begin_inset Quotes eld
14213 \end_inset
14214
14215 Invoice no.
14216 \begin_inset Quotes erd
14217 \end_inset
14218
14219 , and 
14220 \begin_inset Quotes eld
14221 \end_inset
14222
14223 Date
14224 \begin_inset Quotes erd
14225 \end_inset
14226
14227 .
14228  For the date field, the value of the 
14229 \family sans
14230 Date
14231 \family default
14232  type is used.
14233  If one of these 
14234 \begin_inset Quotes eld
14235 \end_inset
14236
14237 business letter types
14238 \begin_inset Quotes erd
14239 \end_inset
14240
14241  is used, the value of the 
14242 \family sans
14243 Place
14244 \family default
14245  type however does not appear, but only the LaTeX variable 
14246 \family typewriter
14247
14248 \backslash
14249 fromplace
14250 \family default
14251  is set.
14252  The ordinary output of place and date in a right-aligned line below the
14253  addressee`s field is suppressed.
14254  The types are implemented as input types provided with a label and must
14255  be used ahead of the corresponding 
14256 \family sans
14257 Opening
14258 \family default
14259  type.
14260 \end_layout
14261
14262 \begin_layout Itemize
14263
14264 \family sans
14265 Yourref
14266 \family default
14267 : Your ref.
14268 \end_layout
14269
14270 \begin_layout Itemize
14271
14272 \family sans
14273 Yourmail
14274 \family default
14275 : Your letter of.
14276 \end_layout
14277
14278 \begin_layout Itemize
14279
14280 \family sans
14281 Myref
14282 \family default
14283 : Our ref.
14284 \end_layout
14285
14286 \begin_layout Itemize
14287
14288 \family sans
14289 Customer
14290 \family default
14291 : Customer no.
14292 \end_layout
14293
14294 \begin_layout Itemize
14295
14296 \family sans
14297 Invoice
14298 \family default
14299 : Invoice no.
14300 \end_layout
14301
14302 \begin_layout Subsection
14303 The new letter class: letter (koma-script v.2)
14304 \end_layout
14305
14306 \begin_layout Standard
14307 by 
14308 \noun on
14309 Jürgen Spitzmüller
14310 \end_layout
14311
14312 \begin_layout Standard
14313 \begin_inset VSpace medskip
14314 \end_inset
14315
14316
14317 \end_layout
14318
14319 \begin_layout Standard
14320 \noindent
14321 Koma-Script version 2.8 has introduced a new letter class 
14322 \family typewriter
14323 scrlttr2
14324 \family default
14325  which supersedes the now unsupported 
14326 \family typewriter
14327 scrlettr
14328 \family default
14329 .
14330  It has — on the LaTeX side — a completely new interface and is not compatible
14331  with the old class.
14332  Therefore, LyX supports both, though it is recommended you use the new
14333  class.
14334 \end_layout
14335
14336 \begin_layout Standard
14337 This class covers the same functionality as 
14338 \emph on
14339 letter (koma-script),
14340 \emph default
14341  and a few more.
14342  The basic items are 
14343 \family sans
14344 Address
14345 \family default
14346  (receiver's address, same as 
14347 \family sans
14348 Letter
14349 \family default
14350  in the old layout), 
14351 \family sans
14352 Opening
14353 \family default
14354 , and 
14355 \family sans
14356 Closing
14357 \family default
14358 .
14359  
14360 \family sans
14361 NextAddress
14362 \family default
14363  will start a new letter (i.
14364 \begin_inset space \thinspace{}
14365 \end_inset
14366
14367 g.
14368 \begin_inset space \space{}
14369 \end_inset
14370
14371 you can write several letters per document).
14372  New elements are sender's 
14373 \family sans
14374 E-Mail
14375 \family default
14376
14377 \family sans
14378 URL
14379 \family default
14380
14381 \family sans
14382 Fax
14383 \family default
14384
14385 \family sans
14386 Bank
14387 \family default
14388  and the possibility to use a 
14389 \family sans
14390 Logo
14391 \family default
14392  (via 
14393 \family sans
14394 Insert\SpecialChar \menuseparator
14395 Graphics
14396 \family default
14397 ) in the header.
14398 \end_layout
14399
14400 \begin_layout Standard
14401 The biggest improvement is, though, that the letter's layout is configurable
14402  to meet almost any needs.
14403  This can be done via the preamble or with a special style file (Letter
14404  Class Option, extension 
14405 \family typewriter
14406 *.lco
14407 \family default
14408 ), that will be read in as a class option.
14409 \begin_inset Foot
14410 status collapsed
14411
14412 \begin_layout Plain Layout
14413 The KOMA package comes with some default 
14414 \family typewriter
14415 *.lco
14416 \family default
14417  files.
14418  There is, for instance, a 
14419 \family typewriter
14420 DIN.lco
14421 \family default
14422  file that follows german typesetting rules, or a 
14423 \family typewriter
14424 KOMAold.lco
14425 \family default
14426  that provides the default layout of the old 
14427 \family typewriter
14428 scrlettr
14429 \family default
14430  class.
14431  The latter can be loaded with the class option 
14432 \family typewriter
14433 KOMAold
14434 \family default
14435 , inserted via the 
14436 \family sans
14437 \bar under
14438 L
14439 \bar default
14440 ayout\SpecialChar \menuseparator
14441
14442 \bar under
14443 D
14444 \bar default
14445 ocument\SpecialChar \menuseparator
14446 Extra Options
14447 \family default
14448  field.
14449 \end_layout
14450
14451 \end_inset
14452
14453  Have a look at the 
14454 \emph on
14455 koma-letter2
14456 \emph default
14457  template that is included in LyX for examples.
14458  A detailed description is to be found in the Koma-Script documentation
14459  (
14460 \emph on
14461 scrguide
14462 \emph default
14463 ).
14464 \end_layout
14465
14466 \begin_layout Subsection
14467 Problems
14468 \end_layout
14469
14470 \begin_layout Standard
14471 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14472  some problems.
14473 \end_layout
14474
14475 \begin_layout Itemize
14476 The chapter number of a 
14477 \family sans
14478 Chapter
14479 \family default
14480  type appears on a line of its own above the chapter heading instead of
14481  appearing in the same line ahead of it.
14482  The cause for that is the LyX internal behavior for the labeltype 
14483 \family sans
14484 Counter_Chapter
14485 \family default
14486  in the layout file.
14487 \end_layout
14488
14489 \begin_layout Itemize
14490 The headings of the types 
14491 \family sans
14492 Addchap
14493 \family default
14494  and 
14495 \family sans
14496 Addsec
14497 \family default
14498  are only put in the 
14499 \begin_inset Quotes eld
14500 \end_inset
14501
14502 true
14503 \begin_inset Quotes erd
14504 \end_inset
14505
14506  LaTeX table of contents, but not in the LyX table of contents (
14507 \family sans
14508 Document\SpecialChar \menuseparator
14509 Table
14510 \begin_inset space ~
14511 \end_inset
14512
14513 of
14514 \begin_inset space ~
14515 \end_inset
14516
14517 Contents
14518 \family default
14519 ).
14520 \end_layout
14521
14522 \begin_layout Itemize
14523 The paragraphs in a 
14524 \emph on
14525 letter
14526 \emph default
14527  document class appear in a skip separation mode, not indented.
14528  This is the standard behavior, no special LaTeX commands are needed for
14529  that.
14530  But in the 
14531 \family sans
14532 Document\SpecialChar \menuseparator
14533 Settings
14534 \family default
14535  dialog the corresponding radio button indicates 
14536 \family sans
14537 Indent
14538 \family default
14539 .
14540  A 
14541 \family sans
14542 Skip
14543 \family default
14544  value always has the effect that extra LaTeX commands are inserted in the
14545  document to produce the gap, which is not what is wanted in this case.
14546 \end_layout
14547
14548 \begin_layout Section
14549 Latex8 (IEEE Conference Papers)
14550 \end_layout
14551
14552 \begin_layout Standard
14553 by 
14554 \noun on
14555 Allan Rae
14556 \end_layout
14557
14558 \begin_layout Subsection
14559 Introduction
14560 \end_layout
14561
14562 \begin_layout Standard
14563 Since this class is specifically for writing submissions to IEEE sponsored
14564  conferences I strongly recommend that you get a copy of their Authors Kit.
14565  The 
14566 \family sans
14567 latex.sty
14568 \family default
14569  package and associated bibliography style file is included in the kit.
14570  The Authors Kit is usually sent out by email once your initial submission
14571  has been accepted.
14572  There is a lot of useful information in the Authors Kit explaining formatting
14573  restrictions and so on and I will assume you have read this since that
14574  means I don't have to repeat it all here.
14575 \end_layout
14576
14577 \begin_layout Subsection
14578 Getting Started
14579 \end_layout
14580
14581 \begin_layout Standard
14582 [AR\SpecialChar \@.
14583  more to come]
14584 \end_layout
14585
14586 \begin_layout Subsection
14587 Supported Environments
14588 \end_layout
14589
14590 \begin_layout Itemize
14591
14592 \family sans
14593 Standard
14594 \end_layout
14595
14596 \begin_layout Itemize
14597
14598 \family sans
14599 Title
14600 \end_layout
14601
14602 \begin_layout Itemize
14603
14604 \family sans
14605 Author
14606 \end_layout
14607
14608 \begin_layout Itemize
14609
14610 \family sans
14611 E-mail
14612 \end_layout
14613
14614 \begin_layout Itemize
14615
14616 \family sans
14617 Affiliation
14618 \end_layout
14619
14620 \begin_layout Itemize
14621
14622 \family sans
14623 Abstract
14624 \end_layout
14625
14626 \begin_layout Itemize
14627
14628 \family sans
14629 Section
14630 \end_layout
14631
14632 \begin_layout Itemize
14633
14634 \family sans
14635 SubSection
14636 \end_layout
14637
14638 \begin_layout Itemize
14639
14640 \family sans
14641 Caption
14642 \end_layout
14643
14644 \begin_layout Subsection
14645 Differences Between Screen and Paper
14646 \end_layout
14647
14648 \begin_layout Standard
14649 There are slight differences in appearance mainly with the presentation
14650  of section counters.
14651  On screen the trailing period of the section counter is missing but it
14652  will appear in the output so don't let this worry you.
14653 \end_layout
14654
14655 \begin_layout Section
14656 Memoir
14657 \end_layout
14658
14659 \begin_layout Standard
14660 By 
14661 \noun on
14662 Jürgen Spitzmüller
14663 \end_layout
14664
14665 \begin_layout Subsection
14666 Overview
14667 \end_layout
14668
14669 \begin_layout Standard
14670 Memoir is a very powerful and constantly evolving class.
14671  It has been designed with regard to fictional and non-fictional literature.
14672  Its aim is to let the user have maximum control over the typesetting of
14673  his document.
14674  Memoir is based on the standard book class, but it can also emulate the
14675  article class (see below).
14676 \end_layout
14677
14678 \begin_layout Standard
14679 Peter Wilson, the developer of Memoir, is known as the author of lots of
14680  useful packages in the LaTeX world.
14681  Most of them have been merged with Memoir.
14682  Therefore, it is much easier to layout the table of contents, appendices,
14683  chapter designs and such.
14684  LyX, though, does not support all of these goodies natively.
14685  Some of them might be added to forthcoming releases
14686 \begin_inset Foot
14687 status collapsed
14688
14689 \begin_layout Plain Layout
14690 You are invited to send suggestions to 
14691 \begin_inset Flex URL
14692 status collapsed
14693
14694 \begin_layout Plain Layout
14695
14696 lyx-devel@lists.lyx.org
14697 \end_layout
14698
14699 \end_inset
14700
14701 .
14702 \end_layout
14703
14704 \end_inset
14705
14706 , lots will probably never, due to the limitations of LyX's framework.
14707  Of course you can still use all features with the help of some native LaTeX
14708  commands (TeX code
14709 \begin_inset Foot
14710 status collapsed
14711
14712 \begin_layout Plain Layout
14713 Cf.
14714 \begin_inset ERT
14715 status collapsed
14716
14717 \begin_layout Plain Layout
14718
14719
14720 \backslash
14721  
14722 \end_layout
14723
14724 \end_inset
14725
14726 section
14727 \begin_inset space ~
14728 \end_inset
14729
14730
14731 \begin_inset CommandInset ref
14732 LatexCommand ref
14733 reference "sec:Inserting-TeX-Code"
14734
14735 \end_inset
14736
14737  for details.
14738 \end_layout
14739
14740 \end_inset
14741
14742 ).
14743  In this section, we can only list those features which are natively supported
14744  by LyX.
14745  For detailed descriptions (and for the rest of features) we recommend you
14746  have a look at the detailed manual of the Memoir class
14747 \begin_inset Foot
14748 status collapsed
14749
14750 \begin_layout Plain Layout
14751 Cf.
14752 \begin_inset ERT
14753 status collapsed
14754
14755 \begin_layout Plain Layout
14756
14757
14758 \backslash
14759  
14760 \end_layout
14761
14762 \end_inset
14763
14764
14765 \begin_inset Flex URL
14766 status collapsed
14767
14768 \begin_layout Plain Layout
14769
14770 CTAN:/macros/latex/memoir/memman.pdf
14771 \end_layout
14772
14773 \end_inset
14774
14775 .
14776 \end_layout
14777
14778 \end_inset
14779
14780 , which is not only a user guide for the class, but also both a comprehensive
14781  description on good typesetting and a superb example for good typesetting
14782  itself.
14783 \end_layout
14784
14785 \begin_layout Subsection
14786 Basic features and restrictions
14787 \end_layout
14788
14789 \begin_layout Standard
14790 Memoir supports basically all features of the standard book classes.
14791  There are, however, some differences, as follows:
14792 \end_layout
14793
14794 \begin_layout Description
14795 Font
14796 \begin_inset space ~
14797 \end_inset
14798
14799 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14800 \end_layout
14801
14802 \begin_layout Description
14803 Page
14804 \begin_inset space ~
14805 \end_inset
14806
14807 style: The fancy page style is not supported, due to a command clash between
14808  Memoir and the fancyhdr package (they both define a command with the same
14809  name, which confuses LaTeX).
14810  Instead, Memoir comes with a number of its own page styles (see 
14811 \family sans
14812 Layout\SpecialChar \menuseparator
14813 Document\SpecialChar \menuseparator
14814 Page
14815 \begin_inset space ~
14816 \end_inset
14817
14818 Style
14819 \family default
14820 ).
14821  If you want to use these for the chapter pages, you have to use the command
14822  
14823 \family typewriter
14824
14825 \backslash
14826 chapterstyle
14827 \family default
14828  in the main text or in preamble (e.
14829 \begin_inset space \thinspace{}
14830 \end_inset
14831
14832 g.
14833 \begin_inset space \space{}
14834 \end_inset
14835
14836
14837 \family typewriter
14838
14839 \backslash
14840 chapterstyle{companion}
14841 \family default
14842 ).
14843 \end_layout
14844
14845 \begin_layout Description
14846 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14847  optional argument in the standard classes.
14848  With this, you can specify an alternative version of the title for the
14849  table of contents and the headers (for instance, if the title is too long).
14850  In LyX, you can do this via 
14851 \family sans
14852 Insert\SpecialChar \menuseparator
14853 Short
14854 \begin_inset space ~
14855 \end_inset
14856
14857 Title
14858 \family default
14859  at the beginning of a chapter/section.
14860  Memoir features a second optional argument and thus separates the table
14861  of contents from the header.
14862  You can define three variants of a title with this: one for the main text,
14863  one for the table of contents, and one for the headers.
14864  Simply insert two optional arguments if you need this feature, the first
14865  one containing the short title for the Table of Contents, the second one
14866  containing an alternative short title for the headers.
14867 \end_layout
14868
14869 \begin_layout Description
14870 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14871  of contents, the list of figures and the list of table start a new page
14872  automatically.
14873  Memoir does not follow this route.
14874  You have to insert a page break yourself, if you want to have one.
14875 \end_layout
14876
14877 \begin_layout Description
14878 Titlepage: For some unknown reason, Memoir uses pagination on the title
14879  page (in the standard classes, title pages are 
14880 \begin_inset Quotes eld
14881 \end_inset
14882
14883 empty
14884 \begin_inset Quotes erd
14885 \end_inset
14886
14887 , i.
14888 \begin_inset space \thinspace{}
14889 \end_inset
14890
14891 g.
14892 \begin_inset space \space{}
14893 \end_inset
14894
14895 without pagina).
14896  If you want an empty title page, type 
14897 \family typewriter
14898
14899 \backslash
14900 aliaspagestyle{title}{empty}
14901 \family default
14902  in the preamble.
14903 \end_layout
14904
14905 \begin_layout Description
14906 Article: With the class option 
14907 \emph on
14908 article
14909 \emph default
14910  (to be inserted in 
14911 \family sans
14912 Layout\SpecialChar \menuseparator
14913 Document\SpecialChar \menuseparator
14914 Extra
14915 \begin_inset space ~
14916 \end_inset
14917
14918 Options
14919 \family default
14920 ), you can emulate article style.
14921  That is, counters (footnotes, figures, tables etc.) will not be reset on
14922  new chapters, chapters don't start a new page (but are—in contrary to 
14923 \begin_inset Quotes eld
14924 \end_inset
14925
14926 real
14927 \begin_inset Quotes erd
14928 \end_inset
14929
14930  article classes—still allowed), parts, though, use their own page, as in
14931  book.
14932 \end_layout
14933
14934 \begin_layout Description
14935 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14936  font commands, which have been used in the old LaTeX version 2.09 (e.
14937 \begin_inset space \thinspace{}
14938 \end_inset
14939
14940 g.
14941 \begin_inset space \space{}
14942 \end_inset
14943
14944
14945 \family typewriter
14946
14947 \backslash
14948 rm
14949 \family default
14950
14951 \family typewriter
14952
14953 \backslash
14954 it
14955 \family default
14956 ).
14957  It produces an error and stops LaTeX whenever such a command appears.
14958  The class option 
14959 \emph on
14960 oldfontcommands
14961 \emph default
14962  reallows the commands and spits out warnings instead (which does at least
14963  not stop LaTeX).
14964  Since a lot of packages and particularly BibTeX style files are still using
14965  those commands, we have decided to use this option by default.
14966 \end_layout
14967
14968 \begin_layout Subsection
14969 Extra features
14970 \end_layout
14971
14972 \begin_layout Standard
14973 We will only describe the features supported by LyX (which is not much currently
14974 ).
14975  Please consult the Memoir manual
14976 \begin_inset Foot
14977 status collapsed
14978
14979 \begin_layout Plain Layout
14980 Cf.
14981 \begin_inset ERT
14982 status collapsed
14983
14984 \begin_layout Plain Layout
14985
14986
14987 \backslash
14988  
14989 \end_layout
14990
14991 \end_inset
14992
14993
14994 \begin_inset Flex URL
14995 status collapsed
14996
14997 \begin_layout Plain Layout
14998
14999 CTAN:/macros/latex/memoir/memman.pdf
15000 \end_layout
15001
15002 \end_inset
15003
15004 .
15005 \end_layout
15006
15007 \end_inset
15008
15009  for details.
15010 \end_layout
15011
15012 \begin_layout Description
15013 Abstract: You may wonder why an abstract is an extra feature.
15014  Well, it is in book class.
15015  Usually books don't have abstracts.
15016  Memoir, however, has.
15017  You can use it wherever and how often you like.
15018 \end_layout
15019
15020 \begin_layout Description
15021 Chapterprecis: You may know this older typesetting style: The contents of
15022  a chapter are summarized below the title and also in the table of contents
15023  (e.
15024 \begin_inset space \thinspace{}
15025 \end_inset
15026
15027 g.
15028 \begin_inset space \space{}
15029 \end_inset
15030
15031
15032 \emph on
15033 Our hero arrives in Troia; he loses some friends; he finds others
15034 \emph default
15035 ).
15036  Chapterprecis does exactly this.
15037  It is therefore only sensible below a chapter.
15038 \end_layout
15039
15040 \begin_layout Description
15041 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15042  The epigraph environment provides an elegant way of typesetting such a
15043  motto.
15044  The motto itself (text) and its author (source) are divided by a short
15045  line.
15046  Unfortunately, we have to fool LyX a bit here again, since the environment
15047  needs two arguments (text and source).
15048  In this case, we have to use curly brackets (in TeX mode) between the two
15049  arguments: 
15050 \emph on
15051 <smart slogan>
15052 \emph default
15053  
15054 \family typewriter
15055 }{
15056 \family default
15057  
15058 \emph on
15059 <author of the slogan>.
15060 \end_layout
15061
15062 \begin_layout Description
15063 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15064  complex figurative poems).
15065  LyX can only support a few of them.
15066  One is poemtitle, which is a centered title for poems, which will also
15067  be added to the table of contents (verse is the standard environment for
15068  poems.
15069  Memoir has some enhanced versions of verse, but you need to use TeX code,
15070  because they have to be nested inside regular verse environments, which
15071  is not possible with LyX).
15072 \end_layout
15073
15074 \begin_layout Description
15075 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15076 \end_layout
15077
15078 \begin_layout Section
15079 Article (mwart), book (mwbk) and report (mwrep)
15080 \begin_inset Argument
15081 status collapsed
15082
15083 \begin_layout Plain Layout
15084 The 
15085 \family typewriter
15086 mw
15087 \family default
15088  Classes
15089 \end_layout
15090
15091 \end_inset
15092
15093
15094 \end_layout
15095
15096 \begin_layout Standard
15097 by 
15098 \noun on
15099 Tomasz Luczak
15100 \end_layout
15101
15102 \begin_layout Standard
15103 The LyX document classes 
15104 \emph on
15105 article (mwart)
15106 \emph default
15107
15108 \emph on
15109 report (mwrep)
15110 \emph default
15111  and 
15112 \emph on
15113 book
15114 \emph default
15115  
15116 \emph on
15117 (mwbk)
15118 \emph default
15119  correspond to the LaTeX document classes 
15120 \family typewriter
15121 mwart.cls
15122 \family default
15123
15124 \family typewriter
15125 mwrep.cls
15126 \family default
15127  and 
15128 \family typewriter
15129 mwbk.cls
15130 \family default
15131 , resp.
15132  They are replacements for the standard document classes 
15133 \family typewriter
15134 article.cls
15135 \family default
15136
15137 \family typewriter
15138 report.cls
15139 \family default
15140  and 
15141 \family typewriter
15142 book.cls
15143 \family default
15144 , resp., and fit better to Polish typography conventions in a number of points.
15145  
15146 \end_layout
15147
15148 \begin_layout Standard
15149 Basic differences:
15150 \end_layout
15151
15152 \begin_layout Itemize
15153 Unnumbered titles (with star, e.
15154 \begin_inset space \thinspace{}
15155 \end_inset
15156
15157 g.
15158 \begin_inset space \space{}
15159 \end_inset
15160
15161
15162 \family sans
15163 Section*
15164 \family default
15165 ) are added into table of contents,
15166 \end_layout
15167
15168 \begin_layout Itemize
15169 Additional page styles:
15170 \end_layout
15171
15172 \begin_deeper
15173 \begin_layout Description
15174 uheadings header with separated lines,
15175 \end_layout
15176
15177 \begin_layout Description
15178 myheadings custom header, contents headers via commands: 
15179 \family typewriter
15180
15181 \backslash
15182 markright
15183 \family default
15184  and 
15185 \family typewriter
15186
15187 \backslash
15188 markboth
15189 \family default
15190 ,
15191 \end_layout
15192
15193 \begin_layout Description
15194 myuheadings custom header with separated lines,
15195 \end_layout
15196
15197 \begin_layout Description
15198 outer page number is placed on outer side of page
15199 \end_layout
15200
15201 \end_deeper
15202 \begin_layout Itemize
15203 Options 
15204 \end_layout
15205
15206 \begin_deeper
15207 \begin_layout Description
15208 rmheadings serif titles — default,
15209 \end_layout
15210
15211 \begin_layout Description
15212 sfheadings sansserif titles,
15213 \end_layout
15214
15215 \begin_layout Description
15216 authortitle on title page first placed is author next title — default,
15217 \end_layout
15218
15219 \begin_layout Description
15220 titleauthor on title page first placed is title next author,
15221 \end_layout
15222
15223 \begin_layout Description
15224 withmarginpar reserve place on page for margins.
15225 \end_layout
15226
15227 \end_deeper
15228 \begin_layout Section
15229 Paper
15230 \end_layout
15231
15232 \begin_layout Standard
15233 The document class 
15234 \family sans
15235 paper
15236 \family default
15237  provides an alternative to the standard 
15238 \family sans
15239 article
15240 \family default
15241  class.
15242  It provides similar functionality, but you might prefer this layout with
15243  sans serif sections, headings, and more.
15244 \end_layout
15245
15246 \begin_layout Section
15247 RevTeX4
15248 \end_layout
15249
15250 \begin_layout Standard
15251 by 
15252 \noun on
15253 Amir Karger
15254 \end_layout
15255
15256 \begin_layout Standard
15257 \begin_inset VSpace bigskip
15258 \end_inset
15259
15260
15261 \end_layout
15262
15263 \begin_layout Standard
15264 \noindent
15265 The 
15266 \family sans
15267 Revtex
15268 \begin_inset space ~
15269 \end_inset
15270
15271 4
15272 \family default
15273  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15274 \begin_inset Formula $\beta$
15275 \end_inset
15276
15277  release of May, 1999) class.
15278 \end_layout
15279
15280 \begin_layout Standard
15281 LyX has a 
15282 \family sans
15283 Revtex
15284 \family default
15285  textclass, which works with RevTeX 3.1.
15286  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15287  That means that it doesn't interact very well with LyX, which requires
15288  LaTeX2e, although it has been kludged to work.
15289  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15290  LyX with the 
15291 \family sans
15292 RevTeX
15293 \begin_inset space ~
15294 \end_inset
15295
15296 4
15297 \family default
15298  textclass should also be pretty easy to use.
15299 \end_layout
15300
15301 \begin_layout Standard
15302 These documents are supposed to be used in 
15303 \emph on
15304 addition
15305 \emph default
15306  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15307  macros, and assume you'll know what to put in the preamble if necessary.
15308 \end_layout
15309
15310 \begin_layout Subsection
15311 Installation
15312 \end_layout
15313
15314 \begin_layout Standard
15315 All you need to do is install RevTeX 4, as described in the package's README
15316  file.
15317  The package can be found at The RevTeX 4 Web Site 
15318 \begin_inset Flex URL
15319 status collapsed
15320
15321 \begin_layout Plain Layout
15322
15323 http://publish.aps.org/revtex4/
15324 \end_layout
15325
15326 \end_inset
15327
15328 .
15329  Install it somewhere that LaTeX can see it.
15330  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15331  (i.
15332 \begin_inset space \thinspace{}
15333 \end_inset
15334
15335 g.
15336 \begin_inset space \space{}
15337 \end_inset
15338
15339 not the directory where you installed the class file.) Then, if you reconfigure
15340  LyX, it will find the class file and let you use the RevTeX4 textclass.
15341 \end_layout
15342
15343 \begin_layout Standard
15344 Probably the easiest way to get started is either to import a RevTeX 4 document
15345  using 
15346 \family typewriter
15347 tex2lyx
15348 \family default
15349 , or to use the 
15350 \family sans
15351 Revtex
15352 \begin_inset space ~
15353 \end_inset
15354
15355 4
15356 \family default
15357  template, found in the templates directory.
15358 \end_layout
15359
15360 \begin_layout Subsection
15361 Preamble Matter
15362 \end_layout
15363
15364 \begin_layout Standard
15365 Optional arguments to 
15366 \family typewriter
15367
15368 \backslash
15369 documentclass
15370 \family default
15371 , like 
15372 \begin_inset Quotes eld
15373 \end_inset
15374
15375 preprint
15376 \begin_inset Quotes erd
15377 \end_inset
15378
15379  and 
15380 \begin_inset Quotes eld
15381 \end_inset
15382
15383 aps
15384 \begin_inset Quotes erd
15385 \end_inset
15386
15387 , go in the 
15388 \family sans
15389 E
15390 \bar under
15391 x
15392 \bar default
15393 tra
15394 \begin_inset space ~
15395 \end_inset
15396
15397 Options
15398 \family default
15399  field in the 
15400 \family sans
15401 Document
15402 \begin_inset space ~
15403 \end_inset
15404
15405 Layout
15406 \family default
15407  dialog, as usual.
15408  Remember that in RevTeX, at least one optional argument is required! 
15409 \end_layout
15410
15411 \begin_layout Standard
15412 Other preamble matter, like 
15413 \family typewriter
15414
15415 \backslash
15416 draft
15417 \family default
15418  etc.
15419 \begin_inset space ~
15420 \end_inset
15421
15422 goes in the 
15423 \family sans
15424 LaTeX
15425 \begin_inset space ~
15426 \end_inset
15427
15428 Preamble
15429 \family default
15430  dialog, also as usual.
15431 \end_layout
15432
15433 \begin_layout Subsection
15434 Layouts
15435 \end_layout
15436
15437 \begin_layout Standard
15438 The layouts basically correspond to the commands in RevTeX4.0.
15439  For example, the Email layout corresponds to 
15440 \family typewriter
15441
15442 \backslash
15443 email{}
15444 \family default
15445 .
15446  Note that (at least as of RevTeX 4.0 Beta), the 
15447 \family sans
15448 Address
15449 \family default
15450  and 
15451 \family sans
15452 Affiliation
15453 \family default
15454  layouts are exactly equivalent, so you shouldn't need to use both.
15455 \begin_inset Foot
15456 status collapsed
15457
15458 \begin_layout Plain Layout
15459 In case you're curious, both were included so that 
15460 \family typewriter
15461 tex2lyx
15462 \family default
15463  would be able to translate both 
15464 \family typewriter
15465
15466 \backslash
15467 address
15468 \family default
15469  and 
15470 \family typewriter
15471
15472 \backslash
15473 affiliation
15474 \family default
15475 .
15476 \end_layout
15477
15478 \end_inset
15479
15480
15481 \end_layout
15482
15483 \begin_layout Subsection
15484 Important Notes
15485 \end_layout
15486
15487 \begin_layout Standard
15488 There are a couple of important unique aspects of RevTeX 4 which might cause
15489  bugs that will be even more confusing in LyX.
15490 \end_layout
15491
15492 \begin_layout Standard
15493 In RevTeX, the 
15494 \family typewriter
15495
15496 \backslash
15497 thanks
15498 \family default
15499  command goes 
15500 \emph on
15501 outside
15502 \emph default
15503  the 
15504 \family typewriter
15505
15506 \backslash
15507 author
15508 \family default
15509  command.
15510  The LyX equivalent is that there is a separate Thanks layout.
15511  Do 
15512 \emph on
15513 not
15514 \emph default
15515  write footnotes in the 
15516 \family sans
15517 Author
15518 \family default
15519  layout, or weird things may happen.
15520  See the RevTeX 4 documentation for more details.
15521 \end_layout
15522
15523 \begin_layout Standard
15524 Also, the 
15525 \family sans
15526 Author
15527 \begin_inset space ~
15528 \end_inset
15529
15530 Email
15531 \family default
15532
15533 \family sans
15534 Author
15535 \begin_inset space ~
15536 \end_inset
15537
15538 URL
15539 \family default
15540 , and 
15541 \family sans
15542 Thanks
15543 \family default
15544  layouts must be placed 
15545 \emph on
15546 in between
15547 \emph default
15548  the 
15549 \family sans
15550 Author
15551 \family default
15552  layout and the corresponding 
15553 \family sans
15554 Address
15555 \family default
15556  (or equivalent 
15557 \family sans
15558 Affiliation
15559 \family default
15560 ) layout.
15561  If you put the 
15562 \family sans
15563 Thanks
15564 \family default
15565  after the 
15566 \family sans
15567 Address
15568 \family default
15569 , the LaTeX won't compile.
15570 \end_layout
15571
15572 \begin_layout Subsection
15573 Drawbacks
15574 \end_layout
15575
15576 \begin_layout Standard
15577 The main problem with this layout is that you can't use the optional arguments
15578  to layouts like Email and Title.
15579  (The problem is not unique to this layout; you can't use optional arguments
15580  to the Section layouts either.) This means that after you export that file
15581  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15582  need to edit the LaTeX file with a text editor to add the optional arguments
15583  to set, e.
15584 \begin_inset space \thinspace{}
15585 \end_inset
15586
15587 g.
15588 \begin_inset space \space{}
15589 \end_inset
15590
15591 the running title for the page headers.
15592  Lacking these layouts makes the 
15593 \family typewriter
15594
15595 \backslash
15596 altaffiliation
15597 \family default
15598  (and the equivalent 
15599 \family typewriter
15600
15601 \backslash
15602 altaddress
15603 \family default
15604 ) useless, so the corresponding layouts don't exist, and will have to be
15605  added by hand.
15606 \begin_inset Foot
15607 status collapsed
15608
15609 \begin_layout Plain Layout
15610
15611 \emph on
15612 Note from JMarc:
15613 \emph default
15614  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15615  has not been updated yet to take advantage of it.
15616 \end_layout
15617
15618 \end_inset
15619
15620  
15621 \end_layout
15622
15623 \begin_layout Section
15624 Springer Journals (
15625 \family sans
15626 svjour
15627 \family default
15628 )
15629 \end_layout
15630
15631 \begin_layout Standard
15632 by 
15633 \noun on
15634 Martin Vermeer
15635 \end_layout
15636
15637 \begin_layout Subsection
15638 Description
15639 \end_layout
15640
15641 \begin_layout Standard
15642 These are the layout files for some of the journal formats used by Springer
15643  Verlag and listed on 
15644 \begin_inset Flex URL
15645 status collapsed
15646
15647 \begin_layout Plain Layout
15648
15649 http://www.springer.de/author/tex/help-journals.html
15650 \end_layout
15651
15652 \end_inset
15653
15654 , where you should also go to fetch the class files (yes, these are LaTeX2e
15655  now!).
15656  It is a modular system: the things common to all journals are implemented
15657  in 
15658 \family typewriter
15659 svjour.inc
15660 \family default
15661 , which journal-specific layout files (such as, e.
15662 \begin_inset space \thinspace{}
15663 \end_inset
15664
15665 g.
15666 \begin_inset space \space{}
15667 \end_inset
15668
15669
15670 \family typewriter
15671 svjog.layout
15672 \family default
15673  for Journal of Geodesy) can include.
15674 \end_layout
15675
15676 \begin_layout Standard
15677 This means that implementing support for any other Springer journal on this
15678  list is as simple as writing your own 
15679 \family typewriter
15680 sv
15681 \family default
15682 <myjournal>
15683 \family typewriter
15684 .layout
15685 \family default
15686  file following the outline given in 
15687 \family typewriter
15688 svjog.layout
15689 \family default
15690 .
15691  
15692 \end_layout
15693
15694 \begin_layout Standard
15695 It is reasonably well tested only for the Journal of Geodesy.
15696  
15697 \family typewriter
15698 svjour
15699 \family default
15700  and 
15701 \family typewriter
15702 svjog
15703 \family default
15704  come with the standard LyX distribution.
15705  Install the relevant class file (downloaded from Springer) in a proper
15706  directory, reconfigure LaTeX (in the teTeX case by running 
15707 \family typewriter
15708 texhash
15709 \family default
15710 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15711  and it should work.
15712 \end_layout
15713
15714 \begin_layout Subsection
15715 New styles
15716 \end_layout
15717
15718 \begin_layout Standard
15719 A large number of theorem-like styles — 
15720 \family sans
15721 Claim, Conjecture,
15722 \family default
15723  
15724 \family sans
15725 \SpecialChar \ldots{}
15726 Theorem
15727 \family default
15728 .
15729 \end_layout
15730
15731 \begin_layout Standard
15732
15733 \family sans
15734 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15735  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15736 \family default
15737 .
15738  See the Springer class file documentation for details.
15739 \end_layout
15740
15741 \begin_layout Subsection
15742 Supported journals
15743 \end_layout
15744
15745 \begin_layout Itemize
15746
15747 \emph on
15748 Journal of Geodesy
15749 \emph default
15750
15751 \family typewriter
15752 svjog.layout
15753 \family default
15754  — Martin Vermeer
15755 \end_layout
15756
15757 \begin_layout Itemize
15758
15759 \emph on
15760 Probability Theory and Related Fields
15761 \emph default
15762
15763 \family typewriter
15764 svprobth.layout
15765 \family default
15766  — Jean-Marc Lasgouttes
15767 \end_layout
15768
15769 \begin_layout Standard
15770 Add your own, it isn't so hard!
15771 \end_layout
15772
15773 \begin_layout Subsection
15774 Credits
15775 \end_layout
15776
15777 \begin_layout Standard
15778 These files are partly based on the older 
15779 \family typewriter
15780 ejour2.layout
15781 \family default
15782 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15783  file from Springer.
15784  All this, and the 
15785 \family typewriter
15786 ejour2
15787 \family default
15788  layout, are now defunct.
15789  Jean-Marc Lasgouttes helped out big in making me find my way around the
15790  LyX layout file mechanism.
15791 \end_layout
15792
15793 \begin_layout Subsection
15794 Bugs
15795 \end_layout
15796
15797 \begin_layout Standard
15798 Probably.
15799  But probably less than in the old hacked-LaTeX 
15800 \family typewriter
15801 ejour2
15802 \family default
15803 .
15804 \end_layout
15805
15806 \begin_layout Standard
15807 Limitations e.
15808 \begin_inset space \thinspace{}
15809 \end_inset
15810
15811 g.: does not display the number for theorem-like layouts, just #.
15812 \end_layout
15813
15814 \begin_layout Section
15815 Slides [aka 
15816 \noun on
15817 SliTeX
15818 \noun default
15819 ]
15820 \begin_inset CommandInset label
15821 LatexCommand label
15822 name "sec:slitex"
15823
15824 \end_inset
15825
15826
15827 \end_layout
15828
15829 \begin_layout Standard
15830 by 
15831 \noun on
15832 John Weiss
15833 \noun default
15834  
15835 \end_layout
15836
15837 \begin_layout Subsection
15838 Introduction
15839 \end_layout
15840
15841 \begin_layout Standard
15842 This section describes how to use LyX to make slides for overhead projectors.
15843  There are two document classes that can do this: the default slides class
15844  and the 
15845 \family sans
15846 FoilTeX
15847 \family default
15848  slides class.
15849  This section documents the former.
15850 \end_layout
15851
15852 \begin_layout Standard
15853 I'm going to say this again, nice and clear, so that there's no misunderstanding
15854 :
15855 \end_layout
15856
15857 \begin_layout Standard
15858 \begin_inset VSpace bigskip
15859 \end_inset
15860
15861
15862 \end_layout
15863
15864 \begin_layout Standard
15865 \align center
15866
15867 \size large
15868 This section documents the class 
15869 \begin_inset Quotes eld
15870 \end_inset
15871
15872
15873 \family sans
15874 slides (default)
15875 \family default
15876
15877 \begin_inset Quotes erd
15878 \end_inset
15879
15880  
15881 \emph on
15882 only.
15883 \end_layout
15884
15885 \begin_layout Standard
15886 \begin_inset VSpace bigskip
15887 \end_inset
15888
15889
15890 \end_layout
15891
15892 \begin_layout Standard
15893 If you're looking for the documentation for 
15894 \begin_inset Quotes eld
15895 \end_inset
15896
15897
15898 \family sans
15899 slides (FoilTeX)
15900 \family default
15901
15902 \begin_inset Quotes erd
15903 \end_inset
15904
15905 , check out section
15906 \begin_inset space ~
15907 \end_inset
15908
15909
15910 \begin_inset CommandInset ref
15911 LatexCommand ref
15912 reference "sec:foiltex"
15913
15914 \end_inset
15915
15916 .
15917  The 
15918 \family sans
15919 foils
15920 \family default
15921  class [
15922 \begin_inset Quotes eld
15923 \end_inset
15924
15925
15926 \family sans
15927 slides (FoilTeX)
15928 \family default
15929
15930 \begin_inset Quotes erd
15931 \end_inset
15932
15933 ] is actually somewhat better than the default 
15934 \family sans
15935 slides
15936 \family default
15937  class,
15938 \begin_inset Foot
15939 status collapsed
15940
15941 \begin_layout Plain Layout
15942 \SpecialChar \ldots{}
15943 or so I've been told repeatedly by its advocates.
15944  Having never used it, I have no idea if this claim is true or not.
15945 \end_layout
15946
15947 \end_inset
15948
15949  which this section documents.
15950 \end_layout
15951
15952 \begin_layout Standard
15953 This class is the LaTeX2e improvement of the old 
15954 \noun on
15955 SliTeX
15956 \noun default
15957  package.
15958  Every LaTeX2e distribution includes this class [which I'll just refer to
15959  as 
15960 \begin_inset Quotes eld
15961 \end_inset
15962
15963
15964 \family sans
15965 slides
15966 \family default
15967
15968 \begin_inset Quotes erd
15969 \end_inset
15970
15971  from now on], so you're bound to have it.
15972  As I noted earlier, there are other classes, such as 
15973 \family sans
15974 foils
15975 \family default
15976 , which also produce slides for overhead projectors and do a better job
15977  at it.
15978  However, there are some things which 
15979 \family sans
15980 slides
15981 \family default
15982  can do which the others can't, such as generate overlays.
15983  Read on to learn more!
15984 \end_layout
15985
15986 \begin_layout Subsection
15987 Getting Started
15988 \begin_inset CommandInset label
15989 LatexCommand label
15990 name "sec:slidesetup"
15991
15992 \end_inset
15993
15994
15995 \end_layout
15996
15997 \begin_layout Standard
15998 Obviously, to use this document class, you need to select 
15999 \begin_inset Quotes eld
16000 \end_inset
16001
16002
16003 \family sans
16004 slides (default)
16005 \family default
16006
16007 \begin_inset Quotes erd
16008 \end_inset
16009
16010  from the class list in the 
16011 \family sans
16012 Document\SpecialChar \menuseparator
16013 Settings
16014 \family default
16015  dialog.
16016  There are some other special things you should know about this class:
16017 \end_layout
16018
16019 \begin_layout Itemize
16020 Don't bother changing the options 
16021 \family sans
16022 Sides and Columns
16023 \family default
16024 .
16025  They're not supported by the 
16026 \family sans
16027 slides
16028 \family default
16029  class, anyways.
16030 \end_layout
16031
16032 \begin_layout Itemize
16033 The option 
16034 \family sans
16035 Page
16036 \begin_inset space ~
16037 \end_inset
16038
16039 style
16040 \family default
16041  behaves a bit differently for this class.
16042  The possible choices and what they do are as follows:
16043 \end_layout
16044
16045 \begin_deeper
16046 \begin_layout Description
16047
16048 \family sans
16049 plain
16050 \family default
16051  The final output contains page numbers in the lower right corner.
16052 \end_layout
16053
16054 \begin_layout Description
16055
16056 \family sans
16057 headings
16058 \family default
16059  Like 
16060 \family sans
16061 plain
16062 \family default
16063 , but also prints out any time markers you've put in.
16064  This is the default.
16065 \end_layout
16066
16067 \begin_layout Description
16068
16069 \family sans
16070 empty
16071 \family default
16072  The final output contains no page numbers, time markers, or alignment markers.
16073 \end_layout
16074
16075 \end_deeper
16076 \begin_layout Itemize
16077 The 
16078 \family sans
16079 slides
16080 \family default
16081  class has an extra option: 
16082 \family typewriter
16083 clock
16084 \family default
16085 .
16086  To use it, put 
16087 \begin_inset Quotes eld
16088 \end_inset
16089
16090
16091 \family typewriter
16092 clock
16093 \family default
16094
16095 \begin_inset Quotes erd
16096 \end_inset
16097
16098  in the extra class options.
16099 \end_layout
16100
16101 \begin_deeper
16102 \begin_layout Standard
16103 Using this options allows you to add time markers to 
16104 \family sans
16105 Note
16106 \family default
16107 s.
16108  See section
16109 \begin_inset space ~
16110 \end_inset
16111
16112
16113 \begin_inset CommandInset ref
16114 LatexCommand ref
16115 reference "sec:slideNote"
16116
16117 \end_inset
16118
16119  for more details.
16120 \end_layout
16121
16122 \end_deeper
16123 \begin_layout Standard
16124 You can also use the template file 
16125 \begin_inset Quotes eld
16126 \end_inset
16127
16128
16129 \family typewriter
16130 slides.lyx
16131 \family default
16132
16133 \begin_inset Quotes erd
16134 \end_inset
16135
16136  to automatically set up a document to use the 
16137 \family sans
16138 slides
16139 \family default
16140  class [using 
16141 \family sans
16142 File\SpecialChar \menuseparator
16143 New
16144 \begin_inset space ~
16145 \end_inset
16146
16147 from
16148 \begin_inset space ~
16149 \end_inset
16150
16151 Template
16152 \family default
16153  to open your new document].
16154  The template file also contains some examples of the special paragraph
16155  environments used by this class.
16156  I'll describe those next.
16157 \end_layout
16158
16159 \begin_layout Subsection
16160 Paragraph Environments
16161 \end_layout
16162
16163 \begin_layout Subsubsection
16164 Supported Environments
16165 \end_layout
16166
16167 \begin_layout Standard
16168 The first thing you'll notice when you start up a new 
16169 \family sans
16170 slides
16171 \family default
16172  document is the font size and type: it's the equivalent of the size 
16173 \begin_inset Quotes eld
16174 \end_inset
16175
16176
16177 \family sans
16178 Largest
16179 \family default
16180
16181 \begin_inset Quotes erd
16182 \end_inset
16183
16184  in the 
16185 \family sans
16186 Sans
16187 \begin_inset space ~
16188 \end_inset
16189
16190 Serif
16191 \family default
16192  font.
16193  This is also what's used in the output.
16194  Think of this as a 
16195 \begin_inset Quotes eld
16196 \end_inset
16197
16198 visual cue
16199 \begin_inset Quotes erd
16200 \end_inset
16201
16202  to remind you that this is a slide.
16203  Your final slides will use a larger font; ergo, you'll have less space.
16204  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16205 \end_layout
16206
16207 \begin_layout Standard
16208 The next thing that becomes obvious is the changes to the paragraph environment
16209  pull-down box [at the far-left end of the toolbar].
16210  Most of the paragraph environments you're used to seeing are missing.
16211  There are also five new ones.
16212  That's because the 
16213 \family sans
16214 slides
16215 \family default
16216  class itself only supports certain paragraph environments:
16217 \end_layout
16218
16219 \begin_layout Itemize
16220
16221 \family sans
16222 Standard
16223 \end_layout
16224
16225 \begin_layout Itemize
16226
16227 \family sans
16228 Itemize
16229 \end_layout
16230
16231 \begin_layout Itemize
16232
16233 \family sans
16234 Enumerate
16235 \end_layout
16236
16237 \begin_layout Itemize
16238
16239 \family sans
16240 Description
16241 \end_layout
16242
16243 \begin_layout Itemize
16244
16245 \family sans
16246 List
16247 \end_layout
16248
16249 \begin_layout Itemize
16250
16251 \family sans
16252 Quotation
16253 \end_layout
16254
16255 \begin_layout Itemize
16256
16257 \family sans
16258 Quote
16259 \end_layout
16260
16261 \begin_layout Itemize
16262
16263 \family sans
16264 Verse
16265 \end_layout
16266
16267 \begin_layout Itemize
16268
16269 \family sans
16270 Caption
16271 \end_layout
16272
16273 \begin_layout Itemize
16274
16275 \family sans
16276 LyX-Code
16277 \end_layout
16278
16279 \begin_layout Itemize
16280
16281 \family sans
16282 Comment
16283 \end_layout
16284
16285 \begin_layout Standard
16286 All of the other standard environments, including the section-heading environmen
16287 ts, aren't used in the 
16288 \family sans
16289 slides
16290 \family default
16291  class.
16292 \end_layout
16293
16294 \begin_layout Standard
16295 On the other hand, you'll notice the following new environments:
16296 \end_layout
16297
16298 \begin_layout Itemize
16299
16300 \family sans
16301 Slide
16302 \end_layout
16303
16304 \begin_layout Itemize
16305
16306 \family sans
16307 Overlay
16308 \end_layout
16309
16310 \begin_layout Itemize
16311
16312 \family sans
16313 Note
16314 \end_layout
16315
16316 \begin_layout Itemize
16317
16318 \family sans
16319 InvisibleText
16320 \end_layout
16321
16322 \begin_layout Itemize
16323
16324 \family sans
16325 VisibleText
16326 \end_layout
16327
16328 \begin_layout Standard
16329 These five are kind of quirky, due to a 
16330 \begin_inset Quotes eld
16331 \end_inset
16332
16333 feature
16334 \begin_inset Quotes erd
16335 \end_inset
16336
16337  in LyX.
16338  You see, LyX doesn't permit you to nest any other paragraph environment
16339  into an empty environment.
16340  Now, that's fine and dandy, but it means that you wouldn't be able to start
16341  a slide with anything except plain text.
16342  To deal with this, I've performed a little 
16343 \begin_inset Quotes eld
16344 \end_inset
16345
16346 LaTeX magic.
16347 \begin_inset Quotes erd
16348 \end_inset
16349
16350  
16351 \end_layout
16352
16353 \begin_layout Subsubsection
16354 Quirks of the New Environments
16355 \begin_inset CommandInset label
16356 LatexCommand label
16357 name "sec:slideQuirk"
16358
16359 \end_inset
16360
16361
16362 \end_layout
16363
16364 \begin_layout Standard
16365 All five of the new paragraph environments are somewhat quirky due to inherent
16366  limitiations in the current version of LyX.
16367  As I just mentioned, LyX forbids environments that begin with another environme
16368 nt.
16369  To get around this, the 
16370 \family sans
16371 Slide
16372 \family default
16373  environment isn't a paragraph environment as described in the 
16374 \emph on
16375 User's Guide
16376 \emph default
16377 .
16378  
16379 \end_layout
16380
16381 \begin_layout Standard
16382 You should consider 
16383 \family sans
16384 Slide
16385 \family default
16386
16387 \family sans
16388 Overlay
16389 \family default
16390 , and 
16391 \family sans
16392 Note
16393 \family default
16394  to be 
16395 \begin_inset Quotes eld
16396 \end_inset
16397
16398 pseudo-environments.
16399 \begin_inset Quotes erd
16400 \end_inset
16401
16402  They look like a section heading or a 
16403 \begin_inset Quotes eld
16404 \end_inset
16405
16406
16407 \family sans
16408 Caption
16409 \family default
16410 ,
16411 \begin_inset Quotes erd
16412 \end_inset
16413
16414  but really begin a [and, if necessary, end the previous] paragraph environment.
16415  Likewise, treat 
16416 \family sans
16417 InvisibleText
16418 \family default
16419  and 
16420 \family sans
16421 VisibleText
16422 \family default
16423  as 
16424 \begin_inset Quotes eld
16425 \end_inset
16426
16427 pseudo-commands.
16428 \begin_inset Quotes erd
16429 \end_inset
16430
16431  These two perform some action.
16432 \end_layout
16433
16434 \begin_layout Standard
16435 A common feature of all five environments, 
16436 \family sans
16437 Slide
16438 \family default
16439
16440 \family sans
16441 Overlay
16442 \family default
16443
16444 \family sans
16445 Note
16446 \family default
16447
16448 \family sans
16449 InvisibleText
16450 \family default
16451  and 
16452 \family sans
16453 VisibleText
16454 \family default
16455 , is a rather long-ish label.
16456  The text following this label — ordinarily the contents of the paragraph
16457  environment — is utterly irrelevant for 
16458 \family sans
16459 Slide
16460 \family default
16461
16462 \family sans
16463 Overlay
16464 \family default
16465
16466 \family sans
16467 Note
16468 \family default
16469
16470 \family sans
16471 InvisibleText
16472 \family default
16473  and 
16474 \family sans
16475 VisibleText
16476 \family default
16477 .
16478  LyX completely ignores it.
16479  In fact, you can leave these five environments completely empty.
16480  
16481 \end_layout
16482
16483 \begin_layout Standard
16484 While you don't 
16485 \emph on
16486 have
16487 \emph default
16488  to put any text after the rather long-ish label, you might want to.
16489  This could be a short description of the contents of the 
16490 \family sans
16491 Slide
16492 \family default
16493 , for example.
16494  In that case, enter your descriptive comment and hit 
16495 \family sans
16496 Return
16497 \family default
16498  as you normally would.
16499 \end_layout
16500
16501 \begin_layout Standard
16502 If, on the other hand, you don't want to enter any descriptive text, you'll
16503  hit another LyX quirk.
16504  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16505  environment until you put something in the old one.
16506  So, do this:
16507 \end_layout
16508
16509 \begin_layout Itemize
16510 Start entering the text that will 
16511 \emph on
16512 follow
16513 \emph default
16514  the new 
16515 \family sans
16516 Slide
16517 \family default
16518
16519 \family sans
16520 Overlay
16521 \family default
16522
16523 \family sans
16524 Note
16525 \family default
16526
16527 \family sans
16528 InvisibleText
16529 \family default
16530  or 
16531 \family sans
16532 VisibleText
16533 \family default
16534 .
16535  
16536 \end_layout
16537
16538 \begin_layout Itemize
16539 Now move to the beginning of that paragraph.
16540  
16541 \end_layout
16542
16543 \begin_layout Itemize
16544 Next, hit 
16545 \family sans
16546 Return
16547 \family default
16548 .
16549  
16550 \end_layout
16551
16552 \begin_layout Itemize
16553 Finally, change this new, empty paragraph to a 
16554 \family sans
16555 Slide
16556 \family default
16557
16558 \family sans
16559 Overlay
16560 \family default
16561
16562 \family sans
16563 Note
16564 \family default
16565
16566 \family sans
16567 InvisibleText
16568 \family default
16569  or 
16570 \family sans
16571 VisibleText
16572 \family default
16573 .
16574  
16575 \end_layout
16576
16577 \begin_layout Standard
16578 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16579
16580 \end_layout
16581
16582 \begin_layout Subsection
16583 Making a Presentation with 
16584 \family sans
16585 Slide
16586 \family default
16587
16588 \family sans
16589 Overlay
16590 \family default
16591  and 
16592 \family sans
16593 Note
16594 \end_layout
16595
16596 \begin_layout Subsubsection
16597 Using the 
16598 \family sans
16599 Slide
16600 \family default
16601  Environment
16602 \end_layout
16603
16604 \begin_layout Standard
16605 If you're expecting this section to teach you how to actually make a presentatio
16606 n, you'll be sorely disappointed.
16607  Naturally, I'll describe all of the ways the 
16608 \family sans
16609 slides
16610 \family default
16611  class can assist you in preparing the materials for a presentation.
16612  Filling in the contents, however, is up to you.
16613  [Then again, that 
16614 \emph on
16615 is
16616 \emph default
16617  the LyX philosophy.]
16618 \end_layout
16619
16620 \begin_layout Standard
16621 Choosing the 
16622 \family sans
16623 Slide
16624 \family default
16625  environment [in the manner described in section
16626 \begin_inset space ~
16627 \end_inset
16628
16629
16630 \begin_inset CommandInset ref
16631 LatexCommand ref
16632 reference "sec:slideQuirk"
16633
16634 \end_inset
16635
16636 ] tells LyX to begin a new slide [duh].
16637  The label for this environment/
16638 \begin_inset Quotes erd
16639 \end_inset
16640
16641 pseudo-command
16642 \begin_inset Quotes erd
16643 \end_inset
16644
16645  is an 
16646 \begin_inset Quotes eld
16647 \end_inset
16648
16649 ASCII line,
16650 \begin_inset Quotes erd
16651 \end_inset
16652
16653  in cool blue, followed by the label, 
16654 \begin_inset Quotes eld
16655 \end_inset
16656
16657 NewSlide:
16658 \begin_inset Quotes erd
16659 \end_inset
16660
16661 .
16662  Any text or paragraph environments that follow this one go on the new slide.
16663  It's that simple.
16664 \end_layout
16665
16666 \begin_layout Standard
16667 Slides are probably the only time you'll need to forcibly end pages in LyX
16668  (this can be specified in the 
16669 \family sans
16670 Paragraph Layout
16671 \family default
16672  dialog).
16673  In fact, you'll want to, once you finish entering the contents of one slide.
16674  If you've entered more text than can physically fit on a slide, the extra
16675  overflows onto a new slide.
16676  I don't recommend doing this, however, since the overflow slide won't have
16677  any page number on it.
16678  Furthermore, it may interfere with any 
16679 \family sans
16680 Overlay
16681 \family default
16682  you've made to accompany the oversized 
16683 \family sans
16684 Slide
16685 \family default
16686 .
16687 \end_layout
16688
16689 \begin_layout Standard
16690 The 
16691 \family sans
16692 Overlay
16693 \family default
16694  and 
16695 \family sans
16696 Note
16697 \family default
16698  environments work the same way as the 
16699 \family sans
16700 Slide
16701 \family default
16702  environment.
16703  They both create an 
16704 \begin_inset Quotes eld
16705 \end_inset
16706
16707 ASCII line
16708 \begin_inset Quotes erd
16709 \end_inset
16710
16711  followed by a label [
16712 \begin_inset Quotes eld
16713 \end_inset
16714
16715 NewOverlay:
16716 \begin_inset Quotes erd
16717 \end_inset
16718
16719  and 
16720 \begin_inset Quotes eld
16721 \end_inset
16722
16723 NewNote:
16724 \begin_inset Quotes erd
16725 \end_inset
16726
16727 , respectively].
16728  The color is a stunning magenta instead of blue, and the 
16729 \begin_inset Quotes eld
16730 \end_inset
16731
16732 ASCII line
16733 \begin_inset Quotes erd
16734 \end_inset
16735
16736  will look different, in style and in length.
16737  The label fonts of all three also differ from one another.
16738 \end_layout
16739
16740 \begin_layout Standard
16741 As with a 
16742 \family sans
16743 Slide
16744 \family default
16745 , if the contents of a 
16746 \family sans
16747 Note
16748 \family default
16749  or 
16750 \family sans
16751 Overlay
16752 \family default
16753  exceed the physical size of a slide or sheet of paper, the extra will overflow
16754  onto a new sheet.
16755  Again, you should avoid this.
16756  It defeats the whole purpose of 
16757 \family sans
16758 Note
16759 \family default
16760 s and 
16761 \family sans
16762 Overlay
16763 \family default
16764 s.
16765 \end_layout
16766
16767 \begin_layout Subsubsection
16768 Using 
16769 \family sans
16770 Overlay
16771 \family default
16772  with 
16773 \family sans
16774 Slide
16775 \end_layout
16776
16777 \begin_layout Standard
16778 The idea behind an 
16779 \family sans
16780 Overlay
16781 \family default
16782  is a slide that sits atop another slide.
16783  Perhaps you wish to discuss a figure on the main 
16784 \family sans
16785 Slide
16786 \family default
16787  before displaying the text associated with it.
16788  One way to accomplish this is tape a flap of dark paper over the part of
16789  the 
16790 \family sans
16791 Slide
16792 \family default
16793  you want to display later.
16794  This method fails, however, if you wish to overlap one graph with another,
16795  for example.
16796  You would then have to fumble while speaking to align the two separate,
16797  overlapping 
16798 \family sans
16799 Slide
16800 \family default
16801 s to align the two graphs.
16802  The use of an 
16803 \family sans
16804 Overlay
16805 \family default
16806  environment in both cases makes life much easier.
16807 \end_layout
16808
16809 \begin_layout Standard
16810 Each 
16811 \family sans
16812 Overlay
16813 \family default
16814  receives the page number of its 
16815 \begin_inset Quotes eld
16816 \end_inset
16817
16818 parent
16819 \begin_inset Quotes erd
16820 \end_inset
16821
16822  
16823 \family sans
16824 Slide
16825 \family default
16826 , appended by 
16827 \begin_inset Quotes eld
16828 \end_inset
16829
16830
16831 \family typewriter
16832 -a
16833 \family default
16834
16835 \begin_inset Quotes erd
16836 \end_inset
16837
16838 .
16839 \begin_inset Foot
16840 status collapsed
16841
16842 \begin_layout Plain Layout
16843 Presumably, mutliple 
16844 \family sans
16845 Overlay
16846 \family default
16847 s would have 
16848 \begin_inset Quotes eld
16849 \end_inset
16850
16851
16852 \family typewriter
16853 -a
16854 \family default
16855
16856 \begin_inset Quotes erd
16857 \end_inset
16858
16859
16860 \begin_inset Quotes eld
16861 \end_inset
16862
16863
16864 \family typewriter
16865 -b
16866 \family default
16867
16868 \begin_inset Quotes erd
16869 \end_inset
16870
16871
16872 \begin_inset Quotes eld
16873 \end_inset
16874
16875
16876 \family typewriter
16877 -c
16878 \family default
16879
16880 \begin_inset Quotes erd
16881 \end_inset
16882
16883 , etc.
16884 \begin_inset space ~
16885 \end_inset
16886
16887 appended to the page number of the parent 
16888 \family sans
16889 Slide
16890 \family default
16891 .
16892  
16893 \end_layout
16894
16895 \end_inset
16896
16897  Clearly, you want the contents of both the 
16898 \family sans
16899 Slide
16900 \family default
16901  and the 
16902 \family sans
16903 Overlay
16904 \family default
16905  to each fit on a single physical slide! You should probably consider an
16906  
16907 \family sans
16908 Overlay
16909 \family default
16910  as 
16911 \begin_inset Quotes eld
16912 \end_inset
16913
16914 part of
16915 \begin_inset Quotes erd
16916 \end_inset
16917
16918  a 
16919 \family sans
16920 Slide
16921 \family default
16922 .
16923  Indeed, the LyX 
16924 \family sans
16925 slides
16926 \family default
16927  class provides a visual cue for this: the label at the start of an 
16928 \family sans
16929 Overlay
16930 \family default
16931  is shorter than that at the start of a 
16932 \family sans
16933 Slide
16934 \family default
16935 .
16936  Lastly, when you generate printable output, you'll find alignment markers
16937  in all four corners of both the 
16938 \family sans
16939 Overlay
16940 \family default
16941  page and its parent 
16942 \family sans
16943 Slide
16944 \family default
16945 .
16946  These will assist you in lining up the two physical slides.
16947 \end_layout
16948
16949 \begin_layout Standard
16950 The major problem in overlaying two slides is aligning the contents of the
16951  two transparencies.
16952  How much space should you leave for that graph on the second slide? Worse
16953  still, what if you want a graph and a sentence on second slide, but there
16954  is text on the main transparency that goes in between them? You could try
16955  and insert vertical space of the right size.
16956  The better way is to use 
16957 \family sans
16958 InvisibleText
16959 \family default
16960  and 
16961 \family sans
16962 VisibleText
16963 \family default
16964 .
16965 \end_layout
16966
16967 \begin_layout Standard
16968 As their names imply, 
16969 \family sans
16970 InvisibleText
16971 \family default
16972  and 
16973 \family sans
16974 VisibleText
16975 \family default
16976  are two command-like paragraph environments that make all subsequent text
16977  invisible and visible, respectively.
16978  Note from section
16979 \begin_inset space ~
16980 \end_inset
16981
16982
16983 \begin_inset CommandInset ref
16984 LatexCommand ref
16985 reference "sec:slideQuirk"
16986
16987 \end_inset
16988
16989  that you don't place anything 
16990 \emph on
16991 into
16992 \emph default
16993  these two environments, however.
16994  When you create an 
16995 \family sans
16996 InvisibleText
16997 \family default
16998 , it inserts a centered, sky-blue label into the page reading 
16999 \begin_inset Quotes eld
17000 \end_inset
17001
17002 <Invisible Text Follows>
17003 \begin_inset Quotes erd
17004 \end_inset
17005
17006 .
17007  For paragraphs following this label, the parts of the 
17008 \family sans
17009 Slide
17010 \family default
17011  [or 
17012 \family sans
17013 Overlay
17014 \family default
17015 ; it doesn't matter which] where they would be contain instead blank space.
17016  
17017 \end_layout
17018
17019 \begin_layout Standard
17020 For 
17021 \family sans
17022 VisibleText
17023 \family default
17024 , the corresponding centered label is 
17025 \begin_inset Quotes eld
17026 \end_inset
17027
17028 <Visible Text Follows>
17029 \begin_inset Quotes erd
17030 \end_inset
17031
17032  in blazing green.
17033  Paragraphs following this label behave normally.
17034  Note that the beginning of a new 
17035 \family sans
17036 Slide
17037 \family default
17038
17039 \family sans
17040 Overlay
17041 \family default
17042 , or 
17043 \family sans
17044 Note
17045 \family default
17046  automatically shuts off an 
17047 \family sans
17048 InvisibleText
17049 \family default
17050 .
17051  It's therefore not necessary to use 
17052 \family sans
17053 VisibleText
17054 \family default
17055  at the end of a 
17056 \family sans
17057 Slide
17058 \family default
17059 .
17060 \end_layout
17061
17062 \begin_layout Standard
17063 By now, it should be obvious how to create overlay transparencies using
17064  the proper combination of 
17065 \family sans
17066 InvisibleText
17067 \family default
17068  and 
17069 \family sans
17070 VisibleText
17071 \family default
17072  on a 
17073 \family sans
17074 Slide
17075 \family default
17076  and 
17077 \family sans
17078 Overlay
17079 \family default
17080 :
17081 \end_layout
17082
17083 \begin_layout Enumerate
17084 Create a 
17085 \family sans
17086 Slide
17087 \family default
17088 , including everything that will appear on it, whether on the main slide
17089  or on the 
17090 \family sans
17091 Overlay
17092 \family default
17093 .
17094 \end_layout
17095
17096 \begin_layout Enumerate
17097 Before each figure or paragraph that will appear only on the 
17098 \family sans
17099 Overlay
17100 \family default
17101 , insert an 
17102 \family sans
17103 InvisibleText
17104 \family default
17105  environment.
17106  If necessary, insert a 
17107 \family sans
17108 VisibleText
17109 \family default
17110  environment after the 
17111 \family sans
17112 Overlay
17113 \family default
17114 -only text.
17115 \end_layout
17116
17117 \begin_layout Enumerate
17118 Start an 
17119 \family sans
17120 Overlay
17121 \family default
17122  immediately following the 
17123 \family sans
17124 Slide
17125 \family default
17126 .
17127 \end_layout
17128
17129 \begin_layout Enumerate
17130 Copy the contents of this 
17131 \family sans
17132 Slide
17133 \family default
17134  into the 
17135 \family sans
17136 Overlay
17137 \family default
17138 .
17139 \end_layout
17140
17141 \begin_layout Enumerate
17142 Within the 
17143 \family sans
17144 Overlay
17145 \family default
17146 , change all of the 
17147 \family sans
17148 InvisibleText
17149 \family default
17150  lines to 
17151 \family sans
17152 VisibleText
17153 \family default
17154  and vice-versa.
17155 \end_layout
17156
17157 \begin_layout Standard
17158 That's it.
17159  You've just made an 
17160 \family sans
17161 Overlay
17162 \family default
17163 .
17164 \end_layout
17165
17166 \begin_layout Standard
17167 There's one problem with the way I've designed the LyX 
17168 \family sans
17169 slides
17170 \family default
17171  class: you can't make text in the middle of a paragraph invisible, nor
17172  make text in the middle of an invisible paragraph visible again.
17173  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17174 \begin_inset Foot
17175 status collapsed
17176
17177 \begin_layout Plain Layout
17178 The commands of interest are: 
17179 \end_layout
17180
17181 \begin_layout Itemize
17182
17183 \family typewriter
17184 {
17185 \backslash
17186 invisible \SpecialChar \ldots{}
17187  }
17188 \end_layout
17189
17190 \begin_layout Itemize
17191
17192 \family typewriter
17193 {
17194 \backslash
17195 visible \SpecialChar \ldots{}
17196  }
17197 \end_layout
17198
17199 \begin_layout Plain Layout
17200 \SpecialChar \ldots{}
17201 and need to be marked as TeX.
17202  The text whose 
17203 \begin_inset Quotes eld
17204 \end_inset
17205
17206 visibility
17207 \begin_inset Quotes erd
17208 \end_inset
17209
17210  you wish to change goes in between the brackets [and after the 
17211 \family typewriter
17212
17213 \backslash
17214 invisible
17215 \family default
17216  or 
17217 \family typewriter
17218
17219 \backslash
17220 visible
17221 \family default
17222  command].
17223  If you don't know how to mark text as TeX, see the appropriate section
17224  of the 
17225 \emph on
17226 User's Guide
17227 \emph default
17228 .
17229 \end_layout
17230
17231 \end_inset
17232
17233
17234 \end_layout
17235
17236 \begin_layout Subsubsection
17237 Using 
17238 \family sans
17239 Note
17240 \family default
17241  with 
17242 \family sans
17243 Slide
17244 \family default
17245
17246 \begin_inset CommandInset label
17247 LatexCommand label
17248 name "sec:slideNote"
17249
17250 \end_inset
17251
17252
17253 \end_layout
17254
17255 \begin_layout Standard
17256 Like an 
17257 \family sans
17258 Overlay
17259 \family default
17260 , a 
17261 \family sans
17262 Note
17263 \family default
17264  is associated with a 
17265 \begin_inset Quotes eld
17266 \end_inset
17267
17268 parent
17269 \begin_inset Quotes erd
17270 \end_inset
17271
17272  
17273 \family sans
17274 Slide
17275 \family default
17276 .
17277  Here, too, the LyX 
17278 \family sans
17279 slides
17280 \family default
17281  class provides visual cues.
17282  The label for a 
17283 \family sans
17284 Note
17285 \family default
17286  is shorter than that of a 
17287 \family sans
17288 Slide
17289 \family default
17290  [yet longer than that of an 
17291 \family sans
17292 Overlay
17293 \family default
17294 ] and, like the label of an 
17295 \family sans
17296 Overlay
17297 \family default
17298  is shockingly magenta.
17299  Additionally, the printed 
17300 \family sans
17301 Note
17302 \family default
17303  has the page number of its 
17304 \begin_inset Quotes eld
17305 \end_inset
17306
17307 parent
17308 \begin_inset Quotes erd
17309 \end_inset
17310
17311  
17312 \family sans
17313 Slide
17314 \family default
17315 , appended by 
17316 \begin_inset Quotes eld
17317 \end_inset
17318
17319
17320 \family typewriter
17321 -
17322 \family default
17323 1
17324 \begin_inset Quotes erd
17325 \end_inset
17326
17327
17328 \begin_inset Quotes eld
17329 \end_inset
17330
17331
17332 \family typewriter
17333 -
17334 \family default
17335 2
17336 \begin_inset Quotes erd
17337 \end_inset
17338
17339
17340 \begin_inset Quotes eld
17341 \end_inset
17342
17343
17344 \family typewriter
17345 -
17346 \family default
17347 3
17348 \begin_inset Quotes erd
17349 \end_inset
17350
17351 , etc.
17352  You can have multiple 
17353 \family sans
17354 Note
17355 \family default
17356 s associated with a single 
17357 \family sans
17358 Slide
17359 \family default
17360 , and, as with 
17361 \family sans
17362 Slide
17363 \family default
17364  and 
17365 \family sans
17366 Overlay
17367 \family default
17368 , you'll probably want to break up long 
17369 \family sans
17370 Note
17371 \family default
17372 s so that they fit on a single sheet of paper.
17373 \end_layout
17374
17375 \begin_layout Standard
17376 The purpose of a 
17377 \family sans
17378 Note
17379 \family default
17380  is obvious: it contains anything additional you might want to say about
17381  a 
17382 \family sans
17383 Slide
17384 \family default
17385 .
17386  It could also be used as a sheet of reminders for a particular 
17387 \family sans
17388 Slide
17389 \family default
17390 .
17391  In the case of the latter, you might want to make use of time markers.
17392  Currently, the LyX 
17393 \family sans
17394 slides
17395 \family default
17396  class has no 
17397 \begin_inset Quotes eld
17398 \end_inset
17399
17400 native
17401 \begin_inset Quotes erd
17402 \end_inset
17403
17404  support for time markers, a 
17405 \noun on
17406 SliTeX
17407 \noun default
17408  feature.
17409  So, you'll have to resort to using the LaTeX codes.
17410 \end_layout
17411
17412 \begin_layout Standard
17413 To use time markers, you'll need to specify the extra class option 
17414 \begin_inset Quotes eld
17415 \end_inset
17416
17417
17418 \family typewriter
17419 clock
17420 \family default
17421
17422 \begin_inset Quotes erd
17423 \end_inset
17424
17425  [see section
17426 \begin_inset space ~
17427 \end_inset
17428
17429
17430 \begin_inset CommandInset ref
17431 LatexCommand ref
17432 reference "sec:slidesetup"
17433
17434 \end_inset
17435
17436 ].
17437  This option turns on timing marks, which will appear in the lower-left-hand
17438  corner of every 
17439 \family sans
17440 Note
17441 \family default
17442  you generate.
17443  To set what appears in the time marker, you use the LaTeX commands 
17444 \begin_inset Quotes eld
17445 \end_inset
17446
17447
17448 \family typewriter
17449
17450 \backslash
17451 settime{}
17452 \family default
17453
17454 \begin_inset Quotes erd
17455 \end_inset
17456
17457  and 
17458 \begin_inset Quotes eld
17459 \end_inset
17460
17461
17462 \family typewriter
17463
17464 \backslash
17465 addtime{}
17466 \family default
17467
17468 \begin_inset Quotes erd
17469 \end_inset
17470
17471 .
17472  The arguments of both commands are time measured in seconds.
17473  
17474 \begin_inset Quotes eld
17475 \end_inset
17476
17477
17478 \family typewriter
17479
17480 \backslash
17481 settime{}
17482 \family default
17483
17484 \begin_inset Quotes erd
17485 \end_inset
17486
17487  sets the time marker to a given time.
17488  
17489 \begin_inset Quotes eld
17490 \end_inset
17491
17492
17493 \family typewriter
17494
17495 \backslash
17496 addtime{}
17497 \family default
17498
17499 \begin_inset Quotes erd
17500 \end_inset
17501
17502  increments the time marker by the specified amount.
17503  Using time markers and 
17504 \family sans
17505 Note
17506 \family default
17507 s in this fashion, you can remind yourself how much time to spend on a particula
17508
17509 \family sans
17510 Slide
17511 \family default
17512 .
17513 \end_layout
17514
17515 \begin_layout Standard
17516 There's one last feature to describe.
17517  Clearly, you'd like to print out all of your 
17518 \family sans
17519 Slide
17520 \family default
17521 s and 
17522 \family sans
17523 Overlay
17524 \family default
17525 s on transparencies while printing all of your 
17526 \family sans
17527 Note
17528 \family default
17529 s on plain paper.
17530  However, a 
17531 \family sans
17532 Note
17533 \family default
17534  
17535 \emph on
17536 must
17537 \emph default
17538  follow the 
17539 \family sans
17540 Slide
17541 \family default
17542  with which it is associated.
17543  What's a person to do?
17544 \end_layout
17545
17546 \begin_layout Standard
17547 Luckily, there are two LaTeX commands that allow you to select what to print
17548  out.
17549  Both must be placed into the preamble of your document.
17550  The command 
17551 \begin_inset Quotes eld
17552 \end_inset
17553
17554
17555 \family typewriter
17556
17557 \backslash
17558 onlyslides{
17559 \backslash
17560 slides}
17561 \family default
17562
17563 \begin_inset Quotes erd
17564 \end_inset
17565
17566  will cause the output to contain only the 
17567 \family sans
17568 Slide
17569 \family default
17570 s and 
17571 \family sans
17572 Overlay
17573 \family default
17574 s.
17575  Correspondingly, the command 
17576 \begin_inset Quotes eld
17577 \end_inset
17578
17579
17580 \family typewriter
17581
17582 \backslash
17583 onlynotes{
17584 \backslash
17585 notes}
17586 \family default
17587
17588 \begin_inset Quotes erd
17589 \end_inset
17590
17591  prevents the output of anything but 
17592 \family sans
17593 Note
17594 \family default
17595 s.
17596  I'd advise placing both commands in the preamble and initially comment
17597  both out.
17598  You can then preview your entire presentation as you write.
17599  When you're done writing, you can then uncomment one of the two to select
17600  what you want to print.
17601  I like to uncomment 
17602 \begin_inset Quotes eld
17603 \end_inset
17604
17605
17606 \family typewriter
17607
17608 \backslash
17609 onlyslides{
17610 \backslash
17611 slides}
17612 \family default
17613
17614 \begin_inset Quotes erd
17615 \end_inset
17616
17617  , print to a file with 
17618 \begin_inset Quotes eld
17619 \end_inset
17620
17621
17622 \family typewriter
17623 -slides
17624 \family default
17625
17626 \begin_inset Quotes erd
17627 \end_inset
17628
17629  in its name, comment it back out, then uncomment 
17630 \begin_inset Quotes eld
17631 \end_inset
17632
17633
17634 \family typewriter
17635
17636 \backslash
17637 onlynotes{
17638 \backslash
17639 notes}
17640 \family default
17641
17642 \begin_inset Quotes erd
17643 \end_inset
17644
17645  and print to a 
17646 \begin_inset Quotes eld
17647 \end_inset
17648
17649
17650 \family typewriter
17651 *-notes.ps
17652 \family default
17653
17654 \begin_inset Quotes erd
17655 \end_inset
17656
17657  file.
17658  I can then send either file to a printer, loading transparencies or plain
17659  paper as appropriate.
17660 \end_layout
17661
17662 \begin_layout Standard
17663 You can also provide other arguments to the 
17664 \begin_inset Quotes eld
17665 \end_inset
17666
17667
17668 \family typewriter
17669
17670 \backslash
17671 onlyslides{}
17672 \family default
17673
17674 \begin_inset Quotes erd
17675 \end_inset
17676
17677  and 
17678 \begin_inset Quotes eld
17679 \end_inset
17680
17681
17682 \family typewriter
17683
17684 \backslash
17685 onlynotes{}
17686 \family default
17687
17688 \begin_inset Quotes erd
17689 \end_inset
17690
17691  commands.
17692  See a good LaTeX book for details.
17693 \end_layout
17694
17695 \begin_layout Subsection
17696 The 
17697 \family sans
17698 slides
17699 \family default
17700  Class Template File
17701 \end_layout
17702
17703 \begin_layout Standard
17704 I have also provided a template file, 
17705 \begin_inset Quotes eld
17706 \end_inset
17707
17708
17709 \family typewriter
17710 slides.lyx
17711 \family default
17712
17713 \begin_inset Quotes erd
17714 \end_inset
17715
17716 , with the 
17717 \family sans
17718 slides
17719 \family default
17720  class.
17721  To use it, begin your new presentation with 
17722 \family sans
17723 \bar under
17724 F
17725 \bar default
17726 ile\SpecialChar \menuseparator
17727 New
17728 \begin_inset space ~
17729 \end_inset
17730
17731 from
17732 \begin_inset space ~
17733 \end_inset
17734
17735
17736 \bar under
17737 T
17738 \bar default
17739 emplate
17740 \family default
17741 .
17742  Your new LyX presentation file will contain an example 
17743 \family sans
17744 Slide
17745 \family default
17746  – 
17747 \family sans
17748 Overlay
17749 \family default
17750  – 
17751 \family sans
17752 Note
17753 \family default
17754  triplet.
17755  The 
17756 \family sans
17757 Slide
17758 \family default
17759  and 
17760 \family sans
17761 Overlay
17762 \family default
17763  additionally contain an example of the use of 
17764 \family sans
17765 InvisibleText
17766 \family default
17767  and 
17768 \family sans
17769 VisibleText
17770 \family default
17771 .
17772  Lastly, the preamble will contain:
17773 \end_layout
17774
17775 \begin_layout LyX-Code
17776 % Uncomment to print out only slides and overlays
17777 \end_layout
17778
17779 \begin_layout LyX-Code
17780 %
17781 \end_layout
17782
17783 \begin_layout LyX-Code
17784 %
17785 \backslash
17786 onlyslides{
17787 \backslash
17788 slides}
17789 \begin_inset Newline newline
17790 \end_inset
17791
17792  
17793 \end_layout
17794
17795 \begin_layout LyX-Code
17796 % Uncomment to print out only notes
17797 \end_layout
17798
17799 \begin_layout LyX-Code
17800 %
17801 \end_layout
17802
17803 \begin_layout LyX-Code
17804 %
17805 \backslash
17806 onlynotes{
17807 \backslash
17808 notes}
17809 \end_layout
17810
17811 \begin_layout Standard
17812 One final thing: I created this class to support the LaTeX2e 
17813 \begin_inset Quotes eld
17814 \end_inset
17815
17816
17817 \noun on
17818 SliTeX
17819 \noun default
17820  emulation
17821 \begin_inset Quotes erd
17822 \end_inset
17823
17824  class, one of the built-in LaTeX2e classes.
17825  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17826  built-in slide class.
17827  It's here if you want it or need it.
17828  There exist other LaTeX2e classes for creating presentations, such as the
17829  
17830 \family sans
17831 Foils
17832 \family default
17833  class [see section
17834 \begin_inset space ~
17835 \end_inset
17836
17837
17838 \begin_inset CommandInset ref
17839 LatexCommand ref
17840 reference "sec:foiltex"
17841
17842 \end_inset
17843
17844 ] or the 
17845 \begin_inset Quotes eld
17846 \end_inset
17847
17848
17849 \family typewriter
17850 seminar
17851 \family default
17852
17853 \begin_inset Quotes erd
17854 \end_inset
17855
17856  package [present on some TeX distributions].
17857  The latter is not yet supported under LyX.
17858 \begin_inset Foot
17859 status collapsed
17860
17861 \begin_layout Plain Layout
17862 Perhaps you can take on the task\SpecialChar \ldots{}
17863
17864 \end_layout
17865
17866 \end_inset
17867
17868  I know nothing about these other classes.
17869  Try them out to see what sort of alternative they provide.
17870 \end_layout
17871
17872 \begin_layout Chapter
17873 LyX Features needing Extra Software
17874 \end_layout
17875
17876 \begin_layout Section
17877 Checking TeX
17878 \end_layout
17879
17880 \begin_layout Standard
17881 by 
17882 \noun on
17883 Asger Alstrup
17884 \end_layout
17885
17886 \begin_layout Subsection
17887 Introduction
17888 \end_layout
17889
17890 \begin_layout Standard
17891 If you have the 
17892 \family typewriter
17893 chktex
17894 \family default
17895  program installed
17896 \begin_inset Foot
17897 status collapsed
17898
17899 \begin_layout Plain Layout
17900
17901 \family typewriter
17902 chktex
17903 \family default
17904  is not yet available when you are using the LaTeX distribution MiKTeX.
17905 \end_layout
17906
17907 \end_inset
17908
17909 , you'll find in the 
17910 \family sans
17911 Tools
17912 \family default
17913  menu the entry: 
17914 \family sans
17915 Check
17916 \begin_inset space ~
17917 \end_inset
17918
17919 TeX
17920 \family default
17921 .
17922  You can get 
17923 \family typewriter
17924 chktex
17925 \family default
17926  it from CTAN, 
17927 \begin_inset CommandInset href
17928 LatexCommand href
17929 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17930
17931 \end_inset
17932
17933 .
17934 \end_layout
17935
17936 \begin_layout Standard
17937 The 
17938 \family sans
17939 ChkTeX
17940 \family default
17941  package is a program that was written by 
17942 \begin_inset Flex Noun
17943 status collapsed
17944
17945 \begin_layout Plain Layout
17946 Jens T.
17947 \begin_inset space ~
17948 \end_inset
17949
17950 Berger Thielemann
17951 \end_layout
17952
17953 \end_inset
17954
17955  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17956  and easy to forget.
17957  The program runs over your LaTeX file, checks the integrity of the file,
17958  and flags some common errors.
17959  In other technical words, it is 
17960 \family typewriter
17961 lint
17962 \family default
17963  for LaTeX.
17964 \end_layout
17965
17966 \begin_layout Standard
17967 Well, what is a syntax checker doing in LyX which is supposed to produce
17968  correct LaTeX anyways? The answer is simple: Just as 
17969 \family typewriter
17970 Lint
17971 \family default
17972  not only checks the 
17973 \emph on
17974 syntax
17975 \emph default
17976  of C programs, but also does 
17977 \emph on
17978 semantic
17979 \emph default
17980  checks for type-errors, 
17981 \family sans
17982 ChkTeX
17983 \family default
17984  catches some common 
17985 \emph on
17986 typographic
17987 \emph default
17988  errors, in addition to the syntactical ones.
17989  Specifically, 
17990 \family sans
17991 ChkTeX
17992 \family default
17993  is capable of detecting several common errors, such as
17994 \end_layout
17995
17996 \begin_layout Itemize
17997 Ellipsis detection:
17998 \begin_inset Newline newline
17999 \end_inset
18000
18001 Use \SpecialChar \ldots{}
18002  instead of ...
18003 \end_layout
18004
18005 \begin_layout Itemize
18006 No space in front of/after parenthesis:
18007 \begin_inset Newline newline
18008 \end_inset
18009
18010 ( wrong spacing )
18011 \end_layout
18012
18013 \begin_layout Itemize
18014 Enforcement of normal space after common abbreviations:
18015 \begin_inset Newline newline
18016 \end_inset
18017
18018 e.
18019 \begin_inset space \thinspace{}
18020 \end_inset
18021
18022 g.
18023 \begin_inset space \space{}
18024 \end_inset
18025
18026 is too wide spacing.
18027 \end_layout
18028
18029 \begin_layout Itemize
18030 Enforcement of end-of-sentence space when the last sentence ends with a
18031  capital letter:
18032 \begin_inset Newline newline
18033 \end_inset
18034
18035 This is a TEST.
18036  And this is wrong spacing.
18037 \end_layout
18038
18039 \begin_layout Itemize
18040 Space in front of labels and similar commands:
18041 \begin_inset Newline newline
18042 \end_inset
18043
18044 The label should stick right up to the text to avoid falling to a wrong
18045  page.
18046  
18047 \begin_inset CommandInset label
18048 LatexCommand label
18049 name "sec:chktex"
18050
18051 \end_inset
18052
18053  
18054 \begin_inset Foot
18055 status collapsed
18056
18057 \begin_layout Plain Layout
18058 This footnote is in danger of falling off to a wrong page
18059 \end_layout
18060
18061 \end_inset
18062
18063  The label is separated too much.
18064 \end_layout
18065
18066 \begin_layout Itemize
18067 Space in front of references, instead of hard spaces:
18068 \begin_inset Newline newline
18069 \end_inset
18070
18071 In you are in bad luck, the text will break right between the referenced
18072  text and reference number, and that's a pity.
18073  See section 
18074 \begin_inset CommandInset ref
18075 LatexCommand ref
18076 reference "sec:chktex"
18077
18078 \end_inset
18079
18080 .
18081 \end_layout
18082
18083 \begin_layout Itemize
18084 Use of 
18085 \begin_inset Quotes eld
18086 \end_inset
18087
18088 x
18089 \begin_inset Quotes erd
18090 \end_inset
18091
18092  instead of 
18093 \begin_inset Formula $\times$
18094 \end_inset
18095
18096  between numbers:
18097 \begin_inset Newline newline
18098 \end_inset
18099
18100 2x2 looks cheap compared to 
18101 \begin_inset Formula $2\times2$
18102 \end_inset
18103
18104 .
18105 \end_layout
18106
18107 \begin_layout Standard
18108 and more \SpecialChar \ldots{}
18109  It is an invaluable tool when you are 
18110 \begin_inset Quotes eld
18111 \end_inset
18112
18113 finishing up
18114 \begin_inset Quotes erd
18115 \end_inset
18116
18117  your document before printing, and you should run it right after the obligatory
18118  spelling check, and before you go fine tuning the typesetting.
18119 \end_layout
18120
18121 \begin_layout Subsection
18122 How to use it
18123 \end_layout
18124
18125 \begin_layout Standard
18126 If you have the program installed, usage is as simple as choosing 
18127 \family sans
18128 Tools\SpecialChar \menuseparator
18129 Check
18130 \begin_inset space ~
18131 \end_inset
18132
18133 TeX
18134 \family default
18135 .
18136  This will make LyX generate a LaTeX file of your document, start 
18137 \family sans
18138 ChkTeX
18139 \family default
18140  to check it, and then make LyX insert 
18141 \begin_inset Quotes eld
18142 \end_inset
18143
18144 error boxes
18145 \begin_inset Quotes erd
18146 \end_inset
18147
18148  with the warnings from 
18149 \family sans
18150 ChkTeX
18151 \family default
18152 , if there were any.
18153  The warnings will be placed close to the point of the mistake, and you
18154  can quickly find them by using the 
18155 \family sans
18156 Navigate\SpecialChar \menuseparator
18157 Error
18158 \family default
18159  menu item, or the shortcut key 
18160 \family sans
18161 C-g
18162 \family default
18163  from the default 
18164 \family typewriter
18165 cua
18166 \family default
18167  bind file.
18168  Open the error boxes by clicking on them with the mouse, or use the shortcut
18169  key 
18170 \family sans
18171 C-i
18172 \family default
18173  from 
18174 \family typewriter
18175 cua
18176 \family default
18177  bindings, or the corresponding 
18178 \family sans
18179 C-o
18180 \family default
18181  for the alternate 
18182 \family typewriter
18183 emacs
18184 \family default
18185  bind file.
18186  Read the warning and correct the mistake, if it is a mistake.
18187  If you have trouble understanding what the warning is about, you can safely
18188  ignore it.
18189  Remember that there is a hidden layer between the document on screen and
18190  the technical details in invoking 
18191 \family sans
18192 ChkTeX
18193 \family default
18194 , and this gap can make some warnings seem arcane or just right down plain
18195  silly.
18196 \end_layout
18197
18198 \begin_layout Standard
18199 This document is an excellent testing bed for the feature, and it should
18200  provide quite a few warnings for you to fiddle with.
18201  Since computers are only so smart, expect most of the warnings to be false
18202  alarms, though.
18203 \end_layout
18204
18205 \begin_layout Subsection
18206 How to fine tune it
18207 \end_layout
18208
18209 \begin_layout Standard
18210 Sometimes, you'll find that 
18211 \family sans
18212 ChkTeX
18213 \family default
18214  makes more noise than suits your mood.
18215  Then you can choose not to use it, wait until your mood changes, or try
18216  to customize 
18217 \family sans
18218 ChkTeX
18219 \family default
18220  to get better along with you.
18221  Another choice in the most desperate situations is to use 
18222 \family sans
18223 View\SpecialChar \menuseparator
18224 Remove
18225 \begin_inset space ~
18226 \end_inset
18227
18228 All
18229 \begin_inset space ~
18230 \end_inset
18231
18232 Error
18233 \begin_inset space ~
18234 \end_inset
18235
18236 Boxes
18237 \family default
18238 , which will get rid of all warnings instantly.
18239 \end_layout
18240
18241 \begin_layout Standard
18242 Although 
18243 \family sans
18244 ChkTeX
18245 \family default
18246  
18247 \emph on
18248 is
18249 \emph default
18250  very configurable and extensible, you shouldn't expect to solve all problems
18251  with 
18252 \family sans
18253 ChkTeX
18254 \family default
18255  in LyX this way.
18256  Since LyX has to generate a somewhat special LaTeX file to be able to match
18257  the line numbers from the 
18258 \family sans
18259 ChkTeX
18260 \family default
18261  output
18262 \begin_inset Foot
18263 status collapsed
18264
18265 \begin_layout Plain Layout
18266 You can inspect the specific output from 
18267 \family sans
18268 chktex
18269 \family default
18270  by using 
18271 \family sans
18272 Edit\SpecialChar \menuseparator
18273 View
18274 \begin_inset space ~
18275 \end_inset
18276
18277 LaTeX
18278 \begin_inset space ~
18279 \end_inset
18280
18281 Log
18282 \family default
18283  right after a 
18284 \family sans
18285 chktex
18286 \family default
18287  run.
18288 \end_layout
18289
18290 \end_inset
18291
18292  to the internal document structure, some of the warnings will not seen
18293  to appear correctly.
18294  There are two things you can do about this:
18295 \end_layout
18296
18297 \begin_layout Itemize
18298 Fine tune the 
18299 \family sans
18300 ChkTeX
18301 \family default
18302  invocation command line in 
18303 \family sans
18304 Preferences
18305 \family default
18306  (tabs 
18307 \family sans
18308 Outputs
18309 \family default
18310
18311 \family sans
18312 Misc
18313 \family default
18314 ), or the global 
18315 \family sans
18316 ChkTeX
18317 \family default
18318  installation configuration file (usually with the file 
18319 \family typewriter
18320 chktexrc
18321 \family default
18322 ).
18323  See below to learn what warnings can be enabled and disabled on the command
18324  line.
18325  
18326 \end_layout
18327
18328 \begin_layout Itemize
18329 Export your document as a raw LaTeX file using 
18330 \family sans
18331 File\SpecialChar \menuseparator
18332 Export\SpecialChar \menuseparator
18333 LaTeX
18334 \family default
18335  and run 
18336 \family typewriter
18337 chktex
18338 \family default
18339  manually on that.
18340  Invoked in this way, it can be a hassle to find the corresponding place
18341  in the document inside LyX, but with a little patience, you should be able
18342  to do it.
18343 \end_layout
18344
18345 \begin_layout Standard
18346 Here follows the warning messages that can be enabled and disabled in 
18347 \family sans
18348 Preferences
18349 \family default
18350 .
18351  Use 
18352 \family typewriter
18353 -n#
18354 \family default
18355  to disable a warning, and 
18356 \family typewriter
18357 -w#
18358 \family default
18359  to enable a warning.
18360  The emphasized entries are disabled by default, because the default is
18361  "
18362 \family typewriter
18363 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18364 \family default
18365 ".
18366 \end_layout
18367
18368 \begin_layout Standard
18369 Notice that you should only use the options that enable and disable warnings,
18370  because LyX relies on some of the other command line parameters to be set
18371  in a specific way to have a chance to communicate with 
18372 \family typewriter
18373 chktex
18374 \family default
18375 .
18376 \end_layout
18377
18378 \begin_layout Enumerate
18379
18380 \size small
18381 \emph on
18382 Command terminated with space.
18383 \end_layout
18384
18385 \begin_layout Enumerate
18386
18387 \size small
18388 Non-breaking space (
18389 \begin_inset Quotes eld
18390 \end_inset
18391
18392
18393 \family typewriter
18394 ~
18395 \family default
18396
18397 \begin_inset Quotes erd
18398 \end_inset
18399
18400 ) should have been used.
18401 \end_layout
18402
18403 \begin_layout Enumerate
18404
18405 \size small
18406 \emph on
18407 You should enclose the previous parenthesis with 
18408 \begin_inset Quotes eld
18409 \end_inset
18410
18411
18412 \family typewriter
18413 {}
18414 \family default
18415
18416 \begin_inset Quotes erd
18417 \end_inset
18418
18419 .
18420 \end_layout
18421
18422 \begin_layout Enumerate
18423
18424 \size small
18425 Italic correction (
18426 \begin_inset Quotes eld
18427 \end_inset
18428
18429
18430 \family typewriter
18431
18432 \backslash
18433 /
18434 \family default
18435
18436 \begin_inset Quotes erd
18437 \end_inset
18438
18439 ) found in non-italic buffer.
18440 \end_layout
18441
18442 \begin_layout Enumerate
18443
18444 \size small
18445 Italic correction (
18446 \begin_inset Quotes eld
18447 \end_inset
18448
18449
18450 \family typewriter
18451
18452 \backslash
18453 /
18454 \family default
18455
18456 \begin_inset Quotes erd
18457 \end_inset
18458
18459 ) found more than once.
18460 \end_layout
18461
18462 \begin_layout Enumerate
18463
18464 \size small
18465 \emph on
18466 No italic correction (
18467 \begin_inset Quotes eld
18468 \end_inset
18469
18470
18471 \family typewriter
18472
18473 \backslash
18474 /
18475 \family default
18476
18477 \begin_inset Quotes erd
18478 \end_inset
18479
18480 ) found.
18481 \end_layout
18482
18483 \begin_layout Enumerate
18484
18485 \size small
18486 Accent command 
18487 \begin_inset Quotes eld
18488 \end_inset
18489
18490
18491 \family typewriter
18492 cmd
18493 \family default
18494
18495 \begin_inset Quotes erd
18496 \end_inset
18497
18498  needs use of 
18499 \begin_inset Quotes eld
18500 \end_inset
18501
18502
18503 \family typewriter
18504 cmd
18505 \family default
18506
18507 \begin_inset Quotes erd
18508 \end_inset
18509
18510 .
18511 \end_layout
18512
18513 \begin_layout Enumerate
18514
18515 \size small
18516 Wrong length of dash may have been used.
18517 \end_layout
18518
18519 \begin_layout Enumerate
18520
18521 \size small
18522 \emph on
18523 \begin_inset Quotes eld
18524 \end_inset
18525
18526
18527 \family typewriter
18528 %s
18529 \family default
18530
18531 \begin_inset Quotes erd
18532 \end_inset
18533
18534  expected, found 
18535 \begin_inset Quotes eld
18536 \end_inset
18537
18538
18539 \family typewriter
18540 %s
18541 \family default
18542
18543 \begin_inset Quotes erd
18544 \end_inset
18545
18546 .
18547 \end_layout
18548
18549 \begin_layout Enumerate
18550
18551 \size small
18552 Solo 
18553 \begin_inset Quotes eld
18554 \end_inset
18555
18556
18557 \family typewriter
18558 %s
18559 \family default
18560
18561 \begin_inset Quotes erd
18562 \end_inset
18563
18564  found.
18565 \end_layout
18566
18567 \begin_layout Enumerate
18568
18569 \size small
18570 You should use 
18571 \begin_inset Quotes eld
18572 \end_inset
18573
18574
18575 \family typewriter
18576 %s
18577 \family default
18578
18579 \begin_inset Quotes erd
18580 \end_inset
18581
18582  to achieve an ellipsis.
18583 \end_layout
18584
18585 \begin_layout Enumerate
18586
18587 \size small
18588 Inter-word spacing (
18589 \begin_inset Quotes eld
18590 \end_inset
18591
18592
18593 \family typewriter
18594
18595 \backslash
18596
18597 \family default
18598  
18599 \begin_inset Quotes eld
18600 \end_inset
18601
18602 ) should perhaps be used.
18603 \end_layout
18604
18605 \begin_layout Enumerate
18606
18607 \size small
18608 Inter-sentence spacing (
18609 \begin_inset Quotes eld
18610 \end_inset
18611
18612
18613 \family typewriter
18614
18615 \backslash
18616 @
18617 \family default
18618
18619 \begin_inset Quotes erd
18620 \end_inset
18621
18622 ) should perhaps be used.
18623 \end_layout
18624
18625 \begin_layout Enumerate
18626
18627 \size small
18628 Could not find argument for command.
18629 \end_layout
18630
18631 \begin_layout Enumerate
18632
18633 \size small
18634 No match found for 
18635 \begin_inset Quotes eld
18636 \end_inset
18637
18638
18639 \family typewriter
18640 %s
18641 \family default
18642
18643 \begin_inset Quotes erd
18644 \end_inset
18645
18646 .
18647 \end_layout
18648
18649 \begin_layout Enumerate
18650
18651 \size small
18652 Math mode still on at end of LaTeX file.
18653 \end_layout
18654
18655 \begin_layout Enumerate
18656
18657 \size small
18658 Number of 
18659 \begin_inset Quotes eld
18660 \end_inset
18661
18662
18663 \family typewriter
18664 char
18665 \family default
18666
18667 \begin_inset Quotes erd
18668 \end_inset
18669
18670  doesn't match the number of 
18671 \begin_inset Quotes eld
18672 \end_inset
18673
18674
18675 \family typewriter
18676 char
18677 \family default
18678
18679 \begin_inset Quotes erd
18680 \end_inset
18681
18682 .
18683 \end_layout
18684
18685 \begin_layout Enumerate
18686
18687 \size small
18688 You should use either 
18689 \family typewriter
18690
18691 \begin_inset Quotes eld
18692 \end_inset
18693
18694
18695 \family default
18696  or 
18697 \family typewriter
18698
18699 \begin_inset Quotes erd
18700 \end_inset
18701
18702
18703 \family default
18704  as an alternative to 
18705 \begin_inset Quotes eld
18706 \end_inset
18707
18708
18709 \family typewriter
18710 "
18711 \family default
18712
18713 \begin_inset Quotes erd
18714 \end_inset
18715
18716 .
18717 \end_layout
18718
18719 \begin_layout Enumerate
18720
18721 \size small
18722 You should use "
18723 \family typewriter
18724 '
18725 \family default
18726 " (ASCII 39) instead of "
18727 \family typewriter
18728 ´
18729 \family default
18730 " (ASCII 180).
18731 \end_layout
18732
18733 \begin_layout Enumerate
18734
18735 \size small
18736 User-specified pattern found.
18737 \end_layout
18738
18739 \begin_layout Enumerate
18740
18741 \size small
18742 This command might not be intended.
18743 \end_layout
18744
18745 \begin_layout Enumerate
18746
18747 \size small
18748 \emph on
18749 Comment displayed.
18750 \end_layout
18751
18752 \begin_layout Enumerate
18753
18754 \size small
18755 Either 
18756 \family typewriter
18757 ''
18758 \backslash
18759 ,'
18760 \family default
18761  or 
18762 \family typewriter
18763 '
18764 \backslash
18765 ,''
18766 \family default
18767  will look better.
18768 \end_layout
18769
18770 \begin_layout Enumerate
18771
18772 \size small
18773 Delete this space to maintain correct page references.
18774 \end_layout
18775
18776 \begin_layout Enumerate
18777
18778 \size small
18779 \emph on
18780 You might wish to put this between a pair of 
18781 \begin_inset Quotes eld
18782 \end_inset
18783
18784
18785 \family typewriter
18786 {}
18787 \family default
18788
18789 \begin_inset Quotes erd
18790 \end_inset
18791
18792 .
18793 \end_layout
18794
18795 \begin_layout Enumerate
18796
18797 \size small
18798 You ought to remove spaces in front of punctuation.
18799 \end_layout
18800
18801 \begin_layout Enumerate
18802
18803 \size small
18804 Could not execute LaTeX command.
18805 \end_layout
18806
18807 \begin_layout Enumerate
18808
18809 \size small
18810 Don't use 
18811 \family typewriter
18812
18813 \backslash
18814 /
18815 \family default
18816  in front of small punctuation.
18817 \end_layout
18818
18819 \begin_layout Enumerate
18820
18821 \family typewriter
18822 \size small
18823 $
18824 \backslash
18825 times$
18826 \family default
18827  may look prettier here.
18828 \end_layout
18829
18830 \begin_layout Enumerate
18831
18832 \size small
18833 \emph on
18834 Multiple spaces detected in output.
18835 \end_layout
18836
18837 \begin_layout Enumerate
18838
18839 \size small
18840 This text may be ignored.
18841 \end_layout
18842
18843 \begin_layout Enumerate
18844
18845 \size small
18846 Use 
18847 \family typewriter
18848
18849 \begin_inset Quotes eld
18850 \end_inset
18851
18852
18853 \family default
18854  to begin quotation, not 
18855 \family typewriter
18856 '
18857 \family default
18858 .
18859 \end_layout
18860
18861 \begin_layout Enumerate
18862
18863 \size small
18864 Use 
18865 \family typewriter
18866 '
18867 \family default
18868  to end quotation, not 
18869 \family typewriter
18870
18871 \begin_inset Quotes eld
18872 \end_inset
18873
18874
18875 \family default
18876 .
18877 \end_layout
18878
18879 \begin_layout Enumerate
18880
18881 \size small
18882 Don't mix quotes.
18883 \end_layout
18884
18885 \begin_layout Enumerate
18886
18887 \size small
18888 You should perhaps use 
18889 \begin_inset Quotes eld
18890 \end_inset
18891
18892
18893 \family typewriter
18894 cmd
18895 \family default
18896
18897 \begin_inset Quotes erd
18898 \end_inset
18899
18900  instead.
18901 \end_layout
18902
18903 \begin_layout Enumerate
18904
18905 \size small
18906 You should put a space in front of/after parenthesis.
18907 \end_layout
18908
18909 \begin_layout Enumerate
18910
18911 \size small
18912 You should avoid spaces in front of/after parenthesis.
18913 \end_layout
18914
18915 \begin_layout Enumerate
18916
18917 \size small
18918 \emph on
18919 You should not use punctuation in front of/after quotes.
18920 \end_layout
18921
18922 \begin_layout Enumerate
18923
18924 \size small
18925 Double space found.
18926 \end_layout
18927
18928 \begin_layout Enumerate
18929
18930 \size small
18931 You should put punctuation outside inner/inside display math mode.
18932 \end_layout
18933
18934 \begin_layout Enumerate
18935
18936 \size small
18937 You ought to not use primitive TeX in LaTeX code.
18938 \end_layout
18939
18940 \begin_layout Enumerate
18941
18942 \size small
18943 You should remove spaces in front of 
18944 \begin_inset Quotes eld
18945 \end_inset
18946
18947
18948 \family typewriter
18949 %s
18950 \family default
18951
18952 \begin_inset Quotes erd
18953 \end_inset
18954
18955
18956 \end_layout
18957
18958 \begin_layout Enumerate
18959
18960 \size small
18961 \begin_inset Quotes eld
18962 \end_inset
18963
18964
18965 \family typewriter
18966 %s
18967 \family default
18968
18969 \begin_inset Quotes erd
18970 \end_inset
18971
18972  is normally not followed by 
18973 \begin_inset Quotes eld
18974 \end_inset
18975
18976
18977 \family typewriter
18978 %c
18979 \family default
18980
18981 \begin_inset Quotes erd
18982 \end_inset
18983
18984 .
18985 \end_layout
18986
18987 \begin_layout Standard
18988 In later versions of LyX, we hope to provide a more complete interface to
18989  this tool (and it's smaller cousin 
18990 \family typewriter
18991 lacheck
18992 \family default
18993 ) to exploit the full power of it.
18994  But it's not exactly useless as it is now: go try it on one of your existing
18995  documents of a certain length and be surprised.
18996 \end_layout
18997
18998 \begin_layout Section
18999 Version Control in LyX
19000 \end_layout
19001
19002 \begin_layout Standard
19003 by
19004 \noun on
19005  Lars Gullik Bjønnes 
19006 \noun default
19007 and 
19008 \noun on
19009 Pavel Sanda
19010 \end_layout
19011
19012 \begin_layout Subsection
19013 Introduction
19014 \end_layout
19015
19016 \begin_layout Standard
19017 A friend of mine wanted to try LyX for a group project.
19018  When he didn't find support for version control or file locking, he dropped
19019  it.
19020  This angered me a bit, so I thought that I should at least make support
19021  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
19022  This has been done.
19023  LyX now supports some of the most basic RCS/CVS/SVN commands.
19024  If you need something a bit more sophisticated you will have to do that
19025  manually in a terminal.
19026 \end_layout
19027
19028 \begin_layout Standard
19029 Before you begin to use the version control features in LyX, you should
19030  be familiar with RCS/CVS/SVN usage before start using it under LyX.
19031  Also note that CVS support is not as good as subversion support so we advice
19032  using SVN instead.
19033  Good place to start with Subversion is SVN Book
19034 \begin_inset Foot
19035 status open
19036
19037 \begin_layout Plain Layout
19038 \begin_inset CommandInset href
19039 LatexCommand href
19040 target "http://svnbook.red-bean.com/"
19041
19042 \end_inset
19043
19044
19045 \end_layout
19046
19047 \end_inset
19048
19049 .
19050  In case of RCS you should read 
19051 \begin_inset Quotes eld
19052 \end_inset
19053
19054 rcsintro
19055 \begin_inset Quotes erd
19056 \end_inset
19057
19058  (a man file, read it with 
19059 \family typewriter
19060 man rcsintro
19061 \family default
19062 ).
19063  This file describes all the basic features of RCS.
19064  You should especially notice the comment about a RCS directory, and the
19065  notion of a master RCS file (the file ending in 
19066 \family typewriter
19067 ,v
19068 \family default
19069 ).
19070 \end_layout
19071
19072 \begin_layout Standard
19073 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19074  package—no guarantees are made for older versions.
19075  Most of the log messages are not currently displayed after operations —
19076  you can check them in Messages pane if unsure.
19077 \end_layout
19078
19079 \begin_layout Standard
19080 For introducing your own external commands consult vc-command in the manual
19081  of LyX functions.
19082 \end_layout
19083
19084 \begin_layout Subsection
19085 RCS commands in LyX
19086 \end_layout
19087
19088 \begin_layout Standard
19089 The following sections describe the RCS commands supported by LyX.
19090  You can find them in the 
19091 \family sans
19092 File\SpecialChar \menuseparator
19093 Version
19094 \begin_inset space ~
19095 \end_inset
19096
19097 Control
19098 \family default
19099  submenu.
19100  LyX was tested against RCS 5.7.
19101 \end_layout
19102
19103 \begin_layout Subsubsection
19104
19105 \family sans
19106 Register
19107 \end_layout
19108
19109 \begin_layout Standard
19110 If your document is not under revision control, this is the only item shown
19111  in the menu.
19112  And if it is under revision control, the 
19113 \family sans
19114 Register
19115 \family default
19116  item is not visible.
19117  
19118 \end_layout
19119
19120 \begin_layout Standard
19121 This command registers your document with RCS (unless you are under the
19122  directory managed by CVS)\SpecialChar \@.
19123  You are asked interactively to supply an initial
19124  description of the document.
19125  The document is now set in Read-Only mode and you have to 
19126 \family sans
19127 Check
19128 \begin_inset space ~
19129 \end_inset
19130
19131 Out
19132 \begin_inset space ~
19133 \end_inset
19134
19135 For
19136 \begin_inset space ~
19137 \end_inset
19138
19139 Edit
19140 \family default
19141 , before making any changes to it.
19142  A document under revision control has a 
19143 \begin_inset Quotes eld
19144 \end_inset
19145
19146 [RCS:<version> <locker>]
19147 \begin_inset Quotes erd
19148 \end_inset
19149
19150  item tagged to the filename in the minibuffer.
19151 \end_layout
19152
19153 \begin_layout Standard
19154 RCS command that is run: 
19155 \family typewriter
19156 ci -q -u -i -t-"<initial description>" <file-name>
19157 \end_layout
19158
19159 \begin_layout Standard
19160 Read 
19161 \family typewriter
19162 man ci
19163 \family default
19164  to understand the switches.
19165  
19166 \end_layout
19167
19168 \begin_layout Subsubsection
19169
19170 \family sans
19171 Check In Changes
19172 \end_layout
19173
19174 \begin_layout Standard
19175 When you are finished editing a file, you check in your changes.
19176  When you do this, you are asked for a description of the changes.
19177  This is stored in the history log.
19178  The version number is bumped, your changes are applied to the master RCS
19179  file, the document is unlocked and set to Read-Only mode.
19180  
19181 \end_layout
19182
19183 \begin_layout Standard
19184 RCS command: 
19185 \family typewriter
19186 ci -q -u -m"<description>" <file-name>
19187 \end_layout
19188
19189 \begin_layout Subsubsection
19190
19191 \family sans
19192 Check Out For Edit
19193 \end_layout
19194
19195 \begin_layout Standard
19196 By doing this you lock the document so that only you can edit it.
19197  This will also make the document Read-Write only for you.
19198  You will usually continue editing for a while and when you are finished
19199  you check in your changes.
19200  The status line is changed to reflect that you have locked the file.
19201  
19202 \end_layout
19203
19204 \begin_layout Standard
19205 RCS command: 
19206 \family typewriter
19207 co -q -l <file-name>
19208 \end_layout
19209
19210 \begin_layout Subsubsection
19211
19212 \family sans
19213 Revert To Repository Version
19214 \end_layout
19215
19216 \begin_layout Standard
19217 This will discard all changes made to the document since the last check
19218  in.
19219  You get a warning before changes are discarded.
19220 \end_layout
19221
19222 \begin_layout Standard
19223 RCS command: 
19224 \family typewriter
19225 co -f -u<version> <file-name>
19226 \end_layout
19227
19228 \begin_layout Subsubsection
19229
19230 \family sans
19231 Undo Last Checkin
19232 \end_layout
19233
19234 \begin_layout Standard
19235 This makes as if the last check in never happened.
19236  No changes are made to the document loaded into LyX, but the last version
19237  is removed from the master RCS file.
19238  
19239 \end_layout
19240
19241 \begin_layout Standard
19242 RCS command: 
19243 \family typewriter
19244 rcs -o<version> <file-name>
19245 \end_layout
19246
19247 \begin_layout Subsubsection
19248
19249 \family sans
19250 Show History
19251 \end_layout
19252
19253 \begin_layout Standard
19254 This shows the complete history of the RCS document.
19255  The output of 
19256 \family typewriter
19257 rlog <file-name>
19258 \family default
19259  is shown in a browser.
19260  See 
19261 \family typewriter
19262 man rlog
19263 \family default
19264  for more info.
19265 \end_layout
19266
19267 \begin_layout Subsubsection
19268 Revision info
19269 \end_layout
19270
19271 \begin_layout Standard
19272 LyX supports RCS version number information (only), see 
19273 \begin_inset CommandInset ref
19274 LatexCommand ref
19275 reference "sub:VCS-Revision-Information"
19276
19277 \end_inset
19278
19279  for details.
19280 \end_layout
19281
19282 \begin_layout Subsection
19283 CVS commands in LyX
19284 \end_layout
19285
19286 \begin_layout Standard
19287 A subset of CVS operations is supported by LyX.
19288  You can find the commands in the 
19289 \family sans
19290 File\SpecialChar \menuseparator
19291 Version
19292 \begin_inset space ~
19293 \end_inset
19294
19295 Control
19296 \family default
19297  submenu.
19298  The version control system SVN is more powerful, so please use it instead
19299  of CVS if possible.
19300 \end_layout
19301
19302 \begin_layout Subsubsection
19303
19304 \family sans
19305 General CVS usage
19306 \end_layout
19307
19308 \begin_layout Standard
19309 If you start from scratch with CVS you have to create your repository and
19310  checkout the working copy with external tools.
19311  If you're using a client-server setup you may need to login before doing
19312  the first repository checkout.
19313 \end_layout
19314
19315 \begin_layout Standard
19316 If your documents are under revision control and others are using the same
19317  repository problems arise when different changes to the same document at
19318  the same location happen.
19319  Standard CVS repositories doesn't operate with a file locking mechanism.
19320  This may be surprising, but conflicts only occur if people disagree on
19321  the proper content of the same part of a document.
19322  So, if co-workers are used to communicate regularly, these conflicts occur
19323  rarely.
19324  If they don't communicate they have a fundamental problem anyway.
19325  Nevertheless some people like to work with so called 
19326 \begin_inset Quotes eld
19327 \end_inset
19328
19329 reserved checkouts
19330 \begin_inset Quotes erd
19331 \end_inset
19332
19333 .
19334  If they do so the working copy of all files is readonly when checked out
19335  first and the user starts editing after using a special command to make
19336  the working copy writable.
19337  When the changes are checked in the working copy returns to readonly state.
19338  With LyX one has to edit the 
19339 \begin_inset Flex Code
19340 status collapsed
19341
19342 \begin_layout Plain Layout
19343 .cvsrc
19344 \end_layout
19345
19346 \end_inset
19347
19348  file and add the line 
19349 \begin_inset Flex Code
19350 status collapsed
19351
19352 \begin_layout Plain Layout
19353 cvs -r
19354 \end_layout
19355
19356 \end_inset
19357
19358  to work with reserved checkouts.
19359  The benefit is the possibility to see who is using a writable copy of some
19360  document.
19361  It's not guaranteed only one user makes a copy writable.
19362 \end_layout
19363
19364 \begin_layout Standard
19365 LyX tries to guess if you're using reserved or non-reserved checkouts.
19366  If your working copy is readonly or it is writable and an additional copy
19367  of your document exists in the CVS/Base sub-directory a reserved otherwise
19368  a non-reserved checkout is assumed.
19369  When a reserved checkout is detected you have to use 
19370 \begin_inset Flex MenuItem
19371 status collapsed
19372
19373 \begin_layout Plain Layout
19374 Check Out
19375 \end_layout
19376
19377 \end_inset
19378
19379  to make your working copy writable if it's readonly.
19380  After doing so the 
19381 \begin_inset Flex MenuItem
19382 status collapsed
19383
19384 \begin_layout Plain Layout
19385 Check In
19386 \end_layout
19387
19388 \end_inset
19389
19390  operation is possible and that makes your working copy readonly again after
19391  transferring your changes to the repository.
19392 \end_layout
19393
19394 \begin_layout Standard
19395 More information about CVS can be found here 
19396 \begin_inset Flex URL
19397 status collapsed
19398
19399 \begin_layout Plain Layout
19400
19401 http://www.nongnu.org/cvs
19402 \end_layout
19403
19404 \end_inset
19405
19406  and here 
19407 \begin_inset Flex URL
19408 status collapsed
19409
19410 \begin_layout Plain Layout
19411
19412 http://ximbiot.com/cvs
19413 \end_layout
19414
19415 \end_inset
19416
19417 .
19418 \end_layout
19419
19420 \begin_layout Standard
19421 Read 
19422 \family typewriter
19423 man cvs
19424 \family default
19425  to understand the sub-commands and the switches mentioned below.
19426 \end_layout
19427
19428 \begin_layout Subsubsection
19429
19430 \family sans
19431 Register
19432 \end_layout
19433
19434 \begin_layout Standard
19435 If your document is not under revision control, this is the only item shown
19436  in the menu.
19437  And if it is under revision control, the 
19438 \family sans
19439 \bar under
19440 R
19441 \bar default
19442 egister
19443 \family default
19444  item is not visible.
19445  
19446 \end_layout
19447
19448 \begin_layout Standard
19449 This command registers in CVS your document 
19450 \begin_inset Flex Strong
19451 status collapsed
19452
19453 \begin_layout Plain Layout
19454
19455 \emph on
19456 only
19457 \end_layout
19458
19459 \end_inset
19460
19461  in case you have already the documents directory under CVS control (in
19462  particular 
19463 \family typewriter
19464 CVS/Entries
19465 \family default
19466  file exists).
19467  This means you have to create or checkout the archive by yourself using
19468  external tools.
19469  (In case you forget that step LyX registers the document with RCS.)
19470 \end_layout
19471
19472 \begin_layout Standard
19473 Then you are asked interactively to supply an initial description of the
19474  document.
19475  Don't forget that registered file is not yet checked in.
19476 \end_layout
19477
19478 \begin_layout Standard
19479 CVS command that is run: 
19480 \family typewriter
19481 cvs -q add -m"<entered message>" "<file-name>"
19482 \end_layout
19483
19484 \begin_layout Standard
19485 The term 
19486 \family typewriter
19487 "<file-name>"
19488 \family default
19489  above and for all other CVS commands is an abbreviation for 
19490 \begin_inset Quotes eld
19491 \end_inset
19492
19493 change the current working directory to file location and use the file name
19494  without path component as argument
19495 \begin_inset Quotes erd
19496 \end_inset
19497
19498 .
19499 \end_layout
19500
19501 \begin_layout Subsubsection
19502
19503 \family sans
19504 Check In Changes
19505 \end_layout
19506
19507 \begin_layout Standard
19508 When you are finished editing a file, you commit your changes.
19509  When you do this and you had changed the document, you are asked for a
19510  description of the changes.
19511  After that changes are written to the repository.
19512  In case you didn't change the document and a reserved checkout is detected
19513  the reservation made on 
19514 \begin_inset Flex MenuItem
19515 status collapsed
19516
19517 \begin_layout Plain Layout
19518 Check Out
19519 \end_layout
19520
19521 \end_inset
19522
19523  is undone.
19524 \end_layout
19525
19526 \begin_layout Labeling
19527 \labelwidthstring 00.00.0000
19528 CVS
19529 \begin_inset space ~
19530 \end_inset
19531
19532 command: 
19533 \begin_inset space ~
19534 \end_inset
19535
19536
19537 \begin_inset Newline newline
19538 \end_inset
19539
19540
19541 \begin_inset Flex Code
19542 status collapsed
19543
19544 \begin_layout Plain Layout
19545 cvs 
19546 \family typewriter
19547 -q commit -m"<description>" "<file-name>"
19548 \end_layout
19549
19550 \end_inset
19551
19552  or
19553 \begin_inset Newline newline
19554 \end_inset
19555
19556
19557 \begin_inset Flex Code
19558 status collapsed
19559
19560 \begin_layout Plain Layout
19561 cvs -q unedit 
19562 \family typewriter
19563 "<file-name>"
19564 \end_layout
19565
19566 \end_inset
19567
19568
19569 \end_layout
19570
19571 \begin_layout Subsubsection
19572
19573 \family sans
19574 Check Out Changes
19575 \end_layout
19576
19577 \begin_layout Standard
19578 When you are sharing a repository with others, you may have to incorporate
19579  their changes into your working copy.
19580 \end_layout
19581
19582 \begin_layout Standard
19583 CVS command: 
19584 \family typewriter
19585 cvs -q update "<file-name>"
19586 \end_layout
19587
19588 \begin_layout Standard
19589 If a readonly checkout is detected the working copy is made writable and
19590  reserved.
19591 \end_layout
19592
19593 \begin_layout Standard
19594 CVS command: 
19595 \family typewriter
19596 cvs -q edit "<file-name>"
19597 \end_layout
19598
19599 \begin_layout Subsubsection
19600
19601 \family sans
19602 Revert To Repository Version
19603 \end_layout
19604
19605 \begin_layout Standard
19606 This will discard all changes made to the document since the last check
19607  in.
19608  You get a warning before changes are discarded.
19609  Firstly the file is deleted, secondly CVS update command is run.
19610 \end_layout
19611
19612 \begin_layout Standard
19613 CVS command: 
19614 \family typewriter
19615 cvs -q update "<file-name>"
19616 \end_layout
19617
19618 \begin_layout Standard
19619 If a reserved checkout is detected and the working copy has no changes only
19620  the reservation is undone.
19621 \end_layout
19622
19623 \begin_layout Standard
19624 CVS command: 
19625 \family typewriter
19626 cvs -q unedit "<file-name>"
19627 \end_layout
19628
19629 \begin_layout Subsubsection
19630 Update of the local directory checkout from repository
19631 \end_layout
19632
19633 \begin_layout Standard
19634 Once your documents gets more complex, containing sub-documents and pictures,
19635  including external 
19636 \begin_inset Flex Code
19637 status collapsed
19638
19639 \begin_layout Plain Layout
19640 .tex
19641 \end_layout
19642
19643 \end_inset
19644
19645  files and so on using version control becomes more complicated.
19646  LyX supports updating the whole tree in which resides the document.
19647  This become especially useful once you cooperate with people which neither
19648  have detailed knowledge about CVS usage nor they have ambition to commit
19649  additional material to the repository.
19650  You have to organize the files structure so that all external files are
19651  in the same directory or subdirectories of the document.
19652  It's good practice anyway to store multipart documents in an extra directory.
19653 \end_layout
19654
19655 \begin_layout Standard
19656 The 
19657 \begin_inset Flex Code
19658 status collapsed
19659
19660 \begin_layout Plain Layout
19661 Update local directory from repository
19662 \end_layout
19663
19664 \end_inset
19665
19666  command updates the whole directory.
19667  If local changes are detected user is warned before update starts.
19668  In case of merge conflicts both versions of the conflicting document parts
19669  are placed in the final document.
19670  You have to review and correct the result of the merge.
19671  You'll find the conflicts enclosed in pairs of 
19672 \begin_inset Flex Code
19673 status collapsed
19674
19675 \begin_layout Plain Layout
19676 <<<<<<<
19677 \end_layout
19678
19679 \end_inset
19680
19681  and 
19682 \begin_inset Flex Code
19683 status collapsed
19684
19685 \begin_layout Plain Layout
19686 >>>>>>>
19687 \end_layout
19688
19689 \end_inset
19690
19691  separated by 
19692 \begin_inset Flex Code
19693 status collapsed
19694
19695 \begin_layout Plain Layout
19696 =======
19697 \end_layout
19698
19699 \end_inset
19700
19701 .
19702  The first part is your version as before the update operation with the
19703  document name prepended.
19704  The second one is the repository version with the version number after
19705  the sequence of 
19706 \begin_inset Flex Code
19707 status collapsed
19708
19709 \begin_layout Plain Layout
19710 >
19711 \end_layout
19712
19713 \end_inset
19714
19715  signs.
19716 \end_layout
19717
19718 \begin_layout Labeling
19719 \labelwidthstring 00.00.0000
19720 CVS
19721 \begin_inset space ~
19722 \end_inset
19723
19724 commands: 
19725 \begin_inset space ~
19726 \end_inset
19727
19728
19729 \begin_inset Newline newline
19730 \end_inset
19731
19732
19733 \begin_inset Flex Code
19734 status collapsed
19735
19736 \begin_layout Plain Layout
19737 cd $path; cvs diff 
19738 \family typewriter
19739 "."
19740 \end_layout
19741
19742 \end_inset
19743
19744  (Ask if changes are detected.)
19745 \begin_inset Newline newline
19746 \end_inset
19747
19748
19749 \begin_inset Flex Code
19750 status collapsed
19751
19752 \begin_layout Plain Layout
19753 cd $path; cvs -q update 
19754 \family typewriter
19755 "."
19756 \end_layout
19757
19758 \end_inset
19759
19760
19761 \end_layout
19762
19763 \begin_layout Standard
19764 where 
19765 \begin_inset Flex Code
19766 status collapsed
19767
19768 \begin_layout Plain Layout
19769 $path
19770 \end_layout
19771
19772 \end_inset
19773
19774  stands for the path to the document.
19775 \end_layout
19776
19777 \begin_layout Subsubsection
19778
19779 \family sans
19780 Show History
19781 \end_layout
19782
19783 \begin_layout Standard
19784 This shows the complete history of the CVS document.
19785  The output of 
19786 \family typewriter
19787 cvs log "<file-name>"
19788 \family default
19789  is shown in a browser.
19790 \end_layout
19791
19792 \begin_layout Subsection
19793 SVN commands in LyX
19794 \end_layout
19795
19796 \begin_layout Standard
19797 SVN is now partially supported by LyX.
19798  You can find the commands in the 
19799 \family sans
19800 File\SpecialChar \menuseparator
19801 Version
19802 \begin_inset space ~
19803 \end_inset
19804
19805 Control
19806 \family default
19807  submenu.
19808  Please note that if you use password protected access to repository via
19809  ssh, you will be asked in terminal window.
19810  LyX was tested against SVN 1.5 and 1.6
19811 \begin_inset Foot
19812 status open
19813
19814 \begin_layout Plain Layout
19815 Most of the commands will work with 1.4 too, see 
19816 \begin_inset CommandInset ref
19817 LatexCommand ref
19818 reference "sub:SVN-Repo-Update"
19819
19820 \end_inset
19821
19822 .
19823 \end_layout
19824
19825 \end_inset
19826
19827
19828 \end_layout
19829
19830 \begin_layout Subsubsection
19831
19832 \family sans
19833 Register
19834 \end_layout
19835
19836 \begin_layout Standard
19837 If your document is not under revision control, this is the only item shown
19838  in the menu.
19839  And if it is under revision control, the 
19840 \family sans
19841 \bar under
19842 R
19843 \bar default
19844 egister
19845 \family default
19846  item is not visible.
19847  
19848 \end_layout
19849
19850 \begin_layout Standard
19851 This command registers in SVN your document ONLY in case you have already
19852  the documents directory under SVN control (in particular 
19853 \family typewriter
19854 .svn/entries
19855 \family default
19856  file exists).
19857  This means you have to checkout the archive by yourself.
19858  
19859 \end_layout
19860
19861 \begin_layout Standard
19862 Then you are asked interactively to supply an initial description of the
19863  document.
19864  Don't forget that registered file is not yet commited.
19865 \end_layout
19866
19867 \begin_layout Standard
19868 SVN command that is run: 
19869 \family typewriter
19870 svn add -q 
19871 \begin_inset Quotes eld
19872 \end_inset
19873
19874 <file-name>
19875 \begin_inset Quotes erd
19876 \end_inset
19877
19878
19879 \end_layout
19880
19881 \begin_layout Standard
19882 Read 
19883 \family typewriter
19884 man svn
19885 \family default
19886  to understand the switches.
19887  
19888 \end_layout
19889
19890 \begin_layout Subsubsection
19891
19892 \family sans
19893 Check In Changes
19894 \end_layout
19895
19896 \begin_layout Standard
19897 When you are finished editing a file, you commit your changes.
19898  When you do this, you are asked for a description of the changes.
19899  After that changes are commited.
19900 \end_layout
19901
19902 \begin_layout Standard
19903 SVN command:
19904 \begin_inset Foot
19905 status collapsed
19906
19907 \begin_layout Plain Layout
19908 In case locking is not enabled.
19909  See Section 
19910 \begin_inset CommandInset ref
19911 LatexCommand ref
19912 reference "subsec:SVN-File-Locking"
19913
19914 \end_inset
19915
19916 .
19917 \end_layout
19918
19919 \end_inset
19920
19921  
19922 \family typewriter
19923 svn commit -q -m"<description>" <file-name>
19924 \end_layout
19925
19926 \begin_layout Subsubsection
19927
19928 \family sans
19929 Check Out For Edit
19930 \end_layout
19931
19932 \begin_layout Standard
19933 Updates the changes of this file from the repository.
19934  Be sure you understand SVN merging and conflicts resolving before using
19935  this function, because all conflicts has to be resolved manually by you!
19936 \end_layout
19937
19938 \begin_layout Standard
19939 SVN command:
19940 \begin_inset Foot
19941 status collapsed
19942
19943 \begin_layout Plain Layout
19944 Ditto.
19945 \end_layout
19946
19947 \end_inset
19948
19949  
19950 \family typewriter
19951 svn update --non-interactive 
19952 \begin_inset Quotes eld
19953 \end_inset
19954
19955 <file-name>
19956 \begin_inset Quotes erd
19957 \end_inset
19958
19959
19960 \end_layout
19961
19962 \begin_layout Subsubsection
19963
19964 \family sans
19965 Revert To Repository Version
19966 \end_layout
19967
19968 \begin_layout Standard
19969 This will discard all changes made to the document since the last check
19970  in.
19971  You get a warning before changes are discarded.
19972  
19973 \end_layout
19974
19975 \begin_layout Standard
19976 SVN command: 
19977 \family typewriter
19978 svn revert -q 
19979 \begin_inset Quotes eld
19980 \end_inset
19981
19982 <file-name>
19983 \begin_inset Quotes erd
19984 \end_inset
19985
19986
19987 \end_layout
19988
19989 \begin_layout Subsubsection
19990 \begin_inset CommandInset label
19991 LatexCommand label
19992 name "sub:SVN-Repo-Update"
19993
19994 \end_inset
19995
19996 Update of the local directory checkout from repository
19997 \begin_inset Foot
19998 status collapsed
19999
20000 \begin_layout Plain Layout
20001 Note that this command will work only with subversion 
20002 \begin_inset Formula $\geqq1.5$
20003 \end_inset
20004
20005
20006 \end_layout
20007
20008 \end_inset
20009
20010
20011 \end_layout
20012
20013 \begin_layout Standard
20014 All the commands above have one shortcomming - they deal with the current
20015  document only.
20016  Once your document contains pictures, includes external 
20017 \begin_inset Flex Code
20018 status collapsed
20019
20020 \begin_layout Plain Layout
20021 .tex
20022 \end_layout
20023
20024 \end_inset
20025
20026  files and so on administration becomes more complicated.
20027  LyX now supports updating the whole tree in which resides the document
20028 \begin_inset Foot
20029 status collapsed
20030
20031 \begin_layout Plain Layout
20032 One need to organize the files structure so that all external files are
20033  in the same directory or subdirectories of the document.
20034  
20035 \end_layout
20036
20037 \end_inset
20038
20039 .
20040  This become especially useful once you cooperate with people which neither
20041  know about subversion management nor they have ambition to commit additional
20042  material to the repository.
20043  
20044 \end_layout
20045
20046 \begin_layout Standard
20047 \begin_inset Flex Code
20048 status collapsed
20049
20050 \begin_layout Plain Layout
20051 Update local directory from repository
20052 \end_layout
20053
20054 \end_inset
20055
20056  command updates the whole directory and in case of merge conflicts local
20057  version of the files are left, so no unintended data loss occurs.
20058  If local changes are detected user is warned before update starts.
20059 \end_layout
20060
20061 \begin_layout Labeling
20062 \labelwidthstring 00.00.0000
20063 SVN
20064 \begin_inset space ~
20065 \end_inset
20066
20067 commands: 
20068 \begin_inset space ~
20069 \end_inset
20070
20071
20072 \begin_inset Newline newline
20073 \end_inset
20074
20075
20076 \begin_inset Flex Code
20077 status collapsed
20078
20079 \begin_layout Plain Layout
20080 svn diff $path
20081 \end_layout
20082
20083 \end_inset
20084
20085  (Ask if changes are detected.)
20086 \begin_inset Newline newline
20087 \end_inset
20088
20089
20090 \begin_inset Flex Code
20091 status collapsed
20092
20093 \begin_layout Plain Layout
20094 svn update --accept mine-full $path
20095 \end_layout
20096
20097 \end_inset
20098
20099
20100 \end_layout
20101
20102 \begin_layout Standard
20103 where 
20104 \begin_inset Flex Code
20105 status collapsed
20106
20107 \begin_layout Plain Layout
20108 $path
20109 \end_layout
20110
20111 \end_inset
20112
20113  stands for the path to the document.
20114 \end_layout
20115
20116 \begin_layout Subsubsection
20117
20118 \family sans
20119 Show History
20120 \end_layout
20121
20122 \begin_layout Standard
20123 This shows the complete history of the SVN document.
20124  The output of 
20125 \family typewriter
20126 svn log 
20127 \begin_inset Quotes eld
20128 \end_inset
20129
20130 <file-name>
20131 \begin_inset Quotes erd
20132 \end_inset
20133
20134
20135 \family default
20136  is shown in a browser.
20137 \end_layout
20138
20139 \begin_layout Subsubsection
20140 File Locking
20141 \begin_inset CommandInset label
20142 LatexCommand label
20143 name "subsec:SVN-File-Locking"
20144
20145 \end_inset
20146
20147
20148 \end_layout
20149
20150 \begin_layout Standard
20151 The file exchange through various revision control systems brings the problem
20152  of merge conflicts in case two different users try to edit the same (parts
20153  of) document.
20154  When such a conflict happens it needs manual resolving and one reasonable
20155  alternative is to provide some kind of locking mechanism, which guarantees
20156  that only one user is allowed to edit file at the given time.
20157 \end_layout
20158
20159 \begin_layout Standard
20160 SVN has two such mechanisms to provide mutual exclusivity for file access
20161  - locks and automatic setting of write permissions (see sec.
20162  
20163 \begin_inset CommandInset ref
20164 LatexCommand ref
20165 reference "subsec:Automatical-Locking-Property"
20166
20167 \end_inset
20168
20169 ) based on 
20170 \begin_inset Flex Code
20171 status collapsed
20172
20173 \begin_layout Plain Layout
20174 svn:needs-lock
20175 \end_layout
20176
20177 \end_inset
20178
20179  file svn property
20180 \begin_inset Foot
20181 status open
20182
20183 \begin_layout Plain Layout
20184 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20185 \end_layout
20186
20187 \end_inset
20188
20189 .
20190  If this property is detected for a given document LyX starts to use SVN
20191  locks for document editing automatically and the whole check-in/out mechanism
20192  switches to the same regimen as for RCS.
20193  This in particular means there are two different modes of file use in LyX:
20194 \end_layout
20195
20196 \begin_layout Itemize
20197 Unlocked state.
20198  The loaded file is in the read-only mode.
20199  For editing on needs to check-out.
20200  
20201 \emph on
20202 Check-out
20203 \emph default
20204  consists of updating from the repository and gaining write lock.
20205  If the lock is not possible to obtain, we remain in unlocked state.
20206 \end_layout
20207
20208 \begin_layout Itemize
20209 Locked state.
20210  The loaded file is in the 'normal' edit mode.
20211  No other user is allowed to edit the file.
20212  
20213 \emph on
20214 Check-in
20215 \emph default
20216  consists of commiting changes and releasing write-lock.
20217  If no changes have been made to the document, no commit will be produced
20218 \begin_inset Foot
20219 status collapsed
20220
20221 \begin_layout Plain Layout
20222 Don't be puzzled by the fact that you will be asked for commit message anyway.
20223 \end_layout
20224
20225 \end_inset
20226
20227  and only the write-lock will be released.
20228 \end_layout
20229
20230 \begin_layout Standard
20231 SVN commands:
20232 \end_layout
20233
20234 \begin_layout Labeling
20235 \labelwidthstring 00.00.0000
20236 Check-in:
20237 \family typewriter
20238  svn commit -q -m"<description>" "<file-name>"
20239 \begin_inset Newline newline
20240 \end_inset
20241
20242 svn unlock "<file-name>"
20243 \end_layout
20244
20245 \begin_layout Labeling
20246 \labelwidthstring 00.00.0000
20247 Check-out: 
20248 \family typewriter
20249 svn update "<file-name>"
20250 \begin_inset Newline newline
20251 \end_inset
20252
20253 svn lock "<file-name>"
20254 \end_layout
20255
20256 \begin_layout Subsubsection
20257
20258 \family typewriter
20259 \begin_inset CommandInset label
20260 LatexCommand label
20261 name "subsec:Automatical-Locking-Property"
20262
20263 \end_inset
20264
20265
20266 \family default
20267 Automatic Locking Property
20268 \end_layout
20269
20270 \begin_layout Standard
20271 The above mentioned automatic setting of write permissions of the .lyx file
20272  can be set through
20273 \family sans
20274 \bar under
20275  F
20276 \bar default
20277 ile\SpecialChar \menuseparator
20278
20279 \bar under
20280 V
20281 \bar default
20282 ersion
20283 \begin_inset space ~
20284 \end_inset
20285
20286 Control\SpecialChar \menuseparator
20287
20288 \bar under
20289 T
20290 \bar default
20291 oggle locking property
20292 \family default
20293 .
20294  This command is active only when the file is not locked on the svn server
20295  (i.e.
20296  you need to check-out before proceeding).
20297 \end_layout
20298
20299 \begin_layout Labeling
20300 \labelwidthstring 00.00.0000
20301 SVN
20302 \begin_inset space ~
20303 \end_inset
20304
20305 commands:
20306 \end_layout
20307
20308 \begin_layout Labeling
20309 \labelwidthstring 00.00.0000
20310 Set:
20311 \family typewriter
20312  svn propset svn:needs-lock ON "<file-name>"
20313 \end_layout
20314
20315 \begin_layout Labeling
20316 \labelwidthstring 00.00.0000
20317 Unset: 
20318 \family typewriter
20319 svn propdel svn:needs-lock "<file-name>"
20320 \end_layout
20321
20322 \begin_layout Subsubsection
20323 \begin_inset CommandInset label
20324 LatexCommand label
20325 name "sub:VCS-Revision-Information"
20326
20327 \end_inset
20328
20329 Revision Information in Documents
20330 \end_layout
20331
20332 \begin_layout Standard
20333 There are more possibilities how to activate revision information in our
20334  document.
20335 \end_layout
20336
20337 \begin_layout Itemize
20338 LyX supports directly:
20339 \end_layout
20340
20341 \begin_deeper
20342 \begin_layout Itemize
20343 tree revision information (
20344 \begin_inset Flex Code
20345 status collapsed
20346
20347 \begin_layout Plain Layout
20348 vcs-tree-revision
20349 \end_layout
20350
20351 \end_inset
20352
20353 ).
20354  The result is the output of the 
20355 \begin_inset Flex Code
20356 status collapsed
20357
20358 \begin_layout Plain Layout
20359 svnversion
20360 \end_layout
20361
20362 \end_inset
20363
20364  command, the following table gives you an idea, how to read the results.
20365 \end_layout
20366
20367 \begin_layout Standard
20368 \align center
20369 \begin_inset Tabular
20370 <lyxtabular version="3" rows="6" columns="2">
20371 <features tabularvalignment="middle">
20372 <column alignment="center" valignment="top" width="0">
20373 <column alignment="center" valignment="top" width="0">
20374 <row>
20375 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20376 \begin_inset Text
20377
20378 \begin_layout Plain Layout
20379 Output
20380 \end_layout
20381
20382 \end_inset
20383 </cell>
20384 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20385 \begin_inset Text
20386
20387 \begin_layout Plain Layout
20388 Meaning
20389 \end_layout
20390
20391 \end_inset
20392 </cell>
20393 </row>
20394 <row>
20395 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20396 \begin_inset Text
20397
20398 \begin_layout Plain Layout
20399 4123:4168
20400 \end_layout
20401
20402 \end_inset
20403 </cell>
20404 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20405 \begin_inset Text
20406
20407 \begin_layout Plain Layout
20408 mixed revision working copy
20409 \end_layout
20410
20411 \end_inset
20412 </cell>
20413 </row>
20414 <row>
20415 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20416 \begin_inset Text
20417
20418 \begin_layout Plain Layout
20419 4168M
20420 \end_layout
20421
20422 \end_inset
20423 </cell>
20424 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20425 \begin_inset Text
20426
20427 \begin_layout Plain Layout
20428 modified working copy
20429 \end_layout
20430
20431 \end_inset
20432 </cell>
20433 </row>
20434 <row>
20435 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20436 \begin_inset Text
20437
20438 \begin_layout Plain Layout
20439 4123S
20440 \end_layout
20441
20442 \end_inset
20443 </cell>
20444 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20445 \begin_inset Text
20446
20447 \begin_layout Plain Layout
20448 switched working copy
20449 \end_layout
20450
20451 \end_inset
20452 </cell>
20453 </row>
20454 <row>
20455 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20456 \begin_inset Text
20457
20458 \begin_layout Plain Layout
20459 4123P
20460 \end_layout
20461
20462 \end_inset
20463 </cell>
20464 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20465 \begin_inset Text
20466
20467 \begin_layout Plain Layout
20468 partial working copy, from a sparse checkout
20469 \end_layout
20470
20471 \end_inset
20472 </cell>
20473 </row>
20474 <row>
20475 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20476 \begin_inset Text
20477
20478 \begin_layout Plain Layout
20479 4123:4168MS
20480 \end_layout
20481
20482 \end_inset
20483 </cell>
20484 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20485 \begin_inset Text
20486
20487 \begin_layout Plain Layout
20488 mixed revision, modified, switched working copy
20489 \end_layout
20490
20491 \end_inset
20492 </cell>
20493 </row>
20494 </lyxtabular>
20495
20496 \end_inset
20497
20498
20499 \end_layout
20500
20501 \begin_layout Itemize
20502 file revision information.
20503  The result comes from parsing the output of 
20504 \begin_inset Flex Code
20505 status collapsed
20506
20507 \begin_layout Plain Layout
20508 svn
20509 \begin_inset space ~
20510 \end_inset
20511
20512 info
20513 \begin_inset space ~
20514 \end_inset
20515
20516 --xml
20517 \begin_inset space ~
20518 \end_inset
20519
20520 file.lyx
20521 \end_layout
20522
20523 \end_inset
20524
20525 .
20526  Supported flags are:
20527 \end_layout
20528
20529 \begin_deeper
20530 \begin_layout Itemize
20531 version number of the last commit (
20532 \begin_inset Flex Code
20533 status collapsed
20534
20535 \begin_layout Plain Layout
20536 vcs-revision
20537 \end_layout
20538
20539 \end_inset
20540
20541 )
20542 \end_layout
20543
20544 \begin_layout Itemize
20545 author of the last commit (
20546 \begin_inset Flex Code
20547 status collapsed
20548
20549 \begin_layout Plain Layout
20550 vcs-author
20551 \end_layout
20552
20553 \end_inset
20554
20555 )
20556 \end_layout
20557
20558 \begin_layout Itemize
20559 date of the last commit (
20560 \begin_inset Flex Code
20561 status collapsed
20562
20563 \begin_layout Plain Layout
20564 vcs-date
20565 \end_layout
20566
20567 \end_inset
20568
20569 )
20570 \end_layout
20571
20572 \begin_layout Itemize
20573 time of the last commit (
20574 \begin_inset Flex Code
20575 status collapsed
20576
20577 \begin_layout Plain Layout
20578 vcs-time
20579 \end_layout
20580
20581 \end_inset
20582
20583 )
20584 \end_layout
20585
20586 \end_deeper
20587 \begin_layout Standard
20588 You can obtain this info via InsetInfo (e.g.
20589  
20590 \begin_inset Flex Code
20591 status collapsed
20592
20593 \begin_layout Plain Layout
20594 info-insert buffer vcs-date
20595 \end_layout
20596
20597 \end_inset
20598
20599 ).
20600  The information will be available only when you have the file stored under
20601  svn managment (i.e.
20602  the 
20603 \begin_inset Flex Code
20604 status collapsed
20605
20606 \begin_layout Plain Layout
20607 .svn
20608 \end_layout
20609
20610 \end_inset
20611
20612  directory is available with your document).
20613 \end_layout
20614
20615 \end_deeper
20616 \begin_layout Itemize
20617 Another---a hacking one---possibility is to use svn keywords
20618 \begin_inset Foot
20619 status collapsed
20620
20621 \begin_layout Plain Layout
20622 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20623 \end_layout
20624
20625 \end_inset
20626
20627 .
20628  In short -- you set file keywords property (e.g.
20629  
20630 \family sans
20631 svn propset svn:keywords 'Rev' file.lyx
20632 \family default
20633 ) and then paste keyword TeX code
20634 \begin_inset Foot
20635 status collapsed
20636
20637 \begin_layout Plain Layout
20638 This is an easy way how to ensure that LyX won't break the line in the middle
20639  of keyword tag.
20640 \end_layout
20641
20642 \end_inset
20643
20644  tag in your document (e.g.
20645  
20646 \begin_inset ERT
20647 status open
20648
20649 \begin_layout Plain Layout
20650
20651 $Rev$
20652 \end_layout
20653
20654 \end_inset
20655
20656 ).
20657  This way svn client will automatically substitute revision number (e.g.
20658  
20659 \begin_inset ERT
20660 status open
20661
20662 \begin_layout Plain Layout
20663
20664 $Rev: 59 $
20665 \end_layout
20666
20667 \end_inset
20668
20669 ) after each update and commit.
20670  There are more problems with this approach.
20671  Firstly, the '$' character is used in TeX world for math equations, so
20672  any occurence of math formula 
20673 \begin_inset Formula $Rev$
20674 \end_inset
20675
20676  become 
20677 \begin_inset Formula $Rev:59$
20678 \end_inset
20679
20680  in your LyX document.
20681  Similarly for other keywords like Id, Date, Author, etc.
20682  Secondly svn output is dependent on your locales, so its very easy that
20683  svn would produce some problematic strings once Date is used.
20684  Thirdly you get the whole 'Rev: 59' string in your document instead of
20685  the plain number.
20686  Until subversion implements user's custom keywords it will be hard to use
20687  this approach reliably or let LyX to support it directly.
20688 \end_layout
20689
20690 \begin_layout Subsection
20691 SVN and Windows Environment
20692 \end_layout
20693
20694 \begin_layout Quote
20695 My inclination is to say that if the user cannot figure out the command
20696  line operations on their own fairly quickly, they would be well advised
20697  to use TortoiseSVN.
20698  ---P.
20699  A.
20700  Rubin
20701 \end_layout
20702
20703 \begin_layout Subsubsection
20704 Preparation
20705 \end_layout
20706
20707 \begin_layout Standard
20708 In addition to installing LyX, and having access to a Subversion repository,
20709  the user will need to install the Subversion client program.
20710  A Windows installer for the client program is available from 
20711 \begin_inset CommandInset href
20712 LatexCommand href
20713 name "CollabNet"
20714 target "http://www.collab.net/nonav/downloads/subversion/"
20715
20716 \end_inset
20717
20718 .
20719  The user may also want to install 
20720 \begin_inset CommandInset href
20721 LatexCommand href
20722 name "TortoiseSVN"
20723 target "http://tortoisesvn.tigris.org/"
20724
20725 \end_inset
20726
20727 , which integrates Subversion operations into the context (rightclick) menu
20728  of Windows Explorer.
20729  Operations done outside LyX will typically be more convenient using the
20730  Explorer context menu.
20731  Note that TortoiseSVN is not a replacement for the client program, which
20732  is what LyX itself will use.
20733 \end_layout
20734
20735 \begin_layout Subsubsection
20736 Bringing a document under Subversion control
20737 \end_layout
20738
20739 \begin_layout Standard
20740 Before a LyX document can be brought under version control in Subversion,
20741  its parent directory needs to be under version control.
20742  If the document is being added to a project already in the repository,
20743  this is accomplished by checking the project out to the directory where
20744  the new document will be placed.
20745  If the project itself is not yet under version control (for instance, if
20746  this document starts a new project), the directory must be imported into
20747  the repository.
20748  This is done outside LyX.
20749  Both import and checkout are easily accomplished from the Explorer context
20750  menu using TortoiseSVN, or alternatively can be done using the command
20751  line client at a DOS prompt.
20752  The procedure for importing the project using TortoiseSVN is described
20753  below, assuming an existing repository and a new project being started
20754  in 
20755 \family typewriter
20756 C:
20757 \backslash
20758 new project
20759 \family default
20760 .
20761  For information on using the Subversion client program, run 
20762 \family typewriter
20763 svn --help 
20764 \family default
20765 in a DOS shell.
20766 \end_layout
20767
20768 \begin_layout Enumerate
20769 Locate 
20770 \family typewriter
20771 C:
20772 \backslash
20773 new project 
20774 \family default
20775 in Windows Explorer, right click it, and select 
20776 \family typewriter
20777 TortoiseSVN > Repo-browser
20778 \family default
20779 .
20780  If necessary, adjust the URL for the repository, then click OK.
20781 \end_layout
20782
20783 \begin_layout Enumerate
20784 Right click the level of the repository under which you want to place the
20785  new project folder (typically the top level) and click 
20786 \family typewriter
20787 Create folder\SpecialChar \ldots{}
20788
20789 \family default
20790  Supply a name for the project folder and click OK.
20791  Add a message for the log file if desired, then click OK again.
20792  The new project folder should appear in the repository.
20793  Finally, click OK again to exit the repository browser.
20794 \end_layout
20795
20796 \begin_layout Enumerate
20797 Once again right click 
20798 \family typewriter
20799 C:
20800 \backslash
20801 new project
20802 \family default
20803 , this time selecting SVN Checkout\SpecialChar \ldots{}
20804  Select the URL of the project folder
20805  you just created in the repository, and set the checkout directory to 
20806 \family typewriter
20807 C:
20808 \backslash
20809 new project.
20810
20811 \family default
20812  Click OK.
20813  You will be warned about a non-empty folder; click OK to proceed.
20814  You should now have a 
20815 \family typewriter
20816 .svn
20817 \family default
20818  directory under 
20819 \family typewriter
20820 C:
20821 \backslash
20822 new project.
20823 \end_layout
20824
20825 \begin_layout Enumerate
20826 Create or open your document in LyX and click 
20827 \family sans
20828 \bar under
20829 F
20830 \bar default
20831 ile\SpecialChar \menuseparator
20832
20833 \bar under
20834 V
20835 \bar default
20836 ersion
20837 \begin_inset space ~
20838 \end_inset
20839
20840 Control\SpecialChar \menuseparator
20841
20842 \bar under
20843 R
20844 \bar default
20845 egister.
20846  
20847 \family default
20848 Add a log message and click OK to commit the document to version control.
20849 \end_layout
20850
20851 \begin_layout Standard
20852 From this point onward, you should have full functionality in the 
20853 \family sans
20854 \bar under
20855 F
20856 \bar default
20857 ile\SpecialChar \menuseparator
20858
20859 \bar under
20860 V
20861 \bar default
20862 ersion
20863 \begin_inset space ~
20864 \end_inset
20865
20866 Control
20867 \family default
20868  menu.
20869  You also have the option of checking the document in and out, viewing its
20870  history, etc.
20871  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20872  client program from a command prompt.
20873 \end_layout
20874
20875 \begin_layout Subsubsection
20876 SSH tunnel used with SVN under Windows
20877 \end_layout
20878
20879 \begin_layout Standard
20880 Compared with Linux setting up svn client to communicate over ssh under
20881  Windows is a rather troublesome task.
20882  We will at least offer some hints how to setup the client side but prior
20883  knowledge about ssh and the Windows command line is needed, also be prepared
20884  for a great deal of frustration\SpecialChar \ldots{}
20885
20886 \end_layout
20887
20888 \begin_layout Enumerate
20889 Get a svn client for windows, as described in the previous sections.
20890  When it is a fresh install run some svn command (e.g.
20891  
20892 \begin_inset Flex Code
20893 status collapsed
20894
20895 \begin_layout Plain Layout
20896 svn --version
20897 \end_layout
20898
20899 \end_inset
20900
20901 ) to create config files, which you will need to change later on.
20902 \end_layout
20903
20904 \begin_layout Enumerate
20905 Choose a ssh client for Windows.
20906  There are several possibilities, we will use the one from Putty tools
20907 \begin_inset Foot
20908 status open
20909
20910 \begin_layout Plain Layout
20911 \begin_inset Flex URL
20912 status collapsed
20913
20914 \begin_layout Plain Layout
20915
20916 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20917 \end_layout
20918
20919 \end_inset
20920
20921
20922 \end_layout
20923
20924 \end_inset
20925
20926 .
20927  You will need to set the connection up so that the client doesn't ask for
20928  any password from you.
20929  To keep things easy we will use only keys without any additional password
20930  protection etc.
20931 \end_layout
20932
20933 \begin_deeper
20934 \begin_layout Enumerate
20935 Generate keys by 
20936 \begin_inset Flex Code
20937 status collapsed
20938
20939 \begin_layout Plain Layout
20940 puttygen
20941 \end_layout
20942
20943 \end_inset
20944
20945 .
20946  Save your private .ppk key file and put the public one on the server side.
20947  If the SVN server runs on Linux, note that the format of the public key
20948  is not compatible with Linux openssh and you will need to direcly copy-paste
20949  the key from the “
20950 \emph on
20951 Public key for pasting into OpenSSH authorized_keys file
20952 \emph default
20953 :” edit field into the server's 
20954 \begin_inset Flex Code
20955 status collapsed
20956
20957 \begin_layout Plain Layout
20958 ~/.ssh/authorized_keys
20959 \end_layout
20960
20961 \end_inset
20962
20963
20964 \begin_inset Flex Code
20965 status collapsed
20966
20967 \begin_layout Plain Layout
20968 authorized_keys2
20969 \end_layout
20970
20971 \end_inset
20972
20973  file.
20974 \end_layout
20975
20976 \begin_layout Enumerate
20977 Get the Putty's 
20978 \begin_inset Flex Code
20979 status collapsed
20980
20981 \begin_layout Plain Layout
20982 plink
20983 \end_layout
20984
20985 \end_inset
20986
20987 .
20988  In the SVN config file
20989 \begin_inset Foot
20990 status collapsed
20991
20992 \begin_layout Plain Layout
20993 Exact path depends on Windows version, usually somewhere around 
20994 \begin_inset Flex Code
20995 status collapsed
20996
20997 \begin_layout Plain Layout
20998 c:
20999 \backslash
21000 Documents and Settings
21001 \backslash
21002 user
21003 \backslash
21004 Application Data
21005 \backslash
21006 Subversion
21007 \backslash
21008 config
21009 \end_layout
21010
21011 \end_inset
21012
21013  / 
21014 \begin_inset Flex Code
21015 status collapsed
21016
21017 \begin_layout Plain Layout
21018 AppData
21019 \backslash
21020 Roaming
21021 \backslash
21022 Subversion
21023 \end_layout
21024
21025 \end_inset
21026
21027 .
21028 \end_layout
21029
21030 \end_inset
21031
21032 , section [tunnels], setup ssh command, e.g.
21033  
21034 \begin_inset Flex Code
21035 status collapsed
21036
21037 \begin_layout Plain Layout
21038 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21039 \end_layout
21040
21041 \end_inset
21042
21043 .
21044 \begin_inset Foot
21045 status collapsed
21046
21047 \begin_layout Plain Layout
21048 It will usually take a lot of time to get exact command right and it depends
21049  on many things.
21050  For example do not have some remote server saved as a default session in
21051  Putty etc.
21052  If things fail, try to connect via plink without SVN first.
21053 \end_layout
21054
21055 \end_inset
21056
21057
21058 \end_layout
21059
21060 \end_deeper
21061 \begin_layout Enumerate
21062 Checkout the SVN archive, e.g.
21063  
21064 \begin_inset Flex Code
21065 status collapsed
21066
21067 \begin_layout Plain Layout
21068 svn co svn+ssh://user@server/repository_path
21069 \end_layout
21070
21071 \end_inset
21072
21073 .
21074 \end_layout
21075
21076 \begin_layout Subsubsection
21077 End-of-Line Conversions
21078 \end_layout
21079
21080 \begin_layout Standard
21081 When the collsraborators are mixing Linux and Windows environments, LyX
21082  will use different line endings inside the .lyx files.
21083  This is not a problem as far as LyX functionality is concerned, but the
21084  commit diffs will be huge and merge-conflicts prone.
21085  Fortunately SVN itself knows
21086 \begin_inset Foot
21087 status collapsed
21088
21089 \begin_layout Plain Layout
21090 \begin_inset Flex URL
21091 status collapsed
21092
21093 \begin_layout Plain Layout
21094
21095 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21096 \end_layout
21097
21098 \end_inset
21099
21100
21101 \end_layout
21102
21103 \end_inset
21104
21105  how to deal with CR/LF problems when switching .lyx files to the 
21106 \begin_inset Flex Code
21107 status collapsed
21108
21109 \begin_layout Plain Layout
21110 native
21111 \end_layout
21112
21113 \end_inset
21114
21115  mode.
21116 \begin_inset Foot
21117 status collapsed
21118
21119 \begin_layout Plain Layout
21120 For the lazy guys: 
21121 \begin_inset Flex Code
21122 status collapsed
21123
21124 \begin_layout Plain Layout
21125 svn propset svn:eol-style native FILE_NAME
21126 \end_layout
21127
21128 \end_inset
21129
21130
21131 \end_layout
21132
21133 \end_inset
21134
21135
21136 \end_layout
21137
21138 \begin_layout Subsection
21139 Further tuning
21140 \end_layout
21141
21142 \begin_layout Standard
21143 With the recent addition of the vc-command function LyX power users are
21144  allowed to create their own commands for revision control.
21145 \end_layout
21146
21147 \begin_layout Standard
21148 As an example you can see how two TortoiseSVN commands could be integrated
21149  directly:
21150 \end_layout
21151
21152 \begin_layout Description
21153 Commit: 
21154 \begin_inset Flex Code
21155 status collapsed
21156
21157 \begin_layout Plain Layout
21158 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21159 \end_layout
21160
21161 \end_inset
21162
21163
21164 \end_layout
21165
21166 \begin_layout Description
21167 Revert: 
21168 \begin_inset Flex Code
21169 status collapsed
21170
21171 \begin_layout Plain Layout
21172 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21173 \end_layout
21174
21175 \end_inset
21176
21177
21178 \end_layout
21179
21180 \begin_layout Subsection
21181 Version control and Document comparison
21182 \end_layout
21183
21184 \begin_layout Standard
21185 One of the typical uses of version control is to inspect the changes between
21186  revisions, usually by creating 
21187 \begin_inset Flex Code
21188 status collapsed
21189
21190 \begin_layout Plain Layout
21191 diff
21192 \end_layout
21193
21194 \end_inset
21195
21196  dumps.
21197  While this is useful for plain text files, it is much less useful in the
21198  case of LyX files, which have more complicated structure.
21199  Hence we provide binding to the Document comparison feature.
21200  They are two ways of calling this feature - either by direct call of 
21201 \begin_inset Flex Code
21202 status collapsed
21203
21204 \begin_layout Plain Layout
21205 VC_COMPARE
21206 \end_layout
21207
21208 \end_inset
21209
21210  LyX function (for details see LyX functions manual) or by icon/menu item
21211  
21212 \begin_inset Flex MenuItem
21213 status collapsed
21214
21215 \begin_layout Plain Layout
21216 Compare with older revision...
21217 \end_layout
21218
21219 \end_inset
21220
21221 .
21222  One can either compare two chosen revisions of the document or he can simply
21223  compare the current version of edited text with older revisions (where
21224  '
21225 \begin_inset Flex MenuItem
21226 status collapsed
21227
21228 \begin_layout Plain Layout
21229 0
21230 \end_layout
21231
21232 \end_inset
21233
21234 ' revisions back means comparison of the edited file with last commited
21235  revision).
21236  
21237 \end_layout
21238
21239 \begin_layout Standard
21240 This feature is supported for SVN and RCS though due to the more complicated
21241  versioning scheme of RCS there is a constraint -- when addressing the revisions
21242  in dialog, numbers always point to the last number in RCS revision number,
21243  i.e.
21244  '35' in '1.2.35'.
21245 \end_layout
21246
21247 \begin_layout Section
21248 Literate Programming
21249 \end_layout
21250
21251 \begin_layout Standard
21252 Updated by 
21253 \noun on
21254 Kayvan Sylvan 
21255 \noun default
21256 (kayvan@sylvan.com)
21257 \noun on
21258
21259 \noun default
21260 original documentation written by 
21261 \noun on
21262 Edmar Wienskoski Jr.
21263
21264 \noun default
21265  (edmar-w-jr@technologist.com)
21266 \end_layout
21267
21268 \begin_layout Subsection
21269 Introduction
21270 \end_layout
21271
21272 \begin_layout Standard
21273 The main purpose of this documentation is to show you how to use LyX for
21274  literate programming, where it is assumed that you are familiar with this
21275  programming technique, and know what 
21276 \begin_inset Quotes eld
21277 \end_inset
21278
21279 tangling
21280 \begin_inset Quotes erd
21281 \end_inset
21282
21283  and 
21284 \begin_inset Quotes eld
21285 \end_inset
21286
21287 weaving
21288 \begin_inset Quotes erd
21289 \end_inset
21290
21291  means.
21292  If that is not the case, please follow the web links provided in the following
21293  sections.
21294  There is a lot of good documentation out there covering old development
21295  history to the latest tools tips.
21296 \end_layout
21297
21298 \begin_layout Standard
21299 It is also assumed that you are familiar with LyX itself to a point that
21300  you are comfortable changing your LyX preferences, and X resources file.
21301  If that is not the case please refer to other LyX documentation to cover
21302  your specific needs.
21303 \end_layout
21304
21305 \begin_layout Subsection
21306 Literate Programming
21307 \end_layout
21308
21309 \begin_layout Standard
21310 From the Literate Programming FAQ: 
21311 \end_layout
21312
21313 \begin_layout Quotation
21314 Literate programming is the combination of documentation and source together
21315  in a fashion suited for reading by human beings.
21316  In fact, literate programs should be enjoyable reading, even inviting!
21317  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21318  and documentation in a single file.
21319  Literate programming tools then parse the file to produce either readable
21320  documentation or compilable source.
21321  The WEB style of literate programming was created by D.
21322 \begin_inset space \thinspace{}
21323 \end_inset
21324
21325 E.
21326  Knuth during the development of his TeX typesetting software.
21327  
21328 \end_layout
21329
21330 \begin_layout Standard
21331 Another excerpt says:
21332 \end_layout
21333
21334 \begin_layout Quotation
21335
21336 \emph on
21337 How is literate programming different from verbose commenting?
21338 \end_layout
21339
21340 \begin_layout Quotation
21341 There are three distinguishing characteristics.
21342  In order of importance, they are: 
21343 \end_layout
21344
21345 \begin_deeper
21346 \begin_layout Itemize
21347 flexible order of elaboration 
21348 \end_layout
21349
21350 \begin_layout Itemize
21351 automatic support for browsing 
21352 \end_layout
21353
21354 \begin_layout Itemize
21355 typeset documentation, especially diagrams and mathematics 
21356 \end_layout
21357
21358 \end_deeper
21359 \begin_layout Standard
21360 Now that I sparked your curiosity, take a look in the references.
21361 \end_layout
21362
21363 \begin_layout Subsubsection
21364 References
21365 \end_layout
21366
21367 \begin_layout Standard
21368 The complete Literate Programming FAQ can be found at:
21369 \end_layout
21370
21371 \begin_layout Quote
21372 Literate Programming FAQ 
21373 \begin_inset Flex URL
21374 status collapsed
21375
21376 \begin_layout Plain Layout
21377
21378 http://www.literateprogramming.com/lpfaq.pdf
21379 \end_layout
21380
21381 \end_inset
21382
21383
21384 \end_layout
21385
21386 \begin_layout Standard
21387 The FAQ lists 23 (twenty three!) different literate programming tools.
21388  Where some are specialized or 
21389 \begin_inset Quotes eld
21390 \end_inset
21391
21392 tailored
21393 \begin_inset Quotes erd
21394 \end_inset
21395
21396  for particular programming languages, while other have general scope.
21397  I selected 
21398 \noun on
21399 Noweb
21400 \noun default
21401  for my own use for several reasons:
21402 \end_layout
21403
21404 \begin_layout Itemize
21405 It can generate the documentation either in LaTeX or HTML.
21406 \end_layout
21407
21408 \begin_layout Itemize
21409 It has a open architecture, i.
21410 \begin_inset space \thinspace{}
21411 \end_inset
21412
21413 g.
21414 \begin_inset space \space{}
21415 \end_inset
21416
21417 it is easy to plug in new filters and to perform special processing that
21418  you may need.
21419  
21420 \end_layout
21421
21422 \begin_layout Itemize
21423 There is a good selection of filters available already (the HTML is one
21424  of them).
21425 \end_layout
21426
21427 \begin_layout Itemize
21428 It is free.
21429 \end_layout
21430
21431 \begin_layout Standard
21432 The Noweb web page can be found at: 
21433 \end_layout
21434
21435 \begin_layout Quote
21436 Noweb home page 
21437 \begin_inset Flex URL
21438 status collapsed
21439
21440 \begin_layout Plain Layout
21441
21442 http://www.cs.virginia.edu/~nr/noweb/
21443 \end_layout
21444
21445 \end_inset
21446
21447
21448 \end_layout
21449
21450 \begin_layout Standard
21451 Starting from there you can reach many other interesting links and even
21452  some literate program examples.
21453 \end_layout
21454
21455 \begin_layout Subsection
21456 LyX and Literate Programming
21457 \end_layout
21458
21459 \begin_layout Standard
21460 The LyX support for Literate Programming is provided by using the generic
21461  LyX converters mechanism.
21462  This support is provided in a 
21463 \begin_inset Quotes eld
21464 \end_inset
21465
21466 Noweb independent
21467 \begin_inset Quotes erd
21468 \end_inset
21469
21470  way, i.
21471 \begin_inset space \thinspace{}
21472 \end_inset
21473
21474 g.
21475 \begin_inset space \space{}
21476 \end_inset
21477
21478 you will be able to use this new LyX feature with some other literate programmin
21479 g tool of your choice by just changing your LyX preferences.
21480 \end_layout
21481
21482 \begin_layout Subsubsection
21483 Generating documents and code (weaving and tangling)
21484 \end_layout
21485
21486 \begin_layout Paragraph
21487 Selecting the document class
21488 \end_layout
21489
21490 \begin_layout Standard
21491 If you have installed Noweb and LyX successfully, whenever you open a new
21492  document or try to change the document class of an existing one, you will
21493  find that there are three new document classes available:
21494 \end_layout
21495
21496 \begin_layout Itemize
21497 Article (Noweb)
21498 \end_layout
21499
21500 \begin_layout Itemize
21501 Book (Noweb)
21502 \end_layout
21503
21504 \begin_layout Itemize
21505 Report (Noweb)
21506 \end_layout
21507
21508 \begin_layout Standard
21509 You must select one of them to create your literate documents from.
21510  
21511 \end_layout
21512
21513 \begin_layout Standard
21514 Note that literate documents are not limited to these three classes.
21515  New classes can be generated from other styles like letter or in combination
21516  with other class variations like Article (AMS).
21517  If you have special needs that cannot be covered by one of the existing
21518  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21519  will arrange to insert a new entry, or teach you how to do it.
21520 \begin_inset Foot
21521 status collapsed
21522
21523 \begin_layout Plain Layout
21524 It is very simple, it involves the creation of a file with four lines, and
21525  re-running of the auto configuration.
21526 \end_layout
21527
21528 \end_inset
21529
21530  Moreover, if you use a literate tool other than Noweb you may need to create
21531  a new set of document classes for it.
21532 \end_layout
21533
21534 \begin_layout Paragraph
21535 Typing code in
21536 \end_layout
21537
21538 \begin_layout Standard
21539 LyX enables you to write code with a layout named 
21540 \noun on
21541 Scrap
21542 \noun default
21543 .
21544 \begin_inset Foot
21545 status collapsed
21546
21547 \begin_layout Plain Layout
21548 The equivalent Noweb term is 
21549 \begin_inset Quotes eld
21550 \end_inset
21551
21552 Chunk
21553 \begin_inset Quotes erd
21554 \end_inset
21555
21556 .
21557  For historical reasons, I got used to the term 
21558 \begin_inset Quotes eld
21559 \end_inset
21560
21561 scrap
21562 \begin_inset Quotes erd
21563 \end_inset
21564
21565  introduced by other literate tool named Nuweb, which I used for many years
21566  before rendering myself to Noweb.
21567 \end_layout
21568
21569 \end_inset
21570
21571  Noweb delimits scraps like this:
21572 \end_layout
21573
21574 \begin_layout LyX-Code
21575 <<My scrap>>=
21576 \end_layout
21577
21578 \begin_layout LyX-Code
21579   code
21580 \end_layout
21581
21582 \begin_layout LyX-Code
21583   more code
21584 \end_layout
21585
21586 \begin_layout LyX-Code
21587   even more code
21588 \end_layout
21589
21590 \begin_layout LyX-Code
21591   @
21592 \end_layout
21593
21594 \begin_layout Standard
21595 The problem is that whatever is written in between the << and the 
21596 \family typewriter
21597 @
21598 \family default
21599  must be taken literally, i.
21600 \begin_inset space \thinspace{}
21601 \end_inset
21602
21603 g.
21604 \begin_inset space \space{}
21605 \end_inset
21606
21607 LyX should be prevented from making any special interpretation of what has
21608  been written.
21609  This is handled by a special layout named Scrap, that works like a normal
21610  paragraph but has a free spacing capability.
21611 \end_layout
21612
21613 \begin_layout Standard
21614 The down side of the Scrap paragraph layout is that consecutive paragraphs
21615  of code will be spaced with one empty line in the source code and also
21616  in the printed documentation.
21617  The work around is to enter each line of code within a single Scrap, with
21618  a newline (ctrl-return).
21619  The example above will look like this:
21620 \begin_inset Foot
21621 status collapsed
21622
21623 \begin_layout Plain Layout
21624 If you have a printed version of this document you will not see any difference
21625  between the previous example and this one.
21626 \end_layout
21627
21628 \end_inset
21629
21630
21631 \end_layout
21632
21633 \begin_layout LyX-Code
21634 <<My scrap>>=
21635 \begin_inset Newline newline
21636 \end_inset
21637
21638   code
21639 \begin_inset Newline newline
21640 \end_inset
21641
21642   more code
21643 \begin_inset Newline newline
21644 \end_inset
21645
21646   even more code
21647 \begin_inset Newline newline
21648 \end_inset
21649
21650   @
21651 \end_layout
21652
21653 \begin_layout Standard
21654 This layout works fine.
21655  The only real inconvenience is that you have to type ctrl-return instead
21656  of a plain return.
21657 \begin_inset Foot
21658 status collapsed
21659
21660 \begin_layout Plain Layout
21661 It is in my list of 
21662 \begin_inset Quotes eld
21663 \end_inset
21664
21665 improvements
21666 \begin_inset Quotes erd
21667 \end_inset
21668
21669  to fix that.
21670 \end_layout
21671
21672 \end_inset
21673
21674
21675 \end_layout
21676
21677 \begin_layout Standard
21678 As a special note, you can also use the 
21679 \begin_inset Quotes eld
21680 \end_inset
21681
21682 %def
21683 \begin_inset Quotes erd
21684 \end_inset
21685
21686  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21687 rence:
21688 \end_layout
21689
21690 \begin_layout LyX-Code
21691 <<My scrap>>=
21692 \begin_inset Newline newline
21693 \end_inset
21694
21695   def some_function(args):
21696 \begin_inset Newline newline
21697 \end_inset
21698
21699     "This is the doc string for this function."
21700 \begin_inset Newline newline
21701 \end_inset
21702
21703     print "My args: ", args
21704 \end_layout
21705
21706 \begin_layout LyX-Code
21707 @ %def some_function
21708 \end_layout
21709
21710 \begin_layout Standard
21711 For an example of this usage and the resulting cross-reference output, look
21712  at the Literate python program in 
21713 \emph on
21714 LIBDIR/examples/listerrors.lyx
21715 \emph default
21716  which should make this all clear.
21717 \end_layout
21718
21719 \begin_layout Paragraph
21720 Generating the documentation
21721 \end_layout
21722
21723 \begin_layout Standard
21724 At this point you already have a new document file with a proper document
21725  class, and with some code and text on it.
21726  How do I print it? The answer is simple, you select 
21727 \family sans
21728 View\SpecialChar \menuseparator
21729 DVI,
21730 \family default
21731  etc.
21732  Just like you would do for a plain document.
21733  No special procedure is required.
21734 \end_layout
21735
21736 \begin_layout Standard
21737 To help orientate you, I will now explain what happens inside LyX:
21738 \end_layout
21739
21740 \begin_layout Enumerate
21741 When the 
21742 \family sans
21743 Update\SpecialChar \menuseparator
21744 DVI
21745 \family default
21746  menu option is chosen, a LaTeX file is generated.
21747  
21748 \end_layout
21749
21750 \begin_deeper
21751 \begin_layout Standard
21752 If the document is of any literate class the generated file will be named
21753  with an extension name defined by the 
21754 \begin_inset Quotes eld
21755 \end_inset
21756
21757 literate
21758 \begin_inset Quotes erd
21759 \end_inset
21760
21761  format (defined in the Preferences panel), otherwise the file will have
21762  the usual 
21763 \family typewriter
21764 .tex
21765 \family default
21766  extension.
21767 \end_layout
21768
21769 \end_deeper
21770 \begin_layout Enumerate
21771 Note that the only difference so far is in the name of the file, no special
21772  processing is required by LyX.
21773  Given that you formatted the code using the Scrap layout that, by itself,
21774  takes care of the business.
21775 \end_layout
21776
21777 \begin_layout Enumerate
21778 If the document is of any literate class LyX will then use the internal
21779  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21780 \begin_inset Foot
21781 status collapsed
21782
21783 \begin_layout Plain Layout
21784 The converters are defined in the 
21785 \family sans
21786 Tools\SpecialChar \menuseparator
21787 Preferences
21788 \family default
21789  panel, under the 
21790 \begin_inset Quotes eld
21791 \end_inset
21792
21793 Conversion
21794 \begin_inset Quotes erd
21795 \end_inset
21796
21797  tab.
21798  See section 
21799 \emph on
21800 Converters
21801 \emph default
21802  of the 
21803 \emph on
21804 Customization
21805 \emph default
21806  manual for general information about converters.
21807 \end_layout
21808
21809 \end_inset
21810
21811  to generate the LaTeX file.
21812 \end_layout
21813
21814 \begin_deeper
21815 \begin_layout Standard
21816 Otherwise it will just skip this step.
21817 \end_layout
21818
21819 \end_deeper
21820 \begin_layout Enumerate
21821 Finally, LaTeX is invoked and the regular post processing continues as in
21822  a plain document.
21823 \end_layout
21824
21825 \begin_layout Standard
21826 Independence from a particular 
21827 \begin_inset Quotes eld
21828 \end_inset
21829
21830 literate tool
21831 \begin_inset Quotes erd
21832 \end_inset
21833
21834  is easily achieved by changing the commands that are run by the various
21835  converters.
21836 \end_layout
21837
21838 \begin_layout Paragraph
21839 Generating the code
21840 \end_layout
21841
21842 \begin_layout Standard
21843 When the build menu option is chosen or the corresponding button in the
21844  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21845  Next, LyX invokes the 
21846 \family typewriter
21847 Noweb->Program
21848 \family default
21849  converter.
21850  This converter needs to be defined by the user and is not installed by
21851  default, though the Program format is.
21852  This converter (like any other converter) will have two parts:
21853 \end_layout
21854
21855 \begin_layout Enumerate
21856 The converter program itself.
21857  This program performs the conversion from the one format to the other (in
21858  this case, from the Noweb format to the Program pseudo-format).
21859 \end_layout
21860
21861 \begin_layout Enumerate
21862 The error log parser.
21863  This is a program whose sole purpose is to rewrite error messages in a
21864  format that LyX understands.
21865  This makes it possible for LyX to place error boxes in the right places
21866  in the file buffer.
21867 \end_layout
21868
21869 \begin_layout Standard
21870 The first part, the 
21871 \begin_inset Quotes eld
21872 \end_inset
21873
21874 Converter
21875 \begin_inset Quotes erd
21876 \end_inset
21877
21878  setting, should be set to 
21879 \begin_inset Quotes eld
21880 \end_inset
21881
21882
21883 \family typewriter
21884 build-script $$i
21885 \family default
21886
21887 \begin_inset Quotes erd
21888 \end_inset
21889
21890 .
21891  This basically means that LyX will call 
21892 \begin_inset Quotes eld
21893 \end_inset
21894
21895 build-script
21896 \begin_inset Quotes erd
21897 \end_inset
21898
21899  (a program or script) with the name of the Noweb file (normally a file
21900  in the LyX temp directory).
21901  
21902 \end_layout
21903
21904 \begin_layout Standard
21905 This is an implementation of 
21906 \begin_inset Quotes eld
21907 \end_inset
21908
21909 build-script
21910 \begin_inset Quotes erd
21911 \end_inset
21912
21913  that you can place in a directory on your path:
21914 \end_layout
21915
21916 \begin_layout LyX-Code
21917 #!/bin/sh
21918 \end_layout
21919
21920 \begin_layout LyX-Code
21921 #
21922 \end_layout
21923
21924 \begin_layout LyX-Code
21925 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21926 \end_layout
21927
21928 \begin_layout Standard
21929 The next part of the converter setting is the 
21930 \begin_inset Quotes eld
21931 \end_inset
21932
21933 Flags
21934 \begin_inset Quotes erd
21935 \end_inset
21936
21937  which is to be set to 
21938 \begin_inset Quotes eld
21939 \end_inset
21940
21941
21942 \family typewriter
21943 parselog=listerrors
21944 \family default
21945
21946 \begin_inset Quotes erd
21947 \end_inset
21948
21949 .
21950  This will run any errors that are generated by the 
21951 \begin_inset Quotes eld
21952 \end_inset
21953
21954 build-script
21955 \begin_inset Quotes erd
21956 \end_inset
21957
21958  process through the 
21959 \begin_inset Quotes eld
21960 \end_inset
21961
21962 listerrors
21963 \begin_inset Quotes erd
21964 \end_inset
21965
21966  program.
21967 \end_layout
21968
21969 \begin_layout Standard
21970 The converter code looks in 
21971 \emph on
21972 MYLYXDIR/scripts
21973 \emph default
21974  first, then in 
21975 \emph on
21976 LIBDIR/scripts
21977 \emph default
21978  then on the path for the 
21979 \begin_inset Quotes eld
21980 \end_inset
21981
21982 listerrors
21983 \begin_inset Quotes erd
21984 \end_inset
21985
21986  program.
21987 \end_layout
21988
21989 \begin_layout Standard
21990 The build will normally take place in LyX's temporary directory, so the
21991  files produced by the conversion will be in that directory.
21992  LyX will copy out what it regards as the `main' file, but the 
21993 \family typewriter
21994 Noweb->Program
21995 \family default
21996  conversion may produce several files, and so most of these would then be
21997  deleted when LyX was closed.
21998  The present solution is to use a `copier',
21999 \begin_inset Foot
22000 status collapsed
22001
22002 \begin_layout Plain Layout
22003 See section 
22004 \emph on
22005 Copiers
22006 \emph default
22007  of the 
22008 \emph on
22009 Customization
22010 \emph default
22011  manual for information on these.
22012 \end_layout
22013
22014 \end_inset
22015
22016  in this case, the 
22017 \family typewriter
22018 ext_copy.py
22019 \family default
22020  script in its default mode, so that the entire contents of the temporary
22021  directory is copied.
22022  More will get copied than is needed, to be sure, but nothing will be lost.
22023  If, however, you know what extensions the generated files will have, this
22024  can be improved by using the 
22025 \family typewriter
22026 -e
22027 \family default
22028  option to 
22029 \family typewriter
22030 ext_copy
22031 \family default
22032 .
22033  This option takes a comma-separated list of extensions to copy.
22034  So, for example, if the conversion will generate only files with the extensions
22035  
22036 \family typewriter
22037 .c
22038 \family default
22039  and 
22040 \family typewriter
22041 .h
22042 \family default
22043 , then the correct definition would be:
22044 \end_layout
22045
22046 \begin_layout LyX-Code
22047 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22048 \end_layout
22049
22050 \begin_layout Standard
22051 The result will be that only files with these two extensions will be copied
22052  out.
22053 \end_layout
22054
22055 \begin_layout Paragraph
22056 Build instructions in the document
22057 \end_layout
22058
22059 \begin_layout Standard
22060 The last piece of the integration between LyX and noweb is the 
22061 \begin_inset Quotes eld
22062 \end_inset
22063
22064 build-script
22065 \begin_inset Quotes erd
22066 \end_inset
22067
22068  scrap.
22069  Generally, the instructions for building your program should be embedded
22070  in a scrap of its own.
22071  The noweb-specific 
22072 \begin_inset Quotes eld
22073 \end_inset
22074
22075 build-script
22076 \begin_inset Quotes erd
22077 \end_inset
22078
22079  above uses the notangle command to look for this scrap (called 
22080 \begin_inset Quotes eld
22081 \end_inset
22082
22083 build-script
22084 \begin_inset Quotes erd
22085 \end_inset
22086
22087 ) and runs its contents through 
22088 \begin_inset Quotes eld
22089 \end_inset
22090
22091 sh
22092 \begin_inset Quotes erd
22093 \end_inset
22094
22095 .
22096 \end_layout
22097
22098 \begin_layout Standard
22099 Typically, such a scrap would look something like this:
22100 \end_layout
22101
22102 \begin_layout LyX-Code
22103 <<build-script>>=
22104 \begin_inset Newline newline
22105 \end_inset
22106
22107 #!/bin/sh
22108 \begin_inset Newline newline
22109 \end_inset
22110
22111
22112 \begin_inset Newline newline
22113 \end_inset
22114
22115 if [ -z "${NOWEB_SOURCE}" ]
22116 \begin_inset Newline newline
22117 \end_inset
22118
22119 then
22120 \begin_inset Newline newline
22121 \end_inset
22122
22123   NOWEB_SOURCE=myfile.nw
22124 \begin_inset Newline newline
22125 \end_inset
22126
22127 fi
22128 \begin_inset Newline newline
22129 \end_inset
22130
22131 [...
22132  code to extract files ...]
22133 \begin_inset Newline newline
22134 \end_inset
22135
22136 [...
22137  code to compile files ...]
22138 \begin_inset Newline newline
22139 \end_inset
22140
22141 @
22142 \end_layout
22143
22144 \begin_layout Standard
22145 Look in 
22146 \emph on
22147 LIBDIR/examples/listerrors.lyx
22148 \emph default
22149  or in 
22150 \emph on
22151 LIBDIR/examples/Literate.lyx
22152 \emph default
22153  which implement two versions of the 
22154 \begin_inset Quotes eld
22155 \end_inset
22156
22157 listerrors
22158 \begin_inset Quotes erd
22159 \end_inset
22160
22161  program for some illustrations of how all of these pieces go together or
22162  in 
22163 \emph on
22164 LIBDIR/examples/noweb2lyx.lyx.
22165
22166 \emph default
22167  Interestingly, these three files show off the language-indepence of the
22168  LyX literate programming support since they are written in Python, C and
22169  Perl respectively.
22170 \end_layout
22171
22172 \begin_layout Subsubsection
22173 Configuring LyX
22174 \end_layout
22175
22176 \begin_layout Standard
22177 All the Literate Programming support is configured by the 
22178 \family sans
22179 Tools\SpecialChar \menuseparator
22180 Preferences
22181 \family default
22182  panel in the 
22183 \begin_inset Quotes eld
22184 \end_inset
22185
22186 Conversion
22187 \begin_inset Quotes erd
22188 \end_inset
22189
22190  tab.
22191  The important parts are:
22192 \end_layout
22193
22194 \begin_layout Description
22195 the
22196 \begin_inset space ~
22197 \end_inset
22198
22199
22200 \begin_inset Quotes eld
22201 \end_inset
22202
22203 literate
22204 \begin_inset Quotes erd
22205 \end_inset
22206
22207
22208 \begin_inset space ~
22209 \end_inset
22210
22211 format Set up via the Formats tab, this is where the Noweb-specific pieces
22212  are set up.
22213  The 
22214 \family sans
22215 GUI Name
22216 \family default
22217  is set to 
22218 \family typewriter
22219 NoWeb
22220 \family default
22221 , the file extension is set to 
22222 \family typewriter
22223 .nw
22224 \family default
22225 .
22226  This tells LyX to create a file with a 
22227 \family typewriter
22228 .nw
22229 \family default
22230  extension in the first step of the conversion process.
22231 \end_layout
22232
22233 \begin_layout Description
22234 the
22235 \begin_inset space ~
22236 \end_inset
22237
22238
22239 \family sans
22240 Program
22241 \family default
22242
22243 \begin_inset space ~
22244 \end_inset
22245
22246 format This is an empty format whose sole purpose is to be the endpoint
22247  of a conversion (which then allows us to set up a converter for it).
22248 \end_layout
22249
22250 \begin_layout Description
22251
22252 \family sans
22253 NoWeb
22254 \family default
22255 ->
22256 \family sans
22257 LaTeX
22258 \family default
22259  This converter performs the 
22260 \begin_inset Quotes eld
22261 \end_inset
22262
22263 weaving
22264 \begin_inset Quotes erd
22265 \end_inset
22266
22267  of the literate document.
22268  For Noweb, it is set to 
22269 \begin_inset Quotes eld
22270 \end_inset
22271
22272
22273 \family typewriter
22274 noweave -delay -index $$i > $$o
22275 \family default
22276
22277 \begin_inset Quotes erd
22278 \end_inset
22279
22280
22281 \end_layout
22282
22283 \begin_layout Description
22284
22285 \family sans
22286 NoWeb
22287 \family default
22288 ->
22289 \family sans
22290 Program
22291 \family default
22292  This performs the 
22293 \begin_inset Quotes eld
22294 \end_inset
22295
22296 tangling step
22297 \begin_inset Quotes erd
22298 \end_inset
22299
22300 .
22301  As stated above, the Converter is set to 
22302 \begin_inset Quotes eld
22303 \end_inset
22304
22305
22306 \family typewriter
22307 build-script $$i
22308 \family default
22309
22310 \begin_inset Quotes erd
22311 \end_inset
22312
22313 , with Flags set to 
22314 \begin_inset Quotes eld
22315 \end_inset
22316
22317
22318 \family typewriter
22319 originaldir,parselog=listerrors
22320 \family default
22321
22322 \begin_inset Quotes erd
22323 \end_inset
22324
22325 .
22326 \end_layout
22327
22328 \begin_layout Subsubsection
22329 Debug extensions
22330 \end_layout
22331
22332 \begin_layout Standard
22333 There is also a new function implemented in the LyX server, the 
22334 \begin_inset Quotes eld
22335 \end_inset
22336
22337 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22338  
22339 \end_layout
22340
22341 \begin_layout Standard
22342 When debugging code with ddd/gdb, it is possible to invoke a text editor
22343  at the current execution position with a single key stroke.
22344  The default ddd configuration for that is shift-ctrl-V.
22345  It happens that you can define the editor command line invocation in ddd
22346  by accessing the 
22347 \family sans
22348 Edit\SpecialChar \menuseparator
22349 Preferences\SpecialChar \menuseparator
22350 Helpers
22351 \family default
22352  dialog and changing the "Edit Sources" entry.
22353 \end_layout
22354
22355 \begin_layout Standard
22356 I take advantage of the new created LyX server function and this ddd feature,
22357  and set 
22358 \begin_inset Quotes eld
22359 \end_inset
22360
22361 Edit Sources
22362 \begin_inset Quotes erd
22363 \end_inset
22364
22365  to:
22366 \end_layout
22367
22368 \begin_layout LyX-Code
22369 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22370 \end_layout
22371
22372 \begin_layout Standard
22373 With this, whenever you are using ddd and find a point in the program that
22374  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22375  ddd you forward this information to LyX through the LyX server and then
22376  the LyX window will show the same file with the cursor at the same position
22377  ddd was pointing to.
22378  No more guessing or long scrolling to locate a point in the program back
22379  from debugging !
22380 \end_layout
22381
22382 \begin_layout Standard
22383 Note however that you must enable the LyX server to get this feature working
22384  (it is disabled by default).
22385  You can enable it in 
22386 \family sans
22387 Preferences
22388 \family default
22389  (tabs 
22390 \family sans
22391 Inputs
22392 \family default
22393
22394 \family sans
22395 Paths
22396 \family default
22397 ) by entering in the 
22398 \family sans
22399 LyXserver pipe
22400 \family default
22401  a path like 
22402 \begin_inset Quotes eld
22403 \end_inset
22404
22405
22406 \family typewriter
22407 /home/<your-home-directory>/.lyx/lyxpipe
22408 \family default
22409
22410 \begin_inset Quotes erd
22411 \end_inset
22412
22413
22414 \end_layout
22415
22416 \begin_layout Standard
22417 Read the LyX server documentation in the 
22418 \emph on
22419 Customization Manual
22420 \emph default
22421  for further information.
22422 \end_layout
22423
22424 \begin_layout Subsubsection
22425 Toolbar extensions
22426 \end_layout
22427
22428 \begin_layout Standard
22429 There are six new buttons that can be added to your LyX toolbar.
22430  Five of these buttons are short cuts to layout styles: 
22431 \family sans
22432 Standard
22433 \family default
22434
22435 \family sans
22436 Section
22437 \family default
22438
22439 \family sans
22440 LaTeX
22441 \family default
22442
22443 \family sans
22444 LyX-Code
22445 \family default
22446 , and 
22447 \family sans
22448 Scrap
22449 \family default
22450 .
22451  The last one is a short cut to the 
22452 \begin_inset Quotes eld
22453 \end_inset
22454
22455 Build Program
22456 \begin_inset Quotes erd
22457 \end_inset
22458
22459  File menu entry.
22460  
22461 \end_layout
22462
22463 \begin_layout Standard
22464 LyX has a range of buttons that are available for tool bar customization.
22465  In my toolbar I like to combine the six short cuts above with two more:
22466  One for 
22467 \family sans
22468 View
22469 \family default
22470 \SpecialChar \menuseparator
22471
22472 \family sans
22473 Update
22474 \family default
22475 \SpecialChar \menuseparator
22476
22477 \family sans
22478 DVI
22479 \family default
22480  and the other for 
22481 \family sans
22482 View\SpecialChar \menuseparator
22483 DVI
22484 \family default
22485  File menu entries.
22486  Here is how it looks like:
22487 \end_layout
22488
22489 \begin_layout LyX-Code
22490 Toolbar
22491 \end_layout
22492
22493 \begin_layout LyX-Code
22494   Layouts
22495 \end_layout
22496
22497 \begin_layout LyX-Code
22498   Icon "layout Standard"
22499 \end_layout
22500
22501 \begin_layout LyX-Code
22502   Icon "layout Section"
22503 \end_layout
22504
22505 \begin_layout LyX-Code
22506   Icon "layout LaTeX"
22507 \end_layout
22508
22509 \begin_layout LyX-Code
22510   Icon "layout LyX-Code"
22511 \end_layout
22512
22513 \begin_layout LyX-Code
22514   Icon "layout Scrap"
22515 \end_layout
22516
22517 \begin_layout LyX-Code
22518   Separator
22519 \end_layout
22520
22521 \begin_layout LyX-Code
22522   Icon "buffer-view"
22523 \end_layout
22524
22525 \begin_layout LyX-Code
22526   Icon "buffer-typeset"
22527 \end_layout
22528
22529 \begin_layout LyX-Code
22530   Icon "build-program"
22531 \end_layout
22532
22533 \begin_layout LyX-Code
22534   Separator
22535 \end_layout
22536
22537 \begin_layout LyX-Code
22538 .
22539 \end_layout
22540
22541 \begin_layout LyX-Code
22542 .
22543 \end_layout
22544
22545 \begin_layout LyX-Code
22546 .
22547 \end_layout
22548
22549 \begin_layout LyX-Code
22550 End
22551 \end_layout
22552
22553 \begin_layout Subsubsection
22554 Colors customization
22555 \end_layout
22556
22557 \begin_layout Standard
22558 There are a number of colors in LyX that can be customized in 
22559 \family sans
22560 Preferences
22561 \family default
22562 .
22563  One of the things that bothers people is the LaTeX font color.
22564  The default color is red, since the scraps uses LaTeX font, and there is
22565  a lot of scraps in literate documents, you may get tired of seeing everything
22566  in red.
22567  You can change it by going to the tabs 
22568 \family sans
22569 Look&Feel
22570 \family default
22571
22572 \family sans
22573 Colors.
22574 \end_layout
22575
22576 \begin_layout Standard
22577 The next thing is the visible presence of the newline character in the screen.
22578  You can choose the color of this particular character and make it blend
22579  in the background.
22580  I recommend you choosing a color that is close to the background but not
22581  equal, that way you still can see it is there, but it is not bothering
22582  you anymore.
22583  
22584 \end_layout
22585
22586 \begin_layout Chapter
22587 Secrets of the LaTeX Masters
22588 \begin_inset CommandInset label
22589 LatexCommand label
22590 name "cha:secrets"
22591
22592 \end_inset
22593
22594
22595 \end_layout
22596
22597 \begin_layout Standard
22598 Though LyX is a powerful tool, it cannot hope to support everything that
22599  can be done with pure TeX/LaTeX.
22600  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22601  as long as you are not afraid to use that 
22602 \begin_inset Quotes eld
22603 \end_inset
22604
22605 TeX
22606 \begin_inset Quotes erd
22607 \end_inset
22608
22609  button on the toolbar or add things to the LaTeX preamble.
22610  This section lists some tips, tricks, and otherwise cool ideas to give
22611  your document that extra little flair.
22612  
22613 \emph on
22614 Do try this at home
22615 \emph default
22616 , just start with something a little smaller and less important than your
22617  dissertation!
22618 \end_layout
22619
22620 \begin_layout Standard
22621 Most ideas in this section require less common files in your LaTeX installation.
22622  If you have a system like TeXLive, most will already be available.
22623  A few, however, will need to be downloaded from one of the CTAN archives.
22624  Often, there are several ways to do something, or several LaTeX style files
22625  which do the same thing.
22626  We do not endorse one choice over another, we simply claim that we have
22627  done a particular task with a particular file.
22628  Put on your wizard hat, keep an eye out for dragons, and let us begin.
22629 \end_layout
22630
22631 \begin_layout Section
22632 Multiple Columns
22633 \end_layout
22634
22635 \begin_layout Standard
22636 by 
22637 \noun on
22638 Lars Gullik Bjønnes
22639 \end_layout
22640
22641 \begin_layout Subsection
22642 Purpose
22643 \end_layout
22644
22645 \begin_layout Standard
22646 The aim for this chapter
22647 \begin_inset Foot
22648 status collapsed
22649
22650 \begin_layout Plain Layout
22651 Editor's note: Lars' original chapter was a masterful description of how
22652  to use the 
22653 \family typewriter
22654 multicol
22655 \family default
22656  package.
22657  However, it was too long to flow smoothly in this document.
22658  I have therefore chosen to excerpt the most important sections here (sorry,
22659  Lars); you can read the original chapter (and more of the story!) in the
22660  example file 
22661 \family typewriter
22662 examples/multicol.lyx
22663 \family default
22664 .
22665  — mer
22666 \end_layout
22667
22668 \end_inset
22669
22670  is to show how the LaTeX package 
22671 \family typewriter
22672 multicol
22673 \family default
22674  can be used in a LyX document.
22675  As LyX doesn't support the 
22676 \family typewriter
22677 multicol
22678 \family default
22679  package natively yet, we have to use some small hacks.
22680  By reading this section it should be obvious how to do this.
22681 \end_layout
22682
22683 \begin_layout Subsection
22684 Limitations 
22685 \end_layout
22686
22687 \begin_layout Standard
22688 The 
22689 \family typewriter
22690 multicol
22691 \family default
22692  package allows switching between one and multicolumn format on the same
22693  page.
22694  Footnotes are handled correctly (for the most part), but will be placed
22695  at the bottom of the page and not under each column.
22696  LaTeX's float mechanism, however, is partly disabled in the current implementat
22697 ion.
22698  At the moment only page-wide floats can be used within the scope of the
22699  environment.
22700 \end_layout
22701
22702 \begin_layout Subsection
22703 Examples
22704 \end_layout
22705
22706 \begin_layout Subsubsection
22707 Two columns
22708 \end_layout
22709
22710 \begin_layout Standard
22711 If you want to have two columns in your text, you have use LaTeX mode to
22712  insert 
22713 \family typewriter
22714
22715 \backslash
22716 begin{multicols}{2}
22717 \family default
22718  at the point where you want the two column layout to start, and then 
22719 \family typewriter
22720
22721 \backslash
22722 end{multicols}
22723 \family default
22724  where you want it to end.
22725  Like this:
22726 \end_layout
22727
22728 \begin_layout Standard
22729 \begin_inset ERT
22730 status open
22731
22732 \begin_layout Plain Layout
22733
22734
22735 \backslash
22736 begin{multicols}{2}
22737 \end_layout
22738
22739 \end_inset
22740
22741
22742 \end_layout
22743
22744 \begin_layout Standard
22745 \noindent
22746
22747 \series bold
22748 \size small
22749 The Adventure of the Empty House
22750 \series default
22751
22752 \begin_inset Newline newline
22753 \end_inset
22754
22755 by 
22756 \noun on
22757 Sir Arthur Conan Doyle
22758 \end_layout
22759
22760 \begin_layout Standard
22761
22762 \size small
22763 It was in the spring of the year 1894 that all London was interested, and
22764  the fashionable world dismayed, by the murder of the Honourable Ronald
22765  Adair under most unusual and inexplicable circumstances.
22766  The public has already learned those particulars of the crime which came
22767  out in the police investigation, but a good deal was suppressed upon that
22768  occasion, since the case for the prosecution was so overwhelmingly strong
22769  that it was not necessary to bring forward all the facts.
22770  Only now, at the end of nearly ten years, am I allowed to supply those
22771  missing links which make up the whole of that remarkable chain.
22772  The crime was of interest in itself, but that interest was as nothing to
22773  me compared to the inconceivable sequel, which afforded me the greatest
22774  shock and surprise of any event in my adventurous life.
22775  Even now, after this long interval, I find myself thrilling as I think
22776  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22777 ty which utterly submerged my mind.
22778  Let me say to that public, which has shown some interest in those glimpses
22779  which I have occasionally given them of the thoughts and actions of a very
22780  remarkable man, that they are not to blame me if I have not shared my knowledge
22781  with them, for I should have considered it my first duty to do so, had
22782  I not been barred by a positive prohibition from his own lips, which was
22783  only withdrawn upon the third of last month.
22784 \end_layout
22785
22786 \begin_layout Standard
22787 \begin_inset ERT
22788 status open
22789
22790 \begin_layout Plain Layout
22791
22792
22793 \backslash
22794 end{multicols}
22795 \end_layout
22796
22797 \end_inset
22798
22799
22800 \end_layout
22801
22802 \begin_layout Subsubsection
22803 Multiple columns
22804 \end_layout
22805
22806 \begin_layout Standard
22807 The same pattern is used when you want more than two columns:
22808 \end_layout
22809
22810 \begin_layout Standard
22811 \begin_inset ERT
22812 status open
22813
22814 \begin_layout Plain Layout
22815
22816
22817 \backslash
22818 begin{multicols}{3}
22819 \end_layout
22820
22821 \end_inset
22822
22823
22824 \end_layout
22825
22826 \begin_layout Standard
22827
22828 \size footnotesize
22829 It can be imagined that my close intimacy with Sherlock Holmes had interested
22830  me deeply in crime, and that after his disappearance I never failed to
22831  read with care the various problems which came before the public.
22832  And I even attempted, more than once, for my own private satisfaction,
22833  to employ his methods in their solution, though with indifferent success.
22834  There was none, however, which appealed to me like this tragedy of Ronald
22835  Adair.
22836  As I read the evidence at the inquest, which led up to a verdict of willful
22837  murder against some person or persons unknown, I realized more clearly
22838  than I had ever done the loss which the community had sustained by the
22839  death of Sherlock Holmes.
22840  There were points about this strange business which would, I was sure,
22841  have specially appealed to him, and the efforts of the police would have
22842  been supplemented, or more probably anticipated, by the trained observation
22843  and the alert mind of the first criminal agent in Europe.
22844  All day, as I drove upon my round, I turned over the case in my mind and
22845  found no explanation which appeared to me to be adequate.
22846  At the risk of telling a twice-told tale, I will recapitulate the facts
22847  as they were known to the public at the conclusion of the inquest.
22848 \end_layout
22849
22850 \begin_layout Standard
22851 \begin_inset ERT
22852 status open
22853
22854 \begin_layout Plain Layout
22855
22856
22857 \backslash
22858 end{multicols}
22859 \end_layout
22860
22861 \end_inset
22862
22863
22864 \end_layout
22865
22866 \begin_layout Standard
22867 You can have more than 3 columns if you want to, but that might not be very
22868  pleasant for the eye.
22869 \end_layout
22870
22871 \begin_layout Subsubsection
22872 Columns inside columns
22873 \end_layout
22874
22875 \begin_layout Standard
22876 You can even have columns inside columns:
22877 \end_layout
22878
22879 \begin_layout Standard
22880 \begin_inset ERT
22881 status open
22882
22883 \begin_layout Plain Layout
22884
22885
22886 \backslash
22887 begin{multicols}{2}
22888 \end_layout
22889
22890 \end_inset
22891
22892
22893 \end_layout
22894
22895 \begin_layout Standard
22896
22897 \size footnotesize
22898 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22899  at that time governor of one of the Australian colonies.
22900  Adair's mother had returned from Australia to undergo the operation for
22901  cataract, and she, her son Ronald, and her daughter Hilda were living together
22902  at 427 Park Lane.
22903 \end_layout
22904
22905 \begin_layout Standard
22906 \begin_inset ERT
22907 status open
22908
22909 \begin_layout Plain Layout
22910
22911
22912 \backslash
22913 begin{multicols}{2}
22914 \end_layout
22915
22916 \end_inset
22917
22918
22919 \end_layout
22920
22921 \begin_layout Standard
22922
22923 \size footnotesize
22924 The youth moved in the best society–had, so far as was known, no enemies
22925  and no particular vices.
22926  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22927  had been broken off by mutual consent some months before, and there was
22928  no sign that it had left any very profound feeling behind it.
22929  For the rest {sic} the man's life moved in a narrow and conventional circle,
22930  for his habits were quiet and his nature unemotional.
22931  Yet it was upon this easy-going young aristocrat that death came, in most
22932  strange and unexpected form, between the hours of ten and eleven-twenty
22933  on the night of March 30, 1894.
22934 \end_layout
22935
22936 \begin_layout Standard
22937 \begin_inset ERT
22938 status open
22939
22940 \begin_layout Plain Layout
22941
22942
22943 \backslash
22944 end{multicols}
22945 \end_layout
22946
22947 \end_inset
22948
22949
22950 \end_layout
22951
22952 \begin_layout Standard
22953
22954 \size footnotesize
22955 Ronald Adair was fond of cards–playing continually, but never for such stakes
22956  as would hurt him.
22957  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22958  It was shown that, after dinner on the day of his death, he had played
22959  a rubber of whist at the latter club.
22960  He had also played there in the afternoon.
22961
22962 \size default
22963  
22964 \size footnotesize
22965 The evidence of those who had played with him– Mr.
22966  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22967  and that there was a fairly equal fall of the cards.
22968  Adair might have lost five pounds, but not more.
22969  His fortune was a considerable one, and such a loss could not in any way
22970  affect him.
22971  He had played nearly every day at one club or other, but he was a cautious
22972  player, and usually rose a winner.
22973  It came out in evidence that, in partnership with Colonel Moran, he had
22974  actually won as much as four hundred and twenty pounds in a sitting, some
22975  weeks before, from Godfrey Milner and Lord Balmoral.
22976  So much for his recent history as it came out at the inquest.
22977 \end_layout
22978
22979 \begin_layout Standard
22980 \begin_inset ERT
22981 status open
22982
22983 \begin_layout Plain Layout
22984
22985
22986 \backslash
22987 end{multicols}
22988 \end_layout
22989
22990 \end_inset
22991
22992
22993 \end_layout
22994
22995 \begin_layout Standard
22996 Please do read the file 
22997 \family typewriter
22998 examples/multicol.lyx
22999 \family default
23000  for more advanced examples including column and header spacing, vertical
23001  separator lines, and more.
23002 \end_layout
23003
23004 \begin_layout Section
23005 Numbering in the 
23006 \family sans
23007 Enumerate
23008 \family default
23009  Paragraph Environment
23010 \begin_inset Argument
23011 status collapsed
23012
23013 \begin_layout Plain Layout
23014 Numbering in Enumerate
23015 \end_layout
23016
23017 \end_inset
23018
23019
23020 \end_layout
23021
23022 \begin_layout Standard
23023 by 
23024 \noun on
23025 John Weiss
23026 \end_layout
23027
23028 \begin_layout Standard
23029 \begin_inset VSpace bigskip
23030 \end_inset
23031
23032
23033 \end_layout
23034
23035 \begin_layout Standard
23036 \noindent
23037 The default numbering for the 
23038 \family sans
23039 Enumerate
23040 \family default
23041  paragraph environment begins with Arabic numbers and ends with uppercase
23042  letters.
23043  Suppose, however, you wanted a different type of numbering scheme.
23044  Here's a quickie example of how to change the numbering scheme:
23045 \end_layout
23046
23047 \begin_layout LyX-Code
23048
23049 \backslash
23050 renewcommand{
23051 \backslash
23052 labelenumi}{
23053 \backslash
23054 Roman{enumi}.}
23055 \end_layout
23056
23057 \begin_layout LyX-Code
23058
23059 \backslash
23060 renewcommand{
23061 \backslash
23062 labelenumii}{
23063 \backslash
23064 Alph{enumii}.}
23065 \end_layout
23066
23067 \begin_layout LyX-Code
23068
23069 \backslash
23070 renewcommand{
23071 \backslash
23072 labelenumiii}{
23073 \backslash
23074 arabic{enumiii}.}
23075 \end_layout
23076
23077 \begin_layout LyX-Code
23078
23079 \backslash
23080 renewcommand{
23081 \backslash
23082 labelenumiv}{
23083 \backslash
23084 alph{enumiv}.)}
23085 \end_layout
23086
23087 \begin_layout Standard
23088 \SpecialChar \ldots{}
23089  which changes the numbering scheme to uppercase Roman numerals, uppercase
23090  letters, Arabic numbers, and lowercase letter.
23091 \end_layout
23092
23093 \begin_layout Standard
23094 Additionally, the previous example also adds a little bit extra to the numbering
23095  scheme.
23096  For example, the first level label actually looks like: 
23097 \begin_inset Quotes eld
23098 \end_inset
23099
23100 I.
23101 \begin_inset Quotes erd
23102 \end_inset
23103
23104 .
23105  For ease of reading, we'll describe what the numbering schemes look like
23106  using a notation something like this: <
23107 \begin_inset Quotes eld
23108 \end_inset
23109
23110 I.
23111 \begin_inset Quotes erd
23112 \end_inset
23113
23114 ,
23115 \begin_inset space ~
23116 \end_inset
23117
23118
23119 \begin_inset Quotes erd
23120 \end_inset
23121
23122 A.
23123 \begin_inset Quotes erd
23124 \end_inset
23125
23126 ,
23127 \begin_inset space ~
23128 \end_inset
23129
23130
23131 \begin_inset Quotes erd
23132 \end_inset
23133
23134 1.
23135 \begin_inset Quotes erd
23136 \end_inset
23137
23138 ,
23139 \begin_inset space ~
23140 \end_inset
23141
23142
23143 \begin_inset Quotes eld
23144 \end_inset
23145
23146 a.)
23147 \begin_inset Quotes erd
23148 \end_inset
23149
23150 >.
23151  
23152 \end_layout
23153
23154 \begin_layout Standard
23155 As you can see in the example, there is a label command for each nesting
23156  level, 
23157 \family typewriter
23158
23159 \backslash
23160 labelenumi
23161 \family default
23162  \SpecialChar \ldots{}
23163  
23164 \family typewriter
23165
23166 \backslash
23167 labelenumiv
23168 \family default
23169 , as well as a counter, 
23170 \family typewriter
23171 enumi
23172 \family default
23173  \SpecialChar \ldots{}
23174  
23175 \family typewriter
23176 enumiv
23177 \family default
23178 .
23179  There are also five 
23180 \begin_inset Quotes eld
23181 \end_inset
23182
23183 number printing
23184 \begin_inset Quotes erd
23185 \end_inset
23186
23187  commands, 
23188 \family typewriter
23189
23190 \backslash
23191 arabic{}
23192 \family default
23193
23194 \family typewriter
23195
23196 \backslash
23197 roman{}
23198 \family default
23199
23200 \family typewriter
23201
23202 \backslash
23203 Roman{}
23204 \family default
23205
23206 \family typewriter
23207
23208 \backslash
23209 alph{}
23210 \family default
23211 , and 
23212 \family typewriter
23213
23214 \backslash
23215 Alph{}
23216 \family default
23217 , each of which take one counter as an argument.
23218  You can add characters before or after these, but there's no need to add
23219  spaces.
23220 \end_layout
23221
23222 \begin_layout Standard
23223 You can get really fancy with these.
23224  For example:
23225 \end_layout
23226
23227 \begin_layout LyX-Code
23228
23229 \backslash
23230 renewcommand{
23231 \backslash
23232 labelenumi}{
23233 \backslash
23234 #
23235 \backslash
23236 Alph{enumi}
23237 \backslash
23238 #}
23239 \end_layout
23240
23241 \begin_layout LyX-Code
23242
23243 \backslash
23244 renewcommand{
23245 \backslash
23246 labelenumii}{
23247 \backslash
23248 Alph{enumi}.
23249 \backslash
23250 arabic{enumii}}
23251 \end_layout
23252
23253 \begin_layout LyX-Code
23254
23255 \backslash
23256 renewcommand{
23257 \backslash
23258 labelenumiii}{
23259 \backslash
23260 alph{enumiii}+}
23261 \end_layout
23262
23263 \begin_layout LyX-Code
23264
23265 \backslash
23266 renewcommand{
23267 \backslash
23268 labelenumiv}{(
23269 \backslash
23270 roman{enumiv})}
23271 \end_layout
23272
23273 \begin_layout Standard
23274 produces the somewhat out of hand numbering scheme: <
23275 \begin_inset Quotes eld
23276 \end_inset
23277
23278 #A#
23279 \begin_inset Quotes erd
23280 \end_inset
23281
23282 ,
23283 \begin_inset space ~
23284 \end_inset
23285
23286
23287 \begin_inset Quotes erd
23288 \end_inset
23289
23290 A.1
23291 \begin_inset Quotes erd
23292 \end_inset
23293
23294 ,
23295 \begin_inset space ~
23296 \end_inset
23297
23298
23299 \begin_inset Quotes erd
23300 \end_inset
23301
23302 a+
23303 \begin_inset Quotes erd
23304 \end_inset
23305
23306 ,
23307 \begin_inset space ~
23308 \end_inset
23309
23310
23311 \begin_inset Quotes eld
23312 \end_inset
23313
23314 (i)
23315 \begin_inset Quotes erd
23316 \end_inset
23317
23318 >.
23319  
23320 \end_layout
23321
23322 \begin_layout Section
23323 Dropped Capitals
23324 \end_layout
23325
23326 \begin_layout Standard
23327 by 
23328 \noun on
23329 Mike Ressler
23330 \end_layout
23331
23332 \begin_layout Standard
23333 \begin_inset VSpace bigskip
23334 \end_inset
23335
23336
23337 \end_layout
23338
23339 \begin_layout Standard
23340 \noindent
23341 \begin_inset ERT
23342 status collapsed
23343
23344 \begin_layout Plain Layout
23345
23346
23347 \backslash
23348 newfont{
23349 \backslash
23350 tmpfont}{cmr17 scaled 2500}{
23351 \backslash
23352 tmpfont T}
23353 \backslash
23354 vspace*{-8.4ex}
23355 \end_layout
23356
23357 \end_inset
23358
23359
23360 \end_layout
23361
23362 \begin_layout Standard
23363 \noindent
23364 \begin_inset ERT
23365 status open
23366
23367 \begin_layout Plain Layout
23368
23369
23370 \backslash
23371 hangindent=3.3em 
23372 \backslash
23373 hangafter=-3
23374 \end_layout
23375
23376 \end_inset
23377
23378  hose of you who like the style of old books probably also like 
23379 \begin_inset Quotes eld
23380 \end_inset
23381
23382 dropped capitals
23383 \begin_inset Quotes erd
23384 \end_inset
23385
23386 —those large capital letters which begin each new chapter or section.
23387  Implementing them with plain LyX/LaTeX is straightforward (assuming you
23388  know some plain TeX!) but does require a lot of work and many iterations,
23389  as you can see by all the ugly TeX-mode stuff at the beginning of this
23390  paragraph.
23391 \end_layout
23392
23393 \begin_layout Standard
23394 \begin_inset ERT
23395 status open
23396
23397 \begin_layout Plain Layout
23398
23399
23400 \backslash
23401 verb+
23402 \backslash
23403 bigdrop{-1em}{3}{ptmri}{T}+
23404 \end_layout
23405
23406 \end_inset
23407
23408 here is a much easier way of doing this, of course.
23409  The 
23410 \family typewriter
23411 dropcaps
23412 \family default
23413  (or the newer 
23414 \family typewriter
23415 dropping
23416 \family default
23417 ) package from CTAN allows a simple way to add such letters to your documents.
23418  Since this package is not a standard part of TeXLive, I can't demonstrate
23419  it within this document, but if you copy this paragraph to a new document,
23420  delete the 
23421 \begin_inset Quotes eld
23422 \end_inset
23423
23424
23425 \family typewriter
23426
23427 \backslash
23428 verb
23429 \family default
23430
23431 \begin_inset Quotes erd
23432 \end_inset
23433
23434  and the pluses from the TeX code at the beginning of the paragraph, and
23435  add 
23436 \family typewriter
23437
23438 \backslash
23439 usepackage{dropcaps}
23440 \family default
23441  to your LaTeX preamble, you will get a nice Times Roman Italic 
23442 \begin_inset Quotes eld
23443 \end_inset
23444
23445 T
23446 \begin_inset Quotes erd
23447 \end_inset
23448
23449 , whose height is three lines of text and which protrudes 1 em into the
23450  margin.
23451  (Make certain you have copied 
23452 \begin_inset Quotes eld
23453 \end_inset
23454
23455
23456 \family typewriter
23457 dropcaps.sty
23458 \family default
23459
23460 \begin_inset Quotes erd
23461 \end_inset
23462
23463  into a directory where TeX can see it.) The first argument is the amount
23464  of indentation; in this case the negative sign moves it into the margin.
23465  The second argument is the height of the letter in number of lines of text.
23466  The third argument is the font name: virtually anything which has a tfm
23467  file should work (wade through the 
23468 \family typewriter
23469 .../texmf/fonts/tfm
23470 \family default
23471  directory for possibilities).
23472  My personal favorite is 
23473 \begin_inset Quotes eld
23474 \end_inset
23475
23476
23477 \family typewriter
23478 yinit
23479 \family default
23480
23481 \begin_inset Quotes erd
23482 \end_inset
23483
23484 , a fancy German font specifically designed for dropped capitals.
23485  The fourth argument is the letter (or letters) to be dropped.
23486  The 
23487 \family typewriter
23488 dropping
23489 \family default
23490  package also offers the 
23491 \family typewriter
23492
23493 \backslash
23494 bigdrop
23495 \family default
23496  command, as well as a slightly simplified 
23497 \family typewriter
23498
23499 \backslash
23500 dropping
23501 \family default
23502  command.
23503 \end_layout
23504
23505 \begin_layout Section
23506 Non-standard Paragraph Shapes
23507 \end_layout
23508
23509 \begin_layout Standard
23510 by 
23511 \noun on
23512 Mike Ressler
23513 \end_layout
23514
23515 \begin_layout Standard
23516 \begin_inset VSpace bigskip
23517 \end_inset
23518
23519
23520 \end_layout
23521
23522 \begin_layout Standard
23523 \begin_inset ERT
23524 status collapsed
23525
23526 \begin_layout Plain Layout
23527
23528
23529 \backslash
23530 begin{sloppypar}
23531 \end_layout
23532
23533 \end_inset
23534
23535
23536 \end_layout
23537
23538 \begin_layout Standard
23539 \begin_inset ERT
23540 status collapsed
23541
23542 \begin_layout Plain Layout
23543
23544
23545 \backslash
23546 newdimen
23547 \backslash
23548 varunit 
23549 \end_layout
23550
23551 \begin_layout Plain Layout
23552
23553
23554 \backslash
23555 setlength{
23556 \backslash
23557 varunit}{4.5in}
23558 \end_layout
23559
23560 \end_inset
23561
23562
23563 \end_layout
23564
23565 \begin_layout Standard
23566 \noindent
23567 \begin_inset ERT
23568 status collapsed
23569
23570 \begin_layout Plain Layout
23571
23572
23573 \backslash
23574 parshape 19 0.45
23575 \backslash
23576 varunit 0.332
23577 \backslash
23578 varunit
23579 \end_layout
23580
23581 \begin_layout Plain Layout
23582
23583 0.40
23584 \backslash
23585 varunit 0.300
23586 \backslash
23587 varunit
23588 \end_layout
23589
23590 \begin_layout Plain Layout
23591
23592 0.35
23593 \backslash
23594 varunit 0.293
23595 \backslash
23596 varunit
23597 \end_layout
23598
23599 \begin_layout Plain Layout
23600
23601 0.30
23602 \backslash
23603 varunit 0.300
23604 \backslash
23605 varunit
23606 \end_layout
23607
23608 \begin_layout Plain Layout
23609
23610 0.25
23611 \backslash
23612 varunit 0.317
23613 \backslash
23614 varunit
23615 \end_layout
23616
23617 \begin_layout Plain Layout
23618
23619 0.20
23620 \backslash
23621 varunit 0.342
23622 \backslash
23623 varunit
23624 \end_layout
23625
23626 \begin_layout Plain Layout
23627
23628 0.15
23629 \backslash
23630 varunit 0.373
23631 \backslash
23632 varunit
23633 \end_layout
23634
23635 \begin_layout Plain Layout
23636
23637 0.10
23638 \backslash
23639 varunit 0.410
23640 \backslash
23641 varunit
23642 \end_layout
23643
23644 \begin_layout Plain Layout
23645
23646 0.05
23647 \backslash
23648 varunit 0.453
23649 \backslash
23650 varunit
23651 \end_layout
23652
23653 \begin_layout Plain Layout
23654
23655 0.00
23656 \backslash
23657 varunit 0.500
23658 \backslash
23659 varunit
23660 \end_layout
23661
23662 \begin_layout Plain Layout
23663
23664 0.05
23665 \backslash
23666 varunit 0.453
23667 \backslash
23668 varunit
23669 \end_layout
23670
23671 \begin_layout Plain Layout
23672
23673 0.10
23674 \backslash
23675 varunit 0.410
23676 \backslash
23677 varunit
23678 \end_layout
23679
23680 \begin_layout Plain Layout
23681
23682 0.15
23683 \backslash
23684 varunit 0.373
23685 \backslash
23686 varunit
23687 \end_layout
23688
23689 \begin_layout Plain Layout
23690
23691 0.20
23692 \backslash
23693 varunit 0.342
23694 \backslash
23695 varunit
23696 \end_layout
23697
23698 \begin_layout Plain Layout
23699
23700 0.25
23701 \backslash
23702 varunit 0.317
23703 \backslash
23704 varunit
23705 \end_layout
23706
23707 \begin_layout Plain Layout
23708
23709 0.30
23710 \backslash
23711 varunit 0.300
23712 \backslash
23713 varunit
23714 \end_layout
23715
23716 \begin_layout Plain Layout
23717
23718 0.35
23719 \backslash
23720 varunit 0.293
23721 \backslash
23722 varunit
23723 \end_layout
23724
23725 \begin_layout Plain Layout
23726
23727 0.40
23728 \backslash
23729 varunit 0.300
23730 \backslash
23731 varunit
23732 \end_layout
23733
23734 \begin_layout Plain Layout
23735
23736 0.45
23737 \backslash
23738 varunit 0.332
23739 \backslash
23740 varunit
23741 \end_layout
23742
23743 \begin_layout Plain Layout
23744
23745 \end_layout
23746
23747 \end_inset
23748
23749 There are times when the tyranny of rectangular paragraphs must be overthrown.
23750  In such situations, a call to the delightful plain TeX command 
23751 \family typewriter
23752
23753 \backslash
23754 parshape
23755 \family default
23756  is called for.
23757  As you can see, completely arbitrary shapes can be laid out with a suitable
23758  set of linelength definitions.
23759  While this parshape may look a bit silly and useless, one could conceive
23760  of situations such as finely tuned dropped capitals, word wrapping around
23761  non-rectangular graphics, etc.
23762  which will benefit from such handcrafting.
23763 \end_layout
23764
23765 \begin_layout Standard
23766 \begin_inset VSpace bigskip
23767 \end_inset
23768
23769
23770 \end_layout
23771
23772 \begin_layout Standard
23773 The syntax is 
23774 \family typewriter
23775
23776 \backslash
23777 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23778  #nindent #nlength
23779 \family default
23780 , where 
23781 \family typewriter
23782 numlines
23783 \family default
23784  is the number of lines of text which define the paragraph.
23785  If there turn out to be fewer lines, the shape is truncated; if there are
23786  more, the excess lines have the same dimensions as the last line of the
23787  definition.
23788  The 
23789 \family typewriter
23790 #nindent
23791 \family default
23792  and 
23793 \family typewriter
23794 #nlength
23795 \family default
23796  entries specify the indentation of the line from the left margin, and the
23797  length of the line as measured from that point.
23798  The shape applies only to the current paragraph; everything is reset to
23799  normal for the next paragraph.
23800 \end_layout
23801
23802 \begin_layout Standard
23803 \begin_inset ERT
23804 status collapsed
23805
23806 \begin_layout Plain Layout
23807
23808
23809 \backslash
23810 end{sloppypar}
23811 \end_layout
23812
23813 \end_inset
23814
23815
23816 \end_layout
23817
23818 \begin_layout Section
23819 Summary
23820 \end_layout
23821
23822 \begin_layout Standard
23823 As you can see, the examples in this section range from the useful to the
23824  whimsical.
23825  While I don't expect that anyone will ever need the paragraph shape demonstrate
23826 d in the last section, the important point is that you can do almost anything
23827  you want in LyX if you are willing to figure out how to do it in TeX and
23828  LaTeX.
23829  TeX is a fantastically powerful typesetting system and all that power is
23830  available to you since LyX uses it as its backend.
23831  Happy LyXing!
23832 \end_layout
23833
23834 \end_body
23835 \end_document