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