]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
4d14af98bc5419c32146d2db84e7a0a79ba0eb14
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 414
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % used for multi-column text
37 \usepackage{multicol}
38
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
41 \end_preamble
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
44 \begin_modules
45 logicalmkup
46 theorems-ams
47 theorems-ams-extended
48 multicol
49 \end_modules
50 \maintain_unincluded_children false
51 \begin_local_layout
52 Format 7
53 InsetLayout CharStyle:MenuItem
54 LyxType               charstyle
55 LabelString           menu
56 LatexType             command
57 LatexName             menuitem
58 Font
59 Family              Sans
60 EndFont
61 Preamble
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
63 EndPreamble
64 End
65 \end_local_layout
66 \language english
67 \language_package default
68 \inputencoding auto
69 \fontencoding global
70 \font_roman default
71 \font_sans default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
75 \font_sc false
76 \font_osf false
77 \font_sf_scale 100
78 \font_tt_scale 100
79
80 \graphics default
81 \default_output_format default
82 \output_sync 0
83 \bibtex_command default
84 \index_command default
85 \paperfontsize 12
86 \spacing single
87 \use_hyperref true
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
92 \pdf_bookmarks true
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
96 \pdf_breaklinks false
97 \pdf_pdfborder false
98 \pdf_colorlinks true
99 \pdf_backref false
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \papersize default
103 \use_geometry false
104 \use_amsmath 1
105 \use_esint 0
106 \use_mhchem 1
107 \use_mathdots 1
108 \cite_engine basic
109 \use_bibtopic false
110 \use_indices false
111 \paperorientation portrait
112 \suppress_date false
113 \use_refstyle 0
114 \index Index
115 \shortcut idx
116 \color #008000
117 \end_index
118 \secnumdepth 3
119 \tocdepth 3
120 \paragraph_separation indent
121 \paragraph_indentation default
122 \quotes_language english
123 \papercolumns 1
124 \papersides 2
125 \paperpagestyle headings
126 \tracking_changes false
127 \output_changes false
128 \html_math_output 0
129 \html_css_as_file 0
130 \html_be_strict true
131 \end_header
132
133 \begin_body
134
135 \begin_layout Title
136 Additional LyX Features
137 \end_layout
138
139 \begin_layout Subtitle
140 Version 2.0.x
141 \end_layout
142
143 \begin_layout Author
144 by the LyX Team
145 \begin_inset Foot
146 status collapsed
147
148 \begin_layout Plain Layout
149 \noindent
150 Principal maintainer of this file is
151 \noun on
152  Richard Heck
153 \noun default
154 .
155  If you have comments or error corrections, please send them to the LyX
156  Documentation mailing list, 
157 \begin_inset Flex Code
158 status collapsed
159
160 \begin_layout Plain Layout
161 \noindent
162 <lyx-docs@lists.lyx.org>
163 \end_layout
164
165 \end_inset
166
167 .
168 \end_layout
169
170 \end_inset
171
172
173 \end_layout
174
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
178
179 \end_inset
180
181
182 \end_layout
183
184 \begin_layout Chapter
185 Introduction
186 \end_layout
187
188 \begin_layout Standard
189 This manual is essentially Part II of the 
190 \emph on
191 User's Guide\SpecialChar \@.
192
193 \emph default
194  The reason for separating this document out is simple: the 
195 \emph on
196 User's Guide
197 \emph default
198  is already quite lengthy, and it contains information on all of the basic
199  features one needs to know in order to prepare most documents.
200  However, the LyX Team has worked to make LyX extensible through various
201  configuration files and external packages.
202  That means that if you want to support the Fizzwizzle LaTeX package, you
203  can create a layout file (or module) for it without having to alter LyX
204  itself.
205  We've already had contributions of several new features this way, and some
206  of them are documented here.
207  There are also some more `advanced' features, such as how to control the
208  presentation of bibliographies and how to work with multi-part documents,
209  that are not covered in the 
210 \emph on
211 User's Guide
212 \emph default
213  and are discussed here.
214 \end_layout
215
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218  control, and SGML support, which require additional software to work properly.
219  There is also a chapter on LyX's support for HTML.
220  And lastly, there's a chapter of LaTeX tools and tips, things you can use
221  to spruce up your documents by directly using the powerful features of
222  LaTeX.
223  After all, LyX 
224 \emph on
225 is
226 \emph default
227  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
228 \end_layout
229
230 \begin_layout Standard
231 If you haven't read the 
232 \emph on
233 Introduction
234 \emph default
235  yet, you are definitely in the wrong manual.
236  The 
237 \emph on
238 Introduction
239 \emph default
240  is the first place to go, since it describes the notation and format of
241  all of the manuals.
242  You should also be thoroughly familiar with the 
243 \emph on
244 User's Guide
245 \emph default
246  and all of the basic features of LyX before attempting to read this one.
247 \end_layout
248
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251  with LaTeX, this first chapter covers the inner workings of LyX and how
252  to direct LyX to generate exactly the LaTeX code you want.
253  It is obviously for more seasoned LyX users.
254 \end_layout
255
256 \begin_layout Chapter
257 LyX and LaTeX
258 \end_layout
259
260 \begin_layout Section
261 How LyX Uses LaTeX
262 \end_layout
263
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266  In it, we'll explain how LyX and LaTeX work together to produce printable
267  output.
268  This is the only place in any of the manuals where we assume you know something
269  about LaTeX.
270 \end_layout
271
272 \begin_layout Standard
273 At one time, LyX was called a 
274 \begin_inset Quotes eld
275 \end_inset
276
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
279 \end_inset
280
281  but that's no longer true.
282  There are frontends to LaTeX out there.
283 \begin_inset Foot
284 status collapsed
285
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288  There are also the LaTeX modes for vi and emacs, of course.
289 \end_layout
290
291 \end_inset
292
293  These are basically text editors with the ability to run LaTeX and mark
294  any errors in the file you're editing.
295  Although LyX 
296 \emph on
297 is
298 \emph default
299  an editor, and it 
300 \emph on
301 does
302 \emph default
303  run LaTeX, and it also indicates errors in the file, it also does much,
304  much more.
305  For one thing, you don't need to know LaTeX to use LyX effectively.
306  And LyX has added its own extensions to LaTeX.
307  Try the following sometime: select 
308 \begin_inset Flex MenuItem
309 status collapsed
310
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
313 LaTeX
314 \end_layout
315
316 \end_inset
317
318  from the 
319 \begin_inset Flex MenuItem
320 status collapsed
321
322 \begin_layout Plain Layout
323 File
324 \end_layout
325
326 \end_inset
327
328  menu (or 
329 \begin_inset Flex MenuItem
330 status collapsed
331
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
334 Source
335 \end_layout
336
337 \end_inset
338
339 ), then look at the preamble of the resulting 
340 \begin_inset Flex Code
341 status collapsed
342
343 \begin_layout Plain Layout
344 .tex
345 \end_layout
346
347 \end_inset
348
349  file.
350  You'll notice a variety of new macros defined specifically by LyX.
351  These macros are defined automatically, according to the features you use
352  in the document.
353 \end_layout
354
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
357  They are:
358 \end_layout
359
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
362 status collapsed
363
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
366 Format
367 \end_layout
368
369 \end_inset
370
371
372 \end_layout
373
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
376 status collapsed
377
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
381 Format
382 \end_layout
383
384 \end_inset
385
386
387 \end_layout
388
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
391 status collapsed
392
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
395 Print
396 \end_layout
397
398 \end_inset
399
400
401 \end_layout
402
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
405 status collapsed
406
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
409 Fax
410 \end_layout
411
412 \end_inset
413
414
415 \end_layout
416
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
419  LaTeX was run.
420  
421 \end_layout
422
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
425 \end_layout
426
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension 
429 \begin_inset Flex Code
430 status collapsed
431
432 \begin_layout Plain Layout
433 .tex
434 \end_layout
435
436 \end_inset
437
438  in place of 
439 \begin_inset Flex Code
440 status collapsed
441
442 \begin_layout Plain Layout
443 .lyx
444 \end_layout
445
446 \end_inset
447
448 .
449 \end_layout
450
451 \begin_layout Enumerate
452 Run LaTeX on the 
453 \begin_inset Flex Code
454 status collapsed
455
456 \begin_layout Plain Layout
457 .tex
458 \end_layout
459
460 \end_inset
461
462  file (maybe several times), and run any other commands (such as 
463 \begin_inset Flex Code
464 status collapsed
465
466 \begin_layout Plain Layout
467 bibtex
468 \end_layout
469
470 \end_inset
471
472  or 
473 \begin_inset Flex Code
474 status collapsed
475
476 \begin_layout Plain Layout
477 makeindex
478 \end_layout
479
480 \end_inset
481
482 ) needed to compile the LaTeX file.
483 \end_layout
484
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
487 \end_layout
488
489 \begin_layout Standard
490 If you've run LaTeX using 
491 \begin_inset Flex MenuItem
492 status collapsed
493
494 \begin_layout Plain Layout
495 View
496 \bar under
497 \SpecialChar \menuseparator
498
499 \bar default
500 DVI
501 \end_layout
502
503 \end_inset
504
505 , LyX then runs a DVI viewer to display the DVI-file.
506  If you've used 
507 \begin_inset Flex MenuItem
508 status collapsed
509
510 \begin_layout Plain Layout
511 View
512 \bar under
513 \SpecialChar \menuseparator
514
515 \bar default
516 PostScript
517 \end_layout
518
519 \end_inset
520
521 , LyX performs further steps:
522 \end_layout
523
524 \begin_layout Itemize
525 Run 
526 \begin_inset Flex Code
527 status collapsed
528
529 \begin_layout Plain Layout
530 dvips
531 \end_layout
532
533 \end_inset
534
535  to convert the DVI file to PostScript.
536 \end_layout
537
538 \begin_layout Itemize
539 Run a PostScript viewer, such as 
540 \begin_inset Flex Code
541 status collapsed
542
543 \begin_layout Plain Layout
544 ghostview
545 \end_layout
546
547 \end_inset
548
549 , to display the PostScript file.
550 \end_layout
551
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
554 \end_layout
555
556 \begin_layout Section
557 Translating LaTeX files into LyX
558 \end_layout
559
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the 
562 \begin_inset Flex MenuItem
563 status collapsed
564
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
568 LaTeX
569 \end_layout
570
571 \end_inset
572
573  command in LyX.
574  This will call a program named 
575 \begin_inset Flex Code
576 status collapsed
577
578 \begin_layout Plain Layout
579 tex2lyx
580 \end_layout
581
582 \end_inset
583
584  which will create a file 
585 \begin_inset Flex Code
586 status collapsed
587
588 \begin_layout Plain Layout
589 foo.lyx
590 \end_layout
591
592 \end_inset
593
594  from the file 
595 \begin_inset Flex Code
596 status collapsed
597
598 \begin_layout Plain Layout
599 foo.tex
600 \end_layout
601
602 \end_inset
603
604 .
605  LyX will then open that file.
606 \begin_inset Foot
607 status collapsed
608
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
611 status collapsed
612
613 \begin_layout Plain Layout
614 tex2lyx
615 \end_layout
616
617 \end_inset
618
619  can also be run from the command line, of course.
620 \end_layout
621
622 \end_inset
623
624
625 \end_layout
626
627 \begin_layout Standard
628 \begin_inset Flex Code
629 status collapsed
630
631 \begin_layout Plain Layout
632 tex2lyx
633 \end_layout
634
635 \end_inset
636
637  will translate most legal LaTeX, but not everything.
638  It will put things it doesn't understand into TeX code, so after translating
639  a file with 
640 \begin_inset Flex Code
641 status collapsed
642
643 \begin_layout Plain Layout
644 tex2lyx
645 \end_layout
646
647 \end_inset
648
649 , you can look for TeX code and hand-edit it until it looks right.
650 \end_layout
651
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
654 \end_layout
655
656 \begin_layout Section
657 \begin_inset CommandInset label
658 LatexCommand label
659 name "sec:Inserting-TeX-Code"
660
661 \end_inset
662
663 Inserting TeX Code into LyX Documents 
664 \end_layout
665
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668  You can always insert TeX code into any LyX document.
669  LyX cannot, and will never be able to, display every possible LaTeX construct.
670  If ever you need to insert LaTeX commands into your LyX document, you can
671  use the 
672 \begin_inset Flex Code
673 status collapsed
674
675 \begin_layout Plain Layout
676 TeX Code
677 \end_layout
678
679 \end_inset
680
681  box, which you can insert into your document with 
682 \begin_inset Flex MenuItem
683 status collapsed
684
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
687 TeX Code
688 \end_layout
689
690 \end_inset
691
692 .
693 \end_layout
694
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697  The code looks like this:
698 \end_layout
699
700 \begin_layout LyX-Code
701
702 \backslash
703 begin{tabular}{ll}
704 \begin_inset Newline newline
705 \end_inset
706
707
708 \backslash
709 begin{minipage}{5cm}
710 \begin_inset Newline newline
711 \end_inset
712
713 This is an example for a minipage environment.
714  You 
715 \begin_inset Newline newline
716 \end_inset
717
718 can put nearly everything in it, even (non-floating) 
719 \begin_inset Newline newline
720 \end_inset
721
722 figures and tables.
723  
724 \begin_inset Newline newline
725 \end_inset
726
727
728 \backslash
729 end{minipage}
730 \begin_inset Newline newline
731 \end_inset
732
733 &
734 \begin_inset Newline newline
735 \end_inset
736
737
738 \backslash
739 begin{minipage}{5cm}
740 \begin_inset Newline newline
741 \end_inset
742
743
744 \backslash
745 begin{verbatim}
746 \begin_inset Newline newline
747 \end_inset
748
749
750 \backslash
751 begin{minipage}{5cm}
752 \begin_inset Newline newline
753 \end_inset
754
755 This ...
756  
757 \begin_inset Newline newline
758 \end_inset
759
760
761 \backslash
762 end{minipage}
763 \begin_inset Newline newline
764 \end_inset
765
766
767 \backslash
768 end{verbatim}
769 \begin_inset Newline newline
770 \end_inset
771
772
773 \backslash
774 end{minipage}
775 \begin_inset Newline newline
776 \end_inset
777
778
779 \backslash
780 end{tabular}
781 \end_layout
782
783 \begin_layout LyX-Code
784
785 \end_layout
786
787 \begin_layout Standard
788 The 
789 \begin_inset Flex Code
790 status collapsed
791
792 \begin_layout Plain Layout
793 TeX Code
794 \end_layout
795
796 \end_inset
797
798  box containing this text is directly after this paragraph.
799  Those of you reading the manual in LyX will only see the TeX code inset.
800  Those reading a printed version of the manuals will see the actual results:
801 \end_layout
802
803 \begin_layout Standard
804 \begin_inset ERT
805 status collapsed
806
807 \begin_layout Plain Layout
808
809
810 \backslash
811 begin{tabular}{ll}
812 \end_layout
813
814 \begin_layout Plain Layout
815
816
817 \backslash
818 begin{minipage}{5cm}
819 \end_layout
820
821 \begin_layout Plain Layout
822
823 This is an example for a minipage environment.
824  You can put nearly everything in it, even (non-floating) figures and tables.
825  
826 \end_layout
827
828 \begin_layout Plain Layout
829
830
831 \backslash
832 end{minipage}
833 \end_layout
834
835 \begin_layout Plain Layout
836
837 &
838 \end_layout
839
840 \begin_layout Plain Layout
841
842
843 \backslash
844 begin{minipage}{5cm}
845 \end_layout
846
847 \begin_layout Plain Layout
848
849
850 \backslash
851 begin{verbatim}
852 \end_layout
853
854 \begin_layout Plain Layout
855
856
857 \backslash
858 begin{minipage}{5cm}
859 \end_layout
860
861 \begin_layout Plain Layout
862
863 This ...
864  
865 \end_layout
866
867 \begin_layout Plain Layout
868
869
870 \backslash
871 end{minipage}
872 \end_layout
873
874 \begin_layout Plain Layout
875
876
877 \backslash
878 end{verbatim}
879 \end_layout
880
881 \begin_layout Plain Layout
882
883
884 \backslash
885 end{minipage}
886 \end_layout
887
888 \begin_layout Plain Layout
889
890
891 \backslash
892 end{tabular}
893 \end_layout
894
895 \end_inset
896
897
898 \end_layout
899
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902  some complex LaTeX structure and then use 
903 \begin_inset Flex MenuItem
904 status collapsed
905
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
908 Child
909 \begin_inset space ~
910 \end_inset
911
912 Document
913 \end_layout
914
915 \end_inset
916
917  to include your file (you should select the type 
918 \begin_inset Flex Code
919 status collapsed
920
921 \begin_layout Plain Layout
922 Input
923 \end_layout
924
925 \end_inset
926
927 ).
928  We recommend that you only do this if you have a 
929 \begin_inset Flex Code
930 status collapsed
931
932 \begin_layout Plain Layout
933 .tex
934 \end_layout
935
936 \end_inset
937
938  file which you 
939 \emph on
940 know
941 \emph default
942  works already.
943  Otherwise, you'll have a big job tracking down LaTeX errors.
944 \end_layout
945
946 \begin_layout Standard
947 There are a few last points to emphasize:
948 \end_layout
949
950 \begin_layout Itemize
951 LyX 
952 \emph on
953 does not
954 \emph default
955  check if your LaTeX code is correct.
956 \end_layout
957
958 \begin_layout Itemize
959 Beware reinventing the wheel.
960 \end_layout
961
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
964  more are coming.
965  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966  feature before you decide you have to do it by hand.
967  Moreover, there are numerous LaTeX packages out there to do all sorts of
968  things, from labels to envelopes to fancy multipage tables.
969  Check out 
970 \begin_inset CommandInset href
971 LatexCommand href
972 name "CTAN"
973 target "http://www.ctan.org/"
974
975 \end_inset
976
977  for details, and see chapter 
978 \begin_inset CommandInset ref
979 LatexCommand ref
980 reference "cha:secrets"
981
982 \end_inset
983
984 .
985 \end_layout
986
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989  sure to check out a good LaTeX book for assistance.
990  There are a number of them listed in the bibliography of the 
991 \emph on
992 User's Guide
993 \emph default
994 .
995 \end_layout
996
997 \begin_layout Section
998 LyX and the LaTeX Preamble
999 \end_layout
1000
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1003 \end_layout
1004
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1007  is good for.
1008  If you don't, the following will give you some ideas—we recommend again
1009  that you consult a LaTeX book for further information.
1010  In any case, you should read the points below, because they explain what
1011  you can do and what you don't need to do in the LaTeX preamble of a LyX
1012  document.
1013 \end_layout
1014
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document, 
1017 \emph on
1018 before
1019 \emph default
1020  the text.
1021  It serves to:
1022 \end_layout
1023
1024 \begin_layout Itemize
1025 Declare the document class.
1026  
1027 \begin_inset Newline newline
1028 \end_inset
1029
1030 LyX already does this for you.
1031  If you're a seasoned LaTeX-nician, and you have a custom document class
1032  you want to use, check out the 
1033 \emph on
1034 Customization Manual
1035 \emph default
1036  for information on how to make LyX interface to it.
1037 \end_layout
1038
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1041  
1042 \begin_inset Newline newline
1043 \end_inset
1044
1045 LaTeX packages provide special commands, which are only available within
1046  a document when the package has been declared in the preamble.
1047  For example, the package 
1048 \begin_inset Flex Code
1049 status collapsed
1050
1051 \begin_layout Plain Layout
1052 indentfirst
1053 \end_layout
1054
1055 \end_inset
1056
1057  forces all paragraphs to be indented.
1058  There are other packages for labels, envelopes, margins, etc.
1059  
1060 \end_layout
1061
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1064  
1065 \begin_inset Newline newline
1066 \end_inset
1067
1068 There are several LaTeX counters and variables which 
1069 \emph on
1070 must
1071 \emph default
1072  be set globally from within the preamble in order to have the desired effect.
1073  (There are variables which you can set and reset inside the document, too.)
1074  Margins are a good example of something which must be set in the preamble.
1075  Another example is the label format for lists.
1076  You can actually set these just about anywhere, but it's best to do it
1077  just once, inside the preamble.
1078 \end_layout
1079
1080 \begin_layout Itemize
1081 Declare user defined commands (with 
1082 \begin_inset Flex Code
1083 status collapsed
1084
1085 \begin_layout Plain Layout
1086
1087 \backslash
1088 newcommand
1089 \end_layout
1090
1091 \end_inset
1092
1093  or 
1094 \begin_inset Flex Code
1095 status collapsed
1096
1097 \begin_layout Plain Layout
1098
1099 \backslash
1100 renewcommand
1101 \end_layout
1102
1103 \end_inset
1104
1105 ).
1106 \begin_inset Newline newline
1107 \end_inset
1108
1109 These are abbreviations for LaTeX commands which appear very often inside
1110  a document.
1111  Although the preamble is a good place to declare such commands, they 
1112 \emph on
1113 can
1114 \emph default
1115  be declared anywhere (before they are used for the first time, of course).
1116  This can be useful if there is a lot of raw LaTeX code in your document,
1117  which normally should not be the case.
1118 \end_layout
1119
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the 
1122 \begin_inset Flex Code
1123 status collapsed
1124
1125 \begin_layout Plain Layout
1126 .tex
1127 \end_layout
1128
1129 \end_inset
1130
1131  file it produces.
1132  This makes LaTeX files generated by LyX portable.
1133 \end_layout
1134
1135 \begin_layout Subsection
1136 Changing the Preamble
1137 \end_layout
1138
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141  can't change them without patching LyX itself.
1142  You can, however, add your own stuff to the preamble by selecting 
1143 \begin_inset Flex MenuItem
1144 status collapsed
1145
1146 \begin_layout Plain Layout
1147 LaTeX
1148 \begin_inset space ~
1149 \end_inset
1150
1151 Preamble
1152 \end_layout
1153
1154 \end_inset
1155
1156  in the 
1157 \begin_inset Flex MenuItem
1158 status collapsed
1159
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1162 Settings
1163 \end_layout
1164
1165 \end_inset
1166
1167  dialog.
1168  LyX adds anything in the 
1169 \begin_inset Flex MenuItem
1170 status collapsed
1171
1172 \begin_layout Plain Layout
1173 Preamble
1174 \end_layout
1175
1176 \end_inset
1177
1178  dialog to its own built-in preamble.
1179  Before adding your own declarations in the preamble, you should make sure
1180  that LyX doesn't already support what you want to do.
1181  (Remember what we said about reinventing the wheel?) Also, 
1182 \emph on
1183 make sure your preamble code is correct
1184 \emph default
1185 .
1186  LyX doesn't check it for you.
1187  If there is an error, you're likely to get an error like 
1188 \begin_inset Quotes eld
1189 \end_inset
1190
1191
1192 \begin_inset Flex Code
1193 status collapsed
1194
1195 \begin_layout Plain Layout
1196 Missing 
1197 \backslash
1198 begin{document}
1199 \end_layout
1200
1201 \end_inset
1202
1203
1204 \begin_inset Quotes erd
1205 \end_inset
1206
1207 .
1208  If you see this error, check your preamble.
1209 \end_layout
1210
1211 \begin_layout Subsection
1212 Examples
1213 \end_layout
1214
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1217  do.
1218 \end_layout
1219
1220 \begin_layout Subsubsection
1221 Example #1: Offsets
1222 \end_layout
1223
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position: 
1226 \begin_inset Flex Code
1227 status collapsed
1228
1229 \begin_layout Plain Layout
1230
1231 \backslash
1232 hoffset
1233 \end_layout
1234
1235 \end_inset
1236
1237  and 
1238 \begin_inset Flex Code
1239 status collapsed
1240
1241 \begin_layout Plain Layout
1242
1243 \backslash
1244 voffset
1245 \end_layout
1246
1247 \end_inset
1248
1249 .
1250  Their names should be self-explanatory.
1251  These variables are useful if you think for a moment about computer labels.
1252  Sometimes, the size of a print medium and the area of the medium that you
1253  can actually print on aren't the same.
1254  This is where 
1255 \begin_inset Flex Code
1256 status collapsed
1257
1258 \begin_layout Plain Layout
1259
1260 \backslash
1261 hoffset
1262 \end_layout
1263
1264 \end_inset
1265
1266  and 
1267 \begin_inset Flex Code
1268 status collapsed
1269
1270 \begin_layout Plain Layout
1271
1272 \backslash
1273 voffset
1274 \end_layout
1275
1276 \end_inset
1277
1278  come in.
1279 \end_layout
1280
1281 \begin_layout Standard
1282 The default values for 
1283 \begin_inset Flex Code
1284 status collapsed
1285
1286 \begin_layout Plain Layout
1287
1288 \backslash
1289 hoffset
1290 \end_layout
1291
1292 \end_inset
1293
1294  and 
1295 \begin_inset Flex Code
1296 status collapsed
1297
1298 \begin_layout Plain Layout
1299
1300 \backslash
1301 voffset
1302 \end_layout
1303
1304 \end_inset
1305
1306  are both 0
1307 \begin_inset space \thinspace{}
1308 \end_inset
1309
1310 points, i.
1311 \begin_inset space \thinspace{}
1312 \end_inset
1313
1314 e.
1315 \begin_inset space \space{}
1316 \end_inset
1317
1318 the page isn't shifted.
1319  Unfortunately, some DVI drivers always seem to shift the page.
1320  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321  If you're using LyX on a system that you don't personally maintain, and
1322  your sysadmin is a doofus, 
1323 \begin_inset Flex Code
1324 status collapsed
1325
1326 \begin_layout Plain Layout
1327
1328 \backslash
1329 hoffset
1330 \end_layout
1331
1332 \end_inset
1333
1334  and 
1335 \begin_inset Flex Code
1336 status collapsed
1337
1338 \begin_layout Plain Layout
1339
1340 \backslash
1341 voffset
1342 \end_layout
1343
1344 \end_inset
1345
1346  can save the day.
1347  Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1349 \end_inset
1350
1351 inches too big.
1352  You can add this to the preamble:
1353 \end_layout
1354
1355 \begin_layout LyX-Code
1356
1357 \backslash
1358 setlength{
1359 \backslash
1360 hoffset}{-0.5 in}
1361 \end_layout
1362
1363 \begin_layout LyX-Code
1364
1365 \backslash
1366 setlength{
1367 \backslash
1368 voffset}{-0.5 in}
1369 \end_layout
1370
1371 \begin_layout Standard
1372 and your margins should now be correct.
1373 \end_layout
1374
1375 \begin_layout Subsubsection
1376 Example #2: Labels
1377 \end_layout
1378
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381  There's a rather nice package, available at your nearest CTAN archive,
1382  for printing sheets of labels: 
1383 \begin_inset Flex Code
1384 status collapsed
1385
1386 \begin_layout Plain Layout
1387 labels.sty
1388 \end_layout
1389
1390 \end_inset
1391
1392 .
1393  Now, your system may not have this package installed by default.
1394  We leave that up to you to check.
1395  You'll also want to read the documentation for it; we're not going to do
1396  that for you.
1397  Since this is an example, however, we'll give you an example of how you
1398  use this package.
1399 \end_layout
1400
1401 \begin_layout Standard
1402 First, make sure you're using the 
1403 \begin_inset Flex Code
1404 status collapsed
1405
1406 \begin_layout Plain Layout
1407 article
1408 \end_layout
1409
1410 \end_inset
1411
1412  document class.
1413  Next, you need to put the following in your preamble:
1414 \end_layout
1415
1416 \begin_layout LyX-Code
1417
1418 \backslash
1419 usepackage{labels}
1420 \end_layout
1421
1422 \begin_layout LyX-Code
1423
1424 \backslash
1425 LabelCols=3
1426 \end_layout
1427
1428 \begin_layout LyX-Code
1429
1430 \backslash
1431 LabelRows=7
1432 \end_layout
1433
1434 \begin_layout LyX-Code
1435
1436 \backslash
1437 LeftBorder=8mm
1438 \end_layout
1439
1440 \begin_layout LyX-Code
1441
1442 \backslash
1443 RightBorder=8mm
1444 \end_layout
1445
1446 \begin_layout LyX-Code
1447
1448 \backslash
1449 TopBorder=9mm
1450 \end_layout
1451
1452 \begin_layout LyX-Code
1453
1454 \backslash
1455 BottomBorder=2mm
1456 \end_layout
1457
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460  You're now ready to print labels, but you'll need to insert LaTeX code,
1461  placing the commands 
1462 \begin_inset Flex Code
1463 status collapsed
1464
1465 \begin_layout Plain Layout
1466
1467 \backslash
1468 begin{labels}
1469 \end_layout
1470
1471 \end_inset
1472
1473  and 
1474 \begin_inset Flex Code
1475 status collapsed
1476
1477 \begin_layout Plain Layout
1478
1479 \backslash
1480 end{labels}
1481 \end_layout
1482
1483 \end_inset
1484
1485  around each label text.
1486  This and other special features of 
1487 \begin_inset Flex Code
1488 status collapsed
1489
1490 \begin_layout Plain Layout
1491 labels.sty
1492 \end_layout
1493
1494 \end_inset
1495
1496  are explained in its documentation.
1497 \end_layout
1498
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501  Maybe that someone is you.
1502 \end_layout
1503
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1506 \end_layout
1507
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of 
1510 \emph on
1511 every
1512 \emph default
1513  paragraph.
1514  As with all of their other weird quirks, most Americans will whine and
1515  moan until they can have their way and indent the first line of all paragraphs.
1516  (Yes, we're joking.
1517  (We are?) 
1518 \emph on
1519 Yeah
1520 \emph default
1521 , we are.)
1522 \end_layout
1523
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526  In books, you typically only indent the first line of a paragraph 
1527 \emph on
1528 if
1529 \emph default
1530  it follows another one.
1531  The idea behind indenting the first line of a paragraph is to distinguish
1532  neighboring paragraphs from one another.
1533  If there is no previous paragraph—for example, if it follows a figure or
1534  is the first paragraph in a section—then there is no need for indentation.
1535  
1536 \end_layout
1537
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540  about such esoteric things; you want your indentation! Add this to the
1541  preamble:
1542 \end_layout
1543
1544 \begin_layout LyX-Code
1545
1546 \backslash
1547 usepackage{indentfirst}
1548 \end_layout
1549
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552  all of your paragraphs will get the indentation the Founding Fathers intended
1553  they should have.
1554 \end_layout
1555
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1558 \end_layout
1559
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562  of the advanced things you can do.
1563  Also, there are more examples and an assortment of LaTeX 
1564 \begin_inset Quotes eld
1565 \end_inset
1566
1567 dirty tricks
1568 \begin_inset Quotes erd
1569 \end_inset
1570
1571  given in Chapter
1572 \begin_inset space ~
1573 \end_inset
1574
1575
1576 \begin_inset CommandInset ref
1577 LatexCommand ref
1578 reference "cha:secrets"
1579
1580 \end_inset
1581
1582 .
1583  
1584 \end_layout
1585
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1588 \end_layout
1589
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1592  going.
1593  It then uses the logfile from the LaTeX run to do a post-mortem.
1594  After analyzing the logfile,LyX displays a dialog listing the errors.
1595  Clicking on any one of them will take you to the position in your LyX file
1596  where the error occurred.
1597 \begin_inset Foot
1598 status collapsed
1599
1600 \begin_layout Plain Layout
1601 Well, usually.
1602  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1603  right line.
1604  There are also cases where LaTeX reports the error on one line, but the
1605  actual error is earlier.
1606  This is not unlike forgetting a closing brace in a program: You'll get
1607  an error, but only later.
1608 \end_layout
1609
1610 \end_inset
1611
1612
1613 \end_layout
1614
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1617  
1618 \begin_inset Flex MenuItem
1619 status collapsed
1620
1621 \begin_layout Plain Layout
1622 Document
1623 \bar under
1624 \SpecialChar \menuseparator
1625
1626 \bar default
1627 Latex
1628 \begin_inset space ~
1629 \end_inset
1630
1631 Log
1632 \end_layout
1633
1634 \end_inset
1635
1636 .
1637  There are some fairly common error messages and warnings.
1638  We'll cover those here.
1639  You should look at a good LaTeX book for a complete listing.
1640 \end_layout
1641
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1644 status collapsed
1645
1646 \begin_layout Plain Layout
1647 LaTeX Warning
1648 \end_layout
1649
1650 \end_inset
1651
1652
1653 \begin_inset Newline newline
1654 \end_inset
1655
1656 Anything beginning with these words is a warning message for the purpose
1657  of 
1658 \begin_inset Quotes eld
1659 \end_inset
1660
1661 debugging
1662 \begin_inset Quotes erd
1663 \end_inset
1664
1665  the LaTeX code itself.
1666  You'll get messages like this if you added or changed cross-references
1667  or bibliography entries, in which case, LaTeX is trying to tell you that
1668  you need to make another run.
1669  You can by-and-large ignore these.
1670 \end_layout
1671
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1674 status collapsed
1675
1676 \begin_layout Plain Layout
1677 LaTeX Font Warning
1678 \end_layout
1679
1680 \end_inset
1681
1682
1683 \begin_inset Newline newline
1684 \end_inset
1685
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687  The rest of the message will often say something about a replacement font
1688  that LaTeX used.
1689  You can safely ignore these, too.
1690 \end_layout
1691
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1694 status collapsed
1695
1696 \begin_layout Plain Layout
1697 Overfull 
1698 \backslash
1699 hbox
1700 \end_layout
1701
1702 \end_inset
1703
1704
1705 \begin_inset Newline newline
1706 \end_inset
1707
1708 LaTeX absolutely 
1709 \emph on
1710 loves
1711 \emph default
1712  to spew these out.
1713  They are warnings about lines that were too long and run past the right
1714  margin.
1715  Almost always, this is unnoticeable in the final output.
1716  (It can be just a point or two.) Or, only one or two characters extend past
1717  the margin.
1718  LaTeX seems to generate at least one of these messages for just about any
1719  document you write.
1720 \begin_inset Newline newline
1721 \end_inset
1722
1723 You can ignore these messages.
1724  Your eyes will tell you if there's a problem with something that's too
1725  wide; just look at the output.
1726 \begin_inset Foot
1727 status collapsed
1728
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in 
1731 \begin_inset Flex MenuItem
1732 status collapsed
1733
1734 \begin_layout Plain Layout
1735 Document
1736 \bar under
1737 \SpecialChar \menuseparator
1738
1739 \bar default
1740 Settings
1741 \end_layout
1742
1743 \end_inset
1744
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1746 \end_layout
1747
1748 \end_inset
1749
1750
1751 \end_layout
1752
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1755 status collapsed
1756
1757 \begin_layout Plain Layout
1758 Underfull 
1759 \backslash
1760 hbox
1761 \end_layout
1762
1763 \end_inset
1764
1765
1766 \begin_inset Newline newline
1767 \end_inset
1768
1769 Not quite as common as its cousin.
1770  LaTeX seems to like to print lines that are a bit too wide as opposed to
1771  ones that are a bit too narrow.
1772  We have no idea why.
1773 \end_layout
1774
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1777 status collapsed
1778
1779 \begin_layout Plain Layout
1780 Overfull 
1781 \backslash
1782 vbox
1783 \end_layout
1784
1785 \end_inset
1786
1787  and 
1788 \begin_inset Flex Code
1789 status collapsed
1790
1791 \begin_layout Plain Layout
1792 Underfull 
1793 \backslash
1794 vbox
1795 \end_layout
1796
1797 \end_inset
1798
1799
1800 \begin_inset Newline newline
1801 \end_inset
1802
1803 Warnings about troubles breaking the page.
1804  Once again, just look at the output.
1805  Your eyes will tell you where something has gone wrong.
1806 \end_layout
1807
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1810 status collapsed
1811
1812 \begin_layout Plain Layout
1813  LaTeX Error: File 
1814 \begin_inset Quotes els
1815 \end_inset
1816
1817 Xxxx
1818 \begin_inset Quotes ers
1819 \end_inset
1820
1821  not found
1822 \end_layout
1823
1824 \end_inset
1825
1826
1827 \begin_inset Newline newline
1828 \end_inset
1829
1830 The file 
1831 \begin_inset Quotes eld
1832 \end_inset
1833
1834 Xxxx
1835 \begin_inset Quotes erd
1836 \end_inset
1837
1838  isn't installed on this system.
1839  This usually appears because some package your document needs isn't installed.
1840  If you didn't touch the preamble or didn't use the 
1841 \begin_inset Flex Code
1842 status collapsed
1843
1844 \begin_layout Plain Layout
1845
1846 \backslash
1847 usepackage{}
1848 \end_layout
1849
1850 \end_inset
1851
1852  command, then one of the packages LyX tried to load is missing.
1853  Use 
1854 \begin_inset Flex MenuItem
1855 status collapsed
1856
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1859 LaTeX Configuration
1860 \end_layout
1861
1862 \end_inset
1863
1864  to get a list of packages that LyX knows about.
1865  This file is updated whenever you reconfigure LyX (using 
1866 \begin_inset Flex MenuItem
1867 status collapsed
1868
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1871 Reconfigure
1872 \end_layout
1873
1874 \end_inset
1875
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1878 \end_inset
1879
1880 If you did use the 
1881 \begin_inset Flex Code
1882 status collapsed
1883
1884 \begin_layout Plain Layout
1885
1886 \backslash
1887 usepackage{}
1888 \end_layout
1889
1890 \end_inset
1891
1892  command and the package in question isn't installed, then you'll need to
1893  install it yourself.
1894 \end_layout
1895
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1898 status collapsed
1899
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1902 \end_layout
1903
1904 \end_inset
1905
1906
1907 \begin_inset Newline newline
1908 \end_inset
1909
1910 Error messages beginning with this are trying to tell you that you specified
1911  a bad or undefined option to a package.
1912  Check the package's documentation.
1913 \end_layout
1914
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1917 status collapsed
1918
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1921 \end_layout
1922
1923 \end_inset
1924
1925
1926 \begin_inset Newline newline
1927 \end_inset
1928
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1930  get one of these.
1931  You may have forgotten to load a package.
1932  In any case, this error message usually means that you used an undefined
1933  command.
1934  
1935 \end_layout
1936
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939  Some are self-explanatory.
1940  These are usually LaTeX messages.
1941  Others are downright cryptic.
1942  These are usually TeX error messages, and we really have 
1943 \emph on
1944 no clue
1945 \emph default
1946  what they mean or how to decipher them.
1947  No-one does.
1948 \end_layout
1949
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1952 \end_layout
1953
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1956 \end_layout
1957
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1960 \end_layout
1961
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964  especially if you see a 
1965 \begin_inset Quotes eld
1966 \end_inset
1967
1968
1969 \begin_inset Flex Code
1970 status collapsed
1971
1972 \begin_layout Plain Layout
1973 Missing 
1974 \backslash
1975 begin{document}
1976 \end_layout
1977
1978 \end_inset
1979
1980
1981 \begin_inset Quotes erd
1982 \end_inset
1983
1984  error—it means that there are errors in the preamble.
1985  Start debugging your preamble.
1986 \end_layout
1987
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990  to the document, the first suspect is your LaTeX distribution itself.
1991  Check for missing packages and install them.
1992 \end_layout
1993
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996  Did you use any of the fine-tuning options in LyX? Specifically, did you
1997  
1998 \emph on
1999 misuse
2000 \emph default
2001  any of them, like trying to manually insert lots of 
2002 \begin_inset Flex Code
2003 status collapsed
2004
2005 \begin_layout Plain Layout
2006 Protected
2007 \begin_inset space ~
2008 \end_inset
2009
2010 Blanks
2011 \end_layout
2012
2013 \end_inset
2014
2015
2016 \begin_inset Flex Code
2017 status collapsed
2018
2019 \begin_layout Plain Layout
2020 Linebreaks
2021 \end_layout
2022
2023 \end_inset
2024
2025 , or 
2026 \begin_inset Flex Code
2027 status collapsed
2028
2029 \begin_layout Plain Layout
2030 Pagebreaks
2031 \end_layout
2032
2033 \end_inset
2034
2035 ? Did you try to kludge something together with these instead of using the
2036  appropriate paragraph environment?
2037 \end_layout
2038
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2041  the rules.
2042  Did you try to pull a fancy maneuver? Did you do something funky inside
2043  a table or an equation, like inserting a graphic into a table cell?
2044 \end_layout
2045
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048  a line? By default, LaTeX is rather strict about how much extra inter-word
2049  spacing it will add in order to break a line.
2050  Preferably, you should rework the paragraph to avoid the problem.
2051  If this isn't an option, you can wrap your text in 
2052 \begin_inset Flex Code
2053 status collapsed
2054
2055 \begin_layout Plain Layout
2056
2057 \backslash
2058 sloppypar
2059 \end_layout
2060
2061 \end_inset
2062
2063  to make LaTeX's line breaking more, well, sloppy.
2064 \end_layout
2065
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068  make sure you're in the limits for nesting environments.
2069  If you nested a bunch of environments to the 
2070 \begin_inset Formula $17^{\mathrm{th}}$
2071 \end_inset
2072
2073  level, that's the problem.
2074  (The limit in LaTeX is five.)
2075 \end_layout
2076
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079  If you have a table or figure that's too wide or long for the page, you
2080  need to:
2081 \end_layout
2082
2083 \begin_deeper
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2086 \end_layout
2087
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2090 \end_layout
2091
2092 \end_deeper
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2096 \end_layout
2097
2098 \begin_layout Standard
2099 If all this doesn't help—well, then 
2100 \emph on
2101 perhaps
2102 \emph default
2103  you might have found a bug in LyX\SpecialChar \ldots{}
2104 .
2105 \end_layout
2106
2107 \begin_layout Chapter
2108 Supplemental Tools
2109 \end_layout
2110
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2113 \end_layout
2114
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2117  in the section 
2118 \emph on
2119 Bibliography databases (BibTeX)
2120 \emph default
2121  of the 
2122 \emph on
2123 User's Guide
2124 \emph default
2125 .
2126  The following subsections explain special bibliography features supported
2127  by LyX.
2128 \end_layout
2129
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2132 \end_layout
2133
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2137 \end_inset
2138
2139 g.
2140 \begin_inset space \space{}
2141 \end_inset
2142
2143
2144 \begin_inset Quotes eld
2145 \end_inset
2146
2147 [12]
2148 \begin_inset Quotes erd
2149 \end_inset
2150
2151 ) to refer to a cited work.
2152  However, in many scientific disciplines, other citation styles are in use.
2153  The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2155 \end_inset
2156
2157 g.
2158 \begin_inset space \space{}
2159 \end_inset
2160
2161
2162 \begin_inset Quotes eld
2163 \end_inset
2164
2165 Knuth 1984a
2166 \begin_inset Quotes erd
2167 \end_inset
2168
2169 ).
2170  LyX supports two packages that provide this style, 
2171 \begin_inset Flex Code
2172 status collapsed
2173
2174 \begin_layout Plain Layout
2175 natbib
2176 \end_layout
2177
2178 \end_inset
2179
2180  and 
2181 \begin_inset Flex Code
2182 status collapsed
2183
2184 \begin_layout Plain Layout
2185 jurabib
2186 \end_layout
2187
2188 \end_inset
2189
2190 .
2191  Both packages have their pros and cons, which cannot be listed in detail.
2192  If you only want to have simple author-year (or author-numerical) style,
2193  or if you want to use one of the countless style files for 
2194 \begin_inset Flex Code
2195 status collapsed
2196
2197 \begin_layout Plain Layout
2198 natbib
2199 \end_layout
2200
2201 \end_inset
2202
2203 , than the established 
2204 \begin_inset Flex Code
2205 status collapsed
2206
2207 \begin_layout Plain Layout
2208 natbib
2209 \end_layout
2210
2211 \end_inset
2212
2213  package is probably your choice.
2214  If you need special features like short title references, ibidem etc., you
2215  might consider the 
2216 \begin_inset Flex Code
2217 status collapsed
2218
2219 \begin_layout Plain Layout
2220 jurabib
2221 \end_layout
2222
2223 \end_inset
2224
2225  package.
2226 \end_layout
2227
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2230  Go to 
2231 \begin_inset Flex MenuItem
2232 status collapsed
2233
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2236 Settings
2237 \end_layout
2238
2239 \end_inset
2240
2241  and select under 
2242 \begin_inset Flex MenuItem
2243 status collapsed
2244
2245 \begin_layout Plain Layout
2246 Bibliography
2247 \end_layout
2248
2249 \end_inset
2250
2251  the option 
2252 \begin_inset Flex MenuItem
2253 status collapsed
2254
2255 \begin_layout Plain Layout
2256 Natbib
2257 \end_layout
2258
2259 \end_inset
2260
2261  or 
2262 \begin_inset Flex MenuItem
2263 status collapsed
2264
2265 \begin_layout Plain Layout
2266 Jurabib
2267 \end_layout
2268
2269 \end_inset
2270
2271 .
2272  With both packages, you will get some extra features in the citation dialog
2273  and you can select the style of the reference (
2274 \begin_inset Quotes eld
2275 \end_inset
2276
2277 Knuth 1984
2278 \begin_inset Quotes erd
2279 \end_inset
2280
2281
2282 \begin_inset Quotes eld
2283 \end_inset
2284
2285 Knuth (1984)
2286 \begin_inset Quotes erd
2287 \end_inset
2288
2289
2290 \begin_inset Quotes eld
2291 \end_inset
2292
2293 Knuth, 1984
2294 \begin_inset Quotes erd
2295 \end_inset
2296
2297
2298 \begin_inset Quotes eld
2299 \end_inset
2300
2301 1984
2302 \begin_inset Quotes erd
2303 \end_inset
2304
2305  etc.).
2306  Note that both packages need specifically designed style files.
2307  They both ship their own, but there are lots of additional style files,
2308  and there is even an interactive style file builder
2309 \begin_inset Foot
2310 status collapsed
2311
2312 \begin_layout Plain Layout
2313 See 
2314 \begin_inset Flex URL
2315 status open
2316
2317 \begin_layout Plain Layout
2318
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2320 \end_layout
2321
2322 \end_inset
2323
2324
2325 \end_layout
2326
2327 \end_inset
2328
2329  for 
2330 \begin_inset Flex Code
2331 status collapsed
2332
2333 \begin_layout Plain Layout
2334 natbib
2335 \end_layout
2336
2337 \end_inset
2338
2339 .
2340 \end_layout
2341
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2344 \end_layout
2345
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348  If you are for instance a historian, the possibility to separate sources
2349  and scientific works is most likely a 
2350 \begin_inset Quotes eld
2351 \end_inset
2352
2353 must have
2354 \begin_inset Quotes erd
2355 \end_inset
2356
2357 .
2358  Unfortunately, BibTeX itself does not allow you to do this.
2359  But with the help of some LaTeX packages, BibTeX can be extended to fit
2360  your needs.
2361 \end_layout
2362
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages, 
2365 \family typewriter
2366 bibtopic
2367 \family default
2368 .
2369 \begin_inset Foot
2370 status collapsed
2371
2372 \begin_layout Plain Layout
2373 Available from 
2374 \begin_inset Flex URL
2375 status open
2376
2377 \begin_layout Plain Layout
2378
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2380 \end_layout
2381
2382 \end_inset
2383
2384
2385 \end_layout
2386
2387 \end_inset
2388
2389  The advantage of this package (compared to other packages like 
2390 \family typewriter
2391 multibib
2392 \family default
2393 ) is that you don't need to define new citation commands.
2394  Instead, you need to prepare different bibliographic databases which include
2395  the entries for the different sections of the bibliography.
2396  For example: If you want to divide your bibliography into the sections
2397  
2398 \begin_inset Quotes eld
2399 \end_inset
2400
2401 Sources
2402 \begin_inset Quotes erd
2403 \end_inset
2404
2405  and 
2406 \begin_inset Quotes eld
2407 \end_inset
2408
2409 Scientific works
2410 \begin_inset Quotes erd
2411 \end_inset
2412
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2415 \end_inset
2416
2417 g.
2418 \begin_inset space \space{}
2419 \end_inset
2420
2421
2422 \begin_inset Flex Code
2423 status collapsed
2424
2425 \begin_layout Plain Layout
2426 sources.bib
2427 \end_layout
2428
2429 \end_inset
2430
2431  and 
2432 \begin_inset Flex Code
2433 status collapsed
2434
2435 \begin_layout Plain Layout
2436 scientific.bib
2437 \end_layout
2438
2439 \end_inset
2440
2441 .
2442  
2443 \end_layout
2444
2445 \begin_layout Standard
2446 Go to 
2447 \begin_inset Flex MenuItem
2448 status collapsed
2449
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2452 Settings
2453 \end_layout
2454
2455 \end_inset
2456
2457  and check under 
2458 \begin_inset Flex MenuItem
2459 status collapsed
2460
2461 \begin_layout Plain Layout
2462 Bibliography
2463 \end_layout
2464
2465 \end_inset
2466
2467  the option 
2468 \begin_inset Flex MenuItem
2469 status collapsed
2470
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2473 \end_layout
2474
2475 \end_inset
2476
2477 .
2478  Now you can insert multiple BibTeX bibliographies, one for each section
2479  of your bibliography.
2480  Returning to our example: Insert the BibTeX bibliography 
2481 \begin_inset Flex Code
2482 status collapsed
2483
2484 \begin_layout Plain Layout
2485 sources.bib
2486 \end_layout
2487
2488 \end_inset
2489
2490  and a second one for the database 
2491 \begin_inset Flex Code
2492 status collapsed
2493
2494 \begin_layout Plain Layout
2495 scientific.bib
2496 \end_layout
2497
2498 \end_inset
2499
2500 .
2501  You are free to use the same or different styles for each section.
2502  Additionally, you can chose if the bibliography section should contain
2503  
2504 \begin_inset Quotes eld
2505 \end_inset
2506
2507 all cited references
2508 \begin_inset Quotes erd
2509 \end_inset
2510
2511  of the specified database(s) (which is the default), 
2512 \begin_inset Quotes eld
2513 \end_inset
2514
2515 all uncited references
2516 \begin_inset Quotes erd
2517 \end_inset
2518
2519  or even 
2520 \begin_inset Quotes eld
2521 \end_inset
2522
2523 all references
2524 \begin_inset Quotes erd
2525 \end_inset
2526
2527 .
2528  This might be useful if you would like to separate your bibliography into
2529  three sections: 
2530 \begin_inset Quotes eld
2531 \end_inset
2532
2533 Cited sources
2534 \begin_inset Quotes erd
2535 \end_inset
2536
2537
2538 \begin_inset Quotes eld
2539 \end_inset
2540
2541 Uncited sources
2542 \begin_inset Quotes erd
2543 \end_inset
2544
2545 , and 
2546 \begin_inset Quotes eld
2547 \end_inset
2548
2549 Scientific works
2550 \begin_inset Quotes erd
2551 \end_inset
2552
2553 .
2554  The titles for the sections can be added as ordinary sections or subsections.
2555  Since 
2556 \begin_inset Flex Code
2557 status collapsed
2558
2559 \begin_layout Plain Layout
2560 bibtopic
2561 \end_layout
2562
2563 \end_inset
2564
2565  removes the bibliography title, you have manually re-add that, too (as
2566  a chapter* or section*, for instance).
2567 \end_layout
2568
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2571 \end_layout
2572
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2576 \end_inset
2577
2578 g.
2579 \begin_inset space \space{}
2580 \end_inset
2581
2582 a bibliography for each section or chapter of the document, are not supported
2583  by BibTeX itself.
2584  But the 
2585 \begin_inset Flex Code
2586 status collapsed
2587
2588 \begin_layout Plain Layout
2589 bibtopic
2590 \end_layout
2591
2592 \end_inset
2593
2594  package, which is used for the creation of sectioned bibliographies in
2595  LyX (see the previous section), provides an easy way to solve this task,
2596  if you are willing to use some 
2597 \begin_inset Flex MenuItem
2598 status collapsed
2599
2600 \begin_layout Plain Layout
2601 TeX Code
2602 \end_layout
2603
2604 \end_inset
2605
2606  (see section
2607 \begin_inset space ~
2608 \end_inset
2609
2610
2611 \begin_inset CommandInset ref
2612 LatexCommand ref
2613 reference "sec:Inserting-TeX-Code"
2614
2615 \end_inset
2616
2617 ).
2618 \begin_inset Foot
2619 status collapsed
2620
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the 
2623 \begin_inset Flex Code
2624 status collapsed
2625
2626 \begin_layout Plain Layout
2627 chapterbib
2628 \end_layout
2629
2630 \end_inset
2631
2632  or 
2633 \begin_inset Flex Code
2634 status collapsed
2635
2636 \begin_layout Plain Layout
2637 bibunits
2638 \end_layout
2639
2640 \end_inset
2641
2642  package, respectively.
2643 \end_layout
2644
2645 \end_inset
2646
2647
2648 \end_layout
2649
2650 \begin_layout Standard
2651 First go to 
2652 \begin_inset Flex MenuItem
2653 status collapsed
2654
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2657 Settings
2658 \end_layout
2659
2660 \end_inset
2661
2662  and under 
2663 \begin_inset Flex MenuItem
2664 status collapsed
2665
2666 \begin_layout Plain Layout
2667 Bibliography
2668 \end_layout
2669
2670 \end_inset
2671
2672  check 
2673 \begin_inset Flex MenuItem
2674 status collapsed
2675
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2678 \end_layout
2679
2680 \end_inset
2681
2682 .
2683  In the document, you have to enclose the sections, which shall contain
2684  their own bibliography (including the BibTeX bibliography itself), between
2685  
2686 \begin_inset Flex Code
2687 status collapsed
2688
2689 \begin_layout Plain Layout
2690
2691 \backslash
2692 begin{btUnit}
2693 \end_layout
2694
2695 \end_inset
2696
2697  and 
2698 \begin_inset Flex Code
2699 status collapsed
2700
2701 \begin_layout Plain Layout
2702
2703 \backslash
2704 end{btUnit}
2705 \end_layout
2706
2707 \end_inset
2708
2709  (those commands have to be inserted as TeX code).
2710  The bibliography will contain all references which have been cited in the
2711  current 
2712 \begin_inset Flex Code
2713 status collapsed
2714
2715 \begin_layout Plain Layout
2716 btUnit
2717 \end_layout
2718
2719 \end_inset
2720
2721 .
2722  
2723 \series bold
2724 Note:
2725 \series default
2726  If you are using this approach, then every citation reference has to be
2727  inside some 
2728 \begin_inset Flex Code
2729 status collapsed
2730
2731 \begin_layout Plain Layout
2732 btUnit
2733 \end_layout
2734
2735 \end_inset
2736
2737 .
2738  Also, the 
2739 \begin_inset Flex Code
2740 status collapsed
2741
2742 \begin_layout Plain Layout
2743 btUnit
2744 \end_layout
2745
2746 \end_inset
2747
2748 s cannot be nested.
2749 \end_layout
2750
2751 \begin_layout Section
2752 Multipart Documents
2753 \end_layout
2754
2755 \begin_layout Subsection
2756 General Operation
2757 \end_layout
2758
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761  to break up the document into several files, or perhaps you have something
2762  where a table may change from time to time, but the preceding text does
2763  not.
2764  In these cases, you should seriously consider using multipart documents.
2765  For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767  Each of these could be its own separate LyX file, with one 
2768 \begin_inset Quotes eld
2769 \end_inset
2770
2771 master
2772 \begin_inset Quotes erd
2773 \end_inset
2774
2775  file which contains the title, authors, abstract, references, etc., plus
2776  the five included files.
2777  It is important to note that each of these files is a full LyX file which
2778  can be formatted and printed on its own, as well as included in a master
2779  file.
2780  Each of these files must have the same document class, however—don't attempt
2781  to mix book classes with article classes.
2782  You may also include LaTeX files; however, these files must not have their
2783  own preamble (i.
2784 \begin_inset space \thinspace{}
2785 \end_inset
2786
2787 g.
2788 \begin_inset space \space{}
2789 \end_inset
2790
2791 everything up to and including the 
2792 \begin_inset Flex Code
2793 status collapsed
2794
2795 \begin_layout Plain Layout
2796
2797 \backslash
2798 begin{document}
2799 \end_layout
2800
2801 \end_inset
2802
2803  line as well as the 
2804 \begin_inset Flex Code
2805 status collapsed
2806
2807 \begin_layout Plain Layout
2808
2809 \backslash
2810 end{document}
2811 \end_layout
2812
2813 \end_inset
2814
2815  line must be deleted) or else errors will be generated when you try to
2816  make a DVI file.
2817 \end_layout
2818
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with 
2821 \begin_inset Flex MenuItem
2822 status collapsed
2823
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2826 ChiId
2827 \begin_inset space ~
2828 \end_inset
2829
2830 Document
2831 \end_layout
2832
2833 \end_inset
2834
2835 .
2836  When you click on this selection a small box is inserted into the file
2837  at the current cursor location.
2838  Clicking on the box raises a dialog which allows you to select the file
2839  to be included, and the method of its inclusion.
2840  
2841 \end_layout
2842
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845  The three inclusion methods are 
2846 \begin_inset Quotes eld
2847 \end_inset
2848
2849 include
2850 \begin_inset Quotes erd
2851 \end_inset
2852
2853
2854 \begin_inset Quotes eld
2855 \end_inset
2856
2857 input
2858 \begin_inset Quotes erd
2859 \end_inset
2860
2861 , and 
2862 \begin_inset Quotes eld
2863 \end_inset
2864
2865 verbatim
2866 \begin_inset Quotes erd
2867 \end_inset
2868
2869 .
2870  The difference between 
2871 \begin_inset Quotes eld
2872 \end_inset
2873
2874 include
2875 \begin_inset Quotes erd
2876 \end_inset
2877
2878  and 
2879 \begin_inset Quotes eld
2880 \end_inset
2881
2882 input
2883 \begin_inset Quotes erd
2884 \end_inset
2885
2886  is really only meaningful to LaTeXperts, but the practical difference is
2887  that files which are 
2888 \begin_inset Quotes eld
2889 \end_inset
2890
2891 included
2892 \begin_inset Quotes erd
2893 \end_inset
2894
2895  are typeset beginning on a new page, while files which are 
2896 \begin_inset Quotes eld
2897 \end_inset
2898
2899 inputted
2900 \begin_inset Quotes erd
2901 \end_inset
2902
2903  are typeset starting on the current page.
2904 \end_layout
2905
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909  all the preamble information.
2910 \end_layout
2911
2912 \begin_layout Standard
2913
2914 \begin_inset Quotes eld
2915 \end_inset
2916
2917 verbatim
2918 \begin_inset Quotes erd
2919 \end_inset
2920
2921  included file allows you to include a file typeset exactly as it appears
2922  in the file, i.
2923 \begin_inset space \thinspace{}
2924 \end_inset
2925
2926 g.
2927 \begin_inset space \space{}
2928 \end_inset
2929
2930 in 
2931 \begin_inset Flex Code
2932 status collapsed
2933
2934 \begin_layout Plain Layout
2935 verbatim
2936 \end_layout
2937
2938 \end_inset
2939
2940  mode, with the characters set in a fixed-width typewriter font.
2941  Normally, spaces in this file are invisible, though two consecutive spaces
2942  are conserved, unlike LyX's normal treatment of spaces.
2943  However, setting the 
2944 \begin_inset Flex MenuItem
2945 status collapsed
2946
2947 \begin_layout Plain Layout
2948 Mark
2949 \begin_inset space ~
2950 \end_inset
2951
2952 spaces
2953 \begin_inset space ~
2954 \end_inset
2955
2956 in
2957 \begin_inset space ~
2958 \end_inset
2959
2960 output
2961 \end_layout
2962
2963 \end_inset
2964
2965  checkbox typesets a mark to unambiguously define the presence of a space.
2966  
2967 \end_layout
2968
2969 \begin_layout Subsection
2970 Cross-References Between Files
2971 \end_layout
2972
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2975 position "t"
2976 hor_pos "c"
2977 has_inner_box 1
2978 inner_pos "t"
2979 use_parbox 0
2980 use_makebox 0
2981 width "100col%"
2982 special "none"
2983 height "1in"
2984 height_special "totalheight"
2985 status open
2986
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989  Need to describe default master documents and how children are opened when
2990  the master is.
2991  [[FIXME]]
2992 \end_layout
2993
2994 \end_inset
2995
2996
2997 \end_layout
2998
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001  First, open all the files in question: let's call them A and B in a two
3002  file example, where B is included in A.
3003  Let's say you insert a label in A, then want to reference it in B.
3004  Open the cross-reference dialog in whilst in document B, and you can select
3005  the 
3006 \begin_inset Quotes eld
3007 \end_inset
3008
3009 buffer
3010 \begin_inset Quotes erd
3011 \end_inset
3012
3013  to use.
3014 \end_layout
3015
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3018 \end_layout
3019
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3022 position "t"
3023 hor_pos "c"
3024 has_inner_box 1
3025 inner_pos "t"
3026 use_parbox 0
3027 use_makebox 0
3028 width "100col%"
3029 special "none"
3030 height "1in"
3031 height_special "totalheight"
3032 status open
3033
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036  There is now material about this on the wiki, and it could be copied here.
3037 \end_layout
3038
3039 \end_inset
3040
3041
3042 \end_layout
3043
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3046  them to a comment.
3047  This way LyX will find the 
3048 \begin_inset Flex Code
3049 status collapsed
3050
3051 \begin_layout Plain Layout
3052 .bib
3053 \end_layout
3054
3055 \end_inset
3056
3057 -files and you can easily insert references without making the bibliography
3058  list visible.
3059 \end_layout
3060
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063  references will look like this: [?], instead of like this: [1].
3064  One solution is to use the LaTeX-package 
3065 \begin_inset Flex Code
3066 status collapsed
3067
3068 \begin_layout Plain Layout
3069 comment
3070 \end_layout
3071
3072 \end_inset
3073
3074  that will only include comments by processing the files separately.
3075  To do this, add in the LaTeX preamble of every subdocument the following:
3076 \end_layout
3077
3078 \begin_layout LyX-Code
3079
3080 \backslash
3081 usepackage{comment}
3082 \end_layout
3083
3084 \begin_layout LyX-Code
3085
3086 \backslash
3087 includecomment{comment}
3088 \end_layout
3089
3090 \begin_layout Standard
3091 See also 
3092 \begin_inset Flex URL
3093 status collapsed
3094
3095 \begin_layout Plain Layout
3096
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3098 \end_layout
3099
3100 \end_inset
3101
3102 .
3103 \end_layout
3104
3105 \begin_layout Section
3106 LyX Archives
3107 \end_layout
3108
3109 \begin_layout Standard
3110 Users sometimes need to be able to 
3111 \begin_inset Quotes eld
3112 \end_inset
3113
3114 bundle
3115 \begin_inset Quotes erd
3116 \end_inset
3117
3118  a LyX file together with all the images (and other files) on which it depends,
3119  either for sending to a publisher or for sharing with a co-author.
3120  LyX 2.0 includes a Python script (
3121 \begin_inset Flex Code
3122 status collapsed
3123
3124 \begin_layout Plain Layout
3125 lyxpak.py
3126 \end_layout
3127
3128 \end_inset
3129
3130 ) that automates this process.
3131  To use it, you must have either the 
3132 \begin_inset Flex Code
3133 status collapsed
3134
3135 \begin_layout Plain Layout
3136 zipfile
3137 \end_layout
3138
3139 \end_inset
3140
3141  or 
3142 \begin_inset Flex Code
3143 status collapsed
3144
3145 \begin_layout Plain Layout
3146 tarfile
3147 \end_layout
3148
3149 \end_inset
3150
3151  python modules installed on your system.
3152  By default, the script prefers the 
3153 \begin_inset Flex Code
3154 status collapsed
3155
3156 \begin_layout Plain Layout
3157 gzip
3158 \end_layout
3159
3160 \end_inset
3161
3162 -compressed 
3163 \begin_inset Flex Code
3164 status collapsed
3165
3166 \begin_layout Plain Layout
3167 tar
3168 \end_layout
3169
3170 \end_inset
3171
3172  format on Unix-like systems and the 
3173 \begin_inset Flex Code
3174 status collapsed
3175
3176 \begin_layout Plain Layout
3177 zip
3178 \end_layout
3179
3180 \end_inset
3181
3182  format on Windows.
3183 \end_layout
3184
3185 \begin_layout Standard
3186 LyX's configuration process will set the script up to export a `LyX Archive',
3187  and this format will then be available under 
3188 \begin_inset Flex Code
3189 status collapsed
3190
3191 \begin_layout Plain Layout
3192 File\SpecialChar \menuseparator
3193 Export
3194 \end_layout
3195
3196 \end_inset
3197
3198 .
3199 \end_layout
3200
3201 \begin_layout Standard
3202 Independently of the platform, the generation of a particular archive format
3203  can be forced by adding either the 
3204 \begin_inset Flex Code
3205 status collapsed
3206
3207 \begin_layout Plain Layout
3208 -t
3209 \end_layout
3210
3211 \end_inset
3212
3213  (for the 
3214 \begin_inset Flex Code
3215 status collapsed
3216
3217 \begin_layout Plain Layout
3218 tar
3219 \end_layout
3220
3221 \end_inset
3222
3223  format) or 
3224 \begin_inset Flex Code
3225 status collapsed
3226
3227 \begin_layout Plain Layout
3228 -z
3229 \end_layout
3230
3231 \end_inset
3232
3233  (for the 
3234 \begin_inset Flex Code
3235 status collapsed
3236
3237 \begin_layout Plain Layout
3238 zip
3239 \end_layout
3240
3241 \end_inset
3242
3243  format) switch to the 
3244 \begin_inset Flex Code
3245 status collapsed
3246
3247 \begin_layout Plain Layout
3248 LyX\SpecialChar \menuseparator
3249 LyX Archive
3250 \end_layout
3251
3252 \end_inset
3253
3254  converter in 
3255 \begin_inset Flex Code
3256 status collapsed
3257
3258 \begin_layout Plain Layout
3259 Tools\SpecialChar \menuseparator
3260 Preferences\SpecialChar \menuseparator
3261 File Handling\SpecialChar \menuseparator
3262 Converters
3263 \end_layout
3264
3265 \end_inset
3266
3267 .
3268  (Make sure you add the switch after the script name, not before it.)
3269 \end_layout
3270
3271 \begin_layout Section
3272 Fancy Headers and Footers
3273 \end_layout
3274
3275 \begin_layout Standard
3276 The default page layout is rather plain; for an 
3277 \begin_inset Flex Code
3278 status collapsed
3279
3280 \begin_layout Plain Layout
3281 article
3282 \end_layout
3283
3284 \end_inset
3285
3286  document class, all you get is a centered page number at the bottom of
3287  the page.
3288  This document uses KOMA-script's book class, so it appears to be a bit
3289  fancier.
3290  But to really put on a show, you need to set the document page style to
3291  
3292 \begin_inset Quotes eld
3293 \end_inset
3294
3295 fancy
3296 \begin_inset Quotes erd
3297 \end_inset
3298
3299 , as mentioned in the 
3300 \emph on
3301 User Guide
3302 \emph default
3303 .
3304  This section describes the LaTeX code you need to insert in your LaTeX
3305  preamble in order to get the desired effects.
3306 \end_layout
3307
3308 \begin_layout Standard
3309 For more information on fancy headers, see the 
3310 \begin_inset Flex Code
3311 status collapsed
3312
3313 \begin_layout Plain Layout
3314 fancyhdr
3315 \end_layout
3316
3317 \end_inset
3318
3319  package documentation.
3320  (
3321 \begin_inset Flex URL
3322 status collapsed
3323
3324 \begin_layout Plain Layout
3325
3326 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3327 \end_layout
3328
3329 \end_inset
3330
3331 )
3332 \end_layout
3333
3334 \begin_layout Standard
3335 The page header is divided into three fields, not surprisingly labeled 
3336 \begin_inset Quotes eld
3337 \end_inset
3338
3339 left
3340 \begin_inset Quotes erd
3341 \end_inset
3342
3343
3344 \begin_inset Quotes eld
3345 \end_inset
3346
3347 center
3348 \begin_inset Quotes erd
3349 \end_inset
3350
3351 , and 
3352 \begin_inset Quotes eld
3353 \end_inset
3354
3355 right
3356 \begin_inset Quotes erd
3357 \end_inset
3358
3359 .
3360  The footer is also divided into these three fields.
3361  The LaTeX commands to set these fields in the simplest manner are 
3362 \begin_inset Flex Code
3363 status collapsed
3364
3365 \begin_layout Plain Layout
3366
3367 \backslash
3368 lhead
3369 \end_layout
3370
3371 \end_inset
3372
3373
3374 \begin_inset Flex Code
3375 status collapsed
3376
3377 \begin_layout Plain Layout
3378
3379 \backslash
3380 chead
3381 \end_layout
3382
3383 \end_inset
3384
3385
3386 \begin_inset Flex Code
3387 status collapsed
3388
3389 \begin_layout Plain Layout
3390
3391 \backslash
3392 rhead
3393 \end_layout
3394
3395 \end_inset
3396
3397
3398 \begin_inset Flex Code
3399 status collapsed
3400
3401 \begin_layout Plain Layout
3402
3403 \backslash
3404 lfoot
3405 \end_layout
3406
3407 \end_inset
3408
3409 , etc.
3410  Suppose you wish to put your name in the upper left hand corner of each
3411  page.
3412  Simply insert the following command in the preamble: 
3413 \end_layout
3414
3415 \begin_layout Standard
3416
3417 \family typewriter
3418
3419 \backslash
3420 lhead{John Q.
3421  DocWriter}
3422 \end_layout
3423
3424 \begin_layout Standard
3425 You will now see your name in the upper left.
3426  If a field has a default entry that you would like to get rid of (often
3427  the page number appears in the central footer, simply include a command
3428  with a blank argument, e.
3429 \begin_inset space \thinspace{}
3430 \end_inset
3431
3432 g.:
3433 \end_layout
3434
3435 \begin_layout Standard
3436
3437 \family typewriter
3438
3439 \backslash
3440 cfoot{}
3441 \end_layout
3442
3443 \begin_layout Standard
3444 Let's get really fancy: lets put the section number with the word 
3445 \begin_inset Quotes eld
3446 \end_inset
3447
3448 Section
3449 \begin_inset Quotes erd
3450 \end_inset
3451
3452  (e.
3453 \begin_inset space \thinspace{}
3454 \end_inset
3455
3456 g.
3457 \begin_inset space \space{}
3458 \end_inset
3459
3460 Section 3) in the upper left, the page number (e.
3461 \begin_inset space \thinspace{}
3462 \end_inset
3463
3464 g.
3465 \begin_inset space \space{}
3466 \end_inset
3467
3468 Page 4) in the upper right, your name in the lower left, and the date in
3469  the lower right.
3470  The following commands should now appear in the preamble:
3471 \end_layout
3472
3473 \begin_layout Standard
3474
3475 \family typewriter
3476
3477 \backslash
3478 lhead{Section 
3479 \backslash
3480 thesection}
3481 \end_layout
3482
3483 \begin_layout Standard
3484
3485 \family typewriter
3486
3487 \backslash
3488 chead{}
3489 \end_layout
3490
3491 \begin_layout Standard
3492
3493 \family typewriter
3494
3495 \backslash
3496 rhead{Page 
3497 \backslash
3498 thepage}
3499 \end_layout
3500
3501 \begin_layout Standard
3502
3503 \family typewriter
3504
3505 \backslash
3506 lfoot{John Q.
3507  DocWriter}
3508 \end_layout
3509
3510 \begin_layout Standard
3511
3512 \family typewriter
3513
3514 \backslash
3515 cfoot{}
3516 \end_layout
3517
3518 \begin_layout Standard
3519
3520 \family typewriter
3521
3522 \backslash
3523 rfoot{
3524 \backslash
3525 today}
3526 \end_layout
3527
3528 \begin_layout Standard
3529 The commands 
3530 \begin_inset Flex Code
3531 status collapsed
3532
3533 \begin_layout Plain Layout
3534
3535 \backslash
3536 thesection
3537 \end_layout
3538
3539 \end_inset
3540
3541  and 
3542 \begin_inset Flex Code
3543 status collapsed
3544
3545 \begin_layout Plain Layout
3546
3547 \backslash
3548 thepage
3549 \end_layout
3550
3551 \end_inset
3552
3553  access LaTeX's section and page counters, and so print out the current
3554  section and page numbers.
3555  
3556 \begin_inset Flex Code
3557 status collapsed
3558
3559 \begin_layout Plain Layout
3560
3561 \backslash
3562 today
3563 \end_layout
3564
3565 \end_inset
3566
3567  simply prints out today's date.
3568 \end_layout
3569
3570 \begin_layout Standard
3571 The thicknesses of the horizontal rules drawn beneath the header and above
3572  the footer can also be modified.
3573  If you don't want one of the rules, set its thickness to 0.
3574  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3575  Use commands
3576 \family typewriter
3577  
3578 \family default
3579 like 
3580 \begin_inset Flex Code
3581 status collapsed
3582
3583 \begin_layout Plain Layout
3584
3585 \backslash
3586 renewcommand{
3587 \backslash
3588 headrulewidth}{0.4pt}
3589 \end_layout
3590
3591 \end_inset
3592
3593  and 
3594 \begin_inset Flex Code
3595 status collapsed
3596
3597 \begin_layout Plain Layout
3598
3599 \backslash
3600 renewcommand{
3601 \backslash
3602 footrulewidth}{0.4pt}
3603 \end_layout
3604
3605 \end_inset
3606
3607  to set the thicknesses.
3608 \end_layout
3609
3610 \begin_layout Standard
3611 You can switch the header/footer settings on and off for individual pages
3612  using commands like 
3613 \begin_inset Flex Code
3614 status collapsed
3615
3616 \begin_layout Plain Layout
3617
3618 \backslash
3619 thispagestyle{empty}
3620 \end_layout
3621
3622 \end_inset
3623
3624
3625 \begin_inset Flex Code
3626 status collapsed
3627
3628 \begin_layout Plain Layout
3629
3630 \backslash
3631 thispagestyle{plain}
3632 \end_layout
3633
3634 \end_inset
3635
3636 , and 
3637 \begin_inset Flex Code
3638 status collapsed
3639
3640 \begin_layout Plain Layout
3641
3642 \backslash
3643 thispagestyle{fancy}
3644 \end_layout
3645
3646 \end_inset
3647
3648 .
3649  Simply insert them in the text on the page you want changed and mark them
3650  as TeX code.
3651  In fact, title pages are marked as plain by default, while following pages
3652  are marked fancy when using the global fancy setting.
3653 \end_layout
3654
3655 \begin_layout Standard
3656 As a final example, it is possible to include an image in the header or
3657  footer.
3658  Suppose you want to put a company logo in the upper lefthand corner.
3659  You might try something like
3660 \end_layout
3661
3662 \begin_layout Standard
3663
3664 \family typewriter
3665
3666 \backslash
3667 lhead{
3668 \backslash
3669 resizebox{1in}{!}{
3670 \backslash
3671 includegraphics{logo.eps}}}
3672 \end_layout
3673
3674 \begin_layout Standard
3675 \noindent
3676 (you may need to preface this with 
3677 \begin_inset Flex Code
3678 status collapsed
3679
3680 \begin_layout Plain Layout
3681 \noindent
3682
3683 \backslash
3684 usepackage{graphics}
3685 \end_layout
3686
3687 \end_inset
3688
3689  if you don't include graphics elsewhere in your document).
3690 \end_layout
3691
3692 \begin_layout Section
3693 Itemize Bullet Selection
3694 \begin_inset CommandInset label
3695 LatexCommand label
3696 name "sec:bullet"
3697
3698 \end_inset
3699
3700
3701 \end_layout
3702
3703 \begin_layout Standard
3704 by
3705 \noun on
3706  Allan Rae
3707 \end_layout
3708
3709 \begin_layout Subsection
3710 Introduction
3711 \end_layout
3712
3713 \begin_layout Standard
3714 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3715  Using this dialog you can easily specify what bullet shape to use at each
3716  level of an itemized list.
3717  These settings are document-wide so you won't be able to specify different
3718  sets of bullets for different paragraphs.
3719 \begin_inset Foot
3720 status collapsed
3721
3722 \begin_layout Plain Layout
3723 Well, actually you can but you'll have to do it by hand.
3724 \end_layout
3725
3726 \end_inset
3727
3728
3729 \end_layout
3730
3731 \begin_layout Subsection
3732 How it looks
3733 \end_layout
3734
3735 \begin_layout Standard
3736 Open the dialog by selecting the 
3737 \begin_inset Flex MenuItem
3738 status collapsed
3739
3740 \begin_layout Plain Layout
3741 Document\SpecialChar \menuseparator
3742 Settings
3743 \end_layout
3744
3745 \end_inset
3746
3747  menu item and then select the 
3748 \begin_inset Flex MenuItem
3749 status collapsed
3750
3751 \begin_layout Plain Layout
3752 Bullets
3753 \end_layout
3754
3755 \end_inset
3756
3757  tab.
3758 \end_layout
3759
3760 \begin_layout Standard
3761 The dialog provides you with a table of bullet shapes.
3762  A column of buttons on the left of the table provides access to the six
3763  different panels of bullet shapes.
3764  The row of buttons across the top is used to select which bullet depth
3765  you are changing.
3766  A text entry under the table shows the currently selected bullet shape's
3767  LaTeX equivalent and this can be edited if desired.
3768  If you do modify the text you will also need to specify any needed packages
3769  in the LaTeX preamble.
3770 \end_layout
3771
3772 \begin_layout Standard
3773 The six panels are divided up by the packages they require.
3774  The following table shows the mappings from button name to LaTeX packages.
3775 \end_layout
3776
3777 \begin_layout Standard
3778 \align center
3779 \begin_inset Tabular
3780 <lyxtabular version="3" rows="7" columns="2">
3781 <features tabularvalignment="middle">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <column alignment="center" valignment="top" width="0pt">
3784 <row>
3785 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3786 \begin_inset Text
3787
3788 \begin_layout Plain Layout
3789
3790 \family roman
3791 \series medium
3792 \shape up
3793 \size normal
3794 \emph off
3795 \bar no
3796 \noun off
3797 \color none
3798 Button
3799 \end_layout
3800
3801 \end_inset
3802 </cell>
3803 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3804 \begin_inset Text
3805
3806 \begin_layout Plain Layout
3807
3808 \family roman
3809 \series medium
3810 \shape up
3811 \size normal
3812 \emph off
3813 \bar no
3814 \noun off
3815 \color none
3816 Packages Required
3817 \end_layout
3818
3819 \end_inset
3820 </cell>
3821 </row>
3822 <row>
3823 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3824 \begin_inset Text
3825
3826 \begin_layout Plain Layout
3827
3828 \family sans
3829 \series medium
3830 \shape up
3831 \size normal
3832 \emph off
3833 \bar no
3834 \noun off
3835 \color none
3836 Standard
3837 \end_layout
3838
3839 \end_inset
3840 </cell>
3841 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3842 \begin_inset Text
3843
3844 \begin_layout Plain Layout
3845
3846 \series medium
3847 \shape up
3848 \size normal
3849 \emph off
3850 \bar no
3851 \noun off
3852 \color none
3853 base LaTeX
3854 \end_layout
3855
3856 \end_inset
3857 </cell>
3858 </row>
3859 <row>
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3861 \begin_inset Text
3862
3863 \begin_layout Plain Layout
3864
3865 \family sans
3866 \series medium
3867 \shape up
3868 \size normal
3869 \emph off
3870 \bar no
3871 \noun off
3872 \color none
3873 Maths
3874 \end_layout
3875
3876 \end_inset
3877 </cell>
3878 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3879 \begin_inset Text
3880
3881 \begin_layout Plain Layout
3882
3883 \family typewriter
3884 \series medium
3885 \shape up
3886 \size normal
3887 \emph off
3888 \bar no
3889 \noun off
3890 \color none
3891 amssymb.sty
3892 \end_layout
3893
3894 \end_inset
3895 </cell>
3896 </row>
3897 <row>
3898 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3899 \begin_inset Text
3900
3901 \begin_layout Plain Layout
3902
3903 \family sans
3904 \series medium
3905 \shape up
3906 \size normal
3907 \emph off
3908 \bar no
3909 \noun off
3910 \color none
3911 Ding1
3912 \end_layout
3913
3914 \end_inset
3915 </cell>
3916 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3917 \begin_inset Text
3918
3919 \begin_layout Plain Layout
3920
3921 \family typewriter
3922 \series medium
3923 \shape up
3924 \size normal
3925 \emph off
3926 \bar no
3927 \noun off
3928 \color none
3929 pifont.sty
3930 \end_layout
3931
3932 \end_inset
3933 </cell>
3934 </row>
3935 <row>
3936 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3937 \begin_inset Text
3938
3939 \begin_layout Plain Layout
3940
3941 \family sans
3942 \series medium
3943 \shape up
3944 \size normal
3945 \emph off
3946 \bar no
3947 \noun off
3948 \color none
3949 Ding2
3950 \end_layout
3951
3952 \end_inset
3953 </cell>
3954 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3955 \begin_inset Text
3956
3957 \begin_layout Plain Layout
3958
3959 \family typewriter
3960 \series medium
3961 \shape up
3962 \size normal
3963 \emph off
3964 \bar no
3965 \noun off
3966 \color none
3967 pifont.sty
3968 \end_layout
3969
3970 \end_inset
3971 </cell>
3972 </row>
3973 <row>
3974 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3975 \begin_inset Text
3976
3977 \begin_layout Plain Layout
3978
3979 \family sans
3980 \series medium
3981 \shape up
3982 \size normal
3983 \emph off
3984 \bar no
3985 \noun off
3986 \color none
3987 Ding3
3988 \end_layout
3989
3990 \end_inset
3991 </cell>
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3993 \begin_inset Text
3994
3995 \begin_layout Plain Layout
3996
3997 \family typewriter
3998 \series medium
3999 \shape up
4000 \size normal
4001 \emph off
4002 \bar no
4003 \noun off
4004 \color none
4005 pifont.sty
4006 \end_layout
4007
4008 \end_inset
4009 </cell>
4010 </row>
4011 <row>
4012 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4013 \begin_inset Text
4014
4015 \begin_layout Plain Layout
4016
4017 \family sans
4018 \series medium
4019 \shape up
4020 \size normal
4021 \emph off
4022 \bar no
4023 \noun off
4024 \color none
4025 Ding4
4026 \end_layout
4027
4028 \end_inset
4029 </cell>
4030 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4031 \begin_inset Text
4032
4033 \begin_layout Plain Layout
4034
4035 \family typewriter
4036 \series medium
4037 \shape up
4038 \size normal
4039 \emph off
4040 \bar no
4041 \noun off
4042 \color none
4043 pifont.sty
4044 \end_layout
4045
4046 \end_inset
4047 </cell>
4048 </row>
4049 </lyxtabular>
4050
4051 \end_inset
4052
4053
4054 \end_layout
4055
4056 \begin_layout Standard
4057 LyX doesn't stop you using bullets from packages you don't have.
4058  If you get errors from LaTeX when you try to view or print the file, then
4059  it is likely you are missing a package.
4060 \begin_inset Foot
4061 status collapsed
4062
4063 \begin_layout Plain Layout
4064 LyX doesn't restrict your use since you may be editing locally and exporting
4065  elsewhere.
4066 \end_layout
4067
4068 \end_inset
4069
4070
4071 \end_layout
4072
4073 \begin_layout Subsection
4074 How to use it
4075 \end_layout
4076
4077 \begin_layout Standard
4078 Select which bullet depth you want to change then select the bullet shape
4079  and size.
4080  Any changes will not be visible in LyX, but are visible when viewing the
4081  document.
4082 \end_layout
4083
4084 \begin_layout Standard
4085 You can reset a bullet shape to the default simply by clicking your right
4086  mouse button on the appropriate bullet depth button.
4087 \begin_inset Foot
4088 status collapsed
4089
4090 \begin_layout Plain Layout
4091 If you 
4092 \emph on
4093 really
4094 \emph default
4095  want to have multiple sets of paragraphs with different sets of bullets
4096  in each, then you're going to have to get your hands dirty with TeX code.
4097  The bullet selection dialog can help though because it provides you with
4098  the LaTeX code for a wide range of bullet shapes.
4099  To make your own custom paragraphs you have the following options:
4100 \end_layout
4101
4102 \begin_layout Plain Layout
4103 \begin_inset ERT
4104 status open
4105
4106 \begin_layout Plain Layout
4107
4108
4109 \backslash
4110 let
4111 \backslash
4112 savelabelitemi=
4113 \backslash
4114 labelitemi
4115 \end_layout
4116
4117 \end_inset
4118
4119
4120 \end_layout
4121
4122 \begin_layout Plain Layout
4123 \begin_inset ERT
4124 status open
4125
4126 \begin_layout Plain Layout
4127
4128
4129 \backslash
4130 renewcommand
4131 \backslash
4132 labelitemi[0]{
4133 \backslash
4134 small
4135 \backslash
4136 (
4137 \backslash
4138 sharp
4139 \backslash
4140 )}
4141 \end_layout
4142
4143 \end_inset
4144
4145
4146 \end_layout
4147
4148 \begin_layout Itemize
4149 Use the LaTeX command 
4150 \begin_inset Flex Code
4151 status collapsed
4152
4153 \begin_layout Plain Layout
4154
4155 \backslash
4156 renewcommand{}{}
4157 \end_layout
4158
4159 \end_inset
4160
4161  to specify a new bullet shape for a given depth.
4162  You'll also need to save the current bullet shape so you can restore it
4163  again afterwards.
4164  In this itemized list the following LaTeX code was used to change the bullet
4165  used for the first depth.
4166 \end_layout
4167
4168 \begin_deeper
4169 \begin_layout LyX-Code
4170
4171 \backslash
4172 let
4173 \backslash
4174 savelabelitemi=
4175 \backslash
4176 labelitemi 
4177 \end_layout
4178
4179 \begin_layout LyX-Code
4180
4181 \backslash
4182 renewcommand
4183 \backslash
4184 labelitemi[0]{
4185 \backslash
4186 small
4187 \backslash
4188 (
4189 \backslash
4190 sharp
4191 \backslash
4192 )}
4193 \end_layout
4194
4195 \end_deeper
4196 \begin_layout Itemize
4197 Note that the itemize depth is specified in Roman numerals as part of the
4198  
4199 \family typewriter
4200
4201 \backslash
4202 labelitem
4203 \family default
4204  command.
4205 \end_layout
4206
4207 \begin_layout Itemize
4208 \begin_inset ERT
4209 status open
4210
4211 \begin_layout Plain Layout
4212
4213 [
4214 \backslash
4215 (
4216 \backslash
4217 star
4218 \backslash
4219 )]
4220 \end_layout
4221
4222 \end_inset
4223
4224  Specify each individual entry by starting each item with the bullet shape
4225  enclosed in square brackets and set as 
4226 \begin_inset Flex MenuItem
4227 status collapsed
4228
4229 \begin_layout Plain Layout
4230 TeX Code
4231 \end_layout
4232
4233 \end_inset
4234
4235 .
4236  For example, this item was started with 
4237 \begin_inset Flex Code
4238 status collapsed
4239
4240 \begin_layout Plain Layout
4241 [
4242 \backslash
4243 (
4244 \backslash
4245 star
4246 \backslash
4247 )]
4248 \end_layout
4249
4250 \end_inset
4251
4252 .
4253 \end_layout
4254
4255 \begin_layout Plain Layout
4256 \begin_inset ERT
4257 status open
4258
4259 \begin_layout Plain Layout
4260
4261
4262 \backslash
4263 renewcommand
4264 \backslash
4265 labelitemi[0]{
4266 \backslash
4267 savelabelitemi}
4268 \end_layout
4269
4270 \end_inset
4271
4272
4273 \end_layout
4274
4275 \begin_layout Plain Layout
4276 You'll also need to revert the labelitem back to its previous setting for
4277  the global bullet shape settings to remain in effect.
4278  The way used here was:
4279 \end_layout
4280
4281 \begin_layout LyX-Code
4282
4283 \backslash
4284 renewcommand
4285 \backslash
4286 labelitemi[0]{
4287 \backslash
4288 savelabelitemi}
4289 \end_layout
4290
4291 \end_inset
4292
4293
4294 \end_layout
4295
4296 \begin_layout Chapter
4297 LyX and the World Wide Web
4298 \end_layout
4299
4300 \begin_layout Standard
4301 LyX has long supported the export of documents to various web-friendly formats,
4302  such as HTML.
4303  Before verson 2.0, however, HTML export was always accomplished by the use
4304  of external converters.
4305 \begin_inset Foot
4306 status collapsed
4307
4308 \begin_layout Plain Layout
4309 For details on the use of external converters with LyX, see the 
4310 \emph on
4311 Converters
4312 \emph default
4313  section of the Customization manual.
4314 \end_layout
4315
4316 \end_inset
4317
4318  These fall into two large groups: there are converters that use LaTeX as
4319  an intermediate format, such as 
4320 \begin_inset Flex Code
4321 status collapsed
4322
4323 \begin_layout Plain Layout
4324 htlatex
4325 \end_layout
4326
4327 \end_inset
4328
4329
4330 \begin_inset Flex Code
4331 status collapsed
4332
4333 \begin_layout Plain Layout
4334 html2latex
4335 \end_layout
4336
4337 \end_inset
4338
4339 , and 
4340 \begin_inset Flex Code
4341 status collapsed
4342
4343 \begin_layout Plain Layout
4344 plastex
4345 \end_layout
4346
4347 \end_inset
4348
4349 , relying upon LyX to produce the LaTeX; and there is a converter that works
4350  directly on LyX files, 
4351 \begin_inset Flex Code
4352 status collapsed
4353
4354 \begin_layout Plain Layout
4355 eLyXer
4356 \end_layout
4357
4358 \end_inset
4359
4360 .
4361  All of these have different advantages and disadvantages.
4362  
4363 \end_layout
4364
4365 \begin_layout Standard
4366 The LaTeX-based converters have the advantage that, in principle, they know
4367  everything about the exported document that LaTeX does.
4368  Such converters do not care, for example, if a certain block of code was
4369  produced by LyX or was Evil Red Text.
4370  These converters know about 
4371 \begin_inset Flex Code
4372 status collapsed
4373
4374 \begin_layout Plain Layout
4375 aux
4376 \end_layout
4377
4378 \end_inset
4379
4380  files, counters, and references, and can often make use of the 
4381 \begin_inset Flex Code
4382 status collapsed
4383
4384 \begin_layout Plain Layout
4385 bbl
4386 \end_layout
4387
4388 \end_inset
4389
4390  files generated by BibTeX.
4391  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4392  said that only TeX itself understands TeX---and LaTeX-based converters
4393  will often choke on what seem to be quite simple constructs; complex ones
4394  can throw them completely, and as of this writing, for example, the 
4395 \emph on
4396 Embedded Objects
4397 \emph default
4398  manual will not export with 
4399 \begin_inset Flex Code
4400 status collapsed
4401
4402 \begin_layout Plain Layout
4403 htlatex
4404 \end_layout
4405
4406 \end_inset
4407
4408 , though the others will.
4409  The other issue concerns how math is handled.
4410  These converters typically convert the formulae into little pictures that
4411  are then linked from the HTML document.
4412  Since these are actually generated by LaTeX, they are accurate.
4413  But they do not scale well, and just getting them to look as if they are
4414  actually meant to be in your document---so that the font sizes seem to
4415  be roughly the same---can be a challenge.
4416 \end_layout
4417
4418 \begin_layout Standard
4419 Alex Fernandez's 
4420 \begin_inset Flex Code
4421 status collapsed
4422
4423 \begin_layout Plain Layout
4424 eLyXer
4425 \end_layout
4426
4427 \end_inset
4428
4429  (
4430 \begin_inset CommandInset href
4431 LatexCommand href
4432 name "http://elyxer.nongnu.org/"
4433 target "http://elyxer.nongnu.org/"
4434
4435 \end_inset
4436
4437 ) solves some of these problems.
4438  In particular, the formulae it produces scale perfectly, since it renders
4439  math using a combination of HTML and CSS rather than converting the formulae
4440  to images.
4441  But even moderately complex formula are rendered less well than with 
4442 \begin_inset Flex Code
4443 status collapsed
4444
4445 \begin_layout Plain Layout
4446 htlatex
4447 \end_layout
4448
4449 \end_inset
4450
4451 ; this reflects the limitations of HTML.
4452 \begin_inset Foot
4453 status collapsed
4454
4455 \begin_layout Plain Layout
4456 That said, 
4457 \begin_inset Flex Code
4458 status collapsed
4459
4460 \begin_layout Plain Layout
4461 eLyXer
4462 \end_layout
4463
4464 \end_inset
4465
4466  can also use jsMath and MathJax for equations, but this setting is only
4467  available globally and requires one to have access to a server that runs
4468  the backend.
4469 \end_layout
4470
4471 \end_inset
4472
4473  More importantly (as of version 1.1.1, at least), 
4474 \begin_inset Flex Code
4475 status collapsed
4476
4477 \begin_layout Plain Layout
4478 eLyXer
4479 \end_layout
4480
4481 \end_inset
4482
4483  has limited support for math macros and no support for user-defined paragraph
4484  or character styles.
4485  These limitations make 
4486 \begin_inset Flex Code
4487 status collapsed
4488
4489 \begin_layout Plain Layout
4490 eLyXer
4491 \end_layout
4492
4493 \end_inset
4494
4495  unsuitable for many of the documents LyX users produce.
4496  In principle, of course, these problems could be solved, but the LyX developers
4497  have decided to follow a different path and have made LyX itself capable
4498  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4499  plaintext.
4500 \end_layout
4501
4502 \begin_layout Standard
4503 As of this writing, XHTML output remains under development and should probably
4504  be regarded as 
4505 \begin_inset Quotes eld
4506 \end_inset
4507
4508 experimental
4509 \begin_inset Quotes erd
4510 \end_inset
4511
4512 .
4513 \begin_inset Foot
4514 status collapsed
4515
4516 \begin_layout Plain Layout
4517 The file 
4518 \begin_inset Flex Code
4519 status collapsed
4520
4521 \begin_layout Plain Layout
4522 development/HTML.notes
4523 \end_layout
4524
4525 \end_inset
4526
4527 , which can be found in the LyX source tree or 
4528 \begin_inset CommandInset href
4529 LatexCommand href
4530 name "accessed online"
4531 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4532
4533 \end_inset
4534
4535 , usually contains up-to-date information about the state of XHTML output.
4536  See also the list of XHTML bugs on 
4537 \begin_inset CommandInset href
4538 LatexCommand href
4539 name "the bug tracker"
4540 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4541
4542 \end_inset
4543
4544 .
4545 \end_layout
4546
4547 \end_inset
4548
4549  Still, the developers have chosen this approach because it has several
4550  potential advantages over the other two.
4551 \end_layout
4552
4553 \begin_layout Standard
4554 These advantages are primarily due to the fact that the XHTML output routines,
4555  since they are part of LyX, know everything LyX knows about the document
4556  being exported.
4557 \begin_inset Foot
4558 status collapsed
4559
4560 \begin_layout Plain Layout
4561 Another advantage is that, since these routines are internal to LyX, they
4562  are immune to changes in LyX's file format, or to changes in the semantics
4563  of existing insets.
4564 \end_layout
4565
4566 \end_inset
4567
4568  So they know about the table of contents (as displayed in the outline),
4569  about the counters associated with different paragraph styles, and about
4570  user-defined styles.
4571  The XHTML output routines know what LyX knows about internationalization,
4572  too, so they will output 
4573 \begin_inset Quotes eld
4574 \end_inset
4575
4576 Chapter 1
4577 \begin_inset Quotes erd
4578 \end_inset
4579
4580  or 
4581 \begin_inset Quotes eld
4582 \end_inset
4583
4584
4585 \lang ngerman
4586 Kapitel
4587 \lang english
4588  1
4589 \begin_inset Quotes erd
4590 \end_inset
4591
4592 , depending upon the language in effect at the time.
4593  
4594 \end_layout
4595
4596 \begin_layout Standard
4597 Quite generally, the output routines know what LyX knows about document
4598  layout, that is, about how the document is to be rendered on screen.
4599  We use this information when we output the document as XHTML.
4600  In particular, LyX 
4601 \emph on
4602 automatically
4603 \emph default
4604  generates CSS style information corresponding to the layout information
4605  it uses to render the document on screen: if section headings are supposed
4606  to be sans-serif and bold as seen in LyX, then (by default) they will be
4607  sans-serif and bold when viewed in a web browser, too.
4608  And this is true not just for pre-defined styles, like Section, but for
4609  any style, including user-defined styles.
4610  Indeed, the XHTML output routines make no distinction between user-defined
4611  paragraph and character styles and LyX's own pre-defined styles: in each
4612  case, everything LyX knows about the styles is contained in the layout
4613  files.
4614  And much the same is true as regards pre-defined textual insets, such as
4615  footnotes, and various custom insets.
4616  
4617 \end_layout
4618
4619 \begin_layout Standard
4620 The result is that XHTML output can be customized and extended in exactly
4621  the same way LaTeX output can be customized and extended: through layout
4622  files and modules.
4623  See chapter five of the 
4624 \emph on
4625 Customization 
4626 \emph default
4627 manual for the details.
4628 \end_layout
4629
4630 \begin_layout Standard
4631 The remainder of this chapter contains more detailed information on XHTML
4632  output, its limitations, and ways to work around those limitations.
4633 \end_layout
4634
4635 \begin_layout Section
4636 Math Output in XHTML
4637 \end_layout
4638
4639 \begin_layout Standard
4640 LyX offers four choices for how math is rendered.
4641  These have various advantages and disadvantages:
4642 \end_layout
4643
4644 \begin_layout Itemize
4645 MathML
4646 \begin_inset Newline newline
4647 \end_inset
4648
4649 MathML is a dialect of XML designed specifically for mathematics on the
4650  web, and it typically renders very well in browsers that support it.
4651  The disadvantage is that not all browsers support MathML, and support is
4652  not complete even in the Gecko-based browsers, such as Firefox.
4653 \begin_inset Newline newline
4654 \end_inset
4655
4656 If LyX is unable to render a formula as MathML---for example, if the formula
4657  uses the 
4658 \begin_inset Flex Code
4659 status collapsed
4660
4661 \begin_layout Plain Layout
4662 xymatrix
4663 \end_layout
4664
4665 \end_inset
4666
4667  package or ERT---then it will instead output the formula as an image.
4668  
4669 \end_layout
4670
4671 \begin_layout Itemize
4672 HTML
4673 \begin_inset Newline newline
4674 \end_inset
4675
4676 As mentioned above, 
4677 \begin_inset Flex Code
4678 status collapsed
4679
4680 \begin_layout Plain Layout
4681 elyxer
4682 \end_layout
4683
4684 \end_inset
4685
4686  outputs math as HTML, styled by CSS.
4687 \begin_inset Foot
4688 status collapsed
4689
4690 \begin_layout Plain Layout
4691 LyX has borrowed some of the CSS for its HTML output from 
4692 \begin_inset Flex Code
4693 status collapsed
4694
4695 \begin_layout Plain Layout
4696 elyxer
4697 \end_layout
4698
4699 \end_inset
4700
4701 .
4702 \end_layout
4703
4704 \end_inset
4705
4706  For simple formulae, this can work quite well, though with more complicated
4707  formulae it tends to break down.
4708  Still, this method has the advantage that it is very widely supported and
4709  so it may be appropriate for documents that contain only a little, fairly
4710  simple math.
4711 \begin_inset Newline newline
4712 \end_inset
4713
4714 If Lyx is unable to render a formula as HTML---for example, if the formula
4715  uses the 
4716 \begin_inset Flex Code
4717 status collapsed
4718
4719 \begin_layout Plain Layout
4720 xymatrix
4721 \end_layout
4722
4723 \end_inset
4724
4725  package or ERT---then it will instead output the formula as an image.
4726  
4727 \end_layout
4728
4729 \begin_layout Itemize
4730 Images
4731 \begin_inset Newline newline
4732 \end_inset
4733
4734 Like 
4735 \begin_inset Flex Code
4736 status collapsed
4737
4738 \begin_layout Plain Layout
4739 htlatex
4740 \end_layout
4741
4742 \end_inset
4743
4744 , LyX will output formulae as images, the very same images, in fact, that
4745  are used for instant preview.
4746 \begin_inset Foot
4747 status collapsed
4748
4749 \begin_layout Plain Layout
4750 Instant preview does 
4751 \emph on
4752 not 
4753 \emph default
4754 have to be on for images to be output, however.
4755 \end_layout
4756
4757 \end_inset
4758
4759  The advantage to this method is that the images are simply generated by
4760  LaTeX, so they are very accurate.
4761  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4762  so they do not scale terribly well, and one cannot copy them, etc.
4763  (As of this writing, there are also problems about equation numbering.
4764  See 
4765 \begin_inset CommandInset href
4766 LatexCommand href
4767 name "bug 6894"
4768 target "http://www.lyx.org/trac/ticket/6894"
4769
4770 \end_inset
4771
4772 .)
4773 \begin_inset Newline newline
4774 \end_inset
4775
4776 The size of the images can be controlled by setting the 
4777 \begin_inset Quotes eld
4778 \end_inset
4779
4780 Math Images Scaling
4781 \begin_inset Quotes erd
4782 \end_inset
4783
4784  parameter under 
4785 \begin_inset Flex MenuItem
4786 status collapsed
4787
4788 \begin_layout Plain Layout
4789 Document\SpecialChar \menuseparator
4790 Settings\SpecialChar \menuseparator
4791 Output
4792 \end_layout
4793
4794 \end_inset
4795
4796 .
4797 \begin_inset Foot
4798 status collapsed
4799
4800 \begin_layout Plain Layout
4801 For those who want to know, this controls the resolution of the image in
4802  dots per inch and is based upon a default of 75 dpi.
4803 \end_layout
4804
4805 \end_inset
4806
4807
4808 \begin_inset Newline newline
4809 \end_inset
4810
4811 If LyX for some reason fails to create an image for a formula (e.g., if a
4812  required LaTeX package is not installed), then it will fall back to outputing
4813  the raw LaTeX.
4814 \end_layout
4815
4816 \begin_layout Itemize
4817 LaTeX
4818 \begin_inset Newline newline
4819 \end_inset
4820
4821 Finally, LyX will happily output math as LaTeX.
4822  As well as being the output of last resort, this method can be used with
4823  such tools as 
4824 \begin_inset CommandInset href
4825 LatexCommand href
4826 name "jsMath"
4827 target "http://www.math.union.edu/~dpvc/jsMath/"
4828
4829 \end_inset
4830
4831 , which uses JavaScript to render LaTeX embedded in HTML documents.
4832  LyX wraps the LaTeX in either a 
4833 \begin_inset Flex Code
4834 status collapsed
4835
4836 \begin_layout Plain Layout
4837 span
4838 \end_layout
4839
4840 \end_inset
4841
4842  (for inline formulas) or 
4843 \begin_inset Flex Code
4844 status collapsed
4845
4846 \begin_layout Plain Layout
4847 div
4848 \end_layout
4849
4850 \end_inset
4851
4852  (for displayed formulas) with 
4853 \begin_inset Flex Code
4854 status collapsed
4855
4856 \begin_layout Plain Layout
4857 class='math'
4858 \end_layout
4859
4860 \end_inset
4861
4862 , as is required for jsMath.
4863 \end_layout
4864
4865 \begin_layout Standard
4866 One of these output methods must be selected under 
4867 \begin_inset Flex MenuItem
4868 status collapsed
4869
4870 \begin_layout Plain Layout
4871 Document\SpecialChar \menuseparator
4872 Settings\SpecialChar \menuseparator
4873 Output
4874 \end_layout
4875
4876 \end_inset
4877
4878 .
4879  By default, LyX outputs MathML.
4880  This is a document-wide setting, therefore.
4881 \end_layout
4882
4883 \begin_layout Standard
4884 Eventually, LyX will offer the user the option to select an alternate output
4885  method for a particular inset, say, one that isn't being rendered very
4886  well by MathML.
4887 \begin_inset Foot
4888 status collapsed
4889
4890 \begin_layout Plain Layout
4891 That said, since LyX falls back to images if the inset contains ERT, then
4892  one can force output as an image by putting some harmless ERT into the
4893  math, for example: 
4894 \begin_inset Formula $a=b\relax$
4895 \end_inset
4896
4897 .
4898 \end_layout
4899
4900 \end_inset
4901
4902
4903 \end_layout
4904
4905 \begin_layout Section
4906 Bibliography and Citations
4907 \end_layout
4908
4909 \begin_layout Standard
4910 XHTML output fully supports bibliographies and citations.
4911  
4912 \end_layout
4913
4914 \begin_layout Standard
4915 Citation labels are generated by the same machinery that generates LyX's
4916  on-screen labels, so the labels will look in the output much as they do
4917  in LyX, though better.
4918  If you are using numerical citations, then LyX will output numerical labels,
4919  such as [1] or [17], rather than simply showing the citation key in square
4920  brackets, as it does on-screen.
4921  If you are using author-year citations, then LyX will add lowercase letters
4922  to the years, just as BibTeX does, if it finds more than one citation for
4923  a given author-year combination.
4924  The labels will be printed with the bibliography entries.
4925  Note that there is, at present, no way to customize the appearance of the
4926  labels, for example, to choose between square brackets and parentheses.
4927 \end_layout
4928
4929 \begin_layout Standard
4930 Bibliography output is handled by the same machinery that handles the presentati
4931 on of reference information in the citation dialog, so you will see in the
4932  XHTML output pretty much what you would see if you were to look at a given
4933  entry in the citation dialog.
4934  The formatting can be customized in your layout file or, preferably, in
4935  a module.
4936  See the 
4937 \emph on
4938 Customization
4939 \emph default
4940  manual for the details.
4941 \end_layout
4942
4943 \begin_layout Standard
4944 The main defect at present is that cross-referenced information is printed
4945  with every entry with which it is associated.
4946  So you can see things like this:
4947 \end_layout
4948
4949 \begin_layout Quote
4950 Jason Stanley, 
4951 \begin_inset Quotes eld
4952 \end_inset
4953
4954 Context and Logical Form
4955 \begin_inset Quotes erd
4956 \end_inset
4957
4958 , in 
4959 \emph on
4960 Language in Context: Selected Essays
4961 \emph default
4962  (Oxford: Oxford University Press, 2007), pp.
4963  30--68.
4964 \end_layout
4965
4966 \begin_layout Quote
4967 Jason Stanley, 
4968 \begin_inset Quotes eld
4969 \end_inset
4970
4971 Semantics in Context
4972 \begin_inset Quotes erd
4973 \end_inset
4974
4975 , in 
4976 \emph on
4977 Language in Context: Selected Essays
4978 \emph default
4979  (Oxford: Oxford University Press, 2007), pp.
4980  201--30.
4981 \end_layout
4982
4983 \begin_layout Standard
4984 This should be fixed before long.
4985 \end_layout
4986
4987 \begin_layout Standard
4988 There is no support at present for sectioned bibliographies.
4989  If you have multiple bibliographies, then LyX will print the same bibliography
4990  over and over.
4991 \end_layout
4992
4993 \begin_layout Section
4994 Indexes
4995 \end_layout
4996
4997 \begin_layout Standard
4998 LyX will happily export indexes as XHTML, but with certain limitations at
4999  the moment.
5000 \end_layout
5001
5002 \begin_layout Standard
5003 Index export will be most reliable when you do not attempt to use the fancy
5004  constructs that are described in the section on indexes in the 
5005 \emph on
5006 User's Guide
5007 \emph default
5008 .
5009 \begin_inset Foot
5010 status collapsed
5011
5012 \begin_layout Plain Layout
5013 The main issue here is that LyX itself does not really handle these.
5014  It just lets you enter what you would have to enter in raw LaTeX.
5015 \end_layout
5016
5017 \end_inset
5018
5019  We'll describe how they are handled using the subsection headings from
5020  that section.
5021 \end_layout
5022
5023 \begin_layout Itemize
5024 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5025  these, but the entries must be separated by 
5026 \begin_inset Quotes eld
5027 \end_inset
5028
5029  ! 
5030 \begin_inset Quotes erd
5031 \end_inset
5032
5033 , that is, there must be spaces around the exclamation point.
5034  This is because it is otherwise too difficult to check for escaped exclamation
5035  points, ones in math, and so forth.
5036 \end_layout
5037
5038 \begin_layout Itemize
5039 Page Ranges: There is no support at all for page ranges, since these make
5040  no sense with XHMTL.
5041  Instead, you will just get two index entries, one at either end.
5042 \end_layout
5043
5044 \begin_layout Itemize
5045 Cross-referencing: There is no support for cross-referencing.
5046  If LyX finds an entry containing the 
5047 \begin_inset Quotes eld
5048 \end_inset
5049
5050 |see\SpecialChar \ldots{}
5051
5052 \begin_inset Quotes erd
5053 \end_inset
5054
5055  construct, it is just dropped, and the rest is treated as an ordinary index
5056  entry.
5057 \end_layout
5058
5059 \begin_layout Itemize
5060 Index Entry Order: LyX does support attempts to fix the sorting order.
5061  It will take what is before the first `@' it finds and use that for sorting,
5062  taking what follows the first `@' to be the actual entry.
5063  At present, LyX does not check for escaped `@', so do not try to index
5064  email addresses.
5065 \end_layout
5066
5067 \begin_layout Itemize
5068 Index Entry Layout: You can format entries by using the text style dialog,
5069  or by using any other method available within LyX itself.
5070  There is no support for constructs like: 
5071 \begin_inset Quotes eld
5072 \end_inset
5073
5074 entry|textbf
5075 \begin_inset Quotes erd
5076 \end_inset
5077
5078 .
5079  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5080  and everything that follows it.
5081 \end_layout
5082
5083 \begin_layout Itemize
5084 Multiple Indexes: There is no support for multiple indexes.
5085  Rather, all index entries will be printed as one large index.
5086  To avoid our printing several versions of the index, we print only the
5087  main index, so make sure you have one.
5088 \end_layout
5089
5090 \begin_layout Section
5091 Nomenclature and Glossary
5092 \end_layout
5093
5094 \begin_layout Standard
5095 There is at present no support for glossaries.
5096  Adding it would be fairly trivial, and welcome.
5097 \end_layout
5098
5099 \begin_layout Chapter
5100 The LyX Server
5101 \end_layout
5102
5103 \begin_layout Section
5104 Introduction
5105 \end_layout
5106
5107 \begin_layout Standard
5108 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5109  and retrieve information about the LyX internal state.
5110  This is only intended for advanced users, but they should find it useful.
5111  It is by writing to the LyX server, for example, that bibliography managers,
5112  such as JabRef, are able to 
5113 \begin_inset Quotes eld
5114 \end_inset
5115
5116 push
5117 \begin_inset Quotes erd
5118 \end_inset
5119
5120  citations to LyX.
5121 \end_layout
5122
5123 \begin_layout Section
5124 Starting the LyX Server
5125 \end_layout
5126
5127 \begin_layout Standard
5128 The LyX server works through the use of a pair of named pipes.
5129  These are usually located in 
5130 \begin_inset Flex Code
5131 status collapsed
5132
5133 \begin_layout Plain Layout
5134 UserDir
5135 \end_layout
5136
5137 \end_inset
5138
5139 , (except on Windows, where 
5140 \emph on
5141 local
5142 \emph default
5143  named pipes are special objects located in 
5144 \begin_inset Flex Code
5145 status collapsed
5146
5147 \begin_layout Plain Layout
5148
5149 \backslash
5150
5151 \backslash
5152 .
5153 \backslash
5154 pipe
5155 \end_layout
5156
5157 \end_inset
5158
5159 ) and have the names 
5160 \begin_inset Quotes eld
5161 \end_inset
5162
5163
5164 \begin_inset Flex Code
5165 status collapsed
5166
5167 \begin_layout Plain Layout
5168 lyxpipe.in
5169 \end_layout
5170
5171 \end_inset
5172
5173
5174 \begin_inset Quotes erd
5175 \end_inset
5176
5177  and 
5178 \begin_inset Quotes eld
5179 \end_inset
5180
5181
5182 \begin_inset Flex Code
5183 status collapsed
5184
5185 \begin_layout Plain Layout
5186 lyxpipe.out
5187 \end_layout
5188
5189 \end_inset
5190
5191
5192 \begin_inset Quotes erd
5193 \end_inset
5194
5195 .
5196  External programs write into 
5197 \begin_inset Flex Code
5198 status collapsed
5199
5200 \begin_layout Plain Layout
5201 lyxpipe.in
5202 \end_layout
5203
5204 \end_inset
5205
5206  and read back data from 
5207 \begin_inset Flex Code
5208 status collapsed
5209
5210 \begin_layout Plain Layout
5211 lyxpipe.out
5212 \end_layout
5213
5214 \end_inset
5215
5216 .
5217  The stem of the pipe names can be defined in the 
5218 \begin_inset Flex MenuItem
5219 status collapsed
5220
5221 \begin_layout Plain Layout
5222 Tools\SpecialChar \menuseparator
5223 Preferences
5224 \end_layout
5225
5226 \end_inset
5227
5228  dialog, for example 
5229 \begin_inset Flex Code
5230 status collapsed
5231
5232 \begin_layout Plain Layout
5233 "/home/myhome/lyxpipe"
5234 \end_layout
5235
5236 \end_inset
5237
5238 , or 
5239 \begin_inset Flex Code
5240 status collapsed
5241
5242 \begin_layout Plain Layout
5243 "
5244 \backslash
5245
5246 \backslash
5247 .
5248 \backslash
5249 pipe
5250 \backslash
5251 lyxpipe"
5252 \end_layout
5253
5254 \end_inset
5255
5256  on Windows (but any working path can be used).
5257  You 
5258 \emph on
5259 must
5260 \emph default
5261  configure this manually in order for the server to start.
5262 \end_layout
5263
5264 \begin_layout Standard
5265 LyX will add the '
5266 \begin_inset Flex Code
5267 status collapsed
5268
5269 \begin_layout Plain Layout
5270 .in
5271 \end_layout
5272
5273 \end_inset
5274
5275 ' and '
5276 \begin_inset Flex Code
5277 status collapsed
5278
5279 \begin_layout Plain Layout
5280 .out
5281 \end_layout
5282
5283 \end_inset
5284
5285 ' to create the pipes.
5286  If one of the pipes already exists, LyX will assume that another LyX process
5287  is already running and will not start the server.
5288  On POSIX (Unix like) systems, if for some other reason, an unused 
5289 \begin_inset Quotes eld
5290 \end_inset
5291
5292 stale
5293 \begin_inset Quotes erd
5294 \end_inset
5295
5296  pipe is left in existence when LyX closes, then LyX will try to delete
5297  it.
5298  If this fails for some reason, you will need to delete the pipes manually
5299  and then restart LyX.
5300  On Windows, pipes are deleted by the OS on program termination or crash,
5301  so 
5302 \begin_inset Quotes eld
5303 \end_inset
5304
5305 stale
5306 \begin_inset Quotes erd
5307 \end_inset
5308
5309  pipes should not be possible.
5310 \end_layout
5311
5312 \begin_layout Standard
5313 To have several LyX processes with servers at the same time, you have to
5314  use different configurations, perhaps by using separate user directories,
5315  each with its own 
5316 \begin_inset Flex Code
5317 status collapsed
5318
5319 \begin_layout Plain Layout
5320 preferences
5321 \end_layout
5322
5323 \end_inset
5324
5325  file, for each process.
5326 \end_layout
5327
5328 \begin_layout Standard
5329 If you are developing a client program, you might find it useful to enable
5330  debugging information from the LyX server.
5331  Do this by starting LyX as 
5332 \begin_inset Flex Code
5333 status collapsed
5334
5335 \begin_layout Plain Layout
5336 lyx -dbg lyxserver
5337 \end_layout
5338
5339 \end_inset
5340
5341 .
5342 \end_layout
5343
5344 \begin_layout Standard
5345 You can find a complete example client written in C in the source distribution
5346  as 
5347 \begin_inset Flex Code
5348 status collapsed
5349
5350 \begin_layout Plain Layout
5351 development/lyxserver/server_monitor.c
5352 \end_layout
5353
5354 \end_inset
5355
5356 .
5357 \end_layout
5358
5359 \begin_layout Standard
5360 Another useful tool is command-line based client you will find in 
5361 \begin_inset Flex Code
5362 status collapsed
5363
5364 \begin_layout Plain Layout
5365 src/client/lyxclient
5366 \end_layout
5367
5368 \end_inset
5369
5370 .
5371 \end_layout
5372
5373 \begin_layout Section
5374 Normal communication
5375 \end_layout
5376
5377 \begin_layout Standard
5378 To issue a LyX call, the client writes a line of ASCII text into the input
5379  pipe.
5380  This line has the following format:
5381 \end_layout
5382
5383 \begin_layout Quote
5384 LYXCMD:
5385 \emph on
5386 clientname
5387 \emph default
5388 :
5389 \emph on
5390 function
5391 \emph default
5392 :
5393 \emph on
5394 argument
5395 \end_layout
5396
5397 \begin_layout Description
5398 clientname is a name that the client can choose arbitrarily.
5399  Its only use is that LyX will echo it if it sends an answer—so a client
5400  can dispatch results from different requesters.
5401 \end_layout
5402
5403 \begin_layout Description
5404 function is the function you want LyX to perform.
5405  It is the same as the commands you'd use in the minibuffer.
5406 \end_layout
5407
5408 \begin_layout Description
5409 argument is an optional argument which is meaningful only to some functions
5410  (for instance, the 
5411 \begin_inset Quotes eld
5412 \end_inset
5413
5414 self-insert
5415 \begin_inset Quotes erd
5416 \end_inset
5417
5418  LFUN will insert the argument as text at the cursor position).
5419 \end_layout
5420
5421 \begin_layout Standard
5422 The answer from LyX will arrive in the output pipe and be of the form
5423 \end_layout
5424
5425 \begin_layout Quote
5426 INFO:
5427 \emph on
5428 clientname
5429 \emph default
5430 :
5431 \emph on
5432 function
5433 \emph default
5434 :
5435 \emph on
5436 data
5437 \end_layout
5438
5439 \begin_layout Standard
5440 where 
5441 \emph on
5442 clientname
5443 \emph default
5444  and 
5445 \emph on
5446 function
5447 \emph default
5448  are just echoed from the command request, while 
5449 \emph on
5450 data
5451 \emph default
5452  is more or less useful information filled according to how the command
5453  execution worked out.
5454  Some commands, such as 
5455 \begin_inset Quotes eld
5456 \end_inset
5457
5458 font-state
5459 \begin_inset Quotes erd
5460 \end_inset
5461
5462 , will return information about the internal state of LyX, while other will
5463  return an empty data-response.
5464  This means that the command execution went fine.
5465 \end_layout
5466
5467 \begin_layout Standard
5468 In case of errors, the response from LyX will have this form
5469 \end_layout
5470
5471 \begin_layout Quote
5472 ERROR:
5473 \emph on
5474 clientname
5475 \emph default
5476 :
5477 \emph on
5478 function
5479 \emph default
5480 :
5481 \emph on
5482 error message
5483 \end_layout
5484
5485 \begin_layout Standard
5486 where the 
5487 \emph on
5488 error message
5489 \emph default
5490  should contain an explanation of why the command failed.
5491 \end_layout
5492
5493 \begin_layout Standard
5494 Examples:
5495 \end_layout
5496
5497 \begin_layout LyX-Code
5498 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5499 \begin_inset Newline newline
5500 \end_inset
5501
5502 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5503 \begin_inset Newline newline
5504 \end_inset
5505
5506 read a <~/.lyxpipe.out
5507 \begin_inset Newline newline
5508 \end_inset
5509
5510 echo $a
5511 \end_layout
5512
5513 \begin_layout Section
5514 Notification
5515 \end_layout
5516
5517 \begin_layout Standard
5518 LyX can notify clients of events going on asynchronously.
5519  Currently it will only do this if the user binds a key sequence with the
5520  function 
5521 \begin_inset Quotes eld
5522 \end_inset
5523
5524 notify
5525 \begin_inset Quotes erd
5526 \end_inset
5527
5528 .
5529  The format of the string LyX sends is as follows:
5530 \end_layout
5531
5532 \begin_layout Quote
5533 \begin_inset Flex Code
5534 status collapsed
5535
5536 \begin_layout Plain Layout
5537 NOTIFY:
5538 \end_layout
5539
5540 \end_inset
5541
5542
5543 \emph on
5544 key-sequence
5545 \end_layout
5546
5547 \begin_layout Standard
5548 where 
5549 \emph on
5550 key-sequence
5551 \emph default
5552  is the printed representation of the key sequence that was actually typed
5553  by the user.
5554 \end_layout
5555
5556 \begin_layout Standard
5557 This mechanism can be used to extend LyX's command set and implement macros.
5558  Bind some key sequence to 
5559 \begin_inset Quotes eld
5560 \end_inset
5561
5562 notify
5563 \begin_inset Quotes erd
5564 \end_inset
5565
5566 .
5567  Then start a client that listens on the output pipe, dispatches the command
5568  according to the sequence, and starts a function that may use LyX calls
5569  and LyX requests to issue a command or a series of commands to LyX.
5570 \end_layout
5571
5572 \begin_layout Section
5573 The simple LyX Server Protocol
5574 \end_layout
5575
5576 \begin_layout Standard
5577 LyX implements a simple protocol that can be used for session management.
5578  All messages are of the form
5579 \end_layout
5580
5581 \begin_layout Quote
5582 LYXSRV:
5583 \emph on
5584 clientname
5585 \emph default
5586 :
5587 \emph on
5588 protocol message
5589 \end_layout
5590
5591 \begin_layout Standard
5592 where 
5593 \emph on
5594 protocol message
5595 \emph default
5596  can be 
5597 \begin_inset Quotes eld
5598 \end_inset
5599
5600 hello
5601 \begin_inset Quotes erd
5602 \end_inset
5603
5604  or 
5605 \begin_inset Quotes eld
5606 \end_inset
5607
5608 bye
5609 \begin_inset Quotes erd
5610 \end_inset
5611
5612 .
5613  If 
5614 \begin_inset Quotes eld
5615 \end_inset
5616
5617 hello
5618 \begin_inset Quotes erd
5619 \end_inset
5620
5621  is received from a client, LyX will report back to inform the client that
5622  it's listening to it's messages, while 
5623 \begin_inset Quotes eld
5624 \end_inset
5625
5626 bye
5627 \begin_inset Quotes erd
5628 \end_inset
5629
5630  sent from LyX will inform clients that LyX is closing.
5631 \end_layout
5632
5633 \begin_layout Section
5634 Reverse DVI/PDF search
5635 \end_layout
5636
5637 \begin_layout Standard
5638 Some DVI/PDF viewers
5639 \begin_inset Foot
5640 status collapsed
5641
5642 \begin_layout Plain Layout
5643 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5644  Skim on Mac OSX and SumatraPDF on Windows.
5645 \end_layout
5646
5647 \end_inset
5648
5649  provide 
5650 \emph on
5651 reverse search
5652 \emph default
5653  facility (also called 
5654 \emph on
5655 inverse search
5656 \emph default
5657 ).
5658  This means that you can tell LyX to put the cursor to a specific line in
5659  the document by clicking at the respective position in the DVI/PDF output.
5660  To achieve this, the viewer must be able to communicate with LyX.
5661  This is done via the LyX server either by using the named pipe (
5662 \emph on
5663 lyxpipe
5664 \emph default
5665 ), or the UNIX domain socket (
5666 \emph on
5667 lyxsocket
5668 \emph default
5669 ) that LyX creates in its temporary directory (this is the way the 
5670 \begin_inset Flex Code
5671 status collapsed
5672
5673 \begin_layout Plain Layout
5674 lyxclient
5675 \end_layout
5676
5677 \end_inset
5678
5679  program communicates with LyX).
5680  In some cases, you need a helper script that mediates between the viewer
5681  and LyX, in others, the viewer can communicate with LyX directly.
5682  This depends on the selected viewer and on your operating system.
5683  The same applies to the way viewers need to be configured and the way the
5684  reverse search is actually performed.
5685  In what follows, we will thus describe how to setup reverse search for
5686  specific viewers.
5687  Before we turn to this, though, we will explain what needs to be done generally
5688  to enable reverse search in the DVI/PDF output.
5689 \end_layout
5690
5691 \begin_layout Subsection
5692 Automatic setup
5693 \begin_inset CommandInset label
5694 LatexCommand label
5695 name "sub:rev-search"
5696
5697 \end_inset
5698
5699
5700 \end_layout
5701
5702 \begin_layout Standard
5703 In most cases LyX will do the work for you by enabling 
5704 \begin_inset Flex MenuItem
5705 status collapsed
5706
5707 \begin_layout Plain Layout
5708 Document\SpecialChar \menuseparator
5709 Output\SpecialChar \menuseparator
5710 Synchronize with Output
5711 \end_layout
5712
5713 \end_inset
5714
5715 .
5716  In such a case LyX will automatically insert the necessary SyncTeX macro
5717  (for PDF) or load the srcltx package (for DVI) respectively.
5718  This option can be easily reached also on 
5719 \begin_inset Flex Code
5720 status collapsed
5721
5722 \begin_layout Plain Layout
5723 View/Update
5724 \end_layout
5725
5726 \end_inset
5727
5728  Toolbar.
5729 \end_layout
5730
5731 \begin_layout Standard
5732 If you need a different setting, you can select or input a custom macro
5733  from the drop down box just below 
5734 \begin_inset Flex MenuItem
5735 status collapsed
5736
5737 \begin_layout Plain Layout
5738 Document\SpecialChar \menuseparator
5739 Settings\SpecialChar \menuseparator
5740 Output\SpecialChar \menuseparator
5741 Synchronize with Output
5742 \end_layout
5743
5744 \end_inset
5745
5746 .
5747 \end_layout
5748
5749 \begin_layout Standard
5750 Please note that including the 
5751 \begin_inset Flex Code
5752 status collapsed
5753
5754 \begin_layout Plain Layout
5755 srcltx
5756 \end_layout
5757
5758 \end_inset
5759
5760  package or 
5761 \begin_inset Flex Code
5762 status collapsed
5763
5764 \begin_layout Plain Layout
5765 src-specials
5766 \end_layout
5767
5768 \end_inset
5769
5770  sometimes has an undesired impact on the typesetting.
5771  Thus, you should switch output synchronization off for the final typesetting
5772  if you use the 
5773 \begin_inset Flex Code
5774 status collapsed
5775
5776 \begin_layout Plain Layout
5777 srcltx
5778 \end_layout
5779
5780 \end_inset
5781
5782  package or 
5783 \begin_inset Flex Code
5784 status collapsed
5785
5786 \begin_layout Plain Layout
5787 src-specials
5788 \end_layout
5789
5790 \end_inset
5791
5792 .
5793 \end_layout
5794
5795 \begin_layout Standard
5796 In case you need some more special settings that are not covered by the
5797  automatic settings, read the next section about how to set up output synchroniz
5798 ation manually.
5799  If the automatic setup suits your needs, you can readily jump to section
5800 \begin_inset space ~
5801 \end_inset
5802
5803
5804 \begin_inset CommandInset ref
5805 LatexCommand ref
5806 reference "sub:configuring-viewers"
5807
5808 \end_inset
5809
5810 , where the necessary configuration steps in your viewer -- needed both
5811  with the automatic and the manual setup -- are described.
5812 \end_layout
5813
5814 \begin_layout Subsection
5815 Manual setup
5816 \end_layout
5817
5818 \begin_layout Standard
5819 LaTeX provides several different methods for reverse search.
5820  Some are built-in in the 
5821 \begin_inset Flex Code
5822 status collapsed
5823
5824 \begin_layout Plain Layout
5825 latex/pdflatex
5826 \end_layout
5827
5828 \end_inset
5829
5830  program, some are provided by external packages.
5831  Your choice depends on whether your LaTeX distribution already provides
5832  a given method (the built-in methods are rather new) and whether your viewer
5833  can cope with it.
5834  The available methods are described in the following.
5835 \end_layout
5836
5837 \begin_layout Subsubsection*
5838 Built-in DVI-search via src-specials (DVI only) 
5839 \end_layout
5840
5841 \begin_layout Standard
5842 This method provides the DVI file with the necessary information for reverse
5843  search.
5844  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5845  distribution should include it), and it works reliably.
5846  To enable it, change the 
5847 \begin_inset Flex MenuItem
5848 status collapsed
5849
5850 \begin_layout Plain Layout
5851 LaT
5852 \begin_inset ERT
5853 status collapsed
5854
5855 \begin_layout Plain Layout
5856
5857 {}
5858 \end_layout
5859
5860 \end_inset
5861
5862 eX (plain)->DVI
5863 \end_layout
5864
5865 \end_inset
5866
5867  or 
5868 \begin_inset Flex MenuItem
5869 status collapsed
5870
5871 \begin_layout Plain Layout
5872 LaT
5873 \begin_inset ERT
5874 status collapsed
5875
5876 \begin_layout Plain Layout
5877
5878 {}
5879 \end_layout
5880
5881 \end_inset
5882
5883 eX (plain)->DraftDVI
5884 \end_layout
5885
5886 \end_inset
5887
5888  converter in 
5889 \begin_inset Flex MenuItem
5890 status collapsed
5891
5892 \begin_layout Plain Layout
5893 Preferences\SpecialChar \menuseparator
5894 File Handling\SpecialChar \menuseparator
5895 Converters
5896 \end_layout
5897
5898 \end_inset
5899
5900  to 
5901 \begin_inset Flex Code
5902 status collapsed
5903
5904 \begin_layout Plain Layout
5905 latex -src-specials $$i
5906 \end_layout
5907
5908 \end_inset
5909
5910 .
5911  If this doesn't work, check if your TeX engine needs different options
5912  (the syntax might differ in some distributions).
5913 \end_layout
5914
5915 \begin_layout Subsubsection*
5916 External Packages (PDFSync and scrltx) 
5917 \end_layout
5918
5919 \begin_layout Standard
5920 The packages 
5921 \emph on
5922 pdfsync
5923 \emph default
5924  and 
5925 \emph on
5926 scrltx
5927 \emph default
5928  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5929  respectively.
5930  In order to enable it, load the packages in the LyX preamble: 
5931 \end_layout
5932
5933 \begin_layout Itemize
5934 \begin_inset Flex Code
5935 status collapsed
5936
5937 \begin_layout Plain Layout
5938
5939 \backslash
5940 usepackage{pdfsync}
5941 \end_layout
5942
5943 \end_inset
5944
5945  for reverse PDF search,
5946 \end_layout
5947
5948 \begin_layout Itemize
5949 \begin_inset Flex Code
5950 status collapsed
5951
5952 \begin_layout Plain Layout
5953
5954 \backslash
5955 usepackage[active]{srcltx}
5956 \end_layout
5957
5958 \end_inset
5959
5960  for reverse DVI search.
5961 \end_layout
5962
5963 \begin_layout Standard
5964 If you want to be able to perform both DVI and PDF reverse searches, you
5965  can also insert in the preamble the following lines
5966 \end_layout
5967
5968 \begin_layout LyX-Code
5969
5970 \backslash
5971 usepackage{ifpdf}
5972 \begin_inset Newline newline
5973 \end_inset
5974
5975
5976 \backslash
5977 ifpdf
5978 \begin_inset Newline newline
5979 \end_inset
5980
5981   
5982 \backslash
5983 usepackage{pdfsync}
5984 \begin_inset Newline newline
5985 \end_inset
5986
5987
5988 \backslash
5989 else
5990 \begin_inset Newline newline
5991 \end_inset
5992
5993   
5994 \backslash
5995 usepackage[active]{srcltx}
5996 \begin_inset Newline newline
5997 \end_inset
5998
5999
6000 \backslash
6001 fi
6002 \end_layout
6003
6004 \begin_layout Standard
6005 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6006  right package will be used.
6007 \end_layout
6008
6009 \begin_layout Standard
6010 Note that PDFSync might affect the output layout of your document.
6011  It is therefore advised to disable PDFsync for final documents.
6012 \end_layout
6013
6014 \begin_layout Subsubsection*
6015 Built-in reverse search via SyncTeX (DVI and PDF) 
6016 \end_layout
6017
6018 \begin_layout Standard
6019 Recent versions of 
6020 \begin_inset Flex Code
6021 status collapsed
6022
6023 \begin_layout Plain Layout
6024 (pdf)latex
6025 \end_layout
6026
6027 \end_inset
6028
6029  have built-in support for both PDF and DVI reverse search.
6030  This so-called 
6031 \emph on
6032 SyncTeX
6033 \emph default
6034  facility is basically the result of the integration of the PDFSync package
6035  to the pdftex program and its merge with the 
6036 \emph on
6037 scr-specials
6038 \emph default
6039  approach.
6040  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6041  to use it.
6042  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6043  already provide SyncTeX support.
6044 \end_layout
6045
6046 \begin_layout Standard
6047 To enable SyncTeX for DVI output, change the 
6048 \begin_inset Flex MenuItem
6049 status collapsed
6050
6051 \begin_layout Plain Layout
6052 LaT
6053 \begin_inset ERT
6054 status collapsed
6055
6056 \begin_layout Plain Layout
6057
6058 {}
6059 \end_layout
6060
6061 \end_inset
6062
6063 eX (plain) -> DVI
6064 \end_layout
6065
6066 \end_inset
6067
6068  or 
6069 \begin_inset Flex MenuItem
6070 status collapsed
6071
6072 \begin_layout Plain Layout
6073 LaT
6074 \begin_inset ERT
6075 status collapsed
6076
6077 \begin_layout Plain Layout
6078
6079 {}
6080 \end_layout
6081
6082 \end_inset
6083
6084 eX (plain) -> DraftDVI
6085 \end_layout
6086
6087 \end_inset
6088
6089  converter in 
6090 \begin_inset Flex MenuItem
6091 status collapsed
6092
6093 \begin_layout Plain Layout
6094 Preferences\SpecialChar \menuseparator
6095 File Handling\SpecialChar \menuseparator
6096 Converters
6097 \end_layout
6098
6099 \end_inset
6100
6101  to 
6102 \begin_inset Flex Code
6103 status collapsed
6104
6105 \begin_layout Plain Layout
6106 latex -synctex=1 $$i
6107 \end_layout
6108
6109 \end_inset
6110
6111 , and for PDF output, change the 
6112 \begin_inset Flex MenuItem
6113 status collapsed
6114
6115 \begin_layout Plain Layout
6116 LaT
6117 \begin_inset ERT
6118 status collapsed
6119
6120 \begin_layout Plain Layout
6121
6122 {}
6123 \end_layout
6124
6125 \end_inset
6126
6127 eX (pdflatex) -> PDF (pdflatex)
6128 \end_layout
6129
6130 \end_inset
6131
6132  or converter to 
6133 \begin_inset Flex Code
6134 status collapsed
6135
6136 \begin_layout Plain Layout
6137 pdflatex -synctex=1 $$i
6138 \end_layout
6139
6140 \end_inset
6141
6142 .
6143  Check the documentation of your viewer whether the viewer needs to be configure
6144 d for the use with SyncTeX.
6145 \begin_inset Foot
6146 status collapsed
6147
6148 \begin_layout Plain Layout
6149 The 
6150 \begin_inset Flex Code
6151 status collapsed
6152
6153 \begin_layout Plain Layout
6154 -synctex=1
6155 \end_layout
6156
6157 \end_inset
6158
6159  option enables gzip compression.
6160  If your viewer does not support it, you should instead use 
6161 \begin_inset Flex Code
6162 status collapsed
6163
6164 \begin_layout Plain Layout
6165 -synctex=-1
6166 \end_layout
6167
6168 \end_inset
6169
6170 .
6171 \end_layout
6172
6173 \end_inset
6174
6175
6176 \end_layout
6177
6178 \begin_layout Subsection
6179 Configuring and using specific viewers
6180 \begin_inset CommandInset label
6181 LatexCommand label
6182 name "sub:configuring-viewers"
6183
6184 \end_inset
6185
6186
6187 \end_layout
6188
6189 \begin_layout Subsubsection*
6190 Xdvi (all platforms)
6191 \end_layout
6192
6193 \begin_layout Standard
6194 If you use 
6195 \begin_inset Flex Code
6196 status collapsed
6197
6198 \begin_layout Plain Layout
6199 xdvi
6200 \end_layout
6201
6202 \end_inset
6203
6204 , you don't need to do anything else for performing a reverse DVI search,
6205  as LyX already provides the necessary hooks for automatically using the
6206  
6207 \begin_inset Flex Code
6208 status collapsed
6209
6210 \begin_layout Plain Layout
6211 lyxclient
6212 \end_layout
6213
6214 \end_inset
6215
6216  program.
6217  Just setup your document as described above (reverse search is triggered
6218  by Ctrl-click or Alt-click on Mac OSX, respectively).
6219 \end_layout
6220
6221 \begin_layout Standard
6222 However, if for whatever reason you want to use the named pipe instead of
6223  the socket for communicating with LyX, simply change the DVI viewer in
6224  
6225 \begin_inset Flex MenuItem
6226 status collapsed
6227
6228 \begin_layout Plain Layout
6229 Preferences\SpecialChar \menuseparator
6230 File Handling\SpecialChar \menuseparator
6231 File formats
6232 \end_layout
6233
6234 \end_inset
6235
6236  to
6237 \begin_inset Foot
6238 status collapsed
6239
6240 \begin_layout Plain Layout
6241 On Mac OSX you have to use 
6242 \begin_inset Flex Code
6243 status collapsed
6244
6245 \begin_layout Plain Layout
6246 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6247 \end_layout
6248
6249 \end_inset
6250
6251
6252 \end_layout
6253
6254 \end_inset
6255
6256  
6257 \begin_inset Flex Code
6258 status collapsed
6259
6260 \begin_layout Plain Layout
6261 xdvi -editor 'lyxeditor.sh %f %l'
6262 \end_layout
6263
6264 \end_inset
6265
6266 , where 
6267 \begin_inset Flex Code
6268 status collapsed
6269
6270 \begin_layout Plain Layout
6271 lyxeditor.sh
6272 \end_layout
6273
6274 \end_inset
6275
6276  is a suitable script.
6277  For example, a minimal shell script is the following one:
6278 \end_layout
6279
6280 \begin_layout LyX-Code
6281 #!/bin/sh
6282 \begin_inset Newline newline
6283 \end_inset
6284
6285 LYXPIPE="/path/to/lyxpipe"
6286 \begin_inset Newline newline
6287 \end_inset
6288
6289 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6290 \begin_inset Newline newline
6291 \end_inset
6292
6293 echo "$COMMAND" > "${LYXPIPE}".in || exit
6294 \begin_inset Newline newline
6295 \end_inset
6296
6297 read < "${LYXPIPE}".out || exit
6298 \end_layout
6299
6300 \begin_layout Standard
6301 where 
6302 \begin_inset Flex Code
6303 status collapsed
6304
6305 \begin_layout Plain Layout
6306 /path/to/lyxpipe
6307 \end_layout
6308
6309 \end_inset
6310
6311  is the Ly
6312 \begin_inset ERT
6313 status collapsed
6314
6315 \begin_layout Plain Layout
6316
6317 {}
6318 \end_layout
6319
6320 \end_inset
6321
6322 XServer pipe path specified in 
6323 \begin_inset Flex MenuItem
6324 status collapsed
6325
6326 \begin_layout Plain Layout
6327 Preferences\SpecialChar \menuseparator
6328 Paths
6329 \end_layout
6330
6331 \end_inset
6332
6333 .
6334 \begin_inset Foot
6335 status collapsed
6336
6337 \begin_layout Plain Layout
6338 In the 
6339 \begin_inset Flex Code
6340 status collapsed
6341
6342 \begin_layout Plain Layout
6343 development/tools
6344 \end_layout
6345
6346 \end_inset
6347
6348  folder of a source distribution you can find a 
6349 \begin_inset Flex Code
6350 status collapsed
6351
6352 \begin_layout Plain Layout
6353 lyxeditor
6354 \end_layout
6355
6356 \end_inset
6357
6358  script which is able to locate the 
6359 \emph on
6360 lyxpipe
6361 \emph default
6362  based on your preferences.
6363 \end_layout
6364
6365 \end_inset
6366
6367
6368 \end_layout
6369
6370 \begin_layout Subsubsection*
6371 MacDviX (Mac OSX)
6372 \end_layout
6373
6374 \begin_layout Standard
6375 At the end of 
6376 \begin_inset Flex Code
6377 status collapsed
6378
6379 \begin_layout Plain Layout
6380 /Applications/MacDviX_Folder/calleditor.script
6381 \end_layout
6382
6383 \end_inset
6384
6385 , add the following lines:
6386 \end_layout
6387
6388 \begin_layout LyX-Code
6389 /Applications/Ly
6390 \begin_inset ERT
6391 status collapsed
6392
6393 \begin_layout Plain Layout
6394
6395 {}
6396 \end_layout
6397
6398 \end_inset
6399
6400 X.app/Contents/MacOS/lyxeditor "$2" $1
6401 \begin_inset Newline newline
6402 \end_inset
6403
6404 exit 1
6405 \end_layout
6406
6407 \begin_layout Standard
6408 Modify the lines accordingly if you install LyX somewhere else than in the
6409  Applications folder.
6410 \end_layout
6411
6412 \begin_layout Standard
6413 Reverse search is triggered by Alt-click (OPTION-click).
6414 \end_layout
6415
6416 \begin_layout Subsubsection*
6417 Skim (Mac OSX)
6418 \end_layout
6419
6420 \begin_layout Standard
6421 Enter 
6422 \begin_inset Flex Code
6423 status collapsed
6424
6425 \begin_layout Plain Layout
6426 open -a Skim.app $$i
6427 \end_layout
6428
6429 \end_inset
6430
6431  to the viewer setting in 
6432 \begin_inset Flex MenuItem
6433 status collapsed
6434
6435 \begin_layout Plain Layout
6436 Preferences\SpecialChar \menuseparator
6437 File Handling\SpecialChar \menuseparator
6438 File formats\SpecialChar \menuseparator
6439 PDF (pdflatex)
6440 \end_layout
6441
6442 \end_inset
6443
6444 , and then in 
6445 \begin_inset Flex MenuItem
6446 status collapsed
6447
6448 \begin_layout Plain Layout
6449 Skim\SpecialChar \menuseparator
6450 Preferences\SpecialChar \menuseparator
6451 Sync
6452 \end_layout
6453
6454 \end_inset
6455
6456  select Ly
6457 \begin_inset ERT
6458 status collapsed
6459
6460 \begin_layout Plain Layout
6461
6462 {}
6463 \end_layout
6464
6465 \end_inset
6466
6467 X.
6468 \end_layout
6469
6470 \begin_layout Standard
6471 Reverse search is triggered by COMMAND-SHIFT-click
6472 \end_layout
6473
6474 \begin_layout Subsubsection*
6475 Okular (KDE)
6476 \end_layout
6477
6478 \begin_layout Standard
6479 Go to 
6480 \begin_inset Flex MenuItem
6481 status collapsed
6482
6483 \begin_layout Plain Layout
6484 Settings\SpecialChar \menuseparator
6485 Configure Okular\SpecialChar \ldots{}
6486 \SpecialChar \menuseparator
6487 Editor
6488 \end_layout
6489
6490 \end_inset
6491
6492 , select 
6493 \begin_inset Quotes eld
6494 \end_inset
6495
6496 Custom Text Editor
6497 \begin_inset Quotes erd
6498 \end_inset
6499
6500  and add the command 
6501 \begin_inset Flex Code
6502 status collapsed
6503
6504 \begin_layout Plain Layout
6505 lyxclient -g %f %l
6506 \end_layout
6507
6508 \end_inset
6509
6510 .
6511 \end_layout
6512
6513 \begin_layout Standard
6514 Reverse search is triggered by SHIFT-click.
6515 \end_layout
6516
6517 \begin_layout Subsubsection*
6518 YAP (Windows)
6519 \end_layout
6520
6521 \begin_layout Standard
6522 Launch yap, choose its 
6523 \begin_inset Flex MenuItem
6524 status collapsed
6525
6526 \begin_layout Plain Layout
6527 View\SpecialChar \menuseparator
6528 Options
6529 \end_layout
6530
6531 \end_inset
6532
6533  menu and select the 
6534 \begin_inset Quotes eld
6535 \end_inset
6536
6537 Inverse DVI Search
6538 \begin_inset Quotes erd
6539 \end_inset
6540
6541  tab.
6542  Click on the 
6543 \begin_inset Quotes eld
6544 \end_inset
6545
6546 New\SpecialChar \ldots{}
6547
6548 \begin_inset Quotes erd
6549 \end_inset
6550
6551  button and, in the window that opens, enter 
6552 \begin_inset Quotes eld
6553 \end_inset
6554
6555 LyX Editor
6556 \begin_inset Quotes erd
6557 \end_inset
6558
6559  (or any other name you like) in the 
6560 \begin_inset Quotes eld
6561 \end_inset
6562
6563 Name:
6564 \begin_inset Quotes erd
6565 \end_inset
6566
6567  field.
6568  Now click on the button labeled 
6569 \begin_inset Quotes eld
6570 \end_inset
6571
6572 \SpecialChar \ldots{}
6573
6574 \begin_inset Quotes erd
6575 \end_inset
6576
6577  to open a file dialog and navigate to the directory containing the batch
6578  file 
6579 \begin_inset Flex Code
6580 status collapsed
6581
6582 \begin_layout Plain Layout
6583 lyxeditor.bat
6584 \end_layout
6585
6586 \end_inset
6587
6588  (see below).
6589  Select 
6590 \begin_inset Flex Code
6591 status collapsed
6592
6593 \begin_layout Plain Layout
6594 lyxeditor.bat
6595 \end_layout
6596
6597 \end_inset
6598
6599  and then specify the program arguments as 
6600 \begin_inset Flex Code
6601 status collapsed
6602
6603 \begin_layout Plain Layout
6604 %f %l
6605 \end_layout
6606
6607 \end_inset
6608
6609 .
6610  The 
6611 \begin_inset Flex Code
6612 status collapsed
6613
6614 \begin_layout Plain Layout
6615 lyxeditor.bat
6616 \end_layout
6617
6618 \end_inset
6619
6620  wrapper is used for communicating with LyX through the 
6621 \emph on
6622 lyxpipe
6623 \emph default
6624  and is as follows:
6625 \end_layout
6626
6627 \begin_layout LyX-Code
6628 @echo off
6629 \begin_inset Newline newline
6630 \end_inset
6631
6632 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6633 \backslash
6634
6635 \backslash
6636 .
6637 \backslash
6638 pipe
6639 \backslash
6640 lyxpipe.in
6641 \begin_inset Newline newline
6642 \end_inset
6643
6644 type 
6645 \backslash
6646
6647 \backslash
6648 .
6649 \backslash
6650 pipe
6651 \backslash
6652 lyxpipe.out
6653 \end_layout
6654
6655 \begin_layout Standard
6656 Make sure that the LyXServer pipe path you specified in LyX is 
6657 \begin_inset Flex Code
6658 status collapsed
6659
6660 \begin_layout Plain Layout
6661
6662 \backslash
6663
6664 \backslash
6665 .
6666 \backslash
6667 pipe
6668 \backslash
6669 lyxpipe
6670 \end_layout
6671
6672 \end_inset
6673
6674 , otherwise change the 
6675 \begin_inset Flex Code
6676 status collapsed
6677
6678 \begin_layout Plain Layout
6679 lyxeditor.bat
6680 \end_layout
6681
6682 \end_inset
6683
6684  wrapper accordingly.
6685 \end_layout
6686
6687 \begin_layout Standard
6688 In yap, reverse search is triggered by double-click.
6689 \end_layout
6690
6691 \begin_layout Subsubsection*
6692 SumatraPDF (Windows)
6693 \end_layout
6694
6695 \begin_layout Standard
6696 In order to use SumatraPDF for inverse search, enter 
6697 \begin_inset Flex Code
6698 status collapsed
6699
6700 \begin_layout Plain Layout
6701 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6702 \end_layout
6703
6704 \end_inset
6705
6706  in the viewer setting in 
6707 \begin_inset Flex MenuItem
6708 status collapsed
6709
6710 \begin_layout Plain Layout
6711 Preferences\SpecialChar \menuseparator
6712 File Handling\SpecialChar \menuseparator
6713 File formats\SpecialChar \menuseparator
6714 PDF (pdflatex)
6715 \end_layout
6716
6717 \end_inset
6718
6719 , where 
6720 \begin_inset Flex Code
6721 status collapsed
6722
6723 \begin_layout Plain Layout
6724 lyxeditor.bat
6725 \end_layout
6726
6727 \end_inset
6728
6729  is the previous wrapper.
6730  If SumatraPDF.exe is not in your command PATH, use its full file name.
6731 \end_layout
6732
6733 \begin_layout Standard
6734 Reverse search is triggered by double-click.
6735 \end_layout
6736
6737 \begin_layout Subsubsection*
6738 YAP (Cygwin)
6739 \end_layout
6740
6741 \begin_layout Standard
6742 First of all, make sure that yap is your default DVI viewer in the Windows
6743  environment, then launch it, choose its 
6744 \begin_inset Flex MenuItem
6745 status collapsed
6746
6747 \begin_layout Plain Layout
6748 View\SpecialChar \menuseparator
6749 Options
6750 \end_layout
6751
6752 \end_inset
6753
6754  menu and select the 
6755 \begin_inset Quotes eld
6756 \end_inset
6757
6758 Inverse DVI Search
6759 \begin_inset Quotes erd
6760 \end_inset
6761
6762  tab.
6763  Click on the 
6764 \begin_inset Quotes eld
6765 \end_inset
6766
6767 New\SpecialChar \ldots{}
6768
6769 \begin_inset Quotes erd
6770 \end_inset
6771
6772  button and, in the window that opens, enter 
6773 \begin_inset Quotes eld
6774 \end_inset
6775
6776 LyX Editor
6777 \begin_inset Quotes erd
6778 \end_inset
6779
6780  (or any other name you like) in the 
6781 \begin_inset Quotes eld
6782 \end_inset
6783
6784 Name:
6785 \begin_inset Quotes erd
6786 \end_inset
6787
6788  field.
6789  Now click on the button labeled 
6790 \begin_inset Quotes eld
6791 \end_inset
6792
6793 \SpecialChar \ldots{}
6794
6795 \begin_inset Quotes erd
6796 \end_inset
6797
6798  to open a file dialog and navigate to the directory containing the 
6799 \begin_inset Flex Code
6800 status collapsed
6801
6802 \begin_layout Plain Layout
6803 lyxeditor.exe
6804 \end_layout
6805
6806 \end_inset
6807
6808  program (which is installed by default on Cygwin along with the LyX executable).
6809  Select 
6810 \begin_inset Flex Code
6811 status collapsed
6812
6813 \begin_layout Plain Layout
6814 lyxeditor.exe
6815 \end_layout
6816
6817 \end_inset
6818
6819  and then specify the program arguments as 
6820 \begin_inset Flex Code
6821 status collapsed
6822
6823 \begin_layout Plain Layout
6824 -g %f %l
6825 \end_layout
6826
6827 \end_inset
6828
6829 .
6830  In this way, you will be using the 
6831 \emph on
6832 lyxsocket
6833 \emph default
6834  for communicating with LyX.
6835  If, for whatever reason, you want to use the 
6836 \emph on
6837 lyxpipe
6838 \emph default
6839 , omit the 
6840 \begin_inset Flex Code
6841 status collapsed
6842
6843 \begin_layout Plain Layout
6844 -g
6845 \end_layout
6846
6847 \end_inset
6848
6849  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6850 \end_layout
6851
6852 \begin_layout Standard
6853 In yap, reverse search is triggered by double-click.
6854 \end_layout
6855
6856 \begin_layout Subsubsection*
6857 SumatraPDF (Cygwin)
6858 \end_layout
6859
6860 \begin_layout Standard
6861 In order to use SumatraPDF for inverse search, enter 
6862 \begin_inset Flex Code
6863 status collapsed
6864
6865 \begin_layout Plain Layout
6866 SumatraPDF.sh
6867 \end_layout
6868
6869 \end_inset
6870
6871  in the viewer setting in 
6872 \begin_inset Flex MenuItem
6873 status collapsed
6874
6875 \begin_layout Plain Layout
6876 Preferences\SpecialChar \menuseparator
6877 File Handling\SpecialChar \menuseparator
6878 File formats\SpecialChar \menuseparator
6879 PDF (pdflatex)
6880 \end_layout
6881
6882 \end_inset
6883
6884 , where 
6885 \begin_inset Flex Code
6886 status collapsed
6887
6888 \begin_layout Plain Layout
6889 SumatraPDF.sh
6890 \end_layout
6891
6892 \end_inset
6893
6894  is the following script (to be placed in your command PATH, 
6895 \begin_inset Flex Code
6896 status collapsed
6897
6898 \begin_layout Plain Layout
6899 /usr/local/bin
6900 \end_layout
6901
6902 \end_inset
6903
6904  being the best choice):
6905 \end_layout
6906
6907 \begin_layout LyX-Code
6908 #!/bin/bash
6909 \begin_inset Newline newline
6910 \end_inset
6911
6912 cd $(dirname $1)
6913 \begin_inset Newline newline
6914 \end_inset
6915
6916 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6917 \end_layout
6918
6919 \begin_layout Standard
6920 This wrapper script is needed because SumatraPDF is a native Windows application
6921  and does not understand the posix paths used by the Cygwin version of LyX.
6922  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6923  the script above.
6924  The 
6925 \begin_inset Flex Code
6926 status collapsed
6927
6928 \begin_layout Plain Layout
6929 -g
6930 \end_layout
6931
6932 \end_inset
6933
6934  enables communication via the 
6935 \emph on
6936 lyxsocket
6937 \emph default
6938 .
6939  Again, omit the 
6940 \begin_inset Flex Code
6941 status collapsed
6942
6943 \begin_layout Plain Layout
6944 -g
6945 \end_layout
6946
6947 \end_inset
6948
6949  option if you want to use the 
6950 \emph on
6951 lyxpipe
6952 \emph default
6953 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6954 \end_layout
6955
6956 \begin_layout Standard
6957 Reverse search is triggered by double-click.
6958 \end_layout
6959
6960 \begin_layout Section
6961 Forward search
6962 \end_layout
6963
6964 \begin_layout Standard
6965 Forward search is, as the name implies, in a sense the 
6966 \begin_inset Quotes eld
6967 \end_inset
6968
6969 opposite
6970 \begin_inset Quotes erd
6971 \end_inset
6972
6973  to reverse search.
6974  It allows you to let the viewer jump to a given position from within LyX.
6975  If forward search is set up (as described in what follows), you can put
6976  the cursor anywhere in your LyX document, and hit 
6977 \begin_inset Flex MenuItem
6978 status collapsed
6979
6980 \begin_layout Plain Layout
6981 Navigate\SpecialChar \menuseparator
6982 Forward search
6983 \end_layout
6984
6985 \end_inset
6986
6987  (or select 
6988 \begin_inset Flex MenuItem
6989 status collapsed
6990
6991 \begin_layout Plain Layout
6992 Forward search
6993 \end_layout
6994
6995 \end_inset
6996
6997  in the context menu via right mouse click), and then the viewer will jump
6998  to that position as well.
6999  This implies, of course, that your viewer supports this function.
7000 \end_layout
7001
7002 \begin_layout Standard
7003 To make forward search possible, you first need to provide the generated
7004  output PDF/DVI file with additional information about the TeX sources.
7005  This can be done via the methods described in the section 
7006 \begin_inset CommandInset ref
7007 LatexCommand ref
7008 reference "sub:rev-search"
7009
7010 \end_inset
7011
7012 .
7013 \end_layout
7014
7015 \begin_layout Standard
7016 Additionally, you need to configure LyX for using your viewers in 
7017 \begin_inset Flex MenuItem
7018 status collapsed
7019
7020 \begin_layout Plain Layout
7021 Tools\SpecialChar \menuseparator
7022 Preferences\SpecialChar \menuseparator
7023 Output\SpecialChar \menuseparator
7024 General
7025 \end_layout
7026
7027 \end_inset
7028
7029 .
7030  We provide a range of tested configurations for some viewers, which you
7031  can select from the drop down list.
7032  If none of these configurations suits you, you have to find out and enter
7033  a suitable configuration yourself.
7034  The definition syntax uses the following placeholders: 
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 $$n
7044 \end_layout
7045
7046 \end_inset
7047
7048 : row number
7049 \end_layout
7050
7051 \begin_layout Itemize
7052 \noindent
7053 \begin_inset Flex Code
7054 status collapsed
7055
7056 \begin_layout Plain Layout
7057 $$t
7058 \end_layout
7059
7060 \end_inset
7061
7062 : name of the (temporary) exported .tex file
7063 \end_layout
7064
7065 \begin_layout Itemize
7066 \noindent
7067 \begin_inset Flex Code
7068 status collapsed
7069
7070 \begin_layout Plain Layout
7071 $$o
7072 \end_layout
7073
7074 \end_inset
7075
7076 : name of the exported output file (either dvi or pdf, depending on which
7077  one exists in the temporary directory)
7078 \end_layout
7079
7080 \begin_layout Standard
7081 Note that only some of the viewers provide full forward search functionality,
7082  among them yap, xdvi, okular and Sumatra PDF
7083 \begin_inset Foot
7084 status collapsed
7085
7086 \begin_layout Plain Layout
7087 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7088 ip
7089 \end_layout
7090
7091 \end_inset
7092
7093 .
7094  While many of the widespread PDF viewers (most notably Adobe Reader) do
7095  not support forward search at all, some other viewers -- e.
7096 \begin_inset space \thinspace{}
7097 \end_inset
7098
7099 g.
7100  evince and xpdf -- allow at least to reload the document and jump to a
7101  specific page of the file, so you can at least navigate 
7102 \begin_inset Quotes eld
7103 \end_inset
7104
7105 near
7106 \begin_inset Quotes erd
7107 \end_inset
7108
7109 .
7110  These latter functionality is provided by an external call of synctex (see
7111  the predefined example configurations).
7112  
7113 \end_layout
7114
7115 \begin_layout Standard
7116 Forward search works both with DVI and PDF output.
7117  LyX simply checks which preview format you have used before (i.
7118 \begin_inset space \thinspace{}
7119 \end_inset
7120
7121 e., which format is already there in the temporary directory) and chooses
7122  the appropriate configuration for the respective format.
7123 \end_layout
7124
7125 \begin_layout Chapter
7126 Special Document Classes
7127 \end_layout
7128
7129 \begin_layout Section
7130 A&A Paper
7131 \end_layout
7132
7133 \begin_layout Standard
7134 by 
7135 \noun on
7136 Peter Sütterlin
7137 \end_layout
7138
7139 \begin_layout Subsection
7140 Introduction
7141 \end_layout
7142
7143 \begin_layout Standard
7144 This section describes how LyX can be used to write articles for submission
7145  to the scientific journal 
7146 \emph on
7147 Astronomy and Astrophysics
7148 \emph default
7149  (www.edpsciences.fr/aa/ 
7150 \begin_inset Flex URL
7151 status collapsed
7152
7153 \begin_layout Plain Layout
7154
7155 http://www.edpsciences.fr/aa/
7156 \end_layout
7157
7158 \end_inset
7159
7160 ) using Version 5.01 of the document class 
7161 \family typewriter
7162 aa.cls
7163 \family default
7164 .
7165  This package can be downloaded from the ftp site
7166 \end_layout
7167
7168 \begin_layout Standard
7169 \begin_inset VSpace medskip
7170 \end_inset
7171
7172
7173 \end_layout
7174
7175 \begin_layout Standard
7176 \align center
7177 \begin_inset Flex URL
7178 status collapsed
7179
7180 \begin_layout Plain Layout
7181
7182 ftp://ftp.edpsciences.org/pub/aa/readme.html
7183 \end_layout
7184
7185 \end_inset
7186
7187
7188 \end_layout
7189
7190 \begin_layout Standard
7191 \begin_inset VSpace medskip
7192 \end_inset
7193
7194
7195 \end_layout
7196
7197 \begin_layout Standard
7198 A manual comes together with that package, and this text is not meant to
7199  replace the original manual but is merely a short guide in how to realize
7200  the correct form of your paper.
7201  
7202 \end_layout
7203
7204 \begin_layout Standard
7205 Please note that the publisher of the journal was changed from Springer
7206  to EDP Sciences starting January 1, 2001.
7207  That change involved also some slight changes to the style files, namely
7208  the removal of the thesaurus command.
7209  The LyX class aa supports the newest version of these style files, V 5.01.
7210  If you have an older version installed, please upgrade.
7211  For compatibility, the old (version 4) layout has been kept as 
7212 \family sans
7213 article (A&A V4)
7214 \family default
7215 .
7216  Please refer to the comments in 
7217 \family typewriter
7218 LyXDir/layouts/aapaper.layout
7219 \family default
7220 .
7221 \end_layout
7222
7223 \begin_layout Subsection
7224 Getting started
7225 \end_layout
7226
7227 \begin_layout Standard
7228 It is recommended you start from the example template distributed with LyX.
7229  If you are not using a template, note the following settings:
7230 \end_layout
7231
7232 \begin_layout Itemize
7233 Select 
7234 \family sans
7235 article (A&A)
7236 \family default
7237  in the 
7238 \family sans
7239 Document\SpecialChar \menuseparator
7240 Settings
7241 \family default
7242  dialog (OK, that one was obvious).
7243 \end_layout
7244
7245 \begin_layout Itemize
7246 Don't change the option 
7247 \family sans
7248 Page
7249 \begin_inset space ~
7250 \end_inset
7251
7252 style
7253 \family default
7254 : Leave it set to 
7255 \family sans
7256 default
7257 \family default
7258 .
7259  The whole layout is done by the macros, you shouldn't change anything.
7260 \end_layout
7261
7262 \begin_layout Subsection
7263 The header block
7264 \end_layout
7265
7266 \begin_layout Standard
7267 First thing to enter is the header information.
7268  It consists of seven entries, of which some are optional.
7269  They are
7270 \end_layout
7271
7272 \begin_layout Itemize
7273
7274 \family sans
7275 Title
7276 \family default
7277 : [required] 
7278 \end_layout
7279
7280 \begin_layout Itemize
7281
7282 \family sans
7283 Subtitle
7284 \family default
7285 : [optional] 
7286 \end_layout
7287
7288 \begin_layout Itemize
7289
7290 \family sans
7291 Author
7292 \family default
7293 : [required]
7294 \end_layout
7295
7296 \begin_layout Itemize
7297
7298 \family sans
7299 Address
7300 \family default
7301 : [required]
7302 \end_layout
7303
7304 \begin_layout Itemize
7305
7306 \family sans
7307 Offprints
7308 \family default
7309 : [optional] if more than one author: whom to contact for offprint requests.
7310 \end_layout
7311
7312 \begin_layout Itemize
7313
7314 \family sans
7315 Mail
7316 \family default
7317 : [optional] mail address for contacts.
7318 \end_layout
7319
7320 \begin_layout Itemize
7321
7322 \family sans
7323 Date
7324 \family default
7325 : [required].
7326  Suggested format is 
7327 \family typewriter
7328 Received: <date>; Accepted <date> 
7329 \end_layout
7330
7331 \begin_layout Standard
7332 There is no need to issue the 
7333 \family typewriter
7334
7335 \backslash
7336 maketitle
7337 \family default
7338  command, this is done automatically by LyX when the header is finished.
7339  Although the order of the single header entries doesn't matter it is advised
7340  to keep the above sequence, just to get the best optics and meets the layout
7341  of the real document.
7342 \end_layout
7343
7344 \begin_layout Standard
7345 If you want to place footnotes in the header block, e.
7346 \begin_inset space \thinspace{}
7347 \end_inset
7348
7349 g.
7350 \begin_inset space \space{}
7351 \end_inset
7352
7353 to state your present address, just use the standard footnote via the menu
7354  
7355 \family sans
7356 Insert\SpecialChar \menuseparator
7357 Footnote.
7358
7359 \family default
7360  LyX will automagically use the term 
7361 \family typewriter
7362
7363 \backslash
7364 thanks{}
7365 \family default
7366  in that case.
7367 \end_layout
7368
7369 \begin_layout Standard
7370 In addition to these topics, the macros use three additional LaTeX commands
7371  that have no counterpart in LyX:
7372 \end_layout
7373
7374 \begin_layout Itemize
7375
7376 \family typewriter
7377
7378 \backslash
7379 and
7380 \family default
7381  to separate different names for more than one author and institute, respectivel
7382 y.
7383 \end_layout
7384
7385 \begin_layout Itemize
7386
7387 \family typewriter
7388
7389 \backslash
7390 inst{<nr>}
7391 \family default
7392 to mark corresponding author/institute pairs.
7393  The institutes are numbered sequentially as they appear in the 
7394 \family sans
7395 Address
7396 \family default
7397  field, so you have to put a marker to each author.
7398 \end_layout
7399
7400 \begin_layout Itemize
7401
7402 \family typewriter
7403
7404 \backslash
7405 email{address}
7406 \family default
7407  to supply an email address for fast contact.
7408 \end_layout
7409
7410 \begin_layout Standard
7411 In all cases, the appropriate command has to be entered in LyX and marked
7412  as LaTeX code.
7413  See the examples.
7414  
7415 \end_layout
7416
7417 \begin_layout Subsection
7418 The abstract
7419 \end_layout
7420
7421 \begin_layout Standard
7422 The abstract should immediately follow the header block.
7423  With version 5 the abstract environment was changed to a command, and there
7424  is now a resctriction to only one paragraph.
7425  In addition, it should contain an entry with the keywords.
7426  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7427  command 
7428 \family typewriter
7429
7430 \backslash
7431 keywords{}
7432 \family default
7433  by hand and mark it as LaTeX code.
7434  Refer to the example paper.
7435 \end_layout
7436
7437 \begin_layout Subsection
7438 Supported environments
7439 \end_layout
7440
7441 \begin_layout Standard
7442 The A&A paper layout supports the following environments for structuring
7443  your text:
7444 \end_layout
7445
7446 \begin_layout Itemize
7447
7448 \family sans
7449 Standard
7450 \end_layout
7451
7452 \begin_layout Itemize
7453
7454 \family sans
7455 Section
7456 \end_layout
7457
7458 \begin_layout Itemize
7459
7460 \family sans
7461 Subsection
7462 \end_layout
7463
7464 \begin_layout Itemize
7465
7466 \family sans
7467 Subsubsection
7468 \end_layout
7469
7470 \begin_layout Itemize
7471
7472 \family sans
7473 Itemize
7474 \end_layout
7475
7476 \begin_layout Itemize
7477
7478 \family sans
7479 Enumerate
7480 \end_layout
7481
7482 \begin_layout Itemize
7483
7484 \family sans
7485 Description
7486 \end_layout
7487
7488 \begin_layout Itemize
7489
7490 \family sans
7491 Caption
7492 \end_layout
7493
7494 \begin_layout Itemize
7495
7496 \family sans
7497 Abstract
7498 \end_layout
7499
7500 \begin_layout Itemize
7501
7502 \family sans
7503 Acknowledgment
7504 \end_layout
7505
7506 \begin_layout Itemize
7507
7508 \family sans
7509 Bibliography
7510 \end_layout
7511
7512 \begin_layout Itemize
7513
7514 \family sans
7515 LaTeX
7516 \end_layout
7517
7518 \begin_layout Subsection
7519 Commands not supported by LyX
7520 \end_layout
7521
7522 \begin_layout Standard
7523 Some commands are not yet supported by the 
7524 \family sans
7525 paper (A&A)
7526 \family default
7527  layout for LyX.
7528  Some have already been mentioned.
7529  For the sake of completeness, they are listed all together here:
7530 \end_layout
7531
7532 \begin_layout Itemize
7533
7534 \family typewriter
7535
7536 \backslash
7537 and
7538 \end_layout
7539
7540 \begin_layout Itemize
7541
7542 \family typewriter
7543
7544 \backslash
7545 email
7546 \end_layout
7547
7548 \begin_layout Itemize
7549
7550 \family typewriter
7551
7552 \backslash
7553 appendix
7554 \end_layout
7555
7556 \begin_layout Itemize
7557
7558 \family typewriter
7559
7560 \backslash
7561 authorrunning
7562 \end_layout
7563
7564 \begin_layout Itemize
7565
7566 \family typewriter
7567
7568 \backslash
7569 inst{}
7570 \end_layout
7571
7572 \begin_layout Itemize
7573
7574 \family typewriter
7575
7576 \backslash
7577 keywords{}
7578 \end_layout
7579
7580 \begin_layout Itemize
7581
7582 \family typewriter
7583
7584 \backslash
7585 object{}
7586 \end_layout
7587
7588 \begin_layout Itemize
7589
7590 \family typewriter
7591
7592 \backslash
7593 titlerunning{}
7594 \end_layout
7595
7596 \begin_layout Standard
7597 If you want to use any of these commands, you have to enter them yourself.
7598  
7599 \series bold
7600 Do not forget to mark them as LaTeX code!
7601 \end_layout
7602
7603 \begin_layout Subsection
7604 Figure and Table Floats
7605 \end_layout
7606
7607 \begin_layout Standard
7608 LyX provides support for the necessary float environments 
7609 \family sans
7610 figure, figure*, table
7611 \family default
7612  and 
7613 \family sans
7614 table*
7615 \family default
7616 , therefore we won't tell much about it here.
7617  Refer to the 
7618 \emph on
7619 User's
7620 \begin_inset space ~
7621 \end_inset
7622
7623 Guide
7624 \emph default
7625 .
7626  Just remember that tables should be left-aligned.
7627  For that, select the table and change the alignment in 
7628 \family sans
7629 Edit\SpecialChar \menuseparator
7630 Paragraph
7631 \begin_inset space ~
7632 \end_inset
7633
7634 Settings.
7635 \end_layout
7636
7637 \begin_layout Standard
7638 There is only one special thing: the figures with caption besides the figure.
7639  To create such a figure, you have to do the following:
7640 \end_layout
7641
7642 \begin_layout Enumerate
7643 Create a wide figure float: 
7644 \family sans
7645 Insert\SpecialChar \menuseparator
7646 Float\SpecialChar \menuseparator
7647 Figure
7648 \family default
7649 , then right click in the figure and select 
7650 \family sans
7651 \bar under
7652 S
7653 \bar default
7654 pan
7655 \begin_inset space ~
7656 \end_inset
7657
7658 columns
7659 \family default
7660 .
7661 \end_layout
7662
7663 \begin_layout Enumerate
7664 Enter your caption text.
7665 \end_layout
7666
7667 \begin_layout Enumerate
7668 Press 
7669 \family sans
7670 Return
7671 \family default
7672  to move the cursor above the caption.
7673 \end_layout
7674
7675 \begin_layout Enumerate
7676 Insert your figure
7677 \end_layout
7678
7679 \begin_layout Enumerate
7680 Position the cursor behind the figure and insert a horizontal fill: 
7681 \family sans
7682 Insert\SpecialChar \menuseparator
7683 Special
7684 \begin_inset space ~
7685 \end_inset
7686
7687 Character\SpecialChar \menuseparator
7688 Horizontal
7689 \begin_inset space ~
7690 \end_inset
7691
7692 Fill
7693 \family default
7694 .
7695 \end_layout
7696
7697 \begin_layout Enumerate
7698 Switch to LaTeX mode: 
7699 \family sans
7700 M-c
7701 \begin_inset space ~
7702 \end_inset
7703
7704 t
7705 \family default
7706 .
7707 \end_layout
7708
7709 \begin_layout Enumerate
7710 Enter 
7711 \family typewriter
7712
7713 \backslash
7714 parbox[b]{55mm}{
7715 \family default
7716 .
7717  
7718 \series bold
7719 Do not close the brace!
7720 \end_layout
7721
7722 \begin_layout Enumerate
7723 Position the cursor behind the caption text, switch to LaTeX mode and insert
7724  the closing brace: 
7725 \family sans
7726 M-c
7727 \begin_inset space ~
7728 \end_inset
7729
7730 t
7731 \family default
7732  
7733 \family typewriter
7734 }
7735 \family default
7736 .
7737 \end_layout
7738
7739 \begin_layout Standard
7740 Also, refer to the figures in the example paper.
7741 \end_layout
7742
7743 \begin_layout Subsection
7744 Referee layout
7745 \end_layout
7746
7747 \begin_layout Standard
7748 For submission, the paper has to be formated in a special double-spacing
7749  layout.
7750  For this purpose, you have to give the option 
7751 \family typewriter
7752 referee
7753 \family default
7754  to the documentclass.
7755  This must be done using the extra class options field in the 
7756 \family sans
7757 Document\SpecialChar \menuseparator
7758 Settings
7759 \family default
7760  dialog.
7761  Just enter the string 
7762 \family typewriter
7763 referee
7764 \family default
7765  there.
7766 \end_layout
7767
7768 \begin_layout Subsection
7769 The example paper
7770 \end_layout
7771
7772 \begin_layout Standard
7773 The 
7774 \family sans
7775 Examples
7776 \family default
7777  directory contains an example paper written with LyX.
7778  It is the example paper from the original macro package, translated to
7779  LyX.
7780  Use it for inspiration, and compare the original LaTeX code with LyX way
7781  of writing.
7782 \end_layout
7783
7784 \begin_layout Section
7785 AASTeX
7786 \end_layout
7787
7788 \begin_layout Standard
7789 by 
7790 \noun on
7791 Mike Ressler
7792 \end_layout
7793
7794 \begin_layout Subsection
7795 Introduction
7796 \end_layout
7797
7798 \begin_layout Standard
7799 AASTeX is a set of macros produced by the American Astronomical Society
7800  to facilitate electronic manuscript submission to the three journals they
7801  publish: the Astrophysical Journal (including the Letters and Supplement),
7802  the Astronomical Journal, and the Publications of the Astronomical Society
7803  of the Pacific.
7804  LyX has proven to be an excellent tool for generating these documents,
7805  especially given its equation, citation, and figure handling capabilities.
7806  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7807  is the version described here, or higher.
7808  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7809  incompatible with LyX.
7810  The AASTeX package may be downloaded from the AASTeX Web site
7811 \end_layout
7812
7813 \begin_layout Standard
7814 \begin_inset VSpace medskip
7815 \end_inset
7816
7817
7818 \end_layout
7819
7820 \begin_layout Standard
7821 \align center
7822 \begin_inset Flex URL
7823 status collapsed
7824
7825 \begin_layout Plain Layout
7826
7827 http://www.journals.uchicago.edu/AAS/AASTeX
7828 \end_layout
7829
7830 \end_inset
7831
7832
7833 \end_layout
7834
7835 \begin_layout Standard
7836 \begin_inset VSpace medskip
7837 \end_inset
7838
7839
7840 \end_layout
7841
7842 \begin_layout Standard
7843 A complete user guide is contained in that package and you should familiarize
7844  yourself with it thoroughly before embarking on writing a paper in LyX.
7845  LyX will not reduce the need to figure out all the AASTeX commands, it
7846  will only reduce the drudgery of typing everything in.
7847  It is your responsibility to ensure that the final exported LaTeX document
7848  conforms completely to the requirements of the journal to which you are
7849  submitting your paper.
7850 \end_layout
7851
7852 \begin_layout Subsection
7853 Starting a New Paper
7854 \end_layout
7855
7856 \begin_layout Standard
7857 I strongly suggest that you start with the AASTeX template file.
7858  Click on 
7859 \family sans
7860 File\SpecialChar \menuseparator
7861 New from
7862 \family default
7863  
7864 \family sans
7865 Template
7866 \family default
7867 , enter the new file name, then choose the 
7868 \family typewriter
7869 aastex.lyx
7870 \family default
7871  template.
7872  This will show the most common fields found in a manuscript.
7873  Simply overwrite the existing text (including the brackets, 
7874 \family typewriter
7875 <>
7876 \family default
7877 ) with the correct information.
7878  Many of the AASTeX commands and environments can be implemented directly
7879  in LyX, but some cannot: most noticeably 
7880 \family typewriter
7881
7882 \backslash
7883 altaffilmark
7884 \family default
7885  and 
7886 \family typewriter
7887
7888 \backslash
7889 altaffiltext
7890 \family default
7891 , which should stick out like a sore thumb if you actually just opened the
7892  template file.
7893  For commands such as these, the LaTeX code must be entered directly and
7894  marked as such.
7895  Such commands are referred to as TeX code, or Evil Red Text.
7896  I tried to minimize the amount of TeX code needed in an AASTeX document,
7897  but there is still a bit more required than any of us would like.
7898 \end_layout
7899
7900 \begin_layout Subsection
7901 Finishing Your Paper
7902 \end_layout
7903
7904 \begin_layout Standard
7905 When the paper is finished to your satisfaction and previews/prints correctly,
7906  there are a few 
7907 \begin_inset Quotes eld
7908 \end_inset
7909
7910 postprocessing
7911 \begin_inset Quotes erd
7912 \end_inset
7913
7914  actions which need to be done before you submit it to the journals.
7915  
7916 \end_layout
7917
7918 \begin_layout Enumerate
7919 Export your paper as a LaTeX file (
7920 \family sans
7921 File\SpecialChar \menuseparator
7922 Export\SpecialChar \menuseparator
7923 LaTeX
7924 \family default
7925 ).
7926  
7927 \end_layout
7928
7929 \begin_layout Enumerate
7930 Edit the resulting 
7931 \family typewriter
7932 .tex
7933 \family default
7934  file with your favorite text editor
7935 \end_layout
7936
7937 \begin_deeper
7938 \begin_layout Enumerate
7939 remove the comment lines before the 
7940 \family typewriter
7941
7942 \backslash
7943 documentclass
7944 \family default
7945  command
7946 \end_layout
7947
7948 \begin_layout Enumerate
7949 remove the 
7950 \family typewriter
7951
7952 \backslash
7953 usepackage...{fontenc}
7954 \family default
7955  line if it appears (usually just after 
7956 \family typewriter
7957
7958 \backslash
7959 documentclass
7960 \family default
7961 }; also remove the 
7962 \family typewriter
7963
7964 \backslash
7965 secnumdepth
7966 \family default
7967  line if it appears.
7968 \end_layout
7969
7970 \begin_layout Enumerate
7971 remove everything between (and including) the 
7972 \family typewriter
7973
7974 \backslash
7975 makeatletter
7976 \family default
7977  and 
7978 \family typewriter
7979
7980 \backslash
7981 makeatother
7982 \family default
7983  commands, except for any commands you specifically put into the LaTeX preamble
7984  (which should appear immediately after the 
7985 \begin_inset Quotes eld
7986 \end_inset
7987
7988 User specified LaTeX commands
7989 \begin_inset Quotes erd
7990 \end_inset
7991
7992  comment in the 
7993 \family typewriter
7994 .tex
7995 \family default
7996  file).
7997 \end_layout
7998
7999 \end_deeper
8000 \begin_layout Enumerate
8001 Run the resulting file through LaTeX to make sure it still processes correctly.
8002 \end_layout
8003
8004 \begin_layout Enumerate
8005 Reread the journal requirements to make sure your filenames and formats
8006  are correct.
8007 \end_layout
8008
8009 \begin_layout Enumerate
8010 Submit it.
8011 \end_layout
8012
8013 \begin_layout Subsection
8014 Comments On Specific Commands
8015 \end_layout
8016
8017 \begin_layout Standard
8018 I will not describe the detailed usage of the individual AASTeX commands:
8019  the AASTeX User Guide (
8020 \family typewriter
8021 aasguide.tex
8022 \family default
8023 ) gives a good description of each.
8024  Thus it's probably easiest for me to go down the list as found in the guide
8025  and offer comments where necessary.
8026  So let's begin \SpecialChar \ldots{}
8027
8028 \end_layout
8029
8030 \begin_layout Subsubsection
8031 Things that work as expected
8032 \end_layout
8033
8034 \begin_layout Standard
8035 Because they work as you might expect, I simply list them and the section
8036  they are found in: 
8037 \family typewriter
8038
8039 \backslash
8040 documentclass
8041 \family default
8042  (2.1.1), 
8043 \family typewriter
8044
8045 \backslash
8046 begin{document}
8047 \family default
8048  (2.2), 
8049 \family typewriter
8050
8051 \backslash
8052 title
8053 \family default
8054  (2.3), 
8055 \family typewriter
8056
8057 \backslash
8058 author
8059 \family default
8060  (2.3), 
8061 \family typewriter
8062
8063 \backslash
8064 affil
8065 \family default
8066  (2.3), 
8067 \family typewriter
8068
8069 \backslash
8070 abstract
8071 \family default
8072  (2.4), 
8073 \family typewriter
8074
8075 \backslash
8076 keywords
8077 \family default
8078  (2.5), 
8079 \family typewriter
8080
8081 \backslash
8082 section
8083 \family default
8084  (2.7), 
8085 \family typewriter
8086
8087 \backslash
8088 subsection
8089 \family default
8090  (2.7), 
8091 \family typewriter
8092
8093 \backslash
8094 subsubsection
8095 \family default
8096  (2.7), 
8097 \family typewriter
8098
8099 \backslash
8100 paragraph
8101 \family default
8102  (2.7), 
8103 \family typewriter
8104
8105 \backslash
8106 facility
8107 \family default
8108  (2.10), 
8109 \family typewriter
8110
8111 \backslash
8112 begin{displaymath}
8113 \family default
8114  (2.12), 
8115 \family typewriter
8116
8117 \backslash
8118 begin{equation}
8119 \family default
8120  (2.12), 
8121 \family typewriter
8122
8123 \backslash
8124 begin{eqnarray}
8125 \family default
8126  (2.12), 
8127 \family typewriter
8128
8129 \backslash
8130 begin{mathletters}
8131 \family default
8132  (2.12), 
8133 \family typewriter
8134
8135 \backslash
8136 begin{thebibliography}
8137 \family default
8138  (2.13.1), 
8139 \family typewriter
8140
8141 \backslash
8142 bibitem
8143 \family default
8144  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8145  graphicx figure commands (2.14.1), 
8146 \family typewriter
8147
8148 \backslash
8149 begin{table}
8150 \family default
8151  (2.15.4), 
8152 \family typewriter
8153
8154 \backslash
8155 begin{tabular}
8156 \family default
8157  (2.15.4), 
8158 \family typewriter
8159
8160 \backslash
8161 caption
8162 \family default
8163  (2.15.4), 
8164 \family typewriter
8165
8166 \backslash
8167 label
8168 \family default
8169  (2.15.4, amongst other places), 
8170 \family typewriter
8171
8172 \backslash
8173 tablerefs
8174 \family default
8175  (2.15.5), 
8176 \family typewriter
8177
8178 \backslash
8179 tablecomments
8180 \family default
8181  (2.15.5), 
8182 \family typewriter
8183
8184 \backslash
8185 url
8186 \family default
8187  (2.17.4), 
8188 \family typewriter
8189
8190 \backslash
8191 end{document}
8192 \family default
8193  (2.18).
8194 \end_layout
8195
8196 \begin_layout Standard
8197 The following style options also work correctly: 
8198 \family typewriter
8199 longabstract
8200 \family default
8201  (2.4), 
8202 \family typewriter
8203 preprint
8204 \family default
8205  (3.2.1), 
8206 \family typewriter
8207 preprint2
8208 \family default
8209  (3.2.2), 
8210 \family typewriter
8211 eqsecnum
8212 \family default
8213  (3.3), 
8214 \family typewriter
8215 flushrt
8216 \family default
8217  (3.4).
8218  Simply put them in the 
8219 \family sans
8220 Options
8221 \family default
8222  box in 
8223 \family sans
8224 Layout\SpecialChar \menuseparator
8225 Document
8226 \family default
8227 .
8228 \end_layout
8229
8230 \begin_layout Subsubsection
8231 Things that work, but require more comment
8232 \end_layout
8233
8234 \begin_layout Standard
8235 The following items work, but require a little more discussion:
8236 \end_layout
8237
8238 \begin_layout Itemize
8239 These items are reserved for use by the journal editors, but you can put
8240  them into the LaTeX preamble if you feel compelled to do so: 
8241 \family typewriter
8242
8243 \backslash
8244 received
8245 \family default
8246
8247 \family typewriter
8248
8249 \backslash
8250 revised
8251 \family default
8252
8253 \family typewriter
8254
8255 \backslash
8256 accepted
8257 \family default
8258
8259 \family typewriter
8260
8261 \backslash
8262 ccc
8263 \family default
8264
8265 \family typewriter
8266
8267 \backslash
8268 cpright
8269 \family default
8270  (all from 2.1.3)
8271 \end_layout
8272
8273 \begin_layout Itemize
8274 These items may be placed in the LaTeX preamble, and are included as blanks
8275  in the template file: 
8276 \family typewriter
8277
8278 \backslash
8279 slugcomment
8280 \family default
8281  (2.1.4), 
8282 \family typewriter
8283
8284 \backslash
8285 shorttitle
8286 \family default
8287  (2.1.5), 
8288 \family typewriter
8289
8290 \backslash
8291 shortauthors
8292 \family default
8293  (2.1.5)
8294 \end_layout
8295
8296 \begin_layout Itemize
8297
8298 \family typewriter
8299
8300 \backslash
8301 email
8302 \family default
8303  (2.3) – can only be used 
8304 \begin_inset Quotes eld
8305 \end_inset
8306
8307 standalone
8308 \begin_inset Quotes erd
8309 \end_inset
8310
8311 , not in the middle of a paragraph.
8312  Use TeX code if you need to embed it.
8313 \end_layout
8314
8315 \begin_layout Itemize
8316
8317 \family typewriter
8318
8319 \backslash
8320 and
8321 \family default
8322  (2.3) – will have extra {} after it.
8323  This should not cause an error.
8324 \end_layout
8325
8326 \begin_layout Itemize
8327
8328 \family typewriter
8329
8330 \backslash
8331 notetoeditor
8332 \family default
8333  (2.6) – can only be used 
8334 \begin_inset Quotes eld
8335 \end_inset
8336
8337 standalone
8338 \begin_inset Quotes erd
8339 \end_inset
8340
8341 , not in the middle of a paragraph.
8342  Use TeX code if you need to embed it.
8343 \end_layout
8344
8345 \begin_layout Itemize
8346
8347 \family typewriter
8348
8349 \backslash
8350 placetable
8351 \family default
8352  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8353  hand
8354 \end_layout
8355
8356 \begin_layout Itemize
8357
8358 \family typewriter
8359
8360 \backslash
8361 placefigure
8362 \family default
8363  (2.8) – same as for 
8364 \family typewriter
8365
8366 \backslash
8367 placetable
8368 \end_layout
8369
8370 \begin_layout Itemize
8371
8372 \family typewriter
8373
8374 \backslash
8375 acknowledgements
8376 \family default
8377  (2.9) – will have extra {} after it.
8378  This should not cause an error.
8379 \end_layout
8380
8381 \begin_layout Itemize
8382
8383 \family typewriter
8384
8385 \backslash
8386 appendix
8387 \family default
8388  (2.11) – will have extra {} after it.
8389  This should not cause an error.
8390 \end_layout
8391
8392 \begin_layout Itemize
8393
8394 \family typewriter
8395
8396 \backslash
8397 figcaption
8398 \family default
8399  (2.14.2) – you can insert an optional filename argument by placing the cursor
8400  at the beginning of the text and selecting 
8401 \family sans
8402 Insert\SpecialChar \menuseparator
8403 Short Title
8404 \family default
8405 .
8406  
8407 \begin_inset Quotes eld
8408 \end_inset
8409
8410 Short Title
8411 \begin_inset Quotes erd
8412 \end_inset
8413
8414  inserts an optional argument of the type needed by 
8415 \family typewriter
8416
8417 \backslash
8418 figcaption
8419 \family default
8420 .
8421  Hopefully it will be renamed someday.
8422 \end_layout
8423
8424 \begin_layout Itemize
8425
8426 \family typewriter
8427
8428 \backslash
8429 objectname
8430 \family default
8431  (2.17.1) – same as 
8432 \family typewriter
8433
8434 \backslash
8435 figcaption
8436 \family default
8437  for the catalog ID optional parameter
8438 \end_layout
8439
8440 \begin_layout Itemize
8441
8442 \family typewriter
8443
8444 \backslash
8445 dataset
8446 \family default
8447  (2.17.1) – same as 
8448 \family typewriter
8449
8450 \backslash
8451 figcaption
8452 \family default
8453  for the catalog ID optional parameter
8454 \end_layout
8455
8456 \begin_layout Subsubsection
8457 Things not implemented, use TeX code
8458 \end_layout
8459
8460 \begin_layout Standard
8461
8462 \family typewriter
8463
8464 \backslash
8465 altaffilmark
8466 \family default
8467  (2.3), 
8468 \family typewriter
8469
8470 \backslash
8471 altaffiltext
8472 \family default
8473  (2.3), 
8474 \family typewriter
8475
8476 \backslash
8477 eqnum
8478 \family default
8479  (2.12), 
8480 \family typewriter
8481
8482 \backslash
8483 setcounter{equation}
8484 \family default
8485  (2.12), Journal name abbreviations (2.13.4), 
8486 \family typewriter
8487
8488 \backslash
8489 figurenum
8490 \family default
8491  (2.14.1), 
8492 \family typewriter
8493
8494 \backslash
8495 epsscale
8496 \family default
8497  (2.14.1), 
8498 \family typewriter
8499
8500 \backslash
8501 plotone
8502 \family default
8503  (2.14.1), 
8504 \family typewriter
8505
8506 \backslash
8507 plottwo
8508 \family default
8509  (2.14.1), 
8510 \family typewriter
8511
8512 \backslash
8513 tablenum
8514 \family default
8515  (2.15.4), 
8516 \family typewriter
8517
8518 \backslash
8519 tableline
8520 \family default
8521  (2.15.4, insert it as the first element in the lefthand cell after where
8522  you want it.
8523  Don't use any of LyX's rules in the table), 
8524 \family typewriter
8525
8526 \backslash
8527 tablenotemark
8528 \family default
8529  (2.15.5), 
8530 \family typewriter
8531
8532 \backslash
8533 tablenotetext
8534 \family default
8535  (2.15.5), much of Misc (2.17, except 
8536 \family typewriter
8537
8538 \backslash
8539 objectname
8540 \family default
8541
8542 \family typewriter
8543
8544 \backslash
8545 dataset
8546 \family default
8547
8548 \family typewriter
8549
8550 \backslash
8551 url
8552 \family default
8553 , and 
8554 \family typewriter
8555
8556 \backslash
8557 email
8558 \family default
8559 ; see above), 
8560 \family typewriter
8561
8562 \backslash
8563 singlespace
8564 \family default
8565  (3.1), 
8566 \family typewriter
8567
8568 \backslash
8569 doublespace
8570 \family default
8571  (3.1), 
8572 \family typewriter
8573
8574 \backslash
8575 onecolumn
8576 \family default
8577  (3.2), 
8578 \family typewriter
8579
8580 \backslash
8581 twocolumn
8582 \family default
8583  (3.2)
8584 \end_layout
8585
8586 \begin_layout Subsubsection
8587 Things that cannot be implemented
8588 \end_layout
8589
8590 \begin_layout Standard
8591 \SpecialChar \ldots{}
8592  at least in any meaningful sort of way, so I suggest ignoring them.
8593  They are the references environment (2.13.3), and the deluxetable environment
8594  (2.15).
8595  If you really, really need to use deluxetable, I suggest editing it in
8596  a separate file with a text editor, then using 
8597 \family sans
8598 Insert\SpecialChar \menuseparator
8599 Child
8600 \begin_inset space ~
8601 \end_inset
8602
8603 Document
8604 \family default
8605  to include it in your LyX document.
8606  See the 
8607 \family typewriter
8608 aas_sample.lyx
8609 \family default
8610  file to see an example of this.
8611 \end_layout
8612
8613 \begin_layout Subsection
8614 FAQs, Tips, Tricks, and Other Ruminations
8615 \end_layout
8616
8617 \begin_layout Subsubsection
8618 Getting LyX and AASTeX to cooperate
8619 \end_layout
8620
8621 \begin_layout Standard
8622 It can be a bit tricky to get LyX to recognize a new layout and document
8623  class.
8624  When all else fails, do this:
8625 \end_layout
8626
8627 \begin_layout Enumerate
8628 Make certain that LaTeX can find AASTeX.
8629  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8630  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8631 \family typewriter
8632 sample.tex
8633 \family default
8634 .
8635 \end_layout
8636
8637 \begin_layout Enumerate
8638 Make certain that 
8639 \family typewriter
8640 aastex.layout
8641 \family default
8642  appears in LyX's 
8643 \family typewriter
8644 layouts
8645 \family default
8646  folder
8647 \end_layout
8648
8649 \begin_layout Enumerate
8650 Rerun 
8651 \family sans
8652 Tools\SpecialChar \menuseparator
8653 Reconfigure
8654 \family default
8655  in LyX, then restart LyX.
8656 \end_layout
8657
8658 \begin_layout Enumerate
8659 Open a regular new file, not from a template.
8660  Does AASTeX appear in the class list in 
8661 \family sans
8662 Document\SpecialChar \menuseparator
8663 Settings
8664 \family default
8665 ?
8666 \end_layout
8667
8668 \begin_layout Standard
8669 If you get a warning from an existing AASTeX document about not being able
8670  to find the AASTeX layout or a message about 
8671 \begin_inset Quotes eld
8672 \end_inset
8673
8674 You should not mix title layouts with normal ones
8675 \begin_inset Quotes erd
8676 \end_inset
8677
8678 , things haven't been installed correctly.
8679 \end_layout
8680
8681 \begin_layout Subsubsection
8682 LaTeX error processing a table 
8683 \end_layout
8684
8685 \begin_layout Standard
8686 LyX, by default, attempts to center the table caption/title.
8687  This seems to produce a bad interaction in AASTeX so you should click somewhere
8688  in the caption/title, then select 
8689 \family sans
8690 Edit\SpecialChar \menuseparator
8691 Paragraph
8692 \begin_inset space ~
8693 \end_inset
8694
8695 Settings
8696 \family default
8697 , then set the 
8698 \family sans
8699 Alignment
8700 \family default
8701  to 
8702 \family sans
8703 Block
8704 \family default
8705 .
8706  This took care of it for me.
8707 \end_layout
8708
8709 \begin_layout Subsubsection
8710 References
8711 \end_layout
8712
8713 \begin_layout Standard
8714 A couple of things: 1) I have noticed some funny spacing in the reference
8715  entries in the text.
8716  When you enter the bibliography item data, make sure their is 
8717 \emph on
8718 no
8719 \emph default
8720  space between the last author and the parenthesis setting off the year;
8721  
8722 \emph on
8723 e.
8724 \begin_inset space \thinspace{}
8725 \end_inset
8726
8727 g.
8728 \begin_inset space \space{}
8729 \end_inset
8730
8731
8732 \emph default
8733 type 
8734 \family typewriter
8735 Ressler(1992)
8736 \family default
8737 , not 
8738 \family typewriter
8739 Ressler (1992)
8740 \family default
8741 .
8742  2) Entering the references at all is not obvious.
8743  The easiest thing is to start typing your first reference at the end of
8744  the document, then mark it as type 
8745 \family sans
8746 References
8747 \family default
8748 .
8749  That will put a small gray box in front of what you just typed.
8750  Click on the box to fill in the rest of the information.
8751  For new references, go to the end of an existing reference and press return.
8752  That will create a new line with its own box, etc.
8753 \end_layout
8754
8755 \begin_layout Subsubsection
8756 Including EPS files
8757 \end_layout
8758
8759 \begin_layout Standard
8760 Even though AASTeX provides its own figure commands (
8761 \family typewriter
8762
8763 \backslash
8764 plotone
8765 \family default
8766 , for example), I much prefer LaTeX's standard figure commands (with the
8767  default graphicx).
8768  You can insert the 
8769 \family typewriter
8770
8771 \backslash
8772 plotone
8773 \family default
8774 , etc.
8775 \begin_inset space ~
8776 \end_inset
8777
8778 commands as TeX code into a Figure Float box if you desire, but I never
8779  have much luck getting the layout right.
8780  With the standard graphics, LyX will insert a 
8781 \family typewriter
8782
8783 \backslash
8784 usepackage{graphicx}
8785 \family default
8786  command into the LaTeX preamble and handle the figures in the standard
8787  LaTeX2e way, interspersing the figures in the text.
8788  I believe ApJ accepts figures exactly this way now; AJ might still use
8789  the 
8790 \begin_inset Quotes eld
8791 \end_inset
8792
8793 stack everything at the end
8794 \begin_inset Quotes erd
8795 \end_inset
8796
8797  technique.
8798 \end_layout
8799
8800 \begin_layout Subsubsection
8801 Things I could have done, but didn't
8802 \end_layout
8803
8804 \begin_layout Standard
8805 There are a few 
8806 \begin_inset Quotes eld
8807 \end_inset
8808
8809 pretty
8810 \begin_inset Quotes erd
8811 \end_inset
8812
8813  things I could have implemented, but chose not to.
8814  For instance, I saw no point in double-spacing the text in the LyX window,
8815  even though it is double-spaced in the paper manuscript.
8816  Also, I chose not to make separate layouts for the preprint and preprint2
8817  styles.
8818  Since I assume you will spend most of your time in the plain manuscript
8819  mode anyway, I decided not to chew up more disk space with this.
8820  
8821 \end_layout
8822
8823 \begin_layout Subsection
8824 Final Caveat
8825 \end_layout
8826
8827 \begin_layout Standard
8828 Your mileage may vary.
8829  I've now had papers published by both ApJ and AJ that have had 98% of the
8830  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8831  cleanups.
8832  I have had no trouble with the submission process, and I'm sure the journals
8833  were never aware that there might be a difference.
8834  So, go forth and publish!
8835 \end_layout
8836
8837 \begin_layout Section
8838 AMS LaTeX
8839 \end_layout
8840
8841 \begin_layout Standard
8842 by 
8843 \noun on
8844 David Johnson
8845 \noun default
8846 ; updated by 
8847 \noun on
8848 Richard Heck
8849 \end_layout
8850
8851 \begin_layout Standard
8852 \begin_inset VSpace bigskip
8853 \end_inset
8854
8855
8856 \end_layout
8857
8858 \begin_layout Standard
8859 \noindent
8860 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8861  papers to be submitted to American Mathematical Society publications.
8862  The layouts are not tailored to a specific journal, but easily can be.
8863  You should refer to the AMS documentation for specific instructions for
8864  each journal (usually it will entail only changing a single line in the
8865  TeX output).
8866  That documentation is available on the Web at 
8867 \begin_inset Flex URL
8868 status open
8869
8870 \begin_layout Plain Layout
8871
8872 http://www.ams.org
8873 \end_layout
8874
8875 \end_inset
8876
8877  or by ftp at 
8878 \begin_inset Flex URL
8879 status open
8880
8881 \begin_layout Plain Layout
8882
8883 ftp://ftp.ams.org/pub/tex/amslatex/
8884 \end_layout
8885
8886 \end_inset
8887
8888 .
8889  These layouts are appropriate, and useful, for any mathematical writing.
8890  
8891 \end_layout
8892
8893 \begin_layout Standard
8894 There are two basic AMS LaTeX layouts: 
8895 \end_layout
8896
8897 \begin_layout Itemize
8898 amsart: The standard AMS article format.
8899 \end_layout
8900
8901 \begin_layout Itemize
8902 amsbook: the standard AMS book (really, monograph) format.
8903  
8904 \end_layout
8905
8906 \begin_layout Standard
8907 The layouts themselves contain only the minimum necessary to use the AMS
8908  classes.
8909  They do not, in particular, contain any of the `theorem' environments used
8910  for setting theorems, lemmas, and the like.
8911  These are contained, instead, in the 
8912 \begin_inset Flex Code
8913 status collapsed
8914
8915 \begin_layout Plain Layout
8916 Theorems (AMS)
8917 \end_layout
8918
8919 \end_inset
8920
8921  module, which is loaded by default when when you select one of the AMS
8922  classes.
8923  (It can also be used with other classes and can be removed, if you would
8924  rather use something else.) Less commonly used environments are in the 
8925 \begin_inset Flex Code
8926 status collapsed
8927
8928 \begin_layout Plain Layout
8929 Theorems (AMS-Extended)
8930 \end_layout
8931
8932 \end_inset
8933
8934  module, which must be loaded manually.
8935 \end_layout
8936
8937 \begin_layout Standard
8938 By default, theorems and the like are numbered consecutively throughout
8939  the document, but this may be modified by loading the module 
8940 \begin_inset Flex Code
8941 status collapsed
8942
8943 \begin_layout Plain Layout
8944 Theorems (Order by Section)
8945 \end_layout
8946
8947 \end_inset
8948
8949  or, if you are using 
8950 \begin_inset Flex Code
8951 status collapsed
8952
8953 \begin_layout Plain Layout
8954 book (AMS)
8955 \end_layout
8956
8957 \end_inset
8958
8959 , the module 
8960 \begin_inset Flex Code
8961 status collapsed
8962
8963 \begin_layout Plain Layout
8964 Theorems (Order by Chapter)
8965 \end_layout
8966
8967 \end_inset
8968
8969 .
8970  These will number the results as 
8971 \begin_inset Formula $n.m$
8972 \end_inset
8973
8974 , where the first number refers to the section (or chapter) and the second
8975  refers to the total number of results so far in that section (or chapter).
8976  Many environments are also available unnumbered.
8977  These are indicated by an asterisk at the end.
8978  If you happen to want 
8979 \emph on
8980 only
8981 \emph default
8982  unnumbered results, the module 
8983 \begin_inset Flex Code
8984 status collapsed
8985
8986 \begin_layout Plain Layout
8987 Theorems (Starred)
8988 \end_layout
8989
8990 \end_inset
8991
8992  provides that option.
8993 \end_layout
8994
8995 \begin_layout Standard
8996 Note that these modules do not 
8997 \emph on
8998 have
8999 \emph default
9000  to be used with the AMS classes.
9001  It is perfectly possible to use the 
9002 \begin_inset Flex Code
9003 status collapsed
9004
9005 \begin_layout Plain Layout
9006 Theorems (AMS)
9007 \end_layout
9008
9009 \end_inset
9010
9011  module, and the others mentioned, with other classes, such as 
9012 \begin_inset Flex Code
9013 status collapsed
9014
9015 \begin_layout Plain Layout
9016 article
9017 \end_layout
9018
9019 \end_inset
9020
9021
9022 \begin_inset Flex Code
9023 status collapsed
9024
9025 \begin_layout Plain Layout
9026 report
9027 \end_layout
9028
9029 \end_inset
9030
9031
9032 \begin_inset Flex Code
9033 status collapsed
9034
9035 \begin_layout Plain Layout
9036 book (KOMA-script)
9037 \end_layout
9038
9039 \end_inset
9040
9041 , and so forth.
9042 \end_layout
9043
9044 \begin_layout Subsection
9045 What these layouts provide
9046 \end_layout
9047
9048 \begin_layout Standard
9049 There is a long list of included environments provided by these layouts.
9050  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9051  variety of `theorem' environments.
9052  However, the AMS recommends the environments that are available in LyX.
9053  
9054 \end_layout
9055
9056 \begin_layout Standard
9057 The following environments—as well as the standard environments, such as
9058  
9059 \begin_inset Flex Noun
9060 status collapsed
9061
9062 \begin_layout Plain Layout
9063 section
9064 \end_layout
9065
9066 \end_inset
9067
9068
9069 \begin_inset Flex Noun
9070 status collapsed
9071
9072 \begin_layout Plain Layout
9073 bibliography
9074 \end_layout
9075
9076 \end_inset
9077
9078
9079 \begin_inset Flex Noun
9080 status collapsed
9081
9082 \begin_layout Plain Layout
9083 title
9084 \end_layout
9085
9086 \end_inset
9087
9088
9089 \begin_inset Flex Noun
9090 status collapsed
9091
9092 \begin_layout Plain Layout
9093 author
9094 \end_layout
9095
9096 \end_inset
9097
9098 , and 
9099 \begin_inset Flex Noun
9100 status collapsed
9101
9102 \begin_layout Plain Layout
9103 date
9104 \end_layout
9105
9106 \end_inset
9107
9108 —are provided by 
9109 \begin_inset Flex Code
9110 status collapsed
9111
9112 \begin_layout Plain Layout
9113 article (AMS)
9114 \end_layout
9115
9116 \end_inset
9117
9118  and 
9119 \begin_inset Flex Code
9120 status collapsed
9121
9122 \begin_layout Plain Layout
9123 book (AMS)
9124 \end_layout
9125
9126 \end_inset
9127
9128 :
9129 \end_layout
9130
9131 \begin_layout Description
9132 Address This should be the author's permanent address.
9133 \end_layout
9134
9135 \begin_layout Description
9136 Current
9137 \begin_inset space ~
9138 \end_inset
9139
9140 Address This should be the author's temporary address at the time of submission,
9141  if different from the Address.
9142 \end_layout
9143
9144 \begin_layout Description
9145 Email Author's e-mail address
9146 \end_layout
9147
9148 \begin_layout Description
9149 URL Author's Web address, if desired.
9150 \end_layout
9151
9152 \begin_layout Description
9153 Keywords Key words or phrases used to identify specific topics discussed
9154  in the paper.
9155 \end_layout
9156
9157 \begin_layout Description
9158 Subjectclass These refer to the AMS Subject Classifications, published and
9159  described in 
9160 \emph on
9161 Mathematical Reviews
9162 \emph default
9163 .
9164  These are also available online at the AMS cites listed above.
9165 \end_layout
9166
9167 \begin_layout Description
9168 Thanks
9169 \end_layout
9170
9171 \begin_layout Description
9172 Dedicatory
9173 \end_layout
9174
9175 \begin_layout Description
9176 Translator
9177 \end_layout
9178
9179 \begin_layout Standard
9180 The following environments are provided by both the 
9181 \begin_inset Flex Code
9182 status collapsed
9183
9184 \begin_layout Plain Layout
9185 Theorems
9186 \end_layout
9187
9188 \end_inset
9189
9190  and 
9191 \begin_inset Flex Code
9192 status collapsed
9193
9194 \begin_layout Plain Layout
9195 Theorems (AMS)
9196 \end_layout
9197
9198 \end_inset
9199
9200  modules, in the latter case in both starred (unnumbered) and unstarred
9201  (numbered) versions.
9202  These same environments are provided only in the starred versions by the
9203  
9204 \begin_inset Flex Code
9205 status collapsed
9206
9207 \begin_layout Plain Layout
9208 Theorems (Starred)
9209 \end_layout
9210
9211 \end_inset
9212
9213  module:
9214 \end_layout
9215
9216 \begin_layout Theorem
9217 This is typically used for the statements of major results.
9218  
9219 \end_layout
9220
9221 \begin_layout Corollary*
9222 This is used for statements which follow fairly directly from previous statement
9223 s.
9224  Again, these can be major results.
9225  
9226 \end_layout
9227
9228 \begin_layout Lemma
9229 These are smaller results needed to prove other statements.
9230 \end_layout
9231
9232 \begin_layout Proposition
9233 These are less major results which (hopefully) add to the general theory
9234  being discussed.
9235 \end_layout
9236
9237 \begin_layout Conjecture
9238 These are statements provided without justification, which the author does
9239  not know how to prove, but which seem to be true (to the author, at least).
9240 \end_layout
9241
9242 \begin_layout Definition*
9243 Guess what this is for.
9244  The font is different for this environment than for the previous ones.
9245  
9246 \end_layout
9247
9248 \begin_layout Example*
9249 Used for examples illustrating proven results.
9250 \end_layout
9251
9252 \begin_layout Problem
9253 It's not really known what this is for.
9254  You should figure it out.
9255 \end_layout
9256
9257 \begin_layout Exercise*
9258 Write a description for this one.
9259 \end_layout
9260
9261 \begin_layout Remark
9262 This environment is also a type of theorem, usually a lesser sort of observation.
9263 \end_layout
9264
9265 \begin_layout Claim*
9266 Often used in the course of giving a proof of a larger result.
9267 \end_layout
9268
9269 \begin_layout Case
9270 Generally, these are used to break up long arguments, using specific instances
9271  of some condition.
9272  
9273 \end_layout
9274
9275 \begin_layout Case
9276 The numbering scheme for cases is on its own, not together with other numbered
9277  statements.
9278  
9279 \end_layout
9280
9281 \begin_layout Proof
9282 At the end of this environment, a QED symbol (usually a square, but it can
9283  vary with different styles) is placed.
9284  If you want to have other environments within this one—for example, Case
9285  environments—and have the QED symbol appear only after them, then the other
9286  environments need to be nested within the proof environment.
9287  See the section 
9288 \emph on
9289 Nesting Environments
9290 \emph default
9291  of the 
9292 \emph on
9293 User's Guide
9294 \emph default
9295  for information on nesting.
9296 \end_layout
9297
9298 \begin_layout Standard
9299 And these environments are provided by 
9300 \begin_inset Flex Code
9301 status collapsed
9302
9303 \begin_layout Plain Layout
9304 Theorems (AMS-Extended)
9305 \end_layout
9306
9307 \end_inset
9308
9309 :
9310 \end_layout
9311
9312 \begin_layout Criterion*
9313 A required condition.
9314 \end_layout
9315
9316 \begin_layout Algorithm*
9317 A general procedure to be used.
9318 \end_layout
9319
9320 \begin_layout Axiom*
9321 This is a property or statement taken as true within the system being discussed.
9322 \end_layout
9323
9324 \begin_layout Condition*
9325 Sometimes used to state a condition assumed within the present context of
9326  discussion.
9327 \end_layout
9328
9329 \begin_layout Note*
9330 Similar to a Remark.
9331 \end_layout
9332
9333 \begin_layout Notation*
9334 Used for the explanation of, yes, notation.
9335 \end_layout
9336
9337 \begin_layout Summary
9338 Do we really need to tell you? 
9339 \end_layout
9340
9341 \begin_layout Acknowledgement*
9342 Acknowledgement.
9343 \end_layout
9344
9345 \begin_layout Conclusion*
9346 Sometimes used at the end of a long train of argument.
9347 \end_layout
9348
9349 \begin_layout Fact
9350 Used in a way similar to Proposition, though perhaps lower on the scale.
9351 \end_layout
9352
9353 \begin_layout Standard
9354 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9355  fonts packages.
9356  They need to be available on your system in order to use these environments.
9357 \end_layout
9358
9359 \begin_layout Section
9360 AGU journals (
9361 \family sans
9362 aguplus
9363 \family default
9364 )
9365 \end_layout
9366
9367 \begin_layout Standard
9368 by 
9369 \shape smallcaps
9370 Martin Vermeer
9371 \end_layout
9372
9373 \begin_layout Subsection
9374 Description
9375 \end_layout
9376
9377 \begin_layout Standard
9378 These are the layout files for some of the journals of the American Geophysical
9379  Society.
9380  It is assumed that you have both the AGU's own class files and AGUplus
9381  installed (everything to be found at
9382 \begin_inset Flex URL
9383 status collapsed
9384
9385 \begin_layout Plain Layout
9386
9387 ftp://ftp.agu.org/journals/latex/journals
9388 \end_layout
9389
9390 \end_inset
9391
9392 ).
9393 \end_layout
9394
9395 \begin_layout Subsection
9396 New styles
9397 \end_layout
9398
9399 \begin_layout Standard
9400 Redefined are 
9401 \family sans
9402 Paragraph
9403 \family default
9404
9405 \family sans
9406 Paragraph*
9407 \family default
9408 .
9409  They are still called this in the LyX GUI, though their LaTeX equivalents
9410  in the AGU classes are 
9411 \family sans
9412 Subsubsubsection
9413 \family default
9414  and 
9415 \family sans
9416 Subsubsubsection*
9417 \family default
9418 .
9419 \end_layout
9420
9421 \begin_layout Standard
9422 Newly defined styles are 
9423 \family sans
9424 Left_Header
9425 \family default
9426
9427 \family sans
9428 Right_Header
9429 \family default
9430
9431 \family sans
9432 Received
9433 \family default
9434
9435 \family sans
9436 Revised
9437 \family default
9438
9439 \family sans
9440 Accepted
9441 \family default
9442
9443 \family sans
9444 CCC
9445 \family default
9446
9447 \family sans
9448 PaperId
9449 \family default
9450
9451 \family sans
9452 AuthorAddr
9453 \family default
9454
9455 \family sans
9456 SlugComment
9457 \family default
9458 .
9459  These are mostly manuscript attributes and defined in the AGU class documentati
9460 on.
9461 \end_layout
9462
9463 \begin_layout Standard
9464 I suspect this is still badly incomplete.
9465 \end_layout
9466
9467 \begin_layout Subsection
9468 New floats
9469 \end_layout
9470
9471 \begin_layout Standard
9472
9473 \family sans
9474 Planotable
9475 \family default
9476  and 
9477 \family sans
9478 Plate
9479 \family default
9480 .
9481  We also have a new 
9482 \family sans
9483 Table_Caption
9484 \family default
9485 .
9486 \end_layout
9487
9488 \begin_layout Subsection
9489 Supported journals
9490 \end_layout
9491
9492 \begin_layout Itemize
9493
9494 \emph on
9495 Journal of Geophysical Research
9496 \emph default
9497
9498 \family typewriter
9499 jgrga.layout
9500 \family default
9501  — Martin Vermeer
9502 \end_layout
9503
9504 \begin_layout Standard
9505 Add your own, it isn't so hard! Look at the 
9506 \family typewriter
9507 jgrga.layout
9508 \family default
9509  example and 
9510 \family typewriter
9511 aguplus.inc
9512 \family default
9513 .
9514 \end_layout
9515
9516 \begin_layout Subsection
9517 Bugs and things to remember
9518 \end_layout
9519
9520 \begin_layout Standard
9521 In order to use the new layouts, you must remember to do the following for
9522  a new document:
9523 \end_layout
9524
9525 \begin_layout Enumerate
9526
9527 \emph on
9528 Turn off babel
9529 \emph default
9530 .
9531  This can be done in the 
9532 \family sans
9533 Layout\SpecialChar \menuseparator
9534 Document
9535 \family default
9536  or 
9537 \family sans
9538 Document\SpecialChar \menuseparator
9539 Settings
9540 \family default
9541  menu item.
9542  (AGU articles are always in English, right? So 
9543 \emph on
9544 don't
9545 \emph default
9546  choose a language.)
9547 \end_layout
9548
9549 \begin_layout Enumerate
9550 Enter 
9551 \family typewriter
9552 jgrga
9553 \family default
9554  into the document's 
9555 \family sans
9556 Extra Options
9557 \family default
9558  field.
9559  (Yes, this is a bug.)
9560 \end_layout
9561
9562 \begin_layout Enumerate
9563 Make sure you use the 
9564 \family typewriter
9565 agu.bst
9566 \family default
9567  bibliography style, by entering 
9568 \family sans
9569 agu
9570 \family default
9571  into the second field of the BibTeX inset.
9572  None of the standard styles will do.
9573 \end_layout
9574
9575 \begin_layout Section
9576 Broadway
9577 \end_layout
9578
9579 \begin_layout Standard
9580 by 
9581 \shape smallcaps
9582 Garst Reese
9583 \end_layout
9584
9585 \begin_layout Subsection
9586 Introduction
9587 \end_layout
9588
9589 \begin_layout Standard
9590 Broadway is for writing plays.
9591  The format is more decorative than Hollywood, and much less standardized.
9592  This format should be suitable for workshops.
9593 \end_layout
9594
9595 \begin_layout Subsection
9596 Special problems
9597 \end_layout
9598
9599 \begin_layout Standard
9600 The same as in Hollywood.
9601 \end_layout
9602
9603 \begin_layout Subsection
9604 Special features
9605 \end_layout
9606
9607 \begin_layout Standard
9608 Insert the 
9609 \family sans
9610 Speaker
9611 \family default
9612  names as labels then cross-reference the label to insert the name.
9613  The cross-reference dialog will show the current cast of characters.
9614 \end_layout
9615
9616 \begin_layout Subsection
9617 Paper size and Margins
9618 \end_layout
9619
9620 \begin_layout Standard
9621 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9622 \end_layout
9623
9624 \begin_layout Subsection
9625 Environments
9626 \end_layout
9627
9628 \begin_layout Standard
9629 The following environments are available.
9630  You can use broadway.bind to get the bind keys shown at the right.
9631 \end_layout
9632
9633 \begin_layout Itemize
9634
9635 \family sans
9636 Standard
9637 \begin_inset Newline newline
9638 \end_inset
9639
9640
9641 \family default
9642 You should not have to use this, but it is here for anything that does not
9643  fit otherwise.
9644 \end_layout
9645
9646 \begin_layout Itemize
9647
9648 \family sans
9649 Narrative
9650 \begin_inset space \hfill{}
9651 \end_inset
9652
9653 M-z n
9654 \begin_inset Newline newline
9655 \end_inset
9656
9657
9658 \family default
9659 Used to describe stage setting and the action.
9660  First use of speaker names in all CAPs.
9661 \end_layout
9662
9663 \begin_layout Itemize
9664
9665 \family sans
9666 ACT
9667 \begin_inset space \hfill{}
9668 \end_inset
9669
9670 M-z a
9671 \begin_inset Newline newline
9672 \end_inset
9673
9674
9675 \family default
9676 Automatically numbered.
9677  On screen it will be arabic, but will print as Roman.
9678 \end_layout
9679
9680 \begin_layout Itemize
9681
9682 \family sans
9683 ACT*
9684 \begin_inset space \hfill{}
9685 \end_inset
9686
9687 M-z S at
9688 \begin_inset Newline newline
9689 \end_inset
9690
9691
9692 \family default
9693 Subtitle for 
9694 \family sans
9695 ACT.
9696
9697 \family default
9698  It is just centered text.
9699 \end_layout
9700
9701 \begin_layout Itemize
9702
9703 \family sans
9704 SCENE
9705 \begin_inset space \hfill{}
9706 \end_inset
9707
9708 M-z S-S
9709 \begin_inset Newline newline
9710 \end_inset
9711
9712
9713 \family default
9714 Not automatically numbered.
9715  You supply the number.
9716  This is because I couldn't figure out how.
9717 \end_layout
9718
9719 \begin_layout Itemize
9720
9721 \family sans
9722 AT_RISE:
9723 \begin_inset space \hfill{}
9724 \end_inset
9725
9726 M-z S-R
9727 \begin_inset Newline newline
9728 \end_inset
9729
9730
9731 \family default
9732 A special case of Narrative to describe the setting and action as the curtain
9733  rises.
9734 \end_layout
9735
9736 \begin_layout Itemize
9737
9738 \family sans
9739 Speaker
9740 \begin_inset space \hfill{}
9741 \end_inset
9742
9743 M-z s
9744 \begin_inset Newline newline
9745 \end_inset
9746
9747
9748 \family default
9749 The speaker's (actor's) title, centered in all CAPS.
9750 \end_layout
9751
9752 \begin_layout Itemize
9753
9754 \family sans
9755 Parenthetical
9756 \begin_inset space \hfill{}
9757 \end_inset
9758
9759 M-z p
9760 \begin_inset Newline newline
9761 \end_inset
9762
9763
9764 \family default
9765 Instructions to the speaker.
9766  The parentheses are automatically inserted.
9767  The ( will appear on screen, but both will be in the printed play.
9768  This environment is only used within 
9769 \family sans
9770 Dialogue
9771 \family default
9772 .
9773 \end_layout
9774
9775 \begin_layout Itemize
9776
9777 \family sans
9778 Dialogue
9779 \begin_inset space \hfill{}
9780 \end_inset
9781
9782 M-z d
9783 \begin_inset Newline newline
9784 \end_inset
9785
9786
9787 \family default
9788 What the Speaker says.
9789 \end_layout
9790
9791 \begin_layout Itemize
9792
9793 \family sans
9794 CURTAIN
9795 \begin_inset space \hfill{}
9796 \end_inset
9797
9798 M-z S-C
9799 \begin_inset Newline newline
9800 \end_inset
9801
9802
9803 \family default
9804 The curtain comes down.
9805 \end_layout
9806
9807 \begin_layout Itemize
9808
9809 \family sans
9810 Title
9811 \begin_inset space \hfill{}
9812 \end_inset
9813
9814 M-z S-T
9815 \end_layout
9816
9817 \begin_layout Itemize
9818
9819 \family sans
9820 Author
9821 \begin_inset space \hfill{}
9822 \end_inset
9823
9824 M-z S-A
9825 \end_layout
9826
9827 \begin_layout Itemize
9828
9829 \family sans
9830 Right_Address
9831 \begin_inset space \hfill{}
9832 \end_inset
9833
9834 M-z r
9835 \end_layout
9836
9837 \begin_layout Standard
9838 Hello there.
9839 \end_layout
9840
9841 \begin_layout Section
9842 Dinbrief
9843 \end_layout
9844
9845 \begin_layout Standard
9846 The document class 
9847 \family sans
9848 dinbrief
9849 \family default
9850  can be used to type letters according to German conventions.
9851  A template file is included in 
9852 \family typewriter
9853 .../lyx/share/templates
9854 \family default
9855  for you to use as a starting point.
9856 \end_layout
9857
9858 \begin_layout Section
9859 EGS journals (
9860 \family sans
9861 egs
9862 \family default
9863 )
9864 \end_layout
9865
9866 \begin_layout Standard
9867 by 
9868 \shape smallcaps
9869 Martin Vermeer
9870 \end_layout
9871
9872 \begin_layout Subsection
9873 Description
9874 \end_layout
9875
9876 \begin_layout Standard
9877 This is the layout file for the European Geophysical Society journals.
9878  The needed 
9879 \family typewriter
9880 egs.cls
9881 \family default
9882  can be downloaded from the web site of the EGS under 
9883 \begin_inset Flex URL
9884 status collapsed
9885
9886 \begin_layout Plain Layout
9887
9888 www.copernicus.org
9889 \end_layout
9890
9891 \end_inset
9892
9893 .
9894 \end_layout
9895
9896 \begin_layout Subsection
9897 New styles
9898 \end_layout
9899
9900 \begin_layout Standard
9901
9902 \family sans
9903 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9904  Accepted
9905 \family default
9906
9907 \family sans
9908 Offsets
9909 \family default
9910 .
9911  The current layout file is unfortunately very unmodular and would benefit
9912  from using the various 
9913 \family typewriter
9914 std*.inc
9915 \family default
9916  file inclusions.
9917 \end_layout
9918
9919 \begin_layout Section
9920 Elsevier Journals
9921 \end_layout
9922
9923 \begin_layout Standard
9924 See the LyX template file 
9925 \family typewriter
9926 elsarticle.lyx
9927 \family default
9928 .
9929  It contains all infos you need.
9930 \end_layout
9931
9932 \begin_layout Section
9933 Foils [aka 
9934 \family sans
9935 FoilTeX
9936 \family default
9937 ]
9938 \begin_inset CommandInset label
9939 LatexCommand label
9940 name "sec:foiltex"
9941
9942 \end_inset
9943
9944
9945 \end_layout
9946
9947 \begin_layout Standard
9948 by 
9949 \noun on
9950 Allan Rae
9951 \end_layout
9952
9953 \begin_layout Subsection
9954 Introduction
9955 \end_layout
9956
9957 \begin_layout Standard
9958 This section describes how to use LyX to make slides for overhead projectors.
9959  There are two document classes that can do this: the default slides class
9960  and the 
9961 \family sans
9962 FoilTeX
9963 \family default
9964  slides class.
9965  This section documents the latter.
9966 \end_layout
9967
9968 \begin_layout Standard
9969 I'm going to say this again, nice and clear, so that there's no misunderstanding
9970 :
9971 \end_layout
9972
9973 \begin_layout Standard
9974 \begin_inset VSpace bigskip
9975 \end_inset
9976
9977
9978 \end_layout
9979
9980 \begin_layout Standard
9981 \align center
9982
9983 \size large
9984 This section documents the class 
9985 \begin_inset Quotes eld
9986 \end_inset
9987
9988
9989 \family sans
9990 slides (FoilTeX)
9991 \family default
9992
9993 \begin_inset Quotes erd
9994 \end_inset
9995
9996  
9997 \emph on
9998 only.
9999 \end_layout
10000
10001 \begin_layout Standard
10002 \begin_inset VSpace bigskip
10003 \end_inset
10004
10005
10006 \end_layout
10007
10008 \begin_layout Standard
10009 If you're looking for the documentation for 
10010 \begin_inset Quotes eld
10011 \end_inset
10012
10013
10014 \family sans
10015 slides (default)
10016 \family default
10017
10018 \begin_inset Quotes erd
10019 \end_inset
10020
10021 , check out section
10022 \begin_inset space ~
10023 \end_inset
10024
10025
10026 \begin_inset CommandInset ref
10027 LatexCommand ref
10028 reference "sec:slitex"
10029
10030 \end_inset
10031
10032 .
10033  If your machine doesn't have the 
10034 \family sans
10035 foils
10036 \family default
10037  class [
10038 \begin_inset Quotes eld
10039 \end_inset
10040
10041
10042 \family sans
10043 slides (FoilTeX)
10044 \family default
10045
10046 \begin_inset Quotes erd
10047 \end_inset
10048
10049 ] installed, you'll probably have to use the default 
10050 \family sans
10051 slides
10052 \family default
10053  class, which isn't quite as good as 
10054 \family sans
10055 foils.
10056 \end_layout
10057
10058 \begin_layout Standard
10059 The 
10060 \family sans
10061 foils
10062 \family default
10063  class is designed for use with version 2.1 of the 
10064 \family sans
10065 foils.cls
10066 \family default
10067  LaTeX class file which is now an integral part of LaTeX2e.
10068 \end_layout
10069
10070 \begin_layout Subsection
10071 Getting Started
10072 \end_layout
10073
10074 \begin_layout Standard
10075 Obviously, to use this document class, you need to select 
10076 \begin_inset Quotes eld
10077 \end_inset
10078
10079
10080 \family sans
10081 slides (FoilTeX)
10082 \family default
10083
10084 \begin_inset Quotes erd
10085 \end_inset
10086
10087  from the 
10088 \family sans
10089 Class
10090 \family default
10091  entry in the 
10092 \family sans
10093 Document
10094 \begin_inset space ~
10095 \end_inset
10096
10097 Layout
10098 \family default
10099  dialog.
10100  There are some settings in the 
10101 \family sans
10102 Document
10103 \begin_inset space ~
10104 \end_inset
10105
10106 Layout
10107 \family default
10108  dialog that you should know about that are specific to this class:
10109 \end_layout
10110
10111 \begin_layout Itemize
10112 Don't change the options 
10113 \family sans
10114 Sides
10115 \family default
10116  and 
10117 \family sans
10118 Columns
10119 \family default
10120  on the 
10121 \family sans
10122 Document
10123 \begin_inset space ~
10124 \end_inset
10125
10126 Layout
10127 \family default
10128  dialog.
10129  They're ignored by the 
10130 \family sans
10131 foils
10132 \family default
10133  class.
10134 \end_layout
10135
10136 \begin_layout Itemize
10137 The default font size is 20
10138 \begin_inset space \thinspace{}
10139 \end_inset
10140
10141 pt with the other options being 17
10142 \begin_inset space \thinspace{}
10143 \end_inset
10144
10145 pt, 25
10146 \begin_inset space \thinspace{}
10147 \end_inset
10148
10149 pt and 30
10150 \begin_inset space \thinspace{}
10151 \end_inset
10152
10153 pt.
10154 \end_layout
10155
10156 \begin_layout Itemize
10157 The default font is 
10158 \family sans
10159 sans
10160 \family default
10161  
10162 \family sans
10163 serif
10164 \family default
10165  but all math equations are still typeset in the usual roman font.
10166 \end_layout
10167
10168 \begin_layout Itemize
10169
10170 \family sans
10171 FoilTeX
10172 \family default
10173  supports A4 and Letter paper sizes as well as a special size for working
10174  with 35
10175 \begin_inset space \thinspace{}
10176 \end_inset
10177
10178 mm slides.
10179  It doesn't support A5, B5, legal or executive paper sizes.
10180 \end_layout
10181
10182 \begin_layout Itemize
10183 Don't bother changing the 
10184 \family sans
10185 Float Placement
10186 \family default
10187  settings because they are ignored anyway.
10188  All floats appear where they are defined in the text.
10189 \end_layout
10190
10191 \begin_layout Itemize
10192 The 
10193 \family sans
10194 Pagestyle
10195 \family default
10196  setting behaves a bit differently for this class.
10197  
10198 \family sans
10199 FoilTeX
10200 \family default
10201  provides extensive footer and header capabilities including a user-defined
10202  logo.
10203  See section
10204 \begin_inset space ~
10205 \end_inset
10206
10207
10208 \begin_inset CommandInset ref
10209 LatexCommand ref
10210 reference "sec:foilfoot"
10211
10212 \end_inset
10213
10214  for more details.
10215  The title page is treated differently to all other pages in the document
10216  and is 
10217 \emph on
10218 always
10219 \emph default
10220  unnumbered and 
10221 \emph on
10222 always
10223 \emph default
10224  has the logo centered at the bottom of the page (if one is defined).
10225  The possible page style choices and what they do are as follows:
10226 \end_layout
10227
10228 \begin_deeper
10229 \begin_layout Labeling
10230 \labelwidthstring MMMMMMM
10231
10232 \family sans
10233 \series bold
10234 empty
10235 \family default
10236 \series default
10237  The final output contains no page numbers, or other headers or footers
10238  (except footnotes of course).
10239  
10240 \end_layout
10241
10242 \begin_layout Labeling
10243 \labelwidthstring MMMMMMM
10244
10245 \family sans
10246 \series bold
10247 plain
10248 \family default
10249 \series default
10250  The final output contains page numbers centered at the bottom of the page.
10251  No other headings or footers (other than footnotes).
10252 \end_layout
10253
10254 \begin_layout Labeling
10255 \labelwidthstring MMMMMMM
10256
10257 \series bold
10258 foilheadings
10259 \series default
10260  Page numbers in lower right corner.
10261  Additional headers and footers are also shown.
10262  This is also the default.
10263 \end_layout
10264
10265 \begin_layout Labeling
10266 \labelwidthstring MMMMMMM
10267
10268 \series bold
10269 fancy
10270 \series default
10271  Gives you access to the 
10272 \family sans
10273 fancyheadings
10274 \family default
10275  package although its use with 
10276 \family sans
10277 FoilTeX
10278 \family default
10279  is discouraged by the writer of the 
10280 \family sans
10281 FoilTeX
10282 \family default
10283  package because of some potential page layout clashes.
10284 \end_layout
10285
10286 \end_deeper
10287 \begin_layout Subsubsection
10288 Extra Options
10289 \end_layout
10290
10291 \begin_layout Standard
10292 The following options may be used in the extra class options in the 
10293 \family sans
10294 Document\SpecialChar \menuseparator
10295 Settings
10296 \family default
10297  dialog.
10298 \end_layout
10299
10300 \begin_layout Labeling
10301 \labelwidthstring MMMMMMx
10302
10303 \series bold
10304 35mmSlide
10305 \series default
10306  This sets up the page layout for 7.33
10307 \begin_inset space \thinspace{}
10308 \end_inset
10309
10310 in by 11
10311 \begin_inset space \thinspace{}
10312 \end_inset
10313
10314 in paper, which is about the same aspect ratio as a 35
10315 \begin_inset space \thinspace{}
10316 \end_inset
10317
10318 mm slide, making it a bit easier to work with this medium.
10319 \end_layout
10320
10321 \begin_layout Labeling
10322 \labelwidthstring MMMMMMx
10323
10324 \series bold
10325 headrule
10326 \series default
10327  Places a rule across the page below the header on every page except the
10328  title page.
10329 \end_layout
10330
10331 \begin_layout Labeling
10332 \labelwidthstring MMMMMMx
10333
10334 \series bold
10335 footrule
10336 \series default
10337  Places a rule across the page above the footer on every page except the
10338  title page.
10339 \end_layout
10340
10341 \begin_layout Labeling
10342 \labelwidthstring MMMMMMx
10343
10344 \series bold
10345 dvips
10346 \series default
10347  This is automatically set each time you create a new 
10348 \family sans
10349 foils
10350 \family default
10351  document.
10352  This option tells 
10353 \family sans
10354 FoilTeX
10355 \family default
10356  to use the dvips driver to rotate those pages that are set as landscape
10357  foils.
10358 \end_layout
10359
10360 \begin_layout Labeling
10361 \labelwidthstring MMMMMMx
10362
10363 \series bold
10364 landscape
10365 \series default
10366  Simply changes the page dimensions to those of a landscape page but doesn't
10367  do any rotation.
10368  Thus if you use this option you need to use an external program to rotate
10369  each page or feed your paper through your printer as landscape.
10370  Note that this option effectively reverses the roles of the 
10371 \family sans
10372 Foilhead
10373 \family default
10374  and 
10375 \family sans
10376 Rotatefoilhead
10377 \family default
10378  environments (don't worry these are described in the next section).
10379 \end_layout
10380
10381 \begin_layout Labeling
10382 \labelwidthstring MMMMMMx
10383
10384 \series bold
10385 leqno
10386 \series default
10387  Equation numbers on the left.
10388 \end_layout
10389
10390 \begin_layout Labeling
10391 \labelwidthstring MMMMMMx
10392
10393 \series bold
10394 fleqn
10395 \series default
10396  Flush-left equations.
10397 \end_layout
10398
10399 \begin_layout Subsection
10400 Supported Environments
10401 \end_layout
10402
10403 \begin_layout Standard
10404 Most of the environments commonly supported in other classes are also supported
10405  by the 
10406 \family sans
10407 foils
10408 \family default
10409  class.
10410  There are several additional environments provided by 
10411 \family sans
10412 FoilTeX
10413 \family default
10414  as well as a couple added by LyX.
10415  The following environments are shared with other classes:
10416 \end_layout
10417
10418 \begin_layout Standard
10419 \begin_inset ERT
10420 status open
10421
10422 \begin_layout Plain Layout
10423
10424
10425 \backslash
10426 begin{multicols}{2}
10427 \end_layout
10428
10429 \end_inset
10430
10431
10432 \end_layout
10433
10434 \begin_layout Itemize
10435
10436 \family sans
10437 Standard
10438 \end_layout
10439
10440 \begin_layout Itemize
10441
10442 \family sans
10443 Itemize
10444 \end_layout
10445
10446 \begin_layout Itemize
10447
10448 \family sans
10449 Enumerate
10450 \end_layout
10451
10452 \begin_layout Itemize
10453
10454 \family sans
10455 Description
10456 \end_layout
10457
10458 \begin_layout Itemize
10459
10460 \family sans
10461 List
10462 \end_layout
10463
10464 \begin_layout Itemize
10465
10466 \family sans
10467 LyX-Code
10468 \end_layout
10469
10470 \begin_layout Itemize
10471
10472 \family sans
10473 Verse
10474 \end_layout
10475
10476 \begin_layout Itemize
10477
10478 \family sans
10479 Quote
10480 \end_layout
10481
10482 \begin_layout Itemize
10483
10484 \family sans
10485 Quotation
10486 \end_layout
10487
10488 \begin_layout Itemize
10489
10490 \family sans
10491 Title
10492 \end_layout
10493
10494 \begin_layout Itemize
10495
10496 \family sans
10497 Author
10498 \end_layout
10499
10500 \begin_layout Itemize
10501
10502 \family sans
10503 Date
10504 \end_layout
10505
10506 \begin_layout Itemize
10507
10508 \family sans
10509 Abstract
10510 \end_layout
10511
10512 \begin_layout Itemize
10513
10514 \family sans
10515 Bibliography
10516 \end_layout
10517
10518 \begin_layout Itemize
10519
10520 \family sans
10521 Address
10522 \end_layout
10523
10524 \begin_layout Itemize
10525
10526 \family sans
10527 RightAddress
10528 \end_layout
10529
10530 \begin_layout Itemize
10531
10532 \family sans
10533 Caption
10534 \end_layout
10535
10536 \begin_layout Itemize
10537
10538 \family sans
10539 Comment
10540 \end_layout
10541
10542 \begin_layout Standard
10543 \begin_inset ERT
10544 status open
10545
10546 \begin_layout Plain Layout
10547
10548
10549 \backslash
10550 end{multicols}
10551 \end_layout
10552
10553 \end_inset
10554
10555
10556 \end_layout
10557
10558 \begin_layout Standard
10559 That is, all the major environments apart from the sectioning environments.
10560  Since foils are essentially self-contained sections, with a title and body,
10561  
10562 \family sans
10563 FoilTeX
10564 \family default
10565  provides specific commands for starting new foils and these are:
10566 \end_layout
10567
10568 \begin_layout Itemize
10569
10570 \family sans
10571 Foilhead
10572 \end_layout
10573
10574 \begin_layout Itemize
10575
10576 \family sans
10577 Rotatefoilhead
10578 \end_layout
10579
10580 \begin_layout Standard
10581 LyX also provides slightly modified versions of these two environments called:
10582 \end_layout
10583
10584 \begin_layout Itemize
10585
10586 \family sans
10587 ShortFoilhead
10588 \end_layout
10589
10590 \begin_layout Itemize
10591
10592 \family sans
10593 ShortRotatefoilhead
10594 \end_layout
10595
10596 \begin_layout Standard
10597 and the differences will be explained in the next section.
10598 \end_layout
10599
10600 \begin_layout Standard
10601 Since foils are often used in presenting ideas or new theorems and such
10602  
10603 \family sans
10604 FoilTeX
10605 \family default
10606  also provides a comprehensive box of goodies for presenting them:
10607 \end_layout
10608
10609 \begin_layout Standard
10610 \begin_inset ERT
10611 status open
10612
10613 \begin_layout Plain Layout
10614
10615
10616 \backslash
10617 begin{multicols}{2}
10618 \end_layout
10619
10620 \end_inset
10621
10622
10623 \end_layout
10624
10625 \begin_layout Itemize
10626
10627 \family sans
10628 Theorem
10629 \end_layout
10630
10631 \begin_layout Itemize
10632
10633 \family sans
10634 Lemma
10635 \end_layout
10636
10637 \begin_layout Itemize
10638
10639 \family sans
10640 Corollary
10641 \end_layout
10642
10643 \begin_layout Itemize
10644
10645 \family sans
10646 Proposition
10647 \end_layout
10648
10649 \begin_layout Itemize
10650
10651 \family sans
10652 Definition
10653 \end_layout
10654
10655 \begin_layout Itemize
10656
10657 \family sans
10658 Proof
10659 \end_layout
10660
10661 \begin_layout Itemize
10662
10663 \family sans
10664 Theorem*
10665 \end_layout
10666
10667 \begin_layout Itemize
10668
10669 \family sans
10670 Lemma*
10671 \end_layout
10672
10673 \begin_layout Itemize
10674
10675 \family sans
10676 Corollary*
10677 \end_layout
10678
10679 \begin_layout Itemize
10680
10681 \family sans
10682 Proposition*
10683 \end_layout
10684
10685 \begin_layout Itemize
10686
10687 \family sans
10688 Definition*
10689 \end_layout
10690
10691 \begin_layout Standard
10692 \begin_inset ERT
10693 status open
10694
10695 \begin_layout Plain Layout
10696
10697
10698 \backslash
10699 end{multicols}
10700 \end_layout
10701
10702 \end_inset
10703
10704
10705 \end_layout
10706
10707 \begin_layout Standard
10708 The starred versions are unnumbered while the unstarred versions are numbered.
10709  There are also two list environments added by LyX and these are:
10710 \end_layout
10711
10712 \begin_layout Itemize
10713
10714 \family sans
10715 TickList
10716 \end_layout
10717
10718 \begin_layout Itemize
10719
10720 \family sans
10721 CrossList
10722 \end_layout
10723
10724 \begin_layout Standard
10725
10726 \family sans
10727 FoilTeX
10728 \family default
10729  provides some powerful header and footer capabilities that are best set
10730  in the preamble although they may be set at any point in a document.
10731  If you want to change these settings in your document the best place to
10732  do so is at the very top of a foil, i.
10733 \begin_inset space \thinspace{}
10734 \end_inset
10735
10736 g.
10737 \emph on
10738
10739 \begin_inset space \space{}
10740 \end_inset
10741
10742
10743 \emph default
10744 straight after the foilhead.
10745 \end_layout
10746
10747 \begin_layout Standard
10748 For this purpose, the following command styles are provided [
10749 \shape smallcaps
10750 Martin Vermeer
10751 \shape default
10752 ]:
10753 \end_layout
10754
10755 \begin_layout Standard
10756 \begin_inset ERT
10757 status open
10758
10759 \begin_layout Plain Layout
10760
10761
10762 \backslash
10763 begin{multicols}{2}
10764 \end_layout
10765
10766 \end_inset
10767
10768
10769 \end_layout
10770
10771 \begin_layout Itemize
10772
10773 \family sans
10774 My
10775 \begin_inset space ~
10776 \end_inset
10777
10778 Logo
10779 \end_layout
10780
10781 \begin_layout Itemize
10782
10783 \family sans
10784 Restriction
10785 \end_layout
10786
10787 \begin_layout Itemize
10788
10789 \family sans
10790 Right
10791 \begin_inset space ~
10792 \end_inset
10793
10794 Footer
10795 \end_layout
10796
10797 \begin_layout Itemize
10798
10799 \family sans
10800 Right
10801 \begin_inset space ~
10802 \end_inset
10803
10804 Header
10805 \end_layout
10806
10807 \begin_layout Itemize
10808
10809 \family sans
10810 Left
10811 \begin_inset space ~
10812 \end_inset
10813
10814 Header
10815 \end_layout
10816
10817 \begin_deeper
10818 \begin_layout Standard
10819 \begin_inset space ~
10820 \end_inset
10821
10822
10823 \end_layout
10824
10825 \end_deeper
10826 \begin_layout Standard
10827 \begin_inset ERT
10828 status open
10829
10830 \begin_layout Plain Layout
10831
10832
10833 \backslash
10834 end{multicols}
10835 \end_layout
10836
10837 \end_inset
10838
10839
10840 \end_layout
10841
10842 \begin_layout Standard
10843 There are also a few commands provided by 
10844 \family sans
10845 FoilTeX
10846 \family default
10847  that aren't directly supported by LyX but I'll tell you what they do and
10848  how to use them in section
10849 \begin_inset space ~
10850 \end_inset
10851
10852
10853 \begin_inset CommandInset ref
10854 LatexCommand ref
10855 reference "sec:unsuppfoils"
10856
10857 \end_inset
10858
10859 .
10860 \end_layout
10861
10862 \begin_layout Subsection
10863 Building a Set of Foils
10864 \end_layout
10865
10866 \begin_layout Standard
10867 This section will give a simple introduction to using the different environments
10868  to build a set of foils.
10869  If you want to see an example set of foils, take a look at the 
10870 \family typewriter
10871 Foils.lyx
10872 \family default
10873  file you find in LyX's 
10874 \family typewriter
10875 examples
10876 \family default
10877  folder.
10878 \end_layout
10879
10880 \begin_layout Subsubsection
10881 Give It a Title Page
10882 \end_layout
10883
10884 \begin_layout Standard
10885 Unlike other classes that provide 
10886 \family sans
10887 Title
10888 \family default
10889
10890 \family sans
10891 Author
10892 \family default
10893
10894 \family sans
10895 Date
10896 \family default
10897  and 
10898 \family sans
10899 Abstract
10900 \family default
10901  environments, 
10902 \family sans
10903 foils
10904 \family default
10905  creates the title on a page of its own.
10906  If you leave out the 
10907 \family sans
10908 Date
10909 \family default
10910  environment LaTeX will substitute the current date (every time you regenerate
10911  the output).
10912 \end_layout
10913
10914 \begin_layout Subsubsection
10915 Start a New Foil
10916 \end_layout
10917
10918 \begin_layout Standard
10919 As I mentioned earlier, there are four ways of starting a new foil.
10920  For portrait foils you should use 
10921 \family sans
10922 Foilhead
10923 \family default
10924  or 
10925 \family sans
10926 ShortFoilhead.
10927
10928 \family default
10929  The difference between these two environments is the amount of space between
10930  the title of the foil (the foilhead) and the body of the foil.
10931 \end_layout
10932
10933 \begin_layout Standard
10934 Landscape foils are generated using the 
10935 \family sans
10936 Rotatefoilhead
10937 \family default
10938  and 
10939 \family sans
10940 ShortRotatefoilhead
10941 \family default
10942  environments.
10943  Again the only difference is the spacing between foilhead and body.
10944  Both of the short versions have 0.5 inches less separation between the foilhead
10945  and the body.
10946  
10947 \end_layout
10948
10949 \begin_layout Standard
10950 One problem with the support for landscape foils is the requirement that
10951  you have to use the 
10952 \family typewriter
10953 dvips
10954 \family default
10955  driver to generate the PostScript output otherwise the foils won't be rotated.
10956  It is possible to get landscape foils even if you haven't got the 
10957 \family typewriter
10958 dvips
10959 \family default
10960  driver provided you can feed your foils sideways through your printer ;-)
10961 \end_layout
10962
10963 \begin_layout Subsubsection
10964 Theorems, Lemmas, Proofs and more
10965 \end_layout
10966
10967 \begin_layout Standard
10968 Due to a small bug in LyX you can't have two of the same type of these environme
10969 nts directly following each other.
10970  They must be separated by something.
10971  If you try, you will just be extending the previous environment as if you
10972  had merged the two environments together.
10973  So, how do you get around this problem? The simplest option is to insert
10974  some text between the two environments or add a 
10975 \family sans
10976 LaTeX
10977 \family default
10978  environment between the two with just a 
10979 \begin_inset Quotes eld
10980 \end_inset
10981
10982
10983 \family typewriter
10984 %
10985 \family default
10986
10987 \begin_inset Quotes erd
10988 \end_inset
10989
10990  in it.
10991  This will force LyX to produce two separate environments and hence the
10992  correct LaTeX output.
10993  An example is provided in the example file included with the LyX distribution.
10994  Remember, this problem only occurs if you are trying to place two of the
10995  same type of theorem-like environments one directly after the other.
10996 \end_layout
10997
10998 \begin_layout Subsubsection
10999 Lists
11000 \end_layout
11001
11002 \begin_layout Standard
11003 You get all the commonly supported list styles found in other classes as
11004  well as two new ones.
11005  I'll only describe the new ones here.
11006  If you want to find out more about the other list environments check out
11007  the 
11008 \emph on
11009 User's Guide.
11010
11011 \emph default
11012  If you intend to use itemized lists you might also want to read about the
11013  
11014 \family sans
11015 Itemize
11016 \begin_inset space ~
11017 \end_inset
11018
11019 Bullet
11020 \begin_inset space ~
11021 \end_inset
11022
11023 Selection
11024 \family default
11025  dialog described above in section
11026 \begin_inset space ~
11027 \end_inset
11028
11029
11030 \begin_inset CommandInset ref
11031 LatexCommand ref
11032 reference "sec:bullet"
11033
11034 \end_inset
11035
11036 .
11037 \end_layout
11038
11039 \begin_layout Standard
11040 The two new list styles, 
11041 \family sans
11042 TickList
11043 \family default
11044  and 
11045 \family sans
11046 CrossList
11047 \family default
11048 , are designed to make it easier for you to create lists of do's and don'ts
11049  or right and wrong by providing dedicated environments that use a tick
11050  or a cross as the label of the list.
11051  These lists are in fact dedicated variants of the 
11052 \family sans
11053 Itemize
11054 \family default
11055  environment.
11056  They do however require that you have the 
11057 \family typewriter
11058 psnfss
11059 \family default
11060  packages installed.
11061 \end_layout
11062
11063 \begin_layout Subsubsection
11064 Figures and Tables
11065 \end_layout
11066
11067 \begin_layout Standard
11068
11069 \family sans
11070 FoilTeX
11071 \family default
11072  redefines the floating tables and figures so that they appear exactly where
11073  they are in the text rather than pushing them to the top of the page or
11074  to some user specified location.
11075  In fact if you change the float placement settings they are simply ignored.
11076 \end_layout
11077
11078 \begin_layout Subsubsection
11079 Page Headers and Footers
11080 \begin_inset CommandInset label
11081 LatexCommand label
11082 name "sec:foilfoot"
11083
11084 \end_inset
11085
11086
11087 \end_layout
11088
11089 \begin_layout Standard
11090
11091 \family sans
11092 My
11093 \begin_inset space ~
11094 \end_inset
11095
11096 Logo
11097 \family default
11098  and 
11099 \family sans
11100 Restriction
11101 \family default
11102  are two commands used to control the left-footer text string.
11103  The first is meant to allow you to include a graphic logo on your foils
11104  and defaults to 
11105 \begin_inset Quotes eld
11106 \end_inset
11107
11108 -Typeset by 
11109 \family sans
11110 FoilTeX
11111 \family default
11112 -
11113 \begin_inset Quotes erd
11114 \end_inset
11115
11116 .
11117  While the second is meant to provide a classification for the audience,
11118  
11119 \emph on
11120 e.
11121 \begin_inset space \thinspace{}
11122 \end_inset
11123
11124 g.
11125 \emph default
11126
11127 \begin_inset space \space{}
11128 \end_inset
11129
11130 Confidential.
11131  It is empty by default.
11132 \end_layout
11133
11134 \begin_layout Standard
11135 The remaining page corners can be filled by 
11136 \family sans
11137 Right
11138 \begin_inset space ~
11139 \end_inset
11140
11141 Footer
11142 \family default
11143  (which defaults to page numbers), 
11144 \family sans
11145 Right
11146 \begin_inset space ~
11147 \end_inset
11148
11149 Header
11150 \family default
11151  (top right) and 
11152 \family sans
11153 Left
11154 \begin_inset space ~
11155 \end_inset
11156
11157 Header
11158 \family default
11159  (top left).
11160 \end_layout
11161
11162 \begin_layout Subsection
11163 Unsupported 
11164 \family sans
11165 FoilTeX
11166 \family default
11167  Goodies
11168 \begin_inset CommandInset label
11169 LatexCommand label
11170 name "sec:unsuppfoils"
11171
11172 \end_inset
11173
11174
11175 \end_layout
11176
11177 \begin_layout Standard
11178 All the commands mentioned below need to be set in a 
11179 \family sans
11180 LaTeX
11181 \family default
11182  environment or as 
11183 \family sans
11184 TeX
11185 \family default
11186  within another environment.
11187 \end_layout
11188
11189 \begin_layout Subsubsection
11190 Lengths
11191 \end_layout
11192
11193 \begin_layout Standard
11194 All lengths are adjusted using the 
11195 \family typewriter
11196
11197 \backslash
11198 setlength{
11199 \family default
11200 \emph on
11201 lengthname
11202 \family typewriter
11203 \emph default
11204 }{
11205 \family default
11206 \emph on
11207 newlength
11208 \family typewriter
11209 \emph default
11210 }
11211 \family default
11212  command.
11213  Where 
11214 \emph on
11215 lengthname
11216 \emph default
11217  should be replaced by the name given to the length you want to change and
11218  
11219 \emph on
11220 newlength
11221 \emph default
11222  is the length value.
11223  All lengths should be specified in units of length such as inches (
11224 \family typewriter
11225 in
11226 \family default
11227 ), millimeters (
11228 \family typewriter
11229 mm
11230 \family default
11231 ) or points (
11232 \family typewriter
11233 pt
11234 \family default
11235 ) or relative to some document or font-based length such as 
11236 \family typewriter
11237
11238 \backslash
11239 textwidth
11240 \family default
11241 .
11242  
11243 \end_layout
11244
11245 \begin_layout Standard
11246 It's possible to change the spacing between a foilhead and the body of the
11247  foil by adjusting the length specified by 
11248 \family typewriter
11249
11250 \backslash
11251 foilheadskip
11252 \family default
11253 .
11254  For example, to make 
11255 \emph on
11256 all
11257 \emph default
11258  foilheads 0.5
11259 \begin_inset space \space{}
11260 \end_inset
11261
11262 in closer to their bodies put the following in the preamble: 
11263 \family typewriter
11264
11265 \backslash
11266 setlength{
11267 \backslash
11268 foilheadskip}{-0.5in}
11269 \end_layout
11270
11271 \begin_layout Standard
11272 The spacings around floats can be adjusted by setting these lengths:
11273 \end_layout
11274
11275 \begin_layout Labeling
11276 \labelwidthstring MMMMMMMMMMM
11277
11278 \family typewriter
11279
11280 \backslash
11281 abovefloatskip
11282 \family default
11283  Separation between the text and the top of the float
11284 \end_layout
11285
11286 \begin_layout Labeling
11287 \labelwidthstring MMMMMMMMMMM
11288
11289 \family typewriter
11290
11291 \backslash
11292 abovecaptionskip
11293 \family default
11294  Separation between the float and the caption
11295 \end_layout
11296
11297 \begin_layout Labeling
11298 \labelwidthstring MMMMMMMMMMM
11299
11300 \family typewriter
11301
11302 \backslash
11303 belowcaptionskip
11304 \family default
11305  Separation between the caption and the following text
11306 \end_layout
11307
11308 \begin_layout Labeling
11309 \labelwidthstring MMMMMMMMMMM
11310
11311 \family typewriter
11312
11313 \backslash
11314 captionwidth
11315 \family default
11316  You can make the captions narrower than the surrounding text by adjusting
11317  this length.
11318  Best done relative to 
11319 \family typewriter
11320
11321 \backslash
11322 textwidth
11323 \family default
11324 .
11325 \end_layout
11326
11327 \begin_layout Standard
11328 There are also several title page related lengths that you may find useful
11329  if you have a long title or several authors:
11330 \end_layout
11331
11332 \begin_layout Labeling
11333 \labelwidthstring MMMMMMMMMMM
11334
11335 \family typewriter
11336
11337 \backslash
11338 abovetitleskip
11339 \family default
11340  Separation from headers to 
11341 \family sans
11342 Title
11343 \end_layout
11344
11345 \begin_layout Labeling
11346 \labelwidthstring MMMMMMMMMMM
11347
11348 \family typewriter
11349
11350 \backslash
11351 titleauthorskip
11352 \family default
11353  between 
11354 \family sans
11355 Title
11356 \family default
11357  and 
11358 \family sans
11359 Author
11360 \family default
11361  environments
11362 \end_layout
11363
11364 \begin_layout Labeling
11365 \labelwidthstring MMMMMMMMMMM
11366
11367 \family typewriter
11368
11369 \backslash
11370 authorauthorskip
11371 \family default
11372  between multiple 
11373 \family sans
11374 Author
11375 \family default
11376  lines
11377 \end_layout
11378
11379 \begin_layout Labeling
11380 \labelwidthstring MMMMMMMMMMM
11381
11382 \family typewriter
11383
11384 \backslash
11385 authordateskip
11386 \family default
11387  between the 
11388 \family sans
11389 Author
11390 \family default
11391  and the 
11392 \family sans
11393 Date
11394 \end_layout
11395
11396 \begin_layout Labeling
11397 \labelwidthstring MMMMMMMMMMM
11398
11399 \family typewriter
11400
11401 \backslash
11402 dateabstractskip
11403 \family default
11404  between the 
11405 \family sans
11406 Date
11407 \family default
11408  and the 
11409 \family sans
11410 Abstract
11411 \end_layout
11412
11413 \begin_layout Standard
11414 The last length related command affects all the list environments.
11415  If you place 
11416 \family typewriter
11417
11418 \backslash
11419 zerolistvertdimens
11420 \family default
11421  
11422 \emph on
11423 inside
11424 \emph default
11425  a list environment then all the vertical spacing between the list items
11426  is removed.
11427  Note that this is a command not a length so it doesn't require 
11428 \family typewriter
11429
11430 \backslash
11431 setlength
11432 \family default
11433  like the stuff mentioned above.
11434 \end_layout
11435
11436 \begin_layout Subsubsection
11437 Headers and Footers
11438 \end_layout
11439
11440 \begin_layout Standard
11441 The 
11442 \family typewriter
11443
11444 \backslash
11445 LogoOn
11446 \family default
11447  and 
11448 \family typewriter
11449
11450 \backslash
11451 LogoOff
11452 \family default
11453  commands control whether the logo in the 
11454 \family sans
11455 MyLogo
11456 \family default
11457  definition appear on a given page.
11458  If you put 
11459 \family typewriter
11460
11461 \backslash
11462 LogoOff
11463 \family default
11464  in the preamble then none of the foils will have the logo on them.
11465  If you don't want the logo on a particular page place the 
11466 \family typewriter
11467
11468 \backslash
11469 LogoOff
11470 \family default
11471  directly after the foilhead of that page and the 
11472 \family typewriter
11473
11474 \backslash
11475 LogoOn
11476 \family default
11477  directly after the next foilhead.
11478 \end_layout
11479
11480 \begin_layout Standard
11481 If you decide to use the 
11482 \family sans
11483 fancy
11484 \family default
11485  page style setting in the 
11486 \family sans
11487 Document
11488 \begin_inset space ~
11489 \end_inset
11490
11491 Layout
11492 \family default
11493  dialog you should probably add 
11494 \family typewriter
11495
11496 \backslash
11497 let
11498 \backslash
11499 headwidth
11500 \backslash
11501 textwidth
11502 \family default
11503  to your preamble so headers and footers on landscape pages are correctly
11504  placed when rotated.
11505  This is due to some clashes between the page layouts provided by the 
11506 \family sans
11507 fancyheadings
11508 \family default
11509  package and the 
11510 \family sans
11511 foils
11512 \family default
11513  class.
11514 \end_layout
11515
11516 \begin_layout Section
11517 Hollywood (Hollywood spec scripts)
11518 \end_layout
11519
11520 \begin_layout Standard
11521 by 
11522 \shape smallcaps
11523 Garst Reese
11524 \end_layout
11525
11526 \begin_layout Subsection
11527 Introduction
11528 \end_layout
11529
11530 \begin_layout Standard
11531 Getting the format of a Hollywood script right is a 
11532 \begin_inset Quotes eld
11533 \end_inset
11534
11535 rite of passage.
11536 \begin_inset Quotes erd
11537 \end_inset
11538
11539  It is designed to make the readers focus on content and to be easy and
11540  familiar for the actors to read.
11541  Each page of a script should be one minute of film.
11542  Nothing goes in a script that you cannot see or hear on screen.
11543  The courier 12 pt font should be used throughout.
11544  No italics.
11545 \end_layout
11546
11547 \begin_layout Subsection
11548 Special problems
11549 \end_layout
11550
11551 \begin_layout Standard
11552 Speakers' lines should NEVER break in mid-sentence.
11553  If a speaker's lines continue over a page break, repeat the 
11554 \family sans
11555 Speaker
11556 \family default
11557  title followed by (Cont'd).
11558 \end_layout
11559
11560 \begin_layout Subsection
11561 Special features
11562 \end_layout
11563
11564 \begin_layout Standard
11565 Insert the 
11566 \family sans
11567 Speaker
11568 \family default
11569  names as labels then cross-reference the label to insert the name.
11570  The cross-reference dialog will show the current cast of characters.
11571  You can use this to insert the speaker name in narratives also.
11572 \end_layout
11573
11574 \begin_layout Subsection
11575 Paper size and Margins
11576 \end_layout
11577
11578 \begin_layout Standard
11579 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11580 \end_layout
11581
11582 \begin_layout Subsection
11583 Environments
11584 \end_layout
11585
11586 \begin_layout Standard
11587 The following environments are available.
11588  You can use hollywood.bind to get the bind keys shown at the right.
11589 \end_layout
11590
11591 \begin_layout Itemize
11592
11593 \family sans
11594 Standard
11595 \begin_inset Newline newline
11596 \end_inset
11597
11598
11599 \family default
11600 Used where nothing else works.
11601  Try to avoid it.
11602 \end_layout
11603
11604 \begin_layout Itemize
11605
11606 \family sans
11607 FADE_IN
11608 \family default
11609 :
11610 \begin_inset space \hfill{}
11611 \end_inset
11612
11613
11614 \family sans
11615 M-z S-I
11616 \family default
11617
11618 \begin_inset Newline newline
11619 \end_inset
11620
11621 Usually followed by something like 
11622 \begin_inset Quotes eld
11623 \end_inset
11624
11625 on Sally waking up.
11626 \begin_inset Quotes erd
11627 \end_inset
11628
11629
11630 \end_layout
11631
11632 \begin_layout Itemize
11633
11634 \family sans
11635 INT:
11636 \begin_inset space \hfill{}
11637 \end_inset
11638
11639 M-z i
11640 \begin_inset Newline newline
11641 \end_inset
11642
11643
11644 \family default
11645 Introduces a new INTERIOR camera set-up.
11646  Always followed by DAY or NIGHT, or something similar to define the lighting
11647  required.
11648  Everthing on this line in CAPS.
11649 \end_layout
11650
11651 \begin_layout Itemize
11652
11653 \family sans
11654 EXT:
11655 \begin_inset space \hfill{}
11656 \end_inset
11657
11658 M-z e
11659 \begin_inset Newline newline
11660 \end_inset
11661
11662
11663 \family default
11664 Introduces a new EXTERIOR camera set-up.
11665  Everthing on this line in CAPS.
11666 \end_layout
11667
11668 \begin_layout Itemize
11669
11670 \family sans
11671 Speaker
11672 \begin_inset space \hfill{}
11673 \end_inset
11674
11675 M-z s
11676 \begin_inset Newline newline
11677 \end_inset
11678
11679
11680 \family default
11681 The character speaking.
11682 \end_layout
11683
11684 \begin_layout Itemize
11685
11686 \family sans
11687 Parenthetical
11688 \begin_inset space \hfill{}
11689 \end_inset
11690
11691 M-z p
11692 \begin_inset Newline newline
11693 \end_inset
11694
11695
11696 \family default
11697 Instructions to the speaker.
11698  The () are automatically inserted, but only the ( will show in LyX.
11699  Both will be printed.
11700 \end_layout
11701
11702 \begin_layout Itemize
11703
11704 \family sans
11705 Dialogue
11706 \begin_inset space \hfill{}
11707 \end_inset
11708
11709 M-z d
11710 \begin_inset Newline newline
11711 \end_inset
11712
11713
11714 \family default
11715 What the 
11716 \family sans
11717 Speaker
11718 \family default
11719  says.
11720 \end_layout
11721
11722 \begin_layout Itemize
11723
11724 \family sans
11725 Transition
11726 \begin_inset space \hfill{}
11727 \end_inset
11728
11729 M-z t
11730 \begin_inset Newline newline
11731 \end_inset
11732
11733
11734 \family default
11735 Camera movement instruction.
11736  e.
11737 \begin_inset space \thinspace{}
11738 \end_inset
11739
11740 g.
11741 \begin_inset space \space{}
11742 \end_inset
11743
11744 CUT TO:
11745 \end_layout
11746
11747 \begin_layout Itemize
11748
11749 \family sans
11750 FADE OUT:
11751 \begin_inset space \hfill{}
11752 \end_inset
11753
11754 M-z S-I
11755 \end_layout
11756
11757 \begin_layout Itemize
11758
11759 \family sans
11760 Author
11761 \begin_inset space \hfill{}
11762 \end_inset
11763
11764 M-z S-A
11765 \end_layout
11766
11767 \begin_layout Itemize
11768
11769 \family sans
11770 Title
11771 \begin_inset space \hfill{}
11772 \end_inset
11773
11774 M-z S-T
11775 \end_layout
11776
11777 \begin_layout Itemize
11778
11779 \family sans
11780 Right_Address
11781 \begin_inset space \hfill{}
11782 \end_inset
11783
11784 M-z r
11785 \end_layout
11786
11787 \begin_layout Subsection
11788 Script jargon
11789 \end_layout
11790
11791 \begin_layout Itemize
11792 (O.S) — off screen
11793 \end_layout
11794
11795 \begin_layout Itemize
11796 (V.0) — voice over
11797 \end_layout
11798
11799 \begin_layout Itemize
11800 b.
11801 \begin_inset space \thinspace{}
11802 \end_inset
11803
11804 g.
11805  — background
11806 \end_layout
11807
11808 \begin_layout Itemize
11809 C.U.
11810  — close-up
11811 \end_layout
11812
11813 \begin_layout Itemize
11814 PAN — camera movement
11815 \end_layout
11816
11817 \begin_layout Itemize
11818 INSERT — cut to close-up of
11819 \end_layout
11820
11821 \begin_layout Section
11822 ijmpc and ijmpd
11823 \end_layout
11824
11825 \begin_layout Standard
11826 by 
11827 \noun on
11828 Panayotis Papasotiriou
11829 \end_layout
11830
11831 \begin_layout Subsection
11832 Overview
11833 \end_layout
11834
11835 \begin_layout Standard
11836 The ijmpc package is a set of macros that facilitates electronic manuscript
11837  submission to the 
11838 \emph on
11839 International Journal of Modern Physics C
11840 \emph default
11841 .
11842  Similarly, the ijmpd package is for creating manuscripts to be submitted
11843  to the 
11844 \emph on
11845 International Journal of Modern Physics D
11846 \emph default
11847 .
11848  Both journals are published by World Scientific.
11849  The corresponding document classes are named 
11850 \family typewriter
11851 ws-ijmpc.cls
11852 \family default
11853  and 
11854 \family typewriter
11855 ws-ijmpd.cls
11856 \family default
11857 , respectively.
11858  These files, together with instructions for the authors, can be downloaded
11859  from the sites 
11860 \begin_inset Flex URL
11861 status collapsed
11862
11863 \begin_layout Plain Layout
11864
11865 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11866 \end_layout
11867
11868 \end_inset
11869
11870  and 
11871 \begin_inset Flex URL
11872 status collapsed
11873
11874 \begin_layout Plain Layout
11875
11876 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11877 \end_layout
11878
11879 \end_inset
11880
11881 .
11882  Both packages are modified versions of the standard 
11883 \begin_inset Quotes eld
11884 \end_inset
11885
11886 article
11887 \begin_inset Quotes erd
11888 \end_inset
11889
11890  package, and they are almost (but not exactly) identical.
11891  Most of their features are supported by LyX.
11892  I have used LyX successfully to write articles submitted to both journals
11893  without any problem.
11894 \end_layout
11895
11896 \begin_layout Subsection
11897 Writing a paper
11898 \end_layout
11899
11900 \begin_layout Standard
11901 As usual, the easiest way to write a paper is to start with a template.
11902  Click on 
11903 \family sans
11904 File\SpecialChar \menuseparator
11905 New from
11906 \family default
11907  
11908 \family sans
11909 \bar under
11910 T
11911 \bar default
11912 emplate
11913 \family default
11914 , then choose the 
11915 \family typewriter
11916 ijmpc.lyx
11917 \family default
11918  or 
11919 \family typewriter
11920 ijmpd.lyx
11921 \family default
11922  template.
11923  This will give an (almost) empty document that includes the most common
11924  fields found in a manuscript.
11925  Simply overwrite the existing text (including the brackets, 
11926 \family typewriter
11927 <>
11928 \family default
11929 ) with your text.
11930  You should keep in mind the following remarks.
11931 \end_layout
11932
11933 \begin_layout Enumerate
11934 LyX won't let you change the font size and the page style of the document,
11935  because such modifications are not allowed by both packages.
11936 \end_layout
11937
11938 \begin_layout Enumerate
11939 The language of the document should not be changed.
11940  Before previewing your paper, be sure that the babel package is not used.
11941  To do this, click on 
11942 \family sans
11943 Tools\SpecialChar \menuseparator
11944 Preferences
11945 \family default
11946 , select the 
11947 \family sans
11948 Lang Opts
11949 \family default
11950  tab, deselect the 
11951 \family sans
11952 Use babel
11953 \family default
11954  checkbox in the language settings, and click on 
11955 \family sans
11956 Apply
11957 \family default
11958  (or 
11959 \family sans
11960 Save
11961 \family default
11962 , if you wish to make this change permanent).
11963 \end_layout
11964
11965 \begin_layout Enumerate
11966 The 
11967 \begin_inset Quotes eld
11968 \end_inset
11969
11970 Keywords
11971 \begin_inset Quotes erd
11972 \end_inset
11973
11974  style must be used to define keywords.
11975 \end_layout
11976
11977 \begin_layout Enumerate
11978 The ijmpc package provides a style named 
11979 \begin_inset Quotes eld
11980 \end_inset
11981
11982 Classification Codes
11983 \begin_inset Quotes erd
11984 \end_inset
11985
11986 , which can be used to define classification codes, such as PACS numbers.
11987  Note that this facility is not supported by the ijmpd package.
11988 \end_layout
11989
11990 \begin_layout Enumerate
11991 Several new environments are available: 
11992 \begin_inset Quotes eld
11993 \end_inset
11994
11995 Definition
11996 \begin_inset Quotes erd
11997 \end_inset
11998
11999
12000 \begin_inset Quotes eld
12001 \end_inset
12002
12003 Step
12004 \begin_inset Quotes erd
12005 \end_inset
12006
12007
12008 \begin_inset Quotes eld
12009 \end_inset
12010
12011 Example
12012 \begin_inset Quotes erd
12013 \end_inset
12014
12015
12016 \begin_inset Quotes eld
12017 \end_inset
12018
12019 Remark
12020 \begin_inset Quotes erd
12021 \end_inset
12022
12023
12024 \begin_inset Quotes eld
12025 \end_inset
12026
12027 Notation
12028 \begin_inset Quotes erd
12029 \end_inset
12030
12031
12032 \begin_inset Quotes eld
12033 \end_inset
12034
12035 Theorem
12036 \begin_inset Quotes erd
12037 \end_inset
12038
12039
12040 \begin_inset Quotes eld
12041 \end_inset
12042
12043 Proof
12044 \begin_inset Quotes erd
12045 \end_inset
12046
12047
12048 \begin_inset Quotes eld
12049 \end_inset
12050
12051 Corollary
12052 \begin_inset Quotes erd
12053 \end_inset
12054
12055
12056 \begin_inset Quotes eld
12057 \end_inset
12058
12059 Lemma
12060 \begin_inset Quotes erd
12061 \end_inset
12062
12063
12064 \begin_inset Quotes eld
12065 \end_inset
12066
12067 Proposition
12068 \begin_inset Quotes erd
12069 \end_inset
12070
12071
12072 \begin_inset Quotes eld
12073 \end_inset
12074
12075 Prop
12076 \begin_inset Quotes erd
12077 \end_inset
12078
12079
12080 \begin_inset Quotes eld
12081 \end_inset
12082
12083 Question
12084 \begin_inset Quotes erd
12085 \end_inset
12086
12087
12088 \begin_inset Quotes eld
12089 \end_inset
12090
12091 Claim
12092 \begin_inset Quotes erd
12093 \end_inset
12094
12095 , and 
12096 \begin_inset Quotes eld
12097 \end_inset
12098
12099 Conjecture
12100 \begin_inset Quotes erd
12101 \end_inset
12102
12103 .
12104  Their use is more or less obvious.
12105  LyX supports all these environments; it will use the proper label, text
12106  style, and numbering scheme for each of them.
12107 \end_layout
12108
12109 \begin_layout Enumerate
12110 Both packages use basic citations; the natbib package should not be used.
12111  In LyX, citation references are shown as usual; in the output, citations
12112  are shown as superscripts.
12113  If you want to use a citation as normal text, you should use the 
12114 \family typewriter
12115 refcite
12116 \family default
12117  command, e.
12118 \begin_inset space \thinspace{}
12119 \end_inset
12120
12121 g.
12122 \begin_inset space \space{}
12123 \end_inset
12124
12125
12126 \begin_inset Quotes eld
12127 \end_inset
12128
12129 See Ref.
12130 \begin_inset space \space{}
12131 \end_inset
12132
12133
12134 \family typewriter
12135
12136 \backslash
12137 refcite{key}
12138 \family default
12139
12140 \begin_inset Quotes erd
12141 \end_inset
12142
12143 .
12144 \end_layout
12145
12146 \begin_layout Enumerate
12147 There is no 
12148 \begin_inset Quotes eld
12149 \end_inset
12150
12151 Acknowledgments
12152 \begin_inset Quotes erd
12153 \end_inset
12154
12155  section in both packages.
12156  To put acknowledgments, just use the 
12157 \begin_inset Quotes eld
12158 \end_inset
12159
12160 Section*
12161 \begin_inset Quotes erd
12162 \end_inset
12163
12164  environment.
12165 \end_layout
12166
12167 \begin_layout Enumerate
12168 Appendices may be added to the paper, 
12169 \emph on
12170 after
12171 \emph default
12172  the Acknowledgments and 
12173 \shape italic
12174 before
12175 \shape default
12176  the References.
12177  LyX provides a special environment, called 
12178 \begin_inset Quotes eld
12179 \end_inset
12180
12181 Appendices Section
12182 \begin_inset Quotes erd
12183 \end_inset
12184
12185  which marks the beginning of the appendices.
12186  This environment should be left blank; it just sends a LaTeX command, but
12187  nothing is really printed.
12188  In LyX, the word 
12189 \begin_inset Quotes eld
12190 \end_inset
12191
12192 Appendix
12193 \begin_inset Quotes erd
12194 \end_inset
12195
12196  is printed with blue letters, as a signal that all sections after that
12197  point are appendices.
12198  To write an appendix, use the 
12199 \begin_inset Quotes eld
12200 \end_inset
12201
12202 Appendix
12203 \begin_inset Quotes erd
12204 \end_inset
12205
12206  environment.
12207  LyX will number each appendix with capital letters, as required by both
12208  journals.
12209  Note that 
12210 \begin_inset Quotes eld
12211 \end_inset
12212
12213 Appendices Section
12214 \begin_inset Quotes erd
12215 \end_inset
12216
12217  
12218 \emph on
12219 must
12220 \emph default
12221  be present before the first appendix; if not, all appendices will be numbered
12222  as normal sections in the output.
12223 \end_layout
12224
12225 \begin_layout Enumerate
12226 The ijmpc and the ijmpd packages use the 
12227 \family typewriter
12228 tbl
12229 \family default
12230  command to implement table captions.
12231  As a result, a table created by LyX is printed correctly, but its caption
12232  is ignored.
12233  However, you can use some TeX code to overcome this problem, so that captions
12234  are printed as expected.
12235  To do so, create a float table as usual, remove the caption, and replace
12236  it with the TeX code 
12237 \family typewriter
12238
12239 \backslash
12240 tbl{
12241 \emph on
12242 your table caption
12243 \emph default
12244 }{
12245 \family default
12246  (sic); you must also the TeX code 
12247 \family typewriter
12248 }
12249 \family default
12250  immediately after the tabular material.
12251  Study the example table included in the template files to see how this
12252  trick is implemented.
12253  Alternatively, If you need table captions, you should implement the whole
12254  table float in a 
12255 \family typewriter
12256 .tex
12257 \family default
12258  file, then include this file to the LyX document (
12259 \family sans
12260 Insert\SpecialChar \menuseparator
12261 File\SpecialChar \menuseparator
12262 Child
12263 \begin_inset space ~
12264 \end_inset
12265
12266 Document
12267 \family default
12268 ).
12269  Details on how to create a table float can be found in the files 
12270 \family typewriter
12271 ws-ijmpc.tex
12272 \family default
12273  and 
12274 \family typewriter
12275 ws-ijmpd.tex
12276 \family default
12277 , included in the corresponding packages.
12278 \end_layout
12279
12280 \begin_layout Subsection
12281 Preparing a paper for submission
12282 \end_layout
12283
12284 \begin_layout Standard
12285 Before you submit your paper you must export the LyX document as a LaTeX
12286  file (
12287 \family sans
12288 File\SpecialChar \menuseparator
12289 Export\SpecialChar \menuseparator
12290 LaTeX
12291 \family default
12292 )
12293 \begin_inset Foot
12294 status open
12295
12296 \begin_layout Plain Layout
12297 Actually you have the choice between LaTeX (plain) and pdflatex.
12298  If you intend to use pdflatex to prepare the paper, you should use the
12299  pdflatex option so that included graphics are converted to PDF format,
12300  ready for use by pdflatex.
12301 \end_layout
12302
12303 \end_inset
12304
12305 , then make the following changes to the resulting 
12306 \family typewriter
12307 .tex
12308 \family default
12309  file.
12310 \end_layout
12311
12312 \begin_layout Enumerate
12313 Remove the comment lines before the 
12314 \family typewriter
12315
12316 \backslash
12317 documentclass
12318 \family default
12319  command.
12320 \end_layout
12321
12322 \begin_layout Enumerate
12323 Remove everything between (and including) the 
12324 \family typewriter
12325
12326 \backslash
12327 makeatletter
12328 \family default
12329  and 
12330 \family typewriter
12331
12332 \backslash
12333 makeatother
12334 \family default
12335  commands, except for any commands you specifically put into the LaTeX preamble.
12336 \end_layout
12337
12338 \begin_layout Standard
12339 The modified 
12340 \family typewriter
12341 .tex
12342 \family default
12343  file should be saved and processed through LaTeX as many times as necessary.
12344  You may also want to check the resulting 
12345 \family typewriter
12346 .dvi
12347 \family default
12348  document.
12349 \end_layout
12350
12351 \begin_layout Subsection
12352 Use of TeX code
12353 \end_layout
12354
12355 \begin_layout Standard
12356 The use of TeX code is reduced to two commands, which must be placed at
12357  the top of the document.
12358  If you started writing your paper by using the 
12359 \family typewriter
12360 ijmpc.lyx
12361 \family default
12362  or the 
12363 \family typewriter
12364 ijmpd.lyx
12365 \family default
12366  template, the TeX code needed is already in its place; you usually don't
12367  need to delete it.
12368  You may only modify the first TeX code to specify the information printed
12369  to the top of odd and even pages (authors' names and short paper's title,
12370  respectively).
12371  This TeX code must have the form 
12372 \family typewriter
12373
12374 \backslash
12375 markboth{Authors' Names}{Short Paper's Title}
12376 \family default
12377 .
12378 \end_layout
12379
12380 \begin_layout Section
12381 iopart
12382 \end_layout
12383
12384 \begin_layout Standard
12385 by 
12386 \noun on
12387 Uwe Stöhr
12388 \end_layout
12389
12390 \begin_layout Subsection
12391 Overview
12392 \end_layout
12393
12394 \begin_layout Standard
12395 The iopart package provides a document class to create electronic manuscript
12396  submission to the journals published by the Institute of Physics.
12397  Instructions for the authors how to create a paper using the iopart class
12398  can be downloaded together with the iopart package from the site 
12399 \begin_inset Flex URL
12400 status collapsed
12401
12402 \begin_layout Plain Layout
12403
12404 ftp://ftp.iop.org/pub/journals/latex2e
12405 \end_layout
12406
12407 \end_inset
12408
12409 .
12410 \end_layout
12411
12412 \begin_layout Subsection
12413 Writing a paper
12414 \end_layout
12415
12416 \begin_layout Standard
12417 The easiest way to write a paper is to start with the file 
12418 \emph on
12419 IOP-article.lyx
12420 \emph default
12421  that is available in LyX's examples files folder.
12422  Open this file, save it under a new name, and start writing.
12423  The example file explains how to use the special text environments.
12424  Here are the most important advices:
12425 \end_layout
12426
12427 \begin_layout Itemize
12428 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12429  two options 
12430 \family sans
12431 Use AMS math package
12432 \family default
12433  in the document settings under 
12434 \family sans
12435 Math Options
12436 \family default
12437  are not used!
12438 \end_layout
12439
12440 \begin_layout Itemize
12441
12442 \size normal
12443 The title environment defines the kind of your paper.
12444  So use one of the following environments for the title:
12445 \end_layout
12446
12447 \begin_deeper
12448 \begin_layout Itemize
12449
12450 \family sans
12451 \size normal
12452 Title
12453 \family default
12454  for a Paper
12455 \end_layout
12456
12457 \begin_layout Itemize
12458
12459 \family sans
12460 \size normal
12461 Review
12462 \family default
12463  for a Review
12464 \end_layout
12465
12466 \begin_layout Itemize
12467
12468 \family sans
12469 \size normal
12470 Topical
12471 \family default
12472  for a Topical review
12473 \end_layout
12474
12475 \begin_layout Itemize
12476
12477 \family sans
12478 \size normal
12479 Comment
12480 \family default
12481  for a Comment
12482 \end_layout
12483
12484 \begin_layout Itemize
12485
12486 \family sans
12487 \size normal
12488 Note
12489 \family default
12490  for a Note
12491 \end_layout
12492
12493 \begin_layout Itemize
12494
12495 \family sans
12496 \size normal
12497 Paper
12498 \family default
12499  for a Paper (same as Title)
12500 \end_layout
12501
12502 \begin_layout Itemize
12503
12504 \family sans
12505 \size normal
12506 Prelim
12507 \family default
12508  for a Preliminary communication
12509 \end_layout
12510
12511 \begin_layout Itemize
12512
12513 \family sans
12514 \size normal
12515 Rapid
12516 \family default
12517  for a Rapid communication
12518 \end_layout
12519
12520 \begin_layout Itemize
12521
12522 \family sans
12523 \size normal
12524 Letter
12525 \family default
12526  for a Letter to the editor
12527 \end_layout
12528
12529 \end_deeper
12530 \begin_layout Itemize
12531
12532 \size normal
12533 All title environments except of 
12534 \family sans
12535 Letter
12536 \family default
12537  can have an optional short title.
12538 \end_layout
12539
12540 \begin_layout Itemize
12541 There is a general title environment 
12542 \family sans
12543 Article
12544 \family default
12545  which is not directly supported by the LyX.
12546  This can be used as TeX code when your document doesn't fit into one of
12547  the other title types.
12548 \end_layout
12549
12550 \begin_layout Standard
12551 For more informations like hints for special table and formula formatting,
12552  look at the IOP author guidelines.
12553 \end_layout
12554
12555 \begin_layout Section
12556 Kluwer
12557 \end_layout
12558
12559 \begin_layout Standard
12560 by 
12561 \noun on
12562 Panayotis Papasotiriou
12563 \end_layout
12564
12565 \begin_layout Subsection
12566 Overview
12567 \end_layout
12568
12569 \begin_layout Standard
12570 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12571  that facilitates electronic manuscript submission to the journals they
12572  publish.
12573  Most known of them (at least in my domain of interest) are 
12574 \emph on
12575 Astrophysics and Space Science
12576 \emph default
12577  and 
12578 \emph on
12579 Solar Physics
12580 \emph default
12581 , but there are many others (see a complete list at 
12582 \begin_inset Flex URL
12583 status open
12584
12585 \begin_layout Plain Layout
12586
12587 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12588 \end_layout
12589
12590 \end_inset
12591
12592 ).
12593  The Kluwer package may be downloaded from the site 
12594 \begin_inset Flex URL
12595 status collapsed
12596
12597 \begin_layout Plain Layout
12598
12599 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12600 \end_layout
12601
12602 \end_inset
12603
12604 .
12605  A complete user guide is contained in that package (but it can also be
12606  downloaded separately).
12607 \end_layout
12608
12609 \begin_layout Standard
12610 LyX supports many features of the package but not everything.
12611  However, the TeX code needed is reduced to some 
12612 \begin_inset Quotes eld
12613 \end_inset
12614
12615 peculiar
12616 \begin_inset Quotes erd
12617 \end_inset
12618
12619  commands of the package (see
12620 \begin_inset space ~
12621 \end_inset
12622
12623
12624 \begin_inset CommandInset ref
12625 LatexCommand ref
12626 reference "subsec:kluwer_peculiarities"
12627
12628 \end_inset
12629
12630 ).
12631  I have recently used LyX to write an article submitted to the 
12632 \emph on
12633 Astrophysics and Space Science
12634 \emph default
12635  without any problem.
12636 \end_layout
12637
12638 \begin_layout Subsection
12639 Writing a paper
12640 \end_layout
12641
12642 \begin_layout Standard
12643 The easiest way to write a paper is to start with the Kluwer template file.
12644  Click on 
12645 \family sans
12646 File\SpecialChar \menuseparator
12647 New from
12648 \family default
12649  
12650 \family sans
12651 Template
12652 \family default
12653 , then choose the 
12654 \family typewriter
12655 kluwer.lyx
12656 \family default
12657  template.
12658  This will give an (almost) empty document that includes the most common
12659  fields found in a manuscript and a short description of their use.
12660  As in most templates, simply overwrite the existing text (including the
12661  brackets, 
12662 \family typewriter
12663 <>
12664 \family default
12665 ) with the correct information.
12666 \end_layout
12667
12668 \begin_layout Subsection
12669 Preparing a paper for submission
12670 \end_layout
12671
12672 \begin_layout Standard
12673 As in the AASTeX package, before you submit your paper to a journal you
12674  must 
12675 \begin_inset Quotes eld
12676 \end_inset
12677
12678 postprocess
12679 \begin_inset Quotes erd
12680 \end_inset
12681
12682  it as follows.
12683 \end_layout
12684
12685 \begin_layout Enumerate
12686 Export your paper as a LaTeX file.
12687  To do this, click on 
12688 \family sans
12689 File\SpecialChar \menuseparator
12690 Export\SpecialChar \menuseparator
12691 LaTeX
12692 \family default
12693 .
12694  
12695 \end_layout
12696
12697 \begin_layout Enumerate
12698 Edit the resulting 
12699 \family typewriter
12700 .tex
12701 \family default
12702  file with a text editor and make the following changes
12703 \end_layout
12704
12705 \begin_deeper
12706 \begin_layout Enumerate
12707 remove the comment lines before the 
12708 \family typewriter
12709
12710 \backslash
12711 documentclass
12712 \family default
12713  command,
12714 \end_layout
12715
12716 \begin_layout Enumerate
12717 remove everything between (and including) the 
12718 \family typewriter
12719
12720 \backslash
12721 makeatletter
12722 \family default
12723  and 
12724 \family typewriter
12725
12726 \backslash
12727 makeatother
12728 \family default
12729  commands, except for any commands you specifically put into the LaTeX preamble.
12730 \end_layout
12731
12732 \begin_layout Standard
12733 Save the resulting 
12734 \family typewriter
12735 .tex
12736 \family default
12737  file.
12738 \end_layout
12739
12740 \end_deeper
12741 \begin_layout Enumerate
12742 Run the 
12743 \family typewriter
12744 .tex
12745 \family default
12746  file through LaTeX as many times as necessary (usually up to three).
12747 \end_layout
12748
12749 \begin_layout Enumerate
12750 View the resulting 
12751 \family typewriter
12752 .dvi
12753 \family default
12754  document using, e.
12755 \begin_inset space \thinspace{}
12756 \end_inset
12757
12758 g.
12759 \begin_inset space \space{}
12760 \end_inset
12761
12762
12763 \family sans
12764 xdvi
12765 \family default
12766 , and check if everything is OK (it should, if you didn't make any mistake).
12767 \end_layout
12768
12769 \begin_layout Subsection
12770 \begin_inset Quotes eld
12771 \end_inset
12772
12773 Peculiarities
12774 \begin_inset Quotes erd
12775 \end_inset
12776
12777  of the Kluwer package
12778 \begin_inset CommandInset label
12779 LatexCommand label
12780 name "subsec:kluwer_peculiarities"
12781
12782 \end_inset
12783
12784
12785 \end_layout
12786
12787 \begin_layout Standard
12788 The Kluwer package has the following 
12789 \begin_inset Quotes eld
12790 \end_inset
12791
12792 peculiarities
12793 \begin_inset Quotes erd
12794 \end_inset
12795
12796 .
12797 \end_layout
12798
12799 \begin_layout Enumerate
12800 It is possible to write multiple articles in the same LaTeX file
12801 \begin_inset Foot
12802 status collapsed
12803
12804 \begin_layout Plain Layout
12805 I can't imagine any good reason to do this.
12806 \end_layout
12807
12808 \end_inset
12809
12810 .
12811  Each article must be included in the environment 
12812 \begin_inset Quotes eld
12813 \end_inset
12814
12815 article
12816 \begin_inset Quotes erd
12817 \end_inset
12818
12819 .
12820  Unfortunately, this environment cannot be omitted, even if you write just
12821  one article.
12822  Therefore, each article starts with the command 
12823 \family typewriter
12824
12825 \backslash
12826 begin{article}
12827 \family default
12828  and, obviously, ends with the command 
12829 \family typewriter
12830
12831 \backslash
12832 end{article}
12833 \family default
12834 .
12835  Although this can be implemented in LyX, I didn't included it, since it
12836  looks ugly and can confuse the novice user.
12837  Therefore, you need to enter them directly and mark them as LaTeX code
12838  (the well-known 
12839 \begin_inset Quotes eld
12840 \end_inset
12841
12842 TeX code
12843 \begin_inset Quotes erd
12844 \end_inset
12845
12846 ).
12847 \end_layout
12848
12849 \begin_layout Enumerate
12850 Information given at the beginning of the article (i.
12851 \begin_inset space \thinspace{}
12852 \end_inset
12853
12854 g.
12855 \begin_inset space \space{}
12856 \end_inset
12857
12858 title, subtitle, author, institution, running title, running author, abstract
12859  and keywords) must be included in an environment called 
12860 \begin_inset Quotes eld
12861 \end_inset
12862
12863 opening
12864 \begin_inset Quotes erd
12865 \end_inset
12866
12867 .
12868  This is not implemented in LyX, so you must enter title, subtitle etc.
12869 \begin_inset space ~
12870 \end_inset
12871
12872 between two TeX code lines (
12873 \family typewriter
12874
12875 \backslash
12876 begin{opening}
12877 \family default
12878  and 
12879 \family typewriter
12880
12881 \backslash
12882 end{opening}
12883 \family default
12884 ).
12885 \end_layout
12886
12887 \begin_layout Enumerate
12888 According to the user manual, the label of each bibliography item must be
12889  written as 
12890 \family typewriter
12891
12892 \backslash
12893 protect
12894 \backslash
12895 citeauthoryear{
12896 \family default
12897 \emph on
12898 author(s)
12899 \family typewriter
12900 \emph default
12901 }{
12902 \family default
12903 \emph on
12904 year
12905 \family typewriter
12906 \emph default
12907 }
12908 \family default
12909 .
12910 \end_layout
12911
12912 \begin_layout Standard
12913 The 
12914 \family typewriter
12915 kluwer.lyx
12916 \family default
12917  template takes care of all these 
12918 \begin_inset Quotes eld
12919 \end_inset
12920
12921 peculiarities
12922 \begin_inset Quotes erd
12923 \end_inset
12924
12925 .
12926  If you start a new paper using this template you don't need to do anything
12927  special.
12928  Just 
12929 \end_layout
12930
12931 \begin_layout Enumerate
12932 don't delete the TeX code included in the template, and
12933 \end_layout
12934
12935 \begin_layout Enumerate
12936 copy the example bibliography item included in the template and modify it
12937  as necessary to enter new bibliography items.
12938 \end_layout
12939
12940 \begin_layout Section
12941 Koma-Script
12942 \end_layout
12943
12944 \begin_layout Standard
12945 by 
12946 \noun on
12947 Bernd Rellermeyer
12948 \end_layout
12949
12950 \begin_layout Subsection
12951 Overview
12952 \end_layout
12953
12954 \begin_layout Standard
12955 The LyX document classes 
12956 \emph on
12957 article (koma-script)
12958 \emph default
12959
12960 \emph on
12961 report (koma-script)
12962 \emph default
12963
12964 \emph on
12965 book
12966 \emph default
12967  
12968 \emph on
12969 (koma-script)
12970 \emph default
12971 , and 
12972 \emph on
12973 letter
12974 \emph default
12975  
12976 \emph on
12977 (koma-script)
12978 \emph default
12979  correspond to the LaTeX document classes 
12980 \family typewriter
12981 scrartcl.cls
12982 \family default
12983
12984 \family typewriter
12985 scrreprt.cls
12986 \family default
12987
12988 \family typewriter
12989 scrbook.cls
12990 \family default
12991 , and 
12992 \family typewriter
12993 scrlettr.cls
12994 \family default
12995 , resp.
12996 \begin_inset space ~
12997 \end_inset
12998
12999 of the Koma-Script family.
13000  They are replacements for the standard document classes 
13001 \family typewriter
13002 article.cls
13003 \family default
13004
13005 \family typewriter
13006 report.cls
13007 \family default
13008
13009 \family typewriter
13010 book.cls
13011 \family default
13012  and 
13013 \family typewriter
13014 letter.cls
13015 \family default
13016 , resp., and fit better to European typography conventions in a number of
13017  points.
13018 \end_layout
13019
13020 \begin_layout Itemize
13021 Standard character size is 11pt in 
13022 \emph on
13023 article (koma-script)
13024 \emph default
13025
13026 \emph on
13027 report (koma-script)
13028 \emph default
13029 , and 
13030 \emph on
13031 book (koma-script)
13032 \emph default
13033 , and 12pt in 
13034 \emph on
13035 letter (koma-script)
13036 \emph default
13037 .
13038 \end_layout
13039
13040 \begin_layout Itemize
13041 Headings, labels of the description environment, and a number of elements
13042  of the 
13043 \emph on
13044 letter (koma-script)
13045 \emph default
13046  document class are set in a bold sans serif font.
13047 \begin_inset Foot
13048 status collapsed
13049
13050 \begin_layout Plain Layout
13051 There is a big difference between the bold sans serif old cm fonts and new
13052  ec fonts, especially in the appearance of headings.
13053  In comparison, the ec bold sans serif fonts look a bit thin.
13054  Here the LaTeX package 
13055 \family typewriter
13056 cmsd.sty by
13057 \family default
13058  
13059 \shape smallcaps
13060 Walter Schmidt
13061 \shape default
13062  helps to produce the 
13063 \begin_inset Quotes eld
13064 \end_inset
13065
13066 usual
13067 \begin_inset Quotes erd
13068 \end_inset
13069
13070  appearance when using the ec fonts.
13071 \end_layout
13072
13073 \end_inset
13074
13075  The numbering of chapter headings is made in the same way as the numbering
13076  of section headings, that is without the extra line 
13077 \begin_inset Quotes eld
13078 \end_inset
13079
13080 Chapter\SpecialChar \ldots{}
13081
13082 \begin_inset Quotes erd
13083 \end_inset
13084
13085 .
13086  In addition, the appearance of the headings can be modified by using a
13087  number of options (in LyX to be entered in the field 
13088 \family sans
13089 Extra
13090 \begin_inset space ~
13091 \end_inset
13092
13093 Options
13094 \family default
13095  of the dialog 
13096 \family sans
13097 Layout\SpecialChar \menuseparator
13098 Document
13099 \family default
13100 ).
13101  
13102 \end_layout
13103
13104 \begin_layout Itemize
13105 The main means in the Koma-Script document classes to design the type area
13106  are the options 
13107 \family sans
13108 BCOR
13109 \family default
13110  and 
13111 \family sans
13112 DIV
13113 \family default
13114  (in LyX to be entered in the extra class options field in the dialog 
13115 \family sans
13116 Document\SpecialChar \menuseparator
13117 Settings
13118 \family default
13119 ).
13120  They make a clearer modification of page margins possible as do the options
13121  of the dialog 
13122 \family sans
13123 Document\SpecialChar \menuseparator
13124 Settings
13125 \family default
13126 .
13127  
13128 \end_layout
13129
13130 \begin_layout Itemize
13131 The LaTeX document classes of the Koma-Script family define a number of
13132  additional commands.
13133  Those part of it which makes sense in LyX is implemented in corresponding
13134  paragraph types.
13135 \end_layout
13136
13137 \begin_layout Standard
13138 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13139  can be found in the Koma-Script documentation 
13140 \emph on
13141 scrguide
13142 \emph default
13143  (German) and 
13144 \emph on
13145 scrguien
13146 \emph default
13147  (English).
13148 \end_layout
13149
13150 \begin_layout Subsection
13151 article (koma-script), report (koma-script), and book (koma-script)
13152 \end_layout
13153
13154 \begin_layout Standard
13155 The document classes 
13156 \emph on
13157 article (koma-script)
13158 \emph default
13159
13160 \emph on
13161 report (koma-script)
13162 \emph default
13163 , and 
13164 \emph on
13165 book
13166 \emph default
13167  
13168 \emph on
13169 (koma-script)
13170 \emph default
13171  are implemented in the layout files 
13172 \family typewriter
13173 scrartcl.layout
13174 \family default
13175
13176 \family typewriter
13177 scrreprt.layout
13178 \family default
13179 , and 
13180 \family typewriter
13181 scrbook.layout
13182 \family default
13183 , resp.
13184  They contain all the paragraph types of the corresponding standard document
13185  classes 
13186 \emph on
13187 article
13188 \emph default
13189
13190 \emph on
13191 report
13192 \emph default
13193 , and 
13194 \emph on
13195 book
13196 \emph default
13197 , resp., partly modified, with the exception of the LyX specific 
13198 \family sans
13199 List
13200 \family default
13201 -type, which is replaced by the new 
13202 \family sans
13203 Labeling
13204 \family default
13205 -type having the same functionality.
13206  Beside the 
13207 \family sans
13208 Labeling
13209 \family default
13210 -Type there is a number of new paragraph types added.
13211  They are 
13212 \emph on
13213 not
13214 \emph default
13215  part of 
13216 \emph on
13217 letter (koma-script)
13218 \emph default
13219 .
13220 \end_layout
13221
13222 \begin_layout Itemize
13223
13224 \family sans
13225 Addpart, Addchap
13226 \family default
13227
13228 \family sans
13229 Addsec
13230 \family default
13231 : are equivalents to 
13232 \family sans
13233 Part*, Chapter*
13234 \family default
13235  and 
13236 \family sans
13237 Section*
13238 \family default
13239 , resp., additionally inserting an entry in the table of contents.
13240  
13241 \family sans
13242 Addpart
13243 \family default
13244  and 
13245 \family sans
13246 Addchap
13247 \family default
13248  are not contained in 
13249 \emph on
13250 article (koma-script)
13251 \emph default
13252 .
13253 \end_layout
13254
13255 \begin_layout Itemize
13256
13257 \family sans
13258 Addchap*
13259 \family default
13260
13261 \family sans
13262 Addsec*
13263 \family default
13264 : behave exactly as 
13265 \family sans
13266 Addchap
13267 \family default
13268  and 
13269 \family sans
13270 Addsec
13271 \family default
13272 , resp., additionally clearing running heads.
13273  
13274 \family sans
13275 Addchap*
13276 \family default
13277  is not contained in 
13278 \emph on
13279 article (koma-script)
13280 \emph default
13281 .
13282 \begin_inset Foot
13283 status collapsed
13284
13285 \begin_layout Plain Layout
13286 There is also an 
13287 \family typewriter
13288
13289 \backslash
13290 addpart*
13291 \family default
13292  command in 
13293 \emph on
13294 book (koma-script)
13295 \emph default
13296  and in 
13297 \emph on
13298 report (koma-script)
13299 \emph default
13300 , but since this is identical to 
13301 \family sans
13302 Part*
13303 \family default
13304 , is has not been implemented in LyX.
13305 \end_layout
13306
13307 \end_inset
13308
13309
13310 \end_layout
13311
13312 \begin_layout Itemize
13313
13314 \family sans
13315 Minisec
13316 \family default
13317 : generates a heading directly above the following paragraph in the standard
13318  character size without affecting the structure of the document.
13319 \end_layout
13320
13321 \begin_layout Itemize
13322
13323 \family sans
13324 Captionabove
13325 \family default
13326  and 
13327 \family sans
13328 Captionbelow
13329 \family default
13330  are special captions which respect the different space settings needed
13331  for captions placed above or below an element (if you follow strict typographic
13332  rules, you might want to place table captions always above the table).
13333  You can also use the class option 
13334 \family typewriter
13335 tablecaptionsabove
13336 \family default
13337 , which will switch 
13338 \family sans
13339 caption
13340 \family default
13341  to 
13342 \family sans
13343 captionabove
13344 \family default
13345  for tables and 
13346 \family sans
13347 captionbelow
13348 \family default
13349  for figures.
13350  You need at least Koma-Script version 2.8q to use this.
13351 \end_layout
13352
13353 \begin_layout Itemize
13354
13355 \family sans
13356 Dictum
13357 \family default
13358 : can be used to set a bonmot, e.
13359 \begin_inset space \thinspace{}
13360 \end_inset
13361
13362 g.
13363 \begin_inset space \space{}
13364 \end_inset
13365
13366 at the beginning of a chapter.
13367  If you use the optional argument (
13368 \family sans
13369 Insert\SpecialChar \menuseparator
13370 Short
13371 \begin_inset space ~
13372 \end_inset
13373
13374 Title
13375 \family default
13376 ), you can insert the dictum's author there.
13377  Dictum and author are separated by a line.
13378  You need at least Koma-Script version 2.8q to use this.
13379  
13380 \family sans
13381 Dictum
13382 \family default
13383  is not contained in 
13384 \emph on
13385 article (koma-script)
13386 \emph default
13387 .
13388 \end_layout
13389
13390 \begin_layout Standard
13391 The following types, together with the standard types 
13392 \family sans
13393 Title
13394 \family default
13395
13396 \family sans
13397 Author
13398 \family default
13399 , and 
13400 \family sans
13401 Date
13402 \family default
13403 , form the title area of the document.
13404  They must be entered ahead of the first 
13405 \begin_inset Quotes eld
13406 \end_inset
13407
13408 ordinary
13409 \begin_inset Quotes erd
13410 \end_inset
13411
13412  paragraph.
13413 \begin_inset Foot
13414 status collapsed
13415
13416 \begin_layout Plain Layout
13417 The corresponding LaTeX commands must appear before the 
13418 \family typewriter
13419
13420 \backslash
13421 maketitle
13422 \family default
13423  command.
13424 \end_layout
13425
13426 \end_inset
13427
13428  When such a type is used more than once, the latter usage overwrites the
13429  former one, that means, for every type only the latest usage is valid.
13430  The order of the different types however has, like 
13431 \family sans
13432 Title
13433 \family default
13434
13435 \family sans
13436 Author
13437 \family default
13438 , and 
13439 \family sans
13440 Date
13441 \family default
13442 , no effect on the appearance of the produced document.
13443 \end_layout
13444
13445 \begin_layout Itemize
13446
13447 \family sans
13448 Subject
13449 \family default
13450 : produces a centered paragraph above the ordinary title (
13451 \family sans
13452 Title
13453 \family default
13454
13455 \family sans
13456 Author
13457 \family default
13458
13459 \family sans
13460 Date
13461 \family default
13462 ) for the subject of the document.
13463 \end_layout
13464
13465 \begin_layout Itemize
13466
13467 \family sans
13468 Publishers
13469 \family default
13470 : produces a centered paragraph below the ordinary title (
13471 \family sans
13472 Title
13473 \family default
13474
13475 \family sans
13476 Author
13477 \family default
13478
13479 \family sans
13480 Date
13481 \family default
13482 ) for the publishers' name.
13483 \end_layout
13484
13485 \begin_layout Itemize
13486
13487 \family sans
13488 Dedication
13489 \family default
13490 : in 
13491 \emph on
13492 report (koma-script)
13493 \emph default
13494  and 
13495 \emph on
13496 book (koma-script)
13497 \emph default
13498  produces a centered paragraph on its own page behind the title page, or
13499  in 
13500 \emph on
13501 article (koma-script)
13502 \emph default
13503  produces a centered paragraph below the ordinary title (
13504 \family sans
13505 Title
13506 \family default
13507
13508 \family sans
13509 Author
13510 \family default
13511
13512 \family sans
13513 Date
13514 \family default
13515
13516 \family sans
13517 Publishers
13518 \family default
13519 ) for a dedication.
13520 \end_layout
13521
13522 \begin_layout Itemize
13523
13524 \family sans
13525 Titlehead
13526 \family default
13527 : produces a left aligned paragraph above the ordinary title (
13528 \family sans
13529 Title
13530 \family default
13531
13532 \family sans
13533 Author
13534 \family default
13535
13536 \family sans
13537 Date
13538 \family default
13539
13540 \family sans
13541 Subject
13542 \family default
13543 ) for a document`s head.
13544 \end_layout
13545
13546 \begin_layout Itemize
13547
13548 \family sans
13549 Uppertitleback
13550 \family default
13551 : produces in a double-sided print in 
13552 \emph on
13553 report (koma-script)
13554 \emph default
13555  and 
13556 \emph on
13557 book (koma-script)
13558 \emph default
13559  a left-aligned paragraph at the top of the title page`s back or has no
13560  effect in a single-sided print or in 
13561 \emph on
13562 article (koma-script)
13563 \emph default
13564 .
13565 \end_layout
13566
13567 \begin_layout Itemize
13568
13569 \family sans
13570 Lowertitleback
13571 \family default
13572 : produces in a double-sided print in 
13573 \emph on
13574 report (koma-script)
13575 \emph default
13576  and 
13577 \emph on
13578 book (koma-script)
13579 \emph default
13580  a left-aligned paragraph at the bottom of the title page`s back or has
13581  no effect in a single-sided print or in 
13582 \emph on
13583 article (koma-script)
13584 \emph default
13585 .
13586 \end_layout
13587
13588 \begin_layout Itemize
13589
13590 \family sans
13591 Extratitle
13592 \family default
13593 : produces a special 
13594 \begin_inset Quotes eld
13595 \end_inset
13596
13597 dirty
13598 \begin_inset Quotes erd
13599 \end_inset
13600
13601  page ahead of the actual document containing a paragraph without special
13602  formatting.
13603 \end_layout
13604
13605 \begin_layout Standard
13606 The layout files for the document classes 
13607 \emph on
13608 article (koma-script)
13609 \emph default
13610
13611 \emph on
13612 report (koma-script)
13613 \emph default
13614 , and 
13615 \emph on
13616 book (koma-script)
13617 \emph default
13618  do include the file 
13619 \family typewriter
13620 scrmacros.inc
13621 \family default
13622 .
13623  This is thought of as a place to define your own types.
13624  Copy scrmacros
13625 \family typewriter
13626 .inc
13627 \family default
13628  in your personal layout directory and edit the file!
13629 \end_layout
13630
13631 \begin_layout Subsection
13632 letter (koma-script)
13633 \end_layout
13634
13635 \begin_layout Standard
13636 \noindent
13637 The document class 
13638 \emph on
13639 letter (koma-script)
13640 \emph default
13641  is implemented in the layout file 
13642 \family typewriter
13643 scrlettr.layout
13644 \family default
13645 .
13646  It contains all the paragraph types of the corresponding standard document
13647  class 
13648 \emph on
13649 letter
13650 \emph default
13651 , partly modified, with the exception of the LyX specific types 
13652 \family sans
13653 LyX-Code
13654 \family default
13655  and 
13656 \family sans
13657 Comment
13658 \family default
13659  and the 
13660 \family sans
13661 List
13662 \family default
13663  type, which is replaced by the new 
13664 \family sans
13665 Labeling
13666 \family default
13667  type.
13668  In addition, it contains, in contrast to the standard document class, the
13669  standard types 
13670 \family sans
13671 LaTeX
13672 \family default
13673
13674 \family sans
13675 Quotation
13676 \family default
13677
13678 \family sans
13679 Quote
13680 \family default
13681 , and 
13682 \family sans
13683 Verse
13684 \family default
13685 .
13686  Furthermore, there are a number of new letter specific types.
13687 \end_layout
13688
13689 \begin_layout Standard
13690 The appearance of the letter produced by this document class can be controlled
13691  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13692 \begin_inset Foot
13693 status collapsed
13694
13695 \begin_layout Plain Layout
13696 For example, the standard appearance of the letter`s heading, consisting
13697  of name and address, is quite self-willed.
13698  An 
13699 \begin_inset Quotes eld
13700 \end_inset
13701
13702 ordinary
13703 \begin_inset Quotes erd
13704 \end_inset
13705
13706  heading is produced by the following LaTeX commands in the preamble:
13707 \end_layout
13708
13709 \begin_layout LyX-Code
13710
13711 \backslash
13712 firsthead{
13713 \backslash
13714 parbox[b]{
13715 \backslash
13716 textwidth}
13717 \end_layout
13718
13719 \begin_layout LyX-Code
13720   {
13721 \backslash
13722 ignorespaces 
13723 \backslash
13724 fromname
13725 \backslash
13726
13727 \backslash
13728  
13729 \backslash
13730 ignorespaces 
13731 \backslash
13732 fromaddress}} 
13733 \end_layout
13734
13735 \begin_layout LyX-Code
13736
13737 \backslash
13738 nexthead{
13739 \backslash
13740 parbox[b]{
13741 \backslash
13742 textwidth}
13743 \end_layout
13744
13745 \begin_layout LyX-Code
13746   {
13747 \backslash
13748 ignorespaces 
13749 \backslash
13750 fromname 
13751 \backslash
13752 hfill 
13753 \backslash
13754 ignorespaces 
13755 \backslash
13756 pagename
13757 \backslash
13758  
13759 \backslash
13760 thepage}}
13761 \end_layout
13762
13763 \end_inset
13764
13765  A detailed German description of such LaTeX commands can be found in the
13766  Koma-Script documentation 
13767 \emph on
13768 scrguide
13769 \emph default
13770 .
13771  With it, the letter's author can produce his personal letter layout.
13772 \end_layout
13773
13774 \begin_layout Standard
13775 The types 
13776 \family sans
13777 Letter
13778 \family default
13779  and 
13780 \family sans
13781 Opening
13782 \family default
13783  define the beginning of the letter and must be used in every letter.
13784  To emphasize them in the LyX document class, they are marked with the letter
13785  
13786 \shape italic
13787 L
13788 \shape default
13789  or 
13790 \shape italic
13791 O
13792 \shape default
13793 , resp.
13794 \begin_inset space ~
13795 \end_inset
13796
13797 in the left margin.
13798  It is possible to write any number of letters in one file.
13799  An 
13800 \family sans
13801 Opening
13802 \family default
13803  type produces a new letter using the same addressee and a 
13804 \family sans
13805 Letter
13806 \family default
13807  type produces a new addressee.
13808  The types 
13809 \family sans
13810 Closing
13811 \family default
13812
13813 \family sans
13814 PS
13815 \family default
13816
13817 \family sans
13818 CC
13819 \family default
13820 , and 
13821 \family sans
13822 Encl
13823 \family default
13824  are ordinary paragraph types and can also be used several times in one
13825  and the same letter.
13826 \end_layout
13827
13828 \begin_layout Itemize
13829
13830 \family sans
13831 Letter
13832 \family default
13833 : produces a paragraph for the addressee and implicitly defines the beginning
13834  of the letter.
13835 \end_layout
13836
13837 \begin_layout Itemize
13838
13839 \family sans
13840 Opening
13841 \family default
13842 : produces a paragraph for the form of address and implicitly produces a
13843  new letter.
13844 \end_layout
13845
13846 \begin_layout Itemize
13847
13848 \family sans
13849 Closing
13850 \family default
13851 : produces a paragraph for a close.
13852 \end_layout
13853
13854 \begin_layout Itemize
13855
13856 \family sans
13857 PS
13858 \family default
13859 : produces a paragraph for a postscript.
13860 \end_layout
13861
13862 \begin_layout Itemize
13863
13864 \family sans
13865 CC
13866 \family default
13867 : produces a paragraph for a distribution list.
13868 \end_layout
13869
13870 \begin_layout Itemize
13871
13872 \family sans
13873 Encl
13874 \family default
13875 : produces a paragraph for enclosures.
13876 \end_layout
13877
13878 \begin_layout Standard
13879 The types 
13880 \family sans
13881 Name
13882 \family default
13883
13884 \family sans
13885 Signature
13886 \family default
13887
13888 \family sans
13889 Address
13890 \family default
13891
13892 \family sans
13893 Telephone
13894 \family default
13895
13896 \family sans
13897 Place
13898 \family default
13899
13900 \family sans
13901 Backaddress
13902 \family default
13903
13904 \family sans
13905 Specialmail
13906 \family default
13907
13908 \family sans
13909 Location
13910 \family default
13911
13912 \family sans
13913 Title
13914 \family default
13915 , and 
13916 \family sans
13917 Subject
13918 \family default
13919  are input types provided with a label to enter information, which will
13920  be processed by the document class.
13921 \begin_inset Foot
13922 status open
13923
13924 \begin_layout Plain Layout
13925 It could be seen as a matter of inconsequence, that the types 
13926 \family sans
13927 Letter
13928 \family default
13929  and 
13930 \family sans
13931 Opening
13932 \family default
13933  described above are not such input types as well.
13934  Because of the special meaning of those types, however, I have implemented
13935  them as ordinary paragraph types with a one letter mark in the left margin.
13936  Moreover, it would affect my feeling of symmetry, if the 
13937 \family sans
13938 Opening
13939 \family default
13940  type and the 
13941 \family sans
13942 Closing
13943 \family default
13944  type had such a serious different appearance.
13945 \end_layout
13946
13947 \end_inset
13948
13949  The types must be used ahead of the corresponding 
13950 \family sans
13951 Opening
13952 \family default
13953  type.
13954 \end_layout
13955
13956 \begin_layout Standard
13957 An implementation of these types in a WYSIWYG fashion does not seem to make
13958  sense, because the real appearance of the produced letter does not only
13959  depend on the usage of the particular type, but also on other factors.
13960  For example, a signature entered in the 
13961 \family sans
13962 Signature
13963 \family default
13964  type will in the standard behavior appear in the produced letter only,
13965  when in the same letter also a 
13966 \family sans
13967 Closing
13968 \family default
13969  type is used.
13970  The entered value of the 
13971 \family sans
13972 Telephone
13973 \family default
13974  type will in the standard behavior not appear in the produced letter at
13975  all.
13976  The possibility to design the letter`s heading freely is already indicated
13977  in a footnote above.
13978 \end_layout
13979
13980 \begin_layout Standard
13981 The input types can also be used as empty paragraphs.
13982  This makes sense e.
13983 \begin_inset space \thinspace{}
13984 \end_inset
13985
13986 g.
13987 \begin_inset space \space{}
13988 \end_inset
13989
13990 for the 
13991 \family sans
13992 Signature
13993 \family default
13994  type.
13995  If the 
13996 \family sans
13997 Signature
13998 \family default
13999  type is not used at all, in the standard behavior the value of the 
14000 \family sans
14001 Name
14002 \family default
14003  type is used as signature, whereas if an empty 
14004 \family sans
14005 Signature
14006 \family default
14007  type is used, no signature value is defined.
14008 \end_layout
14009
14010 \begin_layout Standard
14011 By using the input types it is possible to write a letter template, containing
14012  filled input types with your personal dates (name, address, etc.) and empty
14013  input types for other dates you want to enter.
14014 \end_layout
14015
14016 \begin_layout Itemize
14017
14018 \family sans
14019 Name
14020 \family default
14021 : sender's name, in the standard behavior appears as a centered paragraph
14022  in small caps in the letter`s heading.
14023 \end_layout
14024
14025 \begin_layout Itemize
14026
14027 \family sans
14028 Signature
14029 \family default
14030 : sender's signature, in the standard behavior appears below the 
14031 \family sans
14032 Closing
14033 \family default
14034  type.
14035  If no 
14036 \family sans
14037 Signature
14038 \family default
14039  type is used, the value of the 
14040 \family sans
14041 Name
14042 \family default
14043  type appears instead.
14044 \end_layout
14045
14046 \begin_layout Itemize
14047
14048 \family sans
14049 Address
14050 \family default
14051 : sender's address, in the standard behavior appears in a centered paragraph
14052  in the letter`s heading below the sender's name.
14053 \end_layout
14054
14055 \begin_layout Itemize
14056
14057 \family sans
14058 Telephone
14059 \family default
14060 : sender's telephone number, in the standard behavior only sets the LaTeX
14061  variable 
14062 \family typewriter
14063
14064 \backslash
14065 telephonenum
14066 \family default
14067 .
14068 \end_layout
14069
14070 \begin_layout Itemize
14071
14072 \family sans
14073 Place
14074 \family default
14075 : place of the letter`s making.
14076 \end_layout
14077
14078 \begin_layout Itemize
14079
14080 \family sans
14081 Date
14082 \family default
14083 : date of the letter`s making.
14084  
14085 \family sans
14086 Place
14087 \family default
14088  and 
14089 \family sans
14090 Date
14091 \family default
14092 , in the standard behavior, produce the place and the date in a right-aligned
14093  line below the addressee's field.
14094  If an empty 
14095 \family sans
14096 Date
14097 \family default
14098  type is used, neither place nor date appear, independent of the value of
14099  the 
14100 \family sans
14101 Place
14102 \family default
14103  type.
14104  If no 
14105 \family sans
14106 Date
14107 \family default
14108  type is used, the date of the letter `s production is used.
14109 \end_layout
14110
14111 \begin_layout Itemize
14112
14113 \family sans
14114 Backaddress
14115 \family default
14116 : sender`s back address, in the standard behavior appears above the addressee's
14117  field in a small sans serif font.
14118 \end_layout
14119
14120 \begin_layout Itemize
14121
14122 \family sans
14123 Specialmail
14124 \family default
14125 : special mail information, in the standard behavior appears underlined
14126  above the addressee's field below the back address.
14127 \end_layout
14128
14129 \begin_layout Itemize
14130
14131 \family sans
14132 Location
14133 \family default
14134 : additional information, in the standard behavior appears on right side
14135  below the addressee`s field.
14136 \end_layout
14137
14138 \begin_layout Itemize
14139
14140 \family sans
14141 Title
14142 \family default
14143 : the letter's title, in the standard behavior appears in a big, bold, sans
14144  serif font above the subject.
14145 \end_layout
14146
14147 \begin_layout Itemize
14148
14149 \family sans
14150 Subject
14151 \family default
14152 : the letter's subject, in the standard behavior appears in a bold font
14153  above the 
14154 \family sans
14155 Opening
14156 \family default
14157  paragraph.
14158 \end_layout
14159
14160 \begin_layout Standard
14161 The types 
14162 \family sans
14163 Yourref
14164 \family default
14165
14166 \family sans
14167 Yourmail
14168 \family default
14169
14170 \family sans
14171 Myref
14172 \family default
14173
14174 \family sans
14175 Customer
14176 \family default
14177 , and 
14178 \family sans
14179 Invoice
14180 \family default
14181  produce a business letter like line above the 
14182 \family sans
14183 Title
14184 \family default
14185  line containing the fields 
14186 \begin_inset Quotes eld
14187 \end_inset
14188
14189 Your ref.
14190 \begin_inset Quotes erd
14191 \end_inset
14192
14193
14194 \begin_inset Quotes eld
14195 \end_inset
14196
14197 Your letter of
14198 \begin_inset Quotes erd
14199 \end_inset
14200
14201
14202 \begin_inset Quotes eld
14203 \end_inset
14204
14205 Our ref.
14206 \begin_inset Quotes erd
14207 \end_inset
14208
14209
14210 \begin_inset Quotes eld
14211 \end_inset
14212
14213 Customer no.
14214 \begin_inset Quotes erd
14215 \end_inset
14216
14217
14218 \begin_inset Quotes eld
14219 \end_inset
14220
14221 Invoice no.
14222 \begin_inset Quotes erd
14223 \end_inset
14224
14225 , and 
14226 \begin_inset Quotes eld
14227 \end_inset
14228
14229 Date
14230 \begin_inset Quotes erd
14231 \end_inset
14232
14233 .
14234  For the date field, the value of the 
14235 \family sans
14236 Date
14237 \family default
14238  type is used.
14239  If one of these 
14240 \begin_inset Quotes eld
14241 \end_inset
14242
14243 business letter types
14244 \begin_inset Quotes erd
14245 \end_inset
14246
14247  is used, the value of the 
14248 \family sans
14249 Place
14250 \family default
14251  type however does not appear, but only the LaTeX variable 
14252 \family typewriter
14253
14254 \backslash
14255 fromplace
14256 \family default
14257  is set.
14258  The ordinary output of place and date in a right-aligned line below the
14259  addressee`s field is suppressed.
14260  The types are implemented as input types provided with a label and must
14261  be used ahead of the corresponding 
14262 \family sans
14263 Opening
14264 \family default
14265  type.
14266 \end_layout
14267
14268 \begin_layout Itemize
14269
14270 \family sans
14271 Yourref
14272 \family default
14273 : Your ref.
14274 \end_layout
14275
14276 \begin_layout Itemize
14277
14278 \family sans
14279 Yourmail
14280 \family default
14281 : Your letter of.
14282 \end_layout
14283
14284 \begin_layout Itemize
14285
14286 \family sans
14287 Myref
14288 \family default
14289 : Our ref.
14290 \end_layout
14291
14292 \begin_layout Itemize
14293
14294 \family sans
14295 Customer
14296 \family default
14297 : Customer no.
14298 \end_layout
14299
14300 \begin_layout Itemize
14301
14302 \family sans
14303 Invoice
14304 \family default
14305 : Invoice no.
14306 \end_layout
14307
14308 \begin_layout Subsection
14309 The new letter class: letter (koma-script v.2)
14310 \end_layout
14311
14312 \begin_layout Standard
14313 by 
14314 \noun on
14315 Jürgen Spitzmüller
14316 \end_layout
14317
14318 \begin_layout Standard
14319 \begin_inset VSpace medskip
14320 \end_inset
14321
14322
14323 \end_layout
14324
14325 \begin_layout Standard
14326 \noindent
14327 Koma-Script version 2.8 has introduced a new letter class 
14328 \family typewriter
14329 scrlttr2
14330 \family default
14331  which supersedes the now unsupported 
14332 \family typewriter
14333 scrlettr
14334 \family default
14335 .
14336  It has — on the LaTeX side — a completely new interface and is not compatible
14337  with the old class.
14338  Therefore, LyX supports both, though it is recommended you use the new
14339  class.
14340 \end_layout
14341
14342 \begin_layout Standard
14343 This class covers the same functionality as 
14344 \emph on
14345 letter (koma-script),
14346 \emph default
14347  and a few more.
14348  The basic items are 
14349 \family sans
14350 Address
14351 \family default
14352  (receiver's address, same as 
14353 \family sans
14354 Letter
14355 \family default
14356  in the old layout), 
14357 \family sans
14358 Opening
14359 \family default
14360 , and 
14361 \family sans
14362 Closing
14363 \family default
14364 .
14365  
14366 \family sans
14367 NextAddress
14368 \family default
14369  will start a new letter (i.
14370 \begin_inset space \thinspace{}
14371 \end_inset
14372
14373 g.
14374 \begin_inset space \space{}
14375 \end_inset
14376
14377 you can write several letters per document).
14378  New elements are sender's 
14379 \family sans
14380 E-Mail
14381 \family default
14382
14383 \family sans
14384 URL
14385 \family default
14386
14387 \family sans
14388 Fax
14389 \family default
14390
14391 \family sans
14392 Bank
14393 \family default
14394  and the possibility to use a 
14395 \family sans
14396 Logo
14397 \family default
14398  (via 
14399 \family sans
14400 Insert\SpecialChar \menuseparator
14401 Graphics
14402 \family default
14403 ) in the header.
14404 \end_layout
14405
14406 \begin_layout Standard
14407 The biggest improvement is, though, that the letter's layout is configurable
14408  to meet almost any needs.
14409  This can be done via the preamble or with a special style file (Letter
14410  Class Option, extension 
14411 \family typewriter
14412 *.lco
14413 \family default
14414 ), that will be read in as a class option.
14415 \begin_inset Foot
14416 status collapsed
14417
14418 \begin_layout Plain Layout
14419 The KOMA package comes with some default 
14420 \family typewriter
14421 *.lco
14422 \family default
14423  files.
14424  There is, for instance, a 
14425 \family typewriter
14426 DIN.lco
14427 \family default
14428  file that follows german typesetting rules, or a 
14429 \family typewriter
14430 KOMAold.lco
14431 \family default
14432  that provides the default layout of the old 
14433 \family typewriter
14434 scrlettr
14435 \family default
14436  class.
14437  The latter can be loaded with the class option 
14438 \family typewriter
14439 KOMAold
14440 \family default
14441 , inserted via the 
14442 \family sans
14443 \bar under
14444 L
14445 \bar default
14446 ayout\SpecialChar \menuseparator
14447
14448 \bar under
14449 D
14450 \bar default
14451 ocument\SpecialChar \menuseparator
14452 Extra Options
14453 \family default
14454  field.
14455 \end_layout
14456
14457 \end_inset
14458
14459  Have a look at the 
14460 \emph on
14461 koma-letter2
14462 \emph default
14463  template that is included in LyX for examples.
14464  A detailed description is to be found in the Koma-Script documentation
14465  (
14466 \emph on
14467 scrguide
14468 \emph default
14469 ).
14470 \end_layout
14471
14472 \begin_layout Subsection
14473 Problems
14474 \end_layout
14475
14476 \begin_layout Standard
14477 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14478  some problems.
14479 \end_layout
14480
14481 \begin_layout Itemize
14482 The chapter number of a 
14483 \family sans
14484 Chapter
14485 \family default
14486  type appears on a line of its own above the chapter heading instead of
14487  appearing in the same line ahead of it.
14488  The cause for that is the LyX internal behavior for the labeltype 
14489 \family sans
14490 Counter_Chapter
14491 \family default
14492  in the layout file.
14493 \end_layout
14494
14495 \begin_layout Itemize
14496 The headings of the types 
14497 \family sans
14498 Addchap
14499 \family default
14500  and 
14501 \family sans
14502 Addsec
14503 \family default
14504  are only put in the 
14505 \begin_inset Quotes eld
14506 \end_inset
14507
14508 true
14509 \begin_inset Quotes erd
14510 \end_inset
14511
14512  LaTeX table of contents, but not in the LyX table of contents (
14513 \family sans
14514 Document\SpecialChar \menuseparator
14515 Table
14516 \begin_inset space ~
14517 \end_inset
14518
14519 of
14520 \begin_inset space ~
14521 \end_inset
14522
14523 Contents
14524 \family default
14525 ).
14526 \end_layout
14527
14528 \begin_layout Itemize
14529 The paragraphs in a 
14530 \emph on
14531 letter
14532 \emph default
14533  document class appear in a skip separation mode, not indented.
14534  This is the standard behavior, no special LaTeX commands are needed for
14535  that.
14536  But in the 
14537 \family sans
14538 Document\SpecialChar \menuseparator
14539 Settings
14540 \family default
14541  dialog the corresponding radio button indicates 
14542 \family sans
14543 Indent
14544 \family default
14545 .
14546  A 
14547 \family sans
14548 Skip
14549 \family default
14550  value always has the effect that extra LaTeX commands are inserted in the
14551  document to produce the gap, which is not what is wanted in this case.
14552 \end_layout
14553
14554 \begin_layout Section
14555 Memoir
14556 \end_layout
14557
14558 \begin_layout Standard
14559 By 
14560 \noun on
14561 Jürgen Spitzmüller
14562 \end_layout
14563
14564 \begin_layout Subsection
14565 Overview
14566 \end_layout
14567
14568 \begin_layout Standard
14569 Memoir is a very powerful and constantly evolving class.
14570  It has been designed with regard to fictional and non-fictional literature.
14571  Its aim is to let the user have maximum control over the typesetting of
14572  his document.
14573  Memoir is based on the standard book class, but it can also emulate the
14574  article class (see below).
14575 \end_layout
14576
14577 \begin_layout Standard
14578 Peter Wilson, the developer of Memoir, is known as the author of lots of
14579  useful packages in the LaTeX world.
14580  Most of them have been merged with Memoir.
14581  Therefore, it is much easier to layout the table of contents, appendices,
14582  chapter designs and such.
14583  LyX, though, does not support all of these goodies natively.
14584  Some of them might be added to forthcoming releases
14585 \begin_inset Foot
14586 status collapsed
14587
14588 \begin_layout Plain Layout
14589 You are invited to send suggestions to 
14590 \begin_inset Flex URL
14591 status collapsed
14592
14593 \begin_layout Plain Layout
14594
14595 lyx-devel@lists.lyx.org
14596 \end_layout
14597
14598 \end_inset
14599
14600 .
14601 \end_layout
14602
14603 \end_inset
14604
14605 , lots will probably never, due to the limitations of LyX's framework.
14606  Of course you can still use all features with the help of some native LaTeX
14607  commands (TeX code
14608 \begin_inset Foot
14609 status collapsed
14610
14611 \begin_layout Plain Layout
14612 Cf.
14613 \begin_inset ERT
14614 status collapsed
14615
14616 \begin_layout Plain Layout
14617
14618
14619 \backslash
14620  
14621 \end_layout
14622
14623 \end_inset
14624
14625 section
14626 \begin_inset space ~
14627 \end_inset
14628
14629
14630 \begin_inset CommandInset ref
14631 LatexCommand ref
14632 reference "sec:Inserting-TeX-Code"
14633
14634 \end_inset
14635
14636  for details.
14637 \end_layout
14638
14639 \end_inset
14640
14641 ).
14642  In this section, we can only list those features which are natively supported
14643  by LyX.
14644  For detailed descriptions (and for the rest of features) we recommend you
14645  have a look at the detailed manual of the Memoir class
14646 \begin_inset Foot
14647 status collapsed
14648
14649 \begin_layout Plain Layout
14650 Cf.
14651 \begin_inset ERT
14652 status collapsed
14653
14654 \begin_layout Plain Layout
14655
14656
14657 \backslash
14658  
14659 \end_layout
14660
14661 \end_inset
14662
14663
14664 \begin_inset Flex URL
14665 status collapsed
14666
14667 \begin_layout Plain Layout
14668
14669 CTAN:/macros/latex/memoir/memman.pdf
14670 \end_layout
14671
14672 \end_inset
14673
14674 .
14675 \end_layout
14676
14677 \end_inset
14678
14679 , which is not only a user guide for the class, but also both a comprehensive
14680  description on good typesetting and a superb example for good typesetting
14681  itself.
14682 \end_layout
14683
14684 \begin_layout Subsection
14685 Basic features and restrictions
14686 \end_layout
14687
14688 \begin_layout Standard
14689 Memoir supports basically all features of the standard book classes.
14690  There are, however, some differences, as follows:
14691 \end_layout
14692
14693 \begin_layout Description
14694 Font
14695 \begin_inset space ~
14696 \end_inset
14697
14698 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14699 \end_layout
14700
14701 \begin_layout Description
14702 Page
14703 \begin_inset space ~
14704 \end_inset
14705
14706 style: The fancy page style is not supported, due to a command clash between
14707  Memoir and the fancyhdr package (they both define a command with the same
14708  name, which confuses LaTeX).
14709  Instead, Memoir comes with a number of its own page styles (see 
14710 \family sans
14711 Layout\SpecialChar \menuseparator
14712 Document\SpecialChar \menuseparator
14713 Page
14714 \begin_inset space ~
14715 \end_inset
14716
14717 Style
14718 \family default
14719 ).
14720  If you want to use these for the chapter pages, you have to use the command
14721  
14722 \family typewriter
14723
14724 \backslash
14725 chapterstyle
14726 \family default
14727  in the main text or in preamble (e.
14728 \begin_inset space \thinspace{}
14729 \end_inset
14730
14731 g.
14732 \begin_inset space \space{}
14733 \end_inset
14734
14735
14736 \family typewriter
14737
14738 \backslash
14739 chapterstyle{companion}
14740 \family default
14741 ).
14742 \end_layout
14743
14744 \begin_layout Description
14745 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14746  optional argument in the standard classes.
14747  With this, you can specify an alternative version of the title for the
14748  table of contents and the headers (for instance, if the title is too long).
14749  In LyX, you can do this via 
14750 \family sans
14751 Insert\SpecialChar \menuseparator
14752 Short
14753 \begin_inset space ~
14754 \end_inset
14755
14756 Title
14757 \family default
14758  at the beginning of a chapter/section.
14759  Memoir features a second optional argument and thus separates the table
14760  of contents from the header.
14761  You can define three variants of a title with this: one for the main text,
14762  one for the table of contents, and one for the headers.
14763  Simply insert two optional arguments if you need this feature, the first
14764  one containing the short title for the Table of Contents, the second one
14765  containing an alternative short title for the headers.
14766 \end_layout
14767
14768 \begin_layout Description
14769 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14770  of contents, the list of figures and the list of table start a new page
14771  automatically.
14772  Memoir does not follow this route.
14773  You have to insert a page break yourself, if you want to have one.
14774 \end_layout
14775
14776 \begin_layout Description
14777 Titlepage: For some unknown reason, Memoir uses pagination on the title
14778  page (in the standard classes, title pages are 
14779 \begin_inset Quotes eld
14780 \end_inset
14781
14782 empty
14783 \begin_inset Quotes erd
14784 \end_inset
14785
14786 , i.
14787 \begin_inset space \thinspace{}
14788 \end_inset
14789
14790 g.
14791 \begin_inset space \space{}
14792 \end_inset
14793
14794 without pagina).
14795  If you want an empty title page, type 
14796 \family typewriter
14797
14798 \backslash
14799 aliaspagestyle{title}{empty}
14800 \family default
14801  in the preamble.
14802 \end_layout
14803
14804 \begin_layout Description
14805 Article: With the class option 
14806 \emph on
14807 article
14808 \emph default
14809  (to be inserted in 
14810 \family sans
14811 Layout\SpecialChar \menuseparator
14812 Document\SpecialChar \menuseparator
14813 Extra
14814 \begin_inset space ~
14815 \end_inset
14816
14817 Options
14818 \family default
14819 ), you can emulate article style.
14820  That is, counters (footnotes, figures, tables etc.) will not be reset on
14821  new chapters, chapters don't start a new page (but are—in contrary to 
14822 \begin_inset Quotes eld
14823 \end_inset
14824
14825 real
14826 \begin_inset Quotes erd
14827 \end_inset
14828
14829  article classes—still allowed), parts, though, use their own page, as in
14830  book.
14831 \end_layout
14832
14833 \begin_layout Description
14834 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14835  font commands, which have been used in the old LaTeX version 2.09 (e.
14836 \begin_inset space \thinspace{}
14837 \end_inset
14838
14839 g.
14840 \begin_inset space \space{}
14841 \end_inset
14842
14843
14844 \family typewriter
14845
14846 \backslash
14847 rm
14848 \family default
14849
14850 \family typewriter
14851
14852 \backslash
14853 it
14854 \family default
14855 ).
14856  It produces an error and stops LaTeX whenever such a command appears.
14857  The class option 
14858 \emph on
14859 oldfontcommands
14860 \emph default
14861  reallows the commands and spits out warnings instead (which does at least
14862  not stop LaTeX).
14863  Since a lot of packages and particularly BibTeX style files are still using
14864  those commands, we have decided to use this option by default.
14865 \end_layout
14866
14867 \begin_layout Subsection
14868 Extra features
14869 \end_layout
14870
14871 \begin_layout Standard
14872 We will only describe the features supported by LyX (which is not much currently
14873 ).
14874  Please consult the Memoir manual
14875 \begin_inset Foot
14876 status collapsed
14877
14878 \begin_layout Plain Layout
14879 Cf.
14880 \begin_inset ERT
14881 status collapsed
14882
14883 \begin_layout Plain Layout
14884
14885
14886 \backslash
14887  
14888 \end_layout
14889
14890 \end_inset
14891
14892
14893 \begin_inset Flex URL
14894 status collapsed
14895
14896 \begin_layout Plain Layout
14897
14898 CTAN:/macros/latex/memoir/memman.pdf
14899 \end_layout
14900
14901 \end_inset
14902
14903 .
14904 \end_layout
14905
14906 \end_inset
14907
14908  for details.
14909 \end_layout
14910
14911 \begin_layout Description
14912 Abstract: You may wonder why an abstract is an extra feature.
14913  Well, it is in book class.
14914  Usually books don't have abstracts.
14915  Memoir, however, has.
14916  You can use it wherever and how often you like.
14917 \end_layout
14918
14919 \begin_layout Description
14920 Chapterprecis: You may know this older typesetting style: The contents of
14921  a chapter are summarized below the title and also in the table of contents
14922  (e.
14923 \begin_inset space \thinspace{}
14924 \end_inset
14925
14926 g.
14927 \begin_inset space \space{}
14928 \end_inset
14929
14930
14931 \emph on
14932 Our hero arrives in Troia; he loses some friends; he finds others
14933 \emph default
14934 ).
14935  Chapterprecis does exactly this.
14936  It is therefore only sensible below a chapter.
14937 \end_layout
14938
14939 \begin_layout Description
14940 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14941  The epigraph environment provides an elegant way of typesetting such a
14942  motto.
14943  The motto itself (text) and its author (source) are divided by a short
14944  line.
14945  Unfortunately, we have to fool LyX a bit here again, since the environment
14946  needs two arguments (text and source).
14947  In this case, we have to use curly brackets (in TeX mode) between the two
14948  arguments: 
14949 \emph on
14950 <smart slogan>
14951 \emph default
14952  
14953 \family typewriter
14954 }{
14955 \family default
14956  
14957 \emph on
14958 <author of the slogan>.
14959 \end_layout
14960
14961 \begin_layout Description
14962 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14963  complex figurative poems).
14964  LyX can only support a few of them.
14965  One is poemtitle, which is a centered title for poems, which will also
14966  be added to the table of contents (verse is the standard environment for
14967  poems.
14968  Memoir has some enhanced versions of verse, but you need to use TeX code,
14969  because they have to be nested inside regular verse environments, which
14970  is not possible with LyX).
14971 \end_layout
14972
14973 \begin_layout Description
14974 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14975 \end_layout
14976
14977 \begin_layout Section
14978 Article (mwart), book (mwbk) and report (mwrep)
14979 \begin_inset Argument
14980 status collapsed
14981
14982 \begin_layout Plain Layout
14983 The 
14984 \family typewriter
14985 mw
14986 \family default
14987  Classes
14988 \end_layout
14989
14990 \end_inset
14991
14992
14993 \end_layout
14994
14995 \begin_layout Standard
14996 by 
14997 \noun on
14998 Tomasz Luczak
14999 \end_layout
15000
15001 \begin_layout Standard
15002 The LyX document classes 
15003 \emph on
15004 article (mwart)
15005 \emph default
15006
15007 \emph on
15008 report (mwrep)
15009 \emph default
15010  and 
15011 \emph on
15012 book
15013 \emph default
15014  
15015 \emph on
15016 (mwbk)
15017 \emph default
15018  correspond to the LaTeX document classes 
15019 \family typewriter
15020 mwart.cls
15021 \family default
15022
15023 \family typewriter
15024 mwrep.cls
15025 \family default
15026  and 
15027 \family typewriter
15028 mwbk.cls
15029 \family default
15030 , resp.
15031  They are replacements for the standard document classes 
15032 \family typewriter
15033 article.cls
15034 \family default
15035
15036 \family typewriter
15037 report.cls
15038 \family default
15039  and 
15040 \family typewriter
15041 book.cls
15042 \family default
15043 , resp., and fit better to Polish typography conventions in a number of points.
15044  
15045 \end_layout
15046
15047 \begin_layout Standard
15048 Basic differences:
15049 \end_layout
15050
15051 \begin_layout Itemize
15052 Unnumbered titles (with star, e.
15053 \begin_inset space \thinspace{}
15054 \end_inset
15055
15056 g.
15057 \begin_inset space \space{}
15058 \end_inset
15059
15060
15061 \family sans
15062 Section*
15063 \family default
15064 ) are added into table of contents,
15065 \end_layout
15066
15067 \begin_layout Itemize
15068 Additional page styles:
15069 \end_layout
15070
15071 \begin_deeper
15072 \begin_layout Description
15073 uheadings header with separated lines,
15074 \end_layout
15075
15076 \begin_layout Description
15077 myheadings custom header, contents headers via commands: 
15078 \family typewriter
15079
15080 \backslash
15081 markright
15082 \family default
15083  and 
15084 \family typewriter
15085
15086 \backslash
15087 markboth
15088 \family default
15089 ,
15090 \end_layout
15091
15092 \begin_layout Description
15093 myuheadings custom header with separated lines,
15094 \end_layout
15095
15096 \begin_layout Description
15097 outer page number is placed on outer side of page
15098 \end_layout
15099
15100 \end_deeper
15101 \begin_layout Itemize
15102 Options 
15103 \end_layout
15104
15105 \begin_deeper
15106 \begin_layout Description
15107 rmheadings serif titles — default,
15108 \end_layout
15109
15110 \begin_layout Description
15111 sfheadings sansserif titles,
15112 \end_layout
15113
15114 \begin_layout Description
15115 authortitle on title page first placed is author next title — default,
15116 \end_layout
15117
15118 \begin_layout Description
15119 titleauthor on title page first placed is title next author,
15120 \end_layout
15121
15122 \begin_layout Description
15123 withmarginpar reserve place on page for margins.
15124 \end_layout
15125
15126 \end_deeper
15127 \begin_layout Section
15128 Paper
15129 \end_layout
15130
15131 \begin_layout Standard
15132 The document class 
15133 \family sans
15134 paper
15135 \family default
15136  provides an alternative to the standard 
15137 \family sans
15138 article
15139 \family default
15140  class.
15141  It provides similar functionality, but you might prefer this layout with
15142  sans serif sections, headings, and more.
15143 \end_layout
15144
15145 \begin_layout Section
15146 RevTeX4
15147 \end_layout
15148
15149 \begin_layout Standard
15150 by 
15151 \noun on
15152 Amir Karger
15153 \end_layout
15154
15155 \begin_layout Standard
15156 \begin_inset VSpace bigskip
15157 \end_inset
15158
15159
15160 \end_layout
15161
15162 \begin_layout Standard
15163 \noindent
15164 The 
15165 \family sans
15166 Revtex
15167 \begin_inset space ~
15168 \end_inset
15169
15170 4
15171 \family default
15172  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15173 \begin_inset Formula $\beta$
15174 \end_inset
15175
15176  release of May, 1999) class.
15177 \end_layout
15178
15179 \begin_layout Standard
15180 LyX has a 
15181 \family sans
15182 Revtex
15183 \family default
15184  textclass, which works with RevTeX 3.1.
15185  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15186  That means that it doesn't interact very well with LyX, which requires
15187  LaTeX2e, although it has been kludged to work.
15188  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15189  LyX with the 
15190 \family sans
15191 RevTeX
15192 \begin_inset space ~
15193 \end_inset
15194
15195 4
15196 \family default
15197  textclass should also be pretty easy to use.
15198 \end_layout
15199
15200 \begin_layout Standard
15201 These documents are supposed to be used in 
15202 \emph on
15203 addition
15204 \emph default
15205  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15206  macros, and assume you'll know what to put in the preamble if necessary.
15207 \end_layout
15208
15209 \begin_layout Subsection
15210 Installation
15211 \end_layout
15212
15213 \begin_layout Standard
15214 All you need to do is install RevTeX 4, as described in the package's README
15215  file.
15216  The package can be found at The RevTeX 4 Web Site 
15217 \begin_inset Flex URL
15218 status collapsed
15219
15220 \begin_layout Plain Layout
15221
15222 http://publish.aps.org/revtex4/
15223 \end_layout
15224
15225 \end_inset
15226
15227 .
15228  Install it somewhere that LaTeX can see it.
15229  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15230  (i.
15231 \begin_inset space \thinspace{}
15232 \end_inset
15233
15234 g.
15235 \begin_inset space \space{}
15236 \end_inset
15237
15238 not the directory where you installed the class file.) Then, if you reconfigure
15239  LyX, it will find the class file and let you use the RevTeX4 textclass.
15240 \end_layout
15241
15242 \begin_layout Standard
15243 Probably the easiest way to get started is either to import a RevTeX 4 document
15244  using 
15245 \family typewriter
15246 tex2lyx
15247 \family default
15248 , or to use the 
15249 \family sans
15250 Revtex
15251 \begin_inset space ~
15252 \end_inset
15253
15254 4
15255 \family default
15256  template, found in the templates directory.
15257 \end_layout
15258
15259 \begin_layout Subsection
15260 Preamble Matter
15261 \end_layout
15262
15263 \begin_layout Standard
15264 Optional arguments to 
15265 \family typewriter
15266
15267 \backslash
15268 documentclass
15269 \family default
15270 , like 
15271 \begin_inset Quotes eld
15272 \end_inset
15273
15274 preprint
15275 \begin_inset Quotes erd
15276 \end_inset
15277
15278  and 
15279 \begin_inset Quotes eld
15280 \end_inset
15281
15282 aps
15283 \begin_inset Quotes erd
15284 \end_inset
15285
15286 , go in the 
15287 \family sans
15288 E
15289 \bar under
15290 x
15291 \bar default
15292 tra
15293 \begin_inset space ~
15294 \end_inset
15295
15296 Options
15297 \family default
15298  field in the 
15299 \family sans
15300 Document
15301 \begin_inset space ~
15302 \end_inset
15303
15304 Layout
15305 \family default
15306  dialog, as usual.
15307  Remember that in RevTeX, at least one optional argument is required! 
15308 \end_layout
15309
15310 \begin_layout Standard
15311 Other preamble matter, like 
15312 \family typewriter
15313
15314 \backslash
15315 draft
15316 \family default
15317  etc.
15318 \begin_inset space ~
15319 \end_inset
15320
15321 goes in the 
15322 \family sans
15323 LaTeX
15324 \begin_inset space ~
15325 \end_inset
15326
15327 Preamble
15328 \family default
15329  dialog, also as usual.
15330 \end_layout
15331
15332 \begin_layout Subsection
15333 Layouts
15334 \end_layout
15335
15336 \begin_layout Standard
15337 The layouts basically correspond to the commands in RevTeX4.0.
15338  For example, the Email layout corresponds to 
15339 \family typewriter
15340
15341 \backslash
15342 email{}
15343 \family default
15344 .
15345  Note that (at least as of RevTeX 4.0 Beta), the 
15346 \family sans
15347 Address
15348 \family default
15349  and 
15350 \family sans
15351 Affiliation
15352 \family default
15353  layouts are exactly equivalent, so you shouldn't need to use both.
15354 \begin_inset Foot
15355 status collapsed
15356
15357 \begin_layout Plain Layout
15358 In case you're curious, both were included so that 
15359 \family typewriter
15360 tex2lyx
15361 \family default
15362  would be able to translate both 
15363 \family typewriter
15364
15365 \backslash
15366 address
15367 \family default
15368  and 
15369 \family typewriter
15370
15371 \backslash
15372 affiliation
15373 \family default
15374 .
15375 \end_layout
15376
15377 \end_inset
15378
15379
15380 \end_layout
15381
15382 \begin_layout Subsection
15383 Important Notes
15384 \end_layout
15385
15386 \begin_layout Standard
15387 There are a couple of important unique aspects of RevTeX 4 which might cause
15388  bugs that will be even more confusing in LyX.
15389 \end_layout
15390
15391 \begin_layout Standard
15392 In RevTeX, the 
15393 \family typewriter
15394
15395 \backslash
15396 thanks
15397 \family default
15398  command goes 
15399 \emph on
15400 outside
15401 \emph default
15402  the 
15403 \family typewriter
15404
15405 \backslash
15406 author
15407 \family default
15408  command.
15409  The LyX equivalent is that there is a separate Thanks layout.
15410  Do 
15411 \emph on
15412 not
15413 \emph default
15414  write footnotes in the 
15415 \family sans
15416 Author
15417 \family default
15418  layout, or weird things may happen.
15419  See the RevTeX 4 documentation for more details.
15420 \end_layout
15421
15422 \begin_layout Standard
15423 Also, the 
15424 \family sans
15425 Author
15426 \begin_inset space ~
15427 \end_inset
15428
15429 Email
15430 \family default
15431
15432 \family sans
15433 Author
15434 \begin_inset space ~
15435 \end_inset
15436
15437 URL
15438 \family default
15439 , and 
15440 \family sans
15441 Thanks
15442 \family default
15443  layouts must be placed 
15444 \emph on
15445 in between
15446 \emph default
15447  the 
15448 \family sans
15449 Author
15450 \family default
15451  layout and the corresponding 
15452 \family sans
15453 Address
15454 \family default
15455  (or equivalent 
15456 \family sans
15457 Affiliation
15458 \family default
15459 ) layout.
15460  If you put the 
15461 \family sans
15462 Thanks
15463 \family default
15464  after the 
15465 \family sans
15466 Address
15467 \family default
15468 , the LaTeX won't compile.
15469 \end_layout
15470
15471 \begin_layout Subsection
15472 Drawbacks
15473 \end_layout
15474
15475 \begin_layout Standard
15476 The main problem with this layout is that you can't use the optional arguments
15477  to layouts like Email and Title.
15478  (The problem is not unique to this layout; you can't use optional arguments
15479  to the Section layouts either.) This means that after you export that file
15480  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15481  need to edit the LaTeX file with a text editor to add the optional arguments
15482  to set, e.
15483 \begin_inset space \thinspace{}
15484 \end_inset
15485
15486 g.
15487 \begin_inset space \space{}
15488 \end_inset
15489
15490 the running title for the page headers.
15491  Lacking these layouts makes the 
15492 \family typewriter
15493
15494 \backslash
15495 altaffiliation
15496 \family default
15497  (and the equivalent 
15498 \family typewriter
15499
15500 \backslash
15501 altaddress
15502 \family default
15503 ) useless, so the corresponding layouts don't exist, and will have to be
15504  added by hand.
15505 \begin_inset Foot
15506 status collapsed
15507
15508 \begin_layout Plain Layout
15509
15510 \emph on
15511 Note from JMarc:
15512 \emph default
15513  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15514  has not been updated yet to take advantage of it.
15515 \end_layout
15516
15517 \end_inset
15518
15519  
15520 \end_layout
15521
15522 \begin_layout Section
15523 Springer Journals (
15524 \family sans
15525 svjour
15526 \family default
15527 )
15528 \end_layout
15529
15530 \begin_layout Standard
15531 by 
15532 \noun on
15533 Martin Vermeer
15534 \end_layout
15535
15536 \begin_layout Subsection
15537 Description
15538 \end_layout
15539
15540 \begin_layout Standard
15541 These are the layout files for some of the journal formats used by Springer
15542  Verlag and listed on 
15543 \begin_inset Flex URL
15544 status collapsed
15545
15546 \begin_layout Plain Layout
15547
15548 http://www.springer.de/author/tex/help-journals.html
15549 \end_layout
15550
15551 \end_inset
15552
15553 , where you should also go to fetch the class files (yes, these are LaTeX2e
15554  now!).
15555  It is a modular system: the things common to all journals are implemented
15556  in 
15557 \family typewriter
15558 svjour.inc
15559 \family default
15560 , which journal-specific layout files (such as, e.
15561 \begin_inset space \thinspace{}
15562 \end_inset
15563
15564 g.
15565 \begin_inset space \space{}
15566 \end_inset
15567
15568
15569 \family typewriter
15570 svjog.layout
15571 \family default
15572  for Journal of Geodesy) can include.
15573 \end_layout
15574
15575 \begin_layout Standard
15576 This means that implementing support for any other Springer journal on this
15577  list is as simple as writing your own 
15578 \family typewriter
15579 sv
15580 \family default
15581 <myjournal>
15582 \family typewriter
15583 .layout
15584 \family default
15585  file following the outline given in 
15586 \family typewriter
15587 svjog.layout
15588 \family default
15589 .
15590  
15591 \end_layout
15592
15593 \begin_layout Standard
15594 It is reasonably well tested only for the Journal of Geodesy.
15595  
15596 \family typewriter
15597 svjour
15598 \family default
15599  and 
15600 \family typewriter
15601 svjog
15602 \family default
15603  come with the standard LyX distribution.
15604  Install the relevant class file (downloaded from Springer) in a proper
15605  directory, reconfigure LaTeX (in the teTeX case by running 
15606 \family typewriter
15607 texhash
15608 \family default
15609 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15610  and it should work.
15611 \end_layout
15612
15613 \begin_layout Subsection
15614 New styles
15615 \end_layout
15616
15617 \begin_layout Standard
15618 A large number of theorem-like styles — 
15619 \family sans
15620 Claim, Conjecture,
15621 \family default
15622  
15623 \family sans
15624 \SpecialChar \ldots{}
15625 Theorem
15626 \family default
15627 .
15628 \end_layout
15629
15630 \begin_layout Standard
15631
15632 \family sans
15633 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15634  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15635 \family default
15636 .
15637  See the Springer class file documentation for details.
15638 \end_layout
15639
15640 \begin_layout Subsection
15641 Supported journals
15642 \end_layout
15643
15644 \begin_layout Itemize
15645
15646 \emph on
15647 Journal of Geodesy
15648 \emph default
15649
15650 \family typewriter
15651 svjog.layout
15652 \family default
15653  — Martin Vermeer
15654 \end_layout
15655
15656 \begin_layout Itemize
15657
15658 \emph on
15659 Probability Theory and Related Fields
15660 \emph default
15661
15662 \family typewriter
15663 svprobth.layout
15664 \family default
15665  — Jean-Marc Lasgouttes
15666 \end_layout
15667
15668 \begin_layout Standard
15669 Add your own, it isn't so hard!
15670 \end_layout
15671
15672 \begin_layout Subsection
15673 Credits
15674 \end_layout
15675
15676 \begin_layout Standard
15677 These files are partly based on the older 
15678 \family typewriter
15679 ejour2.layout
15680 \family default
15681 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15682  file from Springer.
15683  All this, and the 
15684 \family typewriter
15685 ejour2
15686 \family default
15687  layout, are now defunct.
15688  Jean-Marc Lasgouttes helped out big in making me find my way around the
15689  LyX layout file mechanism.
15690 \end_layout
15691
15692 \begin_layout Subsection
15693 Bugs
15694 \end_layout
15695
15696 \begin_layout Standard
15697 Probably.
15698  But probably less than in the old hacked-LaTeX 
15699 \family typewriter
15700 ejour2
15701 \family default
15702 .
15703 \end_layout
15704
15705 \begin_layout Standard
15706 Limitations e.
15707 \begin_inset space \thinspace{}
15708 \end_inset
15709
15710 g.: does not display the number for theorem-like layouts, just #.
15711 \end_layout
15712
15713 \begin_layout Section
15714 Slides [aka 
15715 \noun on
15716 SliTeX
15717 \noun default
15718 ]
15719 \begin_inset CommandInset label
15720 LatexCommand label
15721 name "sec:slitex"
15722
15723 \end_inset
15724
15725
15726 \end_layout
15727
15728 \begin_layout Standard
15729 by 
15730 \noun on
15731 John Weiss
15732 \noun default
15733  
15734 \end_layout
15735
15736 \begin_layout Subsection
15737 Introduction
15738 \end_layout
15739
15740 \begin_layout Standard
15741 This section describes how to use LyX to make slides for overhead projectors.
15742  There are two document classes that can do this: the default slides class
15743  and the 
15744 \family sans
15745 FoilTeX
15746 \family default
15747  slides class.
15748  This section documents the former.
15749 \end_layout
15750
15751 \begin_layout Standard
15752 I'm going to say this again, nice and clear, so that there's no misunderstanding
15753 :
15754 \end_layout
15755
15756 \begin_layout Standard
15757 \begin_inset VSpace bigskip
15758 \end_inset
15759
15760
15761 \end_layout
15762
15763 \begin_layout Standard
15764 \align center
15765
15766 \size large
15767 This section documents the class 
15768 \begin_inset Quotes eld
15769 \end_inset
15770
15771
15772 \family sans
15773 slides (default)
15774 \family default
15775
15776 \begin_inset Quotes erd
15777 \end_inset
15778
15779  
15780 \emph on
15781 only.
15782 \end_layout
15783
15784 \begin_layout Standard
15785 \begin_inset VSpace bigskip
15786 \end_inset
15787
15788
15789 \end_layout
15790
15791 \begin_layout Standard
15792 If you're looking for the documentation for 
15793 \begin_inset Quotes eld
15794 \end_inset
15795
15796
15797 \family sans
15798 slides (FoilTeX)
15799 \family default
15800
15801 \begin_inset Quotes erd
15802 \end_inset
15803
15804 , check out section
15805 \begin_inset space ~
15806 \end_inset
15807
15808
15809 \begin_inset CommandInset ref
15810 LatexCommand ref
15811 reference "sec:foiltex"
15812
15813 \end_inset
15814
15815 .
15816  The 
15817 \family sans
15818 foils
15819 \family default
15820  class [
15821 \begin_inset Quotes eld
15822 \end_inset
15823
15824
15825 \family sans
15826 slides (FoilTeX)
15827 \family default
15828
15829 \begin_inset Quotes erd
15830 \end_inset
15831
15832 ] is actually somewhat better than the default 
15833 \family sans
15834 slides
15835 \family default
15836  class,
15837 \begin_inset Foot
15838 status collapsed
15839
15840 \begin_layout Plain Layout
15841 \SpecialChar \ldots{}
15842 or so I've been told repeatedly by its advocates.
15843  Having never used it, I have no idea if this claim is true or not.
15844 \end_layout
15845
15846 \end_inset
15847
15848  which this section documents.
15849 \end_layout
15850
15851 \begin_layout Standard
15852 This class is the LaTeX2e improvement of the old 
15853 \noun on
15854 SliTeX
15855 \noun default
15856  package.
15857  Every LaTeX2e distribution includes this class [which I'll just refer to
15858  as 
15859 \begin_inset Quotes eld
15860 \end_inset
15861
15862
15863 \family sans
15864 slides
15865 \family default
15866
15867 \begin_inset Quotes erd
15868 \end_inset
15869
15870  from now on], so you're bound to have it.
15871  As I noted earlier, there are other classes, such as 
15872 \family sans
15873 foils
15874 \family default
15875 , which also produce slides for overhead projectors and do a better job
15876  at it.
15877  However, there are some things which 
15878 \family sans
15879 slides
15880 \family default
15881  can do which the others can't, such as generate overlays.
15882  Read on to learn more!
15883 \end_layout
15884
15885 \begin_layout Subsection
15886 Getting Started
15887 \begin_inset CommandInset label
15888 LatexCommand label
15889 name "sec:slidesetup"
15890
15891 \end_inset
15892
15893
15894 \end_layout
15895
15896 \begin_layout Standard
15897 Obviously, to use this document class, you need to select 
15898 \begin_inset Quotes eld
15899 \end_inset
15900
15901
15902 \family sans
15903 slides (default)
15904 \family default
15905
15906 \begin_inset Quotes erd
15907 \end_inset
15908
15909  from the class list in the 
15910 \family sans
15911 Document\SpecialChar \menuseparator
15912 Settings
15913 \family default
15914  dialog.
15915  There are some other special things you should know about this class:
15916 \end_layout
15917
15918 \begin_layout Itemize
15919 Don't bother changing the options 
15920 \family sans
15921 Sides and Columns
15922 \family default
15923 .
15924  They're not supported by the 
15925 \family sans
15926 slides
15927 \family default
15928  class, anyways.
15929 \end_layout
15930
15931 \begin_layout Itemize
15932 The option 
15933 \family sans
15934 Page
15935 \begin_inset space ~
15936 \end_inset
15937
15938 style
15939 \family default
15940  behaves a bit differently for this class.
15941  The possible choices and what they do are as follows:
15942 \end_layout
15943
15944 \begin_deeper
15945 \begin_layout Description
15946
15947 \family sans
15948 plain
15949 \family default
15950  The final output contains page numbers in the lower right corner.
15951 \end_layout
15952
15953 \begin_layout Description
15954
15955 \family sans
15956 headings
15957 \family default
15958  Like 
15959 \family sans
15960 plain
15961 \family default
15962 , but also prints out any time markers you've put in.
15963  This is the default.
15964 \end_layout
15965
15966 \begin_layout Description
15967
15968 \family sans
15969 empty
15970 \family default
15971  The final output contains no page numbers, time markers, or alignment markers.
15972 \end_layout
15973
15974 \end_deeper
15975 \begin_layout Itemize
15976 The 
15977 \family sans
15978 slides
15979 \family default
15980  class has an extra option: 
15981 \family typewriter
15982 clock
15983 \family default
15984 .
15985  To use it, put 
15986 \begin_inset Quotes eld
15987 \end_inset
15988
15989
15990 \family typewriter
15991 clock
15992 \family default
15993
15994 \begin_inset Quotes erd
15995 \end_inset
15996
15997  in the extra class options.
15998 \end_layout
15999
16000 \begin_deeper
16001 \begin_layout Standard
16002 Using this options allows you to add time markers to 
16003 \family sans
16004 Note
16005 \family default
16006 s.
16007  See section
16008 \begin_inset space ~
16009 \end_inset
16010
16011
16012 \begin_inset CommandInset ref
16013 LatexCommand ref
16014 reference "sec:slideNote"
16015
16016 \end_inset
16017
16018  for more details.
16019 \end_layout
16020
16021 \end_deeper
16022 \begin_layout Standard
16023 You can also use the template file 
16024 \begin_inset Quotes eld
16025 \end_inset
16026
16027
16028 \family typewriter
16029 slides.lyx
16030 \family default
16031
16032 \begin_inset Quotes erd
16033 \end_inset
16034
16035  to automatically set up a document to use the 
16036 \family sans
16037 slides
16038 \family default
16039  class [using 
16040 \family sans
16041 File\SpecialChar \menuseparator
16042 New
16043 \begin_inset space ~
16044 \end_inset
16045
16046 from
16047 \begin_inset space ~
16048 \end_inset
16049
16050 Template
16051 \family default
16052  to open your new document].
16053  The template file also contains some examples of the special paragraph
16054  environments used by this class.
16055  I'll describe those next.
16056 \end_layout
16057
16058 \begin_layout Subsection
16059 Paragraph Environments
16060 \end_layout
16061
16062 \begin_layout Subsubsection
16063 Supported Environments
16064 \end_layout
16065
16066 \begin_layout Standard
16067 The first thing you'll notice when you start up a new 
16068 \family sans
16069 slides
16070 \family default
16071  document is the font size and type: it's the equivalent of the size 
16072 \begin_inset Quotes eld
16073 \end_inset
16074
16075
16076 \family sans
16077 Largest
16078 \family default
16079
16080 \begin_inset Quotes erd
16081 \end_inset
16082
16083  in the 
16084 \family sans
16085 Sans
16086 \begin_inset space ~
16087 \end_inset
16088
16089 Serif
16090 \family default
16091  font.
16092  This is also what's used in the output.
16093  Think of this as a 
16094 \begin_inset Quotes eld
16095 \end_inset
16096
16097 visual cue
16098 \begin_inset Quotes erd
16099 \end_inset
16100
16101  to remind you that this is a slide.
16102  Your final slides will use a larger font; ergo, you'll have less space.
16103  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16104 \end_layout
16105
16106 \begin_layout Standard
16107 The next thing that becomes obvious is the changes to the paragraph environment
16108  pull-down box [at the far-left end of the toolbar].
16109  Most of the paragraph environments you're used to seeing are missing.
16110  There are also five new ones.
16111  That's because the 
16112 \family sans
16113 slides
16114 \family default
16115  class itself only supports certain paragraph environments:
16116 \end_layout
16117
16118 \begin_layout Itemize
16119
16120 \family sans
16121 Standard
16122 \end_layout
16123
16124 \begin_layout Itemize
16125
16126 \family sans
16127 Itemize
16128 \end_layout
16129
16130 \begin_layout Itemize
16131
16132 \family sans
16133 Enumerate
16134 \end_layout
16135
16136 \begin_layout Itemize
16137
16138 \family sans
16139 Description
16140 \end_layout
16141
16142 \begin_layout Itemize
16143
16144 \family sans
16145 List
16146 \end_layout
16147
16148 \begin_layout Itemize
16149
16150 \family sans
16151 Quotation
16152 \end_layout
16153
16154 \begin_layout Itemize
16155
16156 \family sans
16157 Quote
16158 \end_layout
16159
16160 \begin_layout Itemize
16161
16162 \family sans
16163 Verse
16164 \end_layout
16165
16166 \begin_layout Itemize
16167
16168 \family sans
16169 Caption
16170 \end_layout
16171
16172 \begin_layout Itemize
16173
16174 \family sans
16175 LyX-Code
16176 \end_layout
16177
16178 \begin_layout Itemize
16179
16180 \family sans
16181 Comment
16182 \end_layout
16183
16184 \begin_layout Standard
16185 All of the other standard environments, including the section-heading environmen
16186 ts, aren't used in the 
16187 \family sans
16188 slides
16189 \family default
16190  class.
16191 \end_layout
16192
16193 \begin_layout Standard
16194 On the other hand, you'll notice the following new environments:
16195 \end_layout
16196
16197 \begin_layout Itemize
16198
16199 \family sans
16200 Slide
16201 \end_layout
16202
16203 \begin_layout Itemize
16204
16205 \family sans
16206 Overlay
16207 \end_layout
16208
16209 \begin_layout Itemize
16210
16211 \family sans
16212 Note
16213 \end_layout
16214
16215 \begin_layout Itemize
16216
16217 \family sans
16218 InvisibleText
16219 \end_layout
16220
16221 \begin_layout Itemize
16222
16223 \family sans
16224 VisibleText
16225 \end_layout
16226
16227 \begin_layout Standard
16228 These five are kind of quirky, due to a 
16229 \begin_inset Quotes eld
16230 \end_inset
16231
16232 feature
16233 \begin_inset Quotes erd
16234 \end_inset
16235
16236  in LyX.
16237  You see, LyX doesn't permit you to nest any other paragraph environment
16238  into an empty environment.
16239  Now, that's fine and dandy, but it means that you wouldn't be able to start
16240  a slide with anything except plain text.
16241  To deal with this, I've performed a little 
16242 \begin_inset Quotes eld
16243 \end_inset
16244
16245 LaTeX magic.
16246 \begin_inset Quotes erd
16247 \end_inset
16248
16249  
16250 \end_layout
16251
16252 \begin_layout Subsubsection
16253 Quirks of the New Environments
16254 \begin_inset CommandInset label
16255 LatexCommand label
16256 name "sec:slideQuirk"
16257
16258 \end_inset
16259
16260
16261 \end_layout
16262
16263 \begin_layout Standard
16264 All five of the new paragraph environments are somewhat quirky due to inherent
16265  limitiations in the current version of LyX.
16266  As I just mentioned, LyX forbids environments that begin with another environme
16267 nt.
16268  To get around this, the 
16269 \family sans
16270 Slide
16271 \family default
16272  environment isn't a paragraph environment as described in the 
16273 \emph on
16274 User's Guide
16275 \emph default
16276 .
16277  
16278 \end_layout
16279
16280 \begin_layout Standard
16281 You should consider 
16282 \family sans
16283 Slide
16284 \family default
16285
16286 \family sans
16287 Overlay
16288 \family default
16289 , and 
16290 \family sans
16291 Note
16292 \family default
16293  to be 
16294 \begin_inset Quotes eld
16295 \end_inset
16296
16297 pseudo-environments.
16298 \begin_inset Quotes erd
16299 \end_inset
16300
16301  They look like a section heading or a 
16302 \begin_inset Quotes eld
16303 \end_inset
16304
16305
16306 \family sans
16307 Caption
16308 \family default
16309 ,
16310 \begin_inset Quotes erd
16311 \end_inset
16312
16313  but really begin a [and, if necessary, end the previous] paragraph environment.
16314  Likewise, treat 
16315 \family sans
16316 InvisibleText
16317 \family default
16318  and 
16319 \family sans
16320 VisibleText
16321 \family default
16322  as 
16323 \begin_inset Quotes eld
16324 \end_inset
16325
16326 pseudo-commands.
16327 \begin_inset Quotes erd
16328 \end_inset
16329
16330  These two perform some action.
16331 \end_layout
16332
16333 \begin_layout Standard
16334 A common feature of all five environments, 
16335 \family sans
16336 Slide
16337 \family default
16338
16339 \family sans
16340 Overlay
16341 \family default
16342
16343 \family sans
16344 Note
16345 \family default
16346
16347 \family sans
16348 InvisibleText
16349 \family default
16350  and 
16351 \family sans
16352 VisibleText
16353 \family default
16354 , is a rather long-ish label.
16355  The text following this label — ordinarily the contents of the paragraph
16356  environment — is utterly irrelevant for 
16357 \family sans
16358 Slide
16359 \family default
16360
16361 \family sans
16362 Overlay
16363 \family default
16364
16365 \family sans
16366 Note
16367 \family default
16368
16369 \family sans
16370 InvisibleText
16371 \family default
16372  and 
16373 \family sans
16374 VisibleText
16375 \family default
16376 .
16377  LyX completely ignores it.
16378  In fact, you can leave these five environments completely empty.
16379  
16380 \end_layout
16381
16382 \begin_layout Standard
16383 While you don't 
16384 \emph on
16385 have
16386 \emph default
16387  to put any text after the rather long-ish label, you might want to.
16388  This could be a short description of the contents of the 
16389 \family sans
16390 Slide
16391 \family default
16392 , for example.
16393  In that case, enter your descriptive comment and hit 
16394 \family sans
16395 Return
16396 \family default
16397  as you normally would.
16398 \end_layout
16399
16400 \begin_layout Standard
16401 If, on the other hand, you don't want to enter any descriptive text, you'll
16402  hit another LyX quirk.
16403  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16404  environment until you put something in the old one.
16405  So, do this:
16406 \end_layout
16407
16408 \begin_layout Itemize
16409 Start entering the text that will 
16410 \emph on
16411 follow
16412 \emph default
16413  the new 
16414 \family sans
16415 Slide
16416 \family default
16417
16418 \family sans
16419 Overlay
16420 \family default
16421
16422 \family sans
16423 Note
16424 \family default
16425
16426 \family sans
16427 InvisibleText
16428 \family default
16429  or 
16430 \family sans
16431 VisibleText
16432 \family default
16433 .
16434  
16435 \end_layout
16436
16437 \begin_layout Itemize
16438 Now move to the beginning of that paragraph.
16439  
16440 \end_layout
16441
16442 \begin_layout Itemize
16443 Next, hit 
16444 \family sans
16445 Return
16446 \family default
16447 .
16448  
16449 \end_layout
16450
16451 \begin_layout Itemize
16452 Finally, change this new, empty paragraph to a 
16453 \family sans
16454 Slide
16455 \family default
16456
16457 \family sans
16458 Overlay
16459 \family default
16460
16461 \family sans
16462 Note
16463 \family default
16464
16465 \family sans
16466 InvisibleText
16467 \family default
16468  or 
16469 \family sans
16470 VisibleText
16471 \family default
16472 .
16473  
16474 \end_layout
16475
16476 \begin_layout Standard
16477 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16478
16479 \end_layout
16480
16481 \begin_layout Subsection
16482 Making a Presentation with 
16483 \family sans
16484 Slide
16485 \family default
16486
16487 \family sans
16488 Overlay
16489 \family default
16490  and 
16491 \family sans
16492 Note
16493 \end_layout
16494
16495 \begin_layout Subsubsection
16496 Using the 
16497 \family sans
16498 Slide
16499 \family default
16500  Environment
16501 \end_layout
16502
16503 \begin_layout Standard
16504 If you're expecting this section to teach you how to actually make a presentatio
16505 n, you'll be sorely disappointed.
16506  Naturally, I'll describe all of the ways the 
16507 \family sans
16508 slides
16509 \family default
16510  class can assist you in preparing the materials for a presentation.
16511  Filling in the contents, however, is up to you.
16512  [Then again, that 
16513 \emph on
16514 is
16515 \emph default
16516  the LyX philosophy.]
16517 \end_layout
16518
16519 \begin_layout Standard
16520 Choosing the 
16521 \family sans
16522 Slide
16523 \family default
16524  environment [in the manner described in section
16525 \begin_inset space ~
16526 \end_inset
16527
16528
16529 \begin_inset CommandInset ref
16530 LatexCommand ref
16531 reference "sec:slideQuirk"
16532
16533 \end_inset
16534
16535 ] tells LyX to begin a new slide [duh].
16536  The label for this environment/
16537 \begin_inset Quotes erd
16538 \end_inset
16539
16540 pseudo-command
16541 \begin_inset Quotes erd
16542 \end_inset
16543
16544  is an 
16545 \begin_inset Quotes eld
16546 \end_inset
16547
16548 ASCII line,
16549 \begin_inset Quotes erd
16550 \end_inset
16551
16552  in cool blue, followed by the label, 
16553 \begin_inset Quotes eld
16554 \end_inset
16555
16556 NewSlide:
16557 \begin_inset Quotes erd
16558 \end_inset
16559
16560 .
16561  Any text or paragraph environments that follow this one go on the new slide.
16562  It's that simple.
16563 \end_layout
16564
16565 \begin_layout Standard
16566 Slides are probably the only time you'll need to forcibly end pages in LyX
16567  (this can be specified in the 
16568 \family sans
16569 Paragraph Layout
16570 \family default
16571  dialog).
16572  In fact, you'll want to, once you finish entering the contents of one slide.
16573  If you've entered more text than can physically fit on a slide, the extra
16574  overflows onto a new slide.
16575  I don't recommend doing this, however, since the overflow slide won't have
16576  any page number on it.
16577  Furthermore, it may interfere with any 
16578 \family sans
16579 Overlay
16580 \family default
16581  you've made to accompany the oversized 
16582 \family sans
16583 Slide
16584 \family default
16585 .
16586 \end_layout
16587
16588 \begin_layout Standard
16589 The 
16590 \family sans
16591 Overlay
16592 \family default
16593  and 
16594 \family sans
16595 Note
16596 \family default
16597  environments work the same way as the 
16598 \family sans
16599 Slide
16600 \family default
16601  environment.
16602  They both create an 
16603 \begin_inset Quotes eld
16604 \end_inset
16605
16606 ASCII line
16607 \begin_inset Quotes erd
16608 \end_inset
16609
16610  followed by a label [
16611 \begin_inset Quotes eld
16612 \end_inset
16613
16614 NewOverlay:
16615 \begin_inset Quotes erd
16616 \end_inset
16617
16618  and 
16619 \begin_inset Quotes eld
16620 \end_inset
16621
16622 NewNote:
16623 \begin_inset Quotes erd
16624 \end_inset
16625
16626 , respectively].
16627  The color is a stunning magenta instead of blue, and the 
16628 \begin_inset Quotes eld
16629 \end_inset
16630
16631 ASCII line
16632 \begin_inset Quotes erd
16633 \end_inset
16634
16635  will look different, in style and in length.
16636  The label fonts of all three also differ from one another.
16637 \end_layout
16638
16639 \begin_layout Standard
16640 As with a 
16641 \family sans
16642 Slide
16643 \family default
16644 , if the contents of a 
16645 \family sans
16646 Note
16647 \family default
16648  or 
16649 \family sans
16650 Overlay
16651 \family default
16652  exceed the physical size of a slide or sheet of paper, the extra will overflow
16653  onto a new sheet.
16654  Again, you should avoid this.
16655  It defeats the whole purpose of 
16656 \family sans
16657 Note
16658 \family default
16659 s and 
16660 \family sans
16661 Overlay
16662 \family default
16663 s.
16664 \end_layout
16665
16666 \begin_layout Subsubsection
16667 Using 
16668 \family sans
16669 Overlay
16670 \family default
16671  with 
16672 \family sans
16673 Slide
16674 \end_layout
16675
16676 \begin_layout Standard
16677 The idea behind an 
16678 \family sans
16679 Overlay
16680 \family default
16681  is a slide that sits atop another slide.
16682  Perhaps you wish to discuss a figure on the main 
16683 \family sans
16684 Slide
16685 \family default
16686  before displaying the text associated with it.
16687  One way to accomplish this is tape a flap of dark paper over the part of
16688  the 
16689 \family sans
16690 Slide
16691 \family default
16692  you want to display later.
16693  This method fails, however, if you wish to overlap one graph with another,
16694  for example.
16695  You would then have to fumble while speaking to align the two separate,
16696  overlapping 
16697 \family sans
16698 Slide
16699 \family default
16700 s to align the two graphs.
16701  The use of an 
16702 \family sans
16703 Overlay
16704 \family default
16705  environment in both cases makes life much easier.
16706 \end_layout
16707
16708 \begin_layout Standard
16709 Each 
16710 \family sans
16711 Overlay
16712 \family default
16713  receives the page number of its 
16714 \begin_inset Quotes eld
16715 \end_inset
16716
16717 parent
16718 \begin_inset Quotes erd
16719 \end_inset
16720
16721  
16722 \family sans
16723 Slide
16724 \family default
16725 , appended by 
16726 \begin_inset Quotes eld
16727 \end_inset
16728
16729
16730 \family typewriter
16731 -a
16732 \family default
16733
16734 \begin_inset Quotes erd
16735 \end_inset
16736
16737 .
16738 \begin_inset Foot
16739 status collapsed
16740
16741 \begin_layout Plain Layout
16742 Presumably, mutliple 
16743 \family sans
16744 Overlay
16745 \family default
16746 s would have 
16747 \begin_inset Quotes eld
16748 \end_inset
16749
16750
16751 \family typewriter
16752 -a
16753 \family default
16754
16755 \begin_inset Quotes erd
16756 \end_inset
16757
16758
16759 \begin_inset Quotes eld
16760 \end_inset
16761
16762
16763 \family typewriter
16764 -b
16765 \family default
16766
16767 \begin_inset Quotes erd
16768 \end_inset
16769
16770
16771 \begin_inset Quotes eld
16772 \end_inset
16773
16774
16775 \family typewriter
16776 -c
16777 \family default
16778
16779 \begin_inset Quotes erd
16780 \end_inset
16781
16782 , etc.
16783 \begin_inset space ~
16784 \end_inset
16785
16786 appended to the page number of the parent 
16787 \family sans
16788 Slide
16789 \family default
16790 .
16791  
16792 \end_layout
16793
16794 \end_inset
16795
16796  Clearly, you want the contents of both the 
16797 \family sans
16798 Slide
16799 \family default
16800  and the 
16801 \family sans
16802 Overlay
16803 \family default
16804  to each fit on a single physical slide! You should probably consider an
16805  
16806 \family sans
16807 Overlay
16808 \family default
16809  as 
16810 \begin_inset Quotes eld
16811 \end_inset
16812
16813 part of
16814 \begin_inset Quotes erd
16815 \end_inset
16816
16817  a 
16818 \family sans
16819 Slide
16820 \family default
16821 .
16822  Indeed, the LyX 
16823 \family sans
16824 slides
16825 \family default
16826  class provides a visual cue for this: the label at the start of an 
16827 \family sans
16828 Overlay
16829 \family default
16830  is shorter than that at the start of a 
16831 \family sans
16832 Slide
16833 \family default
16834 .
16835  Lastly, when you generate printable output, you'll find alignment markers
16836  in all four corners of both the 
16837 \family sans
16838 Overlay
16839 \family default
16840  page and its parent 
16841 \family sans
16842 Slide
16843 \family default
16844 .
16845  These will assist you in lining up the two physical slides.
16846 \end_layout
16847
16848 \begin_layout Standard
16849 The major problem in overlaying two slides is aligning the contents of the
16850  two transparencies.
16851  How much space should you leave for that graph on the second slide? Worse
16852  still, what if you want a graph and a sentence on second slide, but there
16853  is text on the main transparency that goes in between them? You could try
16854  and insert vertical space of the right size.
16855  The better way is to use 
16856 \family sans
16857 InvisibleText
16858 \family default
16859  and 
16860 \family sans
16861 VisibleText
16862 \family default
16863 .
16864 \end_layout
16865
16866 \begin_layout Standard
16867 As their names imply, 
16868 \family sans
16869 InvisibleText
16870 \family default
16871  and 
16872 \family sans
16873 VisibleText
16874 \family default
16875  are two command-like paragraph environments that make all subsequent text
16876  invisible and visible, respectively.
16877  Note from section
16878 \begin_inset space ~
16879 \end_inset
16880
16881
16882 \begin_inset CommandInset ref
16883 LatexCommand ref
16884 reference "sec:slideQuirk"
16885
16886 \end_inset
16887
16888  that you don't place anything 
16889 \emph on
16890 into
16891 \emph default
16892  these two environments, however.
16893  When you create an 
16894 \family sans
16895 InvisibleText
16896 \family default
16897 , it inserts a centered, sky-blue label into the page reading 
16898 \begin_inset Quotes eld
16899 \end_inset
16900
16901 <Invisible Text Follows>
16902 \begin_inset Quotes erd
16903 \end_inset
16904
16905 .
16906  For paragraphs following this label, the parts of the 
16907 \family sans
16908 Slide
16909 \family default
16910  [or 
16911 \family sans
16912 Overlay
16913 \family default
16914 ; it doesn't matter which] where they would be contain instead blank space.
16915  
16916 \end_layout
16917
16918 \begin_layout Standard
16919 For 
16920 \family sans
16921 VisibleText
16922 \family default
16923 , the corresponding centered label is 
16924 \begin_inset Quotes eld
16925 \end_inset
16926
16927 <Visible Text Follows>
16928 \begin_inset Quotes erd
16929 \end_inset
16930
16931  in blazing green.
16932  Paragraphs following this label behave normally.
16933  Note that the beginning of a new 
16934 \family sans
16935 Slide
16936 \family default
16937
16938 \family sans
16939 Overlay
16940 \family default
16941 , or 
16942 \family sans
16943 Note
16944 \family default
16945  automatically shuts off an 
16946 \family sans
16947 InvisibleText
16948 \family default
16949 .
16950  It's therefore not necessary to use 
16951 \family sans
16952 VisibleText
16953 \family default
16954  at the end of a 
16955 \family sans
16956 Slide
16957 \family default
16958 .
16959 \end_layout
16960
16961 \begin_layout Standard
16962 By now, it should be obvious how to create overlay transparencies using
16963  the proper combination of 
16964 \family sans
16965 InvisibleText
16966 \family default
16967  and 
16968 \family sans
16969 VisibleText
16970 \family default
16971  on a 
16972 \family sans
16973 Slide
16974 \family default
16975  and 
16976 \family sans
16977 Overlay
16978 \family default
16979 :
16980 \end_layout
16981
16982 \begin_layout Enumerate
16983 Create a 
16984 \family sans
16985 Slide
16986 \family default
16987 , including everything that will appear on it, whether on the main slide
16988  or on the 
16989 \family sans
16990 Overlay
16991 \family default
16992 .
16993 \end_layout
16994
16995 \begin_layout Enumerate
16996 Before each figure or paragraph that will appear only on the 
16997 \family sans
16998 Overlay
16999 \family default
17000 , insert an 
17001 \family sans
17002 InvisibleText
17003 \family default
17004  environment.
17005  If necessary, insert a 
17006 \family sans
17007 VisibleText
17008 \family default
17009  environment after the 
17010 \family sans
17011 Overlay
17012 \family default
17013 -only text.
17014 \end_layout
17015
17016 \begin_layout Enumerate
17017 Start an 
17018 \family sans
17019 Overlay
17020 \family default
17021  immediately following the 
17022 \family sans
17023 Slide
17024 \family default
17025 .
17026 \end_layout
17027
17028 \begin_layout Enumerate
17029 Copy the contents of this 
17030 \family sans
17031 Slide
17032 \family default
17033  into the 
17034 \family sans
17035 Overlay
17036 \family default
17037 .
17038 \end_layout
17039
17040 \begin_layout Enumerate
17041 Within the 
17042 \family sans
17043 Overlay
17044 \family default
17045 , change all of the 
17046 \family sans
17047 InvisibleText
17048 \family default
17049  lines to 
17050 \family sans
17051 VisibleText
17052 \family default
17053  and vice-versa.
17054 \end_layout
17055
17056 \begin_layout Standard
17057 That's it.
17058  You've just made an 
17059 \family sans
17060 Overlay
17061 \family default
17062 .
17063 \end_layout
17064
17065 \begin_layout Standard
17066 There's one problem with the way I've designed the LyX 
17067 \family sans
17068 slides
17069 \family default
17070  class: you can't make text in the middle of a paragraph invisible, nor
17071  make text in the middle of an invisible paragraph visible again.
17072  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17073 \begin_inset Foot
17074 status collapsed
17075
17076 \begin_layout Plain Layout
17077 The commands of interest are: 
17078 \end_layout
17079
17080 \begin_layout Itemize
17081
17082 \family typewriter
17083 {
17084 \backslash
17085 invisible \SpecialChar \ldots{}
17086  }
17087 \end_layout
17088
17089 \begin_layout Itemize
17090
17091 \family typewriter
17092 {
17093 \backslash
17094 visible \SpecialChar \ldots{}
17095  }
17096 \end_layout
17097
17098 \begin_layout Plain Layout
17099 \SpecialChar \ldots{}
17100 and need to be marked as TeX.
17101  The text whose 
17102 \begin_inset Quotes eld
17103 \end_inset
17104
17105 visibility
17106 \begin_inset Quotes erd
17107 \end_inset
17108
17109  you wish to change goes in between the brackets [and after the 
17110 \family typewriter
17111
17112 \backslash
17113 invisible
17114 \family default
17115  or 
17116 \family typewriter
17117
17118 \backslash
17119 visible
17120 \family default
17121  command].
17122  If you don't know how to mark text as TeX, see the appropriate section
17123  of the 
17124 \emph on
17125 User's Guide
17126 \emph default
17127 .
17128 \end_layout
17129
17130 \end_inset
17131
17132
17133 \end_layout
17134
17135 \begin_layout Subsubsection
17136 Using 
17137 \family sans
17138 Note
17139 \family default
17140  with 
17141 \family sans
17142 Slide
17143 \family default
17144
17145 \begin_inset CommandInset label
17146 LatexCommand label
17147 name "sec:slideNote"
17148
17149 \end_inset
17150
17151
17152 \end_layout
17153
17154 \begin_layout Standard
17155 Like an 
17156 \family sans
17157 Overlay
17158 \family default
17159 , a 
17160 \family sans
17161 Note
17162 \family default
17163  is associated with a 
17164 \begin_inset Quotes eld
17165 \end_inset
17166
17167 parent
17168 \begin_inset Quotes erd
17169 \end_inset
17170
17171  
17172 \family sans
17173 Slide
17174 \family default
17175 .
17176  Here, too, the LyX 
17177 \family sans
17178 slides
17179 \family default
17180  class provides visual cues.
17181  The label for a 
17182 \family sans
17183 Note
17184 \family default
17185  is shorter than that of a 
17186 \family sans
17187 Slide
17188 \family default
17189  [yet longer than that of an 
17190 \family sans
17191 Overlay
17192 \family default
17193 ] and, like the label of an 
17194 \family sans
17195 Overlay
17196 \family default
17197  is shockingly magenta.
17198  Additionally, the printed 
17199 \family sans
17200 Note
17201 \family default
17202  has the page number of its 
17203 \begin_inset Quotes eld
17204 \end_inset
17205
17206 parent
17207 \begin_inset Quotes erd
17208 \end_inset
17209
17210  
17211 \family sans
17212 Slide
17213 \family default
17214 , appended by 
17215 \begin_inset Quotes eld
17216 \end_inset
17217
17218
17219 \family typewriter
17220 -
17221 \family default
17222 1
17223 \begin_inset Quotes erd
17224 \end_inset
17225
17226
17227 \begin_inset Quotes eld
17228 \end_inset
17229
17230
17231 \family typewriter
17232 -
17233 \family default
17234 2
17235 \begin_inset Quotes erd
17236 \end_inset
17237
17238
17239 \begin_inset Quotes eld
17240 \end_inset
17241
17242
17243 \family typewriter
17244 -
17245 \family default
17246 3
17247 \begin_inset Quotes erd
17248 \end_inset
17249
17250 , etc.
17251  You can have multiple 
17252 \family sans
17253 Note
17254 \family default
17255 s associated with a single 
17256 \family sans
17257 Slide
17258 \family default
17259 , and, as with 
17260 \family sans
17261 Slide
17262 \family default
17263  and 
17264 \family sans
17265 Overlay
17266 \family default
17267 , you'll probably want to break up long 
17268 \family sans
17269 Note
17270 \family default
17271 s so that they fit on a single sheet of paper.
17272 \end_layout
17273
17274 \begin_layout Standard
17275 The purpose of a 
17276 \family sans
17277 Note
17278 \family default
17279  is obvious: it contains anything additional you might want to say about
17280  a 
17281 \family sans
17282 Slide
17283 \family default
17284 .
17285  It could also be used as a sheet of reminders for a particular 
17286 \family sans
17287 Slide
17288 \family default
17289 .
17290  In the case of the latter, you might want to make use of time markers.
17291  Currently, the LyX 
17292 \family sans
17293 slides
17294 \family default
17295  class has no 
17296 \begin_inset Quotes eld
17297 \end_inset
17298
17299 native
17300 \begin_inset Quotes erd
17301 \end_inset
17302
17303  support for time markers, a 
17304 \noun on
17305 SliTeX
17306 \noun default
17307  feature.
17308  So, you'll have to resort to using the LaTeX codes.
17309 \end_layout
17310
17311 \begin_layout Standard
17312 To use time markers, you'll need to specify the extra class option 
17313 \begin_inset Quotes eld
17314 \end_inset
17315
17316
17317 \family typewriter
17318 clock
17319 \family default
17320
17321 \begin_inset Quotes erd
17322 \end_inset
17323
17324  [see section
17325 \begin_inset space ~
17326 \end_inset
17327
17328
17329 \begin_inset CommandInset ref
17330 LatexCommand ref
17331 reference "sec:slidesetup"
17332
17333 \end_inset
17334
17335 ].
17336  This option turns on timing marks, which will appear in the lower-left-hand
17337  corner of every 
17338 \family sans
17339 Note
17340 \family default
17341  you generate.
17342  To set what appears in the time marker, you use the LaTeX commands 
17343 \begin_inset Quotes eld
17344 \end_inset
17345
17346
17347 \family typewriter
17348
17349 \backslash
17350 settime{}
17351 \family default
17352
17353 \begin_inset Quotes erd
17354 \end_inset
17355
17356  and 
17357 \begin_inset Quotes eld
17358 \end_inset
17359
17360
17361 \family typewriter
17362
17363 \backslash
17364 addtime{}
17365 \family default
17366
17367 \begin_inset Quotes erd
17368 \end_inset
17369
17370 .
17371  The arguments of both commands are time measured in seconds.
17372  
17373 \begin_inset Quotes eld
17374 \end_inset
17375
17376
17377 \family typewriter
17378
17379 \backslash
17380 settime{}
17381 \family default
17382
17383 \begin_inset Quotes erd
17384 \end_inset
17385
17386  sets the time marker to a given time.
17387  
17388 \begin_inset Quotes eld
17389 \end_inset
17390
17391
17392 \family typewriter
17393
17394 \backslash
17395 addtime{}
17396 \family default
17397
17398 \begin_inset Quotes erd
17399 \end_inset
17400
17401  increments the time marker by the specified amount.
17402  Using time markers and 
17403 \family sans
17404 Note
17405 \family default
17406 s in this fashion, you can remind yourself how much time to spend on a particula
17407
17408 \family sans
17409 Slide
17410 \family default
17411 .
17412 \end_layout
17413
17414 \begin_layout Standard
17415 There's one last feature to describe.
17416  Clearly, you'd like to print out all of your 
17417 \family sans
17418 Slide
17419 \family default
17420 s and 
17421 \family sans
17422 Overlay
17423 \family default
17424 s on transparencies while printing all of your 
17425 \family sans
17426 Note
17427 \family default
17428 s on plain paper.
17429  However, a 
17430 \family sans
17431 Note
17432 \family default
17433  
17434 \emph on
17435 must
17436 \emph default
17437  follow the 
17438 \family sans
17439 Slide
17440 \family default
17441  with which it is associated.
17442  What's a person to do?
17443 \end_layout
17444
17445 \begin_layout Standard
17446 Luckily, there are two LaTeX commands that allow you to select what to print
17447  out.
17448  Both must be placed into the preamble of your document.
17449  The command 
17450 \begin_inset Quotes eld
17451 \end_inset
17452
17453
17454 \family typewriter
17455
17456 \backslash
17457 onlyslides{
17458 \backslash
17459 slides}
17460 \family default
17461
17462 \begin_inset Quotes erd
17463 \end_inset
17464
17465  will cause the output to contain only the 
17466 \family sans
17467 Slide
17468 \family default
17469 s and 
17470 \family sans
17471 Overlay
17472 \family default
17473 s.
17474  Correspondingly, the command 
17475 \begin_inset Quotes eld
17476 \end_inset
17477
17478
17479 \family typewriter
17480
17481 \backslash
17482 onlynotes{
17483 \backslash
17484 notes}
17485 \family default
17486
17487 \begin_inset Quotes erd
17488 \end_inset
17489
17490  prevents the output of anything but 
17491 \family sans
17492 Note
17493 \family default
17494 s.
17495  I'd advise placing both commands in the preamble and initially comment
17496  both out.
17497  You can then preview your entire presentation as you write.
17498  When you're done writing, you can then uncomment one of the two to select
17499  what you want to print.
17500  I like to uncomment 
17501 \begin_inset Quotes eld
17502 \end_inset
17503
17504
17505 \family typewriter
17506
17507 \backslash
17508 onlyslides{
17509 \backslash
17510 slides}
17511 \family default
17512
17513 \begin_inset Quotes erd
17514 \end_inset
17515
17516  , print to a file with 
17517 \begin_inset Quotes eld
17518 \end_inset
17519
17520
17521 \family typewriter
17522 -slides
17523 \family default
17524
17525 \begin_inset Quotes erd
17526 \end_inset
17527
17528  in its name, comment it back out, then uncomment 
17529 \begin_inset Quotes eld
17530 \end_inset
17531
17532
17533 \family typewriter
17534
17535 \backslash
17536 onlynotes{
17537 \backslash
17538 notes}
17539 \family default
17540
17541 \begin_inset Quotes erd
17542 \end_inset
17543
17544  and print to a 
17545 \begin_inset Quotes eld
17546 \end_inset
17547
17548
17549 \family typewriter
17550 *-notes.ps
17551 \family default
17552
17553 \begin_inset Quotes erd
17554 \end_inset
17555
17556  file.
17557  I can then send either file to a printer, loading transparencies or plain
17558  paper as appropriate.
17559 \end_layout
17560
17561 \begin_layout Standard
17562 You can also provide other arguments to the 
17563 \begin_inset Quotes eld
17564 \end_inset
17565
17566
17567 \family typewriter
17568
17569 \backslash
17570 onlyslides{}
17571 \family default
17572
17573 \begin_inset Quotes erd
17574 \end_inset
17575
17576  and 
17577 \begin_inset Quotes eld
17578 \end_inset
17579
17580
17581 \family typewriter
17582
17583 \backslash
17584 onlynotes{}
17585 \family default
17586
17587 \begin_inset Quotes erd
17588 \end_inset
17589
17590  commands.
17591  See a good LaTeX book for details.
17592 \end_layout
17593
17594 \begin_layout Subsection
17595 The 
17596 \family sans
17597 slides
17598 \family default
17599  Class Template File
17600 \end_layout
17601
17602 \begin_layout Standard
17603 I have also provided a template file, 
17604 \begin_inset Quotes eld
17605 \end_inset
17606
17607
17608 \family typewriter
17609 slides.lyx
17610 \family default
17611
17612 \begin_inset Quotes erd
17613 \end_inset
17614
17615 , with the 
17616 \family sans
17617 slides
17618 \family default
17619  class.
17620  To use it, begin your new presentation with 
17621 \family sans
17622 \bar under
17623 F
17624 \bar default
17625 ile\SpecialChar \menuseparator
17626 New
17627 \begin_inset space ~
17628 \end_inset
17629
17630 from
17631 \begin_inset space ~
17632 \end_inset
17633
17634
17635 \bar under
17636 T
17637 \bar default
17638 emplate
17639 \family default
17640 .
17641  Your new LyX presentation file will contain an example 
17642 \family sans
17643 Slide
17644 \family default
17645  – 
17646 \family sans
17647 Overlay
17648 \family default
17649  – 
17650 \family sans
17651 Note
17652 \family default
17653  triplet.
17654  The 
17655 \family sans
17656 Slide
17657 \family default
17658  and 
17659 \family sans
17660 Overlay
17661 \family default
17662  additionally contain an example of the use of 
17663 \family sans
17664 InvisibleText
17665 \family default
17666  and 
17667 \family sans
17668 VisibleText
17669 \family default
17670 .
17671  Lastly, the preamble will contain:
17672 \end_layout
17673
17674 \begin_layout LyX-Code
17675 % Uncomment to print out only slides and overlays
17676 \end_layout
17677
17678 \begin_layout LyX-Code
17679 %
17680 \end_layout
17681
17682 \begin_layout LyX-Code
17683 %
17684 \backslash
17685 onlyslides{
17686 \backslash
17687 slides}
17688 \begin_inset Newline newline
17689 \end_inset
17690
17691  
17692 \end_layout
17693
17694 \begin_layout LyX-Code
17695 % Uncomment to print out only notes
17696 \end_layout
17697
17698 \begin_layout LyX-Code
17699 %
17700 \end_layout
17701
17702 \begin_layout LyX-Code
17703 %
17704 \backslash
17705 onlynotes{
17706 \backslash
17707 notes}
17708 \end_layout
17709
17710 \begin_layout Standard
17711 One final thing: I created this class to support the LaTeX2e 
17712 \begin_inset Quotes eld
17713 \end_inset
17714
17715
17716 \noun on
17717 SliTeX
17718 \noun default
17719  emulation
17720 \begin_inset Quotes erd
17721 \end_inset
17722
17723  class, one of the built-in LaTeX2e classes.
17724  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17725  built-in slide class.
17726  It's here if you want it or need it.
17727  There exist other LaTeX2e classes for creating presentations, such as the
17728  
17729 \family sans
17730 Foils
17731 \family default
17732  class [see section
17733 \begin_inset space ~
17734 \end_inset
17735
17736
17737 \begin_inset CommandInset ref
17738 LatexCommand ref
17739 reference "sec:foiltex"
17740
17741 \end_inset
17742
17743 ] or the 
17744 \begin_inset Quotes eld
17745 \end_inset
17746
17747
17748 \family typewriter
17749 seminar
17750 \family default
17751
17752 \begin_inset Quotes erd
17753 \end_inset
17754
17755  package [present on some TeX distributions].
17756  The latter is not yet supported under LyX.
17757 \begin_inset Foot
17758 status collapsed
17759
17760 \begin_layout Plain Layout
17761 Perhaps you can take on the task\SpecialChar \ldots{}
17762
17763 \end_layout
17764
17765 \end_inset
17766
17767  I know nothing about these other classes.
17768  Try them out to see what sort of alternative they provide.
17769 \end_layout
17770
17771 \begin_layout Chapter
17772 LyX Features needing Extra Software
17773 \end_layout
17774
17775 \begin_layout Section
17776 Checking TeX
17777 \end_layout
17778
17779 \begin_layout Standard
17780 by 
17781 \noun on
17782 Asger Alstrup
17783 \end_layout
17784
17785 \begin_layout Subsection
17786 Introduction
17787 \end_layout
17788
17789 \begin_layout Standard
17790 If you have the 
17791 \family typewriter
17792 chktex
17793 \family default
17794  program installed
17795 \begin_inset Foot
17796 status collapsed
17797
17798 \begin_layout Plain Layout
17799
17800 \family typewriter
17801 chktex
17802 \family default
17803  is not yet available when you are using the LaTeX distribution MiKTeX.
17804 \end_layout
17805
17806 \end_inset
17807
17808 , you'll find in the 
17809 \family sans
17810 Tools
17811 \family default
17812  menu the entry: 
17813 \family sans
17814 Check
17815 \begin_inset space ~
17816 \end_inset
17817
17818 TeX
17819 \family default
17820 .
17821  You can get 
17822 \family typewriter
17823 chktex
17824 \family default
17825  it from CTAN, 
17826 \begin_inset CommandInset href
17827 LatexCommand href
17828 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17829
17830 \end_inset
17831
17832 .
17833 \end_layout
17834
17835 \begin_layout Standard
17836 The 
17837 \family sans
17838 ChkTeX
17839 \family default
17840  package is a program that was written by 
17841 \begin_inset Flex Noun
17842 status collapsed
17843
17844 \begin_layout Plain Layout
17845 Jens T.
17846 \begin_inset space ~
17847 \end_inset
17848
17849 Berger Thielemann
17850 \end_layout
17851
17852 \end_inset
17853
17854  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17855  and easy to forget.
17856  The program runs over your LaTeX file, checks the integrity of the file,
17857  and flags some common errors.
17858  In other technical words, it is 
17859 \family typewriter
17860 lint
17861 \family default
17862  for LaTeX.
17863 \end_layout
17864
17865 \begin_layout Standard
17866 Well, what is a syntax checker doing in LyX which is supposed to produce
17867  correct LaTeX anyways? The answer is simple: Just as 
17868 \family typewriter
17869 Lint
17870 \family default
17871  not only checks the 
17872 \emph on
17873 syntax
17874 \emph default
17875  of C programs, but also does 
17876 \emph on
17877 semantic
17878 \emph default
17879  checks for type-errors, 
17880 \family sans
17881 ChkTeX
17882 \family default
17883  catches some common 
17884 \emph on
17885 typographic
17886 \emph default
17887  errors, in addition to the syntactical ones.
17888  Specifically, 
17889 \family sans
17890 ChkTeX
17891 \family default
17892  is capable of detecting several common errors, such as
17893 \end_layout
17894
17895 \begin_layout Itemize
17896 Ellipsis detection:
17897 \begin_inset Newline newline
17898 \end_inset
17899
17900 Use \SpecialChar \ldots{}
17901  instead of ...
17902 \end_layout
17903
17904 \begin_layout Itemize
17905 No space in front of/after parenthesis:
17906 \begin_inset Newline newline
17907 \end_inset
17908
17909 ( wrong spacing )
17910 \end_layout
17911
17912 \begin_layout Itemize
17913 Enforcement of normal space after common abbreviations:
17914 \begin_inset Newline newline
17915 \end_inset
17916
17917 e.
17918 \begin_inset space \thinspace{}
17919 \end_inset
17920
17921 g.
17922 \begin_inset space \space{}
17923 \end_inset
17924
17925 is too wide spacing.
17926 \end_layout
17927
17928 \begin_layout Itemize
17929 Enforcement of end-of-sentence space when the last sentence ends with a
17930  capital letter:
17931 \begin_inset Newline newline
17932 \end_inset
17933
17934 This is a TEST.
17935  And this is wrong spacing.
17936 \end_layout
17937
17938 \begin_layout Itemize
17939 Space in front of labels and similar commands:
17940 \begin_inset Newline newline
17941 \end_inset
17942
17943 The label should stick right up to the text to avoid falling to a wrong
17944  page.
17945  
17946 \begin_inset CommandInset label
17947 LatexCommand label
17948 name "sec:chktex"
17949
17950 \end_inset
17951
17952  
17953 \begin_inset Foot
17954 status collapsed
17955
17956 \begin_layout Plain Layout
17957 This footnote is in danger of falling off to a wrong page
17958 \end_layout
17959
17960 \end_inset
17961
17962  The label is separated too much.
17963 \end_layout
17964
17965 \begin_layout Itemize
17966 Space in front of references, instead of hard spaces:
17967 \begin_inset Newline newline
17968 \end_inset
17969
17970 In you are in bad luck, the text will break right between the referenced
17971  text and reference number, and that's a pity.
17972  See section 
17973 \begin_inset CommandInset ref
17974 LatexCommand ref
17975 reference "sec:chktex"
17976
17977 \end_inset
17978
17979 .
17980 \end_layout
17981
17982 \begin_layout Itemize
17983 Use of 
17984 \begin_inset Quotes eld
17985 \end_inset
17986
17987 x
17988 \begin_inset Quotes erd
17989 \end_inset
17990
17991  instead of 
17992 \begin_inset Formula $\times$
17993 \end_inset
17994
17995  between numbers:
17996 \begin_inset Newline newline
17997 \end_inset
17998
17999 2x2 looks cheap compared to 
18000 \begin_inset Formula $2\times2$
18001 \end_inset
18002
18003 .
18004 \end_layout
18005
18006 \begin_layout Standard
18007 and more \SpecialChar \ldots{}
18008  It is an invaluable tool when you are 
18009 \begin_inset Quotes eld
18010 \end_inset
18011
18012 finishing up
18013 \begin_inset Quotes erd
18014 \end_inset
18015
18016  your document before printing, and you should run it right after the obligatory
18017  spelling check, and before you go fine tuning the typesetting.
18018 \end_layout
18019
18020 \begin_layout Subsection
18021 How to use it
18022 \end_layout
18023
18024 \begin_layout Standard
18025 If you have the program installed, usage is as simple as choosing 
18026 \family sans
18027 Tools\SpecialChar \menuseparator
18028 Check
18029 \begin_inset space ~
18030 \end_inset
18031
18032 TeX
18033 \family default
18034 .
18035  This will make LyX generate a LaTeX file of your document, start 
18036 \family sans
18037 ChkTeX
18038 \family default
18039  to check it, and then make LyX insert 
18040 \begin_inset Quotes eld
18041 \end_inset
18042
18043 error boxes
18044 \begin_inset Quotes erd
18045 \end_inset
18046
18047  with the warnings from 
18048 \family sans
18049 ChkTeX
18050 \family default
18051 , if there were any.
18052  The warnings will be placed close to the point of the mistake, and you
18053  can quickly find them by using the 
18054 \family sans
18055 Navigate\SpecialChar \menuseparator
18056 Error
18057 \family default
18058  menu item, or the shortcut key 
18059 \family sans
18060 C-g
18061 \family default
18062  from the default 
18063 \family typewriter
18064 cua
18065 \family default
18066  bind file.
18067  Open the error boxes by clicking on them with the mouse, or use the shortcut
18068  key 
18069 \family sans
18070 C-i
18071 \family default
18072  from 
18073 \family typewriter
18074 cua
18075 \family default
18076  bindings, or the corresponding 
18077 \family sans
18078 C-o
18079 \family default
18080  for the alternate 
18081 \family typewriter
18082 emacs
18083 \family default
18084  bind file.
18085  Read the warning and correct the mistake, if it is a mistake.
18086  If you have trouble understanding what the warning is about, you can safely
18087  ignore it.
18088  Remember that there is a hidden layer between the document on screen and
18089  the technical details in invoking 
18090 \family sans
18091 ChkTeX
18092 \family default
18093 , and this gap can make some warnings seem arcane or just right down plain
18094  silly.
18095 \end_layout
18096
18097 \begin_layout Standard
18098 This document is an excellent testing bed for the feature, and it should
18099  provide quite a few warnings for you to fiddle with.
18100  Since computers are only so smart, expect most of the warnings to be false
18101  alarms, though.
18102 \end_layout
18103
18104 \begin_layout Subsection
18105 How to fine tune it
18106 \end_layout
18107
18108 \begin_layout Standard
18109 Sometimes, you'll find that 
18110 \family sans
18111 ChkTeX
18112 \family default
18113  makes more noise than suits your mood.
18114  Then you can choose not to use it, wait until your mood changes, or try
18115  to customize 
18116 \family sans
18117 ChkTeX
18118 \family default
18119  to get better along with you.
18120 \end_layout
18121
18122 \begin_layout Standard
18123 Although 
18124 \family sans
18125 ChkTeX
18126 \family default
18127  
18128 \emph on
18129 is
18130 \emph default
18131  very configurable and extensible, you shouldn't expect to solve all problems
18132  with 
18133 \family sans
18134 ChkTeX
18135 \family default
18136  in LyX this way.
18137  Since LyX has to generate a somewhat special LaTeX file to be able to match
18138  the line numbers from the 
18139 \family sans
18140 ChkTeX
18141 \family default
18142  output
18143 \begin_inset Foot
18144 status collapsed
18145
18146 \begin_layout Plain Layout
18147 You can inspect the specific output from 
18148 \family sans
18149 chktex
18150 \family default
18151  by using 
18152 \family sans
18153 Edit\SpecialChar \menuseparator
18154 View
18155 \begin_inset space ~
18156 \end_inset
18157
18158 LaTeX
18159 \begin_inset space ~
18160 \end_inset
18161
18162 Log
18163 \family default
18164  right after a 
18165 \family sans
18166 chktex
18167 \family default
18168  run.
18169 \end_layout
18170
18171 \end_inset
18172
18173  to the internal document structure, some of the warnings will not seen
18174  to appear correctly.
18175  There are two things you can do about this:
18176 \end_layout
18177
18178 \begin_layout Itemize
18179 Fine tune the 
18180 \family sans
18181 ChkTeX
18182 \family default
18183  invocation command line in 
18184 \family sans
18185 Preferences
18186 \family default
18187  (tabs 
18188 \family sans
18189 Outputs
18190 \family default
18191
18192 \family sans
18193 Misc
18194 \family default
18195 ), or the global 
18196 \family sans
18197 ChkTeX
18198 \family default
18199  installation configuration file (usually with the file 
18200 \family typewriter
18201 chktexrc
18202 \family default
18203 ).
18204  See below to learn what warnings can be enabled and disabled on the command
18205  line.
18206  
18207 \end_layout
18208
18209 \begin_layout Itemize
18210 Export your document as a raw LaTeX file using 
18211 \family sans
18212 File\SpecialChar \menuseparator
18213 Export\SpecialChar \menuseparator
18214 LaTeX
18215 \family default
18216  and run 
18217 \family typewriter
18218 chktex
18219 \family default
18220  manually on that.
18221  Invoked in this way, it can be a hassle to find the corresponding place
18222  in the document inside LyX, but with a little patience, you should be able
18223  to do it.
18224 \end_layout
18225
18226 \begin_layout Standard
18227 Here follows the warning messages that can be enabled and disabled in 
18228 \family sans
18229 Preferences
18230 \family default
18231 .
18232  Use 
18233 \family typewriter
18234 -n#
18235 \family default
18236  to disable a warning, and 
18237 \family typewriter
18238 -w#
18239 \family default
18240  to enable a warning.
18241  The emphasized entries are disabled by default, because the default is
18242  "
18243 \family typewriter
18244 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18245 \family default
18246 ".
18247 \end_layout
18248
18249 \begin_layout Standard
18250 Notice that you should only use the options that enable and disable warnings,
18251  because LyX relies on some of the other command line parameters to be set
18252  in a specific way to have a chance to communicate with 
18253 \family typewriter
18254 chktex
18255 \family default
18256 .
18257 \end_layout
18258
18259 \begin_layout Enumerate
18260
18261 \size small
18262 \emph on
18263 Command terminated with space.
18264 \end_layout
18265
18266 \begin_layout Enumerate
18267
18268 \size small
18269 Non-breaking space (
18270 \begin_inset Quotes eld
18271 \end_inset
18272
18273
18274 \family typewriter
18275 ~
18276 \family default
18277
18278 \begin_inset Quotes erd
18279 \end_inset
18280
18281 ) should have been used.
18282 \end_layout
18283
18284 \begin_layout Enumerate
18285
18286 \size small
18287 \emph on
18288 You should enclose the previous parenthesis with 
18289 \begin_inset Quotes eld
18290 \end_inset
18291
18292
18293 \family typewriter
18294 {}
18295 \family default
18296
18297 \begin_inset Quotes erd
18298 \end_inset
18299
18300 .
18301 \end_layout
18302
18303 \begin_layout Enumerate
18304
18305 \size small
18306 Italic correction (
18307 \begin_inset Quotes eld
18308 \end_inset
18309
18310
18311 \family typewriter
18312
18313 \backslash
18314 /
18315 \family default
18316
18317 \begin_inset Quotes erd
18318 \end_inset
18319
18320 ) found in non-italic buffer.
18321 \end_layout
18322
18323 \begin_layout Enumerate
18324
18325 \size small
18326 Italic correction (
18327 \begin_inset Quotes eld
18328 \end_inset
18329
18330
18331 \family typewriter
18332
18333 \backslash
18334 /
18335 \family default
18336
18337 \begin_inset Quotes erd
18338 \end_inset
18339
18340 ) found more than once.
18341 \end_layout
18342
18343 \begin_layout Enumerate
18344
18345 \size small
18346 \emph on
18347 No italic correction (
18348 \begin_inset Quotes eld
18349 \end_inset
18350
18351
18352 \family typewriter
18353
18354 \backslash
18355 /
18356 \family default
18357
18358 \begin_inset Quotes erd
18359 \end_inset
18360
18361 ) found.
18362 \end_layout
18363
18364 \begin_layout Enumerate
18365
18366 \size small
18367 Accent command 
18368 \begin_inset Quotes eld
18369 \end_inset
18370
18371
18372 \family typewriter
18373 cmd
18374 \family default
18375
18376 \begin_inset Quotes erd
18377 \end_inset
18378
18379  needs use of 
18380 \begin_inset Quotes eld
18381 \end_inset
18382
18383
18384 \family typewriter
18385 cmd
18386 \family default
18387
18388 \begin_inset Quotes erd
18389 \end_inset
18390
18391 .
18392 \end_layout
18393
18394 \begin_layout Enumerate
18395
18396 \size small
18397 Wrong length of dash may have been used.
18398 \end_layout
18399
18400 \begin_layout Enumerate
18401
18402 \size small
18403 \emph on
18404 \begin_inset Quotes eld
18405 \end_inset
18406
18407
18408 \family typewriter
18409 %s
18410 \family default
18411
18412 \begin_inset Quotes erd
18413 \end_inset
18414
18415  expected, found 
18416 \begin_inset Quotes eld
18417 \end_inset
18418
18419
18420 \family typewriter
18421 %s
18422 \family default
18423
18424 \begin_inset Quotes erd
18425 \end_inset
18426
18427 .
18428 \end_layout
18429
18430 \begin_layout Enumerate
18431
18432 \size small
18433 Solo 
18434 \begin_inset Quotes eld
18435 \end_inset
18436
18437
18438 \family typewriter
18439 %s
18440 \family default
18441
18442 \begin_inset Quotes erd
18443 \end_inset
18444
18445  found.
18446 \end_layout
18447
18448 \begin_layout Enumerate
18449
18450 \size small
18451 You should use 
18452 \begin_inset Quotes eld
18453 \end_inset
18454
18455
18456 \family typewriter
18457 %s
18458 \family default
18459
18460 \begin_inset Quotes erd
18461 \end_inset
18462
18463  to achieve an ellipsis.
18464 \end_layout
18465
18466 \begin_layout Enumerate
18467
18468 \size small
18469 Inter-word spacing (
18470 \begin_inset Quotes eld
18471 \end_inset
18472
18473
18474 \family typewriter
18475
18476 \backslash
18477
18478 \family default
18479  
18480 \begin_inset Quotes eld
18481 \end_inset
18482
18483 ) should perhaps be used.
18484 \end_layout
18485
18486 \begin_layout Enumerate
18487
18488 \size small
18489 Inter-sentence spacing (
18490 \begin_inset Quotes eld
18491 \end_inset
18492
18493
18494 \family typewriter
18495
18496 \backslash
18497 @
18498 \family default
18499
18500 \begin_inset Quotes erd
18501 \end_inset
18502
18503 ) should perhaps be used.
18504 \end_layout
18505
18506 \begin_layout Enumerate
18507
18508 \size small
18509 Could not find argument for command.
18510 \end_layout
18511
18512 \begin_layout Enumerate
18513
18514 \size small
18515 No match found for 
18516 \begin_inset Quotes eld
18517 \end_inset
18518
18519
18520 \family typewriter
18521 %s
18522 \family default
18523
18524 \begin_inset Quotes erd
18525 \end_inset
18526
18527 .
18528 \end_layout
18529
18530 \begin_layout Enumerate
18531
18532 \size small
18533 Math mode still on at end of LaTeX file.
18534 \end_layout
18535
18536 \begin_layout Enumerate
18537
18538 \size small
18539 Number of 
18540 \begin_inset Quotes eld
18541 \end_inset
18542
18543
18544 \family typewriter
18545 char
18546 \family default
18547
18548 \begin_inset Quotes erd
18549 \end_inset
18550
18551  doesn't match the number of 
18552 \begin_inset Quotes eld
18553 \end_inset
18554
18555
18556 \family typewriter
18557 char
18558 \family default
18559
18560 \begin_inset Quotes erd
18561 \end_inset
18562
18563 .
18564 \end_layout
18565
18566 \begin_layout Enumerate
18567
18568 \size small
18569 You should use either 
18570 \family typewriter
18571
18572 \begin_inset Quotes eld
18573 \end_inset
18574
18575
18576 \family default
18577  or 
18578 \family typewriter
18579
18580 \begin_inset Quotes erd
18581 \end_inset
18582
18583
18584 \family default
18585  as an alternative to 
18586 \begin_inset Quotes eld
18587 \end_inset
18588
18589
18590 \family typewriter
18591 "
18592 \family default
18593
18594 \begin_inset Quotes erd
18595 \end_inset
18596
18597 .
18598 \end_layout
18599
18600 \begin_layout Enumerate
18601
18602 \size small
18603 You should use "
18604 \family typewriter
18605 '
18606 \family default
18607 " (ASCII 39) instead of "
18608 \family typewriter
18609 ´
18610 \family default
18611 " (ASCII 180).
18612 \end_layout
18613
18614 \begin_layout Enumerate
18615
18616 \size small
18617 User-specified pattern found.
18618 \end_layout
18619
18620 \begin_layout Enumerate
18621
18622 \size small
18623 This command might not be intended.
18624 \end_layout
18625
18626 \begin_layout Enumerate
18627
18628 \size small
18629 \emph on
18630 Comment displayed.
18631 \end_layout
18632
18633 \begin_layout Enumerate
18634
18635 \size small
18636 Either 
18637 \family typewriter
18638 ''
18639 \backslash
18640 ,'
18641 \family default
18642  or 
18643 \family typewriter
18644 '
18645 \backslash
18646 ,''
18647 \family default
18648  will look better.
18649 \end_layout
18650
18651 \begin_layout Enumerate
18652
18653 \size small
18654 Delete this space to maintain correct page references.
18655 \end_layout
18656
18657 \begin_layout Enumerate
18658
18659 \size small
18660 \emph on
18661 You might wish to put this between a pair of 
18662 \begin_inset Quotes eld
18663 \end_inset
18664
18665
18666 \family typewriter
18667 {}
18668 \family default
18669
18670 \begin_inset Quotes erd
18671 \end_inset
18672
18673 .
18674 \end_layout
18675
18676 \begin_layout Enumerate
18677
18678 \size small
18679 You ought to remove spaces in front of punctuation.
18680 \end_layout
18681
18682 \begin_layout Enumerate
18683
18684 \size small
18685 Could not execute LaTeX command.
18686 \end_layout
18687
18688 \begin_layout Enumerate
18689
18690 \size small
18691 Don't use 
18692 \family typewriter
18693
18694 \backslash
18695 /
18696 \family default
18697  in front of small punctuation.
18698 \end_layout
18699
18700 \begin_layout Enumerate
18701
18702 \family typewriter
18703 \size small
18704 $
18705 \backslash
18706 times$
18707 \family default
18708  may look prettier here.
18709 \end_layout
18710
18711 \begin_layout Enumerate
18712
18713 \size small
18714 \emph on
18715 Multiple spaces detected in output.
18716 \end_layout
18717
18718 \begin_layout Enumerate
18719
18720 \size small
18721 This text may be ignored.
18722 \end_layout
18723
18724 \begin_layout Enumerate
18725
18726 \size small
18727 Use 
18728 \family typewriter
18729
18730 \begin_inset Quotes eld
18731 \end_inset
18732
18733
18734 \family default
18735  to begin quotation, not 
18736 \family typewriter
18737 '
18738 \family default
18739 .
18740 \end_layout
18741
18742 \begin_layout Enumerate
18743
18744 \size small
18745 Use 
18746 \family typewriter
18747 '
18748 \family default
18749  to end quotation, not 
18750 \family typewriter
18751
18752 \begin_inset Quotes eld
18753 \end_inset
18754
18755
18756 \family default
18757 .
18758 \end_layout
18759
18760 \begin_layout Enumerate
18761
18762 \size small
18763 Don't mix quotes.
18764 \end_layout
18765
18766 \begin_layout Enumerate
18767
18768 \size small
18769 You should perhaps use 
18770 \begin_inset Quotes eld
18771 \end_inset
18772
18773
18774 \family typewriter
18775 cmd
18776 \family default
18777
18778 \begin_inset Quotes erd
18779 \end_inset
18780
18781  instead.
18782 \end_layout
18783
18784 \begin_layout Enumerate
18785
18786 \size small
18787 You should put a space in front of/after parenthesis.
18788 \end_layout
18789
18790 \begin_layout Enumerate
18791
18792 \size small
18793 You should avoid spaces in front of/after parenthesis.
18794 \end_layout
18795
18796 \begin_layout Enumerate
18797
18798 \size small
18799 \emph on
18800 You should not use punctuation in front of/after quotes.
18801 \end_layout
18802
18803 \begin_layout Enumerate
18804
18805 \size small
18806 Double space found.
18807 \end_layout
18808
18809 \begin_layout Enumerate
18810
18811 \size small
18812 You should put punctuation outside inner/inside display math mode.
18813 \end_layout
18814
18815 \begin_layout Enumerate
18816
18817 \size small
18818 You ought to not use primitive TeX in LaTeX code.
18819 \end_layout
18820
18821 \begin_layout Enumerate
18822
18823 \size small
18824 You should remove spaces in front of 
18825 \begin_inset Quotes eld
18826 \end_inset
18827
18828
18829 \family typewriter
18830 %s
18831 \family default
18832
18833 \begin_inset Quotes erd
18834 \end_inset
18835
18836
18837 \end_layout
18838
18839 \begin_layout Enumerate
18840
18841 \size small
18842 \begin_inset Quotes eld
18843 \end_inset
18844
18845
18846 \family typewriter
18847 %s
18848 \family default
18849
18850 \begin_inset Quotes erd
18851 \end_inset
18852
18853  is normally not followed by 
18854 \begin_inset Quotes eld
18855 \end_inset
18856
18857
18858 \family typewriter
18859 %c
18860 \family default
18861
18862 \begin_inset Quotes erd
18863 \end_inset
18864
18865 .
18866 \end_layout
18867
18868 \begin_layout Standard
18869 In later versions of LyX, we hope to provide a more complete interface to
18870  this tool (and it's smaller cousin 
18871 \family typewriter
18872 lacheck
18873 \family default
18874 ) to exploit the full power of it.
18875  But it's not exactly useless as it is now: go try it on one of your existing
18876  documents of a certain length and be surprised.
18877 \end_layout
18878
18879 \begin_layout Section
18880 Version Control in LyX
18881 \end_layout
18882
18883 \begin_layout Standard
18884 by
18885 \noun on
18886  Lars Gullik Bjønnes 
18887 \noun default
18888 and 
18889 \noun on
18890 Pavel Sanda
18891 \end_layout
18892
18893 \begin_layout Subsection
18894 Introduction
18895 \end_layout
18896
18897 \begin_layout Standard
18898 A friend of mine wanted to try LyX for a group project.
18899  When he didn't find support for version control or file locking, he dropped
18900  it.
18901  This angered me a bit, so I thought that I should at least make support
18902  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18903  This has been done.
18904  LyX now supports some of the most basic RCS/CVS/SVN commands.
18905  If you need something a bit more sophisticated you will have to do that
18906  manually in a terminal.
18907 \end_layout
18908
18909 \begin_layout Standard
18910 Also note that CVS support is not as good as subversion support so we advice
18911  using SVN instead.
18912  Good place to start with Subversion is SVN Book
18913 \begin_inset Foot
18914 status open
18915
18916 \begin_layout Plain Layout
18917 \begin_inset CommandInset href
18918 LatexCommand href
18919 target "http://svnbook.red-bean.com/"
18920
18921 \end_inset
18922
18923
18924 \end_layout
18925
18926 \end_inset
18927
18928 .
18929  In case of RCS you should read 
18930 \begin_inset Quotes eld
18931 \end_inset
18932
18933 rcsintro
18934 \begin_inset Quotes erd
18935 \end_inset
18936
18937  (a man file, read it with 
18938 \family typewriter
18939 man rcsintro
18940 \family default
18941 ).
18942  This file describes all the basic features of RCS.
18943  You should especially notice the comment about a RCS directory, and the
18944  notion of a master RCS file (the file ending in 
18945 \family typewriter
18946 ,v
18947 \family default
18948 ).
18949 \end_layout
18950
18951 \begin_layout Standard
18952 Before you begin to use the version control features in LyX, you should
18953  be familiar with RCS/CVS/SVN usage.
18954  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18955  package—no guarantees are made for older versions.
18956  Most of the log messages are not currently displayed after operations —
18957  you can check them in Messages pane if unsure.
18958 \end_layout
18959
18960 \begin_layout Standard
18961 For introducing your own external commands consult vc-command in the manual
18962  of LyX functions.
18963 \end_layout
18964
18965 \begin_layout Subsection
18966 RCS commands in LyX
18967 \end_layout
18968
18969 \begin_layout Standard
18970 The following sections describe the RCS commands supported by LyX.
18971  You can find them in the 
18972 \family sans
18973 File\SpecialChar \menuseparator
18974 Version
18975 \begin_inset space ~
18976 \end_inset
18977
18978 Control
18979 \family default
18980  submenu.
18981  LyX was tested against RCS 5.7.
18982 \end_layout
18983
18984 \begin_layout Subsubsection
18985
18986 \family sans
18987 Register
18988 \end_layout
18989
18990 \begin_layout Standard
18991 If your document is not under revision control, this is the only item shown
18992  in the menu.
18993  And if it is under revision control, the 
18994 \family sans
18995 Register
18996 \family default
18997  item is not visible.
18998  
18999 \end_layout
19000
19001 \begin_layout Standard
19002 This command registers your document with RCS (unless you are under the
19003  directory managed by CVS)\SpecialChar \@.
19004  You are asked interactively to supply an initial
19005  description of the document.
19006  The document is now set in Read-Only mode and you have to 
19007 \family sans
19008 Check
19009 \begin_inset space ~
19010 \end_inset
19011
19012 Out
19013 \begin_inset space ~
19014 \end_inset
19015
19016 For
19017 \begin_inset space ~
19018 \end_inset
19019
19020 Edit
19021 \family default
19022 , before making any changes to it.
19023  A document under revision control has a 
19024 \begin_inset Quotes eld
19025 \end_inset
19026
19027 [RCS:<version> <locker>]
19028 \begin_inset Quotes erd
19029 \end_inset
19030
19031  item tagged to the filename in the minibuffer.
19032 \end_layout
19033
19034 \begin_layout Standard
19035 RCS command that is run: 
19036 \family typewriter
19037 ci -q -u -i -t-"<initial description>" <file-name>
19038 \end_layout
19039
19040 \begin_layout Standard
19041 Read 
19042 \family typewriter
19043 man ci
19044 \family default
19045  to understand the switches.
19046  
19047 \end_layout
19048
19049 \begin_layout Subsubsection
19050
19051 \family sans
19052 Check In Changes
19053 \end_layout
19054
19055 \begin_layout Standard
19056 When you are finished editing a file, you check in your changes.
19057  When you do this, you are asked for a description of the changes.
19058  This is stored in the history log.
19059  The version number is bumped, your changes are applied to the master RCS
19060  file, the document is unlocked and set to Read-Only mode.
19061  
19062 \end_layout
19063
19064 \begin_layout Standard
19065 RCS command: 
19066 \family typewriter
19067 ci -q -u -m"<description>" <file-name>
19068 \end_layout
19069
19070 \begin_layout Subsubsection
19071
19072 \family sans
19073 Check Out For Edit
19074 \end_layout
19075
19076 \begin_layout Standard
19077 By doing this you lock the document so that only you can edit it.
19078  This will also make the document Read-Write only for you.
19079  You will usually continue editing for a while and when you are finished
19080  you check in your changes.
19081  The status line is changed to reflect that you have locked the file.
19082  
19083 \end_layout
19084
19085 \begin_layout Standard
19086 RCS command: 
19087 \family typewriter
19088 co -q -l <file-name>
19089 \end_layout
19090
19091 \begin_layout Subsubsection
19092
19093 \family sans
19094 Revert To Repository Version
19095 \end_layout
19096
19097 \begin_layout Standard
19098 This will discard all changes made to the document since the last check
19099  in.
19100  You get a warning before changes are discarded.
19101 \end_layout
19102
19103 \begin_layout Standard
19104 RCS command: 
19105 \family typewriter
19106 co -f -u<version> <file-name>
19107 \end_layout
19108
19109 \begin_layout Subsubsection
19110
19111 \family sans
19112 Undo Last Checkin
19113 \end_layout
19114
19115 \begin_layout Standard
19116 This makes as if the last check in never happened.
19117  No changes are made to the document loaded into LyX, but the last version
19118  is removed from the master RCS file.
19119  
19120 \end_layout
19121
19122 \begin_layout Standard
19123 RCS command: 
19124 \family typewriter
19125 rcs -o<version> <file-name>
19126 \end_layout
19127
19128 \begin_layout Subsubsection
19129
19130 \family sans
19131 Show History
19132 \end_layout
19133
19134 \begin_layout Standard
19135 This shows the complete history of the RCS document.
19136  The output of 
19137 \family typewriter
19138 rlog <file-name>
19139 \family default
19140  is shown in a browser.
19141  See 
19142 \family typewriter
19143 man rlog
19144 \family default
19145  for more info.
19146 \end_layout
19147
19148 \begin_layout Subsubsection
19149 Revision info
19150 \end_layout
19151
19152 \begin_layout Standard
19153 LyX supports RCS version number, author name, date and time of last commit.
19154  All those are extracted from 
19155 \family typewriter
19156 rlog -r <file-name>
19157 \family default
19158 .
19159  For other details see 
19160 \begin_inset CommandInset ref
19161 LatexCommand ref
19162 reference "sub:VCS-Revision-Information"
19163
19164 \end_inset
19165
19166  for details.
19167 \end_layout
19168
19169 \begin_layout Subsection
19170 CVS commands in LyX
19171 \end_layout
19172
19173 \begin_layout Standard
19174 A subset of CVS operations is supported by LyX.
19175  You can find the commands in the 
19176 \family sans
19177 File\SpecialChar \menuseparator
19178 Version
19179 \begin_inset space ~
19180 \end_inset
19181
19182 Control
19183 \family default
19184  submenu.
19185  The version control system SVN is more powerful, so please use it instead
19186  of CVS if possible.
19187 \end_layout
19188
19189 \begin_layout Subsubsection
19190
19191 \family sans
19192 General CVS usage
19193 \end_layout
19194
19195 \begin_layout Standard
19196 If you start from scratch with CVS you have to create your repository and
19197  checkout the working copy with external tools.
19198  If you're using a client-server setup you may need to login before doing
19199  the first repository checkout.
19200 \end_layout
19201
19202 \begin_layout Standard
19203 If your documents are under revision control and others are using the same
19204  repository problems arise when different changes to the same document at
19205  the same location happen.
19206  Standard CVS repositories doesn't operate with a file locking mechanism.
19207  This may be surprising, but conflicts only occur if people disagree on
19208  the proper content of the same part of a document.
19209  So, if co-workers are used to communicate regularly, these conflicts occur
19210  rarely.
19211  If they don't communicate they have a fundamental problem anyway.
19212  Nevertheless some people like to work with so called 
19213 \begin_inset Quotes eld
19214 \end_inset
19215
19216 reserved checkouts
19217 \begin_inset Quotes erd
19218 \end_inset
19219
19220 .
19221  If they do so the working copy of all files is readonly when checked out
19222  first and the user starts editing after using a special command to make
19223  the working copy writable.
19224  When the changes are checked in the working copy returns to readonly state.
19225  With LyX one has to edit the 
19226 \begin_inset Flex Code
19227 status collapsed
19228
19229 \begin_layout Plain Layout
19230 .cvsrc
19231 \end_layout
19232
19233 \end_inset
19234
19235  file and add the line 
19236 \begin_inset Flex Code
19237 status collapsed
19238
19239 \begin_layout Plain Layout
19240 cvs -r
19241 \end_layout
19242
19243 \end_inset
19244
19245  to work with reserved checkouts.
19246  The benefit is the possibility to see who is using a writable copy of some
19247  document.
19248  It's not guaranteed only one user makes a copy writable.
19249 \end_layout
19250
19251 \begin_layout Standard
19252 LyX tries to guess if you're using reserved or non-reserved checkouts.
19253  If your working copy is readonly or it is writable and an additional copy
19254  of your document exists in the CVS/Base sub-directory a reserved otherwise
19255  a non-reserved checkout is assumed.
19256  When a reserved checkout is detected you have to use 
19257 \begin_inset Flex MenuItem
19258 status collapsed
19259
19260 \begin_layout Plain Layout
19261 Check Out
19262 \end_layout
19263
19264 \end_inset
19265
19266  to make your working copy writable if it's readonly.
19267  After doing so the 
19268 \begin_inset Flex MenuItem
19269 status collapsed
19270
19271 \begin_layout Plain Layout
19272 Check In
19273 \end_layout
19274
19275 \end_inset
19276
19277  operation is possible and that makes your working copy readonly again after
19278  transferring your changes to the repository.
19279 \end_layout
19280
19281 \begin_layout Standard
19282 More information about CVS can be found here 
19283 \begin_inset Flex URL
19284 status collapsed
19285
19286 \begin_layout Plain Layout
19287
19288 http://www.nongnu.org/cvs
19289 \end_layout
19290
19291 \end_inset
19292
19293  and here 
19294 \begin_inset Flex URL
19295 status collapsed
19296
19297 \begin_layout Plain Layout
19298
19299 http://ximbiot.com/cvs
19300 \end_layout
19301
19302 \end_inset
19303
19304 .
19305 \end_layout
19306
19307 \begin_layout Standard
19308 Read 
19309 \family typewriter
19310 man cvs
19311 \family default
19312  to understand the sub-commands and the switches mentioned below.
19313 \end_layout
19314
19315 \begin_layout Subsubsection
19316
19317 \family sans
19318 Register
19319 \end_layout
19320
19321 \begin_layout Standard
19322 If your document is not under revision control, this is the only item shown
19323  in the menu.
19324  And if it is under revision control, the 
19325 \family sans
19326 \bar under
19327 R
19328 \bar default
19329 egister
19330 \family default
19331  item is not visible.
19332  
19333 \end_layout
19334
19335 \begin_layout Standard
19336 This command registers in CVS your document 
19337 \begin_inset Flex Strong
19338 status collapsed
19339
19340 \begin_layout Plain Layout
19341
19342 \emph on
19343 only
19344 \end_layout
19345
19346 \end_inset
19347
19348  in case you have already the documents directory under CVS control (in
19349  particular 
19350 \family typewriter
19351 CVS/Entries
19352 \family default
19353  file exists).
19354  This means you have to create or checkout the archive by yourself using
19355  external tools.
19356  (In case you forget that step LyX registers the document with RCS.)
19357 \end_layout
19358
19359 \begin_layout Standard
19360 Then you are asked interactively to supply an initial description of the
19361  document.
19362  Don't forget that registered file is not yet checked in.
19363 \end_layout
19364
19365 \begin_layout Standard
19366 CVS command that is run: 
19367 \family typewriter
19368 cvs -q add -m"<entered message>" "<file-name>"
19369 \end_layout
19370
19371 \begin_layout Standard
19372 The term 
19373 \family typewriter
19374 "<file-name>"
19375 \family default
19376  above and for all other CVS commands is an abbreviation for 
19377 \begin_inset Quotes eld
19378 \end_inset
19379
19380 change the current working directory to file location and use the file name
19381  without path component as argument
19382 \begin_inset Quotes erd
19383 \end_inset
19384
19385 .
19386 \end_layout
19387
19388 \begin_layout Subsubsection
19389
19390 \family sans
19391 Check In Changes
19392 \end_layout
19393
19394 \begin_layout Standard
19395 When you are finished editing a file, you commit your changes.
19396  When you do this and you had changed the document, you are asked for a
19397  description of the changes.
19398  After that changes are written to the repository.
19399  In case you didn't change the document and a reserved checkout is detected
19400  the reservation made on 
19401 \begin_inset Flex MenuItem
19402 status collapsed
19403
19404 \begin_layout Plain Layout
19405 Check Out
19406 \end_layout
19407
19408 \end_inset
19409
19410  is undone.
19411 \end_layout
19412
19413 \begin_layout Labeling
19414 \labelwidthstring 00.00.0000
19415 CVS
19416 \begin_inset space ~
19417 \end_inset
19418
19419 command: 
19420 \begin_inset space ~
19421 \end_inset
19422
19423
19424 \begin_inset Newline newline
19425 \end_inset
19426
19427
19428 \begin_inset Flex Code
19429 status collapsed
19430
19431 \begin_layout Plain Layout
19432 cvs 
19433 \family typewriter
19434 -q commit -m"<description>" "<file-name>"
19435 \end_layout
19436
19437 \end_inset
19438
19439  or
19440 \begin_inset Newline newline
19441 \end_inset
19442
19443
19444 \begin_inset Flex Code
19445 status collapsed
19446
19447 \begin_layout Plain Layout
19448 cvs -q unedit 
19449 \family typewriter
19450 "<file-name>"
19451 \end_layout
19452
19453 \end_inset
19454
19455
19456 \end_layout
19457
19458 \begin_layout Subsubsection
19459
19460 \family sans
19461 Check Out Changes
19462 \end_layout
19463
19464 \begin_layout Standard
19465 When you are sharing a repository with others, you may have to incorporate
19466  their changes into your working copy.
19467 \end_layout
19468
19469 \begin_layout Standard
19470 CVS command: 
19471 \family typewriter
19472 cvs -q update "<file-name>"
19473 \end_layout
19474
19475 \begin_layout Standard
19476 If a readonly checkout is detected the working copy is made writable and
19477  reserved.
19478 \end_layout
19479
19480 \begin_layout Standard
19481 CVS command: 
19482 \family typewriter
19483 cvs -q edit "<file-name>"
19484 \end_layout
19485
19486 \begin_layout Subsubsection
19487
19488 \family sans
19489 Revert To Repository Version
19490 \end_layout
19491
19492 \begin_layout Standard
19493 This will discard all changes made to the document since the last check
19494  in.
19495  You get a warning before changes are discarded.
19496  Firstly the file is deleted, secondly CVS update command is run.
19497 \end_layout
19498
19499 \begin_layout Standard
19500 CVS command: 
19501 \family typewriter
19502 cvs -q update "<file-name>"
19503 \end_layout
19504
19505 \begin_layout Standard
19506 If a reserved checkout is detected and the working copy has no changes only
19507  the reservation is undone.
19508 \end_layout
19509
19510 \begin_layout Standard
19511 CVS command: 
19512 \family typewriter
19513 cvs -q unedit "<file-name>"
19514 \end_layout
19515
19516 \begin_layout Subsubsection
19517 Update of the local directory checkout from repository
19518 \end_layout
19519
19520 \begin_layout Standard
19521 Once your documents gets more complex, containing sub-documents and pictures,
19522  including external 
19523 \begin_inset Flex Code
19524 status collapsed
19525
19526 \begin_layout Plain Layout
19527 .tex
19528 \end_layout
19529
19530 \end_inset
19531
19532  files and so on using version control becomes more complicated.
19533  LyX supports updating the whole tree in which resides the document.
19534  This become especially useful once you cooperate with people which neither
19535  have detailed knowledge about CVS usage nor they have ambition to commit
19536  additional material to the repository.
19537  You have to organize the files structure so that all external files are
19538  in the same directory or subdirectories of the document.
19539  It's good practice anyway to store multipart documents in an extra directory.
19540 \end_layout
19541
19542 \begin_layout Standard
19543 The 
19544 \begin_inset Flex Code
19545 status collapsed
19546
19547 \begin_layout Plain Layout
19548 Update local directory from repository
19549 \end_layout
19550
19551 \end_inset
19552
19553  command updates the whole directory.
19554  If local changes are detected user is warned before update starts.
19555  In case of merge conflicts both versions of the conflicting document parts
19556  are placed in the final document.
19557  You have to review and correct the result of the merge.
19558  You'll find the conflicts enclosed in pairs of 
19559 \begin_inset Flex Code
19560 status collapsed
19561
19562 \begin_layout Plain Layout
19563 <<<<<<<
19564 \end_layout
19565
19566 \end_inset
19567
19568  and 
19569 \begin_inset Flex Code
19570 status collapsed
19571
19572 \begin_layout Plain Layout
19573 >>>>>>>
19574 \end_layout
19575
19576 \end_inset
19577
19578  separated by 
19579 \begin_inset Flex Code
19580 status collapsed
19581
19582 \begin_layout Plain Layout
19583 =======
19584 \end_layout
19585
19586 \end_inset
19587
19588 .
19589  The first part is your version as before the update operation with the
19590  document name prepended.
19591  The second one is the repository version with the version number after
19592  the sequence of 
19593 \begin_inset Flex Code
19594 status collapsed
19595
19596 \begin_layout Plain Layout
19597 >
19598 \end_layout
19599
19600 \end_inset
19601
19602  signs.
19603 \end_layout
19604
19605 \begin_layout Labeling
19606 \labelwidthstring 00.00.0000
19607 CVS
19608 \begin_inset space ~
19609 \end_inset
19610
19611 commands: 
19612 \begin_inset space ~
19613 \end_inset
19614
19615
19616 \begin_inset Newline newline
19617 \end_inset
19618
19619
19620 \begin_inset Flex Code
19621 status collapsed
19622
19623 \begin_layout Plain Layout
19624 cd $path; cvs diff 
19625 \family typewriter
19626 "."
19627 \end_layout
19628
19629 \end_inset
19630
19631  (Ask if changes are detected.)
19632 \begin_inset Newline newline
19633 \end_inset
19634
19635
19636 \begin_inset Flex Code
19637 status collapsed
19638
19639 \begin_layout Plain Layout
19640 cd $path; cvs -q update 
19641 \family typewriter
19642 "."
19643 \end_layout
19644
19645 \end_inset
19646
19647
19648 \end_layout
19649
19650 \begin_layout Standard
19651 where 
19652 \begin_inset Flex Code
19653 status collapsed
19654
19655 \begin_layout Plain Layout
19656 $path
19657 \end_layout
19658
19659 \end_inset
19660
19661  stands for the path to the document.
19662 \end_layout
19663
19664 \begin_layout Subsubsection
19665
19666 \family sans
19667 Show History
19668 \end_layout
19669
19670 \begin_layout Standard
19671 This shows the complete history of the CVS document.
19672  The output of 
19673 \family typewriter
19674 cvs log "<file-name>"
19675 \family default
19676  is shown in a browser.
19677 \end_layout
19678
19679 \begin_layout Subsection
19680 SVN commands in LyX
19681 \end_layout
19682
19683 \begin_layout Standard
19684 SVN is now partially supported by LyX.
19685  You can find the commands in the 
19686 \family sans
19687 File\SpecialChar \menuseparator
19688 Version
19689 \begin_inset space ~
19690 \end_inset
19691
19692 Control
19693 \family default
19694  submenu.
19695  Please note that if you use password protected access to repository via
19696  ssh, you will be asked in terminal window.
19697  LyX was tested against SVN 1.5 and 1.6
19698 \begin_inset Foot
19699 status open
19700
19701 \begin_layout Plain Layout
19702 Most of the commands will work with 1.4 too, see 
19703 \begin_inset CommandInset ref
19704 LatexCommand ref
19705 reference "sub:SVN-Repo-Update"
19706
19707 \end_inset
19708
19709 .
19710 \end_layout
19711
19712 \end_inset
19713
19714
19715 \end_layout
19716
19717 \begin_layout Subsubsection
19718
19719 \family sans
19720 Register
19721 \end_layout
19722
19723 \begin_layout Standard
19724 If your document is not under revision control, this is the only item shown
19725  in the menu.
19726  And if it is under revision control, the 
19727 \family sans
19728 \bar under
19729 R
19730 \bar default
19731 egister
19732 \family default
19733  item is not visible.
19734  
19735 \end_layout
19736
19737 \begin_layout Standard
19738 This command registers in SVN your document ONLY in case you have already
19739  the documents directory under SVN control (in particular 
19740 \family typewriter
19741 .svn/entries
19742 \family default
19743  file exists).
19744  This means you have to checkout the archive by yourself.
19745  
19746 \end_layout
19747
19748 \begin_layout Standard
19749 Then you are asked interactively to supply an initial description of the
19750  document.
19751  Don't forget that registered file is not yet commited.
19752 \end_layout
19753
19754 \begin_layout Standard
19755 SVN command that is run: 
19756 \family typewriter
19757 svn add -q 
19758 \begin_inset Quotes eld
19759 \end_inset
19760
19761 <file-name>
19762 \begin_inset Quotes erd
19763 \end_inset
19764
19765
19766 \end_layout
19767
19768 \begin_layout Standard
19769 Read 
19770 \family typewriter
19771 man svn
19772 \family default
19773  to understand the switches.
19774  
19775 \end_layout
19776
19777 \begin_layout Subsubsection
19778
19779 \family sans
19780 Check In Changes
19781 \end_layout
19782
19783 \begin_layout Standard
19784 When you are finished editing a file, you commit your changes.
19785  When you do this, you are asked for a description of the changes.
19786  After that changes are commited.
19787 \end_layout
19788
19789 \begin_layout Standard
19790 SVN command:
19791 \begin_inset Foot
19792 status collapsed
19793
19794 \begin_layout Plain Layout
19795 In case locking is not enabled.
19796  See Section 
19797 \begin_inset CommandInset ref
19798 LatexCommand ref
19799 reference "subsec:SVN-File-Locking"
19800
19801 \end_inset
19802
19803 .
19804 \end_layout
19805
19806 \end_inset
19807
19808  
19809 \family typewriter
19810 svn commit -q -m"<description>" <file-name>
19811 \end_layout
19812
19813 \begin_layout Subsubsection
19814
19815 \family sans
19816 Check Out For Edit
19817 \end_layout
19818
19819 \begin_layout Standard
19820 Updates the changes of this file from the repository.
19821  Be sure you understand SVN merging and conflicts resolving before using
19822  this function, because all conflicts has to be resolved manually by you!
19823 \end_layout
19824
19825 \begin_layout Standard
19826 SVN command:
19827 \begin_inset Foot
19828 status collapsed
19829
19830 \begin_layout Plain Layout
19831 Ditto.
19832 \end_layout
19833
19834 \end_inset
19835
19836  
19837 \family typewriter
19838 svn update --non-interactive 
19839 \begin_inset Quotes eld
19840 \end_inset
19841
19842 <file-name>
19843 \begin_inset Quotes erd
19844 \end_inset
19845
19846
19847 \end_layout
19848
19849 \begin_layout Subsubsection
19850
19851 \family sans
19852 Revert To Repository Version
19853 \end_layout
19854
19855 \begin_layout Standard
19856 This will discard all changes made to the document since the last check
19857  in.
19858  You get a warning before changes are discarded.
19859  
19860 \end_layout
19861
19862 \begin_layout Standard
19863 SVN command: 
19864 \family typewriter
19865 svn revert -q 
19866 \begin_inset Quotes eld
19867 \end_inset
19868
19869 <file-name>
19870 \begin_inset Quotes erd
19871 \end_inset
19872
19873
19874 \end_layout
19875
19876 \begin_layout Subsubsection
19877 \begin_inset CommandInset label
19878 LatexCommand label
19879 name "sub:SVN-Repo-Update"
19880
19881 \end_inset
19882
19883 Update of the local directory checkout from repository
19884 \begin_inset Foot
19885 status collapsed
19886
19887 \begin_layout Plain Layout
19888 Note that this command will work only with subversion 
19889 \begin_inset Formula $\geqq1.5$
19890 \end_inset
19891
19892
19893 \end_layout
19894
19895 \end_inset
19896
19897
19898 \end_layout
19899
19900 \begin_layout Standard
19901 All the commands above have one shortcomming - they deal with the current
19902  document only.
19903  Once your document contains pictures, includes external 
19904 \begin_inset Flex Code
19905 status collapsed
19906
19907 \begin_layout Plain Layout
19908 .tex
19909 \end_layout
19910
19911 \end_inset
19912
19913  files and so on administration becomes more complicated.
19914  LyX now supports updating the whole tree in which resides the document
19915 \begin_inset Foot
19916 status collapsed
19917
19918 \begin_layout Plain Layout
19919 One need to organize the files structure so that all external files are
19920  in the same directory or subdirectories of the document.
19921  
19922 \end_layout
19923
19924 \end_inset
19925
19926 .
19927  This become especially useful once you cooperate with people which neither
19928  know about subversion management nor they have ambition to commit additional
19929  material to the repository.
19930  
19931 \end_layout
19932
19933 \begin_layout Standard
19934 \begin_inset Flex Code
19935 status collapsed
19936
19937 \begin_layout Plain Layout
19938 Update local directory from repository
19939 \end_layout
19940
19941 \end_inset
19942
19943  command updates the whole directory and in case of merge conflicts local
19944  version of the files are left, so no unintended data loss occurs.
19945  If local changes are detected user is warned before update starts.
19946 \end_layout
19947
19948 \begin_layout Labeling
19949 \labelwidthstring 00.00.0000
19950 SVN
19951 \begin_inset space ~
19952 \end_inset
19953
19954 commands: 
19955 \begin_inset space ~
19956 \end_inset
19957
19958
19959 \begin_inset Newline newline
19960 \end_inset
19961
19962
19963 \begin_inset Flex Code
19964 status collapsed
19965
19966 \begin_layout Plain Layout
19967 svn diff $path
19968 \end_layout
19969
19970 \end_inset
19971
19972  (Ask if changes are detected.)
19973 \begin_inset Newline newline
19974 \end_inset
19975
19976
19977 \begin_inset Flex Code
19978 status collapsed
19979
19980 \begin_layout Plain Layout
19981 svn update --accept mine-full $path
19982 \end_layout
19983
19984 \end_inset
19985
19986
19987 \end_layout
19988
19989 \begin_layout Standard
19990 where 
19991 \begin_inset Flex Code
19992 status collapsed
19993
19994 \begin_layout Plain Layout
19995 $path
19996 \end_layout
19997
19998 \end_inset
19999
20000  stands for the path to the document.
20001 \end_layout
20002
20003 \begin_layout Subsubsection
20004
20005 \family sans
20006 Show History
20007 \end_layout
20008
20009 \begin_layout Standard
20010 This shows the complete history of the SVN document.
20011  The output of 
20012 \family typewriter
20013 svn log 
20014 \begin_inset Quotes eld
20015 \end_inset
20016
20017 <file-name>
20018 \begin_inset Quotes erd
20019 \end_inset
20020
20021
20022 \family default
20023  is shown in a browser.
20024 \end_layout
20025
20026 \begin_layout Subsubsection
20027 File Locking
20028 \begin_inset CommandInset label
20029 LatexCommand label
20030 name "subsec:SVN-File-Locking"
20031
20032 \end_inset
20033
20034
20035 \end_layout
20036
20037 \begin_layout Standard
20038 The file exchange through various revision control systems brings the problem
20039  of merge conflicts in case two different users try to edit the same (parts
20040  of) document.
20041  When such a conflict happens it needs manual resolving and one reasonable
20042  alternative is to provide some kind of locking mechanism, which guarantees
20043  that only one user is allowed to edit file at the given time.
20044 \end_layout
20045
20046 \begin_layout Standard
20047 SVN has two such mechanisms to provide mutual exclusivity for file access
20048  - locks and automatic setting of write permissions (see sec.
20049  
20050 \begin_inset CommandInset ref
20051 LatexCommand ref
20052 reference "subsec:Automatical-Locking-Property"
20053
20054 \end_inset
20055
20056 ) based on 
20057 \begin_inset Flex Code
20058 status collapsed
20059
20060 \begin_layout Plain Layout
20061 svn:needs-lock
20062 \end_layout
20063
20064 \end_inset
20065
20066  file svn property
20067 \begin_inset Foot
20068 status open
20069
20070 \begin_layout Plain Layout
20071 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20072 \end_layout
20073
20074 \end_inset
20075
20076 .
20077  If this property is detected for a given document LyX starts to use SVN
20078  locks for document editing automatically and the whole check-in/out mechanism
20079  switches to the same regimen as for RCS.
20080  This in particular means there are two different modes of file use in LyX:
20081 \end_layout
20082
20083 \begin_layout Itemize
20084 Unlocked state.
20085  The loaded file is in the read-only mode.
20086  For editing on needs to check-out.
20087  
20088 \emph on
20089 Check-out
20090 \emph default
20091  consists of updating from the repository and gaining write lock.
20092  If the lock is not possible to obtain, we remain in unlocked state.
20093 \end_layout
20094
20095 \begin_layout Itemize
20096 Locked state.
20097  The loaded file is in the 'normal' edit mode.
20098  No other user is allowed to edit the file.
20099  
20100 \emph on
20101 Check-in
20102 \emph default
20103  consists of commiting changes and releasing write-lock.
20104  If no changes have been made to the document, no commit will be produced
20105 \begin_inset Foot
20106 status collapsed
20107
20108 \begin_layout Plain Layout
20109 Don't be puzzled by the fact that you will be asked for commit message anyway.
20110 \end_layout
20111
20112 \end_inset
20113
20114  and only the write-lock will be released.
20115 \end_layout
20116
20117 \begin_layout Standard
20118 SVN commands:
20119 \end_layout
20120
20121 \begin_layout Labeling
20122 \labelwidthstring 00.00.0000
20123 Check-in:
20124 \family typewriter
20125  svn commit -q -m"<description>" "<file-name>"
20126 \begin_inset Newline newline
20127 \end_inset
20128
20129 svn unlock "<file-name>"
20130 \end_layout
20131
20132 \begin_layout Labeling
20133 \labelwidthstring 00.00.0000
20134 Check-out: 
20135 \family typewriter
20136 svn update "<file-name>"
20137 \begin_inset Newline newline
20138 \end_inset
20139
20140 svn lock "<file-name>"
20141 \end_layout
20142
20143 \begin_layout Subsubsection
20144
20145 \family typewriter
20146 \begin_inset CommandInset label
20147 LatexCommand label
20148 name "subsec:Automatical-Locking-Property"
20149
20150 \end_inset
20151
20152
20153 \family default
20154 Automatic Locking Property
20155 \end_layout
20156
20157 \begin_layout Standard
20158 The above mentioned automatic setting of write permissions of the .lyx file
20159  can be set through
20160 \family sans
20161 \bar under
20162  F
20163 \bar default
20164 ile\SpecialChar \menuseparator
20165
20166 \bar under
20167 V
20168 \bar default
20169 ersion
20170 \begin_inset space ~
20171 \end_inset
20172
20173 Control\SpecialChar \menuseparator
20174
20175 \bar under
20176 T
20177 \bar default
20178 oggle locking property
20179 \family default
20180 .
20181  This command is active only when the file is not locked on the svn server
20182  (i.e.
20183  you need to check-out before proceeding).
20184 \end_layout
20185
20186 \begin_layout Labeling
20187 \labelwidthstring 00.00.0000
20188 SVN
20189 \begin_inset space ~
20190 \end_inset
20191
20192 commands:
20193 \end_layout
20194
20195 \begin_layout Labeling
20196 \labelwidthstring 00.00.0000
20197 Set:
20198 \family typewriter
20199  svn propset svn:needs-lock ON "<file-name>"
20200 \end_layout
20201
20202 \begin_layout Labeling
20203 \labelwidthstring 00.00.0000
20204 Unset: 
20205 \family typewriter
20206 svn propdel svn:needs-lock "<file-name>"
20207 \end_layout
20208
20209 \begin_layout Subsubsection
20210 \begin_inset CommandInset label
20211 LatexCommand label
20212 name "sub:VCS-Revision-Information"
20213
20214 \end_inset
20215
20216 Revision Information in Documents
20217 \end_layout
20218
20219 \begin_layout Standard
20220 There are more possibilities how to activate revision information in our
20221  document.
20222 \end_layout
20223
20224 \begin_layout Itemize
20225 LyX supports directly:
20226 \end_layout
20227
20228 \begin_deeper
20229 \begin_layout Itemize
20230 tree revision information (
20231 \begin_inset Flex Code
20232 status collapsed
20233
20234 \begin_layout Plain Layout
20235 vcs-tree-revision
20236 \end_layout
20237
20238 \end_inset
20239
20240 ).
20241  The result is the output of the 
20242 \begin_inset Flex Code
20243 status collapsed
20244
20245 \begin_layout Plain Layout
20246 svnversion
20247 \end_layout
20248
20249 \end_inset
20250
20251  command, the following table gives you an idea, how to read the results.
20252 \end_layout
20253
20254 \begin_layout Standard
20255 \align center
20256 \begin_inset Tabular
20257 <lyxtabular version="3" rows="6" columns="2">
20258 <features tabularvalignment="middle">
20259 <column alignment="center" valignment="top" width="0">
20260 <column alignment="center" valignment="top" width="0">
20261 <row>
20262 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20263 \begin_inset Text
20264
20265 \begin_layout Plain Layout
20266 Output
20267 \end_layout
20268
20269 \end_inset
20270 </cell>
20271 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20272 \begin_inset Text
20273
20274 \begin_layout Plain Layout
20275 Meaning
20276 \end_layout
20277
20278 \end_inset
20279 </cell>
20280 </row>
20281 <row>
20282 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20283 \begin_inset Text
20284
20285 \begin_layout Plain Layout
20286 4123:4168
20287 \end_layout
20288
20289 \end_inset
20290 </cell>
20291 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20292 \begin_inset Text
20293
20294 \begin_layout Plain Layout
20295 mixed revision working copy
20296 \end_layout
20297
20298 \end_inset
20299 </cell>
20300 </row>
20301 <row>
20302 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20303 \begin_inset Text
20304
20305 \begin_layout Plain Layout
20306 4168M
20307 \end_layout
20308
20309 \end_inset
20310 </cell>
20311 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20312 \begin_inset Text
20313
20314 \begin_layout Plain Layout
20315 modified working copy
20316 \end_layout
20317
20318 \end_inset
20319 </cell>
20320 </row>
20321 <row>
20322 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20323 \begin_inset Text
20324
20325 \begin_layout Plain Layout
20326 4123S
20327 \end_layout
20328
20329 \end_inset
20330 </cell>
20331 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20332 \begin_inset Text
20333
20334 \begin_layout Plain Layout
20335 switched working copy
20336 \end_layout
20337
20338 \end_inset
20339 </cell>
20340 </row>
20341 <row>
20342 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20343 \begin_inset Text
20344
20345 \begin_layout Plain Layout
20346 4123P
20347 \end_layout
20348
20349 \end_inset
20350 </cell>
20351 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20352 \begin_inset Text
20353
20354 \begin_layout Plain Layout
20355 partial working copy, from a sparse checkout
20356 \end_layout
20357
20358 \end_inset
20359 </cell>
20360 </row>
20361 <row>
20362 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20363 \begin_inset Text
20364
20365 \begin_layout Plain Layout
20366 4123:4168MS
20367 \end_layout
20368
20369 \end_inset
20370 </cell>
20371 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20372 \begin_inset Text
20373
20374 \begin_layout Plain Layout
20375 mixed revision, modified, switched working copy
20376 \end_layout
20377
20378 \end_inset
20379 </cell>
20380 </row>
20381 </lyxtabular>
20382
20383 \end_inset
20384
20385
20386 \end_layout
20387
20388 \begin_layout Itemize
20389 file revision information.
20390  The result comes from parsing the output of 
20391 \begin_inset Flex Code
20392 status collapsed
20393
20394 \begin_layout Plain Layout
20395 svn
20396 \begin_inset space ~
20397 \end_inset
20398
20399 info
20400 \begin_inset space ~
20401 \end_inset
20402
20403 --xml
20404 \begin_inset space ~
20405 \end_inset
20406
20407 file.lyx
20408 \end_layout
20409
20410 \end_inset
20411
20412 .
20413  Supported flags are:
20414 \end_layout
20415
20416 \begin_deeper
20417 \begin_layout Itemize
20418 version number of the last commit (
20419 \begin_inset Flex Code
20420 status collapsed
20421
20422 \begin_layout Plain Layout
20423 vcs-revision
20424 \end_layout
20425
20426 \end_inset
20427
20428 )
20429 \end_layout
20430
20431 \begin_layout Itemize
20432 author of the last commit (
20433 \begin_inset Flex Code
20434 status collapsed
20435
20436 \begin_layout Plain Layout
20437 vcs-author
20438 \end_layout
20439
20440 \end_inset
20441
20442 )
20443 \end_layout
20444
20445 \begin_layout Itemize
20446 date of the last commit (
20447 \begin_inset Flex Code
20448 status collapsed
20449
20450 \begin_layout Plain Layout
20451 vcs-date
20452 \end_layout
20453
20454 \end_inset
20455
20456 )
20457 \end_layout
20458
20459 \begin_layout Itemize
20460 time of the last commit (
20461 \begin_inset Flex Code
20462 status collapsed
20463
20464 \begin_layout Plain Layout
20465 vcs-time
20466 \end_layout
20467
20468 \end_inset
20469
20470 )
20471 \end_layout
20472
20473 \end_deeper
20474 \begin_layout Standard
20475 You can obtain this info via InsetInfo (e.g.
20476  
20477 \begin_inset Flex Code
20478 status collapsed
20479
20480 \begin_layout Plain Layout
20481 info-insert buffer vcs-date
20482 \end_layout
20483
20484 \end_inset
20485
20486 ).
20487  The information will be available only when you have the file stored under
20488  svn managment (i.e.
20489  the 
20490 \begin_inset Flex Code
20491 status collapsed
20492
20493 \begin_layout Plain Layout
20494 .svn
20495 \end_layout
20496
20497 \end_inset
20498
20499  directory is available with your document).
20500 \end_layout
20501
20502 \end_deeper
20503 \begin_layout Itemize
20504 Another---a hacking one---possibility is to use svn keywords
20505 \begin_inset Foot
20506 status collapsed
20507
20508 \begin_layout Plain Layout
20509 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20510 \end_layout
20511
20512 \end_inset
20513
20514 .
20515  In short -- you set file keywords property (e.g.
20516  
20517 \family sans
20518 svn propset svn:keywords 'Rev' file.lyx
20519 \family default
20520 ) and then paste keyword TeX code
20521 \begin_inset Foot
20522 status collapsed
20523
20524 \begin_layout Plain Layout
20525 This is an easy way how to ensure that LyX won't break the line in the middle
20526  of keyword tag.
20527 \end_layout
20528
20529 \end_inset
20530
20531  tag in your document (e.g.
20532  
20533 \begin_inset ERT
20534 status open
20535
20536 \begin_layout Plain Layout
20537
20538 $Rev$
20539 \end_layout
20540
20541 \end_inset
20542
20543 ).
20544  This way svn client will automatically substitute revision number (e.g.
20545  
20546 \begin_inset ERT
20547 status open
20548
20549 \begin_layout Plain Layout
20550
20551 $Rev: 59 $
20552 \end_layout
20553
20554 \end_inset
20555
20556 ) after each update and commit.
20557  There are more problems with this approach.
20558  Firstly, the '$' character is used in TeX world for math equations, so
20559  any occurence of math formula 
20560 \begin_inset Formula $Rev$
20561 \end_inset
20562
20563  become 
20564 \begin_inset Formula $Rev:59$
20565 \end_inset
20566
20567  in your LyX document.
20568  Similarly for other keywords like Id, Date, Author, etc.
20569  Secondly svn output is dependent on your locales, so its very easy that
20570  svn would produce some problematic strings once Date is used.
20571  Thirdly you get the whole 'Rev: 59' string in your document instead of
20572  the plain number.
20573  Until subversion implements user's custom keywords it will be hard to use
20574  this approach reliably or let LyX to support it directly.
20575 \end_layout
20576
20577 \begin_layout Subsection
20578 SVN and Windows Environment
20579 \end_layout
20580
20581 \begin_layout Quote
20582 My inclination is to say that if the user cannot figure out the command
20583  line operations on their own fairly quickly, they would be well advised
20584  to use TortoiseSVN.
20585  ---P.
20586  A.
20587  Rubin
20588 \end_layout
20589
20590 \begin_layout Subsubsection
20591 Preparation
20592 \end_layout
20593
20594 \begin_layout Standard
20595 In addition to installing LyX, and having access to a Subversion repository,
20596  the user will need to install the Subversion client program.
20597  A Windows installer for the client program is available from 
20598 \begin_inset CommandInset href
20599 LatexCommand href
20600 name "CollabNet"
20601 target "http://www.collab.net/nonav/downloads/subversion/"
20602
20603 \end_inset
20604
20605 .
20606  The user may also want to install 
20607 \begin_inset CommandInset href
20608 LatexCommand href
20609 name "TortoiseSVN"
20610 target "http://tortoisesvn.tigris.org/"
20611
20612 \end_inset
20613
20614 , which integrates Subversion operations into the context (rightclick) menu
20615  of Windows Explorer.
20616  Operations done outside LyX will typically be more convenient using the
20617  Explorer context menu.
20618  Note that TortoiseSVN is not a replacement for the client program, which
20619  is what LyX itself will use.
20620 \end_layout
20621
20622 \begin_layout Subsubsection
20623 Bringing a document under Subversion control
20624 \end_layout
20625
20626 \begin_layout Standard
20627 Before a LyX document can be brought under version control in Subversion,
20628  its parent directory needs to be under version control.
20629  If the document is being added to a project already in the repository,
20630  this is accomplished by checking the project out to the directory where
20631  the new document will be placed.
20632  If the project itself is not yet under version control (for instance, if
20633  this document starts a new project), the directory must be imported into
20634  the repository.
20635  This is done outside LyX.
20636  Both import and checkout are easily accomplished from the Explorer context
20637  menu using TortoiseSVN, or alternatively can be done using the command
20638  line client at a DOS prompt.
20639  The procedure for importing the project using TortoiseSVN is described
20640  below, assuming an existing repository and a new project being started
20641  in 
20642 \family typewriter
20643 C:
20644 \backslash
20645 new project
20646 \family default
20647 .
20648  For information on using the Subversion client program, run 
20649 \family typewriter
20650 svn --help 
20651 \family default
20652 in a DOS shell.
20653 \end_layout
20654
20655 \begin_layout Enumerate
20656 Locate 
20657 \family typewriter
20658 C:
20659 \backslash
20660 new project 
20661 \family default
20662 in Windows Explorer, right click it, and select 
20663 \family typewriter
20664 TortoiseSVN > Repo-browser
20665 \family default
20666 .
20667  If necessary, adjust the URL for the repository, then click OK.
20668 \end_layout
20669
20670 \begin_layout Enumerate
20671 Right click the level of the repository under which you want to place the
20672  new project folder (typically the top level) and click 
20673 \family typewriter
20674 Create folder\SpecialChar \ldots{}
20675
20676 \family default
20677  Supply a name for the project folder and click OK.
20678  Add a message for the log file if desired, then click OK again.
20679  The new project folder should appear in the repository.
20680  Finally, click OK again to exit the repository browser.
20681 \end_layout
20682
20683 \begin_layout Enumerate
20684 Once again right click 
20685 \family typewriter
20686 C:
20687 \backslash
20688 new project
20689 \family default
20690 , this time selecting SVN Checkout\SpecialChar \ldots{}
20691  Select the URL of the project folder
20692  you just created in the repository, and set the checkout directory to 
20693 \family typewriter
20694 C:
20695 \backslash
20696 new project.
20697
20698 \family default
20699  Click OK.
20700  You will be warned about a non-empty folder; click OK to proceed.
20701  You should now have a 
20702 \family typewriter
20703 .svn
20704 \family default
20705  directory under 
20706 \family typewriter
20707 C:
20708 \backslash
20709 new project.
20710 \end_layout
20711
20712 \begin_layout Enumerate
20713 Create or open your document in LyX and click 
20714 \family sans
20715 \bar under
20716 F
20717 \bar default
20718 ile\SpecialChar \menuseparator
20719
20720 \bar under
20721 V
20722 \bar default
20723 ersion
20724 \begin_inset space ~
20725 \end_inset
20726
20727 Control\SpecialChar \menuseparator
20728
20729 \bar under
20730 R
20731 \bar default
20732 egister.
20733  
20734 \family default
20735 Add a log message and click OK to commit the document to version control.
20736 \end_layout
20737
20738 \begin_layout Standard
20739 From this point onward, you should have full functionality in the 
20740 \family sans
20741 \bar under
20742 F
20743 \bar default
20744 ile\SpecialChar \menuseparator
20745
20746 \bar under
20747 V
20748 \bar default
20749 ersion
20750 \begin_inset space ~
20751 \end_inset
20752
20753 Control
20754 \family default
20755  menu.
20756  You also have the option of checking the document in and out, viewing its
20757  history, etc.
20758  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20759  client program from a command prompt.
20760 \end_layout
20761
20762 \begin_layout Subsubsection
20763 SSH tunnel used with SVN under Windows
20764 \end_layout
20765
20766 \begin_layout Standard
20767 Compared with Linux setting up svn client to communicate over ssh under
20768  Windows is a rather troublesome task.
20769  We will at least offer some hints how to setup the client side but prior
20770  knowledge about ssh and the Windows command line is needed, also be prepared
20771  for a great deal of frustration\SpecialChar \ldots{}
20772
20773 \end_layout
20774
20775 \begin_layout Enumerate
20776 Get a svn client for windows, as described in the previous sections.
20777  When it is a fresh install run some svn command (e.g.
20778  
20779 \begin_inset Flex Code
20780 status collapsed
20781
20782 \begin_layout Plain Layout
20783 svn --version
20784 \end_layout
20785
20786 \end_inset
20787
20788 ) to create config files, which you will need to change later on.
20789 \end_layout
20790
20791 \begin_layout Enumerate
20792 Choose a ssh client for Windows.
20793  There are several possibilities, we will use the one from Putty tools
20794 \begin_inset Foot
20795 status open
20796
20797 \begin_layout Plain Layout
20798 \begin_inset Flex URL
20799 status collapsed
20800
20801 \begin_layout Plain Layout
20802
20803 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20804 \end_layout
20805
20806 \end_inset
20807
20808
20809 \end_layout
20810
20811 \end_inset
20812
20813 .
20814  You will need to set the connection up so that the client doesn't ask for
20815  any password from you.
20816  To keep things easy we will use only keys without any additional password
20817  protection etc.
20818 \end_layout
20819
20820 \begin_deeper
20821 \begin_layout Enumerate
20822 Generate keys by 
20823 \begin_inset Flex Code
20824 status collapsed
20825
20826 \begin_layout Plain Layout
20827 puttygen
20828 \end_layout
20829
20830 \end_inset
20831
20832 .
20833  Save your private .ppk key file and put the public one on the server side.
20834  If the SVN server runs on Linux, note that the format of the public key
20835  is not compatible with Linux openssh and you will need to direcly copy-paste
20836  the key from the “
20837 \emph on
20838 Public key for pasting into OpenSSH authorized_keys file
20839 \emph default
20840 :” edit field into the server's 
20841 \begin_inset Flex Code
20842 status collapsed
20843
20844 \begin_layout Plain Layout
20845 ~/.ssh/authorized_keys
20846 \end_layout
20847
20848 \end_inset
20849
20850
20851 \begin_inset Flex Code
20852 status collapsed
20853
20854 \begin_layout Plain Layout
20855 authorized_keys2
20856 \end_layout
20857
20858 \end_inset
20859
20860  file.
20861 \end_layout
20862
20863 \begin_layout Enumerate
20864 Get the Putty's 
20865 \begin_inset Flex Code
20866 status collapsed
20867
20868 \begin_layout Plain Layout
20869 plink
20870 \end_layout
20871
20872 \end_inset
20873
20874 .
20875  In the SVN config file
20876 \begin_inset Foot
20877 status collapsed
20878
20879 \begin_layout Plain Layout
20880 Exact path depends on Windows version, usually somewhere around 
20881 \begin_inset Flex Code
20882 status collapsed
20883
20884 \begin_layout Plain Layout
20885 c:
20886 \backslash
20887 Documents and Settings
20888 \backslash
20889 user
20890 \backslash
20891 Application Data
20892 \backslash
20893 Subversion
20894 \backslash
20895 config
20896 \end_layout
20897
20898 \end_inset
20899
20900  / 
20901 \begin_inset Flex Code
20902 status collapsed
20903
20904 \begin_layout Plain Layout
20905 AppData
20906 \backslash
20907 Roaming
20908 \backslash
20909 Subversion
20910 \end_layout
20911
20912 \end_inset
20913
20914 .
20915 \end_layout
20916
20917 \end_inset
20918
20919 , section [tunnels], setup ssh command, e.g.
20920  
20921 \begin_inset Flex Code
20922 status collapsed
20923
20924 \begin_layout Plain Layout
20925 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20926 \end_layout
20927
20928 \end_inset
20929
20930 .
20931 \begin_inset Foot
20932 status collapsed
20933
20934 \begin_layout Plain Layout
20935 It will usually take a lot of time to get exact command right and it depends
20936  on many things.
20937  For example do not have some remote server saved as a default session in
20938  Putty etc.
20939  If things fail, try to connect via plink without SVN first.
20940 \end_layout
20941
20942 \end_inset
20943
20944
20945 \end_layout
20946
20947 \end_deeper
20948 \begin_layout Enumerate
20949 Checkout the SVN archive, e.g.
20950  
20951 \begin_inset Flex Code
20952 status collapsed
20953
20954 \begin_layout Plain Layout
20955 svn co svn+ssh://user@server/repository_path
20956 \end_layout
20957
20958 \end_inset
20959
20960 .
20961 \end_layout
20962
20963 \begin_layout Subsubsection
20964 End-of-Line Conversions
20965 \end_layout
20966
20967 \begin_layout Standard
20968 When the collaborators are mixing Linux and Windows environments, LyX will
20969  use different line endings inside the .lyx files.
20970  This is not a problem as far as LyX functionality is concerned, but the
20971  commit diffs will be huge and merge-conflicts prone.
20972  Fortunately SVN itself knows
20973 \begin_inset Foot
20974 status collapsed
20975
20976 \begin_layout Plain Layout
20977 \begin_inset Flex URL
20978 status collapsed
20979
20980 \begin_layout Plain Layout
20981
20982 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20983 \end_layout
20984
20985 \end_inset
20986
20987
20988 \end_layout
20989
20990 \end_inset
20991
20992  how to deal with CR/LF problems when switching .lyx files to the 
20993 \begin_inset Flex Code
20994 status collapsed
20995
20996 \begin_layout Plain Layout
20997 native
20998 \end_layout
20999
21000 \end_inset
21001
21002  mode.
21003 \begin_inset Foot
21004 status collapsed
21005
21006 \begin_layout Plain Layout
21007 For the lazy guys: 
21008 \begin_inset Flex Code
21009 status collapsed
21010
21011 \begin_layout Plain Layout
21012 svn propset svn:eol-style native FILE_NAME
21013 \end_layout
21014
21015 \end_inset
21016
21017
21018 \end_layout
21019
21020 \end_inset
21021
21022
21023 \end_layout
21024
21025 \begin_layout Subsection
21026 Further tuning
21027 \end_layout
21028
21029 \begin_layout Standard
21030 With the recent addition of the vc-command function LyX power users are
21031  allowed to create their own commands for revision control.
21032 \end_layout
21033
21034 \begin_layout Standard
21035 As an example you can see how two TortoiseSVN commands could be integrated
21036  directly:
21037 \end_layout
21038
21039 \begin_layout Description
21040 Commit: 
21041 \begin_inset Flex Code
21042 status collapsed
21043
21044 \begin_layout Plain Layout
21045 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21046 \end_layout
21047
21048 \end_inset
21049
21050
21051 \end_layout
21052
21053 \begin_layout Description
21054 Revert: 
21055 \begin_inset Flex Code
21056 status collapsed
21057
21058 \begin_layout Plain Layout
21059 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21060 \end_layout
21061
21062 \end_inset
21063
21064
21065 \end_layout
21066
21067 \begin_layout Subsection
21068 Version control and Document comparison
21069 \end_layout
21070
21071 \begin_layout Standard
21072 One of the typical uses of version control is to inspect the changes between
21073  revisions, usually by creating 
21074 \begin_inset Flex Code
21075 status collapsed
21076
21077 \begin_layout Plain Layout
21078 diff
21079 \end_layout
21080
21081 \end_inset
21082
21083  dumps.
21084  While this is useful for plain text files, it is much less useful in the
21085  case of LyX files, which have more complicated structure.
21086  Hence we provide binding to the Document comparison feature.
21087  They are two ways of calling this feature - either by direct call of 
21088 \begin_inset Flex Code
21089 status collapsed
21090
21091 \begin_layout Plain Layout
21092 VC_COMPARE
21093 \end_layout
21094
21095 \end_inset
21096
21097  LyX function (for details see LyX functions manual) or by icon/menu item
21098  
21099 \begin_inset Flex MenuItem
21100 status collapsed
21101
21102 \begin_layout Plain Layout
21103 Compare with older revision...
21104 \end_layout
21105
21106 \end_inset
21107
21108 .
21109  One can either compare two chosen revisions of the document or he can simply
21110  compare the current version of edited text with older revisions (where
21111  '
21112 \begin_inset Flex MenuItem
21113 status collapsed
21114
21115 \begin_layout Plain Layout
21116 0
21117 \end_layout
21118
21119 \end_inset
21120
21121 ' revisions back means comparison of the edited file with last commited
21122  revision).
21123  
21124 \end_layout
21125
21126 \begin_layout Standard
21127 This feature is supported for SVN and RCS though due to the more complicated
21128  versioning scheme of RCS there is a constraint -- when addressing the revisions
21129  in dialog, numbers always point to the last number in RCS revision number,
21130  i.e.
21131  '35' in '1.2.35'.
21132 \end_layout
21133
21134 \begin_layout Section
21135 Literate Programming
21136 \end_layout
21137
21138 \begin_layout Standard
21139 Updated by 
21140 \noun on
21141 Kayvan Sylvan 
21142 \noun default
21143 (kayvan@sylvan.com)
21144 \noun on
21145
21146 \noun default
21147 original documentation written by 
21148 \noun on
21149 Edmar Wienskoski Jr.
21150
21151 \noun default
21152  (edmar-w-jr@technologist.com)
21153 \end_layout
21154
21155 \begin_layout Subsection
21156 Introduction
21157 \end_layout
21158
21159 \begin_layout Standard
21160 The main purpose of this documentation is to show you how to use LyX for
21161  literate programming, where it is assumed that you are familiar with this
21162  programming technique, and know what 
21163 \begin_inset Quotes eld
21164 \end_inset
21165
21166 tangling
21167 \begin_inset Quotes erd
21168 \end_inset
21169
21170  and 
21171 \begin_inset Quotes eld
21172 \end_inset
21173
21174 weaving
21175 \begin_inset Quotes erd
21176 \end_inset
21177
21178  means.
21179  If that is not the case, please follow the web links provided in the following
21180  sections.
21181  There is a lot of good documentation out there covering old development
21182  history to the latest tools tips.
21183 \end_layout
21184
21185 \begin_layout Standard
21186 It is also assumed that you are familiar with LyX itself to a point that
21187  you are comfortable changing your LyX preferences, and X resources file.
21188  If that is not the case please refer to other LyX documentation to cover
21189  your specific needs.
21190 \end_layout
21191
21192 \begin_layout Subsection
21193 Literate Programming
21194 \end_layout
21195
21196 \begin_layout Standard
21197 From the Literate Programming FAQ: 
21198 \end_layout
21199
21200 \begin_layout Quotation
21201 Literate programming is the combination of documentation and source together
21202  in a fashion suited for reading by human beings.
21203  In fact, literate programs should be enjoyable reading, even inviting!
21204  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21205  and documentation in a single file.
21206  Literate programming tools then parse the file to produce either readable
21207  documentation or compilable source.
21208  The WEB style of literate programming was created by D.
21209 \begin_inset space \thinspace{}
21210 \end_inset
21211
21212 E.
21213  Knuth during the development of his TeX typesetting software.
21214  
21215 \end_layout
21216
21217 \begin_layout Standard
21218 Another excerpt says:
21219 \end_layout
21220
21221 \begin_layout Quotation
21222
21223 \emph on
21224 How is literate programming different from verbose commenting?
21225 \end_layout
21226
21227 \begin_layout Quotation
21228 There are three distinguishing characteristics.
21229  In order of importance, they are: 
21230 \end_layout
21231
21232 \begin_deeper
21233 \begin_layout Itemize
21234 flexible order of elaboration 
21235 \end_layout
21236
21237 \begin_layout Itemize
21238 automatic support for browsing 
21239 \end_layout
21240
21241 \begin_layout Itemize
21242 typeset documentation, especially diagrams and mathematics 
21243 \end_layout
21244
21245 \end_deeper
21246 \begin_layout Standard
21247 Now that I sparked your curiosity, take a look in the references.
21248 \end_layout
21249
21250 \begin_layout Subsubsection
21251 References
21252 \end_layout
21253
21254 \begin_layout Standard
21255 The complete Literate Programming FAQ can be found at:
21256 \end_layout
21257
21258 \begin_layout Quote
21259 Literate Programming FAQ 
21260 \begin_inset Flex URL
21261 status collapsed
21262
21263 \begin_layout Plain Layout
21264
21265 http://www.literateprogramming.com/lpfaq.pdf
21266 \end_layout
21267
21268 \end_inset
21269
21270
21271 \end_layout
21272
21273 \begin_layout Standard
21274 The FAQ lists 23 (twenty three!) different literate programming tools.
21275  Where some are specialized or 
21276 \begin_inset Quotes eld
21277 \end_inset
21278
21279 tailored
21280 \begin_inset Quotes erd
21281 \end_inset
21282
21283  for particular programming languages, while other have general scope.
21284  I selected 
21285 \noun on
21286 Noweb
21287 \noun default
21288  for my own use for several reasons:
21289 \end_layout
21290
21291 \begin_layout Itemize
21292 It can generate the documentation either in LaTeX or HTML.
21293 \end_layout
21294
21295 \begin_layout Itemize
21296 It has a open architecture, i.
21297 \begin_inset space \thinspace{}
21298 \end_inset
21299
21300 g.
21301 \begin_inset space \space{}
21302 \end_inset
21303
21304 it is easy to plug in new filters and to perform special processing that
21305  you may need.
21306  
21307 \end_layout
21308
21309 \begin_layout Itemize
21310 There is a good selection of filters available already (the HTML is one
21311  of them).
21312 \end_layout
21313
21314 \begin_layout Itemize
21315 It is free.
21316 \end_layout
21317
21318 \begin_layout Standard
21319 The Noweb web page can be found at: 
21320 \end_layout
21321
21322 \begin_layout Quote
21323 Noweb home page 
21324 \begin_inset Flex URL
21325 status collapsed
21326
21327 \begin_layout Plain Layout
21328
21329 http://www.cs.virginia.edu/~nr/noweb/
21330 \end_layout
21331
21332 \end_inset
21333
21334
21335 \end_layout
21336
21337 \begin_layout Standard
21338 Starting from there you can reach many other interesting links and even
21339  some literate program examples.
21340 \end_layout
21341
21342 \begin_layout Subsection
21343 LyX and Literate Programming
21344 \end_layout
21345
21346 \begin_layout Standard
21347 The LyX support for Literate Programming is provided by using the generic
21348  LyX converters mechanism.
21349  This support is provided in a 
21350 \begin_inset Quotes eld
21351 \end_inset
21352
21353 Noweb independent
21354 \begin_inset Quotes erd
21355 \end_inset
21356
21357  way, i.
21358 \begin_inset space \thinspace{}
21359 \end_inset
21360
21361 g.
21362 \begin_inset space \space{}
21363 \end_inset
21364
21365 you will be able to use this new LyX feature with some other literate programmin
21366 g tool of your choice by just changing your LyX preferences.
21367 \end_layout
21368
21369 \begin_layout Subsubsection
21370 Generating documents and code (weaving and tangling)
21371 \end_layout
21372
21373 \begin_layout Paragraph
21374 Selecting the document class
21375 \end_layout
21376
21377 \begin_layout Standard
21378 If you have installed Noweb and LyX successfully, whenever you open a new
21379  document or try to change the document class of an existing one, you will
21380  find that there are three new document classes available:
21381 \end_layout
21382
21383 \begin_layout Itemize
21384 Article (Noweb)
21385 \end_layout
21386
21387 \begin_layout Itemize
21388 Book (Noweb)
21389 \end_layout
21390
21391 \begin_layout Itemize
21392 Report (Noweb)
21393 \end_layout
21394
21395 \begin_layout Standard
21396 You must select one of them to create your literate documents from.
21397  
21398 \end_layout
21399
21400 \begin_layout Standard
21401 Note that literate documents are not limited to these three classes.
21402  New classes can be generated from other styles like letter or in combination
21403  with other class variations like Article (AMS).
21404  If you have special needs that cannot be covered by one of the existing
21405  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21406  will arrange to insert a new entry, or teach you how to do it.
21407 \begin_inset Foot
21408 status collapsed
21409
21410 \begin_layout Plain Layout
21411 It is very simple, it involves the creation of a file with four lines, and
21412  re-running of the auto configuration.
21413 \end_layout
21414
21415 \end_inset
21416
21417  Moreover, if you use a literate tool other than Noweb you may need to create
21418  a new set of document classes for it.
21419 \end_layout
21420
21421 \begin_layout Paragraph
21422 Typing code in
21423 \end_layout
21424
21425 \begin_layout Standard
21426 LyX enables you to write code with a layout named 
21427 \noun on
21428 Scrap
21429 \noun default
21430 .
21431 \begin_inset Foot
21432 status collapsed
21433
21434 \begin_layout Plain Layout
21435 The equivalent Noweb term is 
21436 \begin_inset Quotes eld
21437 \end_inset
21438
21439 Chunk
21440 \begin_inset Quotes erd
21441 \end_inset
21442
21443 .
21444  For historical reasons, I got used to the term 
21445 \begin_inset Quotes eld
21446 \end_inset
21447
21448 scrap
21449 \begin_inset Quotes erd
21450 \end_inset
21451
21452  introduced by other literate tool named Nuweb, which I used for many years
21453  before rendering myself to Noweb.
21454 \end_layout
21455
21456 \end_inset
21457
21458  Noweb delimits scraps like this:
21459 \end_layout
21460
21461 \begin_layout LyX-Code
21462 <<My scrap>>=
21463 \end_layout
21464
21465 \begin_layout LyX-Code
21466   code
21467 \end_layout
21468
21469 \begin_layout LyX-Code
21470   more code
21471 \end_layout
21472
21473 \begin_layout LyX-Code
21474   even more code
21475 \end_layout
21476
21477 \begin_layout LyX-Code
21478   @
21479 \end_layout
21480
21481 \begin_layout Standard
21482 The problem is that whatever is written in between the << and the 
21483 \family typewriter
21484 @
21485 \family default
21486  must be taken literally, i.
21487 \begin_inset space \thinspace{}
21488 \end_inset
21489
21490 g.
21491 \begin_inset space \space{}
21492 \end_inset
21493
21494 LyX should be prevented from making any special interpretation of what has
21495  been written.
21496  This is handled by a special layout named Scrap, that works like a normal
21497  paragraph but has a free spacing capability.
21498 \end_layout
21499
21500 \begin_layout Standard
21501 The down side of the Scrap paragraph layout is that consecutive paragraphs
21502  of code will be spaced with one empty line in the source code and also
21503  in the printed documentation.
21504  The work around is to enter each line of code within a single Scrap, with
21505  a newline (ctrl-return).
21506  The example above will look like this:
21507 \begin_inset Foot
21508 status collapsed
21509
21510 \begin_layout Plain Layout
21511 If you have a printed version of this document you will not see any difference
21512  between the previous example and this one.
21513 \end_layout
21514
21515 \end_inset
21516
21517
21518 \end_layout
21519
21520 \begin_layout LyX-Code
21521 <<My scrap>>=
21522 \begin_inset Newline newline
21523 \end_inset
21524
21525   code
21526 \begin_inset Newline newline
21527 \end_inset
21528
21529   more code
21530 \begin_inset Newline newline
21531 \end_inset
21532
21533   even more code
21534 \begin_inset Newline newline
21535 \end_inset
21536
21537   @
21538 \end_layout
21539
21540 \begin_layout Standard
21541 This layout works fine.
21542  The only real inconvenience is that you have to type ctrl-return instead
21543  of a plain return.
21544 \begin_inset Foot
21545 status collapsed
21546
21547 \begin_layout Plain Layout
21548 It is in my list of 
21549 \begin_inset Quotes eld
21550 \end_inset
21551
21552 improvements
21553 \begin_inset Quotes erd
21554 \end_inset
21555
21556  to fix that.
21557 \end_layout
21558
21559 \end_inset
21560
21561
21562 \end_layout
21563
21564 \begin_layout Standard
21565 As a special note, you can also use the 
21566 \begin_inset Quotes eld
21567 \end_inset
21568
21569 %def
21570 \begin_inset Quotes erd
21571 \end_inset
21572
21573  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21574 rence:
21575 \end_layout
21576
21577 \begin_layout LyX-Code
21578 <<My scrap>>=
21579 \begin_inset Newline newline
21580 \end_inset
21581
21582   def some_function(args):
21583 \begin_inset Newline newline
21584 \end_inset
21585
21586     "This is the doc string for this function."
21587 \begin_inset Newline newline
21588 \end_inset
21589
21590     print "My args: ", args
21591 \end_layout
21592
21593 \begin_layout LyX-Code
21594 @ %def some_function
21595 \end_layout
21596
21597 \begin_layout Standard
21598 For an example of this usage and the resulting cross-reference output, look
21599  at the Literate python program in 
21600 \emph on
21601 LIBDIR/examples/listerrors.lyx
21602 \emph default
21603  which should make this all clear.
21604 \end_layout
21605
21606 \begin_layout Paragraph
21607 Generating the documentation
21608 \end_layout
21609
21610 \begin_layout Standard
21611 At this point you already have a new document file with a proper document
21612  class, and with some code and text on it.
21613  How do I print it? The answer is simple, you select 
21614 \family sans
21615 View\SpecialChar \menuseparator
21616 DVI,
21617 \family default
21618  etc.
21619  Just like you would do for a plain document.
21620  No special procedure is required.
21621 \end_layout
21622
21623 \begin_layout Standard
21624 To help orientate you, I will now explain what happens inside LyX:
21625 \end_layout
21626
21627 \begin_layout Enumerate
21628 When the 
21629 \family sans
21630 Update\SpecialChar \menuseparator
21631 DVI
21632 \family default
21633  menu option is chosen, a LaTeX file is generated.
21634  
21635 \end_layout
21636
21637 \begin_deeper
21638 \begin_layout Standard
21639 If the document is of any literate class the generated file will be named
21640  with an extension name defined by the 
21641 \begin_inset Quotes eld
21642 \end_inset
21643
21644 literate
21645 \begin_inset Quotes erd
21646 \end_inset
21647
21648  format (defined in the Preferences panel), otherwise the file will have
21649  the usual 
21650 \family typewriter
21651 .tex
21652 \family default
21653  extension.
21654 \end_layout
21655
21656 \end_deeper
21657 \begin_layout Enumerate
21658 Note that the only difference so far is in the name of the file, no special
21659  processing is required by LyX.
21660  Given that you formatted the code using the Scrap layout that, by itself,
21661  takes care of the business.
21662 \end_layout
21663
21664 \begin_layout Enumerate
21665 If the document is of any literate class LyX will then use the internal
21666  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21667 \begin_inset Foot
21668 status collapsed
21669
21670 \begin_layout Plain Layout
21671 The converters are defined in the 
21672 \family sans
21673 Tools\SpecialChar \menuseparator
21674 Preferences
21675 \family default
21676  panel, under the 
21677 \begin_inset Quotes eld
21678 \end_inset
21679
21680 Conversion
21681 \begin_inset Quotes erd
21682 \end_inset
21683
21684  tab.
21685  See section 
21686 \emph on
21687 Converters
21688 \emph default
21689  of the 
21690 \emph on
21691 Customization
21692 \emph default
21693  manual for general information about converters.
21694 \end_layout
21695
21696 \end_inset
21697
21698  to generate the LaTeX file.
21699 \end_layout
21700
21701 \begin_deeper
21702 \begin_layout Standard
21703 Otherwise it will just skip this step.
21704 \end_layout
21705
21706 \end_deeper
21707 \begin_layout Enumerate
21708 Finally, LaTeX is invoked and the regular post processing continues as in
21709  a plain document.
21710 \end_layout
21711
21712 \begin_layout Standard
21713 Independence from a particular 
21714 \begin_inset Quotes eld
21715 \end_inset
21716
21717 literate tool
21718 \begin_inset Quotes erd
21719 \end_inset
21720
21721  is easily achieved by changing the commands that are run by the various
21722  converters.
21723 \end_layout
21724
21725 \begin_layout Paragraph
21726 Generating the code
21727 \end_layout
21728
21729 \begin_layout Standard
21730 When the build menu option is chosen or the corresponding button in the
21731  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21732  Next, LyX invokes the 
21733 \family typewriter
21734 Noweb->Program
21735 \family default
21736  converter.
21737  This converter needs to be defined by the user and is not installed by
21738  default, though the Program format is.
21739  This converter (like any other converter) will have two parts:
21740 \end_layout
21741
21742 \begin_layout Enumerate
21743 The converter program itself.
21744  This program performs the conversion from the one format to the other (in
21745  this case, from the Noweb format to the Program pseudo-format).
21746 \end_layout
21747
21748 \begin_layout Enumerate
21749 The error log parser.
21750  This is a program whose sole purpose is to rewrite error messages in a
21751  format that LyX understands.
21752  This makes it possible for LyX to place error boxes in the right places
21753  in the file buffer.
21754 \end_layout
21755
21756 \begin_layout Standard
21757 The first part, the 
21758 \begin_inset Quotes eld
21759 \end_inset
21760
21761 Converter
21762 \begin_inset Quotes erd
21763 \end_inset
21764
21765  setting, should be set to 
21766 \begin_inset Quotes eld
21767 \end_inset
21768
21769
21770 \family typewriter
21771 build-script $$i
21772 \family default
21773
21774 \begin_inset Quotes erd
21775 \end_inset
21776
21777 .
21778  This basically means that LyX will call 
21779 \begin_inset Quotes eld
21780 \end_inset
21781
21782 build-script
21783 \begin_inset Quotes erd
21784 \end_inset
21785
21786  (a program or script) with the name of the Noweb file (normally a file
21787  in the LyX temp directory).
21788  
21789 \end_layout
21790
21791 \begin_layout Standard
21792 This is an implementation of 
21793 \begin_inset Quotes eld
21794 \end_inset
21795
21796 build-script
21797 \begin_inset Quotes erd
21798 \end_inset
21799
21800  that you can place in a directory on your path:
21801 \end_layout
21802
21803 \begin_layout LyX-Code
21804 #!/bin/sh
21805 \end_layout
21806
21807 \begin_layout LyX-Code
21808 #
21809 \end_layout
21810
21811 \begin_layout LyX-Code
21812 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21813 \end_layout
21814
21815 \begin_layout Standard
21816 The next part of the converter setting is the 
21817 \begin_inset Quotes eld
21818 \end_inset
21819
21820 Flags
21821 \begin_inset Quotes erd
21822 \end_inset
21823
21824  which is to be set to 
21825 \begin_inset Quotes eld
21826 \end_inset
21827
21828
21829 \family typewriter
21830 parselog=listerrors
21831 \family default
21832
21833 \begin_inset Quotes erd
21834 \end_inset
21835
21836 .
21837  This will run any errors that are generated by the 
21838 \begin_inset Quotes eld
21839 \end_inset
21840
21841 build-script
21842 \begin_inset Quotes erd
21843 \end_inset
21844
21845  process through the 
21846 \begin_inset Quotes eld
21847 \end_inset
21848
21849 listerrors
21850 \begin_inset Quotes erd
21851 \end_inset
21852
21853  program.
21854 \end_layout
21855
21856 \begin_layout Standard
21857 The converter code looks in 
21858 \emph on
21859 MYLYXDIR/scripts
21860 \emph default
21861  first, then in 
21862 \emph on
21863 LIBDIR/scripts
21864 \emph default
21865  then on the path for the 
21866 \begin_inset Quotes eld
21867 \end_inset
21868
21869 listerrors
21870 \begin_inset Quotes erd
21871 \end_inset
21872
21873  program.
21874 \end_layout
21875
21876 \begin_layout Standard
21877 The build will normally take place in LyX's temporary directory, so the
21878  files produced by the conversion will be in that directory.
21879  LyX will copy out what it regards as the `main' file, but the 
21880 \family typewriter
21881 Noweb->Program
21882 \family default
21883  conversion may produce several files, and so most of these would then be
21884  deleted when LyX was closed.
21885  The present solution is to use a `copier',
21886 \begin_inset Foot
21887 status collapsed
21888
21889 \begin_layout Plain Layout
21890 See section 
21891 \emph on
21892 Copiers
21893 \emph default
21894  of the 
21895 \emph on
21896 Customization
21897 \emph default
21898  manual for information on these.
21899 \end_layout
21900
21901 \end_inset
21902
21903  in this case, the 
21904 \family typewriter
21905 ext_copy.py
21906 \family default
21907  script in its default mode, so that the entire contents of the temporary
21908  directory is copied.
21909  More will get copied than is needed, to be sure, but nothing will be lost.
21910  If, however, you know what extensions the generated files will have, this
21911  can be improved by using the 
21912 \family typewriter
21913 -e
21914 \family default
21915  option to 
21916 \family typewriter
21917 ext_copy
21918 \family default
21919 .
21920  This option takes a comma-separated list of extensions to copy.
21921  So, for example, if the conversion will generate only files with the extensions
21922  
21923 \family typewriter
21924 .c
21925 \family default
21926  and 
21927 \family typewriter
21928 .h
21929 \family default
21930 , then the correct definition would be:
21931 \end_layout
21932
21933 \begin_layout LyX-Code
21934 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21935 \end_layout
21936
21937 \begin_layout Standard
21938 The result will be that only files with these two extensions will be copied
21939  out.
21940 \end_layout
21941
21942 \begin_layout Paragraph
21943 Build instructions in the document
21944 \end_layout
21945
21946 \begin_layout Standard
21947 The last piece of the integration between LyX and noweb is the 
21948 \begin_inset Quotes eld
21949 \end_inset
21950
21951 build-script
21952 \begin_inset Quotes erd
21953 \end_inset
21954
21955  scrap.
21956  Generally, the instructions for building your program should be embedded
21957  in a scrap of its own.
21958  The noweb-specific 
21959 \begin_inset Quotes eld
21960 \end_inset
21961
21962 build-script
21963 \begin_inset Quotes erd
21964 \end_inset
21965
21966  above uses the notangle command to look for this scrap (called 
21967 \begin_inset Quotes eld
21968 \end_inset
21969
21970 build-script
21971 \begin_inset Quotes erd
21972 \end_inset
21973
21974 ) and runs its contents through 
21975 \begin_inset Quotes eld
21976 \end_inset
21977
21978 sh
21979 \begin_inset Quotes erd
21980 \end_inset
21981
21982 .
21983 \end_layout
21984
21985 \begin_layout Standard
21986 Typically, such a scrap would look something like this:
21987 \end_layout
21988
21989 \begin_layout LyX-Code
21990 <<build-script>>=
21991 \begin_inset Newline newline
21992 \end_inset
21993
21994 #!/bin/sh
21995 \begin_inset Newline newline
21996 \end_inset
21997
21998
21999 \begin_inset Newline newline
22000 \end_inset
22001
22002 if [ -z "${NOWEB_SOURCE}" ]
22003 \begin_inset Newline newline
22004 \end_inset
22005
22006 then
22007 \begin_inset Newline newline
22008 \end_inset
22009
22010   NOWEB_SOURCE=myfile.nw
22011 \begin_inset Newline newline
22012 \end_inset
22013
22014 fi
22015 \begin_inset Newline newline
22016 \end_inset
22017
22018 [...
22019  code to extract files ...]
22020 \begin_inset Newline newline
22021 \end_inset
22022
22023 [...
22024  code to compile files ...]
22025 \begin_inset Newline newline
22026 \end_inset
22027
22028 @
22029 \end_layout
22030
22031 \begin_layout Standard
22032 Look in 
22033 \emph on
22034 LIBDIR/examples/listerrors.lyx
22035 \emph default
22036  or in 
22037 \emph on
22038 LIBDIR/examples/Literate.lyx
22039 \emph default
22040  which implement two versions of the 
22041 \begin_inset Quotes eld
22042 \end_inset
22043
22044 listerrors
22045 \begin_inset Quotes erd
22046 \end_inset
22047
22048  program for some illustrations of how all of these pieces go together or
22049  in 
22050 \emph on
22051 LIBDIR/examples/noweb2lyx.lyx.
22052
22053 \emph default
22054  Interestingly, these three files show off the language-indepence of the
22055  LyX literate programming support since they are written in Python, C and
22056  Perl respectively.
22057 \end_layout
22058
22059 \begin_layout Subsubsection
22060 Configuring LyX
22061 \end_layout
22062
22063 \begin_layout Standard
22064 All the Literate Programming support is configured by the 
22065 \family sans
22066 Tools\SpecialChar \menuseparator
22067 Preferences
22068 \family default
22069  panel in the 
22070 \begin_inset Quotes eld
22071 \end_inset
22072
22073 Conversion
22074 \begin_inset Quotes erd
22075 \end_inset
22076
22077  tab.
22078  The important parts are:
22079 \end_layout
22080
22081 \begin_layout Description
22082 the
22083 \begin_inset space ~
22084 \end_inset
22085
22086
22087 \begin_inset Quotes eld
22088 \end_inset
22089
22090 literate
22091 \begin_inset Quotes erd
22092 \end_inset
22093
22094
22095 \begin_inset space ~
22096 \end_inset
22097
22098 format Set up via the Formats tab, this is where the Noweb-specific pieces
22099  are set up.
22100  The 
22101 \family sans
22102 GUI Name
22103 \family default
22104  is set to 
22105 \family typewriter
22106 NoWeb
22107 \family default
22108 , the file extension is set to 
22109 \family typewriter
22110 .nw
22111 \family default
22112 .
22113  This tells LyX to create a file with a 
22114 \family typewriter
22115 .nw
22116 \family default
22117  extension in the first step of the conversion process.
22118 \end_layout
22119
22120 \begin_layout Description
22121 the
22122 \begin_inset space ~
22123 \end_inset
22124
22125
22126 \family sans
22127 Program
22128 \family default
22129
22130 \begin_inset space ~
22131 \end_inset
22132
22133 format This is an empty format whose sole purpose is to be the endpoint
22134  of a conversion (which then allows us to set up a converter for it).
22135 \end_layout
22136
22137 \begin_layout Description
22138
22139 \family sans
22140 NoWeb
22141 \family default
22142 ->
22143 \family sans
22144 LaTeX
22145 \family default
22146  This converter performs the 
22147 \begin_inset Quotes eld
22148 \end_inset
22149
22150 weaving
22151 \begin_inset Quotes erd
22152 \end_inset
22153
22154  of the literate document.
22155  For Noweb, it is set to 
22156 \begin_inset Quotes eld
22157 \end_inset
22158
22159
22160 \family typewriter
22161 noweave -delay -index $$i > $$o
22162 \family default
22163
22164 \begin_inset Quotes erd
22165 \end_inset
22166
22167
22168 \end_layout
22169
22170 \begin_layout Description
22171
22172 \family sans
22173 NoWeb
22174 \family default
22175 ->
22176 \family sans
22177 Program
22178 \family default
22179  This performs the 
22180 \begin_inset Quotes eld
22181 \end_inset
22182
22183 tangling step
22184 \begin_inset Quotes erd
22185 \end_inset
22186
22187 .
22188  As stated above, the Converter is set to 
22189 \begin_inset Quotes eld
22190 \end_inset
22191
22192
22193 \family typewriter
22194 build-script $$i
22195 \family default
22196
22197 \begin_inset Quotes erd
22198 \end_inset
22199
22200 , with Flags set to 
22201 \begin_inset Quotes eld
22202 \end_inset
22203
22204
22205 \family typewriter
22206 originaldir,parselog=listerrors
22207 \family default
22208
22209 \begin_inset Quotes erd
22210 \end_inset
22211
22212 .
22213 \end_layout
22214
22215 \begin_layout Subsubsection
22216 Debug extensions
22217 \end_layout
22218
22219 \begin_layout Standard
22220 There is also a new function implemented in the LyX server, the 
22221 \begin_inset Quotes eld
22222 \end_inset
22223
22224 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22225  
22226 \end_layout
22227
22228 \begin_layout Standard
22229 When debugging code with ddd/gdb, it is possible to invoke a text editor
22230  at the current execution position with a single key stroke.
22231  The default ddd configuration for that is shift-ctrl-V.
22232  It happens that you can define the editor command line invocation in ddd
22233  by accessing the 
22234 \family sans
22235 Edit\SpecialChar \menuseparator
22236 Preferences\SpecialChar \menuseparator
22237 Helpers
22238 \family default
22239  dialog and changing the "Edit Sources" entry.
22240 \end_layout
22241
22242 \begin_layout Standard
22243 I take advantage of the new created LyX server function and this ddd feature,
22244  and set 
22245 \begin_inset Quotes eld
22246 \end_inset
22247
22248 Edit Sources
22249 \begin_inset Quotes erd
22250 \end_inset
22251
22252  to:
22253 \end_layout
22254
22255 \begin_layout LyX-Code
22256 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22257 \end_layout
22258
22259 \begin_layout Standard
22260 With this, whenever you are using ddd and find a point in the program that
22261  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22262  ddd you forward this information to LyX through the LyX server and then
22263  the LyX window will show the same file with the cursor at the same position
22264  ddd was pointing to.
22265  No more guessing or long scrolling to locate a point in the program back
22266  from debugging !
22267 \end_layout
22268
22269 \begin_layout Standard
22270 Note however that you must enable the LyX server to get this feature working
22271  (it is disabled by default).
22272  You can enable it in 
22273 \family sans
22274 Preferences
22275 \family default
22276  (tabs 
22277 \family sans
22278 Inputs
22279 \family default
22280
22281 \family sans
22282 Paths
22283 \family default
22284 ) by entering in the 
22285 \family sans
22286 LyXserver pipe
22287 \family default
22288  a path like 
22289 \begin_inset Quotes eld
22290 \end_inset
22291
22292
22293 \family typewriter
22294 /home/<your-home-directory>/.lyx/lyxpipe
22295 \family default
22296
22297 \begin_inset Quotes erd
22298 \end_inset
22299
22300
22301 \end_layout
22302
22303 \begin_layout Standard
22304 Read the LyX server documentation in the 
22305 \emph on
22306 Customization Manual
22307 \emph default
22308  for further information.
22309 \end_layout
22310
22311 \begin_layout Subsubsection
22312 Toolbar extensions
22313 \end_layout
22314
22315 \begin_layout Standard
22316 There are six new buttons that can be added to your LyX toolbar.
22317  Five of these buttons are short cuts to layout styles: 
22318 \family sans
22319 Standard
22320 \family default
22321
22322 \family sans
22323 Section
22324 \family default
22325
22326 \family sans
22327 LaTeX
22328 \family default
22329
22330 \family sans
22331 LyX-Code
22332 \family default
22333 , and 
22334 \family sans
22335 Scrap
22336 \family default
22337 .
22338  The last one is a short cut to the 
22339 \begin_inset Quotes eld
22340 \end_inset
22341
22342 Build Program
22343 \begin_inset Quotes erd
22344 \end_inset
22345
22346  File menu entry.
22347  
22348 \end_layout
22349
22350 \begin_layout Standard
22351 LyX has a range of buttons that are available for tool bar customization.
22352  In my toolbar I like to combine the six short cuts above with two more:
22353  One for 
22354 \family sans
22355 View
22356 \family default
22357 \SpecialChar \menuseparator
22358
22359 \family sans
22360 Update
22361 \family default
22362 \SpecialChar \menuseparator
22363
22364 \family sans
22365 DVI
22366 \family default
22367  and the other for 
22368 \family sans
22369 View\SpecialChar \menuseparator
22370 DVI
22371 \family default
22372  File menu entries.
22373  Here is how it looks like:
22374 \end_layout
22375
22376 \begin_layout LyX-Code
22377 Toolbar
22378 \end_layout
22379
22380 \begin_layout LyX-Code
22381   Layouts
22382 \end_layout
22383
22384 \begin_layout LyX-Code
22385   Icon "layout Standard"
22386 \end_layout
22387
22388 \begin_layout LyX-Code
22389   Icon "layout Section"
22390 \end_layout
22391
22392 \begin_layout LyX-Code
22393   Icon "layout LaTeX"
22394 \end_layout
22395
22396 \begin_layout LyX-Code
22397   Icon "layout LyX-Code"
22398 \end_layout
22399
22400 \begin_layout LyX-Code
22401   Icon "layout Scrap"
22402 \end_layout
22403
22404 \begin_layout LyX-Code
22405   Separator
22406 \end_layout
22407
22408 \begin_layout LyX-Code
22409   Icon "buffer-view"
22410 \end_layout
22411
22412 \begin_layout LyX-Code
22413   Icon "buffer-typeset"
22414 \end_layout
22415
22416 \begin_layout LyX-Code
22417   Icon "build-program"
22418 \end_layout
22419
22420 \begin_layout LyX-Code
22421   Separator
22422 \end_layout
22423
22424 \begin_layout LyX-Code
22425 .
22426 \end_layout
22427
22428 \begin_layout LyX-Code
22429 .
22430 \end_layout
22431
22432 \begin_layout LyX-Code
22433 .
22434 \end_layout
22435
22436 \begin_layout LyX-Code
22437 End
22438 \end_layout
22439
22440 \begin_layout Subsubsection
22441 Colors customization
22442 \end_layout
22443
22444 \begin_layout Standard
22445 There are a number of colors in LyX that can be customized in 
22446 \family sans
22447 Preferences
22448 \family default
22449 .
22450  One of the things that bothers people is the LaTeX font color.
22451  The default color is red, since the scraps uses LaTeX font, and there is
22452  a lot of scraps in literate documents, you may get tired of seeing everything
22453  in red.
22454  You can change it by going to the tabs 
22455 \family sans
22456 Look&Feel
22457 \family default
22458
22459 \family sans
22460 Colors.
22461 \end_layout
22462
22463 \begin_layout Standard
22464 The next thing is the visible presence of the newline character in the screen.
22465  You can choose the color of this particular character and make it blend
22466  in the background.
22467  I recommend you choosing a color that is close to the background but not
22468  equal, that way you still can see it is there, but it is not bothering
22469  you anymore.
22470  
22471 \end_layout
22472
22473 \begin_layout Chapter
22474 Special features
22475 \end_layout
22476
22477 \begin_layout Standard
22478 You can do everything with LyX that you can do with LaTeX.
22479  However, LyX cannot support every LaTeX feature directly.
22480  But you can always use TeX Code.
22481  This chapter shows you some more special things you might want to use.
22482  For other special things you can do with figures, tables, floats, boxes
22483  and notes, have a look at the 
22484 \emph on
22485 EmbeddedObjects
22486 \emph default
22487  manual.
22488 \end_layout
22489
22490 \begin_layout Section
22491 Multiple Text Columns
22492 \end_layout
22493
22494 \begin_layout Standard
22495 This feature is independent of the option 
22496 \family sans
22497 Two-column document
22498 \family default
22499  in the document settings under 
22500 \family sans
22501 Text Layout
22502 \family default
22503 .
22504  If you want to have 2
22505 \begin_inset space ~
22506 \end_inset
22507
22508 columns for the whole document, it is recommended to use the 
22509 \family sans
22510 Two-column document
22511 \family default
22512  option.
22513  For all other cases use this feature.
22514 \end_layout
22515
22516 \begin_layout Standard
22517 To use multiple text columns in your document, you have to load the module
22518  
22519 \family sans
22520 Multiple Columns
22521 \family default
22522  (menu 
22523 \family sans
22524 Document\SpecialChar \menuseparator
22525 Settings\SpecialChar \menuseparator
22526 Modules
22527 \family default
22528 ) and must have the LaTeX-package 
22529 \series bold
22530 multicol
22531 \series default
22532
22533 \begin_inset Index idx
22534 status collapsed
22535
22536 \begin_layout Plain Layout
22537 LaTeX-packages ! multicol
22538 \end_layout
22539
22540 \end_inset
22541
22542  installed.
22543 \end_layout
22544
22545 \begin_layout Standard
22546 Footnotes within multiple columns will be placed at the bottom of the page
22547  and not under each column.
22548  Within the different columns you can use everything, with the limitation
22549  that for floats you need to use the float option 
22550 \family sans
22551 Span columns
22552 \family default
22553 .
22554 \end_layout
22555
22556 \begin_layout Subsection
22557 Basics
22558 \end_layout
22559
22560 \begin_layout Standard
22561 If you want to have 2 columns in your text, use the style 
22562 \family sans
22563 Begin Multiple Columns
22564 \family default
22565  where the columns should start.
22566  The content of the style is the number of the columns, so in this case
22567  use a 
22568 \begin_inset Quotes eld
22569 \end_inset
22570
22571 2
22572 \begin_inset Quotes erd
22573 \end_inset
22574
22575 .
22576  At the point where the columns should end use the style 
22577 \family sans
22578 End Multiple Columns
22579 \family default
22580  and keep it empty.
22581 \end_layout
22582
22583 \begin_layout Standard
22584 Here is an example:
22585 \end_layout
22586
22587 \begin_layout Begin Multiple Columns
22588 2
22589 \end_layout
22590
22591 \begin_layout Standard
22592 \noindent
22593
22594 \series bold
22595 \size small
22596 The Adventure of the Empty House
22597 \series default
22598
22599 \begin_inset Newline newline
22600 \end_inset
22601
22602 by 
22603 \noun on
22604 Sir Arthur Conan Doyle
22605 \end_layout
22606
22607 \begin_layout Standard
22608
22609 \size small
22610 It was in the spring of the year 1894 that all London was interested, and
22611  the fashionable world dismayed, by the murder of the Honourable Ronald
22612  Adair under most unusual and inexplicable circumstances.
22613  The public has already learned those particulars of the crime which came
22614  out in the police investigation, but a good deal was suppressed upon that
22615  occasion, since the case for the prosecution was so overwhelmingly strong
22616  that it was not necessary to bring forward all the facts.
22617  Only now, at the end of nearly ten years, am I allowed to supply those
22618  missing links which make up the whole of that remarkable chain.
22619  The crime was of interest in itself, but that interest was as nothing to
22620  me compared to the inconceivable sequel, which afforded me the greatest
22621  shock and surprise of any event in my adventurous life.
22622  Even now, after this long interval, I find myself thrilling as I think
22623  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22624 ty which utterly submerged my mind.
22625  Let me say to that public, which has shown some interest in those glimpses
22626  which I have occasionally given them of the thoughts and actions of a very
22627  remarkable man, that they are not to blame me if I have not shared my knowledge
22628  with them, for I should have considered it my first duty to do so, had
22629  I not been barred by a positive prohibition from his own lips, which was
22630  only withdrawn upon the third of last month.
22631 \end_layout
22632
22633 \begin_layout End Multiple Columns
22634
22635 \end_layout
22636
22637 \begin_layout Standard
22638 Here is an example with 3
22639 \begin_inset space ~
22640 \end_inset
22641
22642 columns:
22643 \end_layout
22644
22645 \begin_layout Begin Multiple Columns
22646 3
22647 \end_layout
22648
22649 \begin_layout Standard
22650
22651 \size footnotesize
22652 It can be imagined that my close intimacy with Sherlock Holmes had interested
22653  me deeply in crime, and that after his disappearance I never failed to
22654  read with care the various problems which came before the public.
22655  And I even attempted, more than once, for my own private satisfaction,
22656  to employ his methods in their solution, though with indifferent success.
22657  There was none, however, which appealed to me like this tragedy of Ronald
22658  Adair.
22659  As I read the evidence at the inquest, which led up to a verdict of willful
22660  murder against some person or persons unknown, I realized more clearly
22661  than I had ever done the loss which the community had sustained by the
22662  death of Sherlock Holmes.
22663  There were points about this strange business which would, I was sure,
22664  have specially appealed to him, and the efforts of the police would have
22665  been supplemented, or more probably anticipated, by the trained observation
22666  and the alert mind of the first criminal agent in Europe.
22667  All day, as I drove upon my round, I turned over the case in my mind and
22668  found no explanation which appeared to me to be adequate.
22669  At the risk of telling a twice-told tale, I will recapitulate the facts
22670  as they were known to the public at the conclusion of the inquest.
22671 \end_layout
22672
22673 \begin_layout End Multiple Columns
22674
22675 \end_layout
22676
22677 \begin_layout Standard
22678 You can have up to 10
22679 \begin_inset space ~
22680 \end_inset
22681
22682 columns if you want to, but that might not be very pleasant for the readers
22683  of your document.
22684 \end_layout
22685
22686 \begin_layout Standard
22687 \begin_inset Newpage newpage
22688 \end_inset
22689
22690
22691 \end_layout
22692
22693 \begin_layout Subsection
22694 Columns inside Columns
22695 \end_layout
22696
22697 \begin_layout Standard
22698 You can also have columns inside columns:
22699 \end_layout
22700
22701 \begin_layout Begin Multiple Columns
22702 2
22703 \end_layout
22704
22705 \begin_layout Standard
22706
22707 \size footnotesize
22708 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22709  at that time governor of one of the Australian colonies.
22710  Adair's mother had returned from Australia to undergo the operation for
22711  cataract, and she, her son Ronald, and her daughter Hilda were living together
22712  at 427 Park Lane.
22713 \end_layout
22714
22715 \begin_layout Begin Multiple Columns
22716 2
22717 \end_layout
22718
22719 \begin_layout Standard
22720
22721 \size footnotesize
22722 The youth moved in the best society–had, so far as was known, no enemies
22723  and no particular vices.
22724  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22725  had been broken off by mutual consent some months before, and there was
22726  no sign that it had left any very profound feeling behind it.
22727  For the rest {sic} the man's life moved in a narrow and conventional circle,
22728  for his habits were quiet and his nature unemotional.
22729  Yet it was upon this easy-going young aristocrat that death came, in most
22730  strange and unexpected form, between the hours of ten and eleven-twenty
22731  on the night of March 30, 1894.
22732 \end_layout
22733
22734 \begin_layout End Multiple Columns
22735
22736 \end_layout
22737
22738 \begin_layout Standard
22739
22740 \size footnotesize
22741 Ronald Adair was fond of cards–playing continually, but never for such stakes
22742  as would hurt him.
22743  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22744  It was shown that, after dinner on the day of his death, he had played
22745  a rubber of whist at the latter club.
22746  He had also played there in the afternoon.
22747
22748 \size default
22749  
22750 \size footnotesize
22751 The evidence of those who had played with him– Mr.
22752  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22753  and that there was a fairly equal fall of the cards.
22754  Adair might have lost five pounds, but not more.
22755  His fortune was a considerable one, and such a loss could not in any way
22756  affect him.
22757  He had played nearly every day at one club or other, but he was a cautious
22758  player, and usually rose a winner.
22759  It came out in evidence that, in partnership with Colonel Moran, he had
22760  actually won as much as four hundred and twenty pounds in a sitting, some
22761  weeks before, from Godfrey Milner and Lord Balmoral.
22762  So much for his recent history as it came out at the inquest.
22763 \end_layout
22764
22765 \begin_layout End Multiple Columns
22766
22767 \end_layout
22768
22769 \begin_layout Subsection
22770 Advanced Examples
22771 \end_layout
22772
22773 \begin_layout Standard
22774 The examples in this section show some more special features of multiple
22775  columns.
22776 \end_layout
22777
22778 \begin_layout Standard
22779 For more features of multiple columns, have a look at the documentation
22780  of the LaTeX-package 
22781 \series bold
22782 multicol
22783 \series default
22784
22785 \begin_inset Index idx
22786 status collapsed
22787
22788 \begin_layout Plain Layout
22789 LaTeX-packages ! multicol
22790 \end_layout
22791
22792 \end_inset
22793
22794
22795 \begin_inset CommandInset citation
22796 LatexCommand cite
22797 key "multicol"
22798
22799 \end_inset
22800
22801 .
22802 \end_layout
22803
22804 \begin_layout Subsubsection
22805 Preface
22806 \end_layout
22807
22808 \begin_layout Standard
22809 To add a preface text for multiple columns, add the command
22810 \end_layout
22811
22812 \begin_layout Standard
22813
22814 \series bold
22815 }[
22816 \end_layout
22817
22818 \begin_layout Standard
22819 as TeX Code behind the number of columns in the
22820 \family sans
22821  Begin Multiple Columns
22822 \family default
22823  style.
22824  behind the command write the text.
22825  At the end of the style use the command
22826 \end_layout
22827
22828 \begin_layout Standard
22829
22830 \series bold
22831 ]{
22832 \end_layout
22833
22834 \begin_layout Standard
22835 as TeX Code.
22836  An example with some preface text:
22837 \end_layout
22838
22839 \begin_layout Standard
22840 \begin_inset VSpace bigskip
22841 \end_inset
22842
22843
22844 \end_layout
22845
22846 \begin_layout Begin Multiple Columns
22847 2
22848 \begin_inset ERT
22849 status collapsed
22850
22851 \begin_layout Plain Layout
22852
22853 }[
22854 \end_layout
22855
22856 \end_inset
22857
22858 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22859
22860 \begin_inset ERT
22861 status collapsed
22862
22863 \begin_layout Plain Layout
22864
22865 ]{
22866 \end_layout
22867
22868 \end_inset
22869
22870
22871 \end_layout
22872
22873 \begin_layout Standard
22874
22875 \size small
22876 On the evening of the crime, he returned from the club exactly at ten.
22877  His mother and sister were out spending the evening with a relation.
22878  The servant deposed that she heard him enter the front room on the second
22879  floor, generally used as his sitting-room.
22880  She had lit a fire there, and as it smoked she had opened the window.
22881  No sound was heard from the room until eleven-twenty, the hour of the return
22882  of Lady Maynooth and her daughter.
22883  Desiring to say good-night, she attempted to enter her son's room.
22884  The door was locked on the inside, and no answer could be got to their
22885  cries and knocking.
22886  Help was obtained, and the door forced.
22887  The unfortunate young man was found lying near the table.
22888  His head had been horribly mutilated by an expanding revolver bullet, but
22889  no weapon of any sort was to be found in the room.
22890 \end_layout
22891
22892 \begin_layout End Multiple Columns
22893
22894 \end_layout
22895
22896 \begin_layout Standard
22897 You can also use a section heading as the preface if you use a section command
22898  as TeX Code behind the first TeX Code.
22899  For example the command
22900 \end_layout
22901
22902 \begin_layout Standard
22903
22904 \series bold
22905
22906 \backslash
22907 subsection{subsection title}
22908 \end_layout
22909
22910 \begin_layout Standard
22911 creates a subsection.
22912  In this example the preface is a subsubsection:
22913 \end_layout
22914
22915 \begin_layout Begin Multiple Columns
22916 2
22917 \begin_inset ERT
22918 status collapsed
22919
22920 \begin_layout Plain Layout
22921
22922 }[
22923 \end_layout
22924
22925 \end_inset
22926
22927
22928 \begin_inset ERT
22929 status collapsed
22930
22931 \begin_layout Plain Layout
22932
22933
22934 \backslash
22935 subsubsection{
22936 \end_layout
22937
22938 \end_inset
22939
22940 This is a subsubsection heading as a preface
22941 \begin_inset ERT
22942 status collapsed
22943
22944 \begin_layout Plain Layout
22945
22946 }
22947 \end_layout
22948
22949 \end_inset
22950
22951
22952 \begin_inset ERT
22953 status collapsed
22954
22955 \begin_layout Plain Layout
22956
22957 ]{
22958 \end_layout
22959
22960 \end_inset
22961
22962
22963 \end_layout
22964
22965 \begin_layout Standard
22966
22967 \size small
22968 A minute examination of the circumstances served only to make the case more
22969  complex.
22970  In the first place, no reason could be given why the young man should have
22971  fastened the door upon the inside.
22972  There was the possibility that the murderer had done this, and had afterwards
22973  escaped by the window.
22974  The drop was at least twenty feet, however, and a bed of crocuses in full
22975  bloom lay beneath.
22976  Neither the flowers nor the earth showed any sign of having been disturbed,
22977  nor were there any marks upon the narrow strip of grass which separated
22978  the house from the road.
22979  Apparently, therefore, it was the young man himself who had fastened the
22980  door.
22981  But how did he come by his death? No one could have climbed up to the window
22982  without leaving traces.
22983  Suppose a man had fired through the window, he would indeed be a remarkable
22984  shot who could with a revolver inflict so deadly a wound.
22985  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22986  a hundred yards of the house.
22987  No one had heard a shot.
22988 \end_layout
22989
22990 \begin_layout End Multiple Columns
22991
22992 \end_layout
22993
22994 \begin_layout Standard
22995 If there is less vertical space left on the page at the beginning of the
22996  multiple columns than needed for 6
22997 \begin_inset space ~
22998 \end_inset
22999
23000 text lines, a page break will be inserted before the multiple columns.
23001  Depending on the number of lines of the preface text, you might want to
23002  change this value.
23003  It is determined by inserting the command
23004 \end_layout
23005
23006 \begin_layout Standard
23007
23008 \series bold
23009 ][number
23010 \backslash
23011 baselineskip
23012 \end_layout
23013
23014 \begin_layout Standard
23015 as TeX Code behind the preface definition but before the final 
23016 \series bold
23017 ]{
23018 \series default
23019  command.
23020  
23021 \emph on
23022 number
23023 \emph default
23024  is hereby the number of text lines.
23025  In this example the space is set to 7
23026 \begin_inset space ~
23027 \end_inset
23028
23029 text lines:
23030 \end_layout
23031
23032 \begin_layout Begin Multiple Columns
23033 2
23034 \begin_inset ERT
23035 status collapsed
23036
23037 \begin_layout Plain Layout
23038
23039 }[
23040 \end_layout
23041
23042 \end_inset
23043
23044
23045 \begin_inset ERT
23046 status collapsed
23047
23048 \begin_layout Plain Layout
23049
23050
23051 \backslash
23052 subsubsection{
23053 \end_layout
23054
23055 \end_inset
23056
23057 This is the sectioning command
23058 \begin_inset Newline newline
23059 \end_inset
23060
23061 as a preface and
23062 \begin_inset Newline newline
23063 \end_inset
23064
23065 with multiple text lines
23066 \begin_inset ERT
23067 status collapsed
23068
23069 \begin_layout Plain Layout
23070
23071 }
23072 \end_layout
23073
23074 \end_inset
23075
23076
23077 \begin_inset ERT
23078 status collapsed
23079
23080 \begin_layout Plain Layout
23081
23082 ][7
23083 \backslash
23084 baselineskip
23085 \end_layout
23086
23087 \end_inset
23088
23089
23090 \begin_inset ERT
23091 status collapsed
23092
23093 \begin_layout Plain Layout
23094
23095 ]{
23096 \end_layout
23097
23098 \end_inset
23099
23100
23101 \end_layout
23102
23103 \begin_layout Standard
23104
23105 \size small
23106 On the evening of the crime, he returned from the club exactly at ten.
23107  His mother and sister were out spending the evening with a relation.
23108  The servant deposed that she heard him enter the front room on the second
23109  floor, generally used as his sitting-room.
23110  She had lit a fire there, and as it smoked she had opened the window.
23111  No sound was heard from the room until eleven-twenty, the hour of the return
23112  of Lady Maynooth and her daughter.
23113  Desiring to say good-night, she attempted to enter her son's room.
23114  The door was locked on the inside, and no answer could be got to their
23115  cries and knocking.
23116  Help was obtained, and the door forced.
23117  The unfortunate young man was found lying near the table.
23118  His head had been horribly mutilated by an expanding revolver bullet, but
23119  no weapon of any sort was to be found in the room.
23120 \end_layout
23121
23122 \begin_layout End Multiple Columns
23123
23124 \end_layout
23125
23126 \begin_layout Subsubsection
23127 Surrounding Space
23128 \end_layout
23129
23130 \begin_layout Standard
23131 The amount of space before and after multiple columns can be changed by
23132  changing the length 
23133 \series bold
23134
23135 \backslash
23136 multicolsep
23137 \series default
23138 .
23139  For example the command
23140 \end_layout
23141
23142 \begin_layout Standard
23143
23144 \series bold
23145
23146 \backslash
23147 setlength{
23148 \backslash
23149 multicolsep}{3cm}
23150 \end_layout
23151
23152 \begin_layout Standard
23153 in TeX Code changes its value to 3
23154 \begin_inset space \thinspace{}
23155 \end_inset
23156
23157 cm.
23158  The change must be made before the multiple columns' start.
23159  The predefined value is 13
23160 \begin_inset space \thinspace{}
23161 \end_inset
23162
23163 pt.
23164 \end_layout
23165
23166 \begin_layout Standard
23167 For this example 
23168 \series bold
23169
23170 \backslash
23171 multicolsep
23172 \series default
23173  was set to 2.5
23174 \begin_inset space \thinspace{}
23175 \end_inset
23176
23177 cm:
23178 \end_layout
23179
23180 \begin_layout Standard
23181 \begin_inset ERT
23182 status open
23183
23184 \begin_layout Plain Layout
23185
23186
23187 \backslash
23188 setlength{
23189 \backslash
23190 multicolsep}{2.5cm}
23191 \end_layout
23192
23193 \end_inset
23194
23195
23196 \end_layout
23197
23198 \begin_layout Begin Multiple Columns
23199 2
23200 \end_layout
23201
23202 \begin_layout Standard
23203
23204 \size small
23205 All day I turned these facts over in my mind, endeavouring to hit upon some
23206  theory which could reconcile them all, and to find that line of least resistanc
23207 e which my poor friend had declared to be the starting-point of every investigat
23208 ion.
23209  I confess that I made little progress.
23210  In the evening I strolled across the Park, and found myself about six o'clock
23211  at the Oxford Street end of Park Lane.
23212  A group of loafers upon the pavements, all staring up at a particular window,
23213  directed me to the house which I had come to see.
23214  A tall, thin man with coloured glasses, whom I strongly suspected of being
23215  a plain-clothes detective, was pointing out some theory of his own, while
23216  the others crowded round to listen to what he said.
23217  I got as near him as I could, but his observations seemed to me to be absurd,
23218  so I withdrew again in some disgust.
23219  As I did so I struck against an elderly, deformed man, who had been behind
23220  me, and I knocked down several books which he was carrying.
23221 \end_layout
23222
23223 \begin_layout End Multiple Columns
23224
23225 \end_layout
23226
23227 \begin_layout Standard
23228 \begin_inset Note Greyedout
23229 status open
23230
23231 \begin_layout Plain Layout
23232
23233 \series bold
23234 Note:
23235 \series default
23236  The values you set with 
23237 \series bold
23238
23239 \backslash
23240 setlength
23241 \series default
23242  will be used for all following multiple columns until to change them again.
23243 \end_layout
23244
23245 \end_inset
23246
23247
23248 \end_layout
23249
23250 \begin_layout Standard
23251 \begin_inset ERT
23252 status collapsed
23253
23254 \begin_layout Plain Layout
23255
23256
23257 \backslash
23258 setlength{
23259 \backslash
23260 multicolsep}{13pt}
23261 \end_layout
23262
23263 \end_inset
23264
23265
23266 \begin_inset Note Note
23267 status collapsed
23268
23269 \begin_layout Plain Layout
23270 go back to the default
23271 \end_layout
23272
23273 \end_inset
23274
23275
23276 \end_layout
23277
23278 \begin_layout Subsubsection
23279 Column Separation
23280 \end_layout
23281
23282 \begin_layout Standard
23283 The width of the columns is automatically calculated, but you can modify
23284  the space between the columns.
23285  This is done by changing the length 
23286 \series bold
23287
23288 \backslash
23289 columnsep
23290 \series default
23291 .
23292  Its predefined value is 10
23293 \begin_inset space \thinspace{}
23294 \end_inset
23295
23296 pt.
23297  Here is an example where 
23298 \series bold
23299
23300 \backslash
23301 columnsep
23302 \series default
23303  is set to 3
23304 \begin_inset space \thinspace{}
23305 \end_inset
23306
23307 cm:
23308 \end_layout
23309
23310 \begin_layout Standard
23311 \begin_inset ERT
23312 status open
23313
23314 \begin_layout Plain Layout
23315
23316
23317 \backslash
23318 setlength{
23319 \backslash
23320 columnsep}{3cm}
23321 \end_layout
23322
23323 \end_inset
23324
23325
23326 \end_layout
23327
23328 \begin_layout Begin Multiple Columns
23329 2
23330 \end_layout
23331
23332 \begin_layout Standard
23333
23334 \size small
23335 My observations of No.
23336 \begin_inset space \space{}
23337 \end_inset
23338
23339 427 Park Lane did little to clear up the problem in which I was interested.
23340  The house was separated from the street by a low wall and railing, the
23341  whole not more than five feet high.
23342  It was perfectly easy, therefore, for anyone to get into the garden, but
23343  the window was entirely inaccessible, since there was no water pipe or
23344  anything which could help the most active man to climb it.
23345  More puzzled than ever, I retraced my steps to Kensington.
23346  I had not been in my study five minutes when the maid entered to say that
23347  a person desired to see me.
23348  To my astonishment it was none other than my strange old book collector,
23349  his sharp, wizened face peering out from a frame of white hair, and his
23350  precious volumes, a dozen of them at least, wedged under his right arm.
23351 \end_layout
23352
23353 \begin_layout End Multiple Columns
23354
23355 \end_layout
23356
23357 \begin_layout Standard
23358 \begin_inset ERT
23359 status collapsed
23360
23361 \begin_layout Plain Layout
23362
23363
23364 \backslash
23365 setlength{
23366 \backslash
23367 columnsep}{10pt}
23368 \end_layout
23369
23370 \end_inset
23371
23372
23373 \begin_inset Note Note
23374 status collapsed
23375
23376 \begin_layout Plain Layout
23377 go back to the default
23378 \end_layout
23379
23380 \end_inset
23381
23382
23383 \end_layout
23384
23385 \begin_layout Subsubsection
23386 Vertical Lines
23387 \end_layout
23388
23389 \begin_layout Standard
23390 Between the columns a rule with a width of the length 
23391 \series bold
23392
23393 \backslash
23394 columnseprule
23395 \series default
23396  is placed.
23397  If this rule width is set to 0
23398 \begin_inset space \thinspace{}
23399 \end_inset
23400
23401 pt (this is the default), the rule is suppressed.
23402  In the following example, the line separating the columns is 2
23403 \begin_inset space \thinspace{}
23404 \end_inset
23405
23406 pt wide.
23407 \end_layout
23408
23409 \begin_layout Standard
23410 \begin_inset ERT
23411 status open
23412
23413 \begin_layout Plain Layout
23414
23415
23416 \backslash
23417 setlength{
23418 \backslash
23419 columnseprule}{2pt}
23420 \end_layout
23421
23422 \end_inset
23423
23424
23425 \end_layout
23426
23427 \begin_layout Begin Multiple Columns
23428 2
23429 \end_layout
23430
23431 \begin_layout Standard
23432
23433 \size small
23434 \begin_inset Quotes eld
23435 \end_inset
23436
23437 You're surprised to see me, sir,
23438 \begin_inset Quotes erd
23439 \end_inset
23440
23441  said he, in a strange, croaking voice.
23442 \end_layout
23443
23444 \begin_layout Standard
23445
23446 \size small
23447 I acknowledged that I was.
23448 \end_layout
23449
23450 \begin_layout Standard
23451
23452 \size small
23453 \begin_inset Quotes eld
23454 \end_inset
23455
23456 Well, I've a conscience, sir, and when I chanced to see you go into this
23457  house, as I came hobbling after you, I thought to myself, I'll just step
23458  in and see that kind gentleman, and tell him that if I was a bit gruff
23459  in my manner there was not any harm meant, and that I am much obliged to
23460  him for picking up my books.
23461 \begin_inset Quotes erd
23462 \end_inset
23463
23464
23465 \end_layout
23466
23467 \begin_layout Standard
23468
23469 \size small
23470 \begin_inset Quotes eld
23471 \end_inset
23472
23473 You make too much of a trifle,
23474 \begin_inset Quotes erd
23475 \end_inset
23476
23477  said I.
23478  
23479 \begin_inset Quotes eld
23480 \end_inset
23481
23482 May I ask how you knew who I was?
23483 \begin_inset Quotes erd
23484 \end_inset
23485
23486
23487 \end_layout
23488
23489 \begin_layout Standard
23490
23491 \size small
23492 \begin_inset Quotes eld
23493 \end_inset
23494
23495 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23496  you'll find my little bookshop at the corner of Church Street, and very
23497  happy to see you, I am sure.
23498  Maybe you collect yourself, sir.
23499  Here's 
23500 \noun on
23501 British
23502 \begin_inset space ~
23503 \end_inset
23504
23505 Birds
23506 \noun default
23507 , and 
23508 \noun on
23509 Catullus
23510 \noun default
23511 , and 
23512 \noun on
23513 The Holy War
23514 \noun default
23515 --a bargain, every one of them.
23516  With five volumes you could just fill that gap on that second shelf.
23517  It looks untidy, does it not, sir?
23518 \begin_inset Quotes erd
23519 \end_inset
23520
23521
23522 \end_layout
23523
23524 \begin_layout End Multiple Columns
23525
23526 \end_layout
23527
23528 \begin_layout Standard
23529 \begin_inset ERT
23530 status collapsed
23531
23532 \begin_layout Plain Layout
23533
23534
23535 \backslash
23536 setlength{
23537 \backslash
23538 columnseprule}{0pt}
23539 \end_layout
23540
23541 \end_inset
23542
23543
23544 \begin_inset Note Note
23545 status collapsed
23546
23547 \begin_layout Plain Layout
23548 go back to the default
23549 \end_layout
23550
23551 \end_inset
23552
23553
23554 \end_layout
23555
23556 \begin_layout Standard
23557 \begin_inset Newpage newpage
23558 \end_inset
23559
23560
23561 \end_layout
23562
23563 \begin_layout Section
23564 Non-standard Paragraph Shapes
23565 \end_layout
23566
23567 \begin_layout Standard
23568 \begin_inset ERT
23569 status collapsed
23570
23571 \begin_layout Plain Layout
23572
23573
23574 \backslash
23575 begin{sloppypar}
23576 \end_layout
23577
23578 \end_inset
23579
23580
23581 \end_layout
23582
23583 \begin_layout Standard
23584 \begin_inset ERT
23585 status collapsed
23586
23587 \begin_layout Plain Layout
23588
23589
23590 \backslash
23591 newdimen
23592 \backslash
23593 varunit 
23594 \end_layout
23595
23596 \begin_layout Plain Layout
23597
23598
23599 \backslash
23600 setlength{
23601 \backslash
23602 varunit}{4.5in}
23603 \end_layout
23604
23605 \end_inset
23606
23607
23608 \end_layout
23609
23610 \begin_layout Standard
23611 \noindent
23612 \begin_inset ERT
23613 status collapsed
23614
23615 \begin_layout Plain Layout
23616
23617
23618 \backslash
23619 parshape 19 0.45
23620 \backslash
23621 varunit 0.332
23622 \backslash
23623 varunit
23624 \end_layout
23625
23626 \begin_layout Plain Layout
23627
23628 0.40
23629 \backslash
23630 varunit 0.300
23631 \backslash
23632 varunit
23633 \end_layout
23634
23635 \begin_layout Plain Layout
23636
23637 0.35
23638 \backslash
23639 varunit 0.293
23640 \backslash
23641 varunit
23642 \end_layout
23643
23644 \begin_layout Plain Layout
23645
23646 0.30
23647 \backslash
23648 varunit 0.300
23649 \backslash
23650 varunit
23651 \end_layout
23652
23653 \begin_layout Plain Layout
23654
23655 0.25
23656 \backslash
23657 varunit 0.317
23658 \backslash
23659 varunit
23660 \end_layout
23661
23662 \begin_layout Plain Layout
23663
23664 0.20
23665 \backslash
23666 varunit 0.342
23667 \backslash
23668 varunit
23669 \end_layout
23670
23671 \begin_layout Plain Layout
23672
23673 0.15
23674 \backslash
23675 varunit 0.373
23676 \backslash
23677 varunit
23678 \end_layout
23679
23680 \begin_layout Plain Layout
23681
23682 0.10
23683 \backslash
23684 varunit 0.410
23685 \backslash
23686 varunit
23687 \end_layout
23688
23689 \begin_layout Plain Layout
23690
23691 0.05
23692 \backslash
23693 varunit 0.453
23694 \backslash
23695 varunit
23696 \end_layout
23697
23698 \begin_layout Plain Layout
23699
23700 0.00
23701 \backslash
23702 varunit 0.500
23703 \backslash
23704 varunit
23705 \end_layout
23706
23707 \begin_layout Plain Layout
23708
23709 0.05
23710 \backslash
23711 varunit 0.453
23712 \backslash
23713 varunit
23714 \end_layout
23715
23716 \begin_layout Plain Layout
23717
23718 0.10
23719 \backslash
23720 varunit 0.410
23721 \backslash
23722 varunit
23723 \end_layout
23724
23725 \begin_layout Plain Layout
23726
23727 0.15
23728 \backslash
23729 varunit 0.373
23730 \backslash
23731 varunit
23732 \end_layout
23733
23734 \begin_layout Plain Layout
23735
23736 0.20
23737 \backslash
23738 varunit 0.342
23739 \backslash
23740 varunit
23741 \end_layout
23742
23743 \begin_layout Plain Layout
23744
23745 0.25
23746 \backslash
23747 varunit 0.317
23748 \backslash
23749 varunit
23750 \end_layout
23751
23752 \begin_layout Plain Layout
23753
23754 0.30
23755 \backslash
23756 varunit 0.300
23757 \backslash
23758 varunit
23759 \end_layout
23760
23761 \begin_layout Plain Layout
23762
23763 0.35
23764 \backslash
23765 varunit 0.293
23766 \backslash
23767 varunit
23768 \end_layout
23769
23770 \begin_layout Plain Layout
23771
23772 0.40
23773 \backslash
23774 varunit 0.300
23775 \backslash
23776 varunit
23777 \end_layout
23778
23779 \begin_layout Plain Layout
23780
23781 0.45
23782 \backslash
23783 varunit 0.332
23784 \backslash
23785 varunit
23786 \end_layout
23787
23788 \begin_layout Plain Layout
23789
23790 \end_layout
23791
23792 \end_inset
23793
23794 There are times when the tyranny of rectangular paragraphs must be overthrown.
23795  In such situations, a call to the delightful plain TeX command 
23796 \family typewriter
23797
23798 \backslash
23799 parshape
23800 \family default
23801  is called for.
23802  As you can see, completely arbitrary shapes can be laid out with a suitable
23803  set of line length definitions.
23804  While this parshape may look a bit silly and useless, one could conceive
23805  of situations such as finely tuned dropped capitals, word wrapping around
23806  non-rectangular graphics, etc.
23807  which will benefit from such handcrafting.
23808 \end_layout
23809
23810 \begin_layout Standard
23811 \begin_inset VSpace bigskip
23812 \end_inset
23813
23814
23815 \end_layout
23816
23817 \begin_layout Standard
23818 The syntax is 
23819 \family typewriter
23820
23821 \backslash
23822 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23823  #nindent #nlength
23824 \family default
23825 , where 
23826 \family typewriter
23827 numlines
23828 \family default
23829  is the number of lines of text which define the paragraph.
23830  If there turn out to be fewer lines, the shape is truncated; if there are
23831  more, the excess lines have the same dimensions as the last line of the
23832  definition.
23833  The 
23834 \family typewriter
23835 #nindent
23836 \family default
23837  and 
23838 \family typewriter
23839 #nlength
23840 \family default
23841  entries specify the indentation of the line from the left margin, and the
23842  length of the line as measured from that point.
23843  The shape applies only to the current paragraph; everything is reset to
23844  normal for the next paragraph.
23845 \end_layout
23846
23847 \begin_layout Standard
23848 \begin_inset ERT
23849 status collapsed
23850
23851 \begin_layout Plain Layout
23852
23853
23854 \backslash
23855 end{sloppypar}
23856 \end_layout
23857
23858 \end_inset
23859
23860
23861 \end_layout
23862
23863 \begin_layout Bibliography
23864 \begin_inset CommandInset bibitem
23865 LatexCommand bibitem
23866 key "multicol"
23867
23868 \end_inset
23869
23870 Documentation of the LaTeX-package 
23871 \begin_inset CommandInset href
23872 LatexCommand href
23873 name "multicol"
23874 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23875
23876 \end_inset
23877
23878
23879 \begin_inset Index idx
23880 status collapsed
23881
23882 \begin_layout Plain Layout
23883 LaTeX-packages ! multicol
23884 \end_layout
23885
23886 \end_inset
23887
23888
23889 \end_layout
23890
23891 \end_body
23892 \end_document