]> git.lyx.org Git - features.git/blob - lib/doc/Additional.lyx
Update docs after r39410.
[features.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 % used for multi-column text
37 \usepackage{multicol}
38
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
41 \end_preamble
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
44 \begin_modules
45 logicalmkup
46 theorems-ams
47 theorems-ams-extended
48 multicol
49 \end_modules
50 \maintain_unincluded_children false
51 \begin_local_layout
52 Format 7
53 InsetLayout CharStyle:MenuItem
54 LyxType               charstyle
55 LabelString           menu
56 LatexType             command
57 LatexName             menuitem
58 Font
59 Family              Sans
60 EndFont
61 Preamble
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
63 EndPreamble
64 End
65 \end_local_layout
66 \language english
67 \language_package default
68 \inputencoding auto
69 \fontencoding global
70 \font_roman default
71 \font_sans default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
75 \font_sc false
76 \font_osf false
77 \font_sf_scale 100
78 \font_tt_scale 100
79
80 \graphics default
81 \default_output_format default
82 \output_sync 0
83 \bibtex_command default
84 \index_command default
85 \paperfontsize 12
86 \spacing single
87 \use_hyperref true
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
92 \pdf_bookmarks true
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
96 \pdf_breaklinks false
97 \pdf_pdfborder false
98 \pdf_colorlinks true
99 \pdf_backref false
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \papersize default
103 \use_geometry false
104 \use_amsmath 1
105 \use_esint 0
106 \use_mhchem 1
107 \use_mathdots 1
108 \cite_engine basic
109 \use_bibtopic false
110 \use_indices false
111 \paperorientation portrait
112 \suppress_date false
113 \use_refstyle 0
114 \index Index
115 \shortcut idx
116 \color #008000
117 \end_index
118 \secnumdepth 3
119 \tocdepth 3
120 \paragraph_separation indent
121 \paragraph_indentation default
122 \quotes_language english
123 \papercolumns 1
124 \papersides 2
125 \paperpagestyle headings
126 \tracking_changes false
127 \output_changes false
128 \html_math_output 0
129 \html_css_as_file 0
130 \html_be_strict true
131 \end_header
132
133 \begin_body
134
135 \begin_layout Title
136 Additional LyX Features
137 \end_layout
138
139 \begin_layout Subtitle
140 Version 2.0.x
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 LyX Archives
3107 \end_layout
3108
3109 \begin_layout Standard
3110 Users sometimes need to be able to 
3111 \begin_inset Quotes eld
3112 \end_inset
3113
3114 bundle
3115 \begin_inset Quotes erd
3116 \end_inset
3117
3118  a LyX file together with all the images (and other files) on which it depends,
3119  either for sending to a publisher or for sharing with a co-author.
3120  LyX 2.0 includes a Python script (
3121 \begin_inset Flex Code
3122 status collapsed
3123
3124 \begin_layout Plain Layout
3125 lyxpak.py
3126 \end_layout
3127
3128 \end_inset
3129
3130 ) that automates this process.
3131  To use it, you must have either the 
3132 \begin_inset Flex Code
3133 status collapsed
3134
3135 \begin_layout Plain Layout
3136 zipfile
3137 \end_layout
3138
3139 \end_inset
3140
3141  or 
3142 \begin_inset Flex Code
3143 status collapsed
3144
3145 \begin_layout Plain Layout
3146 tarfile
3147 \end_layout
3148
3149 \end_inset
3150
3151  python modules installed on your system.
3152  By default, the script prefers the 
3153 \begin_inset Flex Code
3154 status collapsed
3155
3156 \begin_layout Plain Layout
3157 gzip
3158 \end_layout
3159
3160 \end_inset
3161
3162 -compressed 
3163 \begin_inset Flex Code
3164 status collapsed
3165
3166 \begin_layout Plain Layout
3167 tar
3168 \end_layout
3169
3170 \end_inset
3171
3172  format on Unix-like systems and the 
3173 \begin_inset Flex Code
3174 status collapsed
3175
3176 \begin_layout Plain Layout
3177 zip
3178 \end_layout
3179
3180 \end_inset
3181
3182  format on Windows.
3183 \end_layout
3184
3185 \begin_layout Standard
3186 LyX's configuration process will set the script up to export a `LyX Archive',
3187  and this format will then be available under 
3188 \begin_inset Flex Code
3189 status collapsed
3190
3191 \begin_layout Plain Layout
3192 File\SpecialChar \menuseparator
3193 Export
3194 \end_layout
3195
3196 \end_inset
3197
3198 .
3199 \end_layout
3200
3201 \begin_layout Standard
3202 Independently of the platform, the generation of a particular archive format
3203  can be forced by adding either the 
3204 \begin_inset Flex Code
3205 status collapsed
3206
3207 \begin_layout Plain Layout
3208 -t
3209 \end_layout
3210
3211 \end_inset
3212
3213  (for the 
3214 \begin_inset Flex Code
3215 status collapsed
3216
3217 \begin_layout Plain Layout
3218 tar
3219 \end_layout
3220
3221 \end_inset
3222
3223  format) or 
3224 \begin_inset Flex Code
3225 status collapsed
3226
3227 \begin_layout Plain Layout
3228 -z
3229 \end_layout
3230
3231 \end_inset
3232
3233  (for the 
3234 \begin_inset Flex Code
3235 status collapsed
3236
3237 \begin_layout Plain Layout
3238 zip
3239 \end_layout
3240
3241 \end_inset
3242
3243  format) switch to the 
3244 \begin_inset Flex Code
3245 status collapsed
3246
3247 \begin_layout Plain Layout
3248 LyX\SpecialChar \menuseparator
3249 LyX Archive
3250 \end_layout
3251
3252 \end_inset
3253
3254  converter in 
3255 \begin_inset Flex Code
3256 status collapsed
3257
3258 \begin_layout Plain Layout
3259 Tools\SpecialChar \menuseparator
3260 Preferences\SpecialChar \menuseparator
3261 File Handling\SpecialChar \menuseparator
3262 Converters
3263 \end_layout
3264
3265 \end_inset
3266
3267 .
3268  (Make sure you add the switch after the script name, not before it.)
3269 \end_layout
3270
3271 \begin_layout Section
3272 Fancy Headers and Footers
3273 \end_layout
3274
3275 \begin_layout Standard
3276 The default page layout is rather plain; for an 
3277 \begin_inset Flex Code
3278 status collapsed
3279
3280 \begin_layout Plain Layout
3281 article
3282 \end_layout
3283
3284 \end_inset
3285
3286  document class, all you get is a centered page number at the bottom of
3287  the page.
3288  This document uses KOMA-script's book class, so it appears to be a bit
3289  fancier.
3290  But to really put on a show, you need to set the document page style to
3291  
3292 \begin_inset Quotes eld
3293 \end_inset
3294
3295 fancy
3296 \begin_inset Quotes erd
3297 \end_inset
3298
3299 , as mentioned in the 
3300 \emph on
3301 User Guide
3302 \emph default
3303 .
3304  This section describes the LaTeX code you need to insert in your LaTeX
3305  preamble in order to get the desired effects.
3306 \end_layout
3307
3308 \begin_layout Standard
3309 For more information on fancy headers, see the 
3310 \begin_inset Flex Code
3311 status collapsed
3312
3313 \begin_layout Plain Layout
3314 fancyhdr
3315 \end_layout
3316
3317 \end_inset
3318
3319  package documentation.
3320  (
3321 \begin_inset Flex URL
3322 status collapsed
3323
3324 \begin_layout Plain Layout
3325
3326 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3327 \end_layout
3328
3329 \end_inset
3330
3331 )
3332 \end_layout
3333
3334 \begin_layout Standard
3335 The page header is divided into three fields, not surprisingly labeled 
3336 \begin_inset Quotes eld
3337 \end_inset
3338
3339 left
3340 \begin_inset Quotes erd
3341 \end_inset
3342
3343
3344 \begin_inset Quotes eld
3345 \end_inset
3346
3347 center
3348 \begin_inset Quotes erd
3349 \end_inset
3350
3351 , and 
3352 \begin_inset Quotes eld
3353 \end_inset
3354
3355 right
3356 \begin_inset Quotes erd
3357 \end_inset
3358
3359 .
3360  The footer is also divided into these three fields.
3361  The LaTeX commands to set these fields in the simplest manner are 
3362 \begin_inset Flex Code
3363 status collapsed
3364
3365 \begin_layout Plain Layout
3366
3367 \backslash
3368 lhead
3369 \end_layout
3370
3371 \end_inset
3372
3373
3374 \begin_inset Flex Code
3375 status collapsed
3376
3377 \begin_layout Plain Layout
3378
3379 \backslash
3380 chead
3381 \end_layout
3382
3383 \end_inset
3384
3385
3386 \begin_inset Flex Code
3387 status collapsed
3388
3389 \begin_layout Plain Layout
3390
3391 \backslash
3392 rhead
3393 \end_layout
3394
3395 \end_inset
3396
3397
3398 \begin_inset Flex Code
3399 status collapsed
3400
3401 \begin_layout Plain Layout
3402
3403 \backslash
3404 lfoot
3405 \end_layout
3406
3407 \end_inset
3408
3409 , etc.
3410  Suppose you wish to put your name in the upper left hand corner of each
3411  page.
3412  Simply insert the following command in the preamble: 
3413 \end_layout
3414
3415 \begin_layout Standard
3416
3417 \family typewriter
3418
3419 \backslash
3420 lhead{John Q.
3421  DocWriter}
3422 \end_layout
3423
3424 \begin_layout Standard
3425 You will now see your name in the upper left.
3426  If a field has a default entry that you would like to get rid of (often
3427  the page number appears in the central footer, simply include a command
3428  with a blank argument, e.
3429 \begin_inset space \thinspace{}
3430 \end_inset
3431
3432 g.:
3433 \end_layout
3434
3435 \begin_layout Standard
3436
3437 \family typewriter
3438
3439 \backslash
3440 cfoot{}
3441 \end_layout
3442
3443 \begin_layout Standard
3444 Let's get really fancy: lets put the section number with the word 
3445 \begin_inset Quotes eld
3446 \end_inset
3447
3448 Section
3449 \begin_inset Quotes erd
3450 \end_inset
3451
3452  (e.
3453 \begin_inset space \thinspace{}
3454 \end_inset
3455
3456 g.
3457 \begin_inset space \space{}
3458 \end_inset
3459
3460 Section 3) in the upper left, the page number (e.
3461 \begin_inset space \thinspace{}
3462 \end_inset
3463
3464 g.
3465 \begin_inset space \space{}
3466 \end_inset
3467
3468 Page 4) in the upper right, your name in the lower left, and the date in
3469  the lower right.
3470  The following commands should now appear in the preamble:
3471 \end_layout
3472
3473 \begin_layout Standard
3474
3475 \family typewriter
3476
3477 \backslash
3478 lhead{Section 
3479 \backslash
3480 thesection}
3481 \end_layout
3482
3483 \begin_layout Standard
3484
3485 \family typewriter
3486
3487 \backslash
3488 chead{}
3489 \end_layout
3490
3491 \begin_layout Standard
3492
3493 \family typewriter
3494
3495 \backslash
3496 rhead{Page 
3497 \backslash
3498 thepage}
3499 \end_layout
3500
3501 \begin_layout Standard
3502
3503 \family typewriter
3504
3505 \backslash
3506 lfoot{John Q.
3507  DocWriter}
3508 \end_layout
3509
3510 \begin_layout Standard
3511
3512 \family typewriter
3513
3514 \backslash
3515 cfoot{}
3516 \end_layout
3517
3518 \begin_layout Standard
3519
3520 \family typewriter
3521
3522 \backslash
3523 rfoot{
3524 \backslash
3525 today}
3526 \end_layout
3527
3528 \begin_layout Standard
3529 The commands 
3530 \begin_inset Flex Code
3531 status collapsed
3532
3533 \begin_layout Plain Layout
3534
3535 \backslash
3536 thesection
3537 \end_layout
3538
3539 \end_inset
3540
3541  and 
3542 \begin_inset Flex Code
3543 status collapsed
3544
3545 \begin_layout Plain Layout
3546
3547 \backslash
3548 thepage
3549 \end_layout
3550
3551 \end_inset
3552
3553  access LaTeX's section and page counters, and so print out the current
3554  section and page numbers.
3555  
3556 \begin_inset Flex Code
3557 status collapsed
3558
3559 \begin_layout Plain Layout
3560
3561 \backslash
3562 today
3563 \end_layout
3564
3565 \end_inset
3566
3567  simply prints out today's date.
3568 \end_layout
3569
3570 \begin_layout Standard
3571 The thicknesses of the horizontal rules drawn beneath the header and above
3572  the footer can also be modified.
3573  If you don't want one of the rules, set its thickness to 0.
3574  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3575  Use commands
3576 \family typewriter
3577  
3578 \family default
3579 like 
3580 \begin_inset Flex Code
3581 status collapsed
3582
3583 \begin_layout Plain Layout
3584
3585 \backslash
3586 renewcommand{
3587 \backslash
3588 headrulewidth}{0.4pt}
3589 \end_layout
3590
3591 \end_inset
3592
3593  and 
3594 \begin_inset Flex Code
3595 status collapsed
3596
3597 \begin_layout Plain Layout
3598
3599 \backslash
3600 renewcommand{
3601 \backslash
3602 footrulewidth}{0.4pt}
3603 \end_layout
3604
3605 \end_inset
3606
3607  to set the thicknesses.
3608 \end_layout
3609
3610 \begin_layout Standard
3611 You can switch the header/footer settings on and off for individual pages
3612  using commands like 
3613 \begin_inset Flex Code
3614 status collapsed
3615
3616 \begin_layout Plain Layout
3617
3618 \backslash
3619 thispagestyle{empty}
3620 \end_layout
3621
3622 \end_inset
3623
3624
3625 \begin_inset Flex Code
3626 status collapsed
3627
3628 \begin_layout Plain Layout
3629
3630 \backslash
3631 thispagestyle{plain}
3632 \end_layout
3633
3634 \end_inset
3635
3636 , and 
3637 \begin_inset Flex Code
3638 status collapsed
3639
3640 \begin_layout Plain Layout
3641
3642 \backslash
3643 thispagestyle{fancy}
3644 \end_layout
3645
3646 \end_inset
3647
3648 .
3649  Simply insert them in the text on the page you want changed and mark them
3650  as TeX code.
3651  In fact, title pages are marked as plain by default, while following pages
3652  are marked fancy when using the global fancy setting.
3653 \end_layout
3654
3655 \begin_layout Standard
3656 As a final example, it is possible to include an image in the header or
3657  footer.
3658  Suppose you want to put a company logo in the upper lefthand corner.
3659  You might try something like
3660 \end_layout
3661
3662 \begin_layout Standard
3663
3664 \family typewriter
3665
3666 \backslash
3667 lhead{
3668 \backslash
3669 resizebox{1in}{!}{
3670 \backslash
3671 includegraphics{logo.eps}}}
3672 \end_layout
3673
3674 \begin_layout Standard
3675 \noindent
3676 (you may need to preface this with 
3677 \begin_inset Flex Code
3678 status collapsed
3679
3680 \begin_layout Plain Layout
3681 \noindent
3682
3683 \backslash
3684 usepackage{graphics}
3685 \end_layout
3686
3687 \end_inset
3688
3689  if you don't include graphics elsewhere in your document).
3690 \end_layout
3691
3692 \begin_layout Section
3693 Itemize Bullet Selection
3694 \begin_inset CommandInset label
3695 LatexCommand label
3696 name "sec:bullet"
3697
3698 \end_inset
3699
3700
3701 \end_layout
3702
3703 \begin_layout Standard
3704 by
3705 \noun on
3706  Allan Rae
3707 \end_layout
3708
3709 \begin_layout Subsection
3710 Introduction
3711 \end_layout
3712
3713 \begin_layout Standard
3714 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3715  Using this dialog you can easily specify what bullet shape to use at each
3716  level of an itemized list.
3717  These settings are document-wide so you won't be able to specify different
3718  sets of bullets for different paragraphs.
3719 \begin_inset Foot
3720 status collapsed
3721
3722 \begin_layout Plain Layout
3723 Well, actually you can but you'll have to do it by hand.
3724 \end_layout
3725
3726 \end_inset
3727
3728
3729 \end_layout
3730
3731 \begin_layout Subsection
3732 How it looks
3733 \end_layout
3734
3735 \begin_layout Standard
3736 Open the dialog by selecting the 
3737 \begin_inset Flex MenuItem
3738 status collapsed
3739
3740 \begin_layout Plain Layout
3741 Document\SpecialChar \menuseparator
3742 Settings
3743 \end_layout
3744
3745 \end_inset
3746
3747  menu item and then select the 
3748 \begin_inset Flex MenuItem
3749 status collapsed
3750
3751 \begin_layout Plain Layout
3752 Bullets
3753 \end_layout
3754
3755 \end_inset
3756
3757  tab.
3758 \end_layout
3759
3760 \begin_layout Standard
3761 The dialog provides you with a table of bullet shapes.
3762  A column of buttons on the left of the table provides access to the six
3763  different panels of bullet shapes.
3764  The row of buttons across the top is used to select which bullet depth
3765  you are changing.
3766  A text entry under the table shows the currently selected bullet shape's
3767  LaTeX equivalent and this can be edited if desired.
3768  If you do modify the text you will also need to specify any needed packages
3769  in the LaTeX preamble.
3770 \end_layout
3771
3772 \begin_layout Standard
3773 The six panels are divided up by the packages they require.
3774  The following table shows the mappings from button name to LaTeX packages.
3775 \end_layout
3776
3777 \begin_layout Standard
3778 \align center
3779 \begin_inset Tabular
3780 <lyxtabular version="3" rows="7" columns="2">
3781 <features tabularvalignment="middle">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <column alignment="center" valignment="top" width="0pt">
3784 <row>
3785 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3786 \begin_inset Text
3787
3788 \begin_layout Plain Layout
3789
3790 \family roman
3791 \series medium
3792 \shape up
3793 \size normal
3794 \emph off
3795 \bar no
3796 \noun off
3797 \color none
3798 Button
3799 \end_layout
3800
3801 \end_inset
3802 </cell>
3803 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3804 \begin_inset Text
3805
3806 \begin_layout Plain Layout
3807
3808 \family roman
3809 \series medium
3810 \shape up
3811 \size normal
3812 \emph off
3813 \bar no
3814 \noun off
3815 \color none
3816 Packages Required
3817 \end_layout
3818
3819 \end_inset
3820 </cell>
3821 </row>
3822 <row>
3823 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3824 \begin_inset Text
3825
3826 \begin_layout Plain Layout
3827
3828 \family sans
3829 \series medium
3830 \shape up
3831 \size normal
3832 \emph off
3833 \bar no
3834 \noun off
3835 \color none
3836 Standard
3837 \end_layout
3838
3839 \end_inset
3840 </cell>
3841 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3842 \begin_inset Text
3843
3844 \begin_layout Plain Layout
3845
3846 \series medium
3847 \shape up
3848 \size normal
3849 \emph off
3850 \bar no
3851 \noun off
3852 \color none
3853 base LaTeX
3854 \end_layout
3855
3856 \end_inset
3857 </cell>
3858 </row>
3859 <row>
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3861 \begin_inset Text
3862
3863 \begin_layout Plain Layout
3864
3865 \family sans
3866 \series medium
3867 \shape up
3868 \size normal
3869 \emph off
3870 \bar no
3871 \noun off
3872 \color none
3873 Maths
3874 \end_layout
3875
3876 \end_inset
3877 </cell>
3878 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3879 \begin_inset Text
3880
3881 \begin_layout Plain Layout
3882
3883 \family typewriter
3884 \series medium
3885 \shape up
3886 \size normal
3887 \emph off
3888 \bar no
3889 \noun off
3890 \color none
3891 amssymb.sty
3892 \end_layout
3893
3894 \end_inset
3895 </cell>
3896 </row>
3897 <row>
3898 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3899 \begin_inset Text
3900
3901 \begin_layout Plain Layout
3902
3903 \family sans
3904 \series medium
3905 \shape up
3906 \size normal
3907 \emph off
3908 \bar no
3909 \noun off
3910 \color none
3911 Ding1
3912 \end_layout
3913
3914 \end_inset
3915 </cell>
3916 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3917 \begin_inset Text
3918
3919 \begin_layout Plain Layout
3920
3921 \family typewriter
3922 \series medium
3923 \shape up
3924 \size normal
3925 \emph off
3926 \bar no
3927 \noun off
3928 \color none
3929 pifont.sty
3930 \end_layout
3931
3932 \end_inset
3933 </cell>
3934 </row>
3935 <row>
3936 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3937 \begin_inset Text
3938
3939 \begin_layout Plain Layout
3940
3941 \family sans
3942 \series medium
3943 \shape up
3944 \size normal
3945 \emph off
3946 \bar no
3947 \noun off
3948 \color none
3949 Ding2
3950 \end_layout
3951
3952 \end_inset
3953 </cell>
3954 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3955 \begin_inset Text
3956
3957 \begin_layout Plain Layout
3958
3959 \family typewriter
3960 \series medium
3961 \shape up
3962 \size normal
3963 \emph off
3964 \bar no
3965 \noun off
3966 \color none
3967 pifont.sty
3968 \end_layout
3969
3970 \end_inset
3971 </cell>
3972 </row>
3973 <row>
3974 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3975 \begin_inset Text
3976
3977 \begin_layout Plain Layout
3978
3979 \family sans
3980 \series medium
3981 \shape up
3982 \size normal
3983 \emph off
3984 \bar no
3985 \noun off
3986 \color none
3987 Ding3
3988 \end_layout
3989
3990 \end_inset
3991 </cell>
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3993 \begin_inset Text
3994
3995 \begin_layout Plain Layout
3996
3997 \family typewriter
3998 \series medium
3999 \shape up
4000 \size normal
4001 \emph off
4002 \bar no
4003 \noun off
4004 \color none
4005 pifont.sty
4006 \end_layout
4007
4008 \end_inset
4009 </cell>
4010 </row>
4011 <row>
4012 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4013 \begin_inset Text
4014
4015 \begin_layout Plain Layout
4016
4017 \family sans
4018 \series medium
4019 \shape up
4020 \size normal
4021 \emph off
4022 \bar no
4023 \noun off
4024 \color none
4025 Ding4
4026 \end_layout
4027
4028 \end_inset
4029 </cell>
4030 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4031 \begin_inset Text
4032
4033 \begin_layout Plain Layout
4034
4035 \family typewriter
4036 \series medium
4037 \shape up
4038 \size normal
4039 \emph off
4040 \bar no
4041 \noun off
4042 \color none
4043 pifont.sty
4044 \end_layout
4045
4046 \end_inset
4047 </cell>
4048 </row>
4049 </lyxtabular>
4050
4051 \end_inset
4052
4053
4054 \end_layout
4055
4056 \begin_layout Standard
4057 LyX doesn't stop you using bullets from packages you don't have.
4058  If you get errors from LaTeX when you try to view or print the file, then
4059  it is likely you are missing a package.
4060 \begin_inset Foot
4061 status collapsed
4062
4063 \begin_layout Plain Layout
4064 LyX doesn't restrict your use since you may be editing locally and exporting
4065  elsewhere.
4066 \end_layout
4067
4068 \end_inset
4069
4070
4071 \end_layout
4072
4073 \begin_layout Subsection
4074 How to use it
4075 \end_layout
4076
4077 \begin_layout Standard
4078 Select which bullet depth you want to change then select the bullet shape
4079  and size.
4080  Any changes will not be visible in LyX, but are visible when viewing the
4081  document.
4082 \end_layout
4083
4084 \begin_layout Standard
4085 You can reset a bullet shape to the default simply by clicking your right
4086  mouse button on the appropriate bullet depth button.
4087 \begin_inset Foot
4088 status collapsed
4089
4090 \begin_layout Plain Layout
4091 If you 
4092 \emph on
4093 really
4094 \emph default
4095  want to have multiple sets of paragraphs with different sets of bullets
4096  in each, then you're going to have to get your hands dirty with TeX code.
4097  The bullet selection dialog can help though because it provides you with
4098  the LaTeX code for a wide range of bullet shapes.
4099  To make your own custom paragraphs you have the following options:
4100 \end_layout
4101
4102 \begin_layout Plain Layout
4103 \begin_inset ERT
4104 status open
4105
4106 \begin_layout Plain Layout
4107
4108
4109 \backslash
4110 let
4111 \backslash
4112 savelabelitemi=
4113 \backslash
4114 labelitemi
4115 \end_layout
4116
4117 \end_inset
4118
4119
4120 \end_layout
4121
4122 \begin_layout Plain Layout
4123 \begin_inset ERT
4124 status open
4125
4126 \begin_layout Plain Layout
4127
4128
4129 \backslash
4130 renewcommand
4131 \backslash
4132 labelitemi[0]{
4133 \backslash
4134 small
4135 \backslash
4136 (
4137 \backslash
4138 sharp
4139 \backslash
4140 )}
4141 \end_layout
4142
4143 \end_inset
4144
4145
4146 \end_layout
4147
4148 \begin_layout Itemize
4149 Use the LaTeX command 
4150 \begin_inset Flex Code
4151 status collapsed
4152
4153 \begin_layout Plain Layout
4154
4155 \backslash
4156 renewcommand{}{}
4157 \end_layout
4158
4159 \end_inset
4160
4161  to specify a new bullet shape for a given depth.
4162  You'll also need to save the current bullet shape so you can restore it
4163  again afterwards.
4164  In this itemized list the following LaTeX code was used to change the bullet
4165  used for the first depth.
4166 \end_layout
4167
4168 \begin_deeper
4169 \begin_layout LyX-Code
4170
4171 \backslash
4172 let
4173 \backslash
4174 savelabelitemi=
4175 \backslash
4176 labelitemi 
4177 \end_layout
4178
4179 \begin_layout LyX-Code
4180
4181 \backslash
4182 renewcommand
4183 \backslash
4184 labelitemi[0]{
4185 \backslash
4186 small
4187 \backslash
4188 (
4189 \backslash
4190 sharp
4191 \backslash
4192 )}
4193 \end_layout
4194
4195 \end_deeper
4196 \begin_layout Itemize
4197 Note that the itemize depth is specified in Roman numerals as part of the
4198  
4199 \family typewriter
4200
4201 \backslash
4202 labelitem
4203 \family default
4204  command.
4205 \end_layout
4206
4207 \begin_layout Itemize
4208 \begin_inset ERT
4209 status open
4210
4211 \begin_layout Plain Layout
4212
4213 [
4214 \backslash
4215 (
4216 \backslash
4217 star
4218 \backslash
4219 )]
4220 \end_layout
4221
4222 \end_inset
4223
4224  Specify each individual entry by starting each item with the bullet shape
4225  enclosed in square brackets and set as 
4226 \begin_inset Flex MenuItem
4227 status collapsed
4228
4229 \begin_layout Plain Layout
4230 TeX Code
4231 \end_layout
4232
4233 \end_inset
4234
4235 .
4236  For example, this item was started with 
4237 \begin_inset Flex Code
4238 status collapsed
4239
4240 \begin_layout Plain Layout
4241 [
4242 \backslash
4243 (
4244 \backslash
4245 star
4246 \backslash
4247 )]
4248 \end_layout
4249
4250 \end_inset
4251
4252 .
4253 \end_layout
4254
4255 \begin_layout Plain Layout
4256 \begin_inset ERT
4257 status open
4258
4259 \begin_layout Plain Layout
4260
4261
4262 \backslash
4263 renewcommand
4264 \backslash
4265 labelitemi[0]{
4266 \backslash
4267 savelabelitemi}
4268 \end_layout
4269
4270 \end_inset
4271
4272
4273 \end_layout
4274
4275 \begin_layout Plain Layout
4276 You'll also need to revert the labelitem back to its previous setting for
4277  the global bullet shape settings to remain in effect.
4278  The way used here was:
4279 \end_layout
4280
4281 \begin_layout LyX-Code
4282
4283 \backslash
4284 renewcommand
4285 \backslash
4286 labelitemi[0]{
4287 \backslash
4288 savelabelitemi}
4289 \end_layout
4290
4291 \end_inset
4292
4293
4294 \end_layout
4295
4296 \begin_layout Chapter
4297 LyX and the World Wide Web
4298 \end_layout
4299
4300 \begin_layout Standard
4301 LyX has long supported the export of documents to various web-friendly formats,
4302  such as HTML.
4303  Before verson 2.0, however, HTML export was always accomplished by the use
4304  of external converters.
4305 \begin_inset Foot
4306 status collapsed
4307
4308 \begin_layout Plain Layout
4309 For details on the use of external converters with LyX, see the 
4310 \emph on
4311 Converters
4312 \emph default
4313  section of the Customization manual.
4314 \end_layout
4315
4316 \end_inset
4317
4318  These fall into two large groups: there are converters that use LaTeX as
4319  an intermediate format, such as 
4320 \begin_inset Flex Code
4321 status collapsed
4322
4323 \begin_layout Plain Layout
4324 htlatex
4325 \end_layout
4326
4327 \end_inset
4328
4329
4330 \begin_inset Flex Code
4331 status collapsed
4332
4333 \begin_layout Plain Layout
4334 html2latex
4335 \end_layout
4336
4337 \end_inset
4338
4339 , and 
4340 \begin_inset Flex Code
4341 status collapsed
4342
4343 \begin_layout Plain Layout
4344 plastex
4345 \end_layout
4346
4347 \end_inset
4348
4349 , relying upon LyX to produce the LaTeX; and there is a converter that works
4350  directly on LyX files, 
4351 \begin_inset Flex Code
4352 status collapsed
4353
4354 \begin_layout Plain Layout
4355 eLyXer
4356 \end_layout
4357
4358 \end_inset
4359
4360 .
4361  All of these have different advantages and disadvantages.
4362  
4363 \end_layout
4364
4365 \begin_layout Standard
4366 The LaTeX-based converters have the advantage that, in principle, they know
4367  everything about the exported document that LaTeX does.
4368  Such converters do not care, for example, if a certain block of code was
4369  produced by LyX or was Evil Red Text.
4370  These converters know about 
4371 \begin_inset Flex Code
4372 status collapsed
4373
4374 \begin_layout Plain Layout
4375 aux
4376 \end_layout
4377
4378 \end_inset
4379
4380  files, counters, and references, and can often make use of the 
4381 \begin_inset Flex Code
4382 status collapsed
4383
4384 \begin_layout Plain Layout
4385 bbl
4386 \end_layout
4387
4388 \end_inset
4389
4390  files generated by BibTeX.
4391  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4392  said that only TeX itself understands TeX---and LaTeX-based converters
4393  will often choke on what seem to be quite simple constructs; complex ones
4394  can throw them completely, and as of this writing, for example, the 
4395 \emph on
4396 Embedded Objects
4397 \emph default
4398  manual will not export with 
4399 \begin_inset Flex Code
4400 status collapsed
4401
4402 \begin_layout Plain Layout
4403 htlatex
4404 \end_layout
4405
4406 \end_inset
4407
4408 , though the others will.
4409  The other issue concerns how math is handled.
4410  These converters typically convert the formulae into little pictures that
4411  are then linked from the HTML document.
4412  Since these are actually generated by LaTeX, they are accurate.
4413  But they do not scale well, and just getting them to look as if they are
4414  actually meant to be in your document---so that the font sizes seem to
4415  be roughly the same---can be a challenge.
4416 \end_layout
4417
4418 \begin_layout Standard
4419 Alex Fernandez's 
4420 \begin_inset Flex Code
4421 status collapsed
4422
4423 \begin_layout Plain Layout
4424 eLyXer
4425 \end_layout
4426
4427 \end_inset
4428
4429  (
4430 \begin_inset CommandInset href
4431 LatexCommand href
4432 name "http://elyxer.nongnu.org/"
4433 target "http://elyxer.nongnu.org/"
4434
4435 \end_inset
4436
4437 ) solves some of these problems.
4438  In particular, the formulae it produces scale perfectly, since it renders
4439  math using a combination of HTML and CSS rather than converting the formulae
4440  to images.
4441  But even moderately complex formula are rendered less well than with 
4442 \begin_inset Flex Code
4443 status collapsed
4444
4445 \begin_layout Plain Layout
4446 htlatex
4447 \end_layout
4448
4449 \end_inset
4450
4451 ; this reflects the limitations of HTML.
4452 \begin_inset Foot
4453 status collapsed
4454
4455 \begin_layout Plain Layout
4456 That said, 
4457 \begin_inset Flex Code
4458 status collapsed
4459
4460 \begin_layout Plain Layout
4461 eLyXer
4462 \end_layout
4463
4464 \end_inset
4465
4466  can also use jsMath and MathJax for equations, but this setting is only
4467  available globally and requires one to have access to a server that runs
4468  the backend.
4469 \end_layout
4470
4471 \end_inset
4472
4473  More importantly (as of version 1.1.1, at least), 
4474 \begin_inset Flex Code
4475 status collapsed
4476
4477 \begin_layout Plain Layout
4478 eLyXer
4479 \end_layout
4480
4481 \end_inset
4482
4483  has limited support for math macros and no support for user-defined paragraph
4484  or character styles.
4485  These limitations make 
4486 \begin_inset Flex Code
4487 status collapsed
4488
4489 \begin_layout Plain Layout
4490 eLyXer
4491 \end_layout
4492
4493 \end_inset
4494
4495  unsuitable for many of the documents LyX users produce.
4496  In principle, of course, these problems could be solved, but the LyX developers
4497  have decided to follow a different path and have made LyX itself capable
4498  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4499  plaintext.
4500 \end_layout
4501
4502 \begin_layout Standard
4503 As of this writing, XHTML output remains under development and should probably
4504  be regarded as 
4505 \begin_inset Quotes eld
4506 \end_inset
4507
4508 experimental
4509 \begin_inset Quotes erd
4510 \end_inset
4511
4512 .
4513 \begin_inset Foot
4514 status collapsed
4515
4516 \begin_layout Plain Layout
4517 The file 
4518 \begin_inset Flex Code
4519 status collapsed
4520
4521 \begin_layout Plain Layout
4522 development/HTML.notes
4523 \end_layout
4524
4525 \end_inset
4526
4527 , which can be found in the LyX source tree or 
4528 \begin_inset CommandInset href
4529 LatexCommand href
4530 name "accessed online"
4531 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4532
4533 \end_inset
4534
4535 , usually contains up-to-date information about the state of XHTML output.
4536  See also the list of XHTML bugs on 
4537 \begin_inset CommandInset href
4538 LatexCommand href
4539 name "the bug tracker"
4540 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"
4541
4542 \end_inset
4543
4544 .
4545 \end_layout
4546
4547 \end_inset
4548
4549  Still, the developers have chosen this approach because it has several
4550  potential advantages over the other two.
4551 \end_layout
4552
4553 \begin_layout Standard
4554 These advantages are primarily due to the fact that the XHTML output routines,
4555  since they are part of LyX, know everything LyX knows about the document
4556  being exported.
4557 \begin_inset Foot
4558 status collapsed
4559
4560 \begin_layout Plain Layout
4561 Another advantage is that, since these routines are internal to LyX, they
4562  are immune to changes in LyX's file format, or to changes in the semantics
4563  of existing insets.
4564 \end_layout
4565
4566 \end_inset
4567
4568  So they know about the table of contents (as displayed in the outline),
4569  about the counters associated with different paragraph styles, and about
4570  user-defined styles.
4571  The XHTML output routines know what LyX knows about internationalization,
4572  too, so they will output 
4573 \begin_inset Quotes eld
4574 \end_inset
4575
4576 Chapter 1
4577 \begin_inset Quotes erd
4578 \end_inset
4579
4580  or 
4581 \begin_inset Quotes eld
4582 \end_inset
4583
4584
4585 \lang ngerman
4586 Kapitel
4587 \lang english
4588  1
4589 \begin_inset Quotes erd
4590 \end_inset
4591
4592 , depending upon the language in effect at the time.
4593  
4594 \end_layout
4595
4596 \begin_layout Standard
4597 Quite generally, the output routines know what LyX knows about document
4598  layout, that is, about how the document is to be rendered on screen.
4599  We use this information when we output the document as XHTML.
4600  In particular, LyX 
4601 \emph on
4602 automatically
4603 \emph default
4604  generates CSS style information corresponding to the layout information
4605  it uses to render the document on screen: if section headings are supposed
4606  to be sans-serif and bold as seen in LyX, then (by default) they will be
4607  sans-serif and bold when viewed in a web browser, too.
4608  And this is true not just for pre-defined styles, like Section, but for
4609  any style, including user-defined styles.
4610  Indeed, the XHTML output routines make no distinction between user-defined
4611  paragraph and character styles and LyX's own pre-defined styles: in each
4612  case, everything LyX knows about the styles is contained in the layout
4613  files.
4614  And much the same is true as regards pre-defined textual insets, such as
4615  footnotes, and various custom insets.
4616  
4617 \end_layout
4618
4619 \begin_layout Standard
4620 The result is that XHTML output can be customized and extended in exactly
4621  the same way LaTeX output can be customized and extended: through layout
4622  files and modules.
4623  See chapter five of the 
4624 \emph on
4625 Customization 
4626 \emph default
4627 manual for the details.
4628 \end_layout
4629
4630 \begin_layout Standard
4631 The remainder of this chapter contains more detailed information on XHTML
4632  output, its limitations, and ways to work around those limitations.
4633 \end_layout
4634
4635 \begin_layout Section
4636 Math Output in XHTML
4637 \end_layout
4638
4639 \begin_layout Standard
4640 LyX offers four choices for how math is rendered.
4641  These have various advantages and disadvantages:
4642 \end_layout
4643
4644 \begin_layout Itemize
4645 MathML
4646 \begin_inset Newline newline
4647 \end_inset
4648
4649 MathML is a dialect of XML designed specifically for mathematics on the
4650  web, and it typically renders very well in browsers that support it.
4651  The disadvantage is that not all browsers support MathML, and support is
4652  not complete even in the Gecko-based browsers, such as Firefox.
4653 \begin_inset Newline newline
4654 \end_inset
4655
4656 If LyX is unable to render a formula as MathML---for example, if the formula
4657  uses the 
4658 \begin_inset Flex Code
4659 status collapsed
4660
4661 \begin_layout Plain Layout
4662 xymatrix
4663 \end_layout
4664
4665 \end_inset
4666
4667  package or ERT---then it will instead output the formula as an image.
4668  
4669 \end_layout
4670
4671 \begin_layout Itemize
4672 HTML
4673 \begin_inset Newline newline
4674 \end_inset
4675
4676 As mentioned above, 
4677 \begin_inset Flex Code
4678 status collapsed
4679
4680 \begin_layout Plain Layout
4681 elyxer
4682 \end_layout
4683
4684 \end_inset
4685
4686  outputs math as HTML, styled by CSS.
4687 \begin_inset Foot
4688 status collapsed
4689
4690 \begin_layout Plain Layout
4691 LyX has borrowed some of the CSS for its HTML output from 
4692 \begin_inset Flex Code
4693 status collapsed
4694
4695 \begin_layout Plain Layout
4696 elyxer
4697 \end_layout
4698
4699 \end_inset
4700
4701 .
4702 \end_layout
4703
4704 \end_inset
4705
4706  For simple formulae, this can work quite well, though with more complicated
4707  formulae it tends to break down.
4708  Still, this method has the advantage that it is very widely supported and
4709  so it may be appropriate for documents that contain only a little, fairly
4710  simple math.
4711 \begin_inset Newline newline
4712 \end_inset
4713
4714 If Lyx is unable to render a formula as HTML---for example, if the formula
4715  uses the 
4716 \begin_inset Flex Code
4717 status collapsed
4718
4719 \begin_layout Plain Layout
4720 xymatrix
4721 \end_layout
4722
4723 \end_inset
4724
4725  package or ERT---then it will instead output the formula as an image.
4726  
4727 \end_layout
4728
4729 \begin_layout Itemize
4730 Images
4731 \begin_inset Newline newline
4732 \end_inset
4733
4734 Like 
4735 \begin_inset Flex Code
4736 status collapsed
4737
4738 \begin_layout Plain Layout
4739 htlatex
4740 \end_layout
4741
4742 \end_inset
4743
4744 , LyX will output formulae as images, the very same images, in fact, that
4745  are used for instant preview.
4746 \begin_inset Foot
4747 status collapsed
4748
4749 \begin_layout Plain Layout
4750 Instant preview does 
4751 \emph on
4752 not 
4753 \emph default
4754 have to be on for images to be output, however.
4755 \end_layout
4756
4757 \end_inset
4758
4759  The advantage to this method is that the images are simply generated by
4760  LaTeX, so they are very accurate.
4761  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4762  so they do not scale terribly well, and one cannot copy them, etc.
4763  (As of this writing, there are also problems about equation numbering.
4764  See 
4765 \begin_inset CommandInset href
4766 LatexCommand href
4767 name "bug 6894"
4768 target "http://www.lyx.org/trac/ticket/6894"
4769
4770 \end_inset
4771
4772 .)
4773 \begin_inset Newline newline
4774 \end_inset
4775
4776 The size of the images can be controlled by setting the 
4777 \begin_inset Quotes eld
4778 \end_inset
4779
4780 Math Images Scaling
4781 \begin_inset Quotes erd
4782 \end_inset
4783
4784  parameter under 
4785 \begin_inset Flex MenuItem
4786 status collapsed
4787
4788 \begin_layout Plain Layout
4789 Document\SpecialChar \menuseparator
4790 Settings\SpecialChar \menuseparator
4791 Output
4792 \end_layout
4793
4794 \end_inset
4795
4796 .
4797 \begin_inset Foot
4798 status collapsed
4799
4800 \begin_layout Plain Layout
4801 For those who want to know, this controls the resolution of the image in
4802  dots per inch and is based upon a default of 75 dpi.
4803 \end_layout
4804
4805 \end_inset
4806
4807
4808 \begin_inset Newline newline
4809 \end_inset
4810
4811 If LyX for some reason fails to create an image for a formula (e.g., if a
4812  required LaTeX package is not installed), then it will fall back to outputing
4813  the raw LaTeX.
4814 \end_layout
4815
4816 \begin_layout Itemize
4817 LaTeX
4818 \begin_inset Newline newline
4819 \end_inset
4820
4821 Finally, LyX will happily output math as LaTeX.
4822  As well as being the output of last resort, this method can be used with
4823  such tools as 
4824 \begin_inset CommandInset href
4825 LatexCommand href
4826 name "jsMath"
4827 target "http://www.math.union.edu/~dpvc/jsMath/"
4828
4829 \end_inset
4830
4831 , which uses JavaScript to render LaTeX embedded in HTML documents.
4832  LyX wraps the LaTeX in either a 
4833 \begin_inset Flex Code
4834 status collapsed
4835
4836 \begin_layout Plain Layout
4837 span
4838 \end_layout
4839
4840 \end_inset
4841
4842  (for inline formulas) or 
4843 \begin_inset Flex Code
4844 status collapsed
4845
4846 \begin_layout Plain Layout
4847 div
4848 \end_layout
4849
4850 \end_inset
4851
4852  (for displayed formulas) with 
4853 \begin_inset Flex Code
4854 status collapsed
4855
4856 \begin_layout Plain Layout
4857 class='math'
4858 \end_layout
4859
4860 \end_inset
4861
4862 , as is required for jsMath.
4863 \end_layout
4864
4865 \begin_layout Standard
4866 One of these output methods must be selected under 
4867 \begin_inset Flex MenuItem
4868 status collapsed
4869
4870 \begin_layout Plain Layout
4871 Document\SpecialChar \menuseparator
4872 Settings\SpecialChar \menuseparator
4873 Output
4874 \end_layout
4875
4876 \end_inset
4877
4878 .
4879  By default, LyX outputs MathML.
4880  This is a document-wide setting, therefore.
4881 \end_layout
4882
4883 \begin_layout Standard
4884 Eventually, LyX will offer the user the option to select an alternate output
4885  method for a particular inset, say, one that isn't being rendered very
4886  well by MathML.
4887 \begin_inset Foot
4888 status collapsed
4889
4890 \begin_layout Plain Layout
4891 That said, since LyX falls back to images if the inset contains ERT, then
4892  one can force output as an image by putting some harmless ERT into the
4893  math, for example: 
4894 \begin_inset Formula $a=b\relax$
4895 \end_inset
4896
4897 .
4898 \end_layout
4899
4900 \end_inset
4901
4902
4903 \end_layout
4904
4905 \begin_layout Section
4906 Bibliography and Citations
4907 \end_layout
4908
4909 \begin_layout Standard
4910 XHTML output fully supports bibliographies and citations.
4911  
4912 \end_layout
4913
4914 \begin_layout Standard
4915 Citation labels are generated by the same machinery that generates LyX's
4916  on-screen labels, so the labels will look in the output much as they do
4917  in LyX, though better.
4918  If you are using numerical citations, then LyX will output numerical labels,
4919  such as [1] or [17], rather than simply showing the citation key in square
4920  brackets, as it does on-screen.
4921  If you are using author-year citations, then LyX will add lowercase letters
4922  to the years, just as BibTeX does, if it finds more than one citation for
4923  a given author-year combination.
4924  The labels will be printed with the bibliography entries.
4925  Note that there is, at present, no way to customize the appearance of the
4926  labels, for example, to choose between square brackets and parentheses.
4927 \end_layout
4928
4929 \begin_layout Standard
4930 Bibliography output is handled by the same machinery that handles the presentati
4931 on of reference information in the citation dialog, so you will see in the
4932  XHTML output pretty much what you would see if you were to look at a given
4933  entry in the citation dialog.
4934  The formatting can be customized in your layout file or, preferably, in
4935  a module.
4936  See the 
4937 \emph on
4938 Customization
4939 \emph default
4940  manual for the details.
4941 \end_layout
4942
4943 \begin_layout Standard
4944 The main defect at present is that cross-referenced information is printed
4945  with every entry with which it is associated.
4946  So you can see things like this:
4947 \end_layout
4948
4949 \begin_layout Quote
4950 Jason Stanley, 
4951 \begin_inset Quotes eld
4952 \end_inset
4953
4954 Context and Logical Form
4955 \begin_inset Quotes erd
4956 \end_inset
4957
4958 , in 
4959 \emph on
4960 Language in Context: Selected Essays
4961 \emph default
4962  (Oxford: Oxford University Press, 2007), pp.
4963  30--68.
4964 \end_layout
4965
4966 \begin_layout Quote
4967 Jason Stanley, 
4968 \begin_inset Quotes eld
4969 \end_inset
4970
4971 Semantics in Context
4972 \begin_inset Quotes erd
4973 \end_inset
4974
4975 , in 
4976 \emph on
4977 Language in Context: Selected Essays
4978 \emph default
4979  (Oxford: Oxford University Press, 2007), pp.
4980  201--30.
4981 \end_layout
4982
4983 \begin_layout Standard
4984 This should be fixed before long.
4985 \end_layout
4986
4987 \begin_layout Standard
4988 There is no support at present for sectioned bibliographies.
4989  If you have multiple bibliographies, then LyX will print the same bibliography
4990  over and over.
4991 \end_layout
4992
4993 \begin_layout Section
4994 Indexes
4995 \end_layout
4996
4997 \begin_layout Standard
4998 LyX will happily export indexes as XHTML, but with certain limitations at
4999  the moment.
5000 \end_layout
5001
5002 \begin_layout Standard
5003 Index export will be most reliable when you do not attempt to use the fancy
5004  constructs that are described in the section on indexes in the 
5005 \emph on
5006 User's Guide
5007 \emph default
5008 .
5009 \begin_inset Foot
5010 status collapsed
5011
5012 \begin_layout Plain Layout
5013 The main issue here is that LyX itself does not really handle these.
5014  It just lets you enter what you would have to enter in raw LaTeX.
5015 \end_layout
5016
5017 \end_inset
5018
5019  We'll describe how they are handled using the subsection headings from
5020  that section.
5021 \end_layout
5022
5023 \begin_layout Itemize
5024 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5025  these, but the entries must be separated by 
5026 \begin_inset Quotes eld
5027 \end_inset
5028
5029  ! 
5030 \begin_inset Quotes erd
5031 \end_inset
5032
5033 , that is, there must be spaces around the exclamation point.
5034  This is because it is otherwise too difficult to check for escaped exclamation
5035  points, ones in math, and so forth.
5036 \end_layout
5037
5038 \begin_layout Itemize
5039 Page Ranges: There is no support at all for page ranges, since these make
5040  no sense with XHMTL.
5041  Instead, you will just get two index entries, one at either end.
5042 \end_layout
5043
5044 \begin_layout Itemize
5045 Cross-referencing: There is no support for cross-referencing.
5046  If LyX finds an entry containing the 
5047 \begin_inset Quotes eld
5048 \end_inset
5049
5050 |see\SpecialChar \ldots{}
5051
5052 \begin_inset Quotes erd
5053 \end_inset
5054
5055  construct, it is just dropped, and the rest is treated as an ordinary index
5056  entry.
5057 \end_layout
5058
5059 \begin_layout Itemize
5060 Index Entry Order: LyX does support attempts to fix the sorting order.
5061  It will take what is before the first `@' it finds and use that for sorting,
5062  taking what follows the first `@' to be the actual entry.
5063  At present, LyX does not check for escaped `@', so do not try to index
5064  email addresses.
5065 \end_layout
5066
5067 \begin_layout Itemize
5068 Index Entry Layout: You can format entries by using the text style dialog,
5069  or by using any other method available within LyX itself.
5070  There is no support for constructs like: 
5071 \begin_inset Quotes eld
5072 \end_inset
5073
5074 entry|textbf
5075 \begin_inset Quotes erd
5076 \end_inset
5077
5078 .
5079  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5080  and everything that follows it.
5081 \end_layout
5082
5083 \begin_layout Itemize
5084 Multiple Indexes: There is no support for multiple indexes.
5085  Rather, all index entries will be printed as one large index.
5086  To avoid our printing several versions of the index, we print only the
5087  main index, so make sure you have one.
5088 \end_layout
5089
5090 \begin_layout Section
5091 Nomenclature and Glossary
5092 \end_layout
5093
5094 \begin_layout Standard
5095 There is at present no support for glossaries.
5096  Adding it would be fairly trivial, and welcome.
5097 \end_layout
5098
5099 \begin_layout Chapter
5100 The LyX Server
5101 \end_layout
5102
5103 \begin_layout Section
5104 Introduction
5105 \end_layout
5106
5107 \begin_layout Standard
5108 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5109  and retrieve information about the LyX internal state.
5110  This is only intended for advanced users, but they should find it useful.
5111  It is by writing to the LyX server, for example, that bibliography managers,
5112  such as JabRef, are able to 
5113 \begin_inset Quotes eld
5114 \end_inset
5115
5116 push
5117 \begin_inset Quotes erd
5118 \end_inset
5119
5120  citations to LyX.
5121 \end_layout
5122
5123 \begin_layout Section
5124 Starting the LyX Server
5125 \end_layout
5126
5127 \begin_layout Standard
5128 The LyX server works through the use of a pair of named pipes.
5129  These are usually located in 
5130 \begin_inset Flex Code
5131 status collapsed
5132
5133 \begin_layout Plain Layout
5134 UserDir
5135 \end_layout
5136
5137 \end_inset
5138
5139 , (except on Windows, where 
5140 \emph on
5141 local
5142 \emph default
5143  named pipes are special objects located in 
5144 \begin_inset Flex Code
5145 status collapsed
5146
5147 \begin_layout Plain Layout
5148
5149 \backslash
5150
5151 \backslash
5152 .
5153 \backslash
5154 pipe
5155 \end_layout
5156
5157 \end_inset
5158
5159 ) and have the names 
5160 \begin_inset Quotes eld
5161 \end_inset
5162
5163
5164 \begin_inset Flex Code
5165 status collapsed
5166
5167 \begin_layout Plain Layout
5168 lyxpipe.in
5169 \end_layout
5170
5171 \end_inset
5172
5173
5174 \begin_inset Quotes erd
5175 \end_inset
5176
5177  and 
5178 \begin_inset Quotes eld
5179 \end_inset
5180
5181
5182 \begin_inset Flex Code
5183 status collapsed
5184
5185 \begin_layout Plain Layout
5186 lyxpipe.out
5187 \end_layout
5188
5189 \end_inset
5190
5191
5192 \begin_inset Quotes erd
5193 \end_inset
5194
5195 .
5196  External programs write into 
5197 \begin_inset Flex Code
5198 status collapsed
5199
5200 \begin_layout Plain Layout
5201 lyxpipe.in
5202 \end_layout
5203
5204 \end_inset
5205
5206  and read back data from 
5207 \begin_inset Flex Code
5208 status collapsed
5209
5210 \begin_layout Plain Layout
5211 lyxpipe.out
5212 \end_layout
5213
5214 \end_inset
5215
5216 .
5217  The stem of the pipe names can be defined in the 
5218 \begin_inset Flex MenuItem
5219 status collapsed
5220
5221 \begin_layout Plain Layout
5222 Tools\SpecialChar \menuseparator
5223 Preferences
5224 \end_layout
5225
5226 \end_inset
5227
5228  dialog, for example 
5229 \begin_inset Flex Code
5230 status collapsed
5231
5232 \begin_layout Plain Layout
5233 "/home/myhome/lyxpipe"
5234 \end_layout
5235
5236 \end_inset
5237
5238 , or 
5239 \begin_inset Flex Code
5240 status collapsed
5241
5242 \begin_layout Plain Layout
5243 "
5244 \backslash
5245
5246 \backslash
5247 .
5248 \backslash
5249 pipe
5250 \backslash
5251 lyxpipe"
5252 \end_layout
5253
5254 \end_inset
5255
5256  on Windows (but any working path can be used).
5257  You 
5258 \emph on
5259 must
5260 \emph default
5261  configure this manually in order for the server to start.
5262 \end_layout
5263
5264 \begin_layout Standard
5265 LyX will add the '
5266 \begin_inset Flex Code
5267 status collapsed
5268
5269 \begin_layout Plain Layout
5270 .in
5271 \end_layout
5272
5273 \end_inset
5274
5275 ' and '
5276 \begin_inset Flex Code
5277 status collapsed
5278
5279 \begin_layout Plain Layout
5280 .out
5281 \end_layout
5282
5283 \end_inset
5284
5285 ' to create the pipes.
5286  If one of the pipes already exists, LyX will assume that another LyX process
5287  is already running and will not start the server.
5288  On POSIX (Unix like) systems, if for some other reason, an unused 
5289 \begin_inset Quotes eld
5290 \end_inset
5291
5292 stale
5293 \begin_inset Quotes erd
5294 \end_inset
5295
5296  pipe is left in existence when LyX closes, then LyX will try to delete
5297  it.
5298  If this fails for some reason, you will need to delete the pipes manually
5299  and then restart LyX.
5300  On Windows, pipes are deleted by the OS on program termination or crash,
5301  so 
5302 \begin_inset Quotes eld
5303 \end_inset
5304
5305 stale
5306 \begin_inset Quotes erd
5307 \end_inset
5308
5309  pipes should not be possible.
5310 \end_layout
5311
5312 \begin_layout Standard
5313 To have several LyX processes with servers at the same time, you have to
5314  use different configurations, perhaps by using separate user directories,
5315  each with its own 
5316 \begin_inset Flex Code
5317 status collapsed
5318
5319 \begin_layout Plain Layout
5320 preferences
5321 \end_layout
5322
5323 \end_inset
5324
5325  file, for each process.
5326 \end_layout
5327
5328 \begin_layout Standard
5329 If you are developing a client program, you might find it useful to enable
5330  debugging information from the LyX server.
5331  Do this by starting LyX as 
5332 \begin_inset Flex Code
5333 status collapsed
5334
5335 \begin_layout Plain Layout
5336 lyx -dbg lyxserver
5337 \end_layout
5338
5339 \end_inset
5340
5341 .
5342 \end_layout
5343
5344 \begin_layout Standard
5345 You can find a complete example client written in C in the source distribution
5346  as 
5347 \begin_inset Flex Code
5348 status collapsed
5349
5350 \begin_layout Plain Layout
5351 development/lyxserver/server_monitor.c
5352 \end_layout
5353
5354 \end_inset
5355
5356 .
5357 \end_layout
5358
5359 \begin_layout Standard
5360 Another useful tool is command-line based client you will find in 
5361 \begin_inset Flex Code
5362 status collapsed
5363
5364 \begin_layout Plain Layout
5365 src/client/lyxclient
5366 \end_layout
5367
5368 \end_inset
5369
5370 .
5371 \end_layout
5372
5373 \begin_layout Section
5374 Normal communication
5375 \end_layout
5376
5377 \begin_layout Standard
5378 To issue a LyX call, the client writes a line of ASCII text into the input
5379  pipe.
5380  This line has the following format:
5381 \end_layout
5382
5383 \begin_layout Quote
5384 LYXCMD:
5385 \emph on
5386 clientname
5387 \emph default
5388 :
5389 \emph on
5390 function
5391 \emph default
5392 :
5393 \emph on
5394 argument
5395 \end_layout
5396
5397 \begin_layout Description
5398 clientname is a name that the client can choose arbitrarily.
5399  Its only use is that LyX will echo it if it sends an answer—so a client
5400  can dispatch results from different requesters.
5401 \end_layout
5402
5403 \begin_layout Description
5404 function is the function you want LyX to perform.
5405  It is the same as the commands you'd use in the minibuffer.
5406 \end_layout
5407
5408 \begin_layout Description
5409 argument is an optional argument which is meaningful only to some functions
5410  (for instance, the 
5411 \begin_inset Quotes eld
5412 \end_inset
5413
5414 self-insert
5415 \begin_inset Quotes erd
5416 \end_inset
5417
5418  LFUN will insert the argument as text at the cursor position).
5419 \end_layout
5420
5421 \begin_layout Standard
5422 The answer from LyX will arrive in the output pipe and be of the form
5423 \end_layout
5424
5425 \begin_layout Quote
5426 INFO:
5427 \emph on
5428 clientname
5429 \emph default
5430 :
5431 \emph on
5432 function
5433 \emph default
5434 :
5435 \emph on
5436 data
5437 \end_layout
5438
5439 \begin_layout Standard
5440 where 
5441 \emph on
5442 clientname
5443 \emph default
5444  and 
5445 \emph on
5446 function
5447 \emph default
5448  are just echoed from the command request, while 
5449 \emph on
5450 data
5451 \emph default
5452  is more or less useful information filled according to how the command
5453  execution worked out.
5454  Some commands, such as 
5455 \begin_inset Quotes eld
5456 \end_inset
5457
5458 font-state
5459 \begin_inset Quotes erd
5460 \end_inset
5461
5462 , will return information about the internal state of LyX, while other will
5463  return an empty data-response.
5464  This means that the command execution went fine.
5465 \end_layout
5466
5467 \begin_layout Standard
5468 In case of errors, the response from LyX will have this form
5469 \end_layout
5470
5471 \begin_layout Quote
5472 ERROR:
5473 \emph on
5474 clientname
5475 \emph default
5476 :
5477 \emph on
5478 function
5479 \emph default
5480 :
5481 \emph on
5482 error message
5483 \end_layout
5484
5485 \begin_layout Standard
5486 where the 
5487 \emph on
5488 error message
5489 \emph default
5490  should contain an explanation of why the command failed.
5491 \end_layout
5492
5493 \begin_layout Standard
5494 Examples:
5495 \end_layout
5496
5497 \begin_layout LyX-Code
5498 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5499 \begin_inset Newline newline
5500 \end_inset
5501
5502 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5503 \begin_inset Newline newline
5504 \end_inset
5505
5506 read a <~/.lyxpipe.out
5507 \begin_inset Newline newline
5508 \end_inset
5509
5510 echo $a
5511 \end_layout
5512
5513 \begin_layout Section
5514 Notification
5515 \end_layout
5516
5517 \begin_layout Standard
5518 LyX can notify clients of events going on asynchronously.
5519  Currently it will only do this if the user binds a key sequence with the
5520  function 
5521 \begin_inset Quotes eld
5522 \end_inset
5523
5524 notify
5525 \begin_inset Quotes erd
5526 \end_inset
5527
5528 .
5529  The format of the string LyX sends is as follows:
5530 \end_layout
5531
5532 \begin_layout Quote
5533 \begin_inset Flex Code
5534 status collapsed
5535
5536 \begin_layout Plain Layout
5537 NOTIFY:
5538 \end_layout
5539
5540 \end_inset
5541
5542
5543 \emph on
5544 key-sequence
5545 \end_layout
5546
5547 \begin_layout Standard
5548 where 
5549 \emph on
5550 key-sequence
5551 \emph default
5552  is the printed representation of the key sequence that was actually typed
5553  by the user.
5554 \end_layout
5555
5556 \begin_layout Standard
5557 This mechanism can be used to extend LyX's command set and implement macros.
5558  Bind some key sequence to 
5559 \begin_inset Quotes eld
5560 \end_inset
5561
5562 notify
5563 \begin_inset Quotes erd
5564 \end_inset
5565
5566 .
5567  Then start a client that listens on the output pipe, dispatches the command
5568  according to the sequence, and starts a function that may use LyX calls
5569  and LyX requests to issue a command or a series of commands to LyX.
5570 \end_layout
5571
5572 \begin_layout Section
5573 The simple LyX Server Protocol
5574 \end_layout
5575
5576 \begin_layout Standard
5577 LyX implements a simple protocol that can be used for session management.
5578  All messages are of the form
5579 \end_layout
5580
5581 \begin_layout Quote
5582 LYXSRV:
5583 \emph on
5584 clientname
5585 \emph default
5586 :
5587 \emph on
5588 protocol message
5589 \end_layout
5590
5591 \begin_layout Standard
5592 where 
5593 \emph on
5594 protocol message
5595 \emph default
5596  can be 
5597 \begin_inset Quotes eld
5598 \end_inset
5599
5600 hello
5601 \begin_inset Quotes erd
5602 \end_inset
5603
5604  or 
5605 \begin_inset Quotes eld
5606 \end_inset
5607
5608 bye
5609 \begin_inset Quotes erd
5610 \end_inset
5611
5612 .
5613  If 
5614 \begin_inset Quotes eld
5615 \end_inset
5616
5617 hello
5618 \begin_inset Quotes erd
5619 \end_inset
5620
5621  is received from a client, LyX will report back to inform the client that
5622  it's listening to it's messages, while 
5623 \begin_inset Quotes eld
5624 \end_inset
5625
5626 bye
5627 \begin_inset Quotes erd
5628 \end_inset
5629
5630  sent from LyX will inform clients that LyX is closing.
5631 \end_layout
5632
5633 \begin_layout Section
5634 Reverse DVI/PDF search
5635 \end_layout
5636
5637 \begin_layout Standard
5638 Some DVI/PDF viewers
5639 \begin_inset Foot
5640 status collapsed
5641
5642 \begin_layout Plain Layout
5643 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5644  Skim on Mac OSX and SumatraPDF on Windows.
5645 \end_layout
5646
5647 \end_inset
5648
5649  provide 
5650 \emph on
5651 reverse search
5652 \emph default
5653  facility (also called 
5654 \emph on
5655 inverse search
5656 \emph default
5657 ).
5658  This means that you can tell LyX to put the cursor to a specific line in
5659  the document by clicking at the respective position in the DVI/PDF output.
5660  To achieve this, the viewer must be able to communicate with LyX.
5661  This is done via the LyX server either by using the named pipe (
5662 \emph on
5663 lyxpipe
5664 \emph default
5665 ), or the UNIX domain socket (
5666 \emph on
5667 lyxsocket
5668 \emph default
5669 ) that LyX creates in its temporary directory (this is the way the 
5670 \begin_inset Flex Code
5671 status collapsed
5672
5673 \begin_layout Plain Layout
5674 lyxclient
5675 \end_layout
5676
5677 \end_inset
5678
5679  program communicates with LyX).
5680  In some cases, you need a helper script that mediates between the viewer
5681  and LyX, in others, the viewer can communicate with LyX directly.
5682  This depends on the selected viewer and on your operating system.
5683  The same applies to the way viewers need to be configured and the way the
5684  reverse search is actually performed.
5685  In what follows, we will thus describe how to setup reverse search for
5686  specific viewers.
5687  Before we turn to this, though, we will explain what needs to be done generally
5688  to enable reverse search in the DVI/PDF output.
5689 \end_layout
5690
5691 \begin_layout Subsection
5692 Automatic setup
5693 \begin_inset CommandInset label
5694 LatexCommand label
5695 name "sub:rev-search"
5696
5697 \end_inset
5698
5699
5700 \end_layout
5701
5702 \begin_layout Standard
5703 In most cases LyX will do the work for you by enabling 
5704 \begin_inset Flex MenuItem
5705 status collapsed
5706
5707 \begin_layout Plain Layout
5708 Document\SpecialChar \menuseparator
5709 Output\SpecialChar \menuseparator
5710 Synchronize with Output
5711 \end_layout
5712
5713 \end_inset
5714
5715 .
5716  In such a case LyX will automatically insert the necessary SyncTeX macro
5717  (for PDF) or load the srcltx package (for DVI) respectively.
5718  This option can be easily reached also on 
5719 \begin_inset Flex Code
5720 status collapsed
5721
5722 \begin_layout Plain Layout
5723 View/Update
5724 \end_layout
5725
5726 \end_inset
5727
5728  Toolbar.
5729 \end_layout
5730
5731 \begin_layout Standard
5732 If you need a different setting, you can select or input a custom macro
5733  from the drop down box just below 
5734 \begin_inset Flex MenuItem
5735 status collapsed
5736
5737 \begin_layout Plain Layout
5738 Document\SpecialChar \menuseparator
5739 Settings\SpecialChar \menuseparator
5740 Output\SpecialChar \menuseparator
5741 Synchronize with Output
5742 \end_layout
5743
5744 \end_inset
5745
5746 .
5747 \end_layout
5748
5749 \begin_layout Standard
5750 Please note that including the 
5751 \begin_inset Flex Code
5752 status collapsed
5753
5754 \begin_layout Plain Layout
5755 srcltx
5756 \end_layout
5757
5758 \end_inset
5759
5760  package or 
5761 \begin_inset Flex Code
5762 status collapsed
5763
5764 \begin_layout Plain Layout
5765 src-specials
5766 \end_layout
5767
5768 \end_inset
5769
5770  sometimes has an undesired impact on the typesetting.
5771  Thus, you should switch output synchronization off for the final typesetting
5772  if you use the 
5773 \begin_inset Flex Code
5774 status collapsed
5775
5776 \begin_layout Plain Layout
5777 srcltx
5778 \end_layout
5779
5780 \end_inset
5781
5782  package or 
5783 \begin_inset Flex Code
5784 status collapsed
5785
5786 \begin_layout Plain Layout
5787 src-specials
5788 \end_layout
5789
5790 \end_inset
5791
5792 .
5793 \end_layout
5794
5795 \begin_layout Standard
5796 In case you need some more special settings that are not covered by the
5797  automatic settings, read the next section about how to set up output synchroniz
5798 ation manually.
5799  If the automatic setup suits your needs, you can readily jump to section
5800 \begin_inset space ~
5801 \end_inset
5802
5803
5804 \begin_inset CommandInset ref
5805 LatexCommand ref
5806 reference "sub:configuring-viewers"
5807
5808 \end_inset
5809
5810 , where the necessary configuration steps in your viewer -- needed both
5811  with the automatic and the manual setup -- are described.
5812 \end_layout
5813
5814 \begin_layout Subsection
5815 Manual setup
5816 \end_layout
5817
5818 \begin_layout Standard
5819 LaTeX provides several different methods for reverse search.
5820  Some are built-in in the 
5821 \begin_inset Flex Code
5822 status collapsed
5823
5824 \begin_layout Plain Layout
5825 latex/pdflatex
5826 \end_layout
5827
5828 \end_inset
5829
5830  program, some are provided by external packages.
5831  Your choice depends on whether your LaTeX distribution already provides
5832  a given method (the built-in methods are rather new) and whether your viewer
5833  can cope with it.
5834  The available methods are described in the following.
5835 \end_layout
5836
5837 \begin_layout Subsubsection*
5838 Built-in DVI-search via src-specials (DVI only) 
5839 \end_layout
5840
5841 \begin_layout Standard
5842 This method provides the DVI file with the necessary information for reverse
5843  search.
5844  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5845  distribution should include it), and it works reliably.
5846  To enable it, change the 
5847 \begin_inset Flex MenuItem
5848 status collapsed
5849
5850 \begin_layout Plain Layout
5851 LaT
5852 \begin_inset ERT
5853 status collapsed
5854
5855 \begin_layout Plain Layout
5856
5857 {}
5858 \end_layout
5859
5860 \end_inset
5861
5862 eX (plain)->DVI
5863 \end_layout
5864
5865 \end_inset
5866
5867  or 
5868 \begin_inset Flex MenuItem
5869 status collapsed
5870
5871 \begin_layout Plain Layout
5872 LaT
5873 \begin_inset ERT
5874 status collapsed
5875
5876 \begin_layout Plain Layout
5877
5878 {}
5879 \end_layout
5880
5881 \end_inset
5882
5883 eX (plain)->DraftDVI
5884 \end_layout
5885
5886 \end_inset
5887
5888  converter in 
5889 \begin_inset Flex MenuItem
5890 status collapsed
5891
5892 \begin_layout Plain Layout
5893 Preferences\SpecialChar \menuseparator
5894 File Handling\SpecialChar \menuseparator
5895 Converters
5896 \end_layout
5897
5898 \end_inset
5899
5900  to 
5901 \begin_inset Flex Code
5902 status collapsed
5903
5904 \begin_layout Plain Layout
5905 latex -src-specials $$i
5906 \end_layout
5907
5908 \end_inset
5909
5910 .
5911  If this doesn't work, check if your TeX engine needs different options
5912  (the syntax might differ in some distributions).
5913 \end_layout
5914
5915 \begin_layout Subsubsection*
5916 External Packages (PDFSync and scrltx) 
5917 \end_layout
5918
5919 \begin_layout Standard
5920 The packages 
5921 \emph on
5922 pdfsync
5923 \emph default
5924  and 
5925 \emph on
5926 scrltx
5927 \emph default
5928  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5929  respectively.
5930  In order to enable it, load the packages in the LyX preamble: 
5931 \end_layout
5932
5933 \begin_layout Itemize
5934 \begin_inset Flex Code
5935 status collapsed
5936
5937 \begin_layout Plain Layout
5938
5939 \backslash
5940 usepackage{pdfsync}
5941 \end_layout
5942
5943 \end_inset
5944
5945  for reverse PDF search,
5946 \end_layout
5947
5948 \begin_layout Itemize
5949 \begin_inset Flex Code
5950 status collapsed
5951
5952 \begin_layout Plain Layout
5953
5954 \backslash
5955 usepackage[active]{srcltx}
5956 \end_layout
5957
5958 \end_inset
5959
5960  for reverse DVI search.
5961 \end_layout
5962
5963 \begin_layout Standard
5964 If you want to be able to perform both DVI and PDF reverse searches, you
5965  can also insert in the preamble the following lines
5966 \end_layout
5967
5968 \begin_layout LyX-Code
5969
5970 \backslash
5971 usepackage{ifpdf}
5972 \begin_inset Newline newline
5973 \end_inset
5974
5975
5976 \backslash
5977 ifpdf
5978 \begin_inset Newline newline
5979 \end_inset
5980
5981   
5982 \backslash
5983 usepackage{pdfsync}
5984 \begin_inset Newline newline
5985 \end_inset
5986
5987
5988 \backslash
5989 else
5990 \begin_inset Newline newline
5991 \end_inset
5992
5993   
5994 \backslash
5995 usepackage[active]{srcltx}
5996 \begin_inset Newline newline
5997 \end_inset
5998
5999
6000 \backslash
6001 fi
6002 \end_layout
6003
6004 \begin_layout Standard
6005 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6006  right package will be used.
6007 \end_layout
6008
6009 \begin_layout Standard
6010 Note that PDFSync might affect the output layout of your document.
6011  It is therefore advised to disable PDFsync for final documents.
6012 \end_layout
6013
6014 \begin_layout Subsubsection*
6015 Built-in reverse search via SyncTeX (DVI and PDF) 
6016 \end_layout
6017
6018 \begin_layout Standard
6019 Recent versions of 
6020 \begin_inset Flex Code
6021 status collapsed
6022
6023 \begin_layout Plain Layout
6024 (pdf)latex
6025 \end_layout
6026
6027 \end_inset
6028
6029  have built-in support for both PDF and DVI reverse search.
6030  This so-called 
6031 \emph on
6032 SyncTeX
6033 \emph default
6034  facility is basically the result of the integration of the PDFSync package
6035  to the pdftex program and its merge with the 
6036 \emph on
6037 scr-specials
6038 \emph default
6039  approach.
6040  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6041  to use it.
6042  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6043  already provide SyncTeX support.
6044 \end_layout
6045
6046 \begin_layout Standard
6047 To enable SyncTeX for DVI output, change the 
6048 \begin_inset Flex MenuItem
6049 status collapsed
6050
6051 \begin_layout Plain Layout
6052 LaT
6053 \begin_inset ERT
6054 status collapsed
6055
6056 \begin_layout Plain Layout
6057
6058 {}
6059 \end_layout
6060
6061 \end_inset
6062
6063 eX (plain) -> DVI
6064 \end_layout
6065
6066 \end_inset
6067
6068  or 
6069 \begin_inset Flex MenuItem
6070 status collapsed
6071
6072 \begin_layout Plain Layout
6073 LaT
6074 \begin_inset ERT
6075 status collapsed
6076
6077 \begin_layout Plain Layout
6078
6079 {}
6080 \end_layout
6081
6082 \end_inset
6083
6084 eX (plain) -> DraftDVI
6085 \end_layout
6086
6087 \end_inset
6088
6089  converter in 
6090 \begin_inset Flex MenuItem
6091 status collapsed
6092
6093 \begin_layout Plain Layout
6094 Preferences\SpecialChar \menuseparator
6095 File Handling\SpecialChar \menuseparator
6096 Converters
6097 \end_layout
6098
6099 \end_inset
6100
6101  to 
6102 \begin_inset Flex Code
6103 status collapsed
6104
6105 \begin_layout Plain Layout
6106 latex -synctex=1 $$i
6107 \end_layout
6108
6109 \end_inset
6110
6111 , and for PDF output, change the 
6112 \begin_inset Flex MenuItem
6113 status collapsed
6114
6115 \begin_layout Plain Layout
6116 LaT
6117 \begin_inset ERT
6118 status collapsed
6119
6120 \begin_layout Plain Layout
6121
6122 {}
6123 \end_layout
6124
6125 \end_inset
6126
6127 eX (pdflatex) -> PDF (pdflatex)
6128 \end_layout
6129
6130 \end_inset
6131
6132  or converter to 
6133 \begin_inset Flex Code
6134 status collapsed
6135
6136 \begin_layout Plain Layout
6137 pdflatex -synctex=1 $$i
6138 \end_layout
6139
6140 \end_inset
6141
6142 .
6143  Check the documentation of your viewer whether the viewer needs to be configure
6144 d for the use with SyncTeX.
6145 \begin_inset Foot
6146 status collapsed
6147
6148 \begin_layout Plain Layout
6149 The 
6150 \begin_inset Flex Code
6151 status collapsed
6152
6153 \begin_layout Plain Layout
6154 -synctex=1
6155 \end_layout
6156
6157 \end_inset
6158
6159  option enables gzip compression.
6160  If your viewer does not support it, you should instead use 
6161 \begin_inset Flex Code
6162 status collapsed
6163
6164 \begin_layout Plain Layout
6165 -synctex=-1
6166 \end_layout
6167
6168 \end_inset
6169
6170 .
6171 \end_layout
6172
6173 \end_inset
6174
6175
6176 \end_layout
6177
6178 \begin_layout Subsection
6179 Configuring and using specific viewers
6180 \begin_inset CommandInset label
6181 LatexCommand label
6182 name "sub:configuring-viewers"
6183
6184 \end_inset
6185
6186
6187 \end_layout
6188
6189 \begin_layout Subsubsection*
6190 Xdvi (all platforms)
6191 \end_layout
6192
6193 \begin_layout Standard
6194 If you use 
6195 \begin_inset Flex Code
6196 status collapsed
6197
6198 \begin_layout Plain Layout
6199 xdvi
6200 \end_layout
6201
6202 \end_inset
6203
6204 , you don't need to do anything else for performing a reverse DVI search,
6205  as LyX already provides the necessary hooks for automatically using the
6206  
6207 \begin_inset Flex Code
6208 status collapsed
6209
6210 \begin_layout Plain Layout
6211 lyxclient
6212 \end_layout
6213
6214 \end_inset
6215
6216  program.
6217  Just setup your document as described above (reverse search is triggered
6218  by Ctrl-click or Alt-click on Mac OSX, respectively).
6219 \end_layout
6220
6221 \begin_layout Standard
6222 However, if for whatever reason you want to use the named pipe instead of
6223  the socket for communicating with LyX, simply change the DVI viewer in
6224  
6225 \begin_inset Flex MenuItem
6226 status collapsed
6227
6228 \begin_layout Plain Layout
6229 Preferences\SpecialChar \menuseparator
6230 File Handling\SpecialChar \menuseparator
6231 File formats
6232 \end_layout
6233
6234 \end_inset
6235
6236  to
6237 \begin_inset Foot
6238 status collapsed
6239
6240 \begin_layout Plain Layout
6241 On Mac OSX you have to use 
6242 \begin_inset Flex Code
6243 status collapsed
6244
6245 \begin_layout Plain Layout
6246 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6247 \end_layout
6248
6249 \end_inset
6250
6251
6252 \end_layout
6253
6254 \end_inset
6255
6256  
6257 \begin_inset Flex Code
6258 status collapsed
6259
6260 \begin_layout Plain Layout
6261 xdvi -editor 'lyxeditor.sh %f %l'
6262 \end_layout
6263
6264 \end_inset
6265
6266 , where 
6267 \begin_inset Flex Code
6268 status collapsed
6269
6270 \begin_layout Plain Layout
6271 lyxeditor.sh
6272 \end_layout
6273
6274 \end_inset
6275
6276  is a suitable script.
6277  For example, a minimal shell script is the following one:
6278 \end_layout
6279
6280 \begin_layout LyX-Code
6281 #!/bin/sh
6282 \begin_inset Newline newline
6283 \end_inset
6284
6285 LYXPIPE="/path/to/lyxpipe"
6286 \begin_inset Newline newline
6287 \end_inset
6288
6289 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6290 \begin_inset Newline newline
6291 \end_inset
6292
6293 echo "$COMMAND" > "${LYXPIPE}".in || exit
6294 \begin_inset Newline newline
6295 \end_inset
6296
6297 read < "${LYXPIPE}".out || exit
6298 \end_layout
6299
6300 \begin_layout Standard
6301 where 
6302 \begin_inset Flex Code
6303 status collapsed
6304
6305 \begin_layout Plain Layout
6306 /path/to/lyxpipe
6307 \end_layout
6308
6309 \end_inset
6310
6311  is the Ly
6312 \begin_inset ERT
6313 status collapsed
6314
6315 \begin_layout Plain Layout
6316
6317 {}
6318 \end_layout
6319
6320 \end_inset
6321
6322 XServer pipe path specified in 
6323 \begin_inset Flex MenuItem
6324 status collapsed
6325
6326 \begin_layout Plain Layout
6327 Preferences\SpecialChar \menuseparator
6328 Paths
6329 \end_layout
6330
6331 \end_inset
6332
6333 .
6334 \begin_inset Foot
6335 status collapsed
6336
6337 \begin_layout Plain Layout
6338 In the 
6339 \begin_inset Flex Code
6340 status collapsed
6341
6342 \begin_layout Plain Layout
6343 development/tools
6344 \end_layout
6345
6346 \end_inset
6347
6348  folder of a source distribution you can find a 
6349 \begin_inset Flex Code
6350 status collapsed
6351
6352 \begin_layout Plain Layout
6353 lyxeditor
6354 \end_layout
6355
6356 \end_inset
6357
6358  script which is able to locate the 
6359 \emph on
6360 lyxpipe
6361 \emph default
6362  based on your preferences.
6363 \end_layout
6364
6365 \end_inset
6366
6367
6368 \end_layout
6369
6370 \begin_layout Subsubsection*
6371 MacDviX (Mac OSX)
6372 \end_layout
6373
6374 \begin_layout Standard
6375 At the end of 
6376 \begin_inset Flex Code
6377 status collapsed
6378
6379 \begin_layout Plain Layout
6380 /Applications/MacDviX_Folder/calleditor.script
6381 \end_layout
6382
6383 \end_inset
6384
6385 , add the following lines:
6386 \end_layout
6387
6388 \begin_layout LyX-Code
6389 /Applications/Ly
6390 \begin_inset ERT
6391 status collapsed
6392
6393 \begin_layout Plain Layout
6394
6395 {}
6396 \end_layout
6397
6398 \end_inset
6399
6400 X.app/Contents/MacOS/lyxeditor "$2" $1
6401 \begin_inset Newline newline
6402 \end_inset
6403
6404 exit 1
6405 \end_layout
6406
6407 \begin_layout Standard
6408 Modify the lines accordingly if you install LyX somewhere else than in the
6409  Applications folder.
6410 \end_layout
6411
6412 \begin_layout Standard
6413 Reverse search is triggered by Alt-click (OPTION-click).
6414 \end_layout
6415
6416 \begin_layout Subsubsection*
6417 Skim (Mac OSX)
6418 \end_layout
6419
6420 \begin_layout Standard
6421 Enter 
6422 \begin_inset Flex Code
6423 status collapsed
6424
6425 \begin_layout Plain Layout
6426 open -a Skim.app $$i
6427 \end_layout
6428
6429 \end_inset
6430
6431  to the viewer setting in 
6432 \begin_inset Flex MenuItem
6433 status collapsed
6434
6435 \begin_layout Plain Layout
6436 Preferences\SpecialChar \menuseparator
6437 File Handling\SpecialChar \menuseparator
6438 File formats\SpecialChar \menuseparator
6439 PDF (pdflatex)
6440 \end_layout
6441
6442 \end_inset
6443
6444 , and then in 
6445 \begin_inset Flex MenuItem
6446 status collapsed
6447
6448 \begin_layout Plain Layout
6449 Skim\SpecialChar \menuseparator
6450 Preferences\SpecialChar \menuseparator
6451 Sync
6452 \end_layout
6453
6454 \end_inset
6455
6456  select Ly
6457 \begin_inset ERT
6458 status collapsed
6459
6460 \begin_layout Plain Layout
6461
6462 {}
6463 \end_layout
6464
6465 \end_inset
6466
6467 X.
6468 \end_layout
6469
6470 \begin_layout Standard
6471 Reverse search is triggered by COMMAND-SHIFT-click
6472 \end_layout
6473
6474 \begin_layout Subsubsection*
6475 Okular (KDE)
6476 \end_layout
6477
6478 \begin_layout Standard
6479 Go to 
6480 \begin_inset Flex MenuItem
6481 status collapsed
6482
6483 \begin_layout Plain Layout
6484 Settings\SpecialChar \menuseparator
6485 Configure Okular\SpecialChar \ldots{}
6486 \SpecialChar \menuseparator
6487 Editor
6488 \end_layout
6489
6490 \end_inset
6491
6492 , select 
6493 \begin_inset Quotes eld
6494 \end_inset
6495
6496 Custom Text Editor
6497 \begin_inset Quotes erd
6498 \end_inset
6499
6500  and add the command 
6501 \begin_inset Flex Code
6502 status collapsed
6503
6504 \begin_layout Plain Layout
6505 lyxclient -g %f %l
6506 \end_layout
6507
6508 \end_inset
6509
6510 .
6511 \end_layout
6512
6513 \begin_layout Standard
6514 Reverse search is triggered by SHIFT-click.
6515 \end_layout
6516
6517 \begin_layout Subsubsection*
6518 YAP (Windows)
6519 \end_layout
6520
6521 \begin_layout Standard
6522 Launch yap, choose its 
6523 \begin_inset Flex MenuItem
6524 status collapsed
6525
6526 \begin_layout Plain Layout
6527 View\SpecialChar \menuseparator
6528 Options
6529 \end_layout
6530
6531 \end_inset
6532
6533  menu and select the 
6534 \begin_inset Quotes eld
6535 \end_inset
6536
6537 Inverse DVI Search
6538 \begin_inset Quotes erd
6539 \end_inset
6540
6541  tab.
6542  Click on the 
6543 \begin_inset Quotes eld
6544 \end_inset
6545
6546 New\SpecialChar \ldots{}
6547
6548 \begin_inset Quotes erd
6549 \end_inset
6550
6551  button and, in the window that opens, enter 
6552 \begin_inset Quotes eld
6553 \end_inset
6554
6555 LyX Editor
6556 \begin_inset Quotes erd
6557 \end_inset
6558
6559  (or any other name you like) in the 
6560 \begin_inset Quotes eld
6561 \end_inset
6562
6563 Name:
6564 \begin_inset Quotes erd
6565 \end_inset
6566
6567  field.
6568  Now click on the button labeled 
6569 \begin_inset Quotes eld
6570 \end_inset
6571
6572 \SpecialChar \ldots{}
6573
6574 \begin_inset Quotes erd
6575 \end_inset
6576
6577  to open a file dialog and navigate to the directory containing the batch
6578  file 
6579 \begin_inset Flex Code
6580 status collapsed
6581
6582 \begin_layout Plain Layout
6583 lyxeditor.bat
6584 \end_layout
6585
6586 \end_inset
6587
6588  (see below).
6589  Select 
6590 \begin_inset Flex Code
6591 status collapsed
6592
6593 \begin_layout Plain Layout
6594 lyxeditor.bat
6595 \end_layout
6596
6597 \end_inset
6598
6599  and then specify the program arguments as 
6600 \begin_inset Flex Code
6601 status collapsed
6602
6603 \begin_layout Plain Layout
6604 %f %l
6605 \end_layout
6606
6607 \end_inset
6608
6609 .
6610  The 
6611 \begin_inset Flex Code
6612 status collapsed
6613
6614 \begin_layout Plain Layout
6615 lyxeditor.bat
6616 \end_layout
6617
6618 \end_inset
6619
6620  wrapper is used for communicating with LyX through the 
6621 \emph on
6622 lyxpipe
6623 \emph default
6624  and is as follows:
6625 \end_layout
6626
6627 \begin_layout LyX-Code
6628 @echo off
6629 \begin_inset Newline newline
6630 \end_inset
6631
6632 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6633 \backslash
6634
6635 \backslash
6636 .
6637 \backslash
6638 pipe
6639 \backslash
6640 lyxpipe.in
6641 \begin_inset Newline newline
6642 \end_inset
6643
6644 type 
6645 \backslash
6646
6647 \backslash
6648 .
6649 \backslash
6650 pipe
6651 \backslash
6652 lyxpipe.out
6653 \end_layout
6654
6655 \begin_layout Standard
6656 Make sure that the LyXServer pipe path you specified in LyX is 
6657 \begin_inset Flex Code
6658 status collapsed
6659
6660 \begin_layout Plain Layout
6661
6662 \backslash
6663
6664 \backslash
6665 .
6666 \backslash
6667 pipe
6668 \backslash
6669 lyxpipe
6670 \end_layout
6671
6672 \end_inset
6673
6674 , otherwise change the 
6675 \begin_inset Flex Code
6676 status collapsed
6677
6678 \begin_layout Plain Layout
6679 lyxeditor.bat
6680 \end_layout
6681
6682 \end_inset
6683
6684  wrapper accordingly.
6685 \end_layout
6686
6687 \begin_layout Standard
6688 In yap, reverse search is triggered by double-click.
6689 \end_layout
6690
6691 \begin_layout Subsubsection*
6692 SumatraPDF (Windows)
6693 \end_layout
6694
6695 \begin_layout Standard
6696 In order to use SumatraPDF for inverse search, enter 
6697 \begin_inset Flex Code
6698 status collapsed
6699
6700 \begin_layout Plain Layout
6701 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6702 \end_layout
6703
6704 \end_inset
6705
6706  in the viewer setting in 
6707 \begin_inset Flex MenuItem
6708 status collapsed
6709
6710 \begin_layout Plain Layout
6711 Preferences\SpecialChar \menuseparator
6712 File Handling\SpecialChar \menuseparator
6713 File formats\SpecialChar \menuseparator
6714 PDF (pdflatex)
6715 \end_layout
6716
6717 \end_inset
6718
6719 , where 
6720 \begin_inset Flex Code
6721 status collapsed
6722
6723 \begin_layout Plain Layout
6724 lyxeditor.bat
6725 \end_layout
6726
6727 \end_inset
6728
6729  is the previous wrapper.
6730  If SumatraPDF.exe is not in your command PATH, use its full file name.
6731 \end_layout
6732
6733 \begin_layout Standard
6734 Reverse search is triggered by double-click.
6735 \end_layout
6736
6737 \begin_layout Subsubsection*
6738 YAP (Cygwin)
6739 \end_layout
6740
6741 \begin_layout Standard
6742 First of all, make sure that yap is your default DVI viewer in the Windows
6743  environment, then launch it, choose its 
6744 \begin_inset Flex MenuItem
6745 status collapsed
6746
6747 \begin_layout Plain Layout
6748 View\SpecialChar \menuseparator
6749 Options
6750 \end_layout
6751
6752 \end_inset
6753
6754  menu and select the 
6755 \begin_inset Quotes eld
6756 \end_inset
6757
6758 Inverse DVI Search
6759 \begin_inset Quotes erd
6760 \end_inset
6761
6762  tab.
6763  Click on the 
6764 \begin_inset Quotes eld
6765 \end_inset
6766
6767 New\SpecialChar \ldots{}
6768
6769 \begin_inset Quotes erd
6770 \end_inset
6771
6772  button and, in the window that opens, enter 
6773 \begin_inset Quotes eld
6774 \end_inset
6775
6776 LyX Editor
6777 \begin_inset Quotes erd
6778 \end_inset
6779
6780  (or any other name you like) in the 
6781 \begin_inset Quotes eld
6782 \end_inset
6783
6784 Name:
6785 \begin_inset Quotes erd
6786 \end_inset
6787
6788  field.
6789  Now click on the button labeled 
6790 \begin_inset Quotes eld
6791 \end_inset
6792
6793 \SpecialChar \ldots{}
6794
6795 \begin_inset Quotes erd
6796 \end_inset
6797
6798  to open a file dialog and navigate to the directory containing the 
6799 \begin_inset Flex Code
6800 status collapsed
6801
6802 \begin_layout Plain Layout
6803 lyxeditor.exe
6804 \end_layout
6805
6806 \end_inset
6807
6808  program (which is installed by default on Cygwin along with the LyX executable).
6809  Select 
6810 \begin_inset Flex Code
6811 status collapsed
6812
6813 \begin_layout Plain Layout
6814 lyxeditor.exe
6815 \end_layout
6816
6817 \end_inset
6818
6819  and then specify the program arguments as 
6820 \begin_inset Flex Code
6821 status collapsed
6822
6823 \begin_layout Plain Layout
6824 -g %f %l
6825 \end_layout
6826
6827 \end_inset
6828
6829 .
6830  In this way, you will be using the 
6831 \emph on
6832 lyxsocket
6833 \emph default
6834  for communicating with LyX.
6835  If, for whatever reason, you want to use the 
6836 \emph on
6837 lyxpipe
6838 \emph default
6839 , omit the 
6840 \begin_inset Flex Code
6841 status collapsed
6842
6843 \begin_layout Plain Layout
6844 -g
6845 \end_layout
6846
6847 \end_inset
6848
6849  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6850 \end_layout
6851
6852 \begin_layout Standard
6853 In yap, reverse search is triggered by double-click.
6854 \end_layout
6855
6856 \begin_layout Subsubsection*
6857 SumatraPDF (Cygwin)
6858 \end_layout
6859
6860 \begin_layout Standard
6861 In order to use SumatraPDF for inverse search, enter 
6862 \begin_inset Flex Code
6863 status collapsed
6864
6865 \begin_layout Plain Layout
6866 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6867 \end_layout
6868
6869 \end_inset
6870
6871  in the viewer setting in 
6872 \begin_inset Flex MenuItem
6873 status collapsed
6874
6875 \begin_layout Plain Layout
6876 Preferences\SpecialChar \menuseparator
6877 File Handling\SpecialChar \menuseparator
6878 File formats\SpecialChar \menuseparator
6879 PDF (pdflatex)
6880 \end_layout
6881
6882 \end_inset
6883
6884 .
6885  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6886  The 
6887 \begin_inset Flex Code
6888 status collapsed
6889
6890 \begin_layout Plain Layout
6891 -g
6892 \end_layout
6893
6894 \end_inset
6895
6896  enables communication via the 
6897 \emph on
6898 lyxsocket
6899 \emph default
6900 .
6901  Again, omit the 
6902 \begin_inset Flex Code
6903 status collapsed
6904
6905 \begin_layout Plain Layout
6906 -g
6907 \end_layout
6908
6909 \end_inset
6910
6911  option if you want to use the 
6912 \emph on
6913 lyxpipe
6914 \emph default
6915 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6916 \end_layout
6917
6918 \begin_layout Standard
6919 Reverse search is triggered by double-click.
6920 \end_layout
6921
6922 \begin_layout Section
6923 Forward search
6924 \end_layout
6925
6926 \begin_layout Standard
6927 Forward search is, as the name implies, in a sense the 
6928 \begin_inset Quotes eld
6929 \end_inset
6930
6931 opposite
6932 \begin_inset Quotes erd
6933 \end_inset
6934
6935  to reverse search.
6936  It allows you to let the viewer jump to a given position from within LyX.
6937  If forward search is set up (as described in what follows), you can put
6938  the cursor anywhere in your LyX document, and hit 
6939 \begin_inset Flex MenuItem
6940 status collapsed
6941
6942 \begin_layout Plain Layout
6943 Navigate\SpecialChar \menuseparator
6944 Forward search
6945 \end_layout
6946
6947 \end_inset
6948
6949  (or select 
6950 \begin_inset Flex MenuItem
6951 status collapsed
6952
6953 \begin_layout Plain Layout
6954 Forward search
6955 \end_layout
6956
6957 \end_inset
6958
6959  in the context menu via right mouse click), and then the viewer will jump
6960  to that position as well.
6961  This implies, of course, that your viewer supports this function.
6962 \end_layout
6963
6964 \begin_layout Standard
6965 To make forward search possible, you first need to provide the generated
6966  output PDF/DVI file with additional information about the TeX sources.
6967  This can be done via the methods described in the section 
6968 \begin_inset CommandInset ref
6969 LatexCommand ref
6970 reference "sub:rev-search"
6971
6972 \end_inset
6973
6974 .
6975 \end_layout
6976
6977 \begin_layout Standard
6978 Additionally, you need to configure LyX for using your viewers in 
6979 \begin_inset Flex MenuItem
6980 status collapsed
6981
6982 \begin_layout Plain Layout
6983 Tools\SpecialChar \menuseparator
6984 Preferences\SpecialChar \menuseparator
6985 Output\SpecialChar \menuseparator
6986 General
6987 \end_layout
6988
6989 \end_inset
6990
6991 .
6992  We provide a range of tested configurations for some viewers, which you
6993  can select from the drop down list.
6994  If none of these configurations suits you, you have to find out and enter
6995  a suitable configuration yourself.
6996  The definition syntax uses the following placeholders: 
6997 \end_layout
6998
6999 \begin_layout Itemize
7000 \noindent
7001 \begin_inset Flex Code
7002 status collapsed
7003
7004 \begin_layout Plain Layout
7005 $$n
7006 \end_layout
7007
7008 \end_inset
7009
7010 : row number
7011 \end_layout
7012
7013 \begin_layout Itemize
7014 \noindent
7015 \begin_inset Flex Code
7016 status collapsed
7017
7018 \begin_layout Plain Layout
7019 $$t
7020 \end_layout
7021
7022 \end_inset
7023
7024 : name of the (temporary) exported .tex file
7025 \end_layout
7026
7027 \begin_layout Itemize
7028 \noindent
7029 \begin_inset Flex Code
7030 status collapsed
7031
7032 \begin_layout Plain Layout
7033 $$o
7034 \end_layout
7035
7036 \end_inset
7037
7038 : name of the exported output file (either dvi or pdf, depending on which
7039  one exists in the temporary directory)
7040 \end_layout
7041
7042 \begin_layout Standard
7043 Note that only some of the viewers provide full forward search functionality,
7044  among them yap, xdvi, okular and Sumatra PDF
7045 \begin_inset Foot
7046 status collapsed
7047
7048 \begin_layout Plain Layout
7049 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7050 ip
7051 \end_layout
7052
7053 \end_inset
7054
7055 .
7056  While many of the widespread PDF viewers (most notably Adobe Reader) do
7057  not support forward search at all, some other viewers -- e.
7058 \begin_inset space \thinspace{}
7059 \end_inset
7060
7061 g.
7062  evince and xpdf -- allow at least to reload the document and jump to a
7063  specific page of the file, so you can at least navigate 
7064 \begin_inset Quotes eld
7065 \end_inset
7066
7067 near
7068 \begin_inset Quotes erd
7069 \end_inset
7070
7071 .
7072  These latter functionality is provided by an external call of synctex (see
7073  the predefined example configurations).
7074  
7075 \end_layout
7076
7077 \begin_layout Standard
7078 Forward search works both with DVI and PDF output.
7079  LyX simply checks which preview format you have used before (i.
7080 \begin_inset space \thinspace{}
7081 \end_inset
7082
7083 e., which format is already there in the temporary directory) and chooses
7084  the appropriate configuration for the respective format.
7085 \end_layout
7086
7087 \begin_layout Chapter
7088 Special Document Classes
7089 \end_layout
7090
7091 \begin_layout Section
7092 A&A Paper
7093 \end_layout
7094
7095 \begin_layout Standard
7096 by 
7097 \noun on
7098 Peter Sütterlin
7099 \end_layout
7100
7101 \begin_layout Subsection
7102 Introduction
7103 \end_layout
7104
7105 \begin_layout Standard
7106 This section describes how LyX can be used to write articles for submission
7107  to the scientific journal 
7108 \emph on
7109 Astronomy and Astrophysics
7110 \emph default
7111  (www.edpsciences.fr/aa/ 
7112 \begin_inset Flex URL
7113 status collapsed
7114
7115 \begin_layout Plain Layout
7116
7117 http://www.edpsciences.fr/aa/
7118 \end_layout
7119
7120 \end_inset
7121
7122 ) using Version 5.01 of the document class 
7123 \family typewriter
7124 aa.cls
7125 \family default
7126 .
7127  This package can be downloaded from the ftp site
7128 \end_layout
7129
7130 \begin_layout Standard
7131 \begin_inset VSpace medskip
7132 \end_inset
7133
7134
7135 \end_layout
7136
7137 \begin_layout Standard
7138 \align center
7139 \begin_inset Flex URL
7140 status collapsed
7141
7142 \begin_layout Plain Layout
7143
7144 ftp://ftp.edpsciences.org/pub/aa/readme.html
7145 \end_layout
7146
7147 \end_inset
7148
7149
7150 \end_layout
7151
7152 \begin_layout Standard
7153 \begin_inset VSpace medskip
7154 \end_inset
7155
7156
7157 \end_layout
7158
7159 \begin_layout Standard
7160 A manual comes together with that package, and this text is not meant to
7161  replace the original manual but is merely a short guide in how to realize
7162  the correct form of your paper.
7163  
7164 \end_layout
7165
7166 \begin_layout Standard
7167 Please note that the publisher of the journal was changed from Springer
7168  to EDP Sciences starting January 1, 2001.
7169  That change involved also some slight changes to the style files, namely
7170  the removal of the thesaurus command.
7171  The LyX class aa supports the newest version of these style files, V 5.01.
7172  If you have an older version installed, please upgrade.
7173  For compatibility, the old (version 4) layout has been kept as 
7174 \family sans
7175 article (A&A V4)
7176 \family default
7177 .
7178  Please refer to the comments in 
7179 \family typewriter
7180 LyXDir/layouts/aapaper.layout
7181 \family default
7182 .
7183 \end_layout
7184
7185 \begin_layout Subsection
7186 Getting started
7187 \end_layout
7188
7189 \begin_layout Standard
7190 It is recommended you start from the example template distributed with LyX.
7191  If you are not using a template, note the following settings:
7192 \end_layout
7193
7194 \begin_layout Itemize
7195 Select 
7196 \family sans
7197 article (A&A)
7198 \family default
7199  in the 
7200 \family sans
7201 Document\SpecialChar \menuseparator
7202 Settings
7203 \family default
7204  dialog (OK, that one was obvious).
7205 \end_layout
7206
7207 \begin_layout Itemize
7208 Don't change the option 
7209 \family sans
7210 Page
7211 \begin_inset space ~
7212 \end_inset
7213
7214 style
7215 \family default
7216 : Leave it set to 
7217 \family sans
7218 default
7219 \family default
7220 .
7221  The whole layout is done by the macros, you shouldn't change anything.
7222 \end_layout
7223
7224 \begin_layout Subsection
7225 The header block
7226 \end_layout
7227
7228 \begin_layout Standard
7229 First thing to enter is the header information.
7230  It consists of seven entries, of which some are optional.
7231  They are
7232 \end_layout
7233
7234 \begin_layout Itemize
7235
7236 \family sans
7237 Title
7238 \family default
7239 : [required] 
7240 \end_layout
7241
7242 \begin_layout Itemize
7243
7244 \family sans
7245 Subtitle
7246 \family default
7247 : [optional] 
7248 \end_layout
7249
7250 \begin_layout Itemize
7251
7252 \family sans
7253 Author
7254 \family default
7255 : [required]
7256 \end_layout
7257
7258 \begin_layout Itemize
7259
7260 \family sans
7261 Address
7262 \family default
7263 : [required]
7264 \end_layout
7265
7266 \begin_layout Itemize
7267
7268 \family sans
7269 Offprints
7270 \family default
7271 : [optional] if more than one author: whom to contact for offprint requests.
7272 \end_layout
7273
7274 \begin_layout Itemize
7275
7276 \family sans
7277 Mail
7278 \family default
7279 : [optional] mail address for contacts.
7280 \end_layout
7281
7282 \begin_layout Itemize
7283
7284 \family sans
7285 Date
7286 \family default
7287 : [required].
7288  Suggested format is 
7289 \family typewriter
7290 Received: <date>; Accepted <date> 
7291 \end_layout
7292
7293 \begin_layout Standard
7294 There is no need to issue the 
7295 \family typewriter
7296
7297 \backslash
7298 maketitle
7299 \family default
7300  command, this is done automatically by LyX when the header is finished.
7301  Although the order of the single header entries doesn't matter it is advised
7302  to keep the above sequence, just to get the best optics and meets the layout
7303  of the real document.
7304 \end_layout
7305
7306 \begin_layout Standard
7307 If you want to place footnotes in the header block, e.
7308 \begin_inset space \thinspace{}
7309 \end_inset
7310
7311 g.
7312 \begin_inset space \space{}
7313 \end_inset
7314
7315 to state your present address, just use the standard footnote via the menu
7316  
7317 \family sans
7318 Insert\SpecialChar \menuseparator
7319 Footnote.
7320
7321 \family default
7322  LyX will automagically use the term 
7323 \family typewriter
7324
7325 \backslash
7326 thanks{}
7327 \family default
7328  in that case.
7329 \end_layout
7330
7331 \begin_layout Standard
7332 In addition to these topics, the macros use three additional LaTeX commands
7333  that have no counterpart in LyX:
7334 \end_layout
7335
7336 \begin_layout Itemize
7337
7338 \family typewriter
7339
7340 \backslash
7341 and
7342 \family default
7343  to separate different names for more than one author and institute, respectivel
7344 y.
7345 \end_layout
7346
7347 \begin_layout Itemize
7348
7349 \family typewriter
7350
7351 \backslash
7352 inst{<nr>}
7353 \family default
7354 to mark corresponding author/institute pairs.
7355  The institutes are numbered sequentially as they appear in the 
7356 \family sans
7357 Address
7358 \family default
7359  field, so you have to put a marker to each author.
7360 \end_layout
7361
7362 \begin_layout Itemize
7363
7364 \family typewriter
7365
7366 \backslash
7367 email{address}
7368 \family default
7369  to supply an email address for fast contact.
7370 \end_layout
7371
7372 \begin_layout Standard
7373 In all cases, the appropriate command has to be entered in LyX and marked
7374  as LaTeX code.
7375  See the examples.
7376  
7377 \end_layout
7378
7379 \begin_layout Subsection
7380 The abstract
7381 \end_layout
7382
7383 \begin_layout Standard
7384 The abstract should immediately follow the header block.
7385  With version 5 the abstract environment was changed to a command, and there
7386  is now a resctriction to only one paragraph.
7387  In addition, it should contain an entry with the keywords.
7388  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7389  command 
7390 \family typewriter
7391
7392 \backslash
7393 keywords{}
7394 \family default
7395  by hand and mark it as LaTeX code.
7396  Refer to the example paper.
7397 \end_layout
7398
7399 \begin_layout Subsection
7400 Supported environments
7401 \end_layout
7402
7403 \begin_layout Standard
7404 The A&A paper layout supports the following environments for structuring
7405  your text:
7406 \end_layout
7407
7408 \begin_layout Itemize
7409
7410 \family sans
7411 Standard
7412 \end_layout
7413
7414 \begin_layout Itemize
7415
7416 \family sans
7417 Section
7418 \end_layout
7419
7420 \begin_layout Itemize
7421
7422 \family sans
7423 Subsection
7424 \end_layout
7425
7426 \begin_layout Itemize
7427
7428 \family sans
7429 Subsubsection
7430 \end_layout
7431
7432 \begin_layout Itemize
7433
7434 \family sans
7435 Itemize
7436 \end_layout
7437
7438 \begin_layout Itemize
7439
7440 \family sans
7441 Enumerate
7442 \end_layout
7443
7444 \begin_layout Itemize
7445
7446 \family sans
7447 Description
7448 \end_layout
7449
7450 \begin_layout Itemize
7451
7452 \family sans
7453 Caption
7454 \end_layout
7455
7456 \begin_layout Itemize
7457
7458 \family sans
7459 Abstract
7460 \end_layout
7461
7462 \begin_layout Itemize
7463
7464 \family sans
7465 Acknowledgment
7466 \end_layout
7467
7468 \begin_layout Itemize
7469
7470 \family sans
7471 Bibliography
7472 \end_layout
7473
7474 \begin_layout Itemize
7475
7476 \family sans
7477 LaTeX
7478 \end_layout
7479
7480 \begin_layout Subsection
7481 Commands not supported by LyX
7482 \end_layout
7483
7484 \begin_layout Standard
7485 Some commands are not yet supported by the 
7486 \family sans
7487 paper (A&A)
7488 \family default
7489  layout for LyX.
7490  Some have already been mentioned.
7491  For the sake of completeness, they are listed all together here:
7492 \end_layout
7493
7494 \begin_layout Itemize
7495
7496 \family typewriter
7497
7498 \backslash
7499 and
7500 \end_layout
7501
7502 \begin_layout Itemize
7503
7504 \family typewriter
7505
7506 \backslash
7507 email
7508 \end_layout
7509
7510 \begin_layout Itemize
7511
7512 \family typewriter
7513
7514 \backslash
7515 appendix
7516 \end_layout
7517
7518 \begin_layout Itemize
7519
7520 \family typewriter
7521
7522 \backslash
7523 authorrunning
7524 \end_layout
7525
7526 \begin_layout Itemize
7527
7528 \family typewriter
7529
7530 \backslash
7531 inst{}
7532 \end_layout
7533
7534 \begin_layout Itemize
7535
7536 \family typewriter
7537
7538 \backslash
7539 keywords{}
7540 \end_layout
7541
7542 \begin_layout Itemize
7543
7544 \family typewriter
7545
7546 \backslash
7547 object{}
7548 \end_layout
7549
7550 \begin_layout Itemize
7551
7552 \family typewriter
7553
7554 \backslash
7555 titlerunning{}
7556 \end_layout
7557
7558 \begin_layout Standard
7559 If you want to use any of these commands, you have to enter them yourself.
7560  
7561 \series bold
7562 Do not forget to mark them as LaTeX code!
7563 \end_layout
7564
7565 \begin_layout Subsection
7566 Figure and Table Floats
7567 \end_layout
7568
7569 \begin_layout Standard
7570 LyX provides support for the necessary float environments 
7571 \family sans
7572 figure, figure*, table
7573 \family default
7574  and 
7575 \family sans
7576 table*
7577 \family default
7578 , therefore we won't tell much about it here.
7579  Refer to the 
7580 \emph on
7581 User's
7582 \begin_inset space ~
7583 \end_inset
7584
7585 Guide
7586 \emph default
7587 .
7588  Just remember that tables should be left-aligned.
7589  For that, select the table and change the alignment in 
7590 \family sans
7591 Edit\SpecialChar \menuseparator
7592 Paragraph
7593 \begin_inset space ~
7594 \end_inset
7595
7596 Settings.
7597 \end_layout
7598
7599 \begin_layout Standard
7600 There is only one special thing: the figures with caption besides the figure.
7601  To create such a figure, you have to do the following:
7602 \end_layout
7603
7604 \begin_layout Enumerate
7605 Create a wide figure float: 
7606 \family sans
7607 Insert\SpecialChar \menuseparator
7608 Float\SpecialChar \menuseparator
7609 Figure
7610 \family default
7611 , then right click in the figure and select 
7612 \family sans
7613 \bar under
7614 S
7615 \bar default
7616 pan
7617 \begin_inset space ~
7618 \end_inset
7619
7620 columns
7621 \family default
7622 .
7623 \end_layout
7624
7625 \begin_layout Enumerate
7626 Enter your caption text.
7627 \end_layout
7628
7629 \begin_layout Enumerate
7630 Press 
7631 \family sans
7632 Return
7633 \family default
7634  to move the cursor above the caption.
7635 \end_layout
7636
7637 \begin_layout Enumerate
7638 Insert your figure
7639 \end_layout
7640
7641 \begin_layout Enumerate
7642 Position the cursor behind the figure and insert a horizontal fill: 
7643 \family sans
7644 Insert\SpecialChar \menuseparator
7645 Special
7646 \begin_inset space ~
7647 \end_inset
7648
7649 Character\SpecialChar \menuseparator
7650 Horizontal
7651 \begin_inset space ~
7652 \end_inset
7653
7654 Fill
7655 \family default
7656 .
7657 \end_layout
7658
7659 \begin_layout Enumerate
7660 Switch to LaTeX mode: 
7661 \family sans
7662 M-c
7663 \begin_inset space ~
7664 \end_inset
7665
7666 t
7667 \family default
7668 .
7669 \end_layout
7670
7671 \begin_layout Enumerate
7672 Enter 
7673 \family typewriter
7674
7675 \backslash
7676 parbox[b]{55mm}{
7677 \family default
7678 .
7679  
7680 \series bold
7681 Do not close the brace!
7682 \end_layout
7683
7684 \begin_layout Enumerate
7685 Position the cursor behind the caption text, switch to LaTeX mode and insert
7686  the closing brace: 
7687 \family sans
7688 M-c
7689 \begin_inset space ~
7690 \end_inset
7691
7692 t
7693 \family default
7694  
7695 \family typewriter
7696 }
7697 \family default
7698 .
7699 \end_layout
7700
7701 \begin_layout Standard
7702 Also, refer to the figures in the example paper.
7703 \end_layout
7704
7705 \begin_layout Subsection
7706 Referee layout
7707 \end_layout
7708
7709 \begin_layout Standard
7710 For submission, the paper has to be formated in a special double-spacing
7711  layout.
7712  For this purpose, you have to give the option 
7713 \family typewriter
7714 referee
7715 \family default
7716  to the documentclass.
7717  This must be done using the extra class options field in the 
7718 \family sans
7719 Document\SpecialChar \menuseparator
7720 Settings
7721 \family default
7722  dialog.
7723  Just enter the string 
7724 \family typewriter
7725 referee
7726 \family default
7727  there.
7728 \end_layout
7729
7730 \begin_layout Subsection
7731 The example paper
7732 \end_layout
7733
7734 \begin_layout Standard
7735 The 
7736 \family sans
7737 Examples
7738 \family default
7739  directory contains an example paper written with LyX.
7740  It is the example paper from the original macro package, translated to
7741  LyX.
7742  Use it for inspiration, and compare the original LaTeX code with LyX way
7743  of writing.
7744 \end_layout
7745
7746 \begin_layout Section
7747 AASTeX
7748 \end_layout
7749
7750 \begin_layout Standard
7751 by 
7752 \noun on
7753 Mike Ressler
7754 \end_layout
7755
7756 \begin_layout Subsection
7757 Introduction
7758 \end_layout
7759
7760 \begin_layout Standard
7761 AASTeX is a set of macros produced by the American Astronomical Society
7762  to facilitate electronic manuscript submission to the three journals they
7763  publish: the Astrophysical Journal (including the Letters and Supplement),
7764  the Astronomical Journal, and the Publications of the Astronomical Society
7765  of the Pacific.
7766  LyX has proven to be an excellent tool for generating these documents,
7767  especially given its equation, citation, and figure handling capabilities.
7768  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7769  is the version described here, or higher.
7770  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7771  incompatible with LyX.
7772  The AASTeX package may be downloaded from the AASTeX Web site
7773 \end_layout
7774
7775 \begin_layout Standard
7776 \begin_inset VSpace medskip
7777 \end_inset
7778
7779
7780 \end_layout
7781
7782 \begin_layout Standard
7783 \align center
7784 \begin_inset Flex URL
7785 status collapsed
7786
7787 \begin_layout Plain Layout
7788
7789 http://www.journals.uchicago.edu/AAS/AASTeX
7790 \end_layout
7791
7792 \end_inset
7793
7794
7795 \end_layout
7796
7797 \begin_layout Standard
7798 \begin_inset VSpace medskip
7799 \end_inset
7800
7801
7802 \end_layout
7803
7804 \begin_layout Standard
7805 A complete user guide is contained in that package and you should familiarize
7806  yourself with it thoroughly before embarking on writing a paper in LyX.
7807  LyX will not reduce the need to figure out all the AASTeX commands, it
7808  will only reduce the drudgery of typing everything in.
7809  It is your responsibility to ensure that the final exported LaTeX document
7810  conforms completely to the requirements of the journal to which you are
7811  submitting your paper.
7812 \end_layout
7813
7814 \begin_layout Subsection
7815 Starting a New Paper
7816 \end_layout
7817
7818 \begin_layout Standard
7819 I strongly suggest that you start with the AASTeX template file.
7820  Click on 
7821 \family sans
7822 File\SpecialChar \menuseparator
7823 New from
7824 \family default
7825  
7826 \family sans
7827 Template
7828 \family default
7829 , enter the new file name, then choose the 
7830 \family typewriter
7831 aastex.lyx
7832 \family default
7833  template.
7834  This will show the most common fields found in a manuscript.
7835  Simply overwrite the existing text (including the brackets, 
7836 \family typewriter
7837 <>
7838 \family default
7839 ) with the correct information.
7840  Many of the AASTeX commands and environments can be implemented directly
7841  in LyX, but some cannot: most noticeably 
7842 \family typewriter
7843
7844 \backslash
7845 altaffilmark
7846 \family default
7847  and 
7848 \family typewriter
7849
7850 \backslash
7851 altaffiltext
7852 \family default
7853 , which should stick out like a sore thumb if you actually just opened the
7854  template file.
7855  For commands such as these, the LaTeX code must be entered directly and
7856  marked as such.
7857  Such commands are referred to as TeX code, or Evil Red Text.
7858  I tried to minimize the amount of TeX code needed in an AASTeX document,
7859  but there is still a bit more required than any of us would like.
7860 \end_layout
7861
7862 \begin_layout Subsection
7863 Finishing Your Paper
7864 \end_layout
7865
7866 \begin_layout Standard
7867 When the paper is finished to your satisfaction and previews/prints correctly,
7868  there are a few 
7869 \begin_inset Quotes eld
7870 \end_inset
7871
7872 postprocessing
7873 \begin_inset Quotes erd
7874 \end_inset
7875
7876  actions which need to be done before you submit it to the journals.
7877  
7878 \end_layout
7879
7880 \begin_layout Enumerate
7881 Export your paper as a LaTeX file (
7882 \family sans
7883 File\SpecialChar \menuseparator
7884 Export\SpecialChar \menuseparator
7885 LaTeX
7886 \family default
7887 ).
7888  
7889 \end_layout
7890
7891 \begin_layout Enumerate
7892 Edit the resulting 
7893 \family typewriter
7894 .tex
7895 \family default
7896  file with your favorite text editor
7897 \end_layout
7898
7899 \begin_deeper
7900 \begin_layout Enumerate
7901 remove the comment lines before the 
7902 \family typewriter
7903
7904 \backslash
7905 documentclass
7906 \family default
7907  command
7908 \end_layout
7909
7910 \begin_layout Enumerate
7911 remove the 
7912 \family typewriter
7913
7914 \backslash
7915 usepackage...{fontenc}
7916 \family default
7917  line if it appears (usually just after 
7918 \family typewriter
7919
7920 \backslash
7921 documentclass
7922 \family default
7923 }; also remove the 
7924 \family typewriter
7925
7926 \backslash
7927 secnumdepth
7928 \family default
7929  line if it appears.
7930 \end_layout
7931
7932 \begin_layout Enumerate
7933 remove everything between (and including) the 
7934 \family typewriter
7935
7936 \backslash
7937 makeatletter
7938 \family default
7939  and 
7940 \family typewriter
7941
7942 \backslash
7943 makeatother
7944 \family default
7945  commands, except for any commands you specifically put into the LaTeX preamble
7946  (which should appear immediately after the 
7947 \begin_inset Quotes eld
7948 \end_inset
7949
7950 User specified LaTeX commands
7951 \begin_inset Quotes erd
7952 \end_inset
7953
7954  comment in the 
7955 \family typewriter
7956 .tex
7957 \family default
7958  file).
7959 \end_layout
7960
7961 \end_deeper
7962 \begin_layout Enumerate
7963 Run the resulting file through LaTeX to make sure it still processes correctly.
7964 \end_layout
7965
7966 \begin_layout Enumerate
7967 Reread the journal requirements to make sure your filenames and formats
7968  are correct.
7969 \end_layout
7970
7971 \begin_layout Enumerate
7972 Submit it.
7973 \end_layout
7974
7975 \begin_layout Subsection
7976 Comments On Specific Commands
7977 \end_layout
7978
7979 \begin_layout Standard
7980 I will not describe the detailed usage of the individual AASTeX commands:
7981  the AASTeX User Guide (
7982 \family typewriter
7983 aasguide.tex
7984 \family default
7985 ) gives a good description of each.
7986  Thus it's probably easiest for me to go down the list as found in the guide
7987  and offer comments where necessary.
7988  So let's begin \SpecialChar \ldots{}
7989
7990 \end_layout
7991
7992 \begin_layout Subsubsection
7993 Things that work as expected
7994 \end_layout
7995
7996 \begin_layout Standard
7997 Because they work as you might expect, I simply list them and the section
7998  they are found in: 
7999 \family typewriter
8000
8001 \backslash
8002 documentclass
8003 \family default
8004  (2.1.1), 
8005 \family typewriter
8006
8007 \backslash
8008 begin{document}
8009 \family default
8010  (2.2), 
8011 \family typewriter
8012
8013 \backslash
8014 title
8015 \family default
8016  (2.3), 
8017 \family typewriter
8018
8019 \backslash
8020 author
8021 \family default
8022  (2.3), 
8023 \family typewriter
8024
8025 \backslash
8026 affil
8027 \family default
8028  (2.3), 
8029 \family typewriter
8030
8031 \backslash
8032 abstract
8033 \family default
8034  (2.4), 
8035 \family typewriter
8036
8037 \backslash
8038 keywords
8039 \family default
8040  (2.5), 
8041 \family typewriter
8042
8043 \backslash
8044 section
8045 \family default
8046  (2.7), 
8047 \family typewriter
8048
8049 \backslash
8050 subsection
8051 \family default
8052  (2.7), 
8053 \family typewriter
8054
8055 \backslash
8056 subsubsection
8057 \family default
8058  (2.7), 
8059 \family typewriter
8060
8061 \backslash
8062 paragraph
8063 \family default
8064  (2.7), 
8065 \family typewriter
8066
8067 \backslash
8068 facility
8069 \family default
8070  (2.10), 
8071 \family typewriter
8072
8073 \backslash
8074 begin{displaymath}
8075 \family default
8076  (2.12), 
8077 \family typewriter
8078
8079 \backslash
8080 begin{equation}
8081 \family default
8082  (2.12), 
8083 \family typewriter
8084
8085 \backslash
8086 begin{eqnarray}
8087 \family default
8088  (2.12), 
8089 \family typewriter
8090
8091 \backslash
8092 begin{mathletters}
8093 \family default
8094  (2.12), 
8095 \family typewriter
8096
8097 \backslash
8098 begin{thebibliography}
8099 \family default
8100  (2.13.1), 
8101 \family typewriter
8102
8103 \backslash
8104 bibitem
8105 \family default
8106  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8107  graphicx figure commands (2.14.1), 
8108 \family typewriter
8109
8110 \backslash
8111 begin{table}
8112 \family default
8113  (2.15.4), 
8114 \family typewriter
8115
8116 \backslash
8117 begin{tabular}
8118 \family default
8119  (2.15.4), 
8120 \family typewriter
8121
8122 \backslash
8123 caption
8124 \family default
8125  (2.15.4), 
8126 \family typewriter
8127
8128 \backslash
8129 label
8130 \family default
8131  (2.15.4, amongst other places), 
8132 \family typewriter
8133
8134 \backslash
8135 tablerefs
8136 \family default
8137  (2.15.5), 
8138 \family typewriter
8139
8140 \backslash
8141 tablecomments
8142 \family default
8143  (2.15.5), 
8144 \family typewriter
8145
8146 \backslash
8147 url
8148 \family default
8149  (2.17.4), 
8150 \family typewriter
8151
8152 \backslash
8153 end{document}
8154 \family default
8155  (2.18).
8156 \end_layout
8157
8158 \begin_layout Standard
8159 The following style options also work correctly: 
8160 \family typewriter
8161 longabstract
8162 \family default
8163  (2.4), 
8164 \family typewriter
8165 preprint
8166 \family default
8167  (3.2.1), 
8168 \family typewriter
8169 preprint2
8170 \family default
8171  (3.2.2), 
8172 \family typewriter
8173 eqsecnum
8174 \family default
8175  (3.3), 
8176 \family typewriter
8177 flushrt
8178 \family default
8179  (3.4).
8180  Simply put them in the 
8181 \family sans
8182 Options
8183 \family default
8184  box in 
8185 \family sans
8186 Layout\SpecialChar \menuseparator
8187 Document
8188 \family default
8189 .
8190 \end_layout
8191
8192 \begin_layout Subsubsection
8193 Things that work, but require more comment
8194 \end_layout
8195
8196 \begin_layout Standard
8197 The following items work, but require a little more discussion:
8198 \end_layout
8199
8200 \begin_layout Itemize
8201 These items are reserved for use by the journal editors, but you can put
8202  them into the LaTeX preamble if you feel compelled to do so: 
8203 \family typewriter
8204
8205 \backslash
8206 received
8207 \family default
8208
8209 \family typewriter
8210
8211 \backslash
8212 revised
8213 \family default
8214
8215 \family typewriter
8216
8217 \backslash
8218 accepted
8219 \family default
8220
8221 \family typewriter
8222
8223 \backslash
8224 ccc
8225 \family default
8226
8227 \family typewriter
8228
8229 \backslash
8230 cpright
8231 \family default
8232  (all from 2.1.3)
8233 \end_layout
8234
8235 \begin_layout Itemize
8236 These items may be placed in the LaTeX preamble, and are included as blanks
8237  in the template file: 
8238 \family typewriter
8239
8240 \backslash
8241 slugcomment
8242 \family default
8243  (2.1.4), 
8244 \family typewriter
8245
8246 \backslash
8247 shorttitle
8248 \family default
8249  (2.1.5), 
8250 \family typewriter
8251
8252 \backslash
8253 shortauthors
8254 \family default
8255  (2.1.5)
8256 \end_layout
8257
8258 \begin_layout Itemize
8259
8260 \family typewriter
8261
8262 \backslash
8263 email
8264 \family default
8265  (2.3) – can only be used 
8266 \begin_inset Quotes eld
8267 \end_inset
8268
8269 standalone
8270 \begin_inset Quotes erd
8271 \end_inset
8272
8273 , not in the middle of a paragraph.
8274  Use TeX code if you need to embed it.
8275 \end_layout
8276
8277 \begin_layout Itemize
8278
8279 \family typewriter
8280
8281 \backslash
8282 and
8283 \family default
8284  (2.3) – will have extra {} after it.
8285  This should not cause an error.
8286 \end_layout
8287
8288 \begin_layout Itemize
8289
8290 \family typewriter
8291
8292 \backslash
8293 notetoeditor
8294 \family default
8295  (2.6) – can only be used 
8296 \begin_inset Quotes eld
8297 \end_inset
8298
8299 standalone
8300 \begin_inset Quotes erd
8301 \end_inset
8302
8303 , not in the middle of a paragraph.
8304  Use TeX code if you need to embed it.
8305 \end_layout
8306
8307 \begin_layout Itemize
8308
8309 \family typewriter
8310
8311 \backslash
8312 placetable
8313 \family default
8314  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8315  hand
8316 \end_layout
8317
8318 \begin_layout Itemize
8319
8320 \family typewriter
8321
8322 \backslash
8323 placefigure
8324 \family default
8325  (2.8) – same as for 
8326 \family typewriter
8327
8328 \backslash
8329 placetable
8330 \end_layout
8331
8332 \begin_layout Itemize
8333
8334 \family typewriter
8335
8336 \backslash
8337 acknowledgements
8338 \family default
8339  (2.9) – will have extra {} after it.
8340  This should not cause an error.
8341 \end_layout
8342
8343 \begin_layout Itemize
8344
8345 \family typewriter
8346
8347 \backslash
8348 appendix
8349 \family default
8350  (2.11) – will have extra {} after it.
8351  This should not cause an error.
8352 \end_layout
8353
8354 \begin_layout Itemize
8355
8356 \family typewriter
8357
8358 \backslash
8359 figcaption
8360 \family default
8361  (2.14.2) – you can insert an optional filename argument by placing the cursor
8362  at the beginning of the text and selecting 
8363 \family sans
8364 Insert\SpecialChar \menuseparator
8365 Short Title
8366 \family default
8367 .
8368  
8369 \begin_inset Quotes eld
8370 \end_inset
8371
8372 Short Title
8373 \begin_inset Quotes erd
8374 \end_inset
8375
8376  inserts an optional argument of the type needed by 
8377 \family typewriter
8378
8379 \backslash
8380 figcaption
8381 \family default
8382 .
8383  Hopefully it will be renamed someday.
8384 \end_layout
8385
8386 \begin_layout Itemize
8387
8388 \family typewriter
8389
8390 \backslash
8391 objectname
8392 \family default
8393  (2.17.1) – same as 
8394 \family typewriter
8395
8396 \backslash
8397 figcaption
8398 \family default
8399  for the catalog ID optional parameter
8400 \end_layout
8401
8402 \begin_layout Itemize
8403
8404 \family typewriter
8405
8406 \backslash
8407 dataset
8408 \family default
8409  (2.17.1) – same as 
8410 \family typewriter
8411
8412 \backslash
8413 figcaption
8414 \family default
8415  for the catalog ID optional parameter
8416 \end_layout
8417
8418 \begin_layout Subsubsection
8419 Things not implemented, use TeX code
8420 \end_layout
8421
8422 \begin_layout Standard
8423
8424 \family typewriter
8425
8426 \backslash
8427 altaffilmark
8428 \family default
8429  (2.3), 
8430 \family typewriter
8431
8432 \backslash
8433 altaffiltext
8434 \family default
8435  (2.3), 
8436 \family typewriter
8437
8438 \backslash
8439 eqnum
8440 \family default
8441  (2.12), 
8442 \family typewriter
8443
8444 \backslash
8445 setcounter{equation}
8446 \family default
8447  (2.12), Journal name abbreviations (2.13.4), 
8448 \family typewriter
8449
8450 \backslash
8451 figurenum
8452 \family default
8453  (2.14.1), 
8454 \family typewriter
8455
8456 \backslash
8457 epsscale
8458 \family default
8459  (2.14.1), 
8460 \family typewriter
8461
8462 \backslash
8463 plotone
8464 \family default
8465  (2.14.1), 
8466 \family typewriter
8467
8468 \backslash
8469 plottwo
8470 \family default
8471  (2.14.1), 
8472 \family typewriter
8473
8474 \backslash
8475 tablenum
8476 \family default
8477  (2.15.4), 
8478 \family typewriter
8479
8480 \backslash
8481 tableline
8482 \family default
8483  (2.15.4, insert it as the first element in the lefthand cell after where
8484  you want it.
8485  Don't use any of LyX's rules in the table), 
8486 \family typewriter
8487
8488 \backslash
8489 tablenotemark
8490 \family default
8491  (2.15.5), 
8492 \family typewriter
8493
8494 \backslash
8495 tablenotetext
8496 \family default
8497  (2.15.5), much of Misc (2.17, except 
8498 \family typewriter
8499
8500 \backslash
8501 objectname
8502 \family default
8503
8504 \family typewriter
8505
8506 \backslash
8507 dataset
8508 \family default
8509
8510 \family typewriter
8511
8512 \backslash
8513 url
8514 \family default
8515 , and 
8516 \family typewriter
8517
8518 \backslash
8519 email
8520 \family default
8521 ; see above), 
8522 \family typewriter
8523
8524 \backslash
8525 singlespace
8526 \family default
8527  (3.1), 
8528 \family typewriter
8529
8530 \backslash
8531 doublespace
8532 \family default
8533  (3.1), 
8534 \family typewriter
8535
8536 \backslash
8537 onecolumn
8538 \family default
8539  (3.2), 
8540 \family typewriter
8541
8542 \backslash
8543 twocolumn
8544 \family default
8545  (3.2)
8546 \end_layout
8547
8548 \begin_layout Subsubsection
8549 Things that cannot be implemented
8550 \end_layout
8551
8552 \begin_layout Standard
8553 \SpecialChar \ldots{}
8554  at least in any meaningful sort of way, so I suggest ignoring them.
8555  They are the references environment (2.13.3), and the deluxetable environment
8556  (2.15).
8557  If you really, really need to use deluxetable, I suggest editing it in
8558  a separate file with a text editor, then using 
8559 \family sans
8560 Insert\SpecialChar \menuseparator
8561 Child
8562 \begin_inset space ~
8563 \end_inset
8564
8565 Document
8566 \family default
8567  to include it in your LyX document.
8568  See the 
8569 \family typewriter
8570 aas_sample.lyx
8571 \family default
8572  file to see an example of this.
8573 \end_layout
8574
8575 \begin_layout Subsection
8576 FAQs, Tips, Tricks, and Other Ruminations
8577 \end_layout
8578
8579 \begin_layout Subsubsection
8580 Getting LyX and AASTeX to cooperate
8581 \end_layout
8582
8583 \begin_layout Standard
8584 It can be a bit tricky to get LyX to recognize a new layout and document
8585  class.
8586  When all else fails, do this:
8587 \end_layout
8588
8589 \begin_layout Enumerate
8590 Make certain that LaTeX can find AASTeX.
8591  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8592  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8593 \family typewriter
8594 sample.tex
8595 \family default
8596 .
8597 \end_layout
8598
8599 \begin_layout Enumerate
8600 Make certain that 
8601 \family typewriter
8602 aastex.layout
8603 \family default
8604  appears in LyX's 
8605 \family typewriter
8606 layouts
8607 \family default
8608  folder
8609 \end_layout
8610
8611 \begin_layout Enumerate
8612 Rerun 
8613 \family sans
8614 Tools\SpecialChar \menuseparator
8615 Reconfigure
8616 \family default
8617  in LyX, then restart LyX.
8618 \end_layout
8619
8620 \begin_layout Enumerate
8621 Open a regular new file, not from a template.
8622  Does AASTeX appear in the class list in 
8623 \family sans
8624 Document\SpecialChar \menuseparator
8625 Settings
8626 \family default
8627 ?
8628 \end_layout
8629
8630 \begin_layout Standard
8631 If you get a warning from an existing AASTeX document about not being able
8632  to find the AASTeX layout or a message about 
8633 \begin_inset Quotes eld
8634 \end_inset
8635
8636 You should not mix title layouts with normal ones
8637 \begin_inset Quotes erd
8638 \end_inset
8639
8640 , things haven't been installed correctly.
8641 \end_layout
8642
8643 \begin_layout Subsubsection
8644 LaTeX error processing a table 
8645 \end_layout
8646
8647 \begin_layout Standard
8648 LyX, by default, attempts to center the table caption/title.
8649  This seems to produce a bad interaction in AASTeX so you should click somewhere
8650  in the caption/title, then select 
8651 \family sans
8652 Edit\SpecialChar \menuseparator
8653 Paragraph
8654 \begin_inset space ~
8655 \end_inset
8656
8657 Settings
8658 \family default
8659 , then set the 
8660 \family sans
8661 Alignment
8662 \family default
8663  to 
8664 \family sans
8665 Block
8666 \family default
8667 .
8668  This took care of it for me.
8669 \end_layout
8670
8671 \begin_layout Subsubsection
8672 References
8673 \end_layout
8674
8675 \begin_layout Standard
8676 A couple of things: 1) I have noticed some funny spacing in the reference
8677  entries in the text.
8678  When you enter the bibliography item data, make sure their is 
8679 \emph on
8680 no
8681 \emph default
8682  space between the last author and the parenthesis setting off the year;
8683  
8684 \emph on
8685 e.
8686 \begin_inset space \thinspace{}
8687 \end_inset
8688
8689 g.
8690 \begin_inset space \space{}
8691 \end_inset
8692
8693
8694 \emph default
8695 type 
8696 \family typewriter
8697 Ressler(1992)
8698 \family default
8699 , not 
8700 \family typewriter
8701 Ressler (1992)
8702 \family default
8703 .
8704  2) Entering the references at all is not obvious.
8705  The easiest thing is to start typing your first reference at the end of
8706  the document, then mark it as type 
8707 \family sans
8708 References
8709 \family default
8710 .
8711  That will put a small gray box in front of what you just typed.
8712  Click on the box to fill in the rest of the information.
8713  For new references, go to the end of an existing reference and press return.
8714  That will create a new line with its own box, etc.
8715 \end_layout
8716
8717 \begin_layout Subsubsection
8718 Including EPS files
8719 \end_layout
8720
8721 \begin_layout Standard
8722 Even though AASTeX provides its own figure commands (
8723 \family typewriter
8724
8725 \backslash
8726 plotone
8727 \family default
8728 , for example), I much prefer LaTeX's standard figure commands (with the
8729  default graphicx).
8730  You can insert the 
8731 \family typewriter
8732
8733 \backslash
8734 plotone
8735 \family default
8736 , etc.
8737 \begin_inset space ~
8738 \end_inset
8739
8740 commands as TeX code into a Figure Float box if you desire, but I never
8741  have much luck getting the layout right.
8742  With the standard graphics, LyX will insert a 
8743 \family typewriter
8744
8745 \backslash
8746 usepackage{graphicx}
8747 \family default
8748  command into the LaTeX preamble and handle the figures in the standard
8749  LaTeX2e way, interspersing the figures in the text.
8750  I believe ApJ accepts figures exactly this way now; AJ might still use
8751  the 
8752 \begin_inset Quotes eld
8753 \end_inset
8754
8755 stack everything at the end
8756 \begin_inset Quotes erd
8757 \end_inset
8758
8759  technique.
8760 \end_layout
8761
8762 \begin_layout Subsubsection
8763 Things I could have done, but didn't
8764 \end_layout
8765
8766 \begin_layout Standard
8767 There are a few 
8768 \begin_inset Quotes eld
8769 \end_inset
8770
8771 pretty
8772 \begin_inset Quotes erd
8773 \end_inset
8774
8775  things I could have implemented, but chose not to.
8776  For instance, I saw no point in double-spacing the text in the LyX window,
8777  even though it is double-spaced in the paper manuscript.
8778  Also, I chose not to make separate layouts for the preprint and preprint2
8779  styles.
8780  Since I assume you will spend most of your time in the plain manuscript
8781  mode anyway, I decided not to chew up more disk space with this.
8782  
8783 \end_layout
8784
8785 \begin_layout Subsection
8786 Final Caveat
8787 \end_layout
8788
8789 \begin_layout Standard
8790 Your mileage may vary.
8791  I've now had papers published by both ApJ and AJ that have had 98% of the
8792  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8793  cleanups.
8794  I have had no trouble with the submission process, and I'm sure the journals
8795  were never aware that there might be a difference.
8796  So, go forth and publish!
8797 \end_layout
8798
8799 \begin_layout Section
8800 AMS LaTeX
8801 \end_layout
8802
8803 \begin_layout Standard
8804 by 
8805 \noun on
8806 David Johnson
8807 \noun default
8808 ; updated by 
8809 \noun on
8810 Richard Heck
8811 \end_layout
8812
8813 \begin_layout Standard
8814 \begin_inset VSpace bigskip
8815 \end_inset
8816
8817
8818 \end_layout
8819
8820 \begin_layout Standard
8821 \noindent
8822 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8823  papers to be submitted to American Mathematical Society publications.
8824  The layouts are not tailored to a specific journal, but easily can be.
8825  You should refer to the AMS documentation for specific instructions for
8826  each journal (usually it will entail only changing a single line in the
8827  TeX output).
8828  That documentation is available on the Web at 
8829 \begin_inset Flex URL
8830 status open
8831
8832 \begin_layout Plain Layout
8833
8834 http://www.ams.org
8835 \end_layout
8836
8837 \end_inset
8838
8839  or by ftp at 
8840 \begin_inset Flex URL
8841 status open
8842
8843 \begin_layout Plain Layout
8844
8845 ftp://ftp.ams.org/pub/tex/amslatex/
8846 \end_layout
8847
8848 \end_inset
8849
8850 .
8851  These layouts are appropriate, and useful, for any mathematical writing.
8852  
8853 \end_layout
8854
8855 \begin_layout Standard
8856 There are two basic AMS LaTeX layouts: 
8857 \end_layout
8858
8859 \begin_layout Itemize
8860 amsart: The standard AMS article format.
8861 \end_layout
8862
8863 \begin_layout Itemize
8864 amsbook: the standard AMS book (really, monograph) format.
8865  
8866 \end_layout
8867
8868 \begin_layout Standard
8869 The layouts themselves contain only the minimum necessary to use the AMS
8870  classes.
8871  They do not, in particular, contain any of the `theorem' environments used
8872  for setting theorems, lemmas, and the like.
8873  These are contained, instead, in the 
8874 \begin_inset Flex Code
8875 status collapsed
8876
8877 \begin_layout Plain Layout
8878 Theorems (AMS)
8879 \end_layout
8880
8881 \end_inset
8882
8883  module, which is loaded by default when when you select one of the AMS
8884  classes.
8885  (It can also be used with other classes and can be removed, if you would
8886  rather use something else.) Less commonly used environments are in the 
8887 \begin_inset Flex Code
8888 status collapsed
8889
8890 \begin_layout Plain Layout
8891 Theorems (AMS-Extended)
8892 \end_layout
8893
8894 \end_inset
8895
8896  module, which must be loaded manually.
8897 \end_layout
8898
8899 \begin_layout Standard
8900 By default, theorems and the like are numbered consecutively throughout
8901  the document, but this may be modified by loading the module 
8902 \begin_inset Flex Code
8903 status collapsed
8904
8905 \begin_layout Plain Layout
8906 Theorems (Order by Section)
8907 \end_layout
8908
8909 \end_inset
8910
8911  or, if you are using 
8912 \begin_inset Flex Code
8913 status collapsed
8914
8915 \begin_layout Plain Layout
8916 book (AMS)
8917 \end_layout
8918
8919 \end_inset
8920
8921 , the module 
8922 \begin_inset Flex Code
8923 status collapsed
8924
8925 \begin_layout Plain Layout
8926 Theorems (Order by Chapter)
8927 \end_layout
8928
8929 \end_inset
8930
8931 .
8932  These will number the results as 
8933 \begin_inset Formula $n.m$
8934 \end_inset
8935
8936 , where the first number refers to the section (or chapter) and the second
8937  refers to the total number of results so far in that section (or chapter).
8938  Many environments are also available unnumbered.
8939  These are indicated by an asterisk at the end.
8940  If you happen to want 
8941 \emph on
8942 only
8943 \emph default
8944  unnumbered results, the module 
8945 \begin_inset Flex Code
8946 status collapsed
8947
8948 \begin_layout Plain Layout
8949 Theorems (Starred)
8950 \end_layout
8951
8952 \end_inset
8953
8954  provides that option.
8955 \end_layout
8956
8957 \begin_layout Standard
8958 Note that these modules do not 
8959 \emph on
8960 have
8961 \emph default
8962  to be used with the AMS classes.
8963  It is perfectly possible to use the 
8964 \begin_inset Flex Code
8965 status collapsed
8966
8967 \begin_layout Plain Layout
8968 Theorems (AMS)
8969 \end_layout
8970
8971 \end_inset
8972
8973  module, and the others mentioned, with other classes, such as 
8974 \begin_inset Flex Code
8975 status collapsed
8976
8977 \begin_layout Plain Layout
8978 article
8979 \end_layout
8980
8981 \end_inset
8982
8983
8984 \begin_inset Flex Code
8985 status collapsed
8986
8987 \begin_layout Plain Layout
8988 report
8989 \end_layout
8990
8991 \end_inset
8992
8993
8994 \begin_inset Flex Code
8995 status collapsed
8996
8997 \begin_layout Plain Layout
8998 book (KOMA-script)
8999 \end_layout
9000
9001 \end_inset
9002
9003 , and so forth.
9004 \end_layout
9005
9006 \begin_layout Subsection
9007 What these layouts provide
9008 \end_layout
9009
9010 \begin_layout Standard
9011 There is a long list of included environments provided by these layouts.
9012  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9013  variety of `theorem' environments.
9014  However, the AMS recommends the environments that are available in LyX.
9015  
9016 \end_layout
9017
9018 \begin_layout Standard
9019 The following environments—as well as the standard environments, such as
9020  
9021 \begin_inset Flex Noun
9022 status collapsed
9023
9024 \begin_layout Plain Layout
9025 section
9026 \end_layout
9027
9028 \end_inset
9029
9030
9031 \begin_inset Flex Noun
9032 status collapsed
9033
9034 \begin_layout Plain Layout
9035 bibliography
9036 \end_layout
9037
9038 \end_inset
9039
9040
9041 \begin_inset Flex Noun
9042 status collapsed
9043
9044 \begin_layout Plain Layout
9045 title
9046 \end_layout
9047
9048 \end_inset
9049
9050
9051 \begin_inset Flex Noun
9052 status collapsed
9053
9054 \begin_layout Plain Layout
9055 author
9056 \end_layout
9057
9058 \end_inset
9059
9060 , and 
9061 \begin_inset Flex Noun
9062 status collapsed
9063
9064 \begin_layout Plain Layout
9065 date
9066 \end_layout
9067
9068 \end_inset
9069
9070 —are provided by 
9071 \begin_inset Flex Code
9072 status collapsed
9073
9074 \begin_layout Plain Layout
9075 article (AMS)
9076 \end_layout
9077
9078 \end_inset
9079
9080  and 
9081 \begin_inset Flex Code
9082 status collapsed
9083
9084 \begin_layout Plain Layout
9085 book (AMS)
9086 \end_layout
9087
9088 \end_inset
9089
9090 :
9091 \end_layout
9092
9093 \begin_layout Description
9094 Address This should be the author's permanent address.
9095 \end_layout
9096
9097 \begin_layout Description
9098 Current
9099 \begin_inset space ~
9100 \end_inset
9101
9102 Address This should be the author's temporary address at the time of submission,
9103  if different from the Address.
9104 \end_layout
9105
9106 \begin_layout Description
9107 Email Author's e-mail address
9108 \end_layout
9109
9110 \begin_layout Description
9111 URL Author's Web address, if desired.
9112 \end_layout
9113
9114 \begin_layout Description
9115 Keywords Key words or phrases used to identify specific topics discussed
9116  in the paper.
9117 \end_layout
9118
9119 \begin_layout Description
9120 Subjectclass These refer to the AMS Subject Classifications, published and
9121  described in 
9122 \emph on
9123 Mathematical Reviews
9124 \emph default
9125 .
9126  These are also available online at the AMS cites listed above.
9127 \end_layout
9128
9129 \begin_layout Description
9130 Thanks
9131 \end_layout
9132
9133 \begin_layout Description
9134 Dedicatory
9135 \end_layout
9136
9137 \begin_layout Description
9138 Translator
9139 \end_layout
9140
9141 \begin_layout Standard
9142 The following environments are provided by both the 
9143 \begin_inset Flex Code
9144 status collapsed
9145
9146 \begin_layout Plain Layout
9147 Theorems
9148 \end_layout
9149
9150 \end_inset
9151
9152  and 
9153 \begin_inset Flex Code
9154 status collapsed
9155
9156 \begin_layout Plain Layout
9157 Theorems (AMS)
9158 \end_layout
9159
9160 \end_inset
9161
9162  modules, in the latter case in both starred (unnumbered) and unstarred
9163  (numbered) versions.
9164  These same environments are provided only in the starred versions by the
9165  
9166 \begin_inset Flex Code
9167 status collapsed
9168
9169 \begin_layout Plain Layout
9170 Theorems (Starred)
9171 \end_layout
9172
9173 \end_inset
9174
9175  module:
9176 \end_layout
9177
9178 \begin_layout Theorem
9179 This is typically used for the statements of major results.
9180  
9181 \end_layout
9182
9183 \begin_layout Corollary*
9184 This is used for statements which follow fairly directly from previous statement
9185 s.
9186  Again, these can be major results.
9187  
9188 \end_layout
9189
9190 \begin_layout Lemma
9191 These are smaller results needed to prove other statements.
9192 \end_layout
9193
9194 \begin_layout Proposition
9195 These are less major results which (hopefully) add to the general theory
9196  being discussed.
9197 \end_layout
9198
9199 \begin_layout Conjecture
9200 These are statements provided without justification, which the author does
9201  not know how to prove, but which seem to be true (to the author, at least).
9202 \end_layout
9203
9204 \begin_layout Definition*
9205 Guess what this is for.
9206  The font is different for this environment than for the previous ones.
9207  
9208 \end_layout
9209
9210 \begin_layout Example*
9211 Used for examples illustrating proven results.
9212 \end_layout
9213
9214 \begin_layout Problem
9215 It's not really known what this is for.
9216  You should figure it out.
9217 \end_layout
9218
9219 \begin_layout Exercise*
9220 Write a description for this one.
9221 \end_layout
9222
9223 \begin_layout Remark
9224 This environment is also a type of theorem, usually a lesser sort of observation.
9225 \end_layout
9226
9227 \begin_layout Claim*
9228 Often used in the course of giving a proof of a larger result.
9229 \end_layout
9230
9231 \begin_layout Case
9232 Generally, these are used to break up long arguments, using specific instances
9233  of some condition.
9234  
9235 \end_layout
9236
9237 \begin_layout Case
9238 The numbering scheme for cases is on its own, not together with other numbered
9239  statements.
9240  
9241 \end_layout
9242
9243 \begin_layout Proof
9244 At the end of this environment, a QED symbol (usually a square, but it can
9245  vary with different styles) is placed.
9246  If you want to have other environments within this one—for example, Case
9247  environments—and have the QED symbol appear only after them, then the other
9248  environments need to be nested within the proof environment.
9249  See the section 
9250 \emph on
9251 Nesting Environments
9252 \emph default
9253  of the 
9254 \emph on
9255 User's Guide
9256 \emph default
9257  for information on nesting.
9258 \end_layout
9259
9260 \begin_layout Standard
9261 And these environments are provided by 
9262 \begin_inset Flex Code
9263 status collapsed
9264
9265 \begin_layout Plain Layout
9266 Theorems (AMS-Extended)
9267 \end_layout
9268
9269 \end_inset
9270
9271 :
9272 \end_layout
9273
9274 \begin_layout Criterion*
9275 A required condition.
9276 \end_layout
9277
9278 \begin_layout Algorithm*
9279 A general procedure to be used.
9280 \end_layout
9281
9282 \begin_layout Axiom*
9283 This is a property or statement taken as true within the system being discussed.
9284 \end_layout
9285
9286 \begin_layout Condition*
9287 Sometimes used to state a condition assumed within the present context of
9288  discussion.
9289 \end_layout
9290
9291 \begin_layout Note*
9292 Similar to a Remark.
9293 \end_layout
9294
9295 \begin_layout Notation*
9296 Used for the explanation of, yes, notation.
9297 \end_layout
9298
9299 \begin_layout Summary
9300 Do we really need to tell you? 
9301 \end_layout
9302
9303 \begin_layout Acknowledgement*
9304 Acknowledgement.
9305 \end_layout
9306
9307 \begin_layout Conclusion*
9308 Sometimes used at the end of a long train of argument.
9309 \end_layout
9310
9311 \begin_layout Fact
9312 Used in a way similar to Proposition, though perhaps lower on the scale.
9313 \end_layout
9314
9315 \begin_layout Standard
9316 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9317  fonts packages.
9318  They need to be available on your system in order to use these environments.
9319 \end_layout
9320
9321 \begin_layout Section
9322 AGU journals (
9323 \family sans
9324 aguplus
9325 \family default
9326 )
9327 \end_layout
9328
9329 \begin_layout Standard
9330 by 
9331 \shape smallcaps
9332 Martin Vermeer
9333 \end_layout
9334
9335 \begin_layout Subsection
9336 Description
9337 \end_layout
9338
9339 \begin_layout Standard
9340 These are the layout files for some of the journals of the American Geophysical
9341  Society.
9342  It is assumed that you have both the AGU's own class files and AGUplus
9343  installed (everything to be found at
9344 \begin_inset Flex URL
9345 status collapsed
9346
9347 \begin_layout Plain Layout
9348
9349 ftp://ftp.agu.org/journals/latex/journals
9350 \end_layout
9351
9352 \end_inset
9353
9354 ).
9355 \end_layout
9356
9357 \begin_layout Subsection
9358 New styles
9359 \end_layout
9360
9361 \begin_layout Standard
9362 Redefined are 
9363 \family sans
9364 Paragraph
9365 \family default
9366
9367 \family sans
9368 Paragraph*
9369 \family default
9370 .
9371  They are still called this in the LyX GUI, though their LaTeX equivalents
9372  in the AGU classes are 
9373 \family sans
9374 Subsubsubsection
9375 \family default
9376  and 
9377 \family sans
9378 Subsubsubsection*
9379 \family default
9380 .
9381 \end_layout
9382
9383 \begin_layout Standard
9384 Newly defined styles are 
9385 \family sans
9386 Left_Header
9387 \family default
9388
9389 \family sans
9390 Right_Header
9391 \family default
9392
9393 \family sans
9394 Received
9395 \family default
9396
9397 \family sans
9398 Revised
9399 \family default
9400
9401 \family sans
9402 Accepted
9403 \family default
9404
9405 \family sans
9406 CCC
9407 \family default
9408
9409 \family sans
9410 PaperId
9411 \family default
9412
9413 \family sans
9414 AuthorAddr
9415 \family default
9416
9417 \family sans
9418 SlugComment
9419 \family default
9420 .
9421  These are mostly manuscript attributes and defined in the AGU class documentati
9422 on.
9423 \end_layout
9424
9425 \begin_layout Standard
9426 I suspect this is still badly incomplete.
9427 \end_layout
9428
9429 \begin_layout Subsection
9430 New floats
9431 \end_layout
9432
9433 \begin_layout Standard
9434
9435 \family sans
9436 Planotable
9437 \family default
9438  and 
9439 \family sans
9440 Plate
9441 \family default
9442 .
9443  We also have a new 
9444 \family sans
9445 Table_Caption
9446 \family default
9447 .
9448 \end_layout
9449
9450 \begin_layout Subsection
9451 Supported journals
9452 \end_layout
9453
9454 \begin_layout Itemize
9455
9456 \emph on
9457 Journal of Geophysical Research
9458 \emph default
9459
9460 \family typewriter
9461 jgrga.layout
9462 \family default
9463  — Martin Vermeer
9464 \end_layout
9465
9466 \begin_layout Standard
9467 Add your own, it isn't so hard! Look at the 
9468 \family typewriter
9469 jgrga.layout
9470 \family default
9471  example and 
9472 \family typewriter
9473 aguplus.inc
9474 \family default
9475 .
9476 \end_layout
9477
9478 \begin_layout Subsection
9479 Bugs and things to remember
9480 \end_layout
9481
9482 \begin_layout Standard
9483 In order to use the new layouts, you must remember to do the following for
9484  a new document:
9485 \end_layout
9486
9487 \begin_layout Enumerate
9488
9489 \emph on
9490 Turn off babel
9491 \emph default
9492 .
9493  This can be done in the 
9494 \family sans
9495 Layout\SpecialChar \menuseparator
9496 Document
9497 \family default
9498  or 
9499 \family sans
9500 Document\SpecialChar \menuseparator
9501 Settings
9502 \family default
9503  menu item.
9504  (AGU articles are always in English, right? So 
9505 \emph on
9506 don't
9507 \emph default
9508  choose a language.)
9509 \end_layout
9510
9511 \begin_layout Enumerate
9512 Enter 
9513 \family typewriter
9514 jgrga
9515 \family default
9516  into the document's 
9517 \family sans
9518 Extra Options
9519 \family default
9520  field.
9521  (Yes, this is a bug.)
9522 \end_layout
9523
9524 \begin_layout Enumerate
9525 Make sure you use the 
9526 \family typewriter
9527 agu.bst
9528 \family default
9529  bibliography style, by entering 
9530 \family sans
9531 agu
9532 \family default
9533  into the second field of the BibTeX inset.
9534  None of the standard styles will do.
9535 \end_layout
9536
9537 \begin_layout Section
9538 Broadway
9539 \end_layout
9540
9541 \begin_layout Standard
9542 by 
9543 \shape smallcaps
9544 Garst Reese
9545 \end_layout
9546
9547 \begin_layout Subsection
9548 Introduction
9549 \end_layout
9550
9551 \begin_layout Standard
9552 Broadway is for writing plays.
9553  The format is more decorative than Hollywood, and much less standardized.
9554  This format should be suitable for workshops.
9555 \end_layout
9556
9557 \begin_layout Subsection
9558 Special problems
9559 \end_layout
9560
9561 \begin_layout Standard
9562 The same as in Hollywood.
9563 \end_layout
9564
9565 \begin_layout Subsection
9566 Special features
9567 \end_layout
9568
9569 \begin_layout Standard
9570 Insert the 
9571 \family sans
9572 Speaker
9573 \family default
9574  names as labels then cross-reference the label to insert the name.
9575  The cross-reference dialog will show the current cast of characters.
9576 \end_layout
9577
9578 \begin_layout Subsection
9579 Paper size and Margins
9580 \end_layout
9581
9582 \begin_layout Standard
9583 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9584 \end_layout
9585
9586 \begin_layout Subsection
9587 Environments
9588 \end_layout
9589
9590 \begin_layout Standard
9591 The following environments are available.
9592  You can use broadway.bind to get the bind keys shown at the right.
9593 \end_layout
9594
9595 \begin_layout Itemize
9596
9597 \family sans
9598 Standard
9599 \begin_inset Newline newline
9600 \end_inset
9601
9602
9603 \family default
9604 You should not have to use this, but it is here for anything that does not
9605  fit otherwise.
9606 \end_layout
9607
9608 \begin_layout Itemize
9609
9610 \family sans
9611 Narrative
9612 \begin_inset space \hfill{}
9613 \end_inset
9614
9615 M-z n
9616 \begin_inset Newline newline
9617 \end_inset
9618
9619
9620 \family default
9621 Used to describe stage setting and the action.
9622  First use of speaker names in all CAPs.
9623 \end_layout
9624
9625 \begin_layout Itemize
9626
9627 \family sans
9628 ACT
9629 \begin_inset space \hfill{}
9630 \end_inset
9631
9632 M-z a
9633 \begin_inset Newline newline
9634 \end_inset
9635
9636
9637 \family default
9638 Automatically numbered.
9639  On screen it will be arabic, but will print as Roman.
9640 \end_layout
9641
9642 \begin_layout Itemize
9643
9644 \family sans
9645 ACT*
9646 \begin_inset space \hfill{}
9647 \end_inset
9648
9649 M-z S at
9650 \begin_inset Newline newline
9651 \end_inset
9652
9653
9654 \family default
9655 Subtitle for 
9656 \family sans
9657 ACT.
9658
9659 \family default
9660  It is just centered text.
9661 \end_layout
9662
9663 \begin_layout Itemize
9664
9665 \family sans
9666 SCENE
9667 \begin_inset space \hfill{}
9668 \end_inset
9669
9670 M-z S-S
9671 \begin_inset Newline newline
9672 \end_inset
9673
9674
9675 \family default
9676 Not automatically numbered.
9677  You supply the number.
9678  This is because I couldn't figure out how.
9679 \end_layout
9680
9681 \begin_layout Itemize
9682
9683 \family sans
9684 AT_RISE:
9685 \begin_inset space \hfill{}
9686 \end_inset
9687
9688 M-z S-R
9689 \begin_inset Newline newline
9690 \end_inset
9691
9692
9693 \family default
9694 A special case of Narrative to describe the setting and action as the curtain
9695  rises.
9696 \end_layout
9697
9698 \begin_layout Itemize
9699
9700 \family sans
9701 Speaker
9702 \begin_inset space \hfill{}
9703 \end_inset
9704
9705 M-z s
9706 \begin_inset Newline newline
9707 \end_inset
9708
9709
9710 \family default
9711 The speaker's (actor's) title, centered in all CAPS.
9712 \end_layout
9713
9714 \begin_layout Itemize
9715
9716 \family sans
9717 Parenthetical
9718 \begin_inset space \hfill{}
9719 \end_inset
9720
9721 M-z p
9722 \begin_inset Newline newline
9723 \end_inset
9724
9725
9726 \family default
9727 Instructions to the speaker.
9728  The parentheses are automatically inserted.
9729  The ( will appear on screen, but both will be in the printed play.
9730  This environment is only used within 
9731 \family sans
9732 Dialogue
9733 \family default
9734 .
9735 \end_layout
9736
9737 \begin_layout Itemize
9738
9739 \family sans
9740 Dialogue
9741 \begin_inset space \hfill{}
9742 \end_inset
9743
9744 M-z d
9745 \begin_inset Newline newline
9746 \end_inset
9747
9748
9749 \family default
9750 What the Speaker says.
9751 \end_layout
9752
9753 \begin_layout Itemize
9754
9755 \family sans
9756 CURTAIN
9757 \begin_inset space \hfill{}
9758 \end_inset
9759
9760 M-z S-C
9761 \begin_inset Newline newline
9762 \end_inset
9763
9764
9765 \family default
9766 The curtain comes down.
9767 \end_layout
9768
9769 \begin_layout Itemize
9770
9771 \family sans
9772 Title
9773 \begin_inset space \hfill{}
9774 \end_inset
9775
9776 M-z S-T
9777 \end_layout
9778
9779 \begin_layout Itemize
9780
9781 \family sans
9782 Author
9783 \begin_inset space \hfill{}
9784 \end_inset
9785
9786 M-z S-A
9787 \end_layout
9788
9789 \begin_layout Itemize
9790
9791 \family sans
9792 Right_Address
9793 \begin_inset space \hfill{}
9794 \end_inset
9795
9796 M-z r
9797 \end_layout
9798
9799 \begin_layout Standard
9800 Hello there.
9801 \end_layout
9802
9803 \begin_layout Section
9804 Dinbrief
9805 \end_layout
9806
9807 \begin_layout Standard
9808 The document class 
9809 \family sans
9810 dinbrief
9811 \family default
9812  can be used to type letters according to German conventions.
9813  A template file is included in 
9814 \family typewriter
9815 .../lyx/share/templates
9816 \family default
9817  for you to use as a starting point.
9818 \end_layout
9819
9820 \begin_layout Section
9821 EGS journals (
9822 \family sans
9823 egs
9824 \family default
9825 )
9826 \end_layout
9827
9828 \begin_layout Standard
9829 by 
9830 \shape smallcaps
9831 Martin Vermeer
9832 \end_layout
9833
9834 \begin_layout Subsection
9835 Description
9836 \end_layout
9837
9838 \begin_layout Standard
9839 This is the layout file for the European Geophysical Society journals.
9840  The needed 
9841 \family typewriter
9842 egs.cls
9843 \family default
9844  can be downloaded from the web site of the EGS under 
9845 \begin_inset Flex URL
9846 status collapsed
9847
9848 \begin_layout Plain Layout
9849
9850 www.copernicus.org
9851 \end_layout
9852
9853 \end_inset
9854
9855 .
9856 \end_layout
9857
9858 \begin_layout Subsection
9859 New styles
9860 \end_layout
9861
9862 \begin_layout Standard
9863
9864 \family sans
9865 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9866  Accepted
9867 \family default
9868
9869 \family sans
9870 Offsets
9871 \family default
9872 .
9873  The current layout file is unfortunately very unmodular and would benefit
9874  from using the various 
9875 \family typewriter
9876 std*.inc
9877 \family default
9878  file inclusions.
9879 \end_layout
9880
9881 \begin_layout Section
9882 Elsevier Journals
9883 \end_layout
9884
9885 \begin_layout Standard
9886 See the LyX template file 
9887 \family typewriter
9888 elsarticle.lyx
9889 \family default
9890 .
9891  It contains all infos you need.
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 \noindent
13599 The document class 
13600 \emph on
13601 letter (koma-script)
13602 \emph default
13603  is implemented in the layout file 
13604 \family typewriter
13605 scrlettr.layout
13606 \family default
13607 .
13608  It contains all the paragraph types of the corresponding standard document
13609  class 
13610 \emph on
13611 letter
13612 \emph default
13613 , partly modified, with the exception of the LyX specific types 
13614 \family sans
13615 LyX-Code
13616 \family default
13617  and 
13618 \family sans
13619 Comment
13620 \family default
13621  and the 
13622 \family sans
13623 List
13624 \family default
13625  type, which is replaced by the new 
13626 \family sans
13627 Labeling
13628 \family default
13629  type.
13630  In addition, it contains, in contrast to the standard document class, the
13631  standard types 
13632 \family sans
13633 LaTeX
13634 \family default
13635
13636 \family sans
13637 Quotation
13638 \family default
13639
13640 \family sans
13641 Quote
13642 \family default
13643 , and 
13644 \family sans
13645 Verse
13646 \family default
13647 .
13648  Furthermore, there are a number of new letter specific types.
13649 \end_layout
13650
13651 \begin_layout Standard
13652 The appearance of the letter produced by this document class can be controlled
13653  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13654 \begin_inset Foot
13655 status collapsed
13656
13657 \begin_layout Plain Layout
13658 For example, the standard appearance of the letter`s heading, consisting
13659  of name and address, is quite self-willed.
13660  An 
13661 \begin_inset Quotes eld
13662 \end_inset
13663
13664 ordinary
13665 \begin_inset Quotes erd
13666 \end_inset
13667
13668  heading is produced by the following LaTeX commands in the preamble:
13669 \end_layout
13670
13671 \begin_layout LyX-Code
13672
13673 \backslash
13674 firsthead{
13675 \backslash
13676 parbox[b]{
13677 \backslash
13678 textwidth}
13679 \end_layout
13680
13681 \begin_layout LyX-Code
13682   {
13683 \backslash
13684 ignorespaces 
13685 \backslash
13686 fromname
13687 \backslash
13688
13689 \backslash
13690  
13691 \backslash
13692 ignorespaces 
13693 \backslash
13694 fromaddress}} 
13695 \end_layout
13696
13697 \begin_layout LyX-Code
13698
13699 \backslash
13700 nexthead{
13701 \backslash
13702 parbox[b]{
13703 \backslash
13704 textwidth}
13705 \end_layout
13706
13707 \begin_layout LyX-Code
13708   {
13709 \backslash
13710 ignorespaces 
13711 \backslash
13712 fromname 
13713 \backslash
13714 hfill 
13715 \backslash
13716 ignorespaces 
13717 \backslash
13718 pagename
13719 \backslash
13720  
13721 \backslash
13722 thepage}}
13723 \end_layout
13724
13725 \end_inset
13726
13727  A detailed German description of such LaTeX commands can be found in the
13728  Koma-Script documentation 
13729 \emph on
13730 scrguide
13731 \emph default
13732 .
13733  With it, the letter's author can produce his personal letter layout.
13734 \end_layout
13735
13736 \begin_layout Standard
13737 The types 
13738 \family sans
13739 Letter
13740 \family default
13741  and 
13742 \family sans
13743 Opening
13744 \family default
13745  define the beginning of the letter and must be used in every letter.
13746  To emphasize them in the LyX document class, they are marked with the letter
13747  
13748 \shape italic
13749 L
13750 \shape default
13751  or 
13752 \shape italic
13753 O
13754 \shape default
13755 , resp.
13756 \begin_inset space ~
13757 \end_inset
13758
13759 in the left margin.
13760  It is possible to write any number of letters in one file.
13761  An 
13762 \family sans
13763 Opening
13764 \family default
13765  type produces a new letter using the same addressee and a 
13766 \family sans
13767 Letter
13768 \family default
13769  type produces a new addressee.
13770  The types 
13771 \family sans
13772 Closing
13773 \family default
13774
13775 \family sans
13776 PS
13777 \family default
13778
13779 \family sans
13780 CC
13781 \family default
13782 , and 
13783 \family sans
13784 Encl
13785 \family default
13786  are ordinary paragraph types and can also be used several times in one
13787  and the same letter.
13788 \end_layout
13789
13790 \begin_layout Itemize
13791
13792 \family sans
13793 Letter
13794 \family default
13795 : produces a paragraph for the addressee and implicitly defines the beginning
13796  of the letter.
13797 \end_layout
13798
13799 \begin_layout Itemize
13800
13801 \family sans
13802 Opening
13803 \family default
13804 : produces a paragraph for the form of address and implicitly produces a
13805  new letter.
13806 \end_layout
13807
13808 \begin_layout Itemize
13809
13810 \family sans
13811 Closing
13812 \family default
13813 : produces a paragraph for a close.
13814 \end_layout
13815
13816 \begin_layout Itemize
13817
13818 \family sans
13819 PS
13820 \family default
13821 : produces a paragraph for a postscript.
13822 \end_layout
13823
13824 \begin_layout Itemize
13825
13826 \family sans
13827 CC
13828 \family default
13829 : produces a paragraph for a distribution list.
13830 \end_layout
13831
13832 \begin_layout Itemize
13833
13834 \family sans
13835 Encl
13836 \family default
13837 : produces a paragraph for enclosures.
13838 \end_layout
13839
13840 \begin_layout Standard
13841 The types 
13842 \family sans
13843 Name
13844 \family default
13845
13846 \family sans
13847 Signature
13848 \family default
13849
13850 \family sans
13851 Address
13852 \family default
13853
13854 \family sans
13855 Telephone
13856 \family default
13857
13858 \family sans
13859 Place
13860 \family default
13861
13862 \family sans
13863 Backaddress
13864 \family default
13865
13866 \family sans
13867 Specialmail
13868 \family default
13869
13870 \family sans
13871 Location
13872 \family default
13873
13874 \family sans
13875 Title
13876 \family default
13877 , and 
13878 \family sans
13879 Subject
13880 \family default
13881  are input types provided with a label to enter information, which will
13882  be processed by the document class.
13883 \begin_inset Foot
13884 status open
13885
13886 \begin_layout Plain Layout
13887 It could be seen as a matter of inconsequence, that the types 
13888 \family sans
13889 Letter
13890 \family default
13891  and 
13892 \family sans
13893 Opening
13894 \family default
13895  described above are not such input types as well.
13896  Because of the special meaning of those types, however, I have implemented
13897  them as ordinary paragraph types with a one letter mark in the left margin.
13898  Moreover, it would affect my feeling of symmetry, if the 
13899 \family sans
13900 Opening
13901 \family default
13902  type and the 
13903 \family sans
13904 Closing
13905 \family default
13906  type had such a serious different appearance.
13907 \end_layout
13908
13909 \end_inset
13910
13911  The types must be used ahead of the corresponding 
13912 \family sans
13913 Opening
13914 \family default
13915  type.
13916 \end_layout
13917
13918 \begin_layout Standard
13919 An implementation of these types in a WYSIWYG fashion does not seem to make
13920  sense, because the real appearance of the produced letter does not only
13921  depend on the usage of the particular type, but also on other factors.
13922  For example, a signature entered in the 
13923 \family sans
13924 Signature
13925 \family default
13926  type will in the standard behavior appear in the produced letter only,
13927  when in the same letter also a 
13928 \family sans
13929 Closing
13930 \family default
13931  type is used.
13932  The entered value of the 
13933 \family sans
13934 Telephone
13935 \family default
13936  type will in the standard behavior not appear in the produced letter at
13937  all.
13938  The possibility to design the letter`s heading freely is already indicated
13939  in a footnote above.
13940 \end_layout
13941
13942 \begin_layout Standard
13943 The input types can also be used as empty paragraphs.
13944  This makes sense e.
13945 \begin_inset space \thinspace{}
13946 \end_inset
13947
13948 g.
13949 \begin_inset space \space{}
13950 \end_inset
13951
13952 for the 
13953 \family sans
13954 Signature
13955 \family default
13956  type.
13957  If the 
13958 \family sans
13959 Signature
13960 \family default
13961  type is not used at all, in the standard behavior the value of the 
13962 \family sans
13963 Name
13964 \family default
13965  type is used as signature, whereas if an empty 
13966 \family sans
13967 Signature
13968 \family default
13969  type is used, no signature value is defined.
13970 \end_layout
13971
13972 \begin_layout Standard
13973 By using the input types it is possible to write a letter template, containing
13974  filled input types with your personal dates (name, address, etc.) and empty
13975  input types for other dates you want to enter.
13976 \end_layout
13977
13978 \begin_layout Itemize
13979
13980 \family sans
13981 Name
13982 \family default
13983 : sender's name, in the standard behavior appears as a centered paragraph
13984  in small caps in the letter`s heading.
13985 \end_layout
13986
13987 \begin_layout Itemize
13988
13989 \family sans
13990 Signature
13991 \family default
13992 : sender's signature, in the standard behavior appears below the 
13993 \family sans
13994 Closing
13995 \family default
13996  type.
13997  If no 
13998 \family sans
13999 Signature
14000 \family default
14001  type is used, the value of the 
14002 \family sans
14003 Name
14004 \family default
14005  type appears instead.
14006 \end_layout
14007
14008 \begin_layout Itemize
14009
14010 \family sans
14011 Address
14012 \family default
14013 : sender's address, in the standard behavior appears in a centered paragraph
14014  in the letter`s heading below the sender's name.
14015 \end_layout
14016
14017 \begin_layout Itemize
14018
14019 \family sans
14020 Telephone
14021 \family default
14022 : sender's telephone number, in the standard behavior only sets the LaTeX
14023  variable 
14024 \family typewriter
14025
14026 \backslash
14027 telephonenum
14028 \family default
14029 .
14030 \end_layout
14031
14032 \begin_layout Itemize
14033
14034 \family sans
14035 Place
14036 \family default
14037 : place of the letter`s making.
14038 \end_layout
14039
14040 \begin_layout Itemize
14041
14042 \family sans
14043 Date
14044 \family default
14045 : date of the letter`s making.
14046  
14047 \family sans
14048 Place
14049 \family default
14050  and 
14051 \family sans
14052 Date
14053 \family default
14054 , in the standard behavior, produce the place and the date in a right-aligned
14055  line below the addressee's field.
14056  If an empty 
14057 \family sans
14058 Date
14059 \family default
14060  type is used, neither place nor date appear, independent of the value of
14061  the 
14062 \family sans
14063 Place
14064 \family default
14065  type.
14066  If no 
14067 \family sans
14068 Date
14069 \family default
14070  type is used, the date of the letter `s production is used.
14071 \end_layout
14072
14073 \begin_layout Itemize
14074
14075 \family sans
14076 Backaddress
14077 \family default
14078 : sender`s back address, in the standard behavior appears above the addressee's
14079  field in a small sans serif font.
14080 \end_layout
14081
14082 \begin_layout Itemize
14083
14084 \family sans
14085 Specialmail
14086 \family default
14087 : special mail information, in the standard behavior appears underlined
14088  above the addressee's field below the back address.
14089 \end_layout
14090
14091 \begin_layout Itemize
14092
14093 \family sans
14094 Location
14095 \family default
14096 : additional information, in the standard behavior appears on right side
14097  below the addressee`s field.
14098 \end_layout
14099
14100 \begin_layout Itemize
14101
14102 \family sans
14103 Title
14104 \family default
14105 : the letter's title, in the standard behavior appears in a big, bold, sans
14106  serif font above the subject.
14107 \end_layout
14108
14109 \begin_layout Itemize
14110
14111 \family sans
14112 Subject
14113 \family default
14114 : the letter's subject, in the standard behavior appears in a bold font
14115  above the 
14116 \family sans
14117 Opening
14118 \family default
14119  paragraph.
14120 \end_layout
14121
14122 \begin_layout Standard
14123 The types 
14124 \family sans
14125 Yourref
14126 \family default
14127
14128 \family sans
14129 Yourmail
14130 \family default
14131
14132 \family sans
14133 Myref
14134 \family default
14135
14136 \family sans
14137 Customer
14138 \family default
14139 , and 
14140 \family sans
14141 Invoice
14142 \family default
14143  produce a business letter like line above the 
14144 \family sans
14145 Title
14146 \family default
14147  line containing the fields 
14148 \begin_inset Quotes eld
14149 \end_inset
14150
14151 Your ref.
14152 \begin_inset Quotes erd
14153 \end_inset
14154
14155
14156 \begin_inset Quotes eld
14157 \end_inset
14158
14159 Your letter of
14160 \begin_inset Quotes erd
14161 \end_inset
14162
14163
14164 \begin_inset Quotes eld
14165 \end_inset
14166
14167 Our ref.
14168 \begin_inset Quotes erd
14169 \end_inset
14170
14171
14172 \begin_inset Quotes eld
14173 \end_inset
14174
14175 Customer no.
14176 \begin_inset Quotes erd
14177 \end_inset
14178
14179
14180 \begin_inset Quotes eld
14181 \end_inset
14182
14183 Invoice no.
14184 \begin_inset Quotes erd
14185 \end_inset
14186
14187 , and 
14188 \begin_inset Quotes eld
14189 \end_inset
14190
14191 Date
14192 \begin_inset Quotes erd
14193 \end_inset
14194
14195 .
14196  For the date field, the value of the 
14197 \family sans
14198 Date
14199 \family default
14200  type is used.
14201  If one of these 
14202 \begin_inset Quotes eld
14203 \end_inset
14204
14205 business letter types
14206 \begin_inset Quotes erd
14207 \end_inset
14208
14209  is used, the value of the 
14210 \family sans
14211 Place
14212 \family default
14213  type however does not appear, but only the LaTeX variable 
14214 \family typewriter
14215
14216 \backslash
14217 fromplace
14218 \family default
14219  is set.
14220  The ordinary output of place and date in a right-aligned line below the
14221  addressee`s field is suppressed.
14222  The types are implemented as input types provided with a label and must
14223  be used ahead of the corresponding 
14224 \family sans
14225 Opening
14226 \family default
14227  type.
14228 \end_layout
14229
14230 \begin_layout Itemize
14231
14232 \family sans
14233 Yourref
14234 \family default
14235 : Your ref.
14236 \end_layout
14237
14238 \begin_layout Itemize
14239
14240 \family sans
14241 Yourmail
14242 \family default
14243 : Your letter of.
14244 \end_layout
14245
14246 \begin_layout Itemize
14247
14248 \family sans
14249 Myref
14250 \family default
14251 : Our ref.
14252 \end_layout
14253
14254 \begin_layout Itemize
14255
14256 \family sans
14257 Customer
14258 \family default
14259 : Customer no.
14260 \end_layout
14261
14262 \begin_layout Itemize
14263
14264 \family sans
14265 Invoice
14266 \family default
14267 : Invoice no.
14268 \end_layout
14269
14270 \begin_layout Subsection
14271 The new letter class: letter (koma-script v.2)
14272 \end_layout
14273
14274 \begin_layout Standard
14275 by 
14276 \noun on
14277 Jürgen Spitzmüller
14278 \end_layout
14279
14280 \begin_layout Standard
14281 \begin_inset VSpace medskip
14282 \end_inset
14283
14284
14285 \end_layout
14286
14287 \begin_layout Standard
14288 \noindent
14289 Koma-Script version 2.8 has introduced a new letter class 
14290 \family typewriter
14291 scrlttr2
14292 \family default
14293  which supersedes the now unsupported 
14294 \family typewriter
14295 scrlettr
14296 \family default
14297 .
14298  It has — on the LaTeX side — a completely new interface and is not compatible
14299  with the old class.
14300  Therefore, LyX supports both, though it is recommended you use the new
14301  class.
14302 \end_layout
14303
14304 \begin_layout Standard
14305 This class covers the same functionality as 
14306 \emph on
14307 letter (koma-script),
14308 \emph default
14309  and a few more.
14310  The basic items are 
14311 \family sans
14312 Address
14313 \family default
14314  (receiver's address, same as 
14315 \family sans
14316 Letter
14317 \family default
14318  in the old layout), 
14319 \family sans
14320 Opening
14321 \family default
14322 , and 
14323 \family sans
14324 Closing
14325 \family default
14326 .
14327  
14328 \family sans
14329 NextAddress
14330 \family default
14331  will start a new letter (i.
14332 \begin_inset space \thinspace{}
14333 \end_inset
14334
14335 g.
14336 \begin_inset space \space{}
14337 \end_inset
14338
14339 you can write several letters per document).
14340  New elements are sender's 
14341 \family sans
14342 E-Mail
14343 \family default
14344
14345 \family sans
14346 URL
14347 \family default
14348
14349 \family sans
14350 Fax
14351 \family default
14352
14353 \family sans
14354 Bank
14355 \family default
14356  and the possibility to use a 
14357 \family sans
14358 Logo
14359 \family default
14360  (via 
14361 \family sans
14362 Insert\SpecialChar \menuseparator
14363 Graphics
14364 \family default
14365 ) in the header.
14366 \end_layout
14367
14368 \begin_layout Standard
14369 The biggest improvement is, though, that the letter's layout is configurable
14370  to meet almost any needs.
14371  This can be done via the preamble or with a special style file (Letter
14372  Class Option, extension 
14373 \family typewriter
14374 *.lco
14375 \family default
14376 ), that will be read in as a class option.
14377 \begin_inset Foot
14378 status collapsed
14379
14380 \begin_layout Plain Layout
14381 The KOMA package comes with some default 
14382 \family typewriter
14383 *.lco
14384 \family default
14385  files.
14386  There is, for instance, a 
14387 \family typewriter
14388 DIN.lco
14389 \family default
14390  file that follows german typesetting rules, or a 
14391 \family typewriter
14392 KOMAold.lco
14393 \family default
14394  that provides the default layout of the old 
14395 \family typewriter
14396 scrlettr
14397 \family default
14398  class.
14399  The latter can be loaded with the class option 
14400 \family typewriter
14401 KOMAold
14402 \family default
14403 , inserted via the 
14404 \family sans
14405 \bar under
14406 L
14407 \bar default
14408 ayout\SpecialChar \menuseparator
14409
14410 \bar under
14411 D
14412 \bar default
14413 ocument\SpecialChar \menuseparator
14414 Extra Options
14415 \family default
14416  field.
14417 \end_layout
14418
14419 \end_inset
14420
14421  Have a look at the 
14422 \emph on
14423 koma-letter2
14424 \emph default
14425  template that is included in LyX for examples.
14426  A detailed description is to be found in the Koma-Script documentation
14427  (
14428 \emph on
14429 scrguide
14430 \emph default
14431 ).
14432 \end_layout
14433
14434 \begin_layout Subsection
14435 Problems
14436 \end_layout
14437
14438 \begin_layout Standard
14439 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14440  some problems.
14441 \end_layout
14442
14443 \begin_layout Itemize
14444 The chapter number of a 
14445 \family sans
14446 Chapter
14447 \family default
14448  type appears on a line of its own above the chapter heading instead of
14449  appearing in the same line ahead of it.
14450  The cause for that is the LyX internal behavior for the labeltype 
14451 \family sans
14452 Counter_Chapter
14453 \family default
14454  in the layout file.
14455 \end_layout
14456
14457 \begin_layout Itemize
14458 The headings of the types 
14459 \family sans
14460 Addchap
14461 \family default
14462  and 
14463 \family sans
14464 Addsec
14465 \family default
14466  are only put in the 
14467 \begin_inset Quotes eld
14468 \end_inset
14469
14470 true
14471 \begin_inset Quotes erd
14472 \end_inset
14473
14474  LaTeX table of contents, but not in the LyX table of contents (
14475 \family sans
14476 Document\SpecialChar \menuseparator
14477 Table
14478 \begin_inset space ~
14479 \end_inset
14480
14481 of
14482 \begin_inset space ~
14483 \end_inset
14484
14485 Contents
14486 \family default
14487 ).
14488 \end_layout
14489
14490 \begin_layout Itemize
14491 The paragraphs in a 
14492 \emph on
14493 letter
14494 \emph default
14495  document class appear in a skip separation mode, not indented.
14496  This is the standard behavior, no special LaTeX commands are needed for
14497  that.
14498  But in the 
14499 \family sans
14500 Document\SpecialChar \menuseparator
14501 Settings
14502 \family default
14503  dialog the corresponding radio button indicates 
14504 \family sans
14505 Indent
14506 \family default
14507 .
14508  A 
14509 \family sans
14510 Skip
14511 \family default
14512  value always has the effect that extra LaTeX commands are inserted in the
14513  document to produce the gap, which is not what is wanted in this case.
14514 \end_layout
14515
14516 \begin_layout Section
14517 Memoir
14518 \end_layout
14519
14520 \begin_layout Standard
14521 By 
14522 \noun on
14523 Jürgen Spitzmüller
14524 \end_layout
14525
14526 \begin_layout Subsection
14527 Overview
14528 \end_layout
14529
14530 \begin_layout Standard
14531 Memoir is a very powerful and constantly evolving class.
14532  It has been designed with regard to fictional and non-fictional literature.
14533  Its aim is to let the user have maximum control over the typesetting of
14534  his document.
14535  Memoir is based on the standard book class, but it can also emulate the
14536  article class (see below).
14537 \end_layout
14538
14539 \begin_layout Standard
14540 Peter Wilson, the developer of Memoir, is known as the author of lots of
14541  useful packages in the LaTeX world.
14542  Most of them have been merged with Memoir.
14543  Therefore, it is much easier to layout the table of contents, appendices,
14544  chapter designs and such.
14545  LyX, though, does not support all of these goodies natively.
14546  Some of them might be added to forthcoming releases
14547 \begin_inset Foot
14548 status collapsed
14549
14550 \begin_layout Plain Layout
14551 You are invited to send suggestions to 
14552 \begin_inset Flex URL
14553 status collapsed
14554
14555 \begin_layout Plain Layout
14556
14557 lyx-devel@lists.lyx.org
14558 \end_layout
14559
14560 \end_inset
14561
14562 .
14563 \end_layout
14564
14565 \end_inset
14566
14567 , lots will probably never, due to the limitations of LyX's framework.
14568  Of course you can still use all features with the help of some native LaTeX
14569  commands (TeX code
14570 \begin_inset Foot
14571 status collapsed
14572
14573 \begin_layout Plain Layout
14574 Cf.
14575 \begin_inset ERT
14576 status collapsed
14577
14578 \begin_layout Plain Layout
14579
14580
14581 \backslash
14582  
14583 \end_layout
14584
14585 \end_inset
14586
14587 section
14588 \begin_inset space ~
14589 \end_inset
14590
14591
14592 \begin_inset CommandInset ref
14593 LatexCommand ref
14594 reference "sec:Inserting-TeX-Code"
14595
14596 \end_inset
14597
14598  for details.
14599 \end_layout
14600
14601 \end_inset
14602
14603 ).
14604  In this section, we can only list those features which are natively supported
14605  by LyX.
14606  For detailed descriptions (and for the rest of features) we recommend you
14607  have a look at the detailed manual of the Memoir class
14608 \begin_inset Foot
14609 status collapsed
14610
14611 \begin_layout Plain Layout
14612 Cf.
14613 \begin_inset ERT
14614 status collapsed
14615
14616 \begin_layout Plain Layout
14617
14618
14619 \backslash
14620  
14621 \end_layout
14622
14623 \end_inset
14624
14625
14626 \begin_inset Flex URL
14627 status collapsed
14628
14629 \begin_layout Plain Layout
14630
14631 CTAN:/macros/latex/memoir/memman.pdf
14632 \end_layout
14633
14634 \end_inset
14635
14636 .
14637 \end_layout
14638
14639 \end_inset
14640
14641 , which is not only a user guide for the class, but also both a comprehensive
14642  description on good typesetting and a superb example for good typesetting
14643  itself.
14644 \end_layout
14645
14646 \begin_layout Subsection
14647 Basic features and restrictions
14648 \end_layout
14649
14650 \begin_layout Standard
14651 Memoir supports basically all features of the standard book classes.
14652  There are, however, some differences, as follows:
14653 \end_layout
14654
14655 \begin_layout Description
14656 Font
14657 \begin_inset space ~
14658 \end_inset
14659
14660 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14661 \end_layout
14662
14663 \begin_layout Description
14664 Page
14665 \begin_inset space ~
14666 \end_inset
14667
14668 style: The fancy page style is not supported, due to a command clash between
14669  Memoir and the fancyhdr package (they both define a command with the same
14670  name, which confuses LaTeX).
14671  Instead, Memoir comes with a number of its own page styles (see 
14672 \family sans
14673 Layout\SpecialChar \menuseparator
14674 Document\SpecialChar \menuseparator
14675 Page
14676 \begin_inset space ~
14677 \end_inset
14678
14679 Style
14680 \family default
14681 ).
14682  If you want to use these for the chapter pages, you have to use the command
14683  
14684 \family typewriter
14685
14686 \backslash
14687 chapterstyle
14688 \family default
14689  in the main text or in preamble (e.
14690 \begin_inset space \thinspace{}
14691 \end_inset
14692
14693 g.
14694 \begin_inset space \space{}
14695 \end_inset
14696
14697
14698 \family typewriter
14699
14700 \backslash
14701 chapterstyle{companion}
14702 \family default
14703 ).
14704 \end_layout
14705
14706 \begin_layout Description
14707 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14708  optional argument in the standard classes.
14709  With this, you can specify an alternative version of the title for the
14710  table of contents and the headers (for instance, if the title is too long).
14711  In LyX, you can do this via 
14712 \family sans
14713 Insert\SpecialChar \menuseparator
14714 Short
14715 \begin_inset space ~
14716 \end_inset
14717
14718 Title
14719 \family default
14720  at the beginning of a chapter/section.
14721  Memoir features a second optional argument and thus separates the table
14722  of contents from the header.
14723  You can define three variants of a title with this: one for the main text,
14724  one for the table of contents, and one for the headers.
14725  Simply insert two optional arguments if you need this feature, the first
14726  one containing the short title for the Table of Contents, the second one
14727  containing an alternative short title for the headers.
14728 \end_layout
14729
14730 \begin_layout Description
14731 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14732  of contents, the list of figures and the list of table start a new page
14733  automatically.
14734  Memoir does not follow this route.
14735  You have to insert a page break yourself, if you want to have one.
14736 \end_layout
14737
14738 \begin_layout Description
14739 Titlepage: For some unknown reason, Memoir uses pagination on the title
14740  page (in the standard classes, title pages are 
14741 \begin_inset Quotes eld
14742 \end_inset
14743
14744 empty
14745 \begin_inset Quotes erd
14746 \end_inset
14747
14748 , i.
14749 \begin_inset space \thinspace{}
14750 \end_inset
14751
14752 g.
14753 \begin_inset space \space{}
14754 \end_inset
14755
14756 without pagina).
14757  If you want an empty title page, type 
14758 \family typewriter
14759
14760 \backslash
14761 aliaspagestyle{title}{empty}
14762 \family default
14763  in the preamble.
14764 \end_layout
14765
14766 \begin_layout Description
14767 Article: With the class option 
14768 \emph on
14769 article
14770 \emph default
14771  (to be inserted in 
14772 \family sans
14773 Layout\SpecialChar \menuseparator
14774 Document\SpecialChar \menuseparator
14775 Extra
14776 \begin_inset space ~
14777 \end_inset
14778
14779 Options
14780 \family default
14781 ), you can emulate article style.
14782  That is, counters (footnotes, figures, tables etc.) will not be reset on
14783  new chapters, chapters don't start a new page (but are—in contrary to 
14784 \begin_inset Quotes eld
14785 \end_inset
14786
14787 real
14788 \begin_inset Quotes erd
14789 \end_inset
14790
14791  article classes—still allowed), parts, though, use their own page, as in
14792  book.
14793 \end_layout
14794
14795 \begin_layout Description
14796 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14797  font commands, which have been used in the old LaTeX version 2.09 (e.
14798 \begin_inset space \thinspace{}
14799 \end_inset
14800
14801 g.
14802 \begin_inset space \space{}
14803 \end_inset
14804
14805
14806 \family typewriter
14807
14808 \backslash
14809 rm
14810 \family default
14811
14812 \family typewriter
14813
14814 \backslash
14815 it
14816 \family default
14817 ).
14818  It produces an error and stops LaTeX whenever such a command appears.
14819  The class option 
14820 \emph on
14821 oldfontcommands
14822 \emph default
14823  reallows the commands and spits out warnings instead (which does at least
14824  not stop LaTeX).
14825  Since a lot of packages and particularly BibTeX style files are still using
14826  those commands, we have decided to use this option by default.
14827 \end_layout
14828
14829 \begin_layout Subsection
14830 Extra features
14831 \end_layout
14832
14833 \begin_layout Standard
14834 We will only describe the features supported by LyX (which is not much currently
14835 ).
14836  Please consult the Memoir manual
14837 \begin_inset Foot
14838 status collapsed
14839
14840 \begin_layout Plain Layout
14841 Cf.
14842 \begin_inset ERT
14843 status collapsed
14844
14845 \begin_layout Plain Layout
14846
14847
14848 \backslash
14849  
14850 \end_layout
14851
14852 \end_inset
14853
14854
14855 \begin_inset Flex URL
14856 status collapsed
14857
14858 \begin_layout Plain Layout
14859
14860 CTAN:/macros/latex/memoir/memman.pdf
14861 \end_layout
14862
14863 \end_inset
14864
14865 .
14866 \end_layout
14867
14868 \end_inset
14869
14870  for details.
14871 \end_layout
14872
14873 \begin_layout Description
14874 Abstract: You may wonder why an abstract is an extra feature.
14875  Well, it is in book class.
14876  Usually books don't have abstracts.
14877  Memoir, however, has.
14878  You can use it wherever and how often you like.
14879 \end_layout
14880
14881 \begin_layout Description
14882 Chapterprecis: You may know this older typesetting style: The contents of
14883  a chapter are summarized below the title and also in the table of contents
14884  (e.
14885 \begin_inset space \thinspace{}
14886 \end_inset
14887
14888 g.
14889 \begin_inset space \space{}
14890 \end_inset
14891
14892
14893 \emph on
14894 Our hero arrives in Troia; he loses some friends; he finds others
14895 \emph default
14896 ).
14897  Chapterprecis does exactly this.
14898  It is therefore only sensible below a chapter.
14899 \end_layout
14900
14901 \begin_layout Description
14902 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14903  The epigraph environment provides an elegant way of typesetting such a
14904  motto.
14905  The motto itself (text) and its author (source) are divided by a short
14906  line.
14907  Unfortunately, we have to fool LyX a bit here again, since the environment
14908  needs two arguments (text and source).
14909  In this case, we have to use curly brackets (in TeX mode) between the two
14910  arguments: 
14911 \emph on
14912 <smart slogan>
14913 \emph default
14914  
14915 \family typewriter
14916 }{
14917 \family default
14918  
14919 \emph on
14920 <author of the slogan>.
14921 \end_layout
14922
14923 \begin_layout Description
14924 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14925  complex figurative poems).
14926  LyX can only support a few of them.
14927  One is poemtitle, which is a centered title for poems, which will also
14928  be added to the table of contents (verse is the standard environment for
14929  poems.
14930  Memoir has some enhanced versions of verse, but you need to use TeX code,
14931  because they have to be nested inside regular verse environments, which
14932  is not possible with LyX).
14933 \end_layout
14934
14935 \begin_layout Description
14936 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14937 \end_layout
14938
14939 \begin_layout Section
14940 Article (mwart), book (mwbk) and report (mwrep)
14941 \begin_inset Argument
14942 status collapsed
14943
14944 \begin_layout Plain Layout
14945 The 
14946 \family typewriter
14947 mw
14948 \family default
14949  Classes
14950 \end_layout
14951
14952 \end_inset
14953
14954
14955 \end_layout
14956
14957 \begin_layout Standard
14958 by 
14959 \noun on
14960 Tomasz Luczak
14961 \end_layout
14962
14963 \begin_layout Standard
14964 The LyX document classes 
14965 \emph on
14966 article (mwart)
14967 \emph default
14968
14969 \emph on
14970 report (mwrep)
14971 \emph default
14972  and 
14973 \emph on
14974 book
14975 \emph default
14976  
14977 \emph on
14978 (mwbk)
14979 \emph default
14980  correspond to the LaTeX document classes 
14981 \family typewriter
14982 mwart.cls
14983 \family default
14984
14985 \family typewriter
14986 mwrep.cls
14987 \family default
14988  and 
14989 \family typewriter
14990 mwbk.cls
14991 \family default
14992 , resp.
14993  They are replacements for the standard document classes 
14994 \family typewriter
14995 article.cls
14996 \family default
14997
14998 \family typewriter
14999 report.cls
15000 \family default
15001  and 
15002 \family typewriter
15003 book.cls
15004 \family default
15005 , resp., and fit better to Polish typography conventions in a number of points.
15006  
15007 \end_layout
15008
15009 \begin_layout Standard
15010 Basic differences:
15011 \end_layout
15012
15013 \begin_layout Itemize
15014 Unnumbered titles (with star, e.
15015 \begin_inset space \thinspace{}
15016 \end_inset
15017
15018 g.
15019 \begin_inset space \space{}
15020 \end_inset
15021
15022
15023 \family sans
15024 Section*
15025 \family default
15026 ) are added into table of contents,
15027 \end_layout
15028
15029 \begin_layout Itemize
15030 Additional page styles:
15031 \end_layout
15032
15033 \begin_deeper
15034 \begin_layout Description
15035 uheadings header with separated lines,
15036 \end_layout
15037
15038 \begin_layout Description
15039 myheadings custom header, contents headers via commands: 
15040 \family typewriter
15041
15042 \backslash
15043 markright
15044 \family default
15045  and 
15046 \family typewriter
15047
15048 \backslash
15049 markboth
15050 \family default
15051 ,
15052 \end_layout
15053
15054 \begin_layout Description
15055 myuheadings custom header with separated lines,
15056 \end_layout
15057
15058 \begin_layout Description
15059 outer page number is placed on outer side of page
15060 \end_layout
15061
15062 \end_deeper
15063 \begin_layout Itemize
15064 Options 
15065 \end_layout
15066
15067 \begin_deeper
15068 \begin_layout Description
15069 rmheadings serif titles — default,
15070 \end_layout
15071
15072 \begin_layout Description
15073 sfheadings sansserif titles,
15074 \end_layout
15075
15076 \begin_layout Description
15077 authortitle on title page first placed is author next title — default,
15078 \end_layout
15079
15080 \begin_layout Description
15081 titleauthor on title page first placed is title next author,
15082 \end_layout
15083
15084 \begin_layout Description
15085 withmarginpar reserve place on page for margins.
15086 \end_layout
15087
15088 \end_deeper
15089 \begin_layout Section
15090 Paper
15091 \end_layout
15092
15093 \begin_layout Standard
15094 The document class 
15095 \family sans
15096 paper
15097 \family default
15098  provides an alternative to the standard 
15099 \family sans
15100 article
15101 \family default
15102  class.
15103  It provides similar functionality, but you might prefer this layout with
15104  sans serif sections, headings, and more.
15105 \end_layout
15106
15107 \begin_layout Section
15108 RevTeX4
15109 \end_layout
15110
15111 \begin_layout Standard
15112 by 
15113 \noun on
15114 Amir Karger
15115 \end_layout
15116
15117 \begin_layout Standard
15118 \begin_inset VSpace bigskip
15119 \end_inset
15120
15121
15122 \end_layout
15123
15124 \begin_layout Standard
15125 \noindent
15126 The 
15127 \family sans
15128 Revtex
15129 \begin_inset space ~
15130 \end_inset
15131
15132 4
15133 \family default
15134  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15135 \begin_inset Formula $\beta$
15136 \end_inset
15137
15138  release of May, 1999) class.
15139 \end_layout
15140
15141 \begin_layout Standard
15142 LyX has a 
15143 \family sans
15144 Revtex
15145 \family default
15146  textclass, which works with RevTeX 3.1.
15147  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15148  That means that it doesn't interact very well with LyX, which requires
15149  LaTeX2e, although it has been kludged to work.
15150  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15151  LyX with the 
15152 \family sans
15153 RevTeX
15154 \begin_inset space ~
15155 \end_inset
15156
15157 4
15158 \family default
15159  textclass should also be pretty easy to use.
15160 \end_layout
15161
15162 \begin_layout Standard
15163 These documents are supposed to be used in 
15164 \emph on
15165 addition
15166 \emph default
15167  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15168  macros, and assume you'll know what to put in the preamble if necessary.
15169 \end_layout
15170
15171 \begin_layout Subsection
15172 Installation
15173 \end_layout
15174
15175 \begin_layout Standard
15176 All you need to do is install RevTeX 4, as described in the package's README
15177  file.
15178  The package can be found at The RevTeX 4 Web Site 
15179 \begin_inset Flex URL
15180 status collapsed
15181
15182 \begin_layout Plain Layout
15183
15184 http://publish.aps.org/revtex4/
15185 \end_layout
15186
15187 \end_inset
15188
15189 .
15190  Install it somewhere that LaTeX can see it.
15191  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15192  (i.
15193 \begin_inset space \thinspace{}
15194 \end_inset
15195
15196 g.
15197 \begin_inset space \space{}
15198 \end_inset
15199
15200 not the directory where you installed the class file.) Then, if you reconfigure
15201  LyX, it will find the class file and let you use the RevTeX4 textclass.
15202 \end_layout
15203
15204 \begin_layout Standard
15205 Probably the easiest way to get started is either to import a RevTeX 4 document
15206  using 
15207 \family typewriter
15208 tex2lyx
15209 \family default
15210 , or to use the 
15211 \family sans
15212 Revtex
15213 \begin_inset space ~
15214 \end_inset
15215
15216 4
15217 \family default
15218  template, found in the templates directory.
15219 \end_layout
15220
15221 \begin_layout Subsection
15222 Preamble Matter
15223 \end_layout
15224
15225 \begin_layout Standard
15226 Optional arguments to 
15227 \family typewriter
15228
15229 \backslash
15230 documentclass
15231 \family default
15232 , like 
15233 \begin_inset Quotes eld
15234 \end_inset
15235
15236 preprint
15237 \begin_inset Quotes erd
15238 \end_inset
15239
15240  and 
15241 \begin_inset Quotes eld
15242 \end_inset
15243
15244 aps
15245 \begin_inset Quotes erd
15246 \end_inset
15247
15248 , go in the 
15249 \family sans
15250 E
15251 \bar under
15252 x
15253 \bar default
15254 tra
15255 \begin_inset space ~
15256 \end_inset
15257
15258 Options
15259 \family default
15260  field in the 
15261 \family sans
15262 Document
15263 \begin_inset space ~
15264 \end_inset
15265
15266 Layout
15267 \family default
15268  dialog, as usual.
15269  Remember that in RevTeX, at least one optional argument is required! 
15270 \end_layout
15271
15272 \begin_layout Standard
15273 Other preamble matter, like 
15274 \family typewriter
15275
15276 \backslash
15277 draft
15278 \family default
15279  etc.
15280 \begin_inset space ~
15281 \end_inset
15282
15283 goes in the 
15284 \family sans
15285 LaTeX
15286 \begin_inset space ~
15287 \end_inset
15288
15289 Preamble
15290 \family default
15291  dialog, also as usual.
15292 \end_layout
15293
15294 \begin_layout Subsection
15295 Layouts
15296 \end_layout
15297
15298 \begin_layout Standard
15299 The layouts basically correspond to the commands in RevTeX4.0.
15300  For example, the Email layout corresponds to 
15301 \family typewriter
15302
15303 \backslash
15304 email{}
15305 \family default
15306 .
15307  Note that (at least as of RevTeX 4.0 Beta), the 
15308 \family sans
15309 Address
15310 \family default
15311  and 
15312 \family sans
15313 Affiliation
15314 \family default
15315  layouts are exactly equivalent, so you shouldn't need to use both.
15316 \begin_inset Foot
15317 status collapsed
15318
15319 \begin_layout Plain Layout
15320 In case you're curious, both were included so that 
15321 \family typewriter
15322 tex2lyx
15323 \family default
15324  would be able to translate both 
15325 \family typewriter
15326
15327 \backslash
15328 address
15329 \family default
15330  and 
15331 \family typewriter
15332
15333 \backslash
15334 affiliation
15335 \family default
15336 .
15337 \end_layout
15338
15339 \end_inset
15340
15341
15342 \end_layout
15343
15344 \begin_layout Subsection
15345 Important Notes
15346 \end_layout
15347
15348 \begin_layout Standard
15349 There are a couple of important unique aspects of RevTeX 4 which might cause
15350  bugs that will be even more confusing in LyX.
15351 \end_layout
15352
15353 \begin_layout Standard
15354 In RevTeX, the 
15355 \family typewriter
15356
15357 \backslash
15358 thanks
15359 \family default
15360  command goes 
15361 \emph on
15362 outside
15363 \emph default
15364  the 
15365 \family typewriter
15366
15367 \backslash
15368 author
15369 \family default
15370  command.
15371  The LyX equivalent is that there is a separate Thanks layout.
15372  Do 
15373 \emph on
15374 not
15375 \emph default
15376  write footnotes in the 
15377 \family sans
15378 Author
15379 \family default
15380  layout, or weird things may happen.
15381  See the RevTeX 4 documentation for more details.
15382 \end_layout
15383
15384 \begin_layout Standard
15385 Also, the 
15386 \family sans
15387 Author
15388 \begin_inset space ~
15389 \end_inset
15390
15391 Email
15392 \family default
15393
15394 \family sans
15395 Author
15396 \begin_inset space ~
15397 \end_inset
15398
15399 URL
15400 \family default
15401 , and 
15402 \family sans
15403 Thanks
15404 \family default
15405  layouts must be placed 
15406 \emph on
15407 in between
15408 \emph default
15409  the 
15410 \family sans
15411 Author
15412 \family default
15413  layout and the corresponding 
15414 \family sans
15415 Address
15416 \family default
15417  (or equivalent 
15418 \family sans
15419 Affiliation
15420 \family default
15421 ) layout.
15422  If you put the 
15423 \family sans
15424 Thanks
15425 \family default
15426  after the 
15427 \family sans
15428 Address
15429 \family default
15430 , the LaTeX won't compile.
15431 \end_layout
15432
15433 \begin_layout Subsection
15434 Drawbacks
15435 \end_layout
15436
15437 \begin_layout Standard
15438 The main problem with this layout is that you can't use the optional arguments
15439  to layouts like Email and Title.
15440  (The problem is not unique to this layout; you can't use optional arguments
15441  to the Section layouts either.) This means that after you export that file
15442  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15443  need to edit the LaTeX file with a text editor to add the optional arguments
15444  to set, e.
15445 \begin_inset space \thinspace{}
15446 \end_inset
15447
15448 g.
15449 \begin_inset space \space{}
15450 \end_inset
15451
15452 the running title for the page headers.
15453  Lacking these layouts makes the 
15454 \family typewriter
15455
15456 \backslash
15457 altaffiliation
15458 \family default
15459  (and the equivalent 
15460 \family typewriter
15461
15462 \backslash
15463 altaddress
15464 \family default
15465 ) useless, so the corresponding layouts don't exist, and will have to be
15466  added by hand.
15467 \begin_inset Foot
15468 status collapsed
15469
15470 \begin_layout Plain Layout
15471
15472 \emph on
15473 Note from JMarc:
15474 \emph default
15475  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15476  has not been updated yet to take advantage of it.
15477 \end_layout
15478
15479 \end_inset
15480
15481  
15482 \end_layout
15483
15484 \begin_layout Section
15485 Springer Journals (
15486 \family sans
15487 svjour
15488 \family default
15489 )
15490 \end_layout
15491
15492 \begin_layout Standard
15493 by 
15494 \noun on
15495 Martin Vermeer
15496 \end_layout
15497
15498 \begin_layout Subsection
15499 Description
15500 \end_layout
15501
15502 \begin_layout Standard
15503 These are the layout files for some of the journal formats used by Springer
15504  Verlag and listed on 
15505 \begin_inset Flex URL
15506 status collapsed
15507
15508 \begin_layout Plain Layout
15509
15510 http://www.springer.de/author/tex/help-journals.html
15511 \end_layout
15512
15513 \end_inset
15514
15515 , where you should also go to fetch the class files (yes, these are LaTeX2e
15516  now!).
15517  It is a modular system: the things common to all journals are implemented
15518  in 
15519 \family typewriter
15520 svjour.inc
15521 \family default
15522 , which journal-specific layout files (such as, e.
15523 \begin_inset space \thinspace{}
15524 \end_inset
15525
15526 g.
15527 \begin_inset space \space{}
15528 \end_inset
15529
15530
15531 \family typewriter
15532 svjog.layout
15533 \family default
15534  for Journal of Geodesy) can include.
15535 \end_layout
15536
15537 \begin_layout Standard
15538 This means that implementing support for any other Springer journal on this
15539  list is as simple as writing your own 
15540 \family typewriter
15541 sv
15542 \family default
15543 <myjournal>
15544 \family typewriter
15545 .layout
15546 \family default
15547  file following the outline given in 
15548 \family typewriter
15549 svjog.layout
15550 \family default
15551 .
15552  
15553 \end_layout
15554
15555 \begin_layout Standard
15556 It is reasonably well tested only for the Journal of Geodesy.
15557  
15558 \family typewriter
15559 svjour
15560 \family default
15561  and 
15562 \family typewriter
15563 svjog
15564 \family default
15565  come with the standard LyX distribution.
15566  Install the relevant class file (downloaded from Springer) in a proper
15567  directory, reconfigure LaTeX (in the teTeX case by running 
15568 \family typewriter
15569 texhash
15570 \family default
15571 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15572  and it should work.
15573 \end_layout
15574
15575 \begin_layout Subsection
15576 New styles
15577 \end_layout
15578
15579 \begin_layout Standard
15580 A large number of theorem-like styles — 
15581 \family sans
15582 Claim, Conjecture,
15583 \family default
15584  
15585 \family sans
15586 \SpecialChar \ldots{}
15587 Theorem
15588 \family default
15589 .
15590 \end_layout
15591
15592 \begin_layout Standard
15593
15594 \family sans
15595 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15596  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15597 \family default
15598 .
15599  See the Springer class file documentation for details.
15600 \end_layout
15601
15602 \begin_layout Subsection
15603 Supported journals
15604 \end_layout
15605
15606 \begin_layout Itemize
15607
15608 \emph on
15609 Journal of Geodesy
15610 \emph default
15611
15612 \family typewriter
15613 svjog.layout
15614 \family default
15615  — Martin Vermeer
15616 \end_layout
15617
15618 \begin_layout Itemize
15619
15620 \emph on
15621 Probability Theory and Related Fields
15622 \emph default
15623
15624 \family typewriter
15625 svprobth.layout
15626 \family default
15627  — Jean-Marc Lasgouttes
15628 \end_layout
15629
15630 \begin_layout Standard
15631 Add your own, it isn't so hard!
15632 \end_layout
15633
15634 \begin_layout Subsection
15635 Credits
15636 \end_layout
15637
15638 \begin_layout Standard
15639 These files are partly based on the older 
15640 \family typewriter
15641 ejour2.layout
15642 \family default
15643 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15644  file from Springer.
15645  All this, and the 
15646 \family typewriter
15647 ejour2
15648 \family default
15649  layout, are now defunct.
15650  Jean-Marc Lasgouttes helped out big in making me find my way around the
15651  LyX layout file mechanism.
15652 \end_layout
15653
15654 \begin_layout Subsection
15655 Bugs
15656 \end_layout
15657
15658 \begin_layout Standard
15659 Probably.
15660  But probably less than in the old hacked-LaTeX 
15661 \family typewriter
15662 ejour2
15663 \family default
15664 .
15665 \end_layout
15666
15667 \begin_layout Standard
15668 Limitations e.
15669 \begin_inset space \thinspace{}
15670 \end_inset
15671
15672 g.: does not display the number for theorem-like layouts, just #.
15673 \end_layout
15674
15675 \begin_layout Section
15676 Slides [aka 
15677 \noun on
15678 SliTeX
15679 \noun default
15680 ]
15681 \begin_inset CommandInset label
15682 LatexCommand label
15683 name "sec:slitex"
15684
15685 \end_inset
15686
15687
15688 \end_layout
15689
15690 \begin_layout Standard
15691 by 
15692 \noun on
15693 John Weiss
15694 \noun default
15695  
15696 \end_layout
15697
15698 \begin_layout Subsection
15699 Introduction
15700 \end_layout
15701
15702 \begin_layout Standard
15703 This section describes how to use LyX to make slides for overhead projectors.
15704  There are two document classes that can do this: the default slides class
15705  and the 
15706 \family sans
15707 FoilTeX
15708 \family default
15709  slides class.
15710  This section documents the former.
15711 \end_layout
15712
15713 \begin_layout Standard
15714 I'm going to say this again, nice and clear, so that there's no misunderstanding
15715 :
15716 \end_layout
15717
15718 \begin_layout Standard
15719 \begin_inset VSpace bigskip
15720 \end_inset
15721
15722
15723 \end_layout
15724
15725 \begin_layout Standard
15726 \align center
15727
15728 \size large
15729 This section documents the class 
15730 \begin_inset Quotes eld
15731 \end_inset
15732
15733
15734 \family sans
15735 slides (default)
15736 \family default
15737
15738 \begin_inset Quotes erd
15739 \end_inset
15740
15741  
15742 \emph on
15743 only.
15744 \end_layout
15745
15746 \begin_layout Standard
15747 \begin_inset VSpace bigskip
15748 \end_inset
15749
15750
15751 \end_layout
15752
15753 \begin_layout Standard
15754 If you're looking for the documentation for 
15755 \begin_inset Quotes eld
15756 \end_inset
15757
15758
15759 \family sans
15760 slides (FoilTeX)
15761 \family default
15762
15763 \begin_inset Quotes erd
15764 \end_inset
15765
15766 , check out section
15767 \begin_inset space ~
15768 \end_inset
15769
15770
15771 \begin_inset CommandInset ref
15772 LatexCommand ref
15773 reference "sec:foiltex"
15774
15775 \end_inset
15776
15777 .
15778  The 
15779 \family sans
15780 foils
15781 \family default
15782  class [
15783 \begin_inset Quotes eld
15784 \end_inset
15785
15786
15787 \family sans
15788 slides (FoilTeX)
15789 \family default
15790
15791 \begin_inset Quotes erd
15792 \end_inset
15793
15794 ] is actually somewhat better than the default 
15795 \family sans
15796 slides
15797 \family default
15798  class,
15799 \begin_inset Foot
15800 status collapsed
15801
15802 \begin_layout Plain Layout
15803 \SpecialChar \ldots{}
15804 or so I've been told repeatedly by its advocates.
15805  Having never used it, I have no idea if this claim is true or not.
15806 \end_layout
15807
15808 \end_inset
15809
15810  which this section documents.
15811 \end_layout
15812
15813 \begin_layout Standard
15814 This class is the LaTeX2e improvement of the old 
15815 \noun on
15816 SliTeX
15817 \noun default
15818  package.
15819  Every LaTeX2e distribution includes this class [which I'll just refer to
15820  as 
15821 \begin_inset Quotes eld
15822 \end_inset
15823
15824
15825 \family sans
15826 slides
15827 \family default
15828
15829 \begin_inset Quotes erd
15830 \end_inset
15831
15832  from now on], so you're bound to have it.
15833  As I noted earlier, there are other classes, such as 
15834 \family sans
15835 foils
15836 \family default
15837 , which also produce slides for overhead projectors and do a better job
15838  at it.
15839  However, there are some things which 
15840 \family sans
15841 slides
15842 \family default
15843  can do which the others can't, such as generate overlays.
15844  Read on to learn more!
15845 \end_layout
15846
15847 \begin_layout Subsection
15848 Getting Started
15849 \begin_inset CommandInset label
15850 LatexCommand label
15851 name "sec:slidesetup"
15852
15853 \end_inset
15854
15855
15856 \end_layout
15857
15858 \begin_layout Standard
15859 Obviously, to use this document class, you need to select 
15860 \begin_inset Quotes eld
15861 \end_inset
15862
15863
15864 \family sans
15865 slides (default)
15866 \family default
15867
15868 \begin_inset Quotes erd
15869 \end_inset
15870
15871  from the class list in the 
15872 \family sans
15873 Document\SpecialChar \menuseparator
15874 Settings
15875 \family default
15876  dialog.
15877  There are some other special things you should know about this class:
15878 \end_layout
15879
15880 \begin_layout Itemize
15881 Don't bother changing the options 
15882 \family sans
15883 Sides and Columns
15884 \family default
15885 .
15886  They're not supported by the 
15887 \family sans
15888 slides
15889 \family default
15890  class, anyways.
15891 \end_layout
15892
15893 \begin_layout Itemize
15894 The option 
15895 \family sans
15896 Page
15897 \begin_inset space ~
15898 \end_inset
15899
15900 style
15901 \family default
15902  behaves a bit differently for this class.
15903  The possible choices and what they do are as follows:
15904 \end_layout
15905
15906 \begin_deeper
15907 \begin_layout Description
15908
15909 \family sans
15910 plain
15911 \family default
15912  The final output contains page numbers in the lower right corner.
15913 \end_layout
15914
15915 \begin_layout Description
15916
15917 \family sans
15918 headings
15919 \family default
15920  Like 
15921 \family sans
15922 plain
15923 \family default
15924 , but also prints out any time markers you've put in.
15925  This is the default.
15926 \end_layout
15927
15928 \begin_layout Description
15929
15930 \family sans
15931 empty
15932 \family default
15933  The final output contains no page numbers, time markers, or alignment markers.
15934 \end_layout
15935
15936 \end_deeper
15937 \begin_layout Itemize
15938 The 
15939 \family sans
15940 slides
15941 \family default
15942  class has an extra option: 
15943 \family typewriter
15944 clock
15945 \family default
15946 .
15947  To use it, put 
15948 \begin_inset Quotes eld
15949 \end_inset
15950
15951
15952 \family typewriter
15953 clock
15954 \family default
15955
15956 \begin_inset Quotes erd
15957 \end_inset
15958
15959  in the extra class options.
15960 \end_layout
15961
15962 \begin_deeper
15963 \begin_layout Standard
15964 Using this options allows you to add time markers to 
15965 \family sans
15966 Note
15967 \family default
15968 s.
15969  See section
15970 \begin_inset space ~
15971 \end_inset
15972
15973
15974 \begin_inset CommandInset ref
15975 LatexCommand ref
15976 reference "sec:slideNote"
15977
15978 \end_inset
15979
15980  for more details.
15981 \end_layout
15982
15983 \end_deeper
15984 \begin_layout Standard
15985 You can also use the template file 
15986 \begin_inset Quotes eld
15987 \end_inset
15988
15989
15990 \family typewriter
15991 slides.lyx
15992 \family default
15993
15994 \begin_inset Quotes erd
15995 \end_inset
15996
15997  to automatically set up a document to use the 
15998 \family sans
15999 slides
16000 \family default
16001  class [using 
16002 \family sans
16003 File\SpecialChar \menuseparator
16004 New
16005 \begin_inset space ~
16006 \end_inset
16007
16008 from
16009 \begin_inset space ~
16010 \end_inset
16011
16012 Template
16013 \family default
16014  to open your new document].
16015  The template file also contains some examples of the special paragraph
16016  environments used by this class.
16017  I'll describe those next.
16018 \end_layout
16019
16020 \begin_layout Subsection
16021 Paragraph Environments
16022 \end_layout
16023
16024 \begin_layout Subsubsection
16025 Supported Environments
16026 \end_layout
16027
16028 \begin_layout Standard
16029 The first thing you'll notice when you start up a new 
16030 \family sans
16031 slides
16032 \family default
16033  document is the font size and type: it's the equivalent of the size 
16034 \begin_inset Quotes eld
16035 \end_inset
16036
16037
16038 \family sans
16039 Largest
16040 \family default
16041
16042 \begin_inset Quotes erd
16043 \end_inset
16044
16045  in the 
16046 \family sans
16047 Sans
16048 \begin_inset space ~
16049 \end_inset
16050
16051 Serif
16052 \family default
16053  font.
16054  This is also what's used in the output.
16055  Think of this as a 
16056 \begin_inset Quotes eld
16057 \end_inset
16058
16059 visual cue
16060 \begin_inset Quotes erd
16061 \end_inset
16062
16063  to remind you that this is a slide.
16064  Your final slides will use a larger font; ergo, you'll have less space.
16065  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16066 \end_layout
16067
16068 \begin_layout Standard
16069 The next thing that becomes obvious is the changes to the paragraph environment
16070  pull-down box [at the far-left end of the toolbar].
16071  Most of the paragraph environments you're used to seeing are missing.
16072  There are also five new ones.
16073  That's because the 
16074 \family sans
16075 slides
16076 \family default
16077  class itself only supports certain paragraph environments:
16078 \end_layout
16079
16080 \begin_layout Itemize
16081
16082 \family sans
16083 Standard
16084 \end_layout
16085
16086 \begin_layout Itemize
16087
16088 \family sans
16089 Itemize
16090 \end_layout
16091
16092 \begin_layout Itemize
16093
16094 \family sans
16095 Enumerate
16096 \end_layout
16097
16098 \begin_layout Itemize
16099
16100 \family sans
16101 Description
16102 \end_layout
16103
16104 \begin_layout Itemize
16105
16106 \family sans
16107 List
16108 \end_layout
16109
16110 \begin_layout Itemize
16111
16112 \family sans
16113 Quotation
16114 \end_layout
16115
16116 \begin_layout Itemize
16117
16118 \family sans
16119 Quote
16120 \end_layout
16121
16122 \begin_layout Itemize
16123
16124 \family sans
16125 Verse
16126 \end_layout
16127
16128 \begin_layout Itemize
16129
16130 \family sans
16131 Caption
16132 \end_layout
16133
16134 \begin_layout Itemize
16135
16136 \family sans
16137 LyX-Code
16138 \end_layout
16139
16140 \begin_layout Itemize
16141
16142 \family sans
16143 Comment
16144 \end_layout
16145
16146 \begin_layout Standard
16147 All of the other standard environments, including the section-heading environmen
16148 ts, aren't used in the 
16149 \family sans
16150 slides
16151 \family default
16152  class.
16153 \end_layout
16154
16155 \begin_layout Standard
16156 On the other hand, you'll notice the following new environments:
16157 \end_layout
16158
16159 \begin_layout Itemize
16160
16161 \family sans
16162 Slide
16163 \end_layout
16164
16165 \begin_layout Itemize
16166
16167 \family sans
16168 Overlay
16169 \end_layout
16170
16171 \begin_layout Itemize
16172
16173 \family sans
16174 Note
16175 \end_layout
16176
16177 \begin_layout Itemize
16178
16179 \family sans
16180 InvisibleText
16181 \end_layout
16182
16183 \begin_layout Itemize
16184
16185 \family sans
16186 VisibleText
16187 \end_layout
16188
16189 \begin_layout Standard
16190 These five are kind of quirky, due to a 
16191 \begin_inset Quotes eld
16192 \end_inset
16193
16194 feature
16195 \begin_inset Quotes erd
16196 \end_inset
16197
16198  in LyX.
16199  You see, LyX doesn't permit you to nest any other paragraph environment
16200  into an empty environment.
16201  Now, that's fine and dandy, but it means that you wouldn't be able to start
16202  a slide with anything except plain text.
16203  To deal with this, I've performed a little 
16204 \begin_inset Quotes eld
16205 \end_inset
16206
16207 LaTeX magic.
16208 \begin_inset Quotes erd
16209 \end_inset
16210
16211  
16212 \end_layout
16213
16214 \begin_layout Subsubsection
16215 Quirks of the New Environments
16216 \begin_inset CommandInset label
16217 LatexCommand label
16218 name "sec:slideQuirk"
16219
16220 \end_inset
16221
16222
16223 \end_layout
16224
16225 \begin_layout Standard
16226 All five of the new paragraph environments are somewhat quirky due to inherent
16227  limitiations in the current version of LyX.
16228  As I just mentioned, LyX forbids environments that begin with another environme
16229 nt.
16230  To get around this, the 
16231 \family sans
16232 Slide
16233 \family default
16234  environment isn't a paragraph environment as described in the 
16235 \emph on
16236 User's Guide
16237 \emph default
16238 .
16239  
16240 \end_layout
16241
16242 \begin_layout Standard
16243 You should consider 
16244 \family sans
16245 Slide
16246 \family default
16247
16248 \family sans
16249 Overlay
16250 \family default
16251 , and 
16252 \family sans
16253 Note
16254 \family default
16255  to be 
16256 \begin_inset Quotes eld
16257 \end_inset
16258
16259 pseudo-environments.
16260 \begin_inset Quotes erd
16261 \end_inset
16262
16263  They look like a section heading or a 
16264 \begin_inset Quotes eld
16265 \end_inset
16266
16267
16268 \family sans
16269 Caption
16270 \family default
16271 ,
16272 \begin_inset Quotes erd
16273 \end_inset
16274
16275  but really begin a [and, if necessary, end the previous] paragraph environment.
16276  Likewise, treat 
16277 \family sans
16278 InvisibleText
16279 \family default
16280  and 
16281 \family sans
16282 VisibleText
16283 \family default
16284  as 
16285 \begin_inset Quotes eld
16286 \end_inset
16287
16288 pseudo-commands.
16289 \begin_inset Quotes erd
16290 \end_inset
16291
16292  These two perform some action.
16293 \end_layout
16294
16295 \begin_layout Standard
16296 A common feature of all five environments, 
16297 \family sans
16298 Slide
16299 \family default
16300
16301 \family sans
16302 Overlay
16303 \family default
16304
16305 \family sans
16306 Note
16307 \family default
16308
16309 \family sans
16310 InvisibleText
16311 \family default
16312  and 
16313 \family sans
16314 VisibleText
16315 \family default
16316 , is a rather long-ish label.
16317  The text following this label — ordinarily the contents of the paragraph
16318  environment — is utterly irrelevant for 
16319 \family sans
16320 Slide
16321 \family default
16322
16323 \family sans
16324 Overlay
16325 \family default
16326
16327 \family sans
16328 Note
16329 \family default
16330
16331 \family sans
16332 InvisibleText
16333 \family default
16334  and 
16335 \family sans
16336 VisibleText
16337 \family default
16338 .
16339  LyX completely ignores it.
16340  In fact, you can leave these five environments completely empty.
16341  
16342 \end_layout
16343
16344 \begin_layout Standard
16345 While you don't 
16346 \emph on
16347 have
16348 \emph default
16349  to put any text after the rather long-ish label, you might want to.
16350  This could be a short description of the contents of the 
16351 \family sans
16352 Slide
16353 \family default
16354 , for example.
16355  In that case, enter your descriptive comment and hit 
16356 \family sans
16357 Return
16358 \family default
16359  as you normally would.
16360 \end_layout
16361
16362 \begin_layout Standard
16363 If, on the other hand, you don't want to enter any descriptive text, you'll
16364  hit another LyX quirk.
16365  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16366  environment until you put something in the old one.
16367  So, do this:
16368 \end_layout
16369
16370 \begin_layout Itemize
16371 Start entering the text that will 
16372 \emph on
16373 follow
16374 \emph default
16375  the new 
16376 \family sans
16377 Slide
16378 \family default
16379
16380 \family sans
16381 Overlay
16382 \family default
16383
16384 \family sans
16385 Note
16386 \family default
16387
16388 \family sans
16389 InvisibleText
16390 \family default
16391  or 
16392 \family sans
16393 VisibleText
16394 \family default
16395 .
16396  
16397 \end_layout
16398
16399 \begin_layout Itemize
16400 Now move to the beginning of that paragraph.
16401  
16402 \end_layout
16403
16404 \begin_layout Itemize
16405 Next, hit 
16406 \family sans
16407 Return
16408 \family default
16409 .
16410  
16411 \end_layout
16412
16413 \begin_layout Itemize
16414 Finally, change this new, empty paragraph to a 
16415 \family sans
16416 Slide
16417 \family default
16418
16419 \family sans
16420 Overlay
16421 \family default
16422
16423 \family sans
16424 Note
16425 \family default
16426
16427 \family sans
16428 InvisibleText
16429 \family default
16430  or 
16431 \family sans
16432 VisibleText
16433 \family default
16434 .
16435  
16436 \end_layout
16437
16438 \begin_layout Standard
16439 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16440
16441 \end_layout
16442
16443 \begin_layout Subsection
16444 Making a Presentation with 
16445 \family sans
16446 Slide
16447 \family default
16448
16449 \family sans
16450 Overlay
16451 \family default
16452  and 
16453 \family sans
16454 Note
16455 \end_layout
16456
16457 \begin_layout Subsubsection
16458 Using the 
16459 \family sans
16460 Slide
16461 \family default
16462  Environment
16463 \end_layout
16464
16465 \begin_layout Standard
16466 If you're expecting this section to teach you how to actually make a presentatio
16467 n, you'll be sorely disappointed.
16468  Naturally, I'll describe all of the ways the 
16469 \family sans
16470 slides
16471 \family default
16472  class can assist you in preparing the materials for a presentation.
16473  Filling in the contents, however, is up to you.
16474  [Then again, that 
16475 \emph on
16476 is
16477 \emph default
16478  the LyX philosophy.]
16479 \end_layout
16480
16481 \begin_layout Standard
16482 Choosing the 
16483 \family sans
16484 Slide
16485 \family default
16486  environment [in the manner described in section
16487 \begin_inset space ~
16488 \end_inset
16489
16490
16491 \begin_inset CommandInset ref
16492 LatexCommand ref
16493 reference "sec:slideQuirk"
16494
16495 \end_inset
16496
16497 ] tells LyX to begin a new slide [duh].
16498  The label for this environment/
16499 \begin_inset Quotes erd
16500 \end_inset
16501
16502 pseudo-command
16503 \begin_inset Quotes erd
16504 \end_inset
16505
16506  is an 
16507 \begin_inset Quotes eld
16508 \end_inset
16509
16510 ASCII line,
16511 \begin_inset Quotes erd
16512 \end_inset
16513
16514  in cool blue, followed by the label, 
16515 \begin_inset Quotes eld
16516 \end_inset
16517
16518 NewSlide:
16519 \begin_inset Quotes erd
16520 \end_inset
16521
16522 .
16523  Any text or paragraph environments that follow this one go on the new slide.
16524  It's that simple.
16525 \end_layout
16526
16527 \begin_layout Standard
16528 Slides are probably the only time you'll need to forcibly end pages in LyX
16529  (this can be specified in the 
16530 \family sans
16531 Paragraph Layout
16532 \family default
16533  dialog).
16534  In fact, you'll want to, once you finish entering the contents of one slide.
16535  If you've entered more text than can physically fit on a slide, the extra
16536  overflows onto a new slide.
16537  I don't recommend doing this, however, since the overflow slide won't have
16538  any page number on it.
16539  Furthermore, it may interfere with any 
16540 \family sans
16541 Overlay
16542 \family default
16543  you've made to accompany the oversized 
16544 \family sans
16545 Slide
16546 \family default
16547 .
16548 \end_layout
16549
16550 \begin_layout Standard
16551 The 
16552 \family sans
16553 Overlay
16554 \family default
16555  and 
16556 \family sans
16557 Note
16558 \family default
16559  environments work the same way as the 
16560 \family sans
16561 Slide
16562 \family default
16563  environment.
16564  They both create an 
16565 \begin_inset Quotes eld
16566 \end_inset
16567
16568 ASCII line
16569 \begin_inset Quotes erd
16570 \end_inset
16571
16572  followed by a label [
16573 \begin_inset Quotes eld
16574 \end_inset
16575
16576 NewOverlay:
16577 \begin_inset Quotes erd
16578 \end_inset
16579
16580  and 
16581 \begin_inset Quotes eld
16582 \end_inset
16583
16584 NewNote:
16585 \begin_inset Quotes erd
16586 \end_inset
16587
16588 , respectively].
16589  The color is a stunning magenta instead of blue, and the 
16590 \begin_inset Quotes eld
16591 \end_inset
16592
16593 ASCII line
16594 \begin_inset Quotes erd
16595 \end_inset
16596
16597  will look different, in style and in length.
16598  The label fonts of all three also differ from one another.
16599 \end_layout
16600
16601 \begin_layout Standard
16602 As with a 
16603 \family sans
16604 Slide
16605 \family default
16606 , if the contents of a 
16607 \family sans
16608 Note
16609 \family default
16610  or 
16611 \family sans
16612 Overlay
16613 \family default
16614  exceed the physical size of a slide or sheet of paper, the extra will overflow
16615  onto a new sheet.
16616  Again, you should avoid this.
16617  It defeats the whole purpose of 
16618 \family sans
16619 Note
16620 \family default
16621 s and 
16622 \family sans
16623 Overlay
16624 \family default
16625 s.
16626 \end_layout
16627
16628 \begin_layout Subsubsection
16629 Using 
16630 \family sans
16631 Overlay
16632 \family default
16633  with 
16634 \family sans
16635 Slide
16636 \end_layout
16637
16638 \begin_layout Standard
16639 The idea behind an 
16640 \family sans
16641 Overlay
16642 \family default
16643  is a slide that sits atop another slide.
16644  Perhaps you wish to discuss a figure on the main 
16645 \family sans
16646 Slide
16647 \family default
16648  before displaying the text associated with it.
16649  One way to accomplish this is tape a flap of dark paper over the part of
16650  the 
16651 \family sans
16652 Slide
16653 \family default
16654  you want to display later.
16655  This method fails, however, if you wish to overlap one graph with another,
16656  for example.
16657  You would then have to fumble while speaking to align the two separate,
16658  overlapping 
16659 \family sans
16660 Slide
16661 \family default
16662 s to align the two graphs.
16663  The use of an 
16664 \family sans
16665 Overlay
16666 \family default
16667  environment in both cases makes life much easier.
16668 \end_layout
16669
16670 \begin_layout Standard
16671 Each 
16672 \family sans
16673 Overlay
16674 \family default
16675  receives the page number of its 
16676 \begin_inset Quotes eld
16677 \end_inset
16678
16679 parent
16680 \begin_inset Quotes erd
16681 \end_inset
16682
16683  
16684 \family sans
16685 Slide
16686 \family default
16687 , appended by 
16688 \begin_inset Quotes eld
16689 \end_inset
16690
16691
16692 \family typewriter
16693 -a
16694 \family default
16695
16696 \begin_inset Quotes erd
16697 \end_inset
16698
16699 .
16700 \begin_inset Foot
16701 status collapsed
16702
16703 \begin_layout Plain Layout
16704 Presumably, mutliple 
16705 \family sans
16706 Overlay
16707 \family default
16708 s would have 
16709 \begin_inset Quotes eld
16710 \end_inset
16711
16712
16713 \family typewriter
16714 -a
16715 \family default
16716
16717 \begin_inset Quotes erd
16718 \end_inset
16719
16720
16721 \begin_inset Quotes eld
16722 \end_inset
16723
16724
16725 \family typewriter
16726 -b
16727 \family default
16728
16729 \begin_inset Quotes erd
16730 \end_inset
16731
16732
16733 \begin_inset Quotes eld
16734 \end_inset
16735
16736
16737 \family typewriter
16738 -c
16739 \family default
16740
16741 \begin_inset Quotes erd
16742 \end_inset
16743
16744 , etc.
16745 \begin_inset space ~
16746 \end_inset
16747
16748 appended to the page number of the parent 
16749 \family sans
16750 Slide
16751 \family default
16752 .
16753  
16754 \end_layout
16755
16756 \end_inset
16757
16758  Clearly, you want the contents of both the 
16759 \family sans
16760 Slide
16761 \family default
16762  and the 
16763 \family sans
16764 Overlay
16765 \family default
16766  to each fit on a single physical slide! You should probably consider an
16767  
16768 \family sans
16769 Overlay
16770 \family default
16771  as 
16772 \begin_inset Quotes eld
16773 \end_inset
16774
16775 part of
16776 \begin_inset Quotes erd
16777 \end_inset
16778
16779  a 
16780 \family sans
16781 Slide
16782 \family default
16783 .
16784  Indeed, the LyX 
16785 \family sans
16786 slides
16787 \family default
16788  class provides a visual cue for this: the label at the start of an 
16789 \family sans
16790 Overlay
16791 \family default
16792  is shorter than that at the start of a 
16793 \family sans
16794 Slide
16795 \family default
16796 .
16797  Lastly, when you generate printable output, you'll find alignment markers
16798  in all four corners of both the 
16799 \family sans
16800 Overlay
16801 \family default
16802  page and its parent 
16803 \family sans
16804 Slide
16805 \family default
16806 .
16807  These will assist you in lining up the two physical slides.
16808 \end_layout
16809
16810 \begin_layout Standard
16811 The major problem in overlaying two slides is aligning the contents of the
16812  two transparencies.
16813  How much space should you leave for that graph on the second slide? Worse
16814  still, what if you want a graph and a sentence on second slide, but there
16815  is text on the main transparency that goes in between them? You could try
16816  and insert vertical space of the right size.
16817  The better way is to use 
16818 \family sans
16819 InvisibleText
16820 \family default
16821  and 
16822 \family sans
16823 VisibleText
16824 \family default
16825 .
16826 \end_layout
16827
16828 \begin_layout Standard
16829 As their names imply, 
16830 \family sans
16831 InvisibleText
16832 \family default
16833  and 
16834 \family sans
16835 VisibleText
16836 \family default
16837  are two command-like paragraph environments that make all subsequent text
16838  invisible and visible, respectively.
16839  Note from section
16840 \begin_inset space ~
16841 \end_inset
16842
16843
16844 \begin_inset CommandInset ref
16845 LatexCommand ref
16846 reference "sec:slideQuirk"
16847
16848 \end_inset
16849
16850  that you don't place anything 
16851 \emph on
16852 into
16853 \emph default
16854  these two environments, however.
16855  When you create an 
16856 \family sans
16857 InvisibleText
16858 \family default
16859 , it inserts a centered, sky-blue label into the page reading 
16860 \begin_inset Quotes eld
16861 \end_inset
16862
16863 <Invisible Text Follows>
16864 \begin_inset Quotes erd
16865 \end_inset
16866
16867 .
16868  For paragraphs following this label, the parts of the 
16869 \family sans
16870 Slide
16871 \family default
16872  [or 
16873 \family sans
16874 Overlay
16875 \family default
16876 ; it doesn't matter which] where they would be contain instead blank space.
16877  
16878 \end_layout
16879
16880 \begin_layout Standard
16881 For 
16882 \family sans
16883 VisibleText
16884 \family default
16885 , the corresponding centered label is 
16886 \begin_inset Quotes eld
16887 \end_inset
16888
16889 <Visible Text Follows>
16890 \begin_inset Quotes erd
16891 \end_inset
16892
16893  in blazing green.
16894  Paragraphs following this label behave normally.
16895  Note that the beginning of a new 
16896 \family sans
16897 Slide
16898 \family default
16899
16900 \family sans
16901 Overlay
16902 \family default
16903 , or 
16904 \family sans
16905 Note
16906 \family default
16907  automatically shuts off an 
16908 \family sans
16909 InvisibleText
16910 \family default
16911 .
16912  It's therefore not necessary to use 
16913 \family sans
16914 VisibleText
16915 \family default
16916  at the end of a 
16917 \family sans
16918 Slide
16919 \family default
16920 .
16921 \end_layout
16922
16923 \begin_layout Standard
16924 By now, it should be obvious how to create overlay transparencies using
16925  the proper combination of 
16926 \family sans
16927 InvisibleText
16928 \family default
16929  and 
16930 \family sans
16931 VisibleText
16932 \family default
16933  on a 
16934 \family sans
16935 Slide
16936 \family default
16937  and 
16938 \family sans
16939 Overlay
16940 \family default
16941 :
16942 \end_layout
16943
16944 \begin_layout Enumerate
16945 Create a 
16946 \family sans
16947 Slide
16948 \family default
16949 , including everything that will appear on it, whether on the main slide
16950  or on the 
16951 \family sans
16952 Overlay
16953 \family default
16954 .
16955 \end_layout
16956
16957 \begin_layout Enumerate
16958 Before each figure or paragraph that will appear only on the 
16959 \family sans
16960 Overlay
16961 \family default
16962 , insert an 
16963 \family sans
16964 InvisibleText
16965 \family default
16966  environment.
16967  If necessary, insert a 
16968 \family sans
16969 VisibleText
16970 \family default
16971  environment after the 
16972 \family sans
16973 Overlay
16974 \family default
16975 -only text.
16976 \end_layout
16977
16978 \begin_layout Enumerate
16979 Start an 
16980 \family sans
16981 Overlay
16982 \family default
16983  immediately following the 
16984 \family sans
16985 Slide
16986 \family default
16987 .
16988 \end_layout
16989
16990 \begin_layout Enumerate
16991 Copy the contents of this 
16992 \family sans
16993 Slide
16994 \family default
16995  into the 
16996 \family sans
16997 Overlay
16998 \family default
16999 .
17000 \end_layout
17001
17002 \begin_layout Enumerate
17003 Within the 
17004 \family sans
17005 Overlay
17006 \family default
17007 , change all of the 
17008 \family sans
17009 InvisibleText
17010 \family default
17011  lines to 
17012 \family sans
17013 VisibleText
17014 \family default
17015  and vice-versa.
17016 \end_layout
17017
17018 \begin_layout Standard
17019 That's it.
17020  You've just made an 
17021 \family sans
17022 Overlay
17023 \family default
17024 .
17025 \end_layout
17026
17027 \begin_layout Standard
17028 There's one problem with the way I've designed the LyX 
17029 \family sans
17030 slides
17031 \family default
17032  class: you can't make text in the middle of a paragraph invisible, nor
17033  make text in the middle of an invisible paragraph visible again.
17034  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17035 \begin_inset Foot
17036 status collapsed
17037
17038 \begin_layout Plain Layout
17039 The commands of interest are: 
17040 \end_layout
17041
17042 \begin_layout Itemize
17043
17044 \family typewriter
17045 {
17046 \backslash
17047 invisible \SpecialChar \ldots{}
17048  }
17049 \end_layout
17050
17051 \begin_layout Itemize
17052
17053 \family typewriter
17054 {
17055 \backslash
17056 visible \SpecialChar \ldots{}
17057  }
17058 \end_layout
17059
17060 \begin_layout Plain Layout
17061 \SpecialChar \ldots{}
17062 and need to be marked as TeX.
17063  The text whose 
17064 \begin_inset Quotes eld
17065 \end_inset
17066
17067 visibility
17068 \begin_inset Quotes erd
17069 \end_inset
17070
17071  you wish to change goes in between the brackets [and after the 
17072 \family typewriter
17073
17074 \backslash
17075 invisible
17076 \family default
17077  or 
17078 \family typewriter
17079
17080 \backslash
17081 visible
17082 \family default
17083  command].
17084  If you don't know how to mark text as TeX, see the appropriate section
17085  of the 
17086 \emph on
17087 User's Guide
17088 \emph default
17089 .
17090 \end_layout
17091
17092 \end_inset
17093
17094
17095 \end_layout
17096
17097 \begin_layout Subsubsection
17098 Using 
17099 \family sans
17100 Note
17101 \family default
17102  with 
17103 \family sans
17104 Slide
17105 \family default
17106
17107 \begin_inset CommandInset label
17108 LatexCommand label
17109 name "sec:slideNote"
17110
17111 \end_inset
17112
17113
17114 \end_layout
17115
17116 \begin_layout Standard
17117 Like an 
17118 \family sans
17119 Overlay
17120 \family default
17121 , a 
17122 \family sans
17123 Note
17124 \family default
17125  is associated with a 
17126 \begin_inset Quotes eld
17127 \end_inset
17128
17129 parent
17130 \begin_inset Quotes erd
17131 \end_inset
17132
17133  
17134 \family sans
17135 Slide
17136 \family default
17137 .
17138  Here, too, the LyX 
17139 \family sans
17140 slides
17141 \family default
17142  class provides visual cues.
17143  The label for a 
17144 \family sans
17145 Note
17146 \family default
17147  is shorter than that of a 
17148 \family sans
17149 Slide
17150 \family default
17151  [yet longer than that of an 
17152 \family sans
17153 Overlay
17154 \family default
17155 ] and, like the label of an 
17156 \family sans
17157 Overlay
17158 \family default
17159  is shockingly magenta.
17160  Additionally, the printed 
17161 \family sans
17162 Note
17163 \family default
17164  has the page number of its 
17165 \begin_inset Quotes eld
17166 \end_inset
17167
17168 parent
17169 \begin_inset Quotes erd
17170 \end_inset
17171
17172  
17173 \family sans
17174 Slide
17175 \family default
17176 , appended by 
17177 \begin_inset Quotes eld
17178 \end_inset
17179
17180
17181 \family typewriter
17182 -
17183 \family default
17184 1
17185 \begin_inset Quotes erd
17186 \end_inset
17187
17188
17189 \begin_inset Quotes eld
17190 \end_inset
17191
17192
17193 \family typewriter
17194 -
17195 \family default
17196 2
17197 \begin_inset Quotes erd
17198 \end_inset
17199
17200
17201 \begin_inset Quotes eld
17202 \end_inset
17203
17204
17205 \family typewriter
17206 -
17207 \family default
17208 3
17209 \begin_inset Quotes erd
17210 \end_inset
17211
17212 , etc.
17213  You can have multiple 
17214 \family sans
17215 Note
17216 \family default
17217 s associated with a single 
17218 \family sans
17219 Slide
17220 \family default
17221 , and, as with 
17222 \family sans
17223 Slide
17224 \family default
17225  and 
17226 \family sans
17227 Overlay
17228 \family default
17229 , you'll probably want to break up long 
17230 \family sans
17231 Note
17232 \family default
17233 s so that they fit on a single sheet of paper.
17234 \end_layout
17235
17236 \begin_layout Standard
17237 The purpose of a 
17238 \family sans
17239 Note
17240 \family default
17241  is obvious: it contains anything additional you might want to say about
17242  a 
17243 \family sans
17244 Slide
17245 \family default
17246 .
17247  It could also be used as a sheet of reminders for a particular 
17248 \family sans
17249 Slide
17250 \family default
17251 .
17252  In the case of the latter, you might want to make use of time markers.
17253  Currently, the LyX 
17254 \family sans
17255 slides
17256 \family default
17257  class has no 
17258 \begin_inset Quotes eld
17259 \end_inset
17260
17261 native
17262 \begin_inset Quotes erd
17263 \end_inset
17264
17265  support for time markers, a 
17266 \noun on
17267 SliTeX
17268 \noun default
17269  feature.
17270  So, you'll have to resort to using the LaTeX codes.
17271 \end_layout
17272
17273 \begin_layout Standard
17274 To use time markers, you'll need to specify the extra class option 
17275 \begin_inset Quotes eld
17276 \end_inset
17277
17278
17279 \family typewriter
17280 clock
17281 \family default
17282
17283 \begin_inset Quotes erd
17284 \end_inset
17285
17286  [see section
17287 \begin_inset space ~
17288 \end_inset
17289
17290
17291 \begin_inset CommandInset ref
17292 LatexCommand ref
17293 reference "sec:slidesetup"
17294
17295 \end_inset
17296
17297 ].
17298  This option turns on timing marks, which will appear in the lower-left-hand
17299  corner of every 
17300 \family sans
17301 Note
17302 \family default
17303  you generate.
17304  To set what appears in the time marker, you use the LaTeX commands 
17305 \begin_inset Quotes eld
17306 \end_inset
17307
17308
17309 \family typewriter
17310
17311 \backslash
17312 settime{}
17313 \family default
17314
17315 \begin_inset Quotes erd
17316 \end_inset
17317
17318  and 
17319 \begin_inset Quotes eld
17320 \end_inset
17321
17322
17323 \family typewriter
17324
17325 \backslash
17326 addtime{}
17327 \family default
17328
17329 \begin_inset Quotes erd
17330 \end_inset
17331
17332 .
17333  The arguments of both commands are time measured in seconds.
17334  
17335 \begin_inset Quotes eld
17336 \end_inset
17337
17338
17339 \family typewriter
17340
17341 \backslash
17342 settime{}
17343 \family default
17344
17345 \begin_inset Quotes erd
17346 \end_inset
17347
17348  sets the time marker to a given time.
17349  
17350 \begin_inset Quotes eld
17351 \end_inset
17352
17353
17354 \family typewriter
17355
17356 \backslash
17357 addtime{}
17358 \family default
17359
17360 \begin_inset Quotes erd
17361 \end_inset
17362
17363  increments the time marker by the specified amount.
17364  Using time markers and 
17365 \family sans
17366 Note
17367 \family default
17368 s in this fashion, you can remind yourself how much time to spend on a particula
17369
17370 \family sans
17371 Slide
17372 \family default
17373 .
17374 \end_layout
17375
17376 \begin_layout Standard
17377 There's one last feature to describe.
17378  Clearly, you'd like to print out all of your 
17379 \family sans
17380 Slide
17381 \family default
17382 s and 
17383 \family sans
17384 Overlay
17385 \family default
17386 s on transparencies while printing all of your 
17387 \family sans
17388 Note
17389 \family default
17390 s on plain paper.
17391  However, a 
17392 \family sans
17393 Note
17394 \family default
17395  
17396 \emph on
17397 must
17398 \emph default
17399  follow the 
17400 \family sans
17401 Slide
17402 \family default
17403  with which it is associated.
17404  What's a person to do?
17405 \end_layout
17406
17407 \begin_layout Standard
17408 Luckily, there are two LaTeX commands that allow you to select what to print
17409  out.
17410  Both must be placed into the preamble of your document.
17411  The command 
17412 \begin_inset Quotes eld
17413 \end_inset
17414
17415
17416 \family typewriter
17417
17418 \backslash
17419 onlyslides{
17420 \backslash
17421 slides}
17422 \family default
17423
17424 \begin_inset Quotes erd
17425 \end_inset
17426
17427  will cause the output to contain only the 
17428 \family sans
17429 Slide
17430 \family default
17431 s and 
17432 \family sans
17433 Overlay
17434 \family default
17435 s.
17436  Correspondingly, the command 
17437 \begin_inset Quotes eld
17438 \end_inset
17439
17440
17441 \family typewriter
17442
17443 \backslash
17444 onlynotes{
17445 \backslash
17446 notes}
17447 \family default
17448
17449 \begin_inset Quotes erd
17450 \end_inset
17451
17452  prevents the output of anything but 
17453 \family sans
17454 Note
17455 \family default
17456 s.
17457  I'd advise placing both commands in the preamble and initially comment
17458  both out.
17459  You can then preview your entire presentation as you write.
17460  When you're done writing, you can then uncomment one of the two to select
17461  what you want to print.
17462  I like to uncomment 
17463 \begin_inset Quotes eld
17464 \end_inset
17465
17466
17467 \family typewriter
17468
17469 \backslash
17470 onlyslides{
17471 \backslash
17472 slides}
17473 \family default
17474
17475 \begin_inset Quotes erd
17476 \end_inset
17477
17478  , print to a file with 
17479 \begin_inset Quotes eld
17480 \end_inset
17481
17482
17483 \family typewriter
17484 -slides
17485 \family default
17486
17487 \begin_inset Quotes erd
17488 \end_inset
17489
17490  in its name, comment it back out, then uncomment 
17491 \begin_inset Quotes eld
17492 \end_inset
17493
17494
17495 \family typewriter
17496
17497 \backslash
17498 onlynotes{
17499 \backslash
17500 notes}
17501 \family default
17502
17503 \begin_inset Quotes erd
17504 \end_inset
17505
17506  and print to a 
17507 \begin_inset Quotes eld
17508 \end_inset
17509
17510
17511 \family typewriter
17512 *-notes.ps
17513 \family default
17514
17515 \begin_inset Quotes erd
17516 \end_inset
17517
17518  file.
17519  I can then send either file to a printer, loading transparencies or plain
17520  paper as appropriate.
17521 \end_layout
17522
17523 \begin_layout Standard
17524 You can also provide other arguments to the 
17525 \begin_inset Quotes eld
17526 \end_inset
17527
17528
17529 \family typewriter
17530
17531 \backslash
17532 onlyslides{}
17533 \family default
17534
17535 \begin_inset Quotes erd
17536 \end_inset
17537
17538  and 
17539 \begin_inset Quotes eld
17540 \end_inset
17541
17542
17543 \family typewriter
17544
17545 \backslash
17546 onlynotes{}
17547 \family default
17548
17549 \begin_inset Quotes erd
17550 \end_inset
17551
17552  commands.
17553  See a good LaTeX book for details.
17554 \end_layout
17555
17556 \begin_layout Subsection
17557 The 
17558 \family sans
17559 slides
17560 \family default
17561  Class Template File
17562 \end_layout
17563
17564 \begin_layout Standard
17565 I have also provided a template file, 
17566 \begin_inset Quotes eld
17567 \end_inset
17568
17569
17570 \family typewriter
17571 slides.lyx
17572 \family default
17573
17574 \begin_inset Quotes erd
17575 \end_inset
17576
17577 , with the 
17578 \family sans
17579 slides
17580 \family default
17581  class.
17582  To use it, begin your new presentation with 
17583 \family sans
17584 \bar under
17585 F
17586 \bar default
17587 ile\SpecialChar \menuseparator
17588 New
17589 \begin_inset space ~
17590 \end_inset
17591
17592 from
17593 \begin_inset space ~
17594 \end_inset
17595
17596
17597 \bar under
17598 T
17599 \bar default
17600 emplate
17601 \family default
17602 .
17603  Your new LyX presentation file will contain an example 
17604 \family sans
17605 Slide
17606 \family default
17607  – 
17608 \family sans
17609 Overlay
17610 \family default
17611  – 
17612 \family sans
17613 Note
17614 \family default
17615  triplet.
17616  The 
17617 \family sans
17618 Slide
17619 \family default
17620  and 
17621 \family sans
17622 Overlay
17623 \family default
17624  additionally contain an example of the use of 
17625 \family sans
17626 InvisibleText
17627 \family default
17628  and 
17629 \family sans
17630 VisibleText
17631 \family default
17632 .
17633  Lastly, the preamble will contain:
17634 \end_layout
17635
17636 \begin_layout LyX-Code
17637 % Uncomment to print out only slides and overlays
17638 \end_layout
17639
17640 \begin_layout LyX-Code
17641 %
17642 \end_layout
17643
17644 \begin_layout LyX-Code
17645 %
17646 \backslash
17647 onlyslides{
17648 \backslash
17649 slides}
17650 \begin_inset Newline newline
17651 \end_inset
17652
17653  
17654 \end_layout
17655
17656 \begin_layout LyX-Code
17657 % Uncomment to print out only notes
17658 \end_layout
17659
17660 \begin_layout LyX-Code
17661 %
17662 \end_layout
17663
17664 \begin_layout LyX-Code
17665 %
17666 \backslash
17667 onlynotes{
17668 \backslash
17669 notes}
17670 \end_layout
17671
17672 \begin_layout Standard
17673 One final thing: I created this class to support the LaTeX2e 
17674 \begin_inset Quotes eld
17675 \end_inset
17676
17677
17678 \noun on
17679 SliTeX
17680 \noun default
17681  emulation
17682 \begin_inset Quotes erd
17683 \end_inset
17684
17685  class, one of the built-in LaTeX2e classes.
17686  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17687  built-in slide class.
17688  It's here if you want it or need it.
17689  There exist other LaTeX2e classes for creating presentations, such as the
17690  
17691 \family sans
17692 Foils
17693 \family default
17694  class [see section
17695 \begin_inset space ~
17696 \end_inset
17697
17698
17699 \begin_inset CommandInset ref
17700 LatexCommand ref
17701 reference "sec:foiltex"
17702
17703 \end_inset
17704
17705 ] or the 
17706 \begin_inset Quotes eld
17707 \end_inset
17708
17709
17710 \family typewriter
17711 seminar
17712 \family default
17713
17714 \begin_inset Quotes erd
17715 \end_inset
17716
17717  package [present on some TeX distributions].
17718  The latter is not yet supported under LyX.
17719 \begin_inset Foot
17720 status collapsed
17721
17722 \begin_layout Plain Layout
17723 Perhaps you can take on the task\SpecialChar \ldots{}
17724
17725 \end_layout
17726
17727 \end_inset
17728
17729  I know nothing about these other classes.
17730  Try them out to see what sort of alternative they provide.
17731 \end_layout
17732
17733 \begin_layout Chapter
17734 LyX Features needing Extra Software
17735 \end_layout
17736
17737 \begin_layout Section
17738 Checking TeX
17739 \end_layout
17740
17741 \begin_layout Standard
17742 by 
17743 \noun on
17744 Asger Alstrup
17745 \end_layout
17746
17747 \begin_layout Subsection
17748 Introduction
17749 \end_layout
17750
17751 \begin_layout Standard
17752 If you have the 
17753 \family typewriter
17754 chktex
17755 \family default
17756  program installed
17757 \begin_inset Foot
17758 status collapsed
17759
17760 \begin_layout Plain Layout
17761
17762 \family typewriter
17763 chktex
17764 \family default
17765  is not yet available when you are using the LaTeX distribution MiKTeX.
17766 \end_layout
17767
17768 \end_inset
17769
17770 , you'll find in the 
17771 \family sans
17772 Tools
17773 \family default
17774  menu the entry: 
17775 \family sans
17776 Check
17777 \begin_inset space ~
17778 \end_inset
17779
17780 TeX
17781 \family default
17782 .
17783  You can get 
17784 \family typewriter
17785 chktex
17786 \family default
17787  it from CTAN, 
17788 \begin_inset CommandInset href
17789 LatexCommand href
17790 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17791
17792 \end_inset
17793
17794 .
17795 \end_layout
17796
17797 \begin_layout Standard
17798 The 
17799 \family sans
17800 ChkTeX
17801 \family default
17802  package is a program that was written by 
17803 \begin_inset Flex Noun
17804 status collapsed
17805
17806 \begin_layout Plain Layout
17807 Jens T.
17808 \begin_inset space ~
17809 \end_inset
17810
17811 Berger Thielemann
17812 \end_layout
17813
17814 \end_inset
17815
17816  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17817  and easy to forget.
17818  The program runs over your LaTeX file, checks the integrity of the file,
17819  and flags some common errors.
17820  In other technical words, it is 
17821 \family typewriter
17822 lint
17823 \family default
17824  for LaTeX.
17825 \end_layout
17826
17827 \begin_layout Standard
17828 Well, what is a syntax checker doing in LyX which is supposed to produce
17829  correct LaTeX anyways? The answer is simple: Just as 
17830 \family typewriter
17831 Lint
17832 \family default
17833  not only checks the 
17834 \emph on
17835 syntax
17836 \emph default
17837  of C programs, but also does 
17838 \emph on
17839 semantic
17840 \emph default
17841  checks for type-errors, 
17842 \family sans
17843 ChkTeX
17844 \family default
17845  catches some common 
17846 \emph on
17847 typographic
17848 \emph default
17849  errors, in addition to the syntactical ones.
17850  Specifically, 
17851 \family sans
17852 ChkTeX
17853 \family default
17854  is capable of detecting several common errors, such as
17855 \end_layout
17856
17857 \begin_layout Itemize
17858 Ellipsis detection:
17859 \begin_inset Newline newline
17860 \end_inset
17861
17862 Use \SpecialChar \ldots{}
17863  instead of ...
17864 \end_layout
17865
17866 \begin_layout Itemize
17867 No space in front of/after parenthesis:
17868 \begin_inset Newline newline
17869 \end_inset
17870
17871 ( wrong spacing )
17872 \end_layout
17873
17874 \begin_layout Itemize
17875 Enforcement of normal space after common abbreviations:
17876 \begin_inset Newline newline
17877 \end_inset
17878
17879 e.
17880 \begin_inset space \thinspace{}
17881 \end_inset
17882
17883 g.
17884 \begin_inset space \space{}
17885 \end_inset
17886
17887 is too wide spacing.
17888 \end_layout
17889
17890 \begin_layout Itemize
17891 Enforcement of end-of-sentence space when the last sentence ends with a
17892  capital letter:
17893 \begin_inset Newline newline
17894 \end_inset
17895
17896 This is a TEST.
17897  And this is wrong spacing.
17898 \end_layout
17899
17900 \begin_layout Itemize
17901 Space in front of labels and similar commands:
17902 \begin_inset Newline newline
17903 \end_inset
17904
17905 The label should stick right up to the text to avoid falling to a wrong
17906  page.
17907  
17908 \begin_inset CommandInset label
17909 LatexCommand label
17910 name "sec:chktex"
17911
17912 \end_inset
17913
17914  
17915 \begin_inset Foot
17916 status collapsed
17917
17918 \begin_layout Plain Layout
17919 This footnote is in danger of falling off to a wrong page
17920 \end_layout
17921
17922 \end_inset
17923
17924  The label is separated too much.
17925 \end_layout
17926
17927 \begin_layout Itemize
17928 Space in front of references, instead of hard spaces:
17929 \begin_inset Newline newline
17930 \end_inset
17931
17932 In you are in bad luck, the text will break right between the referenced
17933  text and reference number, and that's a pity.
17934  See section 
17935 \begin_inset CommandInset ref
17936 LatexCommand ref
17937 reference "sec:chktex"
17938
17939 \end_inset
17940
17941 .
17942 \end_layout
17943
17944 \begin_layout Itemize
17945 Use of 
17946 \begin_inset Quotes eld
17947 \end_inset
17948
17949 x
17950 \begin_inset Quotes erd
17951 \end_inset
17952
17953  instead of 
17954 \begin_inset Formula $\times$
17955 \end_inset
17956
17957  between numbers:
17958 \begin_inset Newline newline
17959 \end_inset
17960
17961 2x2 looks cheap compared to 
17962 \begin_inset Formula $2\times2$
17963 \end_inset
17964
17965 .
17966 \end_layout
17967
17968 \begin_layout Standard
17969 and more \SpecialChar \ldots{}
17970  It is an invaluable tool when you are 
17971 \begin_inset Quotes eld
17972 \end_inset
17973
17974 finishing up
17975 \begin_inset Quotes erd
17976 \end_inset
17977
17978  your document before printing, and you should run it right after the obligatory
17979  spelling check, and before you go fine tuning the typesetting.
17980 \end_layout
17981
17982 \begin_layout Subsection
17983 How to use it
17984 \end_layout
17985
17986 \begin_layout Standard
17987 If you have the program installed, usage is as simple as choosing 
17988 \family sans
17989 Tools\SpecialChar \menuseparator
17990 Check
17991 \begin_inset space ~
17992 \end_inset
17993
17994 TeX
17995 \family default
17996 .
17997  This will make LyX generate a LaTeX file of your document, start 
17998 \family sans
17999 ChkTeX
18000 \family default
18001  to check it, and then make LyX insert 
18002 \begin_inset Quotes eld
18003 \end_inset
18004
18005 error boxes
18006 \begin_inset Quotes erd
18007 \end_inset
18008
18009  with the warnings from 
18010 \family sans
18011 ChkTeX
18012 \family default
18013 , if there were any.
18014  The warnings will be placed close to the point of the mistake, and you
18015  can quickly find them by using the 
18016 \family sans
18017 Navigate\SpecialChar \menuseparator
18018 Error
18019 \family default
18020  menu item, or the shortcut key 
18021 \family sans
18022 C-g
18023 \family default
18024  from the default 
18025 \family typewriter
18026 cua
18027 \family default
18028  bind file.
18029  Open the error boxes by clicking on them with the mouse, or use the shortcut
18030  key 
18031 \family sans
18032 C-i
18033 \family default
18034  from 
18035 \family typewriter
18036 cua
18037 \family default
18038  bindings, or the corresponding 
18039 \family sans
18040 C-o
18041 \family default
18042  for the alternate 
18043 \family typewriter
18044 emacs
18045 \family default
18046  bind file.
18047  Read the warning and correct the mistake, if it is a mistake.
18048  If you have trouble understanding what the warning is about, you can safely
18049  ignore it.
18050  Remember that there is a hidden layer between the document on screen and
18051  the technical details in invoking 
18052 \family sans
18053 ChkTeX
18054 \family default
18055 , and this gap can make some warnings seem arcane or just right down plain
18056  silly.
18057 \end_layout
18058
18059 \begin_layout Standard
18060 This document is an excellent testing bed for the feature, and it should
18061  provide quite a few warnings for you to fiddle with.
18062  Since computers are only so smart, expect most of the warnings to be false
18063  alarms, though.
18064 \end_layout
18065
18066 \begin_layout Subsection
18067 How to fine tune it
18068 \end_layout
18069
18070 \begin_layout Standard
18071 Sometimes, you'll find that 
18072 \family sans
18073 ChkTeX
18074 \family default
18075  makes more noise than suits your mood.
18076  Then you can choose not to use it, wait until your mood changes, or try
18077  to customize 
18078 \family sans
18079 ChkTeX
18080 \family default
18081  to get better along with you.
18082 \end_layout
18083
18084 \begin_layout Standard
18085 Although 
18086 \family sans
18087 ChkTeX
18088 \family default
18089  
18090 \emph on
18091 is
18092 \emph default
18093  very configurable and extensible, you shouldn't expect to solve all problems
18094  with 
18095 \family sans
18096 ChkTeX
18097 \family default
18098  in LyX this way.
18099  Since LyX has to generate a somewhat special LaTeX file to be able to match
18100  the line numbers from the 
18101 \family sans
18102 ChkTeX
18103 \family default
18104  output
18105 \begin_inset Foot
18106 status collapsed
18107
18108 \begin_layout Plain Layout
18109 You can inspect the specific output from 
18110 \family sans
18111 chktex
18112 \family default
18113  by using 
18114 \family sans
18115 Edit\SpecialChar \menuseparator
18116 View
18117 \begin_inset space ~
18118 \end_inset
18119
18120 LaTeX
18121 \begin_inset space ~
18122 \end_inset
18123
18124 Log
18125 \family default
18126  right after a 
18127 \family sans
18128 chktex
18129 \family default
18130  run.
18131 \end_layout
18132
18133 \end_inset
18134
18135  to the internal document structure, some of the warnings will not seen
18136  to appear correctly.
18137  There are two things you can do about this:
18138 \end_layout
18139
18140 \begin_layout Itemize
18141 Fine tune the 
18142 \family sans
18143 ChkTeX
18144 \family default
18145  invocation command line in 
18146 \family sans
18147 Preferences
18148 \family default
18149  (tabs 
18150 \family sans
18151 Outputs
18152 \family default
18153
18154 \family sans
18155 Misc
18156 \family default
18157 ), or the global 
18158 \family sans
18159 ChkTeX
18160 \family default
18161  installation configuration file (usually with the file 
18162 \family typewriter
18163 chktexrc
18164 \family default
18165 ).
18166  See below to learn what warnings can be enabled and disabled on the command
18167  line.
18168  
18169 \end_layout
18170
18171 \begin_layout Itemize
18172 Export your document as a raw LaTeX file using 
18173 \family sans
18174 File\SpecialChar \menuseparator
18175 Export\SpecialChar \menuseparator
18176 LaTeX
18177 \family default
18178  and run 
18179 \family typewriter
18180 chktex
18181 \family default
18182  manually on that.
18183  Invoked in this way, it can be a hassle to find the corresponding place
18184  in the document inside LyX, but with a little patience, you should be able
18185  to do it.
18186 \end_layout
18187
18188 \begin_layout Standard
18189 Here follows the warning messages that can be enabled and disabled in 
18190 \family sans
18191 Preferences
18192 \family default
18193 .
18194  Use 
18195 \family typewriter
18196 -n#
18197 \family default
18198  to disable a warning, and 
18199 \family typewriter
18200 -w#
18201 \family default
18202  to enable a warning.
18203  The emphasized entries are disabled by default, because the default is
18204  "
18205 \family typewriter
18206 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18207 \family default
18208 ".
18209 \end_layout
18210
18211 \begin_layout Standard
18212 Notice that you should only use the options that enable and disable warnings,
18213  because LyX relies on some of the other command line parameters to be set
18214  in a specific way to have a chance to communicate with 
18215 \family typewriter
18216 chktex
18217 \family default
18218 .
18219 \end_layout
18220
18221 \begin_layout Enumerate
18222
18223 \size small
18224 \emph on
18225 Command terminated with space.
18226 \end_layout
18227
18228 \begin_layout Enumerate
18229
18230 \size small
18231 Non-breaking space (
18232 \begin_inset Quotes eld
18233 \end_inset
18234
18235
18236 \family typewriter
18237 ~
18238 \family default
18239
18240 \begin_inset Quotes erd
18241 \end_inset
18242
18243 ) should have been used.
18244 \end_layout
18245
18246 \begin_layout Enumerate
18247
18248 \size small
18249 \emph on
18250 You should enclose the previous parenthesis with 
18251 \begin_inset Quotes eld
18252 \end_inset
18253
18254
18255 \family typewriter
18256 {}
18257 \family default
18258
18259 \begin_inset Quotes erd
18260 \end_inset
18261
18262 .
18263 \end_layout
18264
18265 \begin_layout Enumerate
18266
18267 \size small
18268 Italic correction (
18269 \begin_inset Quotes eld
18270 \end_inset
18271
18272
18273 \family typewriter
18274
18275 \backslash
18276 /
18277 \family default
18278
18279 \begin_inset Quotes erd
18280 \end_inset
18281
18282 ) found in non-italic buffer.
18283 \end_layout
18284
18285 \begin_layout Enumerate
18286
18287 \size small
18288 Italic correction (
18289 \begin_inset Quotes eld
18290 \end_inset
18291
18292
18293 \family typewriter
18294
18295 \backslash
18296 /
18297 \family default
18298
18299 \begin_inset Quotes erd
18300 \end_inset
18301
18302 ) found more than once.
18303 \end_layout
18304
18305 \begin_layout Enumerate
18306
18307 \size small
18308 \emph on
18309 No italic correction (
18310 \begin_inset Quotes eld
18311 \end_inset
18312
18313
18314 \family typewriter
18315
18316 \backslash
18317 /
18318 \family default
18319
18320 \begin_inset Quotes erd
18321 \end_inset
18322
18323 ) found.
18324 \end_layout
18325
18326 \begin_layout Enumerate
18327
18328 \size small
18329 Accent command 
18330 \begin_inset Quotes eld
18331 \end_inset
18332
18333
18334 \family typewriter
18335 cmd
18336 \family default
18337
18338 \begin_inset Quotes erd
18339 \end_inset
18340
18341  needs use of 
18342 \begin_inset Quotes eld
18343 \end_inset
18344
18345
18346 \family typewriter
18347 cmd
18348 \family default
18349
18350 \begin_inset Quotes erd
18351 \end_inset
18352
18353 .
18354 \end_layout
18355
18356 \begin_layout Enumerate
18357
18358 \size small
18359 Wrong length of dash may have been used.
18360 \end_layout
18361
18362 \begin_layout Enumerate
18363
18364 \size small
18365 \emph on
18366 \begin_inset Quotes eld
18367 \end_inset
18368
18369
18370 \family typewriter
18371 %s
18372 \family default
18373
18374 \begin_inset Quotes erd
18375 \end_inset
18376
18377  expected, found 
18378 \begin_inset Quotes eld
18379 \end_inset
18380
18381
18382 \family typewriter
18383 %s
18384 \family default
18385
18386 \begin_inset Quotes erd
18387 \end_inset
18388
18389 .
18390 \end_layout
18391
18392 \begin_layout Enumerate
18393
18394 \size small
18395 Solo 
18396 \begin_inset Quotes eld
18397 \end_inset
18398
18399
18400 \family typewriter
18401 %s
18402 \family default
18403
18404 \begin_inset Quotes erd
18405 \end_inset
18406
18407  found.
18408 \end_layout
18409
18410 \begin_layout Enumerate
18411
18412 \size small
18413 You should use 
18414 \begin_inset Quotes eld
18415 \end_inset
18416
18417
18418 \family typewriter
18419 %s
18420 \family default
18421
18422 \begin_inset Quotes erd
18423 \end_inset
18424
18425  to achieve an ellipsis.
18426 \end_layout
18427
18428 \begin_layout Enumerate
18429
18430 \size small
18431 Inter-word spacing (
18432 \begin_inset Quotes eld
18433 \end_inset
18434
18435
18436 \family typewriter
18437
18438 \backslash
18439
18440 \family default
18441  
18442 \begin_inset Quotes eld
18443 \end_inset
18444
18445 ) should perhaps be used.
18446 \end_layout
18447
18448 \begin_layout Enumerate
18449
18450 \size small
18451 Inter-sentence spacing (
18452 \begin_inset Quotes eld
18453 \end_inset
18454
18455
18456 \family typewriter
18457
18458 \backslash
18459 @
18460 \family default
18461
18462 \begin_inset Quotes erd
18463 \end_inset
18464
18465 ) should perhaps be used.
18466 \end_layout
18467
18468 \begin_layout Enumerate
18469
18470 \size small
18471 Could not find argument for command.
18472 \end_layout
18473
18474 \begin_layout Enumerate
18475
18476 \size small
18477 No match found for 
18478 \begin_inset Quotes eld
18479 \end_inset
18480
18481
18482 \family typewriter
18483 %s
18484 \family default
18485
18486 \begin_inset Quotes erd
18487 \end_inset
18488
18489 .
18490 \end_layout
18491
18492 \begin_layout Enumerate
18493
18494 \size small
18495 Math mode still on at end of LaTeX file.
18496 \end_layout
18497
18498 \begin_layout Enumerate
18499
18500 \size small
18501 Number of 
18502 \begin_inset Quotes eld
18503 \end_inset
18504
18505
18506 \family typewriter
18507 char
18508 \family default
18509
18510 \begin_inset Quotes erd
18511 \end_inset
18512
18513  doesn't match the number of 
18514 \begin_inset Quotes eld
18515 \end_inset
18516
18517
18518 \family typewriter
18519 char
18520 \family default
18521
18522 \begin_inset Quotes erd
18523 \end_inset
18524
18525 .
18526 \end_layout
18527
18528 \begin_layout Enumerate
18529
18530 \size small
18531 You should use either 
18532 \family typewriter
18533
18534 \begin_inset Quotes eld
18535 \end_inset
18536
18537
18538 \family default
18539  or 
18540 \family typewriter
18541
18542 \begin_inset Quotes erd
18543 \end_inset
18544
18545
18546 \family default
18547  as an alternative to 
18548 \begin_inset Quotes eld
18549 \end_inset
18550
18551
18552 \family typewriter
18553 "
18554 \family default
18555
18556 \begin_inset Quotes erd
18557 \end_inset
18558
18559 .
18560 \end_layout
18561
18562 \begin_layout Enumerate
18563
18564 \size small
18565 You should use "
18566 \family typewriter
18567 '
18568 \family default
18569 " (ASCII 39) instead of "
18570 \family typewriter
18571 ´
18572 \family default
18573 " (ASCII 180).
18574 \end_layout
18575
18576 \begin_layout Enumerate
18577
18578 \size small
18579 User-specified pattern found.
18580 \end_layout
18581
18582 \begin_layout Enumerate
18583
18584 \size small
18585 This command might not be intended.
18586 \end_layout
18587
18588 \begin_layout Enumerate
18589
18590 \size small
18591 \emph on
18592 Comment displayed.
18593 \end_layout
18594
18595 \begin_layout Enumerate
18596
18597 \size small
18598 Either 
18599 \family typewriter
18600 ''
18601 \backslash
18602 ,'
18603 \family default
18604  or 
18605 \family typewriter
18606 '
18607 \backslash
18608 ,''
18609 \family default
18610  will look better.
18611 \end_layout
18612
18613 \begin_layout Enumerate
18614
18615 \size small
18616 Delete this space to maintain correct page references.
18617 \end_layout
18618
18619 \begin_layout Enumerate
18620
18621 \size small
18622 \emph on
18623 You might wish to put this between a pair of 
18624 \begin_inset Quotes eld
18625 \end_inset
18626
18627
18628 \family typewriter
18629 {}
18630 \family default
18631
18632 \begin_inset Quotes erd
18633 \end_inset
18634
18635 .
18636 \end_layout
18637
18638 \begin_layout Enumerate
18639
18640 \size small
18641 You ought to remove spaces in front of punctuation.
18642 \end_layout
18643
18644 \begin_layout Enumerate
18645
18646 \size small
18647 Could not execute LaTeX command.
18648 \end_layout
18649
18650 \begin_layout Enumerate
18651
18652 \size small
18653 Don't use 
18654 \family typewriter
18655
18656 \backslash
18657 /
18658 \family default
18659  in front of small punctuation.
18660 \end_layout
18661
18662 \begin_layout Enumerate
18663
18664 \family typewriter
18665 \size small
18666 $
18667 \backslash
18668 times$
18669 \family default
18670  may look prettier here.
18671 \end_layout
18672
18673 \begin_layout Enumerate
18674
18675 \size small
18676 \emph on
18677 Multiple spaces detected in output.
18678 \end_layout
18679
18680 \begin_layout Enumerate
18681
18682 \size small
18683 This text may be ignored.
18684 \end_layout
18685
18686 \begin_layout Enumerate
18687
18688 \size small
18689 Use 
18690 \family typewriter
18691
18692 \begin_inset Quotes eld
18693 \end_inset
18694
18695
18696 \family default
18697  to begin quotation, not 
18698 \family typewriter
18699 '
18700 \family default
18701 .
18702 \end_layout
18703
18704 \begin_layout Enumerate
18705
18706 \size small
18707 Use 
18708 \family typewriter
18709 '
18710 \family default
18711  to end quotation, not 
18712 \family typewriter
18713
18714 \begin_inset Quotes eld
18715 \end_inset
18716
18717
18718 \family default
18719 .
18720 \end_layout
18721
18722 \begin_layout Enumerate
18723
18724 \size small
18725 Don't mix quotes.
18726 \end_layout
18727
18728 \begin_layout Enumerate
18729
18730 \size small
18731 You should perhaps use 
18732 \begin_inset Quotes eld
18733 \end_inset
18734
18735
18736 \family typewriter
18737 cmd
18738 \family default
18739
18740 \begin_inset Quotes erd
18741 \end_inset
18742
18743  instead.
18744 \end_layout
18745
18746 \begin_layout Enumerate
18747
18748 \size small
18749 You should put a space in front of/after parenthesis.
18750 \end_layout
18751
18752 \begin_layout Enumerate
18753
18754 \size small
18755 You should avoid spaces in front of/after parenthesis.
18756 \end_layout
18757
18758 \begin_layout Enumerate
18759
18760 \size small
18761 \emph on
18762 You should not use punctuation in front of/after quotes.
18763 \end_layout
18764
18765 \begin_layout Enumerate
18766
18767 \size small
18768 Double space found.
18769 \end_layout
18770
18771 \begin_layout Enumerate
18772
18773 \size small
18774 You should put punctuation outside inner/inside display math mode.
18775 \end_layout
18776
18777 \begin_layout Enumerate
18778
18779 \size small
18780 You ought to not use primitive TeX in LaTeX code.
18781 \end_layout
18782
18783 \begin_layout Enumerate
18784
18785 \size small
18786 You should remove spaces in front of 
18787 \begin_inset Quotes eld
18788 \end_inset
18789
18790
18791 \family typewriter
18792 %s
18793 \family default
18794
18795 \begin_inset Quotes erd
18796 \end_inset
18797
18798
18799 \end_layout
18800
18801 \begin_layout Enumerate
18802
18803 \size small
18804 \begin_inset Quotes eld
18805 \end_inset
18806
18807
18808 \family typewriter
18809 %s
18810 \family default
18811
18812 \begin_inset Quotes erd
18813 \end_inset
18814
18815  is normally not followed by 
18816 \begin_inset Quotes eld
18817 \end_inset
18818
18819
18820 \family typewriter
18821 %c
18822 \family default
18823
18824 \begin_inset Quotes erd
18825 \end_inset
18826
18827 .
18828 \end_layout
18829
18830 \begin_layout Standard
18831 In later versions of LyX, we hope to provide a more complete interface to
18832  this tool (and it's smaller cousin 
18833 \family typewriter
18834 lacheck
18835 \family default
18836 ) to exploit the full power of it.
18837  But it's not exactly useless as it is now: go try it on one of your existing
18838  documents of a certain length and be surprised.
18839 \end_layout
18840
18841 \begin_layout Section
18842 Version Control in LyX
18843 \end_layout
18844
18845 \begin_layout Standard
18846 by
18847 \noun on
18848  Lars Gullik Bjønnes 
18849 \noun default
18850 and 
18851 \noun on
18852 Pavel Sanda
18853 \end_layout
18854
18855 \begin_layout Subsection
18856 Introduction
18857 \end_layout
18858
18859 \begin_layout Standard
18860 A friend of mine wanted to try LyX for a group project.
18861  When he didn't find support for version control or file locking, he dropped
18862  it.
18863  This angered me a bit, so I thought that I should at least make support
18864  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18865  This has been done.
18866  LyX now supports some of the most basic RCS/CVS/SVN commands.
18867  If you need something a bit more sophisticated you will have to do that
18868  manually in a terminal.
18869 \end_layout
18870
18871 \begin_layout Standard
18872 Also note that CVS support is not as good as subversion support so we advice
18873  using SVN instead.
18874  Good place to start with Subversion is SVN Book
18875 \begin_inset Foot
18876 status open
18877
18878 \begin_layout Plain Layout
18879 \begin_inset CommandInset href
18880 LatexCommand href
18881 target "http://svnbook.red-bean.com/"
18882
18883 \end_inset
18884
18885
18886 \end_layout
18887
18888 \end_inset
18889
18890 .
18891  In case of RCS you should read 
18892 \begin_inset Quotes eld
18893 \end_inset
18894
18895 rcsintro
18896 \begin_inset Quotes erd
18897 \end_inset
18898
18899  (a man file, read it with 
18900 \family typewriter
18901 man rcsintro
18902 \family default
18903 ).
18904  This file describes all the basic features of RCS.
18905  You should especially notice the comment about a RCS directory, and the
18906  notion of a master RCS file (the file ending in 
18907 \family typewriter
18908 ,v
18909 \family default
18910 ).
18911 \end_layout
18912
18913 \begin_layout Standard
18914 Before you begin to use the version control features in LyX, you should
18915  be familiar with RCS/CVS/SVN usage.
18916  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18917  package—no guarantees are made for older versions.
18918  Most of the log messages are not currently displayed after operations —
18919  you can check them in Messages pane if unsure.
18920 \end_layout
18921
18922 \begin_layout Standard
18923 For introducing your own external commands consult vc-command in the manual
18924  of LyX functions.
18925 \end_layout
18926
18927 \begin_layout Subsection
18928 RCS commands in LyX
18929 \end_layout
18930
18931 \begin_layout Standard
18932 The following sections describe the RCS commands supported by LyX.
18933  You can find them in the 
18934 \family sans
18935 File\SpecialChar \menuseparator
18936 Version
18937 \begin_inset space ~
18938 \end_inset
18939
18940 Control
18941 \family default
18942  submenu.
18943  LyX was tested against RCS 5.7.
18944 \end_layout
18945
18946 \begin_layout Subsubsection
18947
18948 \family sans
18949 Register
18950 \end_layout
18951
18952 \begin_layout Standard
18953 If your document is not under revision control, this is the only item shown
18954  in the menu.
18955  And if it is under revision control, the 
18956 \family sans
18957 Register
18958 \family default
18959  item is not visible.
18960  
18961 \end_layout
18962
18963 \begin_layout Standard
18964 This command registers your document with RCS (unless you are under the
18965  directory managed by CVS)\SpecialChar \@.
18966  You are asked interactively to supply an initial
18967  description of the document.
18968  The document is now set in Read-Only mode and you have to 
18969 \family sans
18970 Check
18971 \begin_inset space ~
18972 \end_inset
18973
18974 Out
18975 \begin_inset space ~
18976 \end_inset
18977
18978 For
18979 \begin_inset space ~
18980 \end_inset
18981
18982 Edit
18983 \family default
18984 , before making any changes to it.
18985  A document under revision control has a 
18986 \begin_inset Quotes eld
18987 \end_inset
18988
18989 [RCS:<version> <locker>]
18990 \begin_inset Quotes erd
18991 \end_inset
18992
18993  item tagged to the filename in the minibuffer.
18994 \end_layout
18995
18996 \begin_layout Standard
18997 RCS command that is run: 
18998 \family typewriter
18999 ci -q -u -i -t-"<initial description>" <file-name>
19000 \end_layout
19001
19002 \begin_layout Standard
19003 Read 
19004 \family typewriter
19005 man ci
19006 \family default
19007  to understand the switches.
19008  
19009 \end_layout
19010
19011 \begin_layout Subsubsection
19012
19013 \family sans
19014 Check In Changes
19015 \end_layout
19016
19017 \begin_layout Standard
19018 When you are finished editing a file, you check in your changes.
19019  When you do this, you are asked for a description of the changes.
19020  This is stored in the history log.
19021  The version number is bumped, your changes are applied to the master RCS
19022  file, the document is unlocked and set to Read-Only mode.
19023  
19024 \end_layout
19025
19026 \begin_layout Standard
19027 RCS command: 
19028 \family typewriter
19029 ci -q -u -m"<description>" <file-name>
19030 \end_layout
19031
19032 \begin_layout Subsubsection
19033
19034 \family sans
19035 Check Out For Edit
19036 \end_layout
19037
19038 \begin_layout Standard
19039 By doing this you lock the document so that only you can edit it.
19040  This will also make the document Read-Write only for you.
19041  You will usually continue editing for a while and when you are finished
19042  you check in your changes.
19043  The status line is changed to reflect that you have locked the file.
19044  
19045 \end_layout
19046
19047 \begin_layout Standard
19048 RCS command: 
19049 \family typewriter
19050 co -q -l <file-name>
19051 \end_layout
19052
19053 \begin_layout Subsubsection
19054
19055 \family sans
19056 Revert To Repository Version
19057 \end_layout
19058
19059 \begin_layout Standard
19060 This will discard all changes made to the document since the last check
19061  in.
19062  You get a warning before changes are discarded.
19063 \end_layout
19064
19065 \begin_layout Standard
19066 RCS command: 
19067 \family typewriter
19068 co -f -u<version> <file-name>
19069 \end_layout
19070
19071 \begin_layout Subsubsection
19072
19073 \family sans
19074 Undo Last Checkin
19075 \end_layout
19076
19077 \begin_layout Standard
19078 This makes as if the last check in never happened.
19079  No changes are made to the document loaded into LyX, but the last version
19080  is removed from the master RCS file.
19081  
19082 \end_layout
19083
19084 \begin_layout Standard
19085 RCS command: 
19086 \family typewriter
19087 rcs -o<version> <file-name>
19088 \end_layout
19089
19090 \begin_layout Subsubsection
19091
19092 \family sans
19093 Show History
19094 \end_layout
19095
19096 \begin_layout Standard
19097 This shows the complete history of the RCS document.
19098  The output of 
19099 \family typewriter
19100 rlog <file-name>
19101 \family default
19102  is shown in a browser.
19103  See 
19104 \family typewriter
19105 man rlog
19106 \family default
19107  for more info.
19108 \end_layout
19109
19110 \begin_layout Subsubsection
19111 Revision info
19112 \end_layout
19113
19114 \begin_layout Standard
19115 LyX supports RCS version number, author name, date and time of last commit.
19116  All those are extracted from 
19117 \family typewriter
19118 rlog -r <file-name>
19119 \family default
19120 .
19121  For other details see 
19122 \begin_inset CommandInset ref
19123 LatexCommand ref
19124 reference "sub:VCS-Revision-Information"
19125
19126 \end_inset
19127
19128  for details.
19129 \end_layout
19130
19131 \begin_layout Subsection
19132 CVS commands in LyX
19133 \end_layout
19134
19135 \begin_layout Standard
19136 A subset of CVS operations is supported by LyX.
19137  You can find the commands in the 
19138 \family sans
19139 File\SpecialChar \menuseparator
19140 Version
19141 \begin_inset space ~
19142 \end_inset
19143
19144 Control
19145 \family default
19146  submenu.
19147  The version control system SVN is more powerful, so please use it instead
19148  of CVS if possible.
19149 \end_layout
19150
19151 \begin_layout Subsubsection
19152
19153 \family sans
19154 General CVS usage
19155 \end_layout
19156
19157 \begin_layout Standard
19158 If you start from scratch with CVS you have to create your repository and
19159  checkout the working copy with external tools.
19160  If you're using a client-server setup you may need to login before doing
19161  the first repository checkout.
19162 \end_layout
19163
19164 \begin_layout Standard
19165 If your documents are under revision control and others are using the same
19166  repository problems arise when different changes to the same document at
19167  the same location happen.
19168  Standard CVS repositories doesn't operate with a file locking mechanism.
19169  This may be surprising, but conflicts only occur if people disagree on
19170  the proper content of the same part of a document.
19171  So, if co-workers are used to communicate regularly, these conflicts occur
19172  rarely.
19173  If they don't communicate they have a fundamental problem anyway.
19174  Nevertheless some people like to work with so called 
19175 \begin_inset Quotes eld
19176 \end_inset
19177
19178 reserved checkouts
19179 \begin_inset Quotes erd
19180 \end_inset
19181
19182 .
19183  If they do so the working copy of all files is readonly when checked out
19184  first and the user starts editing after using a special command to make
19185  the working copy writable.
19186  When the changes are checked in the working copy returns to readonly state.
19187  With LyX one has to edit the 
19188 \begin_inset Flex Code
19189 status collapsed
19190
19191 \begin_layout Plain Layout
19192 .cvsrc
19193 \end_layout
19194
19195 \end_inset
19196
19197  file and add the line 
19198 \begin_inset Flex Code
19199 status collapsed
19200
19201 \begin_layout Plain Layout
19202 cvs -r
19203 \end_layout
19204
19205 \end_inset
19206
19207  to work with reserved checkouts.
19208  The benefit is the possibility to see who is using a writable copy of some
19209  document.
19210  It's not guaranteed only one user makes a copy writable.
19211 \end_layout
19212
19213 \begin_layout Standard
19214 LyX tries to guess if you're using reserved or non-reserved checkouts.
19215  If your working copy is readonly or it is writable and an additional copy
19216  of your document exists in the CVS/Base sub-directory a reserved otherwise
19217  a non-reserved checkout is assumed.
19218  When a reserved checkout is detected you have to use 
19219 \begin_inset Flex MenuItem
19220 status collapsed
19221
19222 \begin_layout Plain Layout
19223 Check Out
19224 \end_layout
19225
19226 \end_inset
19227
19228  to make your working copy writable if it's readonly.
19229  After doing so the 
19230 \begin_inset Flex MenuItem
19231 status collapsed
19232
19233 \begin_layout Plain Layout
19234 Check In
19235 \end_layout
19236
19237 \end_inset
19238
19239  operation is possible and that makes your working copy readonly again after
19240  transferring your changes to the repository.
19241 \end_layout
19242
19243 \begin_layout Standard
19244 More information about CVS can be found here 
19245 \begin_inset Flex URL
19246 status collapsed
19247
19248 \begin_layout Plain Layout
19249
19250 http://www.nongnu.org/cvs
19251 \end_layout
19252
19253 \end_inset
19254
19255  and here 
19256 \begin_inset Flex URL
19257 status collapsed
19258
19259 \begin_layout Plain Layout
19260
19261 http://ximbiot.com/cvs
19262 \end_layout
19263
19264 \end_inset
19265
19266 .
19267 \end_layout
19268
19269 \begin_layout Standard
19270 Read 
19271 \family typewriter
19272 man cvs
19273 \family default
19274  to understand the sub-commands and the switches mentioned below.
19275 \end_layout
19276
19277 \begin_layout Subsubsection
19278
19279 \family sans
19280 Register
19281 \end_layout
19282
19283 \begin_layout Standard
19284 If your document is not under revision control, this is the only item shown
19285  in the menu.
19286  And if it is under revision control, the 
19287 \family sans
19288 \bar under
19289 R
19290 \bar default
19291 egister
19292 \family default
19293  item is not visible.
19294  
19295 \end_layout
19296
19297 \begin_layout Standard
19298 This command registers in CVS your document 
19299 \begin_inset Flex Strong
19300 status collapsed
19301
19302 \begin_layout Plain Layout
19303
19304 \emph on
19305 only
19306 \end_layout
19307
19308 \end_inset
19309
19310  in case you have already the documents directory under CVS control (in
19311  particular 
19312 \family typewriter
19313 CVS/Entries
19314 \family default
19315  file exists).
19316  This means you have to create or checkout the archive by yourself using
19317  external tools.
19318  (In case you forget that step LyX registers the document with RCS.)
19319 \end_layout
19320
19321 \begin_layout Standard
19322 Then you are asked interactively to supply an initial description of the
19323  document.
19324  Don't forget that registered file is not yet checked in.
19325 \end_layout
19326
19327 \begin_layout Standard
19328 CVS command that is run: 
19329 \family typewriter
19330 cvs -q add -m"<entered message>" "<file-name>"
19331 \end_layout
19332
19333 \begin_layout Standard
19334 The term 
19335 \family typewriter
19336 "<file-name>"
19337 \family default
19338  above and for all other CVS commands is an abbreviation for 
19339 \begin_inset Quotes eld
19340 \end_inset
19341
19342 change the current working directory to file location and use the file name
19343  without path component as argument
19344 \begin_inset Quotes erd
19345 \end_inset
19346
19347 .
19348 \end_layout
19349
19350 \begin_layout Subsubsection
19351
19352 \family sans
19353 Check In Changes
19354 \end_layout
19355
19356 \begin_layout Standard
19357 When you are finished editing a file, you commit your changes.
19358  When you do this and you had changed the document, you are asked for a
19359  description of the changes.
19360  After that changes are written to the repository.
19361  In case you didn't change the document and a reserved checkout is detected
19362  the reservation made on 
19363 \begin_inset Flex MenuItem
19364 status collapsed
19365
19366 \begin_layout Plain Layout
19367 Check Out
19368 \end_layout
19369
19370 \end_inset
19371
19372  is undone.
19373 \end_layout
19374
19375 \begin_layout Labeling
19376 \labelwidthstring 00.00.0000
19377 CVS
19378 \begin_inset space ~
19379 \end_inset
19380
19381 command: 
19382 \begin_inset space ~
19383 \end_inset
19384
19385
19386 \begin_inset Newline newline
19387 \end_inset
19388
19389
19390 \begin_inset Flex Code
19391 status collapsed
19392
19393 \begin_layout Plain Layout
19394 cvs 
19395 \family typewriter
19396 -q commit -m"<description>" "<file-name>"
19397 \end_layout
19398
19399 \end_inset
19400
19401  or
19402 \begin_inset Newline newline
19403 \end_inset
19404
19405
19406 \begin_inset Flex Code
19407 status collapsed
19408
19409 \begin_layout Plain Layout
19410 cvs -q unedit 
19411 \family typewriter
19412 "<file-name>"
19413 \end_layout
19414
19415 \end_inset
19416
19417
19418 \end_layout
19419
19420 \begin_layout Subsubsection
19421
19422 \family sans
19423 Check Out Changes
19424 \end_layout
19425
19426 \begin_layout Standard
19427 When you are sharing a repository with others, you may have to incorporate
19428  their changes into your working copy.
19429 \end_layout
19430
19431 \begin_layout Standard
19432 CVS command: 
19433 \family typewriter
19434 cvs -q update "<file-name>"
19435 \end_layout
19436
19437 \begin_layout Standard
19438 If a readonly checkout is detected the working copy is made writable and
19439  reserved.
19440 \end_layout
19441
19442 \begin_layout Standard
19443 CVS command: 
19444 \family typewriter
19445 cvs -q edit "<file-name>"
19446 \end_layout
19447
19448 \begin_layout Subsubsection
19449
19450 \family sans
19451 Revert To Repository Version
19452 \end_layout
19453
19454 \begin_layout Standard
19455 This will discard all changes made to the document since the last check
19456  in.
19457  You get a warning before changes are discarded.
19458  Firstly the file is deleted, secondly CVS update command is run.
19459 \end_layout
19460
19461 \begin_layout Standard
19462 CVS command: 
19463 \family typewriter
19464 cvs -q update "<file-name>"
19465 \end_layout
19466
19467 \begin_layout Standard
19468 If a reserved checkout is detected and the working copy has no changes only
19469  the reservation is undone.
19470 \end_layout
19471
19472 \begin_layout Standard
19473 CVS command: 
19474 \family typewriter
19475 cvs -q unedit "<file-name>"
19476 \end_layout
19477
19478 \begin_layout Subsubsection
19479 Update of the local directory checkout from repository
19480 \end_layout
19481
19482 \begin_layout Standard
19483 Once your documents gets more complex, containing sub-documents and pictures,
19484  including external 
19485 \begin_inset Flex Code
19486 status collapsed
19487
19488 \begin_layout Plain Layout
19489 .tex
19490 \end_layout
19491
19492 \end_inset
19493
19494  files and so on using version control becomes more complicated.
19495  LyX supports updating the whole tree in which resides the document.
19496  This become especially useful once you cooperate with people which neither
19497  have detailed knowledge about CVS usage nor they have ambition to commit
19498  additional material to the repository.
19499  You have to organize the files structure so that all external files are
19500  in the same directory or subdirectories of the document.
19501  It's good practice anyway to store multipart documents in an extra directory.
19502 \end_layout
19503
19504 \begin_layout Standard
19505 The 
19506 \begin_inset Flex Code
19507 status collapsed
19508
19509 \begin_layout Plain Layout
19510 Update local directory from repository
19511 \end_layout
19512
19513 \end_inset
19514
19515  command updates the whole directory.
19516  If local changes are detected user is warned before update starts.
19517  In case of merge conflicts both versions of the conflicting document parts
19518  are placed in the final document.
19519  You have to review and correct the result of the merge.
19520  You'll find the conflicts enclosed in pairs of 
19521 \begin_inset Flex Code
19522 status collapsed
19523
19524 \begin_layout Plain Layout
19525 <<<<<<<
19526 \end_layout
19527
19528 \end_inset
19529
19530  and 
19531 \begin_inset Flex Code
19532 status collapsed
19533
19534 \begin_layout Plain Layout
19535 >>>>>>>
19536 \end_layout
19537
19538 \end_inset
19539
19540  separated by 
19541 \begin_inset Flex Code
19542 status collapsed
19543
19544 \begin_layout Plain Layout
19545 =======
19546 \end_layout
19547
19548 \end_inset
19549
19550 .
19551  The first part is your version as before the update operation with the
19552  document name prepended.
19553  The second one is the repository version with the version number after
19554  the sequence of 
19555 \begin_inset Flex Code
19556 status collapsed
19557
19558 \begin_layout Plain Layout
19559 >
19560 \end_layout
19561
19562 \end_inset
19563
19564  signs.
19565 \end_layout
19566
19567 \begin_layout Labeling
19568 \labelwidthstring 00.00.0000
19569 CVS
19570 \begin_inset space ~
19571 \end_inset
19572
19573 commands: 
19574 \begin_inset space ~
19575 \end_inset
19576
19577
19578 \begin_inset Newline newline
19579 \end_inset
19580
19581
19582 \begin_inset Flex Code
19583 status collapsed
19584
19585 \begin_layout Plain Layout
19586 cd $path; cvs diff 
19587 \family typewriter
19588 "."
19589 \end_layout
19590
19591 \end_inset
19592
19593  (Ask if changes are detected.)
19594 \begin_inset Newline newline
19595 \end_inset
19596
19597
19598 \begin_inset Flex Code
19599 status collapsed
19600
19601 \begin_layout Plain Layout
19602 cd $path; cvs -q update 
19603 \family typewriter
19604 "."
19605 \end_layout
19606
19607 \end_inset
19608
19609
19610 \end_layout
19611
19612 \begin_layout Standard
19613 where 
19614 \begin_inset Flex Code
19615 status collapsed
19616
19617 \begin_layout Plain Layout
19618 $path
19619 \end_layout
19620
19621 \end_inset
19622
19623  stands for the path to the document.
19624 \end_layout
19625
19626 \begin_layout Subsubsection
19627
19628 \family sans
19629 Show History
19630 \end_layout
19631
19632 \begin_layout Standard
19633 This shows the complete history of the CVS document.
19634  The output of 
19635 \family typewriter
19636 cvs log "<file-name>"
19637 \family default
19638  is shown in a browser.
19639 \end_layout
19640
19641 \begin_layout Subsection
19642 SVN commands in LyX
19643 \end_layout
19644
19645 \begin_layout Standard
19646 SVN is now partially supported by LyX.
19647  You can find the commands in the 
19648 \family sans
19649 File\SpecialChar \menuseparator
19650 Version
19651 \begin_inset space ~
19652 \end_inset
19653
19654 Control
19655 \family default
19656  submenu.
19657  Please note that if you use password protected access to repository via
19658  ssh, you will be asked in terminal window.
19659  LyX was tested against SVN 1.5 and 1.6
19660 \begin_inset Foot
19661 status open
19662
19663 \begin_layout Plain Layout
19664 Most of the commands will work with 1.4 too, see 
19665 \begin_inset CommandInset ref
19666 LatexCommand ref
19667 reference "sub:SVN-Repo-Update"
19668
19669 \end_inset
19670
19671 .
19672 \end_layout
19673
19674 \end_inset
19675
19676
19677 \end_layout
19678
19679 \begin_layout Subsubsection
19680
19681 \family sans
19682 Register
19683 \end_layout
19684
19685 \begin_layout Standard
19686 If your document is not under revision control, this is the only item shown
19687  in the menu.
19688  And if it is under revision control, the 
19689 \family sans
19690 \bar under
19691 R
19692 \bar default
19693 egister
19694 \family default
19695  item is not visible.
19696  
19697 \end_layout
19698
19699 \begin_layout Standard
19700 This command registers in SVN your document ONLY in case you have already
19701  the documents directory under SVN control (in particular 
19702 \family typewriter
19703 .svn/entries
19704 \family default
19705  file exists).
19706  This means you have to checkout the archive by yourself.
19707  
19708 \end_layout
19709
19710 \begin_layout Standard
19711 Then you are asked interactively to supply an initial description of the
19712  document.
19713  Don't forget that registered file is not yet commited.
19714 \end_layout
19715
19716 \begin_layout Standard
19717 SVN command that is run: 
19718 \family typewriter
19719 svn add -q 
19720 \begin_inset Quotes eld
19721 \end_inset
19722
19723 <file-name>
19724 \begin_inset Quotes erd
19725 \end_inset
19726
19727
19728 \end_layout
19729
19730 \begin_layout Standard
19731 Read 
19732 \family typewriter
19733 man svn
19734 \family default
19735  to understand the switches.
19736  
19737 \end_layout
19738
19739 \begin_layout Subsubsection
19740
19741 \family sans
19742 Check In Changes
19743 \end_layout
19744
19745 \begin_layout Standard
19746 When you are finished editing a file, you commit your changes.
19747  When you do this, you are asked for a description of the changes.
19748  After that changes are commited.
19749 \end_layout
19750
19751 \begin_layout Standard
19752 SVN command:
19753 \begin_inset Foot
19754 status collapsed
19755
19756 \begin_layout Plain Layout
19757 In case locking is not enabled.
19758  See Section 
19759 \begin_inset CommandInset ref
19760 LatexCommand ref
19761 reference "subsec:SVN-File-Locking"
19762
19763 \end_inset
19764
19765 .
19766 \end_layout
19767
19768 \end_inset
19769
19770  
19771 \family typewriter
19772 svn commit -q -m"<description>" <file-name>
19773 \end_layout
19774
19775 \begin_layout Subsubsection
19776
19777 \family sans
19778 Check Out For Edit
19779 \end_layout
19780
19781 \begin_layout Standard
19782 Updates the changes of this file from the repository.
19783  Be sure you understand SVN merging and conflicts resolving before using
19784  this function, because all conflicts has to be resolved manually by you!
19785 \end_layout
19786
19787 \begin_layout Standard
19788 SVN command:
19789 \begin_inset Foot
19790 status collapsed
19791
19792 \begin_layout Plain Layout
19793 Ditto.
19794 \end_layout
19795
19796 \end_inset
19797
19798  
19799 \family typewriter
19800 svn update --non-interactive 
19801 \begin_inset Quotes eld
19802 \end_inset
19803
19804 <file-name>
19805 \begin_inset Quotes erd
19806 \end_inset
19807
19808
19809 \end_layout
19810
19811 \begin_layout Subsubsection
19812
19813 \family sans
19814 Revert To Repository Version
19815 \end_layout
19816
19817 \begin_layout Standard
19818 This will discard all changes made to the document since the last check
19819  in.
19820  You get a warning before changes are discarded.
19821  
19822 \end_layout
19823
19824 \begin_layout Standard
19825 SVN command: 
19826 \family typewriter
19827 svn revert -q 
19828 \begin_inset Quotes eld
19829 \end_inset
19830
19831 <file-name>
19832 \begin_inset Quotes erd
19833 \end_inset
19834
19835
19836 \end_layout
19837
19838 \begin_layout Subsubsection
19839 \begin_inset CommandInset label
19840 LatexCommand label
19841 name "sub:SVN-Repo-Update"
19842
19843 \end_inset
19844
19845 Update of the local directory checkout from repository
19846 \begin_inset Foot
19847 status collapsed
19848
19849 \begin_layout Plain Layout
19850 Note that this command will work only with subversion 
19851 \begin_inset Formula $\geqq1.5$
19852 \end_inset
19853
19854
19855 \end_layout
19856
19857 \end_inset
19858
19859
19860 \end_layout
19861
19862 \begin_layout Standard
19863 All the commands above have one shortcomming - they deal with the current
19864  document only.
19865  Once your document contains pictures, includes external 
19866 \begin_inset Flex Code
19867 status collapsed
19868
19869 \begin_layout Plain Layout
19870 .tex
19871 \end_layout
19872
19873 \end_inset
19874
19875  files and so on administration becomes more complicated.
19876  LyX now supports updating the whole tree in which resides the document
19877 \begin_inset Foot
19878 status collapsed
19879
19880 \begin_layout Plain Layout
19881 One need to organize the files structure so that all external files are
19882  in the same directory or subdirectories of the document.
19883  
19884 \end_layout
19885
19886 \end_inset
19887
19888 .
19889  This become especially useful once you cooperate with people which neither
19890  know about subversion management nor they have ambition to commit additional
19891  material to the repository.
19892  
19893 \end_layout
19894
19895 \begin_layout Standard
19896 \begin_inset Flex Code
19897 status collapsed
19898
19899 \begin_layout Plain Layout
19900 Update local directory from repository
19901 \end_layout
19902
19903 \end_inset
19904
19905  command updates the whole directory and in case of merge conflicts local
19906  version of the files are left, so no unintended data loss occurs.
19907  If local changes are detected user is warned before update starts.
19908 \end_layout
19909
19910 \begin_layout Labeling
19911 \labelwidthstring 00.00.0000
19912 SVN
19913 \begin_inset space ~
19914 \end_inset
19915
19916 commands: 
19917 \begin_inset space ~
19918 \end_inset
19919
19920
19921 \begin_inset Newline newline
19922 \end_inset
19923
19924
19925 \begin_inset Flex Code
19926 status collapsed
19927
19928 \begin_layout Plain Layout
19929 svn diff $path
19930 \end_layout
19931
19932 \end_inset
19933
19934  (Ask if changes are detected.)
19935 \begin_inset Newline newline
19936 \end_inset
19937
19938
19939 \begin_inset Flex Code
19940 status collapsed
19941
19942 \begin_layout Plain Layout
19943 svn update --accept mine-full $path
19944 \end_layout
19945
19946 \end_inset
19947
19948
19949 \end_layout
19950
19951 \begin_layout Standard
19952 where 
19953 \begin_inset Flex Code
19954 status collapsed
19955
19956 \begin_layout Plain Layout
19957 $path
19958 \end_layout
19959
19960 \end_inset
19961
19962  stands for the path to the document.
19963 \end_layout
19964
19965 \begin_layout Subsubsection
19966
19967 \family sans
19968 Show History
19969 \end_layout
19970
19971 \begin_layout Standard
19972 This shows the complete history of the SVN document.
19973  The output of 
19974 \family typewriter
19975 svn log 
19976 \begin_inset Quotes eld
19977 \end_inset
19978
19979 <file-name>
19980 \begin_inset Quotes erd
19981 \end_inset
19982
19983
19984 \family default
19985  is shown in a browser.
19986 \end_layout
19987
19988 \begin_layout Subsubsection
19989 File Locking
19990 \begin_inset CommandInset label
19991 LatexCommand label
19992 name "subsec:SVN-File-Locking"
19993
19994 \end_inset
19995
19996
19997 \end_layout
19998
19999 \begin_layout Standard
20000 The file exchange through various revision control systems brings the problem
20001  of merge conflicts in case two different users try to edit the same (parts
20002  of) document.
20003  When such a conflict happens it needs manual resolving and one reasonable
20004  alternative is to provide some kind of locking mechanism, which guarantees
20005  that only one user is allowed to edit file at the given time.
20006 \end_layout
20007
20008 \begin_layout Standard
20009 SVN has two such mechanisms to provide mutual exclusivity for file access
20010  - locks and automatic setting of write permissions (see sec.
20011  
20012 \begin_inset CommandInset ref
20013 LatexCommand ref
20014 reference "subsec:Automatical-Locking-Property"
20015
20016 \end_inset
20017
20018 ) based on 
20019 \begin_inset Flex Code
20020 status collapsed
20021
20022 \begin_layout Plain Layout
20023 svn:needs-lock
20024 \end_layout
20025
20026 \end_inset
20027
20028  file svn property
20029 \begin_inset Foot
20030 status open
20031
20032 \begin_layout Plain Layout
20033 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20034 \end_layout
20035
20036 \end_inset
20037
20038 .
20039  If this property is detected for a given document LyX starts to use SVN
20040  locks for document editing automatically and the whole check-in/out mechanism
20041  switches to the same regimen as for RCS.
20042  This in particular means there are two different modes of file use in LyX:
20043 \end_layout
20044
20045 \begin_layout Itemize
20046 Unlocked state.
20047  The loaded file is in the read-only mode.
20048  For editing on needs to check-out.
20049  
20050 \emph on
20051 Check-out
20052 \emph default
20053  consists of updating from the repository and gaining write lock.
20054  If the lock is not possible to obtain, we remain in unlocked state.
20055 \end_layout
20056
20057 \begin_layout Itemize
20058 Locked state.
20059  The loaded file is in the 'normal' edit mode.
20060  No other user is allowed to edit the file.
20061  
20062 \emph on
20063 Check-in
20064 \emph default
20065  consists of commiting changes and releasing write-lock.
20066  If no changes have been made to the document, no commit will be produced
20067 \begin_inset Foot
20068 status collapsed
20069
20070 \begin_layout Plain Layout
20071 Don't be puzzled by the fact that you will be asked for commit message anyway.
20072 \end_layout
20073
20074 \end_inset
20075
20076  and only the write-lock will be released.
20077 \end_layout
20078
20079 \begin_layout Standard
20080 SVN commands:
20081 \end_layout
20082
20083 \begin_layout Labeling
20084 \labelwidthstring 00.00.0000
20085 Check-in:
20086 \family typewriter
20087  svn commit -q -m"<description>" "<file-name>"
20088 \begin_inset Newline newline
20089 \end_inset
20090
20091 svn unlock "<file-name>"
20092 \end_layout
20093
20094 \begin_layout Labeling
20095 \labelwidthstring 00.00.0000
20096 Check-out: 
20097 \family typewriter
20098 svn update "<file-name>"
20099 \begin_inset Newline newline
20100 \end_inset
20101
20102 svn lock "<file-name>"
20103 \end_layout
20104
20105 \begin_layout Subsubsection
20106
20107 \family typewriter
20108 \begin_inset CommandInset label
20109 LatexCommand label
20110 name "subsec:Automatical-Locking-Property"
20111
20112 \end_inset
20113
20114
20115 \family default
20116 Automatic Locking Property
20117 \end_layout
20118
20119 \begin_layout Standard
20120 The above mentioned automatic setting of write permissions of the .lyx file
20121  can be set through
20122 \family sans
20123 \bar under
20124  F
20125 \bar default
20126 ile\SpecialChar \menuseparator
20127
20128 \bar under
20129 V
20130 \bar default
20131 ersion
20132 \begin_inset space ~
20133 \end_inset
20134
20135 Control\SpecialChar \menuseparator
20136
20137 \bar under
20138 T
20139 \bar default
20140 oggle locking property
20141 \family default
20142 .
20143  This command is active only when the file is not locked on the svn server
20144  (i.e.
20145  you need to check-out before proceeding).
20146 \end_layout
20147
20148 \begin_layout Labeling
20149 \labelwidthstring 00.00.0000
20150 SVN
20151 \begin_inset space ~
20152 \end_inset
20153
20154 commands:
20155 \end_layout
20156
20157 \begin_layout Labeling
20158 \labelwidthstring 00.00.0000
20159 Set:
20160 \family typewriter
20161  svn propset svn:needs-lock ON "<file-name>"
20162 \end_layout
20163
20164 \begin_layout Labeling
20165 \labelwidthstring 00.00.0000
20166 Unset: 
20167 \family typewriter
20168 svn propdel svn:needs-lock "<file-name>"
20169 \end_layout
20170
20171 \begin_layout Subsubsection
20172 \begin_inset CommandInset label
20173 LatexCommand label
20174 name "sub:VCS-Revision-Information"
20175
20176 \end_inset
20177
20178 Revision Information in Documents
20179 \end_layout
20180
20181 \begin_layout Standard
20182 There are more possibilities how to activate revision information in our
20183  document.
20184 \end_layout
20185
20186 \begin_layout Itemize
20187 LyX supports directly:
20188 \end_layout
20189
20190 \begin_deeper
20191 \begin_layout Itemize
20192 tree revision information (
20193 \begin_inset Flex Code
20194 status collapsed
20195
20196 \begin_layout Plain Layout
20197 vcs-tree-revision
20198 \end_layout
20199
20200 \end_inset
20201
20202 ).
20203  The result is the output of the 
20204 \begin_inset Flex Code
20205 status collapsed
20206
20207 \begin_layout Plain Layout
20208 svnversion
20209 \end_layout
20210
20211 \end_inset
20212
20213  command, the following table gives you an idea, how to read the results.
20214 \end_layout
20215
20216 \begin_layout Standard
20217 \align center
20218 \begin_inset Tabular
20219 <lyxtabular version="3" rows="6" columns="2">
20220 <features tabularvalignment="middle">
20221 <column alignment="center" valignment="top" width="0">
20222 <column alignment="center" valignment="top" width="0">
20223 <row>
20224 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20225 \begin_inset Text
20226
20227 \begin_layout Plain Layout
20228 Output
20229 \end_layout
20230
20231 \end_inset
20232 </cell>
20233 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20234 \begin_inset Text
20235
20236 \begin_layout Plain Layout
20237 Meaning
20238 \end_layout
20239
20240 \end_inset
20241 </cell>
20242 </row>
20243 <row>
20244 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20245 \begin_inset Text
20246
20247 \begin_layout Plain Layout
20248 4123:4168
20249 \end_layout
20250
20251 \end_inset
20252 </cell>
20253 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20254 \begin_inset Text
20255
20256 \begin_layout Plain Layout
20257 mixed revision working copy
20258 \end_layout
20259
20260 \end_inset
20261 </cell>
20262 </row>
20263 <row>
20264 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20265 \begin_inset Text
20266
20267 \begin_layout Plain Layout
20268 4168M
20269 \end_layout
20270
20271 \end_inset
20272 </cell>
20273 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20274 \begin_inset Text
20275
20276 \begin_layout Plain Layout
20277 modified working copy
20278 \end_layout
20279
20280 \end_inset
20281 </cell>
20282 </row>
20283 <row>
20284 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20285 \begin_inset Text
20286
20287 \begin_layout Plain Layout
20288 4123S
20289 \end_layout
20290
20291 \end_inset
20292 </cell>
20293 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20294 \begin_inset Text
20295
20296 \begin_layout Plain Layout
20297 switched working copy
20298 \end_layout
20299
20300 \end_inset
20301 </cell>
20302 </row>
20303 <row>
20304 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20305 \begin_inset Text
20306
20307 \begin_layout Plain Layout
20308 4123P
20309 \end_layout
20310
20311 \end_inset
20312 </cell>
20313 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20314 \begin_inset Text
20315
20316 \begin_layout Plain Layout
20317 partial working copy, from a sparse checkout
20318 \end_layout
20319
20320 \end_inset
20321 </cell>
20322 </row>
20323 <row>
20324 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20325 \begin_inset Text
20326
20327 \begin_layout Plain Layout
20328 4123:4168MS
20329 \end_layout
20330
20331 \end_inset
20332 </cell>
20333 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20334 \begin_inset Text
20335
20336 \begin_layout Plain Layout
20337 mixed revision, modified, switched working copy
20338 \end_layout
20339
20340 \end_inset
20341 </cell>
20342 </row>
20343 </lyxtabular>
20344
20345 \end_inset
20346
20347
20348 \end_layout
20349
20350 \begin_layout Itemize
20351 file revision information.
20352  The result comes from parsing the output of 
20353 \begin_inset Flex Code
20354 status collapsed
20355
20356 \begin_layout Plain Layout
20357 svn
20358 \begin_inset space ~
20359 \end_inset
20360
20361 info
20362 \begin_inset space ~
20363 \end_inset
20364
20365 --xml
20366 \begin_inset space ~
20367 \end_inset
20368
20369 file.lyx
20370 \end_layout
20371
20372 \end_inset
20373
20374 .
20375  Supported flags are:
20376 \end_layout
20377
20378 \begin_deeper
20379 \begin_layout Itemize
20380 version number of the last commit (
20381 \begin_inset Flex Code
20382 status collapsed
20383
20384 \begin_layout Plain Layout
20385 vcs-revision
20386 \end_layout
20387
20388 \end_inset
20389
20390 )
20391 \end_layout
20392
20393 \begin_layout Itemize
20394 author of the last commit (
20395 \begin_inset Flex Code
20396 status collapsed
20397
20398 \begin_layout Plain Layout
20399 vcs-author
20400 \end_layout
20401
20402 \end_inset
20403
20404 )
20405 \end_layout
20406
20407 \begin_layout Itemize
20408 date of the last commit (
20409 \begin_inset Flex Code
20410 status collapsed
20411
20412 \begin_layout Plain Layout
20413 vcs-date
20414 \end_layout
20415
20416 \end_inset
20417
20418 )
20419 \end_layout
20420
20421 \begin_layout Itemize
20422 time of the last commit (
20423 \begin_inset Flex Code
20424 status collapsed
20425
20426 \begin_layout Plain Layout
20427 vcs-time
20428 \end_layout
20429
20430 \end_inset
20431
20432 )
20433 \end_layout
20434
20435 \end_deeper
20436 \begin_layout Standard
20437 You can obtain this info via InsetInfo (e.g.
20438  
20439 \begin_inset Flex Code
20440 status collapsed
20441
20442 \begin_layout Plain Layout
20443 info-insert buffer vcs-date
20444 \end_layout
20445
20446 \end_inset
20447
20448 ).
20449  The information will be available only when you have the file stored under
20450  svn managment (i.e.
20451  the 
20452 \begin_inset Flex Code
20453 status collapsed
20454
20455 \begin_layout Plain Layout
20456 .svn
20457 \end_layout
20458
20459 \end_inset
20460
20461  directory is available with your document).
20462 \end_layout
20463
20464 \end_deeper
20465 \begin_layout Itemize
20466 Another---a hacking one---possibility is to use svn keywords
20467 \begin_inset Foot
20468 status collapsed
20469
20470 \begin_layout Plain Layout
20471 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20472 \end_layout
20473
20474 \end_inset
20475
20476 .
20477  In short -- you set file keywords property (e.g.
20478  
20479 \family sans
20480 svn propset svn:keywords 'Rev' file.lyx
20481 \family default
20482 ) and then paste keyword TeX code
20483 \begin_inset Foot
20484 status collapsed
20485
20486 \begin_layout Plain Layout
20487 This is an easy way how to ensure that LyX won't break the line in the middle
20488  of keyword tag.
20489 \end_layout
20490
20491 \end_inset
20492
20493  tag in your document (e.g.
20494  
20495 \begin_inset ERT
20496 status open
20497
20498 \begin_layout Plain Layout
20499
20500 $Rev$
20501 \end_layout
20502
20503 \end_inset
20504
20505 ).
20506  This way svn client will automatically substitute revision number (e.g.
20507  
20508 \begin_inset ERT
20509 status open
20510
20511 \begin_layout Plain Layout
20512
20513 $Rev: 59 $
20514 \end_layout
20515
20516 \end_inset
20517
20518 ) after each update and commit.
20519  There are more problems with this approach.
20520  Firstly, the '$' character is used in TeX world for math equations, so
20521  any occurence of math formula 
20522 \begin_inset Formula $Rev$
20523 \end_inset
20524
20525  become 
20526 \begin_inset Formula $Rev:59$
20527 \end_inset
20528
20529  in your LyX document.
20530  Similarly for other keywords like Id, Date, Author, etc.
20531  Secondly svn output is dependent on your locales, so its very easy that
20532  svn would produce some problematic strings once Date is used.
20533  Thirdly you get the whole 'Rev: 59' string in your document instead of
20534  the plain number.
20535  Until subversion implements user's custom keywords it will be hard to use
20536  this approach reliably or let LyX to support it directly.
20537 \end_layout
20538
20539 \begin_layout Subsection
20540 SVN and Windows Environment
20541 \end_layout
20542
20543 \begin_layout Quote
20544 My inclination is to say that if the user cannot figure out the command
20545  line operations on their own fairly quickly, they would be well advised
20546  to use TortoiseSVN.
20547  ---P.
20548  A.
20549  Rubin
20550 \end_layout
20551
20552 \begin_layout Subsubsection
20553 Preparation
20554 \end_layout
20555
20556 \begin_layout Standard
20557 In addition to installing LyX, and having access to a Subversion repository,
20558  the user will need to install the Subversion client program.
20559  A Windows installer for the client program is available from 
20560 \begin_inset CommandInset href
20561 LatexCommand href
20562 name "CollabNet"
20563 target "http://www.collab.net/nonav/downloads/subversion/"
20564
20565 \end_inset
20566
20567 .
20568  The user may also want to install 
20569 \begin_inset CommandInset href
20570 LatexCommand href
20571 name "TortoiseSVN"
20572 target "http://tortoisesvn.tigris.org/"
20573
20574 \end_inset
20575
20576 , which integrates Subversion operations into the context (rightclick) menu
20577  of Windows Explorer.
20578  Operations done outside LyX will typically be more convenient using the
20579  Explorer context menu.
20580  Note that TortoiseSVN is not a replacement for the client program, which
20581  is what LyX itself will use.
20582 \end_layout
20583
20584 \begin_layout Subsubsection
20585 Bringing a document under Subversion control
20586 \end_layout
20587
20588 \begin_layout Standard
20589 Before a LyX document can be brought under version control in Subversion,
20590  its parent directory needs to be under version control.
20591  If the document is being added to a project already in the repository,
20592  this is accomplished by checking the project out to the directory where
20593  the new document will be placed.
20594  If the project itself is not yet under version control (for instance, if
20595  this document starts a new project), the directory must be imported into
20596  the repository.
20597  This is done outside LyX.
20598  Both import and checkout are easily accomplished from the Explorer context
20599  menu using TortoiseSVN, or alternatively can be done using the command
20600  line client at a DOS prompt.
20601  The procedure for importing the project using TortoiseSVN is described
20602  below, assuming an existing repository and a new project being started
20603  in 
20604 \family typewriter
20605 C:
20606 \backslash
20607 new project
20608 \family default
20609 .
20610  For information on using the Subversion client program, run 
20611 \family typewriter
20612 svn --help 
20613 \family default
20614 in a DOS shell.
20615 \end_layout
20616
20617 \begin_layout Enumerate
20618 Locate 
20619 \family typewriter
20620 C:
20621 \backslash
20622 new project 
20623 \family default
20624 in Windows Explorer, right click it, and select 
20625 \family typewriter
20626 TortoiseSVN > Repo-browser
20627 \family default
20628 .
20629  If necessary, adjust the URL for the repository, then click OK.
20630 \end_layout
20631
20632 \begin_layout Enumerate
20633 Right click the level of the repository under which you want to place the
20634  new project folder (typically the top level) and click 
20635 \family typewriter
20636 Create folder\SpecialChar \ldots{}
20637
20638 \family default
20639  Supply a name for the project folder and click OK.
20640  Add a message for the log file if desired, then click OK again.
20641  The new project folder should appear in the repository.
20642  Finally, click OK again to exit the repository browser.
20643 \end_layout
20644
20645 \begin_layout Enumerate
20646 Once again right click 
20647 \family typewriter
20648 C:
20649 \backslash
20650 new project
20651 \family default
20652 , this time selecting SVN Checkout\SpecialChar \ldots{}
20653  Select the URL of the project folder
20654  you just created in the repository, and set the checkout directory to 
20655 \family typewriter
20656 C:
20657 \backslash
20658 new project.
20659
20660 \family default
20661  Click OK.
20662  You will be warned about a non-empty folder; click OK to proceed.
20663  You should now have a 
20664 \family typewriter
20665 .svn
20666 \family default
20667  directory under 
20668 \family typewriter
20669 C:
20670 \backslash
20671 new project.
20672 \end_layout
20673
20674 \begin_layout Enumerate
20675 Create or open your document in LyX and click 
20676 \family sans
20677 \bar under
20678 F
20679 \bar default
20680 ile\SpecialChar \menuseparator
20681
20682 \bar under
20683 V
20684 \bar default
20685 ersion
20686 \begin_inset space ~
20687 \end_inset
20688
20689 Control\SpecialChar \menuseparator
20690
20691 \bar under
20692 R
20693 \bar default
20694 egister.
20695  
20696 \family default
20697 Add a log message and click OK to commit the document to version control.
20698 \end_layout
20699
20700 \begin_layout Standard
20701 From this point onward, you should have full functionality in the 
20702 \family sans
20703 \bar under
20704 F
20705 \bar default
20706 ile\SpecialChar \menuseparator
20707
20708 \bar under
20709 V
20710 \bar default
20711 ersion
20712 \begin_inset space ~
20713 \end_inset
20714
20715 Control
20716 \family default
20717  menu.
20718  You also have the option of checking the document in and out, viewing its
20719  history, etc.
20720  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20721  client program from a command prompt.
20722 \end_layout
20723
20724 \begin_layout Subsubsection
20725 SSH tunnel used with SVN under Windows
20726 \end_layout
20727
20728 \begin_layout Standard
20729 Compared with Linux setting up svn client to communicate over ssh under
20730  Windows is a rather troublesome task.
20731  We will at least offer some hints how to setup the client side but prior
20732  knowledge about ssh and the Windows command line is needed, also be prepared
20733  for a great deal of frustration\SpecialChar \ldots{}
20734
20735 \end_layout
20736
20737 \begin_layout Enumerate
20738 Get a svn client for windows, as described in the previous sections.
20739  When it is a fresh install run some svn command (e.g.
20740  
20741 \begin_inset Flex Code
20742 status collapsed
20743
20744 \begin_layout Plain Layout
20745 svn --version
20746 \end_layout
20747
20748 \end_inset
20749
20750 ) to create config files, which you will need to change later on.
20751 \end_layout
20752
20753 \begin_layout Enumerate
20754 Choose a ssh client for Windows.
20755  There are several possibilities, we will use the one from Putty tools
20756 \begin_inset Foot
20757 status open
20758
20759 \begin_layout Plain Layout
20760 \begin_inset Flex URL
20761 status collapsed
20762
20763 \begin_layout Plain Layout
20764
20765 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20766 \end_layout
20767
20768 \end_inset
20769
20770
20771 \end_layout
20772
20773 \end_inset
20774
20775 .
20776  You will need to set the connection up so that the client doesn't ask for
20777  any password from you.
20778  To keep things easy we will use only keys without any additional password
20779  protection etc.
20780 \end_layout
20781
20782 \begin_deeper
20783 \begin_layout Enumerate
20784 Generate keys by 
20785 \begin_inset Flex Code
20786 status collapsed
20787
20788 \begin_layout Plain Layout
20789 puttygen
20790 \end_layout
20791
20792 \end_inset
20793
20794 .
20795  Save your private .ppk key file and put the public one on the server side.
20796  If the SVN server runs on Linux, note that the format of the public key
20797  is not compatible with Linux openssh and you will need to direcly copy-paste
20798  the key from the “
20799 \emph on
20800 Public key for pasting into OpenSSH authorized_keys file
20801 \emph default
20802 :” edit field into the server's 
20803 \begin_inset Flex Code
20804 status collapsed
20805
20806 \begin_layout Plain Layout
20807 ~/.ssh/authorized_keys
20808 \end_layout
20809
20810 \end_inset
20811
20812
20813 \begin_inset Flex Code
20814 status collapsed
20815
20816 \begin_layout Plain Layout
20817 authorized_keys2
20818 \end_layout
20819
20820 \end_inset
20821
20822  file.
20823 \end_layout
20824
20825 \begin_layout Enumerate
20826 Get the Putty's 
20827 \begin_inset Flex Code
20828 status collapsed
20829
20830 \begin_layout Plain Layout
20831 plink
20832 \end_layout
20833
20834 \end_inset
20835
20836 .
20837  In the SVN config file
20838 \begin_inset Foot
20839 status collapsed
20840
20841 \begin_layout Plain Layout
20842 Exact path depends on Windows version, usually somewhere around 
20843 \begin_inset Flex Code
20844 status collapsed
20845
20846 \begin_layout Plain Layout
20847 c:
20848 \backslash
20849 Documents and Settings
20850 \backslash
20851 user
20852 \backslash
20853 Application Data
20854 \backslash
20855 Subversion
20856 \backslash
20857 config
20858 \end_layout
20859
20860 \end_inset
20861
20862  / 
20863 \begin_inset Flex Code
20864 status collapsed
20865
20866 \begin_layout Plain Layout
20867 AppData
20868 \backslash
20869 Roaming
20870 \backslash
20871 Subversion
20872 \end_layout
20873
20874 \end_inset
20875
20876 .
20877 \end_layout
20878
20879 \end_inset
20880
20881 , section [tunnels], setup ssh command, e.g.
20882  
20883 \begin_inset Flex Code
20884 status collapsed
20885
20886 \begin_layout Plain Layout
20887 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20888 \end_layout
20889
20890 \end_inset
20891
20892 .
20893 \begin_inset Foot
20894 status collapsed
20895
20896 \begin_layout Plain Layout
20897 It will usually take a lot of time to get exact command right and it depends
20898  on many things.
20899  For example do not have some remote server saved as a default session in
20900  Putty etc.
20901  If things fail, try to connect via plink without SVN first.
20902 \end_layout
20903
20904 \end_inset
20905
20906
20907 \end_layout
20908
20909 \end_deeper
20910 \begin_layout Enumerate
20911 Checkout the SVN archive, e.g.
20912  
20913 \begin_inset Flex Code
20914 status collapsed
20915
20916 \begin_layout Plain Layout
20917 svn co svn+ssh://user@server/repository_path
20918 \end_layout
20919
20920 \end_inset
20921
20922 .
20923 \end_layout
20924
20925 \begin_layout Subsubsection
20926 End-of-Line Conversions
20927 \end_layout
20928
20929 \begin_layout Standard
20930 When the collaborators are mixing Linux and Windows environments, LyX will
20931  use different line endings inside the .lyx files.
20932  This is not a problem as far as LyX functionality is concerned, but the
20933  commit diffs will be huge and merge-conflicts prone.
20934  Fortunately SVN itself knows
20935 \begin_inset Foot
20936 status collapsed
20937
20938 \begin_layout Plain Layout
20939 \begin_inset Flex URL
20940 status collapsed
20941
20942 \begin_layout Plain Layout
20943
20944 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20945 \end_layout
20946
20947 \end_inset
20948
20949
20950 \end_layout
20951
20952 \end_inset
20953
20954  how to deal with CR/LF problems when switching .lyx files to the 
20955 \begin_inset Flex Code
20956 status collapsed
20957
20958 \begin_layout Plain Layout
20959 native
20960 \end_layout
20961
20962 \end_inset
20963
20964  mode.
20965 \begin_inset Foot
20966 status collapsed
20967
20968 \begin_layout Plain Layout
20969 For the lazy guys: 
20970 \begin_inset Flex Code
20971 status collapsed
20972
20973 \begin_layout Plain Layout
20974 svn propset svn:eol-style native FILE_NAME
20975 \end_layout
20976
20977 \end_inset
20978
20979
20980 \end_layout
20981
20982 \end_inset
20983
20984
20985 \end_layout
20986
20987 \begin_layout Subsection
20988 Further tuning
20989 \end_layout
20990
20991 \begin_layout Standard
20992 With the recent addition of the vc-command function LyX power users are
20993  allowed to create their own commands for revision control.
20994 \end_layout
20995
20996 \begin_layout Standard
20997 As an example you can see how two TortoiseSVN commands could be integrated
20998  directly:
20999 \end_layout
21000
21001 \begin_layout Description
21002 Commit: 
21003 \begin_inset Flex Code
21004 status collapsed
21005
21006 \begin_layout Plain Layout
21007 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21008 \end_layout
21009
21010 \end_inset
21011
21012
21013 \end_layout
21014
21015 \begin_layout Description
21016 Revert: 
21017 \begin_inset Flex Code
21018 status collapsed
21019
21020 \begin_layout Plain Layout
21021 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21022 \end_layout
21023
21024 \end_inset
21025
21026
21027 \end_layout
21028
21029 \begin_layout Subsection
21030 Version control and Document comparison
21031 \end_layout
21032
21033 \begin_layout Standard
21034 One of the typical uses of version control is to inspect the changes between
21035  revisions, usually by creating 
21036 \begin_inset Flex Code
21037 status collapsed
21038
21039 \begin_layout Plain Layout
21040 diff
21041 \end_layout
21042
21043 \end_inset
21044
21045  dumps.
21046  While this is useful for plain text files, it is much less useful in the
21047  case of LyX files, which have more complicated structure.
21048  Hence we provide binding to the Document comparison feature.
21049  They are two ways of calling this feature - either by direct call of 
21050 \begin_inset Flex Code
21051 status collapsed
21052
21053 \begin_layout Plain Layout
21054 VC_COMPARE
21055 \end_layout
21056
21057 \end_inset
21058
21059  LyX function (for details see LyX functions manual) or by icon/menu item
21060  
21061 \begin_inset Flex MenuItem
21062 status collapsed
21063
21064 \begin_layout Plain Layout
21065 Compare with older revision...
21066 \end_layout
21067
21068 \end_inset
21069
21070 .
21071  One can either compare two chosen revisions of the document or he can simply
21072  compare the current version of edited text with older revisions (where
21073  '
21074 \begin_inset Flex MenuItem
21075 status collapsed
21076
21077 \begin_layout Plain Layout
21078 0
21079 \end_layout
21080
21081 \end_inset
21082
21083 ' revisions back means comparison of the edited file with last commited
21084  revision).
21085  
21086 \end_layout
21087
21088 \begin_layout Standard
21089 This feature is supported for SVN and RCS though due to the more complicated
21090  versioning scheme of RCS there is a constraint -- when addressing the revisions
21091  in dialog, numbers always point to the last number in RCS revision number,
21092  i.e.
21093  '35' in '1.2.35'.
21094 \end_layout
21095
21096 \begin_layout Section
21097 Literate Programming
21098 \end_layout
21099
21100 \begin_layout Standard
21101 Updated by 
21102 \noun on
21103 Kayvan Sylvan 
21104 \noun default
21105 (kayvan@sylvan.com)
21106 \noun on
21107
21108 \noun default
21109 original documentation written by 
21110 \noun on
21111 Edmar Wienskoski Jr.
21112
21113 \noun default
21114  (edmar-w-jr@technologist.com)
21115 \end_layout
21116
21117 \begin_layout Subsection
21118 Introduction
21119 \end_layout
21120
21121 \begin_layout Standard
21122 The main purpose of this documentation is to show you how to use LyX for
21123  literate programming, where it is assumed that you are familiar with this
21124  programming technique, and know what 
21125 \begin_inset Quotes eld
21126 \end_inset
21127
21128 tangling
21129 \begin_inset Quotes erd
21130 \end_inset
21131
21132  and 
21133 \begin_inset Quotes eld
21134 \end_inset
21135
21136 weaving
21137 \begin_inset Quotes erd
21138 \end_inset
21139
21140  means.
21141  If that is not the case, please follow the web links provided in the following
21142  sections.
21143  There is a lot of good documentation out there covering old development
21144  history to the latest tools tips.
21145 \end_layout
21146
21147 \begin_layout Standard
21148 It is also assumed that you are familiar with LyX itself to a point that
21149  you are comfortable changing your LyX preferences, and X resources file.
21150  If that is not the case please refer to other LyX documentation to cover
21151  your specific needs.
21152 \end_layout
21153
21154 \begin_layout Subsection
21155 Literate Programming
21156 \end_layout
21157
21158 \begin_layout Standard
21159 From the Literate Programming FAQ: 
21160 \end_layout
21161
21162 \begin_layout Quotation
21163 Literate programming is the combination of documentation and source together
21164  in a fashion suited for reading by human beings.
21165  In fact, literate programs should be enjoyable reading, even inviting!
21166  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21167  and documentation in a single file.
21168  Literate programming tools then parse the file to produce either readable
21169  documentation or compilable source.
21170  The WEB style of literate programming was created by D.
21171 \begin_inset space \thinspace{}
21172 \end_inset
21173
21174 E.
21175  Knuth during the development of his TeX typesetting software.
21176  
21177 \end_layout
21178
21179 \begin_layout Standard
21180 Another excerpt says:
21181 \end_layout
21182
21183 \begin_layout Quotation
21184
21185 \emph on
21186 How is literate programming different from verbose commenting?
21187 \end_layout
21188
21189 \begin_layout Quotation
21190 There are three distinguishing characteristics.
21191  In order of importance, they are: 
21192 \end_layout
21193
21194 \begin_deeper
21195 \begin_layout Itemize
21196 flexible order of elaboration 
21197 \end_layout
21198
21199 \begin_layout Itemize
21200 automatic support for browsing 
21201 \end_layout
21202
21203 \begin_layout Itemize
21204 typeset documentation, especially diagrams and mathematics 
21205 \end_layout
21206
21207 \end_deeper
21208 \begin_layout Standard
21209 Now that I sparked your curiosity, take a look in the references.
21210 \end_layout
21211
21212 \begin_layout Subsubsection
21213 References
21214 \end_layout
21215
21216 \begin_layout Standard
21217 The complete Literate Programming FAQ can be found at:
21218 \end_layout
21219
21220 \begin_layout Quote
21221 Literate Programming FAQ 
21222 \begin_inset Flex URL
21223 status collapsed
21224
21225 \begin_layout Plain Layout
21226
21227 http://www.literateprogramming.com/lpfaq.pdf
21228 \end_layout
21229
21230 \end_inset
21231
21232
21233 \end_layout
21234
21235 \begin_layout Standard
21236 The FAQ lists 23 (twenty three!) different literate programming tools.
21237  Where some are specialized or 
21238 \begin_inset Quotes eld
21239 \end_inset
21240
21241 tailored
21242 \begin_inset Quotes erd
21243 \end_inset
21244
21245  for particular programming languages, while other have general scope.
21246  I selected 
21247 \noun on
21248 Noweb
21249 \noun default
21250  for my own use for several reasons:
21251 \end_layout
21252
21253 \begin_layout Itemize
21254 It can generate the documentation either in LaTeX or HTML.
21255 \end_layout
21256
21257 \begin_layout Itemize
21258 It has a open architecture, i.
21259 \begin_inset space \thinspace{}
21260 \end_inset
21261
21262 g.
21263 \begin_inset space \space{}
21264 \end_inset
21265
21266 it is easy to plug in new filters and to perform special processing that
21267  you may need.
21268  
21269 \end_layout
21270
21271 \begin_layout Itemize
21272 There is a good selection of filters available already (the HTML is one
21273  of them).
21274 \end_layout
21275
21276 \begin_layout Itemize
21277 It is free.
21278 \end_layout
21279
21280 \begin_layout Standard
21281 The Noweb web page can be found at: 
21282 \end_layout
21283
21284 \begin_layout Quote
21285 Noweb home page 
21286 \begin_inset Flex URL
21287 status collapsed
21288
21289 \begin_layout Plain Layout
21290
21291 http://www.cs.virginia.edu/~nr/noweb/
21292 \end_layout
21293
21294 \end_inset
21295
21296
21297 \end_layout
21298
21299 \begin_layout Standard
21300 Starting from there you can reach many other interesting links and even
21301  some literate program examples.
21302 \end_layout
21303
21304 \begin_layout Subsection
21305 LyX and Literate Programming
21306 \end_layout
21307
21308 \begin_layout Standard
21309 The LyX support for Literate Programming is provided by using the generic
21310  LyX converters mechanism.
21311  This support is provided in a 
21312 \begin_inset Quotes eld
21313 \end_inset
21314
21315 Noweb independent
21316 \begin_inset Quotes erd
21317 \end_inset
21318
21319  way, i.
21320 \begin_inset space \thinspace{}
21321 \end_inset
21322
21323 g.
21324 \begin_inset space \space{}
21325 \end_inset
21326
21327 you will be able to use this new LyX feature with some other literate programmin
21328 g tool of your choice by just changing your LyX preferences.
21329 \end_layout
21330
21331 \begin_layout Subsubsection
21332 Generating documents and code (weaving and tangling)
21333 \end_layout
21334
21335 \begin_layout Paragraph
21336 Selecting the document class
21337 \end_layout
21338
21339 \begin_layout Standard
21340 If you have installed Noweb and LyX successfully, whenever you open a new
21341  document or try to change the document class of an existing one, you will
21342  find that there are three new document classes available:
21343 \end_layout
21344
21345 \begin_layout Itemize
21346 Article (Noweb)
21347 \end_layout
21348
21349 \begin_layout Itemize
21350 Book (Noweb)
21351 \end_layout
21352
21353 \begin_layout Itemize
21354 Report (Noweb)
21355 \end_layout
21356
21357 \begin_layout Standard
21358 You must select one of them to create your literate documents from.
21359  
21360 \end_layout
21361
21362 \begin_layout Standard
21363 Note that literate documents are not limited to these three classes.
21364  New classes can be generated from other styles like letter or in combination
21365  with other class variations like Article (AMS).
21366  If you have special needs that cannot be covered by one of the existing
21367  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21368  will arrange to insert a new entry, or teach you how to do it.
21369 \begin_inset Foot
21370 status collapsed
21371
21372 \begin_layout Plain Layout
21373 It is very simple, it involves the creation of a file with four lines, and
21374  re-running of the auto configuration.
21375 \end_layout
21376
21377 \end_inset
21378
21379  Moreover, if you use a literate tool other than Noweb you may need to create
21380  a new set of document classes for it.
21381 \end_layout
21382
21383 \begin_layout Paragraph
21384 Typing code in
21385 \end_layout
21386
21387 \begin_layout Standard
21388 LyX enables you to write code with a layout named 
21389 \noun on
21390 Scrap
21391 \noun default
21392 .
21393 \begin_inset Foot
21394 status collapsed
21395
21396 \begin_layout Plain Layout
21397 The equivalent Noweb term is 
21398 \begin_inset Quotes eld
21399 \end_inset
21400
21401 Chunk
21402 \begin_inset Quotes erd
21403 \end_inset
21404
21405 .
21406  For historical reasons, I got used to the term 
21407 \begin_inset Quotes eld
21408 \end_inset
21409
21410 scrap
21411 \begin_inset Quotes erd
21412 \end_inset
21413
21414  introduced by other literate tool named Nuweb, which I used for many years
21415  before rendering myself to Noweb.
21416 \end_layout
21417
21418 \end_inset
21419
21420  Noweb delimits scraps like this:
21421 \end_layout
21422
21423 \begin_layout LyX-Code
21424 <<My scrap>>=
21425 \end_layout
21426
21427 \begin_layout LyX-Code
21428   code
21429 \end_layout
21430
21431 \begin_layout LyX-Code
21432   more code
21433 \end_layout
21434
21435 \begin_layout LyX-Code
21436   even more code
21437 \end_layout
21438
21439 \begin_layout LyX-Code
21440   @
21441 \end_layout
21442
21443 \begin_layout Standard
21444 The problem is that whatever is written in between the << and the 
21445 \family typewriter
21446 @
21447 \family default
21448  must be taken literally, i.
21449 \begin_inset space \thinspace{}
21450 \end_inset
21451
21452 g.
21453 \begin_inset space \space{}
21454 \end_inset
21455
21456 LyX should be prevented from making any special interpretation of what has
21457  been written.
21458  This is handled by a special layout named Scrap, that works like a normal
21459  paragraph but has a free spacing capability.
21460 \end_layout
21461
21462 \begin_layout Standard
21463 The down side of the Scrap paragraph layout is that consecutive paragraphs
21464  of code will be spaced with one empty line in the source code and also
21465  in the printed documentation.
21466  The work around is to enter each line of code within a single Scrap, with
21467  a newline (ctrl-return).
21468  The example above will look like this:
21469 \begin_inset Foot
21470 status collapsed
21471
21472 \begin_layout Plain Layout
21473 If you have a printed version of this document you will not see any difference
21474  between the previous example and this one.
21475 \end_layout
21476
21477 \end_inset
21478
21479
21480 \end_layout
21481
21482 \begin_layout LyX-Code
21483 <<My scrap>>=
21484 \begin_inset Newline newline
21485 \end_inset
21486
21487   code
21488 \begin_inset Newline newline
21489 \end_inset
21490
21491   more code
21492 \begin_inset Newline newline
21493 \end_inset
21494
21495   even more code
21496 \begin_inset Newline newline
21497 \end_inset
21498
21499   @
21500 \end_layout
21501
21502 \begin_layout Standard
21503 This layout works fine.
21504  The only real inconvenience is that you have to type ctrl-return instead
21505  of a plain return.
21506 \begin_inset Foot
21507 status collapsed
21508
21509 \begin_layout Plain Layout
21510 It is in my list of 
21511 \begin_inset Quotes eld
21512 \end_inset
21513
21514 improvements
21515 \begin_inset Quotes erd
21516 \end_inset
21517
21518  to fix that.
21519 \end_layout
21520
21521 \end_inset
21522
21523
21524 \end_layout
21525
21526 \begin_layout Standard
21527 As a special note, you can also use the 
21528 \begin_inset Quotes eld
21529 \end_inset
21530
21531 %def
21532 \begin_inset Quotes erd
21533 \end_inset
21534
21535  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21536 rence:
21537 \end_layout
21538
21539 \begin_layout LyX-Code
21540 <<My scrap>>=
21541 \begin_inset Newline newline
21542 \end_inset
21543
21544   def some_function(args):
21545 \begin_inset Newline newline
21546 \end_inset
21547
21548     "This is the doc string for this function."
21549 \begin_inset Newline newline
21550 \end_inset
21551
21552     print "My args: ", args
21553 \end_layout
21554
21555 \begin_layout LyX-Code
21556 @ %def some_function
21557 \end_layout
21558
21559 \begin_layout Standard
21560 For an example of this usage and the resulting cross-reference output, look
21561  at the Literate python program in 
21562 \emph on
21563 LIBDIR/examples/listerrors.lyx
21564 \emph default
21565  which should make this all clear.
21566 \end_layout
21567
21568 \begin_layout Paragraph
21569 Generating the documentation
21570 \end_layout
21571
21572 \begin_layout Standard
21573 At this point you already have a new document file with a proper document
21574  class, and with some code and text on it.
21575  How do I print it? The answer is simple, you select 
21576 \family sans
21577 View\SpecialChar \menuseparator
21578 DVI,
21579 \family default
21580  etc.
21581  Just like you would do for a plain document.
21582  No special procedure is required.
21583 \end_layout
21584
21585 \begin_layout Standard
21586 To help orientate you, I will now explain what happens inside LyX:
21587 \end_layout
21588
21589 \begin_layout Enumerate
21590 When the 
21591 \family sans
21592 Update\SpecialChar \menuseparator
21593 DVI
21594 \family default
21595  menu option is chosen, a LaTeX file is generated.
21596  
21597 \end_layout
21598
21599 \begin_deeper
21600 \begin_layout Standard
21601 If the document is of any literate class the generated file will be named
21602  with an extension name defined by the 
21603 \begin_inset Quotes eld
21604 \end_inset
21605
21606 literate
21607 \begin_inset Quotes erd
21608 \end_inset
21609
21610  format (defined in the Preferences panel), otherwise the file will have
21611  the usual 
21612 \family typewriter
21613 .tex
21614 \family default
21615  extension.
21616 \end_layout
21617
21618 \end_deeper
21619 \begin_layout Enumerate
21620 Note that the only difference so far is in the name of the file, no special
21621  processing is required by LyX.
21622  Given that you formatted the code using the Scrap layout that, by itself,
21623  takes care of the business.
21624 \end_layout
21625
21626 \begin_layout Enumerate
21627 If the document is of any literate class LyX will then use the internal
21628  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21629 \begin_inset Foot
21630 status collapsed
21631
21632 \begin_layout Plain Layout
21633 The converters are defined in the 
21634 \family sans
21635 Tools\SpecialChar \menuseparator
21636 Preferences
21637 \family default
21638  panel, under the 
21639 \begin_inset Quotes eld
21640 \end_inset
21641
21642 Conversion
21643 \begin_inset Quotes erd
21644 \end_inset
21645
21646  tab.
21647  See section 
21648 \emph on
21649 Converters
21650 \emph default
21651  of the 
21652 \emph on
21653 Customization
21654 \emph default
21655  manual for general information about converters.
21656 \end_layout
21657
21658 \end_inset
21659
21660  to generate the LaTeX file.
21661 \end_layout
21662
21663 \begin_deeper
21664 \begin_layout Standard
21665 Otherwise it will just skip this step.
21666 \end_layout
21667
21668 \end_deeper
21669 \begin_layout Enumerate
21670 Finally, LaTeX is invoked and the regular post processing continues as in
21671  a plain document.
21672 \end_layout
21673
21674 \begin_layout Standard
21675 Independence from a particular 
21676 \begin_inset Quotes eld
21677 \end_inset
21678
21679 literate tool
21680 \begin_inset Quotes erd
21681 \end_inset
21682
21683  is easily achieved by changing the commands that are run by the various
21684  converters.
21685 \end_layout
21686
21687 \begin_layout Paragraph
21688 Generating the code
21689 \end_layout
21690
21691 \begin_layout Standard
21692 When the build menu option is chosen or the corresponding button in the
21693  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21694  Next, LyX invokes the 
21695 \family typewriter
21696 Noweb->Program
21697 \family default
21698  converter.
21699  This converter needs to be defined by the user and is not installed by
21700  default, though the Program format is.
21701  This converter (like any other converter) will have two parts:
21702 \end_layout
21703
21704 \begin_layout Enumerate
21705 The converter program itself.
21706  This program performs the conversion from the one format to the other (in
21707  this case, from the Noweb format to the Program pseudo-format).
21708 \end_layout
21709
21710 \begin_layout Enumerate
21711 The error log parser.
21712  This is a program whose sole purpose is to rewrite error messages in a
21713  format that LyX understands.
21714  This makes it possible for LyX to place error boxes in the right places
21715  in the file buffer.
21716 \end_layout
21717
21718 \begin_layout Standard
21719 The first part, the 
21720 \begin_inset Quotes eld
21721 \end_inset
21722
21723 Converter
21724 \begin_inset Quotes erd
21725 \end_inset
21726
21727  setting, should be set to 
21728 \begin_inset Quotes eld
21729 \end_inset
21730
21731
21732 \family typewriter
21733 build-script $$i
21734 \family default
21735
21736 \begin_inset Quotes erd
21737 \end_inset
21738
21739 .
21740  This basically means that LyX will call 
21741 \begin_inset Quotes eld
21742 \end_inset
21743
21744 build-script
21745 \begin_inset Quotes erd
21746 \end_inset
21747
21748  (a program or script) with the name of the Noweb file (normally a file
21749  in the LyX temp directory).
21750  
21751 \end_layout
21752
21753 \begin_layout Standard
21754 This is an implementation of 
21755 \begin_inset Quotes eld
21756 \end_inset
21757
21758 build-script
21759 \begin_inset Quotes erd
21760 \end_inset
21761
21762  that you can place in a directory on your path:
21763 \end_layout
21764
21765 \begin_layout LyX-Code
21766 #!/bin/sh
21767 \end_layout
21768
21769 \begin_layout LyX-Code
21770 #
21771 \end_layout
21772
21773 \begin_layout LyX-Code
21774 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21775 \end_layout
21776
21777 \begin_layout Standard
21778 The next part of the converter setting is the 
21779 \begin_inset Quotes eld
21780 \end_inset
21781
21782 Flags
21783 \begin_inset Quotes erd
21784 \end_inset
21785
21786  which is to be set to 
21787 \begin_inset Quotes eld
21788 \end_inset
21789
21790
21791 \family typewriter
21792 parselog=listerrors
21793 \family default
21794
21795 \begin_inset Quotes erd
21796 \end_inset
21797
21798 .
21799  This will run any errors that are generated by the 
21800 \begin_inset Quotes eld
21801 \end_inset
21802
21803 build-script
21804 \begin_inset Quotes erd
21805 \end_inset
21806
21807  process through the 
21808 \begin_inset Quotes eld
21809 \end_inset
21810
21811 listerrors
21812 \begin_inset Quotes erd
21813 \end_inset
21814
21815  program.
21816 \end_layout
21817
21818 \begin_layout Standard
21819 The converter code looks in 
21820 \emph on
21821 MYLYXDIR/scripts
21822 \emph default
21823  first, then in 
21824 \emph on
21825 LIBDIR/scripts
21826 \emph default
21827  then on the path for the 
21828 \begin_inset Quotes eld
21829 \end_inset
21830
21831 listerrors
21832 \begin_inset Quotes erd
21833 \end_inset
21834
21835  program.
21836 \end_layout
21837
21838 \begin_layout Standard
21839 The build will normally take place in LyX's temporary directory, so the
21840  files produced by the conversion will be in that directory.
21841  LyX will copy out what it regards as the `main' file, but the 
21842 \family typewriter
21843 Noweb->Program
21844 \family default
21845  conversion may produce several files, and so most of these would then be
21846  deleted when LyX was closed.
21847  The present solution is to use a `copier',
21848 \begin_inset Foot
21849 status collapsed
21850
21851 \begin_layout Plain Layout
21852 See section 
21853 \emph on
21854 Copiers
21855 \emph default
21856  of the 
21857 \emph on
21858 Customization
21859 \emph default
21860  manual for information on these.
21861 \end_layout
21862
21863 \end_inset
21864
21865  in this case, the 
21866 \family typewriter
21867 ext_copy.py
21868 \family default
21869  script in its default mode, so that the entire contents of the temporary
21870  directory is copied.
21871  More will get copied than is needed, to be sure, but nothing will be lost.
21872  If, however, you know what extensions the generated files will have, this
21873  can be improved by using the 
21874 \family typewriter
21875 -e
21876 \family default
21877  option to 
21878 \family typewriter
21879 ext_copy
21880 \family default
21881 .
21882  This option takes a comma-separated list of extensions to copy.
21883  So, for example, if the conversion will generate only files with the extensions
21884  
21885 \family typewriter
21886 .c
21887 \family default
21888  and 
21889 \family typewriter
21890 .h
21891 \family default
21892 , then the correct definition would be:
21893 \end_layout
21894
21895 \begin_layout LyX-Code
21896 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21897 \end_layout
21898
21899 \begin_layout Standard
21900 The result will be that only files with these two extensions will be copied
21901  out.
21902 \end_layout
21903
21904 \begin_layout Paragraph
21905 Build instructions in the document
21906 \end_layout
21907
21908 \begin_layout Standard
21909 The last piece of the integration between LyX and noweb is the 
21910 \begin_inset Quotes eld
21911 \end_inset
21912
21913 build-script
21914 \begin_inset Quotes erd
21915 \end_inset
21916
21917  scrap.
21918  Generally, the instructions for building your program should be embedded
21919  in a scrap of its own.
21920  The noweb-specific 
21921 \begin_inset Quotes eld
21922 \end_inset
21923
21924 build-script
21925 \begin_inset Quotes erd
21926 \end_inset
21927
21928  above uses the notangle command to look for this scrap (called 
21929 \begin_inset Quotes eld
21930 \end_inset
21931
21932 build-script
21933 \begin_inset Quotes erd
21934 \end_inset
21935
21936 ) and runs its contents through 
21937 \begin_inset Quotes eld
21938 \end_inset
21939
21940 sh
21941 \begin_inset Quotes erd
21942 \end_inset
21943
21944 .
21945 \end_layout
21946
21947 \begin_layout Standard
21948 Typically, such a scrap would look something like this:
21949 \end_layout
21950
21951 \begin_layout LyX-Code
21952 <<build-script>>=
21953 \begin_inset Newline newline
21954 \end_inset
21955
21956 #!/bin/sh
21957 \begin_inset Newline newline
21958 \end_inset
21959
21960
21961 \begin_inset Newline newline
21962 \end_inset
21963
21964 if [ -z "${NOWEB_SOURCE}" ]
21965 \begin_inset Newline newline
21966 \end_inset
21967
21968 then
21969 \begin_inset Newline newline
21970 \end_inset
21971
21972   NOWEB_SOURCE=myfile.nw
21973 \begin_inset Newline newline
21974 \end_inset
21975
21976 fi
21977 \begin_inset Newline newline
21978 \end_inset
21979
21980 [...
21981  code to extract files ...]
21982 \begin_inset Newline newline
21983 \end_inset
21984
21985 [...
21986  code to compile files ...]
21987 \begin_inset Newline newline
21988 \end_inset
21989
21990 @
21991 \end_layout
21992
21993 \begin_layout Standard
21994 Look in 
21995 \emph on
21996 LIBDIR/examples/listerrors.lyx
21997 \emph default
21998  or in 
21999 \emph on
22000 LIBDIR/examples/Literate.lyx
22001 \emph default
22002  which implement two versions of the 
22003 \begin_inset Quotes eld
22004 \end_inset
22005
22006 listerrors
22007 \begin_inset Quotes erd
22008 \end_inset
22009
22010  program for some illustrations of how all of these pieces go together or
22011  in 
22012 \emph on
22013 LIBDIR/examples/noweb2lyx.lyx.
22014
22015 \emph default
22016  Interestingly, these three files show off the language-indepence of the
22017  LyX literate programming support since they are written in Python, C and
22018  Perl respectively.
22019 \end_layout
22020
22021 \begin_layout Subsubsection
22022 Configuring LyX
22023 \end_layout
22024
22025 \begin_layout Standard
22026 All the Literate Programming support is configured by the 
22027 \family sans
22028 Tools\SpecialChar \menuseparator
22029 Preferences
22030 \family default
22031  panel in the 
22032 \begin_inset Quotes eld
22033 \end_inset
22034
22035 Conversion
22036 \begin_inset Quotes erd
22037 \end_inset
22038
22039  tab.
22040  The important parts are:
22041 \end_layout
22042
22043 \begin_layout Description
22044 the
22045 \begin_inset space ~
22046 \end_inset
22047
22048
22049 \begin_inset Quotes eld
22050 \end_inset
22051
22052 literate
22053 \begin_inset Quotes erd
22054 \end_inset
22055
22056
22057 \begin_inset space ~
22058 \end_inset
22059
22060 format Set up via the Formats tab, this is where the Noweb-specific pieces
22061  are set up.
22062  The 
22063 \family sans
22064 GUI Name
22065 \family default
22066  is set to 
22067 \family typewriter
22068 NoWeb
22069 \family default
22070 , the file extension is set to 
22071 \family typewriter
22072 .nw
22073 \family default
22074 .
22075  This tells LyX to create a file with a 
22076 \family typewriter
22077 .nw
22078 \family default
22079  extension in the first step of the conversion process.
22080 \end_layout
22081
22082 \begin_layout Description
22083 the
22084 \begin_inset space ~
22085 \end_inset
22086
22087
22088 \family sans
22089 Program
22090 \family default
22091
22092 \begin_inset space ~
22093 \end_inset
22094
22095 format This is an empty format whose sole purpose is to be the endpoint
22096  of a conversion (which then allows us to set up a converter for it).
22097 \end_layout
22098
22099 \begin_layout Description
22100
22101 \family sans
22102 NoWeb
22103 \family default
22104 ->
22105 \family sans
22106 LaTeX
22107 \family default
22108  This converter performs the 
22109 \begin_inset Quotes eld
22110 \end_inset
22111
22112 weaving
22113 \begin_inset Quotes erd
22114 \end_inset
22115
22116  of the literate document.
22117  For Noweb, it is set to 
22118 \begin_inset Quotes eld
22119 \end_inset
22120
22121
22122 \family typewriter
22123 noweave -delay -index $$i > $$o
22124 \family default
22125
22126 \begin_inset Quotes erd
22127 \end_inset
22128
22129
22130 \end_layout
22131
22132 \begin_layout Description
22133
22134 \family sans
22135 NoWeb
22136 \family default
22137 ->
22138 \family sans
22139 Program
22140 \family default
22141  This performs the 
22142 \begin_inset Quotes eld
22143 \end_inset
22144
22145 tangling step
22146 \begin_inset Quotes erd
22147 \end_inset
22148
22149 .
22150  As stated above, the Converter is set to 
22151 \begin_inset Quotes eld
22152 \end_inset
22153
22154
22155 \family typewriter
22156 build-script $$i
22157 \family default
22158
22159 \begin_inset Quotes erd
22160 \end_inset
22161
22162 , with Flags set to 
22163 \begin_inset Quotes eld
22164 \end_inset
22165
22166
22167 \family typewriter
22168 originaldir,parselog=listerrors
22169 \family default
22170
22171 \begin_inset Quotes erd
22172 \end_inset
22173
22174 .
22175 \end_layout
22176
22177 \begin_layout Subsubsection
22178 Debug extensions
22179 \end_layout
22180
22181 \begin_layout Standard
22182 There is also a new function implemented in the LyX server, the 
22183 \begin_inset Quotes eld
22184 \end_inset
22185
22186 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22187  
22188 \end_layout
22189
22190 \begin_layout Standard
22191 When debugging code with ddd/gdb, it is possible to invoke a text editor
22192  at the current execution position with a single key stroke.
22193  The default ddd configuration for that is shift-ctrl-V.
22194  It happens that you can define the editor command line invocation in ddd
22195  by accessing the 
22196 \family sans
22197 Edit\SpecialChar \menuseparator
22198 Preferences\SpecialChar \menuseparator
22199 Helpers
22200 \family default
22201  dialog and changing the "Edit Sources" entry.
22202 \end_layout
22203
22204 \begin_layout Standard
22205 I take advantage of the new created LyX server function and this ddd feature,
22206  and set 
22207 \begin_inset Quotes eld
22208 \end_inset
22209
22210 Edit Sources
22211 \begin_inset Quotes erd
22212 \end_inset
22213
22214  to:
22215 \end_layout
22216
22217 \begin_layout LyX-Code
22218 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22219 \end_layout
22220
22221 \begin_layout Standard
22222 With this, whenever you are using ddd and find a point in the program that
22223  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22224  ddd you forward this information to LyX through the LyX server and then
22225  the LyX window will show the same file with the cursor at the same position
22226  ddd was pointing to.
22227  No more guessing or long scrolling to locate a point in the program back
22228  from debugging !
22229 \end_layout
22230
22231 \begin_layout Standard
22232 Note however that you must enable the LyX server to get this feature working
22233  (it is disabled by default).
22234  You can enable it in 
22235 \family sans
22236 Preferences
22237 \family default
22238  (tabs 
22239 \family sans
22240 Inputs
22241 \family default
22242
22243 \family sans
22244 Paths
22245 \family default
22246 ) by entering in the 
22247 \family sans
22248 LyXserver pipe
22249 \family default
22250  a path like 
22251 \begin_inset Quotes eld
22252 \end_inset
22253
22254
22255 \family typewriter
22256 /home/<your-home-directory>/.lyx/lyxpipe
22257 \family default
22258
22259 \begin_inset Quotes erd
22260 \end_inset
22261
22262
22263 \end_layout
22264
22265 \begin_layout Standard
22266 Read the LyX server documentation in the 
22267 \emph on
22268 Customization Manual
22269 \emph default
22270  for further information.
22271 \end_layout
22272
22273 \begin_layout Subsubsection
22274 Toolbar extensions
22275 \end_layout
22276
22277 \begin_layout Standard
22278 There are six new buttons that can be added to your LyX toolbar.
22279  Five of these buttons are short cuts to layout styles: 
22280 \family sans
22281 Standard
22282 \family default
22283
22284 \family sans
22285 Section
22286 \family default
22287
22288 \family sans
22289 LaTeX
22290 \family default
22291
22292 \family sans
22293 LyX-Code
22294 \family default
22295 , and 
22296 \family sans
22297 Scrap
22298 \family default
22299 .
22300  The last one is a short cut to the 
22301 \begin_inset Quotes eld
22302 \end_inset
22303
22304 Build Program
22305 \begin_inset Quotes erd
22306 \end_inset
22307
22308  File menu entry.
22309  
22310 \end_layout
22311
22312 \begin_layout Standard
22313 LyX has a range of buttons that are available for tool bar customization.
22314  In my toolbar I like to combine the six short cuts above with two more:
22315  One for 
22316 \family sans
22317 View
22318 \family default
22319 \SpecialChar \menuseparator
22320
22321 \family sans
22322 Update
22323 \family default
22324 \SpecialChar \menuseparator
22325
22326 \family sans
22327 DVI
22328 \family default
22329  and the other for 
22330 \family sans
22331 View\SpecialChar \menuseparator
22332 DVI
22333 \family default
22334  File menu entries.
22335  Here is how it looks like:
22336 \end_layout
22337
22338 \begin_layout LyX-Code
22339 Toolbar
22340 \end_layout
22341
22342 \begin_layout LyX-Code
22343   Layouts
22344 \end_layout
22345
22346 \begin_layout LyX-Code
22347   Icon "layout Standard"
22348 \end_layout
22349
22350 \begin_layout LyX-Code
22351   Icon "layout Section"
22352 \end_layout
22353
22354 \begin_layout LyX-Code
22355   Icon "layout LaTeX"
22356 \end_layout
22357
22358 \begin_layout LyX-Code
22359   Icon "layout LyX-Code"
22360 \end_layout
22361
22362 \begin_layout LyX-Code
22363   Icon "layout Scrap"
22364 \end_layout
22365
22366 \begin_layout LyX-Code
22367   Separator
22368 \end_layout
22369
22370 \begin_layout LyX-Code
22371   Icon "buffer-view"
22372 \end_layout
22373
22374 \begin_layout LyX-Code
22375   Icon "buffer-typeset"
22376 \end_layout
22377
22378 \begin_layout LyX-Code
22379   Icon "build-program"
22380 \end_layout
22381
22382 \begin_layout LyX-Code
22383   Separator
22384 \end_layout
22385
22386 \begin_layout LyX-Code
22387 .
22388 \end_layout
22389
22390 \begin_layout LyX-Code
22391 .
22392 \end_layout
22393
22394 \begin_layout LyX-Code
22395 .
22396 \end_layout
22397
22398 \begin_layout LyX-Code
22399 End
22400 \end_layout
22401
22402 \begin_layout Subsubsection
22403 Colors customization
22404 \end_layout
22405
22406 \begin_layout Standard
22407 There are a number of colors in LyX that can be customized in 
22408 \family sans
22409 Preferences
22410 \family default
22411 .
22412  One of the things that bothers people is the LaTeX font color.
22413  The default color is red, since the scraps uses LaTeX font, and there is
22414  a lot of scraps in literate documents, you may get tired of seeing everything
22415  in red.
22416  You can change it by going to the tabs 
22417 \family sans
22418 Look&Feel
22419 \family default
22420
22421 \family sans
22422 Colors.
22423 \end_layout
22424
22425 \begin_layout Standard
22426 The next thing is the visible presence of the newline character in the screen.
22427  You can choose the color of this particular character and make it blend
22428  in the background.
22429  I recommend you choosing a color that is close to the background but not
22430  equal, that way you still can see it is there, but it is not bothering
22431  you anymore.
22432  
22433 \end_layout
22434
22435 \begin_layout Chapter
22436 Special features
22437 \end_layout
22438
22439 \begin_layout Standard
22440 You can do everything with LyX that you can do with LaTeX.
22441  However, LyX cannot support every LaTeX feature directly.
22442  But you can always use TeX Code.
22443  This chapter shows you some more special things you might want to use.
22444  For other special things you can do with figures, tables, floats, boxes
22445  and notes, have a look at the 
22446 \emph on
22447 EmbeddedObjects
22448 \emph default
22449  manual.
22450 \end_layout
22451
22452 \begin_layout Section
22453 Multiple Text Columns
22454 \end_layout
22455
22456 \begin_layout Standard
22457 This feature is independent of the option 
22458 \family sans
22459 Two-column document
22460 \family default
22461  in the document settings under 
22462 \family sans
22463 Text Layout
22464 \family default
22465 .
22466  If you want to have 2
22467 \begin_inset space ~
22468 \end_inset
22469
22470 columns for the whole document, it is recommended to use the 
22471 \family sans
22472 Two-column document
22473 \family default
22474  option.
22475  For all other cases use this feature.
22476 \end_layout
22477
22478 \begin_layout Standard
22479 To use multiple text columns in your document, you have to load the module
22480  
22481 \family sans
22482 Multiple Columns
22483 \family default
22484  (menu 
22485 \family sans
22486 Document\SpecialChar \menuseparator
22487 Settings\SpecialChar \menuseparator
22488 Modules
22489 \family default
22490 ) and must have the LaTeX-package 
22491 \series bold
22492 multicol
22493 \series default
22494
22495 \begin_inset Index idx
22496 status collapsed
22497
22498 \begin_layout Plain Layout
22499 LaTeX-packages ! multicol
22500 \end_layout
22501
22502 \end_inset
22503
22504  installed.
22505 \end_layout
22506
22507 \begin_layout Standard
22508 Footnotes within multiple columns will be placed at the bottom of the page
22509  and not under each column.
22510  Within the different columns you can use everything, with the limitation
22511  that for floats you need to use the float option 
22512 \family sans
22513 Span columns
22514 \family default
22515 .
22516 \end_layout
22517
22518 \begin_layout Subsection
22519 Basics
22520 \end_layout
22521
22522 \begin_layout Standard
22523 If you want to have 2 columns in your text, use the style 
22524 \family sans
22525 Begin Multiple Columns
22526 \family default
22527  where the columns should start.
22528  The content of the style is the number of the columns, so in this case
22529  use a 
22530 \begin_inset Quotes eld
22531 \end_inset
22532
22533 2
22534 \begin_inset Quotes erd
22535 \end_inset
22536
22537 .
22538  At the point where the columns should end use the style 
22539 \family sans
22540 End Multiple Columns
22541 \family default
22542  and keep it empty.
22543 \end_layout
22544
22545 \begin_layout Standard
22546 Here is an example:
22547 \end_layout
22548
22549 \begin_layout Begin Multiple Columns
22550 2
22551 \end_layout
22552
22553 \begin_layout Standard
22554 \noindent
22555
22556 \series bold
22557 \size small
22558 The Adventure of the Empty House
22559 \series default
22560
22561 \begin_inset Newline newline
22562 \end_inset
22563
22564 by 
22565 \noun on
22566 Sir Arthur Conan Doyle
22567 \end_layout
22568
22569 \begin_layout Standard
22570
22571 \size small
22572 It was in the spring of the year 1894 that all London was interested, and
22573  the fashionable world dismayed, by the murder of the Honourable Ronald
22574  Adair under most unusual and inexplicable circumstances.
22575  The public has already learned those particulars of the crime which came
22576  out in the police investigation, but a good deal was suppressed upon that
22577  occasion, since the case for the prosecution was so overwhelmingly strong
22578  that it was not necessary to bring forward all the facts.
22579  Only now, at the end of nearly ten years, am I allowed to supply those
22580  missing links which make up the whole of that remarkable chain.
22581  The crime was of interest in itself, but that interest was as nothing to
22582  me compared to the inconceivable sequel, which afforded me the greatest
22583  shock and surprise of any event in my adventurous life.
22584  Even now, after this long interval, I find myself thrilling as I think
22585  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22586 ty which utterly submerged my mind.
22587  Let me say to that public, which has shown some interest in those glimpses
22588  which I have occasionally given them of the thoughts and actions of a very
22589  remarkable man, that they are not to blame me if I have not shared my knowledge
22590  with them, for I should have considered it my first duty to do so, had
22591  I not been barred by a positive prohibition from his own lips, which was
22592  only withdrawn upon the third of last month.
22593 \end_layout
22594
22595 \begin_layout End Multiple Columns
22596
22597 \end_layout
22598
22599 \begin_layout Standard
22600 Here is an example with 3
22601 \begin_inset space ~
22602 \end_inset
22603
22604 columns:
22605 \end_layout
22606
22607 \begin_layout Begin Multiple Columns
22608 3
22609 \end_layout
22610
22611 \begin_layout Standard
22612
22613 \size footnotesize
22614 It can be imagined that my close intimacy with Sherlock Holmes had interested
22615  me deeply in crime, and that after his disappearance I never failed to
22616  read with care the various problems which came before the public.
22617  And I even attempted, more than once, for my own private satisfaction,
22618  to employ his methods in their solution, though with indifferent success.
22619  There was none, however, which appealed to me like this tragedy of Ronald
22620  Adair.
22621  As I read the evidence at the inquest, which led up to a verdict of willful
22622  murder against some person or persons unknown, I realized more clearly
22623  than I had ever done the loss which the community had sustained by the
22624  death of Sherlock Holmes.
22625  There were points about this strange business which would, I was sure,
22626  have specially appealed to him, and the efforts of the police would have
22627  been supplemented, or more probably anticipated, by the trained observation
22628  and the alert mind of the first criminal agent in Europe.
22629  All day, as I drove upon my round, I turned over the case in my mind and
22630  found no explanation which appeared to me to be adequate.
22631  At the risk of telling a twice-told tale, I will recapitulate the facts
22632  as they were known to the public at the conclusion of the inquest.
22633 \end_layout
22634
22635 \begin_layout End Multiple Columns
22636
22637 \end_layout
22638
22639 \begin_layout Standard
22640 You can have up to 10
22641 \begin_inset space ~
22642 \end_inset
22643
22644 columns if you want to, but that might not be very pleasant for the readers
22645  of your document.
22646 \end_layout
22647
22648 \begin_layout Standard
22649 \begin_inset Newpage newpage
22650 \end_inset
22651
22652
22653 \end_layout
22654
22655 \begin_layout Subsection
22656 Columns inside Columns
22657 \end_layout
22658
22659 \begin_layout Standard
22660 You can also have columns inside columns:
22661 \end_layout
22662
22663 \begin_layout Begin Multiple Columns
22664 2
22665 \end_layout
22666
22667 \begin_layout Standard
22668
22669 \size footnotesize
22670 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22671  at that time governor of one of the Australian colonies.
22672  Adair's mother had returned from Australia to undergo the operation for
22673  cataract, and she, her son Ronald, and her daughter Hilda were living together
22674  at 427 Park Lane.
22675 \end_layout
22676
22677 \begin_layout Begin Multiple Columns
22678 2
22679 \end_layout
22680
22681 \begin_layout Standard
22682
22683 \size footnotesize
22684 The youth moved in the best society–had, so far as was known, no enemies
22685  and no particular vices.
22686  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22687  had been broken off by mutual consent some months before, and there was
22688  no sign that it had left any very profound feeling behind it.
22689  For the rest {sic} the man's life moved in a narrow and conventional circle,
22690  for his habits were quiet and his nature unemotional.
22691  Yet it was upon this easy-going young aristocrat that death came, in most
22692  strange and unexpected form, between the hours of ten and eleven-twenty
22693  on the night of March 30, 1894.
22694 \end_layout
22695
22696 \begin_layout End Multiple Columns
22697
22698 \end_layout
22699
22700 \begin_layout Standard
22701
22702 \size footnotesize
22703 Ronald Adair was fond of cards–playing continually, but never for such stakes
22704  as would hurt him.
22705  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22706  It was shown that, after dinner on the day of his death, he had played
22707  a rubber of whist at the latter club.
22708  He had also played there in the afternoon.
22709
22710 \size default
22711  
22712 \size footnotesize
22713 The evidence of those who had played with him– Mr.
22714  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22715  and that there was a fairly equal fall of the cards.
22716  Adair might have lost five pounds, but not more.
22717  His fortune was a considerable one, and such a loss could not in any way
22718  affect him.
22719  He had played nearly every day at one club or other, but he was a cautious
22720  player, and usually rose a winner.
22721  It came out in evidence that, in partnership with Colonel Moran, he had
22722  actually won as much as four hundred and twenty pounds in a sitting, some
22723  weeks before, from Godfrey Milner and Lord Balmoral.
22724  So much for his recent history as it came out at the inquest.
22725 \end_layout
22726
22727 \begin_layout End Multiple Columns
22728
22729 \end_layout
22730
22731 \begin_layout Subsection
22732 Advanced Examples
22733 \end_layout
22734
22735 \begin_layout Standard
22736 The examples in this section show some more special features of multiple
22737  columns.
22738 \end_layout
22739
22740 \begin_layout Standard
22741 For more features of multiple columns, have a look at the documentation
22742  of the LaTeX-package 
22743 \series bold
22744 multicol
22745 \series default
22746
22747 \begin_inset Index idx
22748 status collapsed
22749
22750 \begin_layout Plain Layout
22751 LaTeX-packages ! multicol
22752 \end_layout
22753
22754 \end_inset
22755
22756
22757 \begin_inset CommandInset citation
22758 LatexCommand cite
22759 key "multicol"
22760
22761 \end_inset
22762
22763 .
22764 \end_layout
22765
22766 \begin_layout Subsubsection
22767 Preface
22768 \end_layout
22769
22770 \begin_layout Standard
22771 To add a preface text for multiple columns, add the command
22772 \end_layout
22773
22774 \begin_layout Standard
22775
22776 \series bold
22777 }[
22778 \end_layout
22779
22780 \begin_layout Standard
22781 as TeX Code behind the number of columns in the
22782 \family sans
22783  Begin Multiple Columns
22784 \family default
22785  style.
22786  behind the command write the text.
22787  At the end of the style use the command
22788 \end_layout
22789
22790 \begin_layout Standard
22791
22792 \series bold
22793 ]{
22794 \end_layout
22795
22796 \begin_layout Standard
22797 as TeX Code.
22798  An example with some preface text:
22799 \end_layout
22800
22801 \begin_layout Standard
22802 \begin_inset VSpace bigskip
22803 \end_inset
22804
22805
22806 \end_layout
22807
22808 \begin_layout Begin Multiple Columns
22809 2
22810 \begin_inset ERT
22811 status collapsed
22812
22813 \begin_layout Plain Layout
22814
22815 }[
22816 \end_layout
22817
22818 \end_inset
22819
22820 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22821
22822 \begin_inset ERT
22823 status collapsed
22824
22825 \begin_layout Plain Layout
22826
22827 ]{
22828 \end_layout
22829
22830 \end_inset
22831
22832
22833 \end_layout
22834
22835 \begin_layout Standard
22836
22837 \size small
22838 On the evening of the crime, he returned from the club exactly at ten.
22839  His mother and sister were out spending the evening with a relation.
22840  The servant deposed that she heard him enter the front room on the second
22841  floor, generally used as his sitting-room.
22842  She had lit a fire there, and as it smoked she had opened the window.
22843  No sound was heard from the room until eleven-twenty, the hour of the return
22844  of Lady Maynooth and her daughter.
22845  Desiring to say good-night, she attempted to enter her son's room.
22846  The door was locked on the inside, and no answer could be got to their
22847  cries and knocking.
22848  Help was obtained, and the door forced.
22849  The unfortunate young man was found lying near the table.
22850  His head had been horribly mutilated by an expanding revolver bullet, but
22851  no weapon of any sort was to be found in the room.
22852 \end_layout
22853
22854 \begin_layout End Multiple Columns
22855
22856 \end_layout
22857
22858 \begin_layout Standard
22859 You can also use a section heading as the preface if you use a section command
22860  as TeX Code behind the first TeX Code.
22861  For example the command
22862 \end_layout
22863
22864 \begin_layout Standard
22865
22866 \series bold
22867
22868 \backslash
22869 subsection{subsection title}
22870 \end_layout
22871
22872 \begin_layout Standard
22873 creates a subsection.
22874  In this example the preface is a subsubsection:
22875 \end_layout
22876
22877 \begin_layout Begin Multiple Columns
22878 2
22879 \begin_inset ERT
22880 status collapsed
22881
22882 \begin_layout Plain Layout
22883
22884 }[
22885 \end_layout
22886
22887 \end_inset
22888
22889
22890 \begin_inset ERT
22891 status collapsed
22892
22893 \begin_layout Plain Layout
22894
22895
22896 \backslash
22897 subsubsection{
22898 \end_layout
22899
22900 \end_inset
22901
22902 This is a subsubsection heading as a preface
22903 \begin_inset ERT
22904 status collapsed
22905
22906 \begin_layout Plain Layout
22907
22908 }
22909 \end_layout
22910
22911 \end_inset
22912
22913
22914 \begin_inset ERT
22915 status collapsed
22916
22917 \begin_layout Plain Layout
22918
22919 ]{
22920 \end_layout
22921
22922 \end_inset
22923
22924
22925 \end_layout
22926
22927 \begin_layout Standard
22928
22929 \size small
22930 A minute examination of the circumstances served only to make the case more
22931  complex.
22932  In the first place, no reason could be given why the young man should have
22933  fastened the door upon the inside.
22934  There was the possibility that the murderer had done this, and had afterwards
22935  escaped by the window.
22936  The drop was at least twenty feet, however, and a bed of crocuses in full
22937  bloom lay beneath.
22938  Neither the flowers nor the earth showed any sign of having been disturbed,
22939  nor were there any marks upon the narrow strip of grass which separated
22940  the house from the road.
22941  Apparently, therefore, it was the young man himself who had fastened the
22942  door.
22943  But how did he come by his death? No one could have climbed up to the window
22944  without leaving traces.
22945  Suppose a man had fired through the window, he would indeed be a remarkable
22946  shot who could with a revolver inflict so deadly a wound.
22947  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22948  a hundred yards of the house.
22949  No one had heard a shot.
22950 \end_layout
22951
22952 \begin_layout End Multiple Columns
22953
22954 \end_layout
22955
22956 \begin_layout Standard
22957 If there is less vertical space left on the page at the beginning of the
22958  multiple columns than needed for 6
22959 \begin_inset space ~
22960 \end_inset
22961
22962 text lines, a page break will be inserted before the multiple columns.
22963  Depending on the number of lines of the preface text, you might want to
22964  change this value.
22965  It is determined by inserting the command
22966 \end_layout
22967
22968 \begin_layout Standard
22969
22970 \series bold
22971 ][number
22972 \backslash
22973 baselineskip
22974 \end_layout
22975
22976 \begin_layout Standard
22977 as TeX Code behind the preface definition but before the final 
22978 \series bold
22979 ]{
22980 \series default
22981  command.
22982  
22983 \emph on
22984 number
22985 \emph default
22986  is hereby the number of text lines.
22987  In this example the space is set to 7
22988 \begin_inset space ~
22989 \end_inset
22990
22991 text lines:
22992 \end_layout
22993
22994 \begin_layout Begin Multiple Columns
22995 2
22996 \begin_inset ERT
22997 status collapsed
22998
22999 \begin_layout Plain Layout
23000
23001 }[
23002 \end_layout
23003
23004 \end_inset
23005
23006
23007 \begin_inset ERT
23008 status collapsed
23009
23010 \begin_layout Plain Layout
23011
23012
23013 \backslash
23014 subsubsection{
23015 \end_layout
23016
23017 \end_inset
23018
23019 This is the sectioning command
23020 \begin_inset Newline newline
23021 \end_inset
23022
23023 as a preface and
23024 \begin_inset Newline newline
23025 \end_inset
23026
23027 with multiple text lines
23028 \begin_inset ERT
23029 status collapsed
23030
23031 \begin_layout Plain Layout
23032
23033 }
23034 \end_layout
23035
23036 \end_inset
23037
23038
23039 \begin_inset ERT
23040 status collapsed
23041
23042 \begin_layout Plain Layout
23043
23044 ][7
23045 \backslash
23046 baselineskip
23047 \end_layout
23048
23049 \end_inset
23050
23051
23052 \begin_inset ERT
23053 status collapsed
23054
23055 \begin_layout Plain Layout
23056
23057 ]{
23058 \end_layout
23059
23060 \end_inset
23061
23062
23063 \end_layout
23064
23065 \begin_layout Standard
23066
23067 \size small
23068 On the evening of the crime, he returned from the club exactly at ten.
23069  His mother and sister were out spending the evening with a relation.
23070  The servant deposed that she heard him enter the front room on the second
23071  floor, generally used as his sitting-room.
23072  She had lit a fire there, and as it smoked she had opened the window.
23073  No sound was heard from the room until eleven-twenty, the hour of the return
23074  of Lady Maynooth and her daughter.
23075  Desiring to say good-night, she attempted to enter her son's room.
23076  The door was locked on the inside, and no answer could be got to their
23077  cries and knocking.
23078  Help was obtained, and the door forced.
23079  The unfortunate young man was found lying near the table.
23080  His head had been horribly mutilated by an expanding revolver bullet, but
23081  no weapon of any sort was to be found in the room.
23082 \end_layout
23083
23084 \begin_layout End Multiple Columns
23085
23086 \end_layout
23087
23088 \begin_layout Subsubsection
23089 Surrounding Space
23090 \end_layout
23091
23092 \begin_layout Standard
23093 The amount of space before and after multiple columns can be changed by
23094  changing the length 
23095 \series bold
23096
23097 \backslash
23098 multicolsep
23099 \series default
23100 .
23101  For example the command
23102 \end_layout
23103
23104 \begin_layout Standard
23105
23106 \series bold
23107
23108 \backslash
23109 setlength{
23110 \backslash
23111 multicolsep}{3cm}
23112 \end_layout
23113
23114 \begin_layout Standard
23115 in TeX Code changes its value to 3
23116 \begin_inset space \thinspace{}
23117 \end_inset
23118
23119 cm.
23120  The change must be made before the multiple columns' start.
23121  The predefined value is 13
23122 \begin_inset space \thinspace{}
23123 \end_inset
23124
23125 pt.
23126 \end_layout
23127
23128 \begin_layout Standard
23129 For this example 
23130 \series bold
23131
23132 \backslash
23133 multicolsep
23134 \series default
23135  was set to 2.5
23136 \begin_inset space \thinspace{}
23137 \end_inset
23138
23139 cm:
23140 \end_layout
23141
23142 \begin_layout Standard
23143 \begin_inset ERT
23144 status open
23145
23146 \begin_layout Plain Layout
23147
23148
23149 \backslash
23150 setlength{
23151 \backslash
23152 multicolsep}{2.5cm}
23153 \end_layout
23154
23155 \end_inset
23156
23157
23158 \end_layout
23159
23160 \begin_layout Begin Multiple Columns
23161 2
23162 \end_layout
23163
23164 \begin_layout Standard
23165
23166 \size small
23167 All day I turned these facts over in my mind, endeavouring to hit upon some
23168  theory which could reconcile them all, and to find that line of least resistanc
23169 e which my poor friend had declared to be the starting-point of every investigat
23170 ion.
23171  I confess that I made little progress.
23172  In the evening I strolled across the Park, and found myself about six o'clock
23173  at the Oxford Street end of Park Lane.
23174  A group of loafers upon the pavements, all staring up at a particular window,
23175  directed me to the house which I had come to see.
23176  A tall, thin man with coloured glasses, whom I strongly suspected of being
23177  a plain-clothes detective, was pointing out some theory of his own, while
23178  the others crowded round to listen to what he said.
23179  I got as near him as I could, but his observations seemed to me to be absurd,
23180  so I withdrew again in some disgust.
23181  As I did so I struck against an elderly, deformed man, who had been behind
23182  me, and I knocked down several books which he was carrying.
23183 \end_layout
23184
23185 \begin_layout End Multiple Columns
23186
23187 \end_layout
23188
23189 \begin_layout Standard
23190 \begin_inset Note Greyedout
23191 status open
23192
23193 \begin_layout Plain Layout
23194
23195 \series bold
23196 Note:
23197 \series default
23198  The values you set with 
23199 \series bold
23200
23201 \backslash
23202 setlength
23203 \series default
23204  will be used for all following multiple columns until to change them again.
23205 \end_layout
23206
23207 \end_inset
23208
23209
23210 \end_layout
23211
23212 \begin_layout Standard
23213 \begin_inset ERT
23214 status collapsed
23215
23216 \begin_layout Plain Layout
23217
23218
23219 \backslash
23220 setlength{
23221 \backslash
23222 multicolsep}{13pt}
23223 \end_layout
23224
23225 \end_inset
23226
23227
23228 \begin_inset Note Note
23229 status collapsed
23230
23231 \begin_layout Plain Layout
23232 go back to the default
23233 \end_layout
23234
23235 \end_inset
23236
23237
23238 \end_layout
23239
23240 \begin_layout Subsubsection
23241 Column Separation
23242 \end_layout
23243
23244 \begin_layout Standard
23245 The width of the columns is automatically calculated, but you can modify
23246  the space between the columns.
23247  This is done by changing the length 
23248 \series bold
23249
23250 \backslash
23251 columnsep
23252 \series default
23253 .
23254  Its predefined value is 10
23255 \begin_inset space \thinspace{}
23256 \end_inset
23257
23258 pt.
23259  Here is an example where 
23260 \series bold
23261
23262 \backslash
23263 columnsep
23264 \series default
23265  is set to 3
23266 \begin_inset space \thinspace{}
23267 \end_inset
23268
23269 cm:
23270 \end_layout
23271
23272 \begin_layout Standard
23273 \begin_inset ERT
23274 status open
23275
23276 \begin_layout Plain Layout
23277
23278
23279 \backslash
23280 setlength{
23281 \backslash
23282 columnsep}{3cm}
23283 \end_layout
23284
23285 \end_inset
23286
23287
23288 \end_layout
23289
23290 \begin_layout Begin Multiple Columns
23291 2
23292 \end_layout
23293
23294 \begin_layout Standard
23295
23296 \size small
23297 My observations of No.
23298 \begin_inset space \space{}
23299 \end_inset
23300
23301 427 Park Lane did little to clear up the problem in which I was interested.
23302  The house was separated from the street by a low wall and railing, the
23303  whole not more than five feet high.
23304  It was perfectly easy, therefore, for anyone to get into the garden, but
23305  the window was entirely inaccessible, since there was no water pipe or
23306  anything which could help the most active man to climb it.
23307  More puzzled than ever, I retraced my steps to Kensington.
23308  I had not been in my study five minutes when the maid entered to say that
23309  a person desired to see me.
23310  To my astonishment it was none other than my strange old book collector,
23311  his sharp, wizened face peering out from a frame of white hair, and his
23312  precious volumes, a dozen of them at least, wedged under his right arm.
23313 \end_layout
23314
23315 \begin_layout End Multiple Columns
23316
23317 \end_layout
23318
23319 \begin_layout Standard
23320 \begin_inset ERT
23321 status collapsed
23322
23323 \begin_layout Plain Layout
23324
23325
23326 \backslash
23327 setlength{
23328 \backslash
23329 columnsep}{10pt}
23330 \end_layout
23331
23332 \end_inset
23333
23334
23335 \begin_inset Note Note
23336 status collapsed
23337
23338 \begin_layout Plain Layout
23339 go back to the default
23340 \end_layout
23341
23342 \end_inset
23343
23344
23345 \end_layout
23346
23347 \begin_layout Subsubsection
23348 Vertical Lines
23349 \end_layout
23350
23351 \begin_layout Standard
23352 Between the columns a rule with a width of the length 
23353 \series bold
23354
23355 \backslash
23356 columnseprule
23357 \series default
23358  is placed.
23359  If this rule width is set to 0
23360 \begin_inset space \thinspace{}
23361 \end_inset
23362
23363 pt (this is the default), the rule is suppressed.
23364  In the following example, the line separating the columns is 2
23365 \begin_inset space \thinspace{}
23366 \end_inset
23367
23368 pt wide.
23369 \end_layout
23370
23371 \begin_layout Standard
23372 \begin_inset ERT
23373 status open
23374
23375 \begin_layout Plain Layout
23376
23377
23378 \backslash
23379 setlength{
23380 \backslash
23381 columnseprule}{2pt}
23382 \end_layout
23383
23384 \end_inset
23385
23386
23387 \end_layout
23388
23389 \begin_layout Begin Multiple Columns
23390 2
23391 \end_layout
23392
23393 \begin_layout Standard
23394
23395 \size small
23396 \begin_inset Quotes eld
23397 \end_inset
23398
23399 You're surprised to see me, sir,
23400 \begin_inset Quotes erd
23401 \end_inset
23402
23403  said he, in a strange, croaking voice.
23404 \end_layout
23405
23406 \begin_layout Standard
23407
23408 \size small
23409 I acknowledged that I was.
23410 \end_layout
23411
23412 \begin_layout Standard
23413
23414 \size small
23415 \begin_inset Quotes eld
23416 \end_inset
23417
23418 Well, I've a conscience, sir, and when I chanced to see you go into this
23419  house, as I came hobbling after you, I thought to myself, I'll just step
23420  in and see that kind gentleman, and tell him that if I was a bit gruff
23421  in my manner there was not any harm meant, and that I am much obliged to
23422  him for picking up my books.
23423 \begin_inset Quotes erd
23424 \end_inset
23425
23426
23427 \end_layout
23428
23429 \begin_layout Standard
23430
23431 \size small
23432 \begin_inset Quotes eld
23433 \end_inset
23434
23435 You make too much of a trifle,
23436 \begin_inset Quotes erd
23437 \end_inset
23438
23439  said I.
23440  
23441 \begin_inset Quotes eld
23442 \end_inset
23443
23444 May I ask how you knew who I was?
23445 \begin_inset Quotes erd
23446 \end_inset
23447
23448
23449 \end_layout
23450
23451 \begin_layout Standard
23452
23453 \size small
23454 \begin_inset Quotes eld
23455 \end_inset
23456
23457 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23458  you'll find my little bookshop at the corner of Church Street, and very
23459  happy to see you, I am sure.
23460  Maybe you collect yourself, sir.
23461  Here's 
23462 \noun on
23463 British
23464 \begin_inset space ~
23465 \end_inset
23466
23467 Birds
23468 \noun default
23469 , and 
23470 \noun on
23471 Catullus
23472 \noun default
23473 , and 
23474 \noun on
23475 The Holy War
23476 \noun default
23477 --a bargain, every one of them.
23478  With five volumes you could just fill that gap on that second shelf.
23479  It looks untidy, does it not, sir?
23480 \begin_inset Quotes erd
23481 \end_inset
23482
23483
23484 \end_layout
23485
23486 \begin_layout End Multiple Columns
23487
23488 \end_layout
23489
23490 \begin_layout Standard
23491 \begin_inset ERT
23492 status collapsed
23493
23494 \begin_layout Plain Layout
23495
23496
23497 \backslash
23498 setlength{
23499 \backslash
23500 columnseprule}{0pt}
23501 \end_layout
23502
23503 \end_inset
23504
23505
23506 \begin_inset Note Note
23507 status collapsed
23508
23509 \begin_layout Plain Layout
23510 go back to the default
23511 \end_layout
23512
23513 \end_inset
23514
23515
23516 \end_layout
23517
23518 \begin_layout Standard
23519 \begin_inset Newpage newpage
23520 \end_inset
23521
23522
23523 \end_layout
23524
23525 \begin_layout Section
23526 Non-standard Paragraph Shapes
23527 \end_layout
23528
23529 \begin_layout Standard
23530 \begin_inset ERT
23531 status collapsed
23532
23533 \begin_layout Plain Layout
23534
23535
23536 \backslash
23537 begin{sloppypar}
23538 \end_layout
23539
23540 \end_inset
23541
23542
23543 \end_layout
23544
23545 \begin_layout Standard
23546 \begin_inset ERT
23547 status collapsed
23548
23549 \begin_layout Plain Layout
23550
23551
23552 \backslash
23553 newdimen
23554 \backslash
23555 varunit 
23556 \end_layout
23557
23558 \begin_layout Plain Layout
23559
23560
23561 \backslash
23562 setlength{
23563 \backslash
23564 varunit}{4.5in}
23565 \end_layout
23566
23567 \end_inset
23568
23569
23570 \end_layout
23571
23572 \begin_layout Standard
23573 \noindent
23574 \begin_inset ERT
23575 status collapsed
23576
23577 \begin_layout Plain Layout
23578
23579
23580 \backslash
23581 parshape 19 0.45
23582 \backslash
23583 varunit 0.332
23584 \backslash
23585 varunit
23586 \end_layout
23587
23588 \begin_layout Plain Layout
23589
23590 0.40
23591 \backslash
23592 varunit 0.300
23593 \backslash
23594 varunit
23595 \end_layout
23596
23597 \begin_layout Plain Layout
23598
23599 0.35
23600 \backslash
23601 varunit 0.293
23602 \backslash
23603 varunit
23604 \end_layout
23605
23606 \begin_layout Plain Layout
23607
23608 0.30
23609 \backslash
23610 varunit 0.300
23611 \backslash
23612 varunit
23613 \end_layout
23614
23615 \begin_layout Plain Layout
23616
23617 0.25
23618 \backslash
23619 varunit 0.317
23620 \backslash
23621 varunit
23622 \end_layout
23623
23624 \begin_layout Plain Layout
23625
23626 0.20
23627 \backslash
23628 varunit 0.342
23629 \backslash
23630 varunit
23631 \end_layout
23632
23633 \begin_layout Plain Layout
23634
23635 0.15
23636 \backslash
23637 varunit 0.373
23638 \backslash
23639 varunit
23640 \end_layout
23641
23642 \begin_layout Plain Layout
23643
23644 0.10
23645 \backslash
23646 varunit 0.410
23647 \backslash
23648 varunit
23649 \end_layout
23650
23651 \begin_layout Plain Layout
23652
23653 0.05
23654 \backslash
23655 varunit 0.453
23656 \backslash
23657 varunit
23658 \end_layout
23659
23660 \begin_layout Plain Layout
23661
23662 0.00
23663 \backslash
23664 varunit 0.500
23665 \backslash
23666 varunit
23667 \end_layout
23668
23669 \begin_layout Plain Layout
23670
23671 0.05
23672 \backslash
23673 varunit 0.453
23674 \backslash
23675 varunit
23676 \end_layout
23677
23678 \begin_layout Plain Layout
23679
23680 0.10
23681 \backslash
23682 varunit 0.410
23683 \backslash
23684 varunit
23685 \end_layout
23686
23687 \begin_layout Plain Layout
23688
23689 0.15
23690 \backslash
23691 varunit 0.373
23692 \backslash
23693 varunit
23694 \end_layout
23695
23696 \begin_layout Plain Layout
23697
23698 0.20
23699 \backslash
23700 varunit 0.342
23701 \backslash
23702 varunit
23703 \end_layout
23704
23705 \begin_layout Plain Layout
23706
23707 0.25
23708 \backslash
23709 varunit 0.317
23710 \backslash
23711 varunit
23712 \end_layout
23713
23714 \begin_layout Plain Layout
23715
23716 0.30
23717 \backslash
23718 varunit 0.300
23719 \backslash
23720 varunit
23721 \end_layout
23722
23723 \begin_layout Plain Layout
23724
23725 0.35
23726 \backslash
23727 varunit 0.293
23728 \backslash
23729 varunit
23730 \end_layout
23731
23732 \begin_layout Plain Layout
23733
23734 0.40
23735 \backslash
23736 varunit 0.300
23737 \backslash
23738 varunit
23739 \end_layout
23740
23741 \begin_layout Plain Layout
23742
23743 0.45
23744 \backslash
23745 varunit 0.332
23746 \backslash
23747 varunit
23748 \end_layout
23749
23750 \begin_layout Plain Layout
23751
23752 \end_layout
23753
23754 \end_inset
23755
23756 There are times when the tyranny of rectangular paragraphs must be overthrown.
23757  In such situations, a call to the delightful plain TeX command 
23758 \family typewriter
23759
23760 \backslash
23761 parshape
23762 \family default
23763  is called for.
23764  As you can see, completely arbitrary shapes can be laid out with a suitable
23765  set of line length definitions.
23766  While this parshape may look a bit silly and useless, one could conceive
23767  of situations such as finely tuned dropped capitals, word wrapping around
23768  non-rectangular graphics, etc.
23769  which will benefit from such handcrafting.
23770 \end_layout
23771
23772 \begin_layout Standard
23773 \begin_inset VSpace bigskip
23774 \end_inset
23775
23776
23777 \end_layout
23778
23779 \begin_layout Standard
23780 The syntax is 
23781 \family typewriter
23782
23783 \backslash
23784 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23785  #nindent #nlength
23786 \family default
23787 , where 
23788 \family typewriter
23789 numlines
23790 \family default
23791  is the number of lines of text which define the paragraph.
23792  If there turn out to be fewer lines, the shape is truncated; if there are
23793  more, the excess lines have the same dimensions as the last line of the
23794  definition.
23795  The 
23796 \family typewriter
23797 #nindent
23798 \family default
23799  and 
23800 \family typewriter
23801 #nlength
23802 \family default
23803  entries specify the indentation of the line from the left margin, and the
23804  length of the line as measured from that point.
23805  The shape applies only to the current paragraph; everything is reset to
23806  normal for the next paragraph.
23807 \end_layout
23808
23809 \begin_layout Standard
23810 \begin_inset ERT
23811 status collapsed
23812
23813 \begin_layout Plain Layout
23814
23815
23816 \backslash
23817 end{sloppypar}
23818 \end_layout
23819
23820 \end_inset
23821
23822
23823 \end_layout
23824
23825 \begin_layout Bibliography
23826 \begin_inset CommandInset bibitem
23827 LatexCommand bibitem
23828 key "multicol"
23829
23830 \end_inset
23831
23832 Documentation of the LaTeX-package 
23833 \begin_inset CommandInset href
23834 LatexCommand href
23835 name "multicol"
23836 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23837
23838 \end_inset
23839
23840
23841 \begin_inset Index idx
23842 status collapsed
23843
23844 \begin_layout Plain Layout
23845 LaTeX-packages ! multicol
23846 \end_layout
23847
23848 \end_inset
23849
23850
23851 \end_layout
23852
23853 \end_body
23854 \end_document