]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
check for libertine-type1
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 431
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 1
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_package amsmath 1
105 \use_package amssymb 1
106 \use_package esint 0
107 \use_package mathdots 1
108 \use_package mathtools 0
109 \use_package mhchem 1
110 \use_package undertilde 0
111 \cite_engine basic
112 \cite_engine_type numerical
113 \biblio_style plain
114 \use_bibtopic false
115 \use_indices false
116 \paperorientation portrait
117 \suppress_date false
118 \justification true
119 \use_refstyle 0
120 \notefontcolor #0000ff
121 \index Index
122 \shortcut idx
123 \color #008000
124 \end_index
125 \secnumdepth 3
126 \tocdepth 3
127 \paragraph_separation indent
128 \paragraph_indentation default
129 \quotes_language english
130 \papercolumns 1
131 \papersides 2
132 \paperpagestyle headings
133 \tracking_changes false
134 \output_changes false
135 \html_math_output 0
136 \html_css_as_file 0
137 \html_be_strict true
138 \end_header
139
140 \begin_body
141
142 \begin_layout Title
143 Additional LyX Features
144 \end_layout
145
146 \begin_layout Subtitle
147 Version 2.0.x
148 \end_layout
149
150 \begin_layout Author
151 by the LyX Team
152 \begin_inset Foot
153 status collapsed
154
155 \begin_layout Plain Layout
156 \noindent
157 Principal maintainer of this file is
158 \noun on
159  Richard Heck
160 \noun default
161 .
162  If you have comments or error corrections, please send them to the LyX
163  Documentation mailing list, 
164 \begin_inset Flex Code
165 status collapsed
166
167 \begin_layout Plain Layout
168 \noindent
169 <lyx-docs@lists.lyx.org>
170 \end_layout
171
172 \end_inset
173
174 .
175 \end_layout
176
177 \end_inset
178
179
180 \end_layout
181
182 \begin_layout Standard
183 \begin_inset CommandInset toc
184 LatexCommand tableofcontents
185
186 \end_inset
187
188
189 \end_layout
190
191 \begin_layout Chapter
192 Introduction
193 \end_layout
194
195 \begin_layout Standard
196 This manual is essentially Part II of the 
197 \emph on
198 User's Guide\SpecialChar \@.
199
200 \emph default
201  The reason for separating the two documents is simple: the 
202 \emph on
203 User's Guide
204 \emph default
205  is already quite lengthy, and it contains information on all of the basic
206  features one needs to know in order to prepare most documents.
207  However, the LyX Team has worked to make LyX extensible through various
208  configuration files and external packages.
209  That means that if you want to support the Fizzwizzle LaTeX package, you
210  can create a layout file (or module) for it without having to alter LyX
211  itself.
212  We've already had contributions of several new features this way, and some
213  of them are documented here.
214  There are also some more `advanced' features, such as how to control the
215  presentation of bibliographies and how to work with multi-part documents,
216  that are not covered in the 
217 \emph on
218 User's Guide
219 \emph default
220  and are discussed here.
221 \end_layout
222
223 \begin_layout Standard
224 This manual also documents some special features, like fax support, version
225  control, and SGML support, which require additional software to work properly.
226  There is also a chapter on LyX's support for HTML.
227  And lastly, there's a chapter of LaTeX tools and tips, things you can use
228  to spruce up your documents by directly using the powerful features of
229  LaTeX.
230  After all, LyX 
231 \emph on
232 is
233 \emph default
234  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
235 \end_layout
236
237 \begin_layout Standard
238 If you haven't read the 
239 \emph on
240 Introduction
241 \emph default
242  yet, you are definitely in the wrong manual.
243  The 
244 \emph on
245 Introduction
246 \emph default
247  is the first place to go, since it describes the notation and format of
248  all of the manuals.
249  You should also be thoroughly familiar with the 
250 \emph on
251 User's Guide
252 \emph default
253  and all of the basic features of LyX before attempting to read this one.
254 \end_layout
255
256 \begin_layout Standard
257 Since many of the topics in this manual depend heavily on LyX's interaction
258  with LaTeX, this first chapter covers the inner workings of LyX and how
259  to direct LyX to generate exactly the LaTeX code you want.
260  It is obviously for more seasoned LyX users.
261 \end_layout
262
263 \begin_layout Chapter
264 LyX and LaTeX
265 \end_layout
266
267 \begin_layout Section
268 How LyX Uses LaTeX
269 \end_layout
270
271 \begin_layout Standard
272 This chapter is for both TeX-nicians and the LaTeX-curious.
273  In it, we'll explain how LyX and LaTeX work together to produce printable
274  output.
275  This is the only place in any of the manuals where we assume you know something
276  about LaTeX.
277 \end_layout
278
279 \begin_layout Standard
280 At one time, LyX was called a 
281 \begin_inset Quotes eld
282 \end_inset
283
284 WYSIWYM frontend to LaTeX,
285 \begin_inset Quotes erd
286 \end_inset
287
288  but that's no longer true.
289  There are frontends to LaTeX out there.
290 \begin_inset Foot
291 status collapsed
292
293 \begin_layout Plain Layout
294 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
295  There are also the LaTeX modes for vi and emacs, of course.
296 \end_layout
297
298 \end_inset
299
300  These are basically text editors with the ability to run LaTeX and mark
301  any errors in the file you're editing.
302  Although LyX 
303 \emph on
304 is
305 \emph default
306  an editor, and it 
307 \emph on
308 does
309 \emph default
310  run LaTeX, and it also indicates errors in the file, it also does much,
311  much more.
312  For one thing, you don't need to know LaTeX to use LyX effectively.
313  And LyX has added its own extensions to LaTeX.
314  Try the following sometime: select 
315 \begin_inset Flex MenuItem
316 status collapsed
317
318 \begin_layout Plain Layout
319 Export\SpecialChar \menuseparator
320 LaTeX
321 \end_layout
322
323 \end_inset
324
325  from the 
326 \begin_inset Flex MenuItem
327 status collapsed
328
329 \begin_layout Plain Layout
330 File
331 \end_layout
332
333 \end_inset
334
335  menu (or 
336 \begin_inset Flex MenuItem
337 status collapsed
338
339 \begin_layout Plain Layout
340 View\SpecialChar \menuseparator
341 Source
342 \end_layout
343
344 \end_inset
345
346 ), then look at the preamble of the resulting 
347 \begin_inset Flex Code
348 status collapsed
349
350 \begin_layout Plain Layout
351 .tex
352 \end_layout
353
354 \end_inset
355
356  file.
357  You'll notice a variety of new macros defined specifically by LyX.
358  These macros are defined automatically, according to the features you use
359  in the document.
360 \end_layout
361
362 \begin_layout Standard
363 There are several commands that automatically invoke LaTeX.
364  They are:
365 \end_layout
366
367 \begin_layout Itemize
368 \begin_inset Flex MenuItem
369 status collapsed
370
371 \begin_layout Plain Layout
372 View\SpecialChar \menuseparator
373 View
374 \end_layout
375
376 \end_inset
377
378
379 \end_layout
380
381 \begin_layout Itemize
382 \begin_inset Flex MenuItem
383 status collapsed
384
385 \begin_layout Plain Layout
386 View\SpecialChar \menuseparator
387 Update
388 \end_layout
389
390 \end_inset
391
392
393 \end_layout
394
395 \begin_layout Itemize
396 \begin_inset Flex MenuItem
397 status collapsed
398
399 \begin_layout Plain Layout
400 File\SpecialChar \menuseparator
401 Print
402 \end_layout
403
404 \end_inset
405
406
407 \end_layout
408
409 \begin_layout Itemize
410 \begin_inset Flex MenuItem
411 status collapsed
412
413 \begin_layout Plain Layout
414 File\SpecialChar \menuseparator
415 Fax
416 \end_layout
417
418 \end_inset
419
420
421 \end_layout
422
423 \begin_layout Standard
424 They will only invoke LaTeX if the file has changed since the last time
425  LaTeX was run.
426  
427 \end_layout
428
429 \begin_layout Standard
430 When LyX runs LaTeX on the file you're editing, it performs these steps:
431 \end_layout
432
433 \begin_layout Enumerate
434 Convert the document to LaTeX and save to a file with the extension 
435 \begin_inset Flex Code
436 status collapsed
437
438 \begin_layout Plain Layout
439 .tex
440 \end_layout
441
442 \end_inset
443
444  in place of 
445 \begin_inset Flex Code
446 status collapsed
447
448 \begin_layout Plain Layout
449 .lyx
450 \end_layout
451
452 \end_inset
453
454 .
455 \end_layout
456
457 \begin_layout Enumerate
458 Run LaTeX on the 
459 \begin_inset Flex Code
460 status collapsed
461
462 \begin_layout Plain Layout
463 .tex
464 \end_layout
465
466 \end_inset
467
468  file (maybe several times), and run any other commands (such as 
469 \begin_inset Flex Code
470 status collapsed
471
472 \begin_layout Plain Layout
473 bibtex
474 \end_layout
475
476 \end_inset
477
478  or 
479 \begin_inset Flex Code
480 status collapsed
481
482 \begin_layout Plain Layout
483 makeindex
484 \end_layout
485
486 \end_inset
487
488 ) needed to compile the LaTeX file.
489 \end_layout
490
491 \begin_layout Enumerate
492 If there are any errors, show the error log.
493 \end_layout
494
495 \begin_layout Standard
496 If you have run LaTeX using 
497 \begin_inset Flex MenuItem
498 status collapsed
499
500 \begin_layout Plain Layout
501 View
502 \bar under
503 \SpecialChar \menuseparator
504
505 \bar default
506 DVI
507 \end_layout
508
509 \end_inset
510
511 , LyX then runs a DVI viewer to display the DVI-file.
512  If you have used 
513 \begin_inset Flex MenuItem
514 status collapsed
515
516 \begin_layout Plain Layout
517 View
518 \bar under
519 \SpecialChar \menuseparator
520
521 \bar default
522 PostScript
523 \end_layout
524
525 \end_inset
526
527 , LyX performs further steps:
528 \end_layout
529
530 \begin_layout Itemize
531 Run 
532 \begin_inset Flex Code
533 status collapsed
534
535 \begin_layout Plain Layout
536 dvips
537 \end_layout
538
539 \end_inset
540
541  to convert the DVI file to PostScript.
542 \end_layout
543
544 \begin_layout Itemize
545 Run a PostScript viewer, such as 
546 \begin_inset Flex Code
547 status collapsed
548
549 \begin_layout Plain Layout
550 ghostview
551 \end_layout
552
553 \end_inset
554
555 , to display the PostScript file.
556 \end_layout
557
558 \begin_layout Standard
559 LyX does similar things when viewing, or exporting, other formats.
560 \end_layout
561
562 \begin_layout Section
563 Translating LaTeX files into LyX
564 \end_layout
565
566 \begin_layout Standard
567 You can import a LaTeX file into LyX by using the 
568 \begin_inset Flex MenuItem
569 status collapsed
570
571 \begin_layout Plain Layout
572 File\SpecialChar \menuseparator
573 Import\SpecialChar \menuseparator
574 LaTeX
575 \end_layout
576
577 \end_inset
578
579  command in LyX.
580  This will call a program named 
581 \begin_inset Flex Code
582 status collapsed
583
584 \begin_layout Plain Layout
585 tex2lyx
586 \end_layout
587
588 \end_inset
589
590  which will create a file 
591 \begin_inset Flex Code
592 status collapsed
593
594 \begin_layout Plain Layout
595 foo.lyx
596 \end_layout
597
598 \end_inset
599
600  from the file 
601 \begin_inset Flex Code
602 status collapsed
603
604 \begin_layout Plain Layout
605 foo.tex
606 \end_layout
607
608 \end_inset
609
610 .
611  LyX will then open that file.
612 \begin_inset Foot
613 status collapsed
614
615 \begin_layout Plain Layout
616 \begin_inset Flex Code
617 status collapsed
618
619 \begin_layout Plain Layout
620 tex2lyx
621 \end_layout
622
623 \end_inset
624
625  can also be run from the command line, of course.
626 \end_layout
627
628 \end_inset
629
630
631 \end_layout
632
633 \begin_layout Standard
634 \begin_inset Flex Code
635 status collapsed
636
637 \begin_layout Plain Layout
638 tex2lyx
639 \end_layout
640
641 \end_inset
642
643  will translate most legal LaTeX, but not everything.
644  It will put things it doesn't understand into TeX code, so after translating
645  a file with 
646 \begin_inset Flex Code
647 status collapsed
648
649 \begin_layout Plain Layout
650 tex2lyx
651 \end_layout
652
653 \end_inset
654
655 , you can look for TeX code and hand-edit it until it looks right.
656 \end_layout
657
658 \begin_layout Standard
659 If you don't know what TeX code is, read the next section.
660 \end_layout
661
662 \begin_layout Section
663 \begin_inset CommandInset label
664 LatexCommand label
665 name "sec:Inserting-TeX-Code"
666
667 \end_inset
668
669 Inserting TeX Code into LyX Documents 
670 \end_layout
671
672 \begin_layout Standard
673 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
674  You can always insert TeX code into any LyX document.
675  LyX cannot, and will never be able to, display every possible LaTeX construct.
676  If ever you need to insert LaTeX commands into your LyX document, you can
677  use the 
678 \begin_inset Flex Code
679 status collapsed
680
681 \begin_layout Plain Layout
682 TeX Code
683 \end_layout
684
685 \end_inset
686
687  box, which you can insert into your document with 
688 \begin_inset Flex MenuItem
689 status collapsed
690
691 \begin_layout Plain Layout
692 Insert\SpecialChar \menuseparator
693 TeX Code
694 \end_layout
695
696 \end_inset
697
698  or the keyboard shortcut 
699 \begin_inset Info
700 type  "shortcut"
701 arg   "ert-insert"
702 \end_inset
703
704 .
705 \end_layout
706
707 \begin_layout Standard
708 Here's an example of inserting LaTeX commands in a LyX document.
709  The code looks like this:
710 \end_layout
711
712 \begin_layout LyX-Code
713
714 \backslash
715 begin{tabular}{ll}
716 \begin_inset Newline newline
717 \end_inset
718
719
720 \backslash
721 begin{minipage}{5cm}
722 \begin_inset Newline newline
723 \end_inset
724
725 This is an example of a minipage environment.
726  You 
727 \begin_inset Newline newline
728 \end_inset
729
730 can put nearly everything in it, even (non-floating) 
731 \begin_inset Newline newline
732 \end_inset
733
734 figures and tables.
735  
736 \begin_inset Newline newline
737 \end_inset
738
739
740 \backslash
741 end{minipage}
742 \begin_inset Newline newline
743 \end_inset
744
745 &
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
756 \backslash
757 begin{verbatim}
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 begin{minipage}{5cm}
764 \begin_inset Newline newline
765 \end_inset
766
767 This ...
768  
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{verbatim}
781 \begin_inset Newline newline
782 \end_inset
783
784
785 \backslash
786 end{minipage}
787 \begin_inset Newline newline
788 \end_inset
789
790
791 \backslash
792 end{tabular}
793 \end_layout
794
795 \begin_layout LyX-Code
796
797 \end_layout
798
799 \begin_layout Standard
800 The 
801 \begin_inset Flex Code
802 status collapsed
803
804 \begin_layout Plain Layout
805 TeX Code
806 \end_layout
807
808 \end_inset
809
810  box containing this text is directly after this paragraph.
811  Those of you reading the manual in LyX will only see the TeX code inset.
812  Those reading a printed version of the manuals will see the actual results:
813 \begin_inset VSpace bigskip
814 \end_inset
815
816
817 \end_layout
818
819 \begin_layout Standard
820 \begin_inset ERT
821 status open
822
823 \begin_layout Plain Layout
824
825
826 \backslash
827 begin{tabular}{ll}
828 \end_layout
829
830 \begin_layout Plain Layout
831
832
833 \backslash
834 begin{minipage}{5cm}
835 \end_layout
836
837 \begin_layout Plain Layout
838
839 This is an example of a minipage environment.
840  You can put nearly everything in it, even (non-floating) figures and tables.
841  
842 \end_layout
843
844 \begin_layout Plain Layout
845
846
847 \backslash
848 end{minipage}
849 \end_layout
850
851 \begin_layout Plain Layout
852
853 &
854 \end_layout
855
856 \begin_layout Plain Layout
857
858
859 \backslash
860 begin{minipage}{5cm}
861 \end_layout
862
863 \begin_layout Plain Layout
864
865
866 \backslash
867 begin{verbatim}
868 \end_layout
869
870 \begin_layout Plain Layout
871
872
873 \backslash
874 begin{minipage}{5cm}
875 \end_layout
876
877 \begin_layout Plain Layout
878
879 This ...
880  
881 \end_layout
882
883 \begin_layout Plain Layout
884
885
886 \backslash
887 end{minipage}
888 \end_layout
889
890 \begin_layout Plain Layout
891
892
893 \backslash
894 end{verbatim}
895 \end_layout
896
897 \begin_layout Plain Layout
898
899
900 \backslash
901 end{minipage}
902 \end_layout
903
904 \begin_layout Plain Layout
905
906
907 \backslash
908 end{tabular}
909 \end_layout
910
911 \end_inset
912
913
914 \begin_inset VSpace bigskip
915 \end_inset
916
917
918 \end_layout
919
920 \begin_layout Standard
921 In addition to using TeX code, you can also create a separate file containing
922  some complex LaTeX structure and then use 
923 \begin_inset Flex MenuItem
924 status collapsed
925
926 \begin_layout Plain Layout
927 Insert\SpecialChar \menuseparator
928 Child
929 \begin_inset space ~
930 \end_inset
931
932 Document
933 \end_layout
934
935 \end_inset
936
937  to include your file (you should select the type 
938 \begin_inset Flex Code
939 status collapsed
940
941 \begin_layout Plain Layout
942 Input
943 \end_layout
944
945 \end_inset
946
947 ).
948  We recommend that you only do this if you have a 
949 \begin_inset Flex Code
950 status collapsed
951
952 \begin_layout Plain Layout
953 .tex
954 \end_layout
955
956 \end_inset
957
958  file which you 
959 \emph on
960 know
961 \emph default
962  works already.
963  Otherwise, you'll have a big job tracking down LaTeX errors.
964 \end_layout
965
966 \begin_layout Standard
967 There are a few last points to emphasize:
968 \end_layout
969
970 \begin_layout Itemize
971 LyX 
972 \emph on
973 does not
974 \emph default
975  check if your LaTeX code is correct.
976 \end_layout
977
978 \begin_layout Itemize
979 Beware of reinventing the wheel.
980 \end_layout
981
982 \begin_layout Standard
983 On that last point, LyX does have quite a few features tucked into it, and
984  more are coming.
985  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
986  feature before you decide you have to do it by hand.
987  Moreover, there are numerous LaTeX packages out there to do all sorts of
988  things, from labels to envelopes to fancy multipage tables.
989  Check out 
990 \begin_inset CommandInset href
991 LatexCommand href
992 name "CTAN"
993 target "http://www.ctan.org/"
994
995 \end_inset
996
997  for details.
998 \end_layout
999
1000 \begin_layout Standard
1001 If you do need to do some wild and fancy things within your document, be
1002  sure to check out a good LaTeX book for assistance.
1003  There are a number of them listed in the bibliography of the 
1004 \emph on
1005 User's Guide
1006 \emph default
1007 .
1008 \end_layout
1009
1010 \begin_layout Section
1011 LyX and the LaTeX Preamble
1012 \end_layout
1013
1014 \begin_layout Subsection
1015 About the LaTeX Preamble
1016 \end_layout
1017
1018 \begin_layout Standard
1019 If you already know LaTeX, there is no need to explain here what the preamble
1020  is good for.
1021  If you don't, the following will give you some ideas—we recommend again
1022  that you consult a LaTeX book for further information.
1023  In any case, you should read the points below, because they explain what
1024  you can do and what you don't need to do in the LaTeX preamble of a LyX
1025  document.
1026 \end_layout
1027
1028 \begin_layout Standard
1029 The LaTeX preamble comes at the very beginning of a document, 
1030 \emph on
1031 before
1032 \emph default
1033  the text.
1034  It serves to:
1035 \end_layout
1036
1037 \begin_layout Itemize
1038 Declare the document class.
1039  
1040 \begin_inset Newline newline
1041 \end_inset
1042
1043 LyX already does this for you.
1044  If you're a seasoned LaTeX-nician, and you have a custom document class
1045  you want to use, check out the 
1046 \emph on
1047 Customization Manual
1048 \emph default
1049  for information on how to make LyX interface to it.
1050 \end_layout
1051
1052 \begin_layout Itemize
1053 Declare the usage of packages.
1054  
1055 \begin_inset Newline newline
1056 \end_inset
1057
1058 LaTeX packages provide special commands, which are only available within
1059  a document when the package has been declared in the preamble.
1060  In addition to providing special commands, the inclusion of a package can
1061  change the document.
1062  For example, the package 
1063 \begin_inset Flex Code
1064 status collapsed
1065
1066 \begin_layout Plain Layout
1067 indentfirst
1068 \end_layout
1069
1070 \end_inset
1071
1072  forces all paragraphs to be indented.
1073  There are other packages for labels, envelopes, margins, etc.
1074  
1075 \end_layout
1076
1077 \begin_layout Itemize
1078 Set counters, variables, lengths and widths.
1079  
1080 \begin_inset Newline newline
1081 \end_inset
1082
1083 There are several LaTeX counters and variables that 
1084 \emph on
1085 must
1086 \emph default
1087  be set globally from within the preamble in order to have the desired effect.
1088  (There are variables that you can set and reset inside the document, too.)
1089  Margins are a good example of something that must be set in the preamble.
1090  Another example is the label format for lists.
1091  You can actually set these just about anywhere, but it's best to do it
1092  just once, inside the preamble.
1093 \end_layout
1094
1095 \begin_layout Itemize
1096 Declare user defined commands (with 
1097 \begin_inset Flex Code
1098 status collapsed
1099
1100 \begin_layout Plain Layout
1101
1102 \backslash
1103 newcommand
1104 \end_layout
1105
1106 \end_inset
1107
1108  or 
1109 \begin_inset Flex Code
1110 status collapsed
1111
1112 \begin_layout Plain Layout
1113
1114 \backslash
1115 renewcommand
1116 \end_layout
1117
1118 \end_inset
1119
1120 ).
1121 \begin_inset Newline newline
1122 \end_inset
1123
1124 These are abbreviations for LaTeX commands which appear very often inside
1125  a document.
1126  Although the preamble is a good place to declare such commands, they 
1127 \emph on
1128 can
1129 \emph default
1130  be declared anywhere (before they are used for the first time, of course).
1131  This can be useful if there is a lot of raw LaTeX code in your document,
1132  which normally should not be the case.
1133 \end_layout
1134
1135 \begin_layout Standard
1136 LyX adds its own set of definitions to the preamble of the 
1137 \begin_inset Flex Code
1138 status collapsed
1139
1140 \begin_layout Plain Layout
1141 .tex
1142 \end_layout
1143
1144 \end_inset
1145
1146  file it produces.
1147  This makes LaTeX files generated by LyX portable.
1148 \end_layout
1149
1150 \begin_layout Subsection
1151 Changing the Preamble
1152 \end_layout
1153
1154 \begin_layout Standard
1155 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1156  can't change them without patching LyX itself.
1157  You can, however, add your own stuff to the preamble by selecting 
1158 \begin_inset Flex MenuItem
1159 status collapsed
1160
1161 \begin_layout Plain Layout
1162 LaTeX
1163 \begin_inset space ~
1164 \end_inset
1165
1166 Preamble
1167 \end_layout
1168
1169 \end_inset
1170
1171  in the 
1172 \begin_inset Flex MenuItem
1173 status collapsed
1174
1175 \begin_layout Plain Layout
1176 Document\SpecialChar \menuseparator
1177 Settings
1178 \end_layout
1179
1180 \end_inset
1181
1182  dialog.
1183  LyX adds anything in the 
1184 \begin_inset Flex MenuItem
1185 status collapsed
1186
1187 \begin_layout Plain Layout
1188 Preamble
1189 \end_layout
1190
1191 \end_inset
1192
1193  dialog to its own built-in preamble.
1194  Before adding your own declarations in the preamble, you should make sure
1195  that LyX doesn't already support what you want to do.
1196  (Remember what we said about reinventing the wheel?) Also, 
1197 \emph on
1198 make sure your preamble code is correct
1199 \emph default
1200 .
1201  LyX doesn't check it for you.
1202  If there is an error, you're likely to get an error like 
1203 \begin_inset Quotes eld
1204 \end_inset
1205
1206
1207 \begin_inset Flex Code
1208 status collapsed
1209
1210 \begin_layout Plain Layout
1211 Missing 
1212 \backslash
1213 begin{document}
1214 \end_layout
1215
1216 \end_inset
1217
1218
1219 \begin_inset Quotes erd
1220 \end_inset
1221
1222 .
1223  If you see this error, check your preamble.
1224 \end_layout
1225
1226 \begin_layout Subsection
1227 Examples
1228 \end_layout
1229
1230 \begin_layout Standard
1231 Here are some examples of what you can add to a preamble, and what they
1232  do.
1233 \end_layout
1234
1235 \begin_layout Subsubsection
1236 Example #1: Offsets
1237 \end_layout
1238
1239 \begin_layout Standard
1240 There are two variables under LaTeX that control page position: 
1241 \begin_inset Flex Code
1242 status collapsed
1243
1244 \begin_layout Plain Layout
1245
1246 \backslash
1247 hoffset
1248 \end_layout
1249
1250 \end_inset
1251
1252  and 
1253 \begin_inset Flex Code
1254 status collapsed
1255
1256 \begin_layout Plain Layout
1257
1258 \backslash
1259 voffset
1260 \end_layout
1261
1262 \end_inset
1263
1264 .
1265  Their names should be self-explanatory.
1266  These variables are useful if you think for a moment about computer labels.
1267  Sometimes, the size of a print medium and the area of the medium that you
1268  can actually print on aren't the same.
1269  This is where 
1270 \begin_inset Flex Code
1271 status collapsed
1272
1273 \begin_layout Plain Layout
1274
1275 \backslash
1276 hoffset
1277 \end_layout
1278
1279 \end_inset
1280
1281  and 
1282 \begin_inset Flex Code
1283 status collapsed
1284
1285 \begin_layout Plain Layout
1286
1287 \backslash
1288 voffset
1289 \end_layout
1290
1291 \end_inset
1292
1293  come in.
1294 \end_layout
1295
1296 \begin_layout Standard
1297 The default values for 
1298 \begin_inset Flex Code
1299 status collapsed
1300
1301 \begin_layout Plain Layout
1302
1303 \backslash
1304 hoffset
1305 \end_layout
1306
1307 \end_inset
1308
1309  and 
1310 \begin_inset Flex Code
1311 status collapsed
1312
1313 \begin_layout Plain Layout
1314
1315 \backslash
1316 voffset
1317 \end_layout
1318
1319 \end_inset
1320
1321  are both 0
1322 \begin_inset space \thinspace{}
1323 \end_inset
1324
1325 points, i.
1326 \begin_inset space \thinspace{}
1327 \end_inset
1328
1329 e.
1330 \begin_inset space \space{}
1331 \end_inset
1332
1333 the page isn't shifted.
1334  Unfortunately, some DVI drivers always seem to shift the page.
1335  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1336  If you're using LyX on a system that you don't personally maintain, and
1337  your sysadmin is a doofus, 
1338 \begin_inset Flex Code
1339 status collapsed
1340
1341 \begin_layout Plain Layout
1342
1343 \backslash
1344 hoffset
1345 \end_layout
1346
1347 \end_inset
1348
1349  and 
1350 \begin_inset Flex Code
1351 status collapsed
1352
1353 \begin_layout Plain Layout
1354
1355 \backslash
1356 voffset
1357 \end_layout
1358
1359 \end_inset
1360
1361  can save the day.
1362  Suppose your left and top margins are always 0.5
1363 \begin_inset space \thinspace{}
1364 \end_inset
1365
1366 inches too big.
1367  You can add this to the preamble:
1368 \end_layout
1369
1370 \begin_layout LyX-Code
1371
1372 \backslash
1373 setlength{
1374 \backslash
1375 hoffset}{-0.5 in}
1376 \end_layout
1377
1378 \begin_layout LyX-Code
1379
1380 \backslash
1381 setlength{
1382 \backslash
1383 voffset}{-0.5 in}
1384 \end_layout
1385
1386 \begin_layout Standard
1387 and your margins should now be correct.
1388 \end_layout
1389
1390 \begin_layout Subsubsection
1391 Example #2: Labels
1392 \end_layout
1393
1394 \begin_layout Standard
1395 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1396  There's a rather nice package, available at your nearest CTAN archive,
1397  for printing sheets of labels: 
1398 \begin_inset Flex Code
1399 status collapsed
1400
1401 \begin_layout Plain Layout
1402 labels.sty
1403 \end_layout
1404
1405 \end_inset
1406
1407 .
1408  Now, your system may not have this package installed by default.
1409  We leave that up to you to check.
1410  You'll also want to read the documentation for it; we're not going to do
1411  that for you.
1412  Since this is an example, however, we'll give you an example of how you
1413  use this package.
1414 \end_layout
1415
1416 \begin_layout Standard
1417 First, make sure you're using the 
1418 \begin_inset Flex Code
1419 status collapsed
1420
1421 \begin_layout Plain Layout
1422 article
1423 \end_layout
1424
1425 \end_inset
1426
1427  document class.
1428  Next, you need to put the following in your preamble:
1429 \end_layout
1430
1431 \begin_layout LyX-Code
1432
1433 \backslash
1434 usepackage{labels}
1435 \end_layout
1436
1437 \begin_layout LyX-Code
1438
1439 \backslash
1440 LabelCols=3
1441 \end_layout
1442
1443 \begin_layout LyX-Code
1444
1445 \backslash
1446 LabelRows=7
1447 \end_layout
1448
1449 \begin_layout LyX-Code
1450
1451 \backslash
1452 LeftBorder=8mm
1453 \end_layout
1454
1455 \begin_layout LyX-Code
1456
1457 \backslash
1458 RightBorder=8mm
1459 \end_layout
1460
1461 \begin_layout LyX-Code
1462
1463 \backslash
1464 TopBorder=9mm
1465 \end_layout
1466
1467 \begin_layout LyX-Code
1468
1469 \backslash
1470 BottomBorder=2mm
1471 \end_layout
1472
1473 \begin_layout Standard
1474 This sets things up for Avery label sheets, stock #5360.
1475  You're now ready to print labels, but you'll need to insert LaTeX code,
1476  placing the commands 
1477 \begin_inset Flex Code
1478 status collapsed
1479
1480 \begin_layout Plain Layout
1481
1482 \backslash
1483 begin{labels}
1484 \end_layout
1485
1486 \end_inset
1487
1488  and 
1489 \begin_inset Flex Code
1490 status collapsed
1491
1492 \begin_layout Plain Layout
1493
1494 \backslash
1495 end{labels}
1496 \end_layout
1497
1498 \end_inset
1499
1500  around each label text.
1501  This and other special features of 
1502 \begin_inset Flex Code
1503 status collapsed
1504
1505 \begin_layout Plain Layout
1506 labels.sty
1507 \end_layout
1508
1509 \end_inset
1510
1511  are explained in its documentation.
1512 \end_layout
1513
1514 \begin_layout Standard
1515 Someday, someone may write a LyX layout file to support this package directly.
1516  Maybe that someone is you.
1517 \end_layout
1518
1519 \begin_layout Subsubsection
1520 Example #3: Paragraph Indentation
1521 \end_layout
1522
1523 \begin_layout Standard
1524 Americans are trained to indent the first line of 
1525 \emph on
1526 every
1527 \emph default
1528  paragraph.
1529  As with all of their other weird quirks, most Americans will whine and
1530  moan until they can have their way and indent the first line of all paragraphs.
1531  (Yes, we're joking.
1532  (We are?) 
1533 \emph on
1534 Yeah
1535 \emph default
1536 , we are.)
1537 \end_layout
1538
1539 \begin_layout Standard
1540 Of course, this behavior isn't standard typography.
1541  In books, you typically only indent the first line of a paragraph 
1542 \emph on
1543 if
1544 \emph default
1545  it follows another one.
1546  The idea behind indenting the first line of a paragraph is to distinguish
1547  neighboring paragraphs from one another.
1548  If there is no previous paragraph—for example, if it follows a figure or
1549  is the first paragraph in a section—then there is no need for indentation.
1550  
1551 \end_layout
1552
1553 \begin_layout Standard
1554 If you're a typical American (we're still joking!), though, you don't care
1555  about such esoteric things; you want your indentation! Add this to the
1556  preamble:
1557 \end_layout
1558
1559 \begin_layout LyX-Code
1560
1561 \backslash
1562 usepackage{indentfirst}
1563 \end_layout
1564
1565 \begin_layout Standard
1566 If your TeX distribution isn't braindead, you'll have this package, and
1567  all of your paragraphs will get the indentation the Founding Fathers intended
1568  they should have.
1569 \end_layout
1570
1571 \begin_layout Subsubsection
1572 Example #4: This Document
1573 \end_layout
1574
1575 \begin_layout Standard
1576 You can also check out the preamble of this document to get an idea of some
1577  of the advanced things you can do.
1578 \end_layout
1579
1580 \begin_layout Section
1581 LyX and LaTeX Errors
1582 \end_layout
1583
1584 \begin_layout Standard
1585 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1586  going.
1587  It then uses the logfile from the LaTeX run to do a post-mortem.
1588  After analyzing the logfile, LyX displays a dialog listing the errors.
1589  Clicking on any one of them will take you to the position in your LyX file
1590  where the error occurred.
1591 \begin_inset Foot
1592 status collapsed
1593
1594 \begin_layout Plain Layout
1595 Well, usually.
1596  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1597  right line.
1598  There are also cases where LaTeX reports the error on one line, but the
1599  actual error is earlier.
1600  This is not unlike forgetting a closing brace in a program: You'll get
1601  an error, but only later.
1602 \end_layout
1603
1604 \end_inset
1605
1606
1607 \end_layout
1608
1609 \begin_layout Standard
1610 Some folks also like to look at the log file directly: It is available from
1611  
1612 \begin_inset Flex MenuItem
1613 status collapsed
1614
1615 \begin_layout Plain Layout
1616 Document
1617 \bar under
1618 \SpecialChar \menuseparator
1619
1620 \bar default
1621 Latex
1622 \begin_inset space ~
1623 \end_inset
1624
1625 Log
1626 \end_layout
1627
1628 \end_inset
1629
1630 .
1631  There are some fairly common error messages and warnings.
1632  We'll cover those here.
1633  You should look at a good LaTeX book for a complete listing.
1634 \end_layout
1635
1636 \begin_layout Itemize
1637 \begin_inset Flex Code
1638 status collapsed
1639
1640 \begin_layout Plain Layout
1641 LaTeX Warning
1642 \end_layout
1643
1644 \end_inset
1645
1646
1647 \begin_inset Newline newline
1648 \end_inset
1649
1650 Anything beginning with these words is a warning message for the purpose
1651  of 
1652 \begin_inset Quotes eld
1653 \end_inset
1654
1655 debugging
1656 \begin_inset Quotes erd
1657 \end_inset
1658
1659  the LaTeX code itself.
1660  You'll get messages like this if you added or changed cross-references
1661  or bibliography entries, in which case, LaTeX is trying to tell you that
1662  you need to make another run.
1663  You can by-and-large ignore these.
1664 \end_layout
1665
1666 \begin_layout Itemize
1667 \begin_inset Flex Code
1668 status collapsed
1669
1670 \begin_layout Plain Layout
1671 LaTeX Font Warning
1672 \end_layout
1673
1674 \end_inset
1675
1676
1677 \begin_inset Newline newline
1678 \end_inset
1679
1680 Another warning message, this time about fonts which LaTeX couldn't find.
1681  The rest of the message will often say something about a replacement font
1682  that LaTeX used.
1683  You can safely ignore these, too.
1684 \end_layout
1685
1686 \begin_layout Itemize
1687 \begin_inset Flex Code
1688 status collapsed
1689
1690 \begin_layout Plain Layout
1691 Overfull 
1692 \backslash
1693 hbox
1694 \end_layout
1695
1696 \end_inset
1697
1698
1699 \begin_inset Newline newline
1700 \end_inset
1701
1702 LaTeX absolutely 
1703 \emph on
1704 loves
1705 \emph default
1706  to spew these out.
1707  They are warnings about lines that were too long and run past the right
1708  margin.
1709  Almost always, this is unnoticeable in the final output.
1710  (It can be just a point or two.) Or, only one or two characters extend past
1711  the margin.
1712  LaTeX seems to generate at least one of these messages for just about any
1713  document you write.
1714 \begin_inset Newline newline
1715 \end_inset
1716
1717 You can ignore these messages.
1718  Your eyes will tell you if there's a problem with something that's too
1719  wide; just look at the output.
1720 \begin_inset Foot
1721 status collapsed
1722
1723 \begin_layout Plain Layout
1724 You can also enable the `draft' option in 
1725 \begin_inset Flex MenuItem
1726 status collapsed
1727
1728 \begin_layout Plain Layout
1729 Document
1730 \bar under
1731 \SpecialChar \menuseparator
1732
1733 \bar default
1734 Settings
1735 \end_layout
1736
1737 \end_inset
1738
1739 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1740 \end_layout
1741
1742 \end_inset
1743
1744
1745 \end_layout
1746
1747 \begin_layout Itemize
1748 \begin_inset Flex Code
1749 status collapsed
1750
1751 \begin_layout Plain Layout
1752 Underfull 
1753 \backslash
1754 hbox
1755 \end_layout
1756
1757 \end_inset
1758
1759
1760 \begin_inset Newline newline
1761 \end_inset
1762
1763 Not quite as common as its cousin.
1764  LaTeX seems to like to print lines that are a bit too wide as opposed to
1765  ones that are a bit too narrow.
1766  We have no idea why.
1767 \end_layout
1768
1769 \begin_layout Itemize
1770 \begin_inset Flex Code
1771 status collapsed
1772
1773 \begin_layout Plain Layout
1774 Overfull 
1775 \backslash
1776 vbox
1777 \end_layout
1778
1779 \end_inset
1780
1781  and 
1782 \begin_inset Flex Code
1783 status collapsed
1784
1785 \begin_layout Plain Layout
1786 Underfull 
1787 \backslash
1788 vbox
1789 \end_layout
1790
1791 \end_inset
1792
1793
1794 \begin_inset Newline newline
1795 \end_inset
1796
1797 Warnings about troubles breaking the page.
1798  Once again, just look at the output.
1799  Your eyes will tell you where something has gone wrong.
1800 \end_layout
1801
1802 \begin_layout Itemize
1803 \begin_inset Flex Code
1804 status collapsed
1805
1806 \begin_layout Plain Layout
1807 LaTeX Error: File 
1808 \begin_inset Quotes els
1809 \end_inset
1810
1811 Xxxx
1812 \begin_inset Quotes ers
1813 \end_inset
1814
1815  not found
1816 \end_layout
1817
1818 \end_inset
1819
1820
1821 \begin_inset Newline newline
1822 \end_inset
1823
1824 The file 
1825 \begin_inset Quotes eld
1826 \end_inset
1827
1828 Xxxx
1829 \begin_inset Quotes erd
1830 \end_inset
1831
1832  isn't installed on this system.
1833  This usually appears because some package your document needs isn't installed.
1834  If you didn't touch the preamble or didn't use the 
1835 \begin_inset Flex Code
1836 status collapsed
1837
1838 \begin_layout Plain Layout
1839
1840 \backslash
1841 usepackage{}
1842 \end_layout
1843
1844 \end_inset
1845
1846  command, then one of the packages LyX tried to load is missing.
1847  Use 
1848 \begin_inset Flex MenuItem
1849 status collapsed
1850
1851 \begin_layout Plain Layout
1852 Help\SpecialChar \menuseparator
1853 LaTeX Configuration
1854 \end_layout
1855
1856 \end_inset
1857
1858  to get a list of packages that LyX knows about.
1859  This file is updated whenever you reconfigure LyX (using 
1860 \begin_inset Flex MenuItem
1861 status collapsed
1862
1863 \begin_layout Plain Layout
1864 Tools\SpecialChar \menuseparator
1865 Reconfigure
1866 \end_layout
1867
1868 \end_inset
1869
1870 ) and tells you which packages have been detected and what they do.
1871 \begin_inset Newline newline
1872 \end_inset
1873
1874 If you did use the 
1875 \begin_inset Flex Code
1876 status collapsed
1877
1878 \begin_layout Plain Layout
1879
1880 \backslash
1881 usepackage{}
1882 \end_layout
1883
1884 \end_inset
1885
1886  command and the package in question isn't installed, then you'll need to
1887  install it yourself.
1888 \end_layout
1889
1890 \begin_layout Itemize
1891 \begin_inset Flex Code
1892 status collapsed
1893
1894 \begin_layout Plain Layout
1895 LaTeX Error: Unknown option
1896 \end_layout
1897
1898 \end_inset
1899
1900
1901 \begin_inset Newline newline
1902 \end_inset
1903
1904 Error messages beginning with this are trying to tell you that you specified
1905  a bad or undefined option to a package.
1906  Check the package's documentation.
1907 \end_layout
1908
1909 \begin_layout Itemize
1910 \begin_inset Flex Code
1911 status collapsed
1912
1913 \begin_layout Plain Layout
1914 Undefined control sequence
1915 \end_layout
1916
1917 \end_inset
1918
1919
1920 \begin_inset Newline newline
1921 \end_inset
1922
1923 If you've inserted LaTeX code into your document, but made a typo, you'll
1924  get one of these.
1925  You may have forgotten to load a package.
1926  In any case, this error message usually means that you used an undefined
1927  command.
1928  
1929 \end_layout
1930
1931 \begin_layout Standard
1932 There are other error and warning messages.
1933  Some are self-explanatory.
1934  These are usually LaTeX messages.
1935  Others are downright cryptic.
1936  These are usually TeX error messages, and we really have 
1937 \emph on
1938 no clue
1939 \emph default
1940  what they mean or how to decipher them.
1941  No-one does.
1942 \end_layout
1943
1944 \begin_layout Standard
1945 There's a general sequence you should follow if you get error messages:
1946 \end_layout
1947
1948 \begin_layout Enumerate
1949 Look at the LaTeX code you inserted for typos.
1950 \end_layout
1951
1952 \begin_layout Enumerate
1953 If there are no typos, check that you used the command(s) correctly.
1954 \end_layout
1955
1956 \begin_layout Enumerate
1957 If you get a bunch of error boxes piled up at the very top of the document—and
1958  especially if you see a 
1959 \begin_inset Quotes eld
1960 \end_inset
1961
1962
1963 \begin_inset Flex Code
1964 status collapsed
1965
1966 \begin_layout Plain Layout
1967 Missing 
1968 \backslash
1969 begin{document}
1970 \end_layout
1971
1972 \end_inset
1973
1974
1975 \begin_inset Quotes erd
1976 \end_inset
1977
1978  error—it means that there are errors in the preamble.
1979  Start debugging your preamble.
1980 \end_layout
1981
1982 \begin_layout Enumerate
1983 If you didn't add anything to the preamble and didn't add any LaTeX code
1984  to the document, the first suspect is your LaTeX distribution itself.
1985  Check for missing packages and install them.
1986 \end_layout
1987
1988 \begin_layout Enumerate
1989 Okay, so there are no missing packages.
1990  Did you use any of the fine-tuning options in LyX? Specifically, did you
1991  
1992 \emph on
1993 misuse
1994 \emph default
1995  any of them, like trying to manually insert lots of 
1996 \begin_inset Flex Code
1997 status collapsed
1998
1999 \begin_layout Plain Layout
2000 Protected
2001 \begin_inset space ~
2002 \end_inset
2003
2004 Blanks
2005 \end_layout
2006
2007 \end_inset
2008
2009
2010 \begin_inset Flex Code
2011 status collapsed
2012
2013 \begin_layout Plain Layout
2014 Linebreaks
2015 \end_layout
2016
2017 \end_inset
2018
2019 , or 
2020 \begin_inset Flex Code
2021 status collapsed
2022
2023 \begin_layout Plain Layout
2024 Pagebreaks
2025 \end_layout
2026
2027 \end_inset
2028
2029 ? Did you try to kludge something together with these instead of using the
2030  appropriate paragraph environment?
2031 \end_layout
2032
2033 \begin_layout Enumerate
2034 All right, you didn't use any of the fine-tuning options, you played by
2035  the rules.
2036  Did you try to pull a fancy maneuver? Did you do something funky inside
2037  a table or an equation, like inserting a graphic into a table cell?
2038 \end_layout
2039
2040 \begin_layout Enumerate
2041 Do you have long sections of text where LaTeX cannot find a place to break
2042  a line? By default, LaTeX is rather strict about how much extra inter-word
2043  spacing it will add in order to break a line.
2044  Preferably, you should rework the paragraph to avoid the problem.
2045  If this isn't an option, you can wrap your text in 
2046 \begin_inset Flex Code
2047 status collapsed
2048
2049 \begin_layout Plain Layout
2050
2051 \backslash
2052 sloppypar
2053 \end_layout
2054
2055 \end_inset
2056
2057  to make LaTeX's line breaking more, well, sloppy.
2058 \end_layout
2059
2060 \begin_layout Enumerate
2061 Did you go overboard with the nesting? LyX (currently) doesn't check to
2062  make sure you're in the limits for nesting environments.
2063  If you nested a bunch of environments to the 
2064 \begin_inset Formula $17^{\mathrm{th}}$
2065 \end_inset
2066
2067  level, that's the problem.
2068  (The limit in LaTeX is five.)
2069 \end_layout
2070
2071 \begin_layout Enumerate
2072 Okay, you didn't get any error messages, but your output looks awful.
2073  If you have a table or figure that's too wide or long for the page, you
2074  need to:
2075 \end_layout
2076
2077 \begin_deeper
2078 \begin_layout Enumerate
2079 rescale the figure so it fits.
2080 \end_layout
2081
2082 \begin_layout Enumerate
2083 trim down the table so it fits.
2084 \end_layout
2085
2086 \end_deeper
2087 \begin_layout Enumerate
2088 If something else is wrong with the output, and you didn't try to pull anything
2089  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2090 \end_layout
2091
2092 \begin_layout Standard
2093 If all this doesn't help—well, then 
2094 \emph on
2095 perhaps
2096 \emph default
2097  you might have found a bug in LyX\SpecialChar \ldots{}
2098 .
2099 \end_layout
2100
2101 \begin_layout Chapter
2102 Supplemental Tools
2103 \end_layout
2104
2105 \begin_layout Section
2106 Customizing Bibliographies with BibTeX
2107 \end_layout
2108
2109 \begin_layout Standard
2110 The most basic information about how to use BibTeX with LyX is contained
2111  in the section 
2112 \emph on
2113 Bibliography databases (BibTeX)
2114 \emph default
2115  of the 
2116 \emph on
2117 User's Guide
2118 \emph default
2119 .
2120  The following subsections explain special bibliography features supported
2121  by LyX.
2122 \end_layout
2123
2124 \begin_layout Subsection
2125 Alternative Citation Styles
2126 \end_layout
2127
2128 \begin_layout Standard
2129 Standard BibTeX uses numbers (e.
2130 \begin_inset space \thinspace{}
2131 \end_inset
2132
2133 g.
2134 \begin_inset space \space{}
2135 \end_inset
2136
2137
2138 \begin_inset Quotes eld
2139 \end_inset
2140
2141 [12]
2142 \begin_inset Quotes erd
2143 \end_inset
2144
2145 ) to refer to a cited work.
2146  However, in many scientific disciplines, other citation styles are in use.
2147  The most common one is the author-year style (e.
2148 \begin_inset space \thinspace{}
2149 \end_inset
2150
2151 g.
2152 \begin_inset space \space{}
2153 \end_inset
2154
2155
2156 \begin_inset Quotes eld
2157 \end_inset
2158
2159 Knuth 1984a
2160 \begin_inset Quotes erd
2161 \end_inset
2162
2163 ).
2164  LyX supports two packages that provide this style, 
2165 \begin_inset Flex Code
2166 status collapsed
2167
2168 \begin_layout Plain Layout
2169 natbib
2170 \end_layout
2171
2172 \end_inset
2173
2174  and 
2175 \begin_inset Flex Code
2176 status collapsed
2177
2178 \begin_layout Plain Layout
2179 jurabib
2180 \end_layout
2181
2182 \end_inset
2183
2184 .
2185  Both packages have their pros and cons, which cannot be listed in detail.
2186  If you only want to have simple author-year (or author-numerical) style,
2187  or if you want to use one of the countless style files for 
2188 \begin_inset Flex Code
2189 status collapsed
2190
2191 \begin_layout Plain Layout
2192 natbib
2193 \end_layout
2194
2195 \end_inset
2196
2197 , then the established 
2198 \begin_inset Flex Code
2199 status collapsed
2200
2201 \begin_layout Plain Layout
2202 natbib
2203 \end_layout
2204
2205 \end_inset
2206
2207  package is probably your choice.
2208  If you need special features like short title references, ibidem etc., you
2209  might consider the 
2210 \begin_inset Flex Code
2211 status collapsed
2212
2213 \begin_layout Plain Layout
2214 jurabib
2215 \end_layout
2216
2217 \end_inset
2218
2219  package.
2220 \end_layout
2221
2222 \begin_layout Standard
2223 The handling of both packages in LyX is basically the same.
2224  Go to 
2225 \begin_inset Flex MenuItem
2226 status collapsed
2227
2228 \begin_layout Plain Layout
2229 Document\SpecialChar \menuseparator
2230 Settings
2231 \end_layout
2232
2233 \end_inset
2234
2235  and select under 
2236 \begin_inset Flex MenuItem
2237 status collapsed
2238
2239 \begin_layout Plain Layout
2240 Bibliography
2241 \end_layout
2242
2243 \end_inset
2244
2245  the option 
2246 \begin_inset Flex MenuItem
2247 status collapsed
2248
2249 \begin_layout Plain Layout
2250 Natbib
2251 \end_layout
2252
2253 \end_inset
2254
2255  or 
2256 \begin_inset Flex MenuItem
2257 status collapsed
2258
2259 \begin_layout Plain Layout
2260 Jurabib
2261 \end_layout
2262
2263 \end_inset
2264
2265 .
2266  With both packages, you will get some extra features in the citation dialog
2267  and you can select the style of the reference (
2268 \begin_inset Quotes eld
2269 \end_inset
2270
2271 Knuth 1984
2272 \begin_inset Quotes erd
2273 \end_inset
2274
2275
2276 \begin_inset Quotes eld
2277 \end_inset
2278
2279 Knuth (1984)
2280 \begin_inset Quotes erd
2281 \end_inset
2282
2283
2284 \begin_inset Quotes eld
2285 \end_inset
2286
2287 Knuth, 1984
2288 \begin_inset Quotes erd
2289 \end_inset
2290
2291
2292 \begin_inset Quotes eld
2293 \end_inset
2294
2295 1984
2296 \begin_inset Quotes erd
2297 \end_inset
2298
2299  etc.).
2300  Note that both packages need specifically designed style files.
2301  They both ship their own, but there are lots of additional style files,
2302  and there is even an interactive style file builder
2303 \begin_inset Foot
2304 status collapsed
2305
2306 \begin_layout Plain Layout
2307 See 
2308 \begin_inset Flex URL
2309 status open
2310
2311 \begin_layout Plain Layout
2312
2313 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2314 \end_layout
2315
2316 \end_inset
2317
2318
2319 \end_layout
2320
2321 \end_inset
2322
2323  for 
2324 \begin_inset Flex Code
2325 status collapsed
2326
2327 \begin_layout Plain Layout
2328 natbib
2329 \end_layout
2330
2331 \end_inset
2332
2333 .
2334 \end_layout
2335
2336 \begin_layout Subsection
2337 Sectioned Bibliographies
2338 \end_layout
2339
2340 \begin_layout Standard
2341 Sometimes you might need to divide your bibliography into several sections.
2342  If you are for instance a historian, the possibility to separate sources
2343  and scientific works is most likely a 
2344 \begin_inset Quotes eld
2345 \end_inset
2346
2347 must have
2348 \begin_inset Quotes erd
2349 \end_inset
2350
2351 .
2352  Unfortunately, BibTeX itself does not allow you to do this.
2353  But with the help of some LaTeX packages, BibTeX can be extended to fit
2354  your needs.
2355 \end_layout
2356
2357 \begin_layout Standard
2358 LyX provides native support for one of these packages, 
2359 \family typewriter
2360 bibtopic
2361 \family default
2362 .
2363 \begin_inset Foot
2364 status collapsed
2365
2366 \begin_layout Plain Layout
2367 Available from 
2368 \begin_inset Flex URL
2369 status open
2370
2371 \begin_layout Plain Layout
2372
2373 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2374 \end_layout
2375
2376 \end_inset
2377
2378
2379 \end_layout
2380
2381 \end_inset
2382
2383  The advantage of this package (compared to other packages like 
2384 \family typewriter
2385 multibib
2386 \family default
2387 ) is that you don't need to define new citation commands.
2388  Instead, you need to prepare different bibliographic databases which include
2389  the entries for the different sections of the bibliography.
2390  For example: If you want to divide your bibliography into the sections
2391  
2392 \begin_inset Quotes eld
2393 \end_inset
2394
2395 Sources
2396 \begin_inset Quotes erd
2397 \end_inset
2398
2399  and 
2400 \begin_inset Quotes eld
2401 \end_inset
2402
2403 Scientific works
2404 \begin_inset Quotes erd
2405 \end_inset
2406
2407 , you first need to create two bibliographic databases, e.
2408 \begin_inset space \thinspace{}
2409 \end_inset
2410
2411 g.
2412 \begin_inset space \space{}
2413 \end_inset
2414
2415
2416 \begin_inset Flex Code
2417 status collapsed
2418
2419 \begin_layout Plain Layout
2420 sources.bib
2421 \end_layout
2422
2423 \end_inset
2424
2425  and 
2426 \begin_inset Flex Code
2427 status collapsed
2428
2429 \begin_layout Plain Layout
2430 scientific.bib
2431 \end_layout
2432
2433 \end_inset
2434
2435 .
2436  
2437 \end_layout
2438
2439 \begin_layout Standard
2440 Go to 
2441 \begin_inset Flex MenuItem
2442 status collapsed
2443
2444 \begin_layout Plain Layout
2445 Document\SpecialChar \menuseparator
2446 Settings
2447 \end_layout
2448
2449 \end_inset
2450
2451  and check under 
2452 \begin_inset Flex MenuItem
2453 status collapsed
2454
2455 \begin_layout Plain Layout
2456 Bibliography
2457 \end_layout
2458
2459 \end_inset
2460
2461  the option 
2462 \begin_inset Flex MenuItem
2463 status collapsed
2464
2465 \begin_layout Plain Layout
2466 Sectioned bibliography
2467 \end_layout
2468
2469 \end_inset
2470
2471 .
2472  Now you can insert multiple BibTeX bibliographies, one for each section
2473  of your bibliography.
2474  Returning to our example: Insert the BibTeX bibliography 
2475 \begin_inset Flex Code
2476 status collapsed
2477
2478 \begin_layout Plain Layout
2479 sources.bib
2480 \end_layout
2481
2482 \end_inset
2483
2484  and a second one for the database 
2485 \begin_inset Flex Code
2486 status collapsed
2487
2488 \begin_layout Plain Layout
2489 scientific.bib
2490 \end_layout
2491
2492 \end_inset
2493
2494 .
2495  You are free to use the same or different styles for each section.
2496  Additionally, you can choose if the bibliography section should contain
2497  
2498 \begin_inset Quotes eld
2499 \end_inset
2500
2501 all cited references
2502 \begin_inset Quotes erd
2503 \end_inset
2504
2505  of the specified database(s) (which is the default), 
2506 \begin_inset Quotes eld
2507 \end_inset
2508
2509 all uncited references
2510 \begin_inset Quotes erd
2511 \end_inset
2512
2513  or even 
2514 \begin_inset Quotes eld
2515 \end_inset
2516
2517 all references
2518 \begin_inset Quotes erd
2519 \end_inset
2520
2521 .
2522  This might be useful if you would like to separate your bibliography into
2523  three sections: 
2524 \begin_inset Quotes eld
2525 \end_inset
2526
2527 Cited sources
2528 \begin_inset Quotes erd
2529 \end_inset
2530
2531
2532 \begin_inset Quotes eld
2533 \end_inset
2534
2535 Uncited sources
2536 \begin_inset Quotes erd
2537 \end_inset
2538
2539 , and 
2540 \begin_inset Quotes eld
2541 \end_inset
2542
2543 Scientific works
2544 \begin_inset Quotes erd
2545 \end_inset
2546
2547 .
2548  The titles for the sections can be added as ordinary sections or subsections.
2549  Since 
2550 \begin_inset Flex Code
2551 status collapsed
2552
2553 \begin_layout Plain Layout
2554 bibtopic
2555 \end_layout
2556
2557 \end_inset
2558
2559  removes the bibliography title, you have to manually re-add that, too (as
2560  a chapter* or section*, for instance).
2561 \end_layout
2562
2563 \begin_layout Subsection
2564 Multiple Bibliographies
2565 \end_layout
2566
2567 \begin_layout Standard
2568 Multiple bibliographies, e.
2569 \begin_inset space \thinspace{}
2570 \end_inset
2571
2572 g.
2573 \begin_inset space \space{}
2574 \end_inset
2575
2576 a bibliography for each section or chapter of the document, are not supported
2577  by BibTeX itself.
2578  But the 
2579 \begin_inset Flex Code
2580 status collapsed
2581
2582 \begin_layout Plain Layout
2583 bibtopic
2584 \end_layout
2585
2586 \end_inset
2587
2588  package, which is used for the creation of sectioned bibliographies in
2589  LyX (see the previous section), provides an easy way to solve this task,
2590  if you are willing to use some 
2591 \begin_inset Flex MenuItem
2592 status collapsed
2593
2594 \begin_layout Plain Layout
2595 TeX Code
2596 \end_layout
2597
2598 \end_inset
2599
2600  (see section
2601 \begin_inset space ~
2602 \end_inset
2603
2604
2605 \begin_inset CommandInset ref
2606 LatexCommand ref
2607 reference "sec:Inserting-TeX-Code"
2608
2609 \end_inset
2610
2611 ).
2612 \begin_inset Foot
2613 status collapsed
2614
2615 \begin_layout Plain Layout
2616 An alternative approach is to use the 
2617 \begin_inset Flex Code
2618 status collapsed
2619
2620 \begin_layout Plain Layout
2621 chapterbib
2622 \end_layout
2623
2624 \end_inset
2625
2626  or 
2627 \begin_inset Flex Code
2628 status collapsed
2629
2630 \begin_layout Plain Layout
2631 bibunits
2632 \end_layout
2633
2634 \end_inset
2635
2636  package, respectively.
2637 \end_layout
2638
2639 \end_inset
2640
2641
2642 \end_layout
2643
2644 \begin_layout Standard
2645 First go to 
2646 \begin_inset Flex MenuItem
2647 status collapsed
2648
2649 \begin_layout Plain Layout
2650 Document\SpecialChar \menuseparator
2651 Settings
2652 \end_layout
2653
2654 \end_inset
2655
2656  and under 
2657 \begin_inset Flex MenuItem
2658 status collapsed
2659
2660 \begin_layout Plain Layout
2661 Bibliography
2662 \end_layout
2663
2664 \end_inset
2665
2666  check 
2667 \begin_inset Flex MenuItem
2668 status collapsed
2669
2670 \begin_layout Plain Layout
2671 Sectioned bibliography
2672 \end_layout
2673
2674 \end_inset
2675
2676 .
2677  In the document, you have to enclose the sections, which shall contain
2678  their own bibliography (including the BibTeX bibliography itself), between
2679  
2680 \begin_inset Flex Code
2681 status collapsed
2682
2683 \begin_layout Plain Layout
2684
2685 \backslash
2686 begin{btUnit}
2687 \end_layout
2688
2689 \end_inset
2690
2691  and 
2692 \begin_inset Flex Code
2693 status collapsed
2694
2695 \begin_layout Plain Layout
2696
2697 \backslash
2698 end{btUnit}
2699 \end_layout
2700
2701 \end_inset
2702
2703  (those commands have to be inserted as TeX code).
2704  The bibliography will contain all references that have been cited in the
2705  current 
2706 \begin_inset Flex Code
2707 status collapsed
2708
2709 \begin_layout Plain Layout
2710 btUnit
2711 \end_layout
2712
2713 \end_inset
2714
2715 .
2716  
2717 \series bold
2718 Note:
2719 \series default
2720  If you are using this approach, then every citation reference has to be
2721  inside some 
2722 \begin_inset Flex Code
2723 status collapsed
2724
2725 \begin_layout Plain Layout
2726 btUnit
2727 \end_layout
2728
2729 \end_inset
2730
2731 .
2732  Also, the 
2733 \begin_inset Flex Code
2734 status collapsed
2735
2736 \begin_layout Plain Layout
2737 btUnit
2738 \end_layout
2739
2740 \end_inset
2741
2742 s cannot be nested.
2743 \end_layout
2744
2745 \begin_layout Section
2746 Multipart Documents
2747 \end_layout
2748
2749 \begin_layout Subsection
2750 General Operation
2751 \end_layout
2752
2753 \begin_layout Standard
2754 When you are working on a large file with many sections, it is often convenient
2755  to break up the document into several files, or perhaps you have something
2756  where a table may change from time to time, but the preceding text does
2757  not.
2758  In these cases, you should seriously consider using multipart documents.
2759  For example, scientific papers often have five major sections: the introduction
2760 , observations, results, discussion, and conclusion.
2761  Each of these could be its own separate LyX file, with one 
2762 \begin_inset Quotes eld
2763 \end_inset
2764
2765 master
2766 \begin_inset Quotes erd
2767 \end_inset
2768
2769  file which contains the title, authors, abstract, references, etc., plus
2770  the five included files.
2771  It is important to note that each of these files is a full LyX file which
2772  can be formatted and printed on its own, as well as included in a master
2773  file.
2774  Each of these files must have the same document class, however—don't attempt
2775  to mix book classes with article classes.
2776  You may also include LaTeX files; however, these files must not have their
2777  own preamble (i.
2778 \begin_inset space \thinspace{}
2779 \end_inset
2780
2781 e.
2782 \begin_inset space \space{}
2783 \end_inset
2784
2785 everything up to and including the 
2786 \begin_inset Flex Code
2787 status collapsed
2788
2789 \begin_layout Plain Layout
2790
2791 \backslash
2792 begin{document}
2793 \end_layout
2794
2795 \end_inset
2796
2797  line as well as the 
2798 \begin_inset Flex Code
2799 status collapsed
2800
2801 \begin_layout Plain Layout
2802
2803 \backslash
2804 end{document}
2805 \end_layout
2806
2807 \end_inset
2808
2809  line must be deleted) or else errors will be generated when you try to
2810  make a DVI file.
2811 \end_layout
2812
2813 \begin_layout Standard
2814 LyX allows you to include files quite easily with 
2815 \begin_inset Flex MenuItem
2816 status collapsed
2817
2818 \begin_layout Plain Layout
2819 Insert\SpecialChar \menuseparator
2820 ChiId
2821 \begin_inset space ~
2822 \end_inset
2823
2824 Document
2825 \end_layout
2826
2827 \end_inset
2828
2829 .
2830  When you click on this selection a small box is inserted into the file
2831  at the current cursor location.
2832  Clicking on the box raises a dialog which allows you to select the file
2833  to be included, and the method of its inclusion.
2834  
2835 \end_layout
2836
2837 \begin_layout Standard
2838 The file selection box should by now be obvious.
2839  The three inclusion methods are 
2840 \begin_inset Quotes eld
2841 \end_inset
2842
2843 include
2844 \begin_inset Quotes erd
2845 \end_inset
2846
2847
2848 \begin_inset Quotes eld
2849 \end_inset
2850
2851 input
2852 \begin_inset Quotes erd
2853 \end_inset
2854
2855 , and 
2856 \begin_inset Quotes eld
2857 \end_inset
2858
2859 verbatim
2860 \begin_inset Quotes erd
2861 \end_inset
2862
2863 .
2864  The difference between 
2865 \begin_inset Quotes eld
2866 \end_inset
2867
2868 include
2869 \begin_inset Quotes erd
2870 \end_inset
2871
2872  and 
2873 \begin_inset Quotes eld
2874 \end_inset
2875
2876 input
2877 \begin_inset Quotes erd
2878 \end_inset
2879
2880  is really only meaningful to LaTeXperts, but the practical difference is
2881  that files that are 
2882 \begin_inset Quotes eld
2883 \end_inset
2884
2885 included
2886 \begin_inset Quotes erd
2887 \end_inset
2888
2889  are typeset beginning on a new page, while files that are 
2890 \begin_inset Quotes eld
2891 \end_inset
2892
2893 inputted
2894 \begin_inset Quotes erd
2895 \end_inset
2896
2897  are typeset starting on the current page.
2898 \end_layout
2899
2900 \begin_layout Standard
2901 Generally, the master file is converted into a full LaTeX file before typesettin
2902 g, while the included files are converted to LaTeX files that do not have
2903  all the preamble information.
2904 \end_layout
2905
2906 \begin_layout Standard
2907
2908 \begin_inset Quotes eld
2909 \end_inset
2910
2911 verbatim
2912 \begin_inset Quotes erd
2913 \end_inset
2914
2915  included file allows you to include a file typeset exactly as it appears
2916  in the file, i.
2917 \begin_inset space \thinspace{}
2918 \end_inset
2919
2920 e.
2921 \begin_inset space \space{}
2922 \end_inset
2923
2924 in 
2925 \begin_inset Flex Code
2926 status collapsed
2927
2928 \begin_layout Plain Layout
2929 verbatim
2930 \end_layout
2931
2932 \end_inset
2933
2934  mode, with the characters set in a fixed-width typewriter font.
2935  Normally, spaces in this file are invisible, though two consecutive spaces
2936  are conserved, unlike LyX's normal treatment of spaces.
2937  However, setting the 
2938 \begin_inset Flex MenuItem
2939 status collapsed
2940
2941 \begin_layout Plain Layout
2942 Mark
2943 \begin_inset space ~
2944 \end_inset
2945
2946 spaces
2947 \begin_inset space ~
2948 \end_inset
2949
2950 in
2951 \begin_inset space ~
2952 \end_inset
2953
2954 output
2955 \end_layout
2956
2957 \end_inset
2958
2959  checkbox typesets a mark to unambiguously define the presence of a space.
2960  
2961 \end_layout
2962
2963 \begin_layout Subsection
2964 Cross-References Between Files
2965 \end_layout
2966
2967 \begin_layout Standard
2968 \begin_inset Box Shadowbox
2969 position "t"
2970 hor_pos "c"
2971 has_inner_box 1
2972 inner_pos "t"
2973 use_parbox 0
2974 use_makebox 0
2975 width "100col%"
2976 special "none"
2977 height "1in"
2978 height_special "totalheight"
2979 status open
2980
2981 \begin_layout Plain Layout
2982 This section is somewhat out of date.
2983  Need to describe default master documents and how children are opened when
2984  the master is.
2985  [[FIXME]]
2986 \end_layout
2987
2988 \end_inset
2989
2990
2991 \end_layout
2992
2993 \begin_layout Standard
2994 It is possible to set up cross-references between the different files.
2995  First, open all the files in question: let's call them A and B in a two
2996  file example, where B is included in A.
2997  Let's say you insert a label in A, then want to reference it in B.
2998  Open the cross-reference dialog whilst in document B, and you can select
2999  the 
3000 \begin_inset Quotes eld
3001 \end_inset
3002
3003 buffer
3004 \begin_inset Quotes erd
3005 \end_inset
3006
3007  to use.
3008 \end_layout
3009
3010 \begin_layout Subsection
3011 Bibliography Lists in all Subdocuments
3012 \end_layout
3013
3014 \begin_layout Standard
3015 \begin_inset Box Frameless
3016 position "t"
3017 hor_pos "c"
3018 has_inner_box 1
3019 inner_pos "t"
3020 use_parbox 0
3021 use_makebox 0
3022 width "100col%"
3023 special "none"
3024 height "1in"
3025 height_special "totalheight"
3026 status open
3027
3028 \begin_layout Plain Layout
3029 This section also needs updating.
3030  There is now material about this on the wiki, and it could be copied here.
3031 \end_layout
3032
3033 \end_inset
3034
3035
3036 \end_layout
3037
3038 \begin_layout Standard
3039 Copy the bibliography list with all entries to all subdocuments and transform
3040  them to a comment.
3041  This way LyX will find the 
3042 \begin_inset Flex Code
3043 status collapsed
3044
3045 \begin_layout Plain Layout
3046 .bib
3047 \end_layout
3048
3049 \end_inset
3050
3051 -files and you can easily insert references without making the bibliography
3052  list visible.
3053 \end_layout
3054
3055 \begin_layout Standard
3056 As the bibliography list is in a comment, LaTeX won't use use it and the
3057  references will look like this: [?], instead of like this: [1].
3058  One solution is to use the LaTeX-package 
3059 \begin_inset Flex Code
3060 status collapsed
3061
3062 \begin_layout Plain Layout
3063 comment
3064 \end_layout
3065
3066 \end_inset
3067
3068  that will only include comments by processing the files separately.
3069  To do this, add in the LaTeX preamble of every subdocument the following:
3070 \end_layout
3071
3072 \begin_layout LyX-Code
3073
3074 \backslash
3075 usepackage{comment}
3076 \end_layout
3077
3078 \begin_layout LyX-Code
3079
3080 \backslash
3081 includecomment{comment}
3082 \end_layout
3083
3084 \begin_layout Standard
3085 See also 
3086 \begin_inset Flex URL
3087 status collapsed
3088
3089 \begin_layout Plain Layout
3090
3091 http://wiki.lyx.org/FAQ/Unsorted#toc31
3092 \end_layout
3093
3094 \end_inset
3095
3096 .
3097 \end_layout
3098
3099 \begin_layout Section
3100 LyX Archives
3101 \end_layout
3102
3103 \begin_layout Standard
3104 Users sometimes need to be able to 
3105 \begin_inset Quotes eld
3106 \end_inset
3107
3108 bundle
3109 \begin_inset Quotes erd
3110 \end_inset
3111
3112  a LyX file together with all the images (and other files) on which it depends,
3113  either for sending to a publisher or for sharing with a co-author.
3114  LyX 2.0 includes a Python script (
3115 \begin_inset Flex Code
3116 status collapsed
3117
3118 \begin_layout Plain Layout
3119 lyxpak.py
3120 \end_layout
3121
3122 \end_inset
3123
3124 ) that automates this process.
3125  To use it, you must have either the 
3126 \begin_inset Flex Code
3127 status collapsed
3128
3129 \begin_layout Plain Layout
3130 zipfile
3131 \end_layout
3132
3133 \end_inset
3134
3135  or 
3136 \begin_inset Flex Code
3137 status collapsed
3138
3139 \begin_layout Plain Layout
3140 tarfile
3141 \end_layout
3142
3143 \end_inset
3144
3145  python modules installed on your system.
3146  By default, the script prefers the 
3147 \begin_inset Flex Code
3148 status collapsed
3149
3150 \begin_layout Plain Layout
3151 gzip
3152 \end_layout
3153
3154 \end_inset
3155
3156 -compressed 
3157 \begin_inset Flex Code
3158 status collapsed
3159
3160 \begin_layout Plain Layout
3161 tar
3162 \end_layout
3163
3164 \end_inset
3165
3166  format on Unix-like systems and the 
3167 \begin_inset Flex Code
3168 status collapsed
3169
3170 \begin_layout Plain Layout
3171 zip
3172 \end_layout
3173
3174 \end_inset
3175
3176  format on Windows.
3177 \end_layout
3178
3179 \begin_layout Standard
3180 LyX's configuration process will set the script up to export a `LyX Archive',
3181  and this format will then be available under 
3182 \begin_inset Flex Code
3183 status collapsed
3184
3185 \begin_layout Plain Layout
3186 File\SpecialChar \menuseparator
3187 Export
3188 \end_layout
3189
3190 \end_inset
3191
3192 .
3193 \end_layout
3194
3195 \begin_layout Standard
3196 Independently of the platform, the generation of a particular archive format
3197  can be forced by adding either the 
3198 \begin_inset Flex Code
3199 status collapsed
3200
3201 \begin_layout Plain Layout
3202 -t
3203 \end_layout
3204
3205 \end_inset
3206
3207  (for the 
3208 \begin_inset Flex Code
3209 status collapsed
3210
3211 \begin_layout Plain Layout
3212 tar
3213 \end_layout
3214
3215 \end_inset
3216
3217  format) or 
3218 \begin_inset Flex Code
3219 status collapsed
3220
3221 \begin_layout Plain Layout
3222 -z
3223 \end_layout
3224
3225 \end_inset
3226
3227  (for the 
3228 \begin_inset Flex Code
3229 status collapsed
3230
3231 \begin_layout Plain Layout
3232 zip
3233 \end_layout
3234
3235 \end_inset
3236
3237  format) switch to the 
3238 \begin_inset Flex Code
3239 status collapsed
3240
3241 \begin_layout Plain Layout
3242 LyX\SpecialChar \menuseparator
3243 LyX Archive
3244 \end_layout
3245
3246 \end_inset
3247
3248  converter in 
3249 \begin_inset Flex Code
3250 status collapsed
3251
3252 \begin_layout Plain Layout
3253 Tools\SpecialChar \menuseparator
3254 Preferences\SpecialChar \menuseparator
3255 File Handling\SpecialChar \menuseparator
3256 Converters
3257 \end_layout
3258
3259 \end_inset
3260
3261 .
3262  (Make sure you add the switch after the script name, not before it.)
3263 \end_layout
3264
3265 \begin_layout Section
3266 Fancy Headers and Footers
3267 \end_layout
3268
3269 \begin_layout Standard
3270 The default page layout is rather plain; for an 
3271 \begin_inset Flex Code
3272 status collapsed
3273
3274 \begin_layout Plain Layout
3275 article
3276 \end_layout
3277
3278 \end_inset
3279
3280  document class, all you get is a centered page number at the bottom of
3281  the page.
3282  This document uses KOMA-script's book class, so it appears to be a bit
3283  fancier.
3284  But to really put on a show, you need to set the document page style to
3285  
3286 \begin_inset Quotes eld
3287 \end_inset
3288
3289 fancy
3290 \begin_inset Quotes erd
3291 \end_inset
3292
3293 , as mentioned in the 
3294 \emph on
3295 User Guide
3296 \emph default
3297 .
3298  This section describes the LaTeX code you need to insert in your LaTeX
3299  preamble in order to get the desired effects.
3300 \end_layout
3301
3302 \begin_layout Standard
3303 For more information on fancy headers, see the 
3304 \begin_inset Flex Code
3305 status collapsed
3306
3307 \begin_layout Plain Layout
3308 fancyhdr
3309 \end_layout
3310
3311 \end_inset
3312
3313  package documentation.
3314  (
3315 \begin_inset Flex URL
3316 status collapsed
3317
3318 \begin_layout Plain Layout
3319
3320 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3321 \end_layout
3322
3323 \end_inset
3324
3325 )
3326 \end_layout
3327
3328 \begin_layout Standard
3329 The page header is divided into three fields, not surprisingly labeled 
3330 \begin_inset Quotes eld
3331 \end_inset
3332
3333 left
3334 \begin_inset Quotes erd
3335 \end_inset
3336
3337
3338 \begin_inset Quotes eld
3339 \end_inset
3340
3341 center
3342 \begin_inset Quotes erd
3343 \end_inset
3344
3345 , and 
3346 \begin_inset Quotes eld
3347 \end_inset
3348
3349 right
3350 \begin_inset Quotes erd
3351 \end_inset
3352
3353 .
3354  The footer is also divided into these three fields.
3355  The LaTeX commands to set these fields in the simplest manner are 
3356 \begin_inset Flex Code
3357 status collapsed
3358
3359 \begin_layout Plain Layout
3360
3361 \backslash
3362 lhead
3363 \end_layout
3364
3365 \end_inset
3366
3367
3368 \begin_inset Flex Code
3369 status collapsed
3370
3371 \begin_layout Plain Layout
3372
3373 \backslash
3374 chead
3375 \end_layout
3376
3377 \end_inset
3378
3379
3380 \begin_inset Flex Code
3381 status collapsed
3382
3383 \begin_layout Plain Layout
3384
3385 \backslash
3386 rhead
3387 \end_layout
3388
3389 \end_inset
3390
3391
3392 \begin_inset Flex Code
3393 status collapsed
3394
3395 \begin_layout Plain Layout
3396
3397 \backslash
3398 lfoot
3399 \end_layout
3400
3401 \end_inset
3402
3403 , etc.
3404  Suppose you wish to put your name in the upper left hand corner of each
3405  page.
3406  Simply insert the following command in the preamble: 
3407 \end_layout
3408
3409 \begin_layout Standard
3410
3411 \family typewriter
3412
3413 \backslash
3414 lhead{John Q.
3415  DocWriter}
3416 \end_layout
3417
3418 \begin_layout Standard
3419 You will now see your name in the upper left.
3420  If a field has a default entry that you would like to get rid of (often
3421  the page number appears in the central footer) simply include a command
3422  with a blank argument, e.
3423 \begin_inset space \thinspace{}
3424 \end_inset
3425
3426 g.:
3427 \end_layout
3428
3429 \begin_layout Standard
3430
3431 \family typewriter
3432
3433 \backslash
3434 cfoot{}
3435 \end_layout
3436
3437 \begin_layout Standard
3438 Let's get really fancy: lets put the section number with the word 
3439 \begin_inset Quotes eld
3440 \end_inset
3441
3442 Section
3443 \begin_inset Quotes erd
3444 \end_inset
3445
3446  (e.
3447 \begin_inset space \thinspace{}
3448 \end_inset
3449
3450 g.
3451 \begin_inset space \space{}
3452 \end_inset
3453
3454 Section 3) in the upper left, the page number (e.
3455 \begin_inset space \thinspace{}
3456 \end_inset
3457
3458 g.
3459 \begin_inset space \space{}
3460 \end_inset
3461
3462 Page 4) in the upper right, your name in the lower left, and the date in
3463  the lower right.
3464  The following commands should now appear in the preamble:
3465 \end_layout
3466
3467 \begin_layout Standard
3468
3469 \family typewriter
3470
3471 \backslash
3472 lhead{Section 
3473 \backslash
3474 thesection}
3475 \end_layout
3476
3477 \begin_layout Standard
3478
3479 \family typewriter
3480
3481 \backslash
3482 chead{}
3483 \end_layout
3484
3485 \begin_layout Standard
3486
3487 \family typewriter
3488
3489 \backslash
3490 rhead{Page 
3491 \backslash
3492 thepage}
3493 \end_layout
3494
3495 \begin_layout Standard
3496
3497 \family typewriter
3498
3499 \backslash
3500 lfoot{John Q.
3501  DocWriter}
3502 \end_layout
3503
3504 \begin_layout Standard
3505
3506 \family typewriter
3507
3508 \backslash
3509 cfoot{}
3510 \end_layout
3511
3512 \begin_layout Standard
3513
3514 \family typewriter
3515
3516 \backslash
3517 rfoot{
3518 \backslash
3519 today}
3520 \end_layout
3521
3522 \begin_layout Standard
3523 The commands 
3524 \begin_inset Flex Code
3525 status collapsed
3526
3527 \begin_layout Plain Layout
3528
3529 \backslash
3530 thesection
3531 \end_layout
3532
3533 \end_inset
3534
3535  and 
3536 \begin_inset Flex Code
3537 status collapsed
3538
3539 \begin_layout Plain Layout
3540
3541 \backslash
3542 thepage
3543 \end_layout
3544
3545 \end_inset
3546
3547  access LaTeX's section and page counters, and so print out the current
3548  section and page numbers.
3549  
3550 \begin_inset Flex Code
3551 status collapsed
3552
3553 \begin_layout Plain Layout
3554
3555 \backslash
3556 today
3557 \end_layout
3558
3559 \end_inset
3560
3561  simply prints out today's date.
3562 \end_layout
3563
3564 \begin_layout Standard
3565 The thicknesses of the horizontal rules drawn beneath the header and above
3566  the footer can also be modified.
3567  If you don't want one of the rules, set its thickness to 0.
3568  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3569  Use commands
3570 \family typewriter
3571  
3572 \family default
3573 like 
3574 \begin_inset Flex Code
3575 status collapsed
3576
3577 \begin_layout Plain Layout
3578
3579 \backslash
3580 renewcommand{
3581 \backslash
3582 headrulewidth}{0.4pt}
3583 \end_layout
3584
3585 \end_inset
3586
3587  and 
3588 \begin_inset Flex Code
3589 status collapsed
3590
3591 \begin_layout Plain Layout
3592
3593 \backslash
3594 renewcommand{
3595 \backslash
3596 footrulewidth}{0.4pt}
3597 \end_layout
3598
3599 \end_inset
3600
3601  to set the thicknesses.
3602 \end_layout
3603
3604 \begin_layout Standard
3605 You can switch the header/footer settings on and off for individual pages
3606  using commands like 
3607 \begin_inset Flex Code
3608 status collapsed
3609
3610 \begin_layout Plain Layout
3611
3612 \backslash
3613 thispagestyle{empty}
3614 \end_layout
3615
3616 \end_inset
3617
3618
3619 \begin_inset Flex Code
3620 status collapsed
3621
3622 \begin_layout Plain Layout
3623
3624 \backslash
3625 thispagestyle{plain}
3626 \end_layout
3627
3628 \end_inset
3629
3630 , and 
3631 \begin_inset Flex Code
3632 status collapsed
3633
3634 \begin_layout Plain Layout
3635
3636 \backslash
3637 thispagestyle{fancy}
3638 \end_layout
3639
3640 \end_inset
3641
3642 .
3643  Simply insert them in the text on the page you want changed and mark them
3644  as TeX code.
3645  In fact, title pages are marked as plain by default, while following pages
3646  are marked fancy when using the global fancy setting.
3647 \end_layout
3648
3649 \begin_layout Standard
3650 As a final example, it is possible to include an image in the header or
3651  footer.
3652  Suppose you want to put a company logo in the upper lefthand corner.
3653  You might try something like
3654 \end_layout
3655
3656 \begin_layout Standard
3657
3658 \family typewriter
3659
3660 \backslash
3661 lhead{
3662 \backslash
3663 resizebox{1in}{!}{
3664 \backslash
3665 includegraphics{logo.eps}}}
3666 \end_layout
3667
3668 \begin_layout Standard
3669 \noindent
3670 (you may need to preface this with 
3671 \begin_inset Flex Code
3672 status collapsed
3673
3674 \begin_layout Plain Layout
3675 \noindent
3676
3677 \backslash
3678 usepackage{graphics}
3679 \end_layout
3680
3681 \end_inset
3682
3683  if you don't include graphics elsewhere in your document).
3684 \end_layout
3685
3686 \begin_layout Section
3687 Itemize Bullet Selection
3688 \begin_inset CommandInset label
3689 LatexCommand label
3690 name "sec:bullet"
3691
3692 \end_inset
3693
3694
3695 \end_layout
3696
3697 \begin_layout Standard
3698 by
3699 \noun on
3700  Allan Rae
3701 \end_layout
3702
3703 \begin_layout Subsection
3704 Introduction
3705 \end_layout
3706
3707 \begin_layout Standard
3708 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3709  Using this dialog you can easily specify what bullet shape to use at each
3710  level of an itemized list.
3711  These settings are document-wide so you won't be able to specify different
3712  sets of bullets for different paragraphs.
3713 \begin_inset Foot
3714 status collapsed
3715
3716 \begin_layout Plain Layout
3717 Well, actually you can but you'll have to do it by hand.
3718 \end_layout
3719
3720 \end_inset
3721
3722
3723 \end_layout
3724
3725 \begin_layout Subsection
3726 How it looks
3727 \end_layout
3728
3729 \begin_layout Standard
3730 Open the dialog by selecting the 
3731 \begin_inset Flex MenuItem
3732 status collapsed
3733
3734 \begin_layout Plain Layout
3735 Document\SpecialChar \menuseparator
3736 Settings
3737 \end_layout
3738
3739 \end_inset
3740
3741  menu item and then select the 
3742 \begin_inset Flex MenuItem
3743 status collapsed
3744
3745 \begin_layout Plain Layout
3746 Bullets
3747 \end_layout
3748
3749 \end_inset
3750
3751  tab.
3752 \end_layout
3753
3754 \begin_layout Standard
3755 The dialog provides you with a table of bullet shapes.
3756  A column of buttons on the left of the table provides access to the six
3757  different panels of bullet shapes.
3758  The row of buttons across the top is used to select which bullet depth
3759  you are changing.
3760  A text entry under the table shows the currently selected bullet shape's
3761  LaTeX equivalent and this can be edited if desired.
3762  If you do modify the text you will also need to specify any needed packages
3763  in the LaTeX preamble.
3764 \end_layout
3765
3766 \begin_layout Standard
3767 The six panels are divided up by the packages they require.
3768  The following table shows the mappings from button name to LaTeX package.
3769 \end_layout
3770
3771 \begin_layout Standard
3772 \align center
3773 \begin_inset Tabular
3774 <lyxtabular version="3" rows="7" columns="2">
3775 <features rotate="0" tabularvalignment="middle">
3776 <column alignment="center" valignment="top" width="0pt">
3777 <column alignment="center" valignment="top" width="0pt">
3778 <row>
3779 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3780 \begin_inset Text
3781
3782 \begin_layout Plain Layout
3783
3784 \family roman
3785 \series medium
3786 \shape up
3787 \size normal
3788 \emph off
3789 \bar no
3790 \noun off
3791 \color none
3792 Button
3793 \end_layout
3794
3795 \end_inset
3796 </cell>
3797 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3798 \begin_inset Text
3799
3800 \begin_layout Plain Layout
3801
3802 \family roman
3803 \series medium
3804 \shape up
3805 \size normal
3806 \emph off
3807 \bar no
3808 \noun off
3809 \color none
3810 Packages Required
3811 \end_layout
3812
3813 \end_inset
3814 </cell>
3815 </row>
3816 <row>
3817 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3818 \begin_inset Text
3819
3820 \begin_layout Plain Layout
3821
3822 \family sans
3823 \series medium
3824 \shape up
3825 \size normal
3826 \emph off
3827 \bar no
3828 \noun off
3829 \color none
3830 Standard
3831 \end_layout
3832
3833 \end_inset
3834 </cell>
3835 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3836 \begin_inset Text
3837
3838 \begin_layout Plain Layout
3839
3840 \series medium
3841 \shape up
3842 \size normal
3843 \emph off
3844 \bar no
3845 \noun off
3846 \color none
3847 base LaTeX
3848 \end_layout
3849
3850 \end_inset
3851 </cell>
3852 </row>
3853 <row>
3854 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3855 \begin_inset Text
3856
3857 \begin_layout Plain Layout
3858
3859 \family sans
3860 \series medium
3861 \shape up
3862 \size normal
3863 \emph off
3864 \bar no
3865 \noun off
3866 \color none
3867 Maths
3868 \end_layout
3869
3870 \end_inset
3871 </cell>
3872 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3873 \begin_inset Text
3874
3875 \begin_layout Plain Layout
3876
3877 \family typewriter
3878 \series medium
3879 \shape up
3880 \size normal
3881 \emph off
3882 \bar no
3883 \noun off
3884 \color none
3885 amssymb.sty
3886 \end_layout
3887
3888 \end_inset
3889 </cell>
3890 </row>
3891 <row>
3892 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3893 \begin_inset Text
3894
3895 \begin_layout Plain Layout
3896
3897 \family sans
3898 \series medium
3899 \shape up
3900 \size normal
3901 \emph off
3902 \bar no
3903 \noun off
3904 \color none
3905 Ding1
3906 \end_layout
3907
3908 \end_inset
3909 </cell>
3910 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3911 \begin_inset Text
3912
3913 \begin_layout Plain Layout
3914
3915 \family typewriter
3916 \series medium
3917 \shape up
3918 \size normal
3919 \emph off
3920 \bar no
3921 \noun off
3922 \color none
3923 pifont.sty
3924 \end_layout
3925
3926 \end_inset
3927 </cell>
3928 </row>
3929 <row>
3930 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3931 \begin_inset Text
3932
3933 \begin_layout Plain Layout
3934
3935 \family sans
3936 \series medium
3937 \shape up
3938 \size normal
3939 \emph off
3940 \bar no
3941 \noun off
3942 \color none
3943 Ding2
3944 \end_layout
3945
3946 \end_inset
3947 </cell>
3948 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3949 \begin_inset Text
3950
3951 \begin_layout Plain Layout
3952
3953 \family typewriter
3954 \series medium
3955 \shape up
3956 \size normal
3957 \emph off
3958 \bar no
3959 \noun off
3960 \color none
3961 pifont.sty
3962 \end_layout
3963
3964 \end_inset
3965 </cell>
3966 </row>
3967 <row>
3968 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3969 \begin_inset Text
3970
3971 \begin_layout Plain Layout
3972
3973 \family sans
3974 \series medium
3975 \shape up
3976 \size normal
3977 \emph off
3978 \bar no
3979 \noun off
3980 \color none
3981 Ding3
3982 \end_layout
3983
3984 \end_inset
3985 </cell>
3986 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3987 \begin_inset Text
3988
3989 \begin_layout Plain Layout
3990
3991 \family typewriter
3992 \series medium
3993 \shape up
3994 \size normal
3995 \emph off
3996 \bar no
3997 \noun off
3998 \color none
3999 pifont.sty
4000 \end_layout
4001
4002 \end_inset
4003 </cell>
4004 </row>
4005 <row>
4006 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4007 \begin_inset Text
4008
4009 \begin_layout Plain Layout
4010
4011 \family sans
4012 \series medium
4013 \shape up
4014 \size normal
4015 \emph off
4016 \bar no
4017 \noun off
4018 \color none
4019 Ding4
4020 \end_layout
4021
4022 \end_inset
4023 </cell>
4024 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4025 \begin_inset Text
4026
4027 \begin_layout Plain Layout
4028
4029 \family typewriter
4030 \series medium
4031 \shape up
4032 \size normal
4033 \emph off
4034 \bar no
4035 \noun off
4036 \color none
4037 pifont.sty
4038 \end_layout
4039
4040 \end_inset
4041 </cell>
4042 </row>
4043 </lyxtabular>
4044
4045 \end_inset
4046
4047
4048 \end_layout
4049
4050 \begin_layout Standard
4051 LyX doesn't stop you using bullets from packages you don't have.
4052  If you get errors from LaTeX when you try to view or print the file, then
4053  it is likely you are missing a package.
4054 \begin_inset Foot
4055 status collapsed
4056
4057 \begin_layout Plain Layout
4058 LyX doesn't restrict your use since you may be editing locally and exporting
4059  elsewhere.
4060 \end_layout
4061
4062 \end_inset
4063
4064
4065 \end_layout
4066
4067 \begin_layout Subsection
4068 How to use it
4069 \end_layout
4070
4071 \begin_layout Standard
4072 Select which bullet depth you want to change then select the bullet shape
4073  and size.
4074  Any changes will not be visible in LyX, but are visible when viewing the
4075  document.
4076 \end_layout
4077
4078 \begin_layout Standard
4079 You can reset a bullet shape to the default simply by clicking your right
4080  mouse button on the appropriate bullet depth button.
4081 \begin_inset Foot
4082 status collapsed
4083
4084 \begin_layout Plain Layout
4085 If you 
4086 \emph on
4087 really
4088 \emph default
4089  want to have multiple sets of paragraphs with different sets of bullets
4090  in each, then you're going to have to get your hands dirty with TeX code.
4091  The bullet selection dialog can help though because it provides you with
4092  the LaTeX code for a wide range of bullet shapes.
4093  To make your own custom paragraphs you have the following options:
4094 \end_layout
4095
4096 \begin_layout Plain Layout
4097 \begin_inset ERT
4098 status open
4099
4100 \begin_layout Plain Layout
4101
4102
4103 \backslash
4104 let
4105 \backslash
4106 savelabelitemi=
4107 \backslash
4108 labelitemi
4109 \end_layout
4110
4111 \end_inset
4112
4113
4114 \end_layout
4115
4116 \begin_layout Plain Layout
4117 \begin_inset ERT
4118 status open
4119
4120 \begin_layout Plain Layout
4121
4122
4123 \backslash
4124 renewcommand
4125 \backslash
4126 labelitemi[0]{
4127 \backslash
4128 small
4129 \backslash
4130 (
4131 \backslash
4132 sharp
4133 \backslash
4134 )}
4135 \end_layout
4136
4137 \end_inset
4138
4139
4140 \end_layout
4141
4142 \begin_layout Itemize
4143 Use the LaTeX command 
4144 \begin_inset Flex Code
4145 status collapsed
4146
4147 \begin_layout Plain Layout
4148
4149 \backslash
4150 renewcommand{}{}
4151 \end_layout
4152
4153 \end_inset
4154
4155  to specify a new bullet shape for a given depth.
4156  You'll also need to save the current bullet shape so you can restore it
4157  again afterwards.
4158  In this itemized list the following LaTeX code was used to change the bullet
4159  used for the first depth.
4160 \end_layout
4161
4162 \begin_deeper
4163 \begin_layout LyX-Code
4164
4165 \backslash
4166 let
4167 \backslash
4168 savelabelitemi=
4169 \backslash
4170 labelitemi 
4171 \end_layout
4172
4173 \begin_layout LyX-Code
4174
4175 \backslash
4176 renewcommand
4177 \backslash
4178 labelitemi[0]{
4179 \backslash
4180 small
4181 \backslash
4182 (
4183 \backslash
4184 sharp
4185 \backslash
4186 )}
4187 \end_layout
4188
4189 \end_deeper
4190 \begin_layout Itemize
4191 Note that the itemize depth is specified in Roman numerals as part of the
4192  
4193 \family typewriter
4194
4195 \backslash
4196 labelitem
4197 \family default
4198  command.
4199 \end_layout
4200
4201 \begin_layout Itemize
4202 \begin_inset ERT
4203 status open
4204
4205 \begin_layout Plain Layout
4206
4207 [
4208 \backslash
4209 (
4210 \backslash
4211 star
4212 \backslash
4213 )]
4214 \end_layout
4215
4216 \end_inset
4217
4218  Specify each individual entry by starting each item with the bullet shape
4219  enclosed in square brackets and set as 
4220 \begin_inset Flex MenuItem
4221 status collapsed
4222
4223 \begin_layout Plain Layout
4224 TeX Code
4225 \end_layout
4226
4227 \end_inset
4228
4229 .
4230  For example, this item was started with 
4231 \begin_inset Flex Code
4232 status collapsed
4233
4234 \begin_layout Plain Layout
4235 [
4236 \backslash
4237 (
4238 \backslash
4239 star
4240 \backslash
4241 )]
4242 \end_layout
4243
4244 \end_inset
4245
4246 .
4247 \end_layout
4248
4249 \begin_layout Plain Layout
4250 \begin_inset ERT
4251 status open
4252
4253 \begin_layout Plain Layout
4254
4255
4256 \backslash
4257 renewcommand
4258 \backslash
4259 labelitemi[0]{
4260 \backslash
4261 savelabelitemi}
4262 \end_layout
4263
4264 \end_inset
4265
4266
4267 \end_layout
4268
4269 \begin_layout Plain Layout
4270 You'll also need to revert the labelitem back to its previous setting for
4271  the global bullet shape settings to remain in effect.
4272  The way used here was:
4273 \end_layout
4274
4275 \begin_layout LyX-Code
4276
4277 \backslash
4278 renewcommand
4279 \backslash
4280 labelitemi[0]{
4281 \backslash
4282 savelabelitemi}
4283 \end_layout
4284
4285 \end_inset
4286
4287
4288 \end_layout
4289
4290 \begin_layout Chapter
4291 LyX and the World Wide Web
4292 \end_layout
4293
4294 \begin_layout Standard
4295 LyX has long supported the export of documents to various web-friendly formats,
4296  such as HTML.
4297  Before verson 2.0, however, HTML export was always accomplished by the use
4298  of external converters.
4299 \begin_inset Foot
4300 status collapsed
4301
4302 \begin_layout Plain Layout
4303 For details on the use of external converters with LyX, see the 
4304 \emph on
4305 Converters
4306 \emph default
4307  section of the Customization manual.
4308 \end_layout
4309
4310 \end_inset
4311
4312  These fall into two large groups: there are converters that use LaTeX as
4313  an intermediate format, such as 
4314 \begin_inset Flex Code
4315 status collapsed
4316
4317 \begin_layout Plain Layout
4318 htlatex
4319 \end_layout
4320
4321 \end_inset
4322
4323
4324 \begin_inset Flex Code
4325 status collapsed
4326
4327 \begin_layout Plain Layout
4328 html2latex
4329 \end_layout
4330
4331 \end_inset
4332
4333 , and 
4334 \begin_inset Flex Code
4335 status collapsed
4336
4337 \begin_layout Plain Layout
4338 plastex
4339 \end_layout
4340
4341 \end_inset
4342
4343 , relying upon LyX to produce the LaTeX; and there is a converter that works
4344  directly on LyX files, 
4345 \begin_inset Flex Code
4346 status collapsed
4347
4348 \begin_layout Plain Layout
4349 eLyXer
4350 \end_layout
4351
4352 \end_inset
4353
4354 .
4355  All of these have different advantages and disadvantages.
4356  
4357 \end_layout
4358
4359 \begin_layout Standard
4360 The LaTeX-based converters have the advantage that, in principle, they know
4361  everything about the exported document that LaTeX does.
4362  Such converters do not care, for example, if a certain block of code was
4363  produced by LyX or was Evil Red Text.
4364  These converters know about 
4365 \begin_inset Flex Code
4366 status collapsed
4367
4368 \begin_layout Plain Layout
4369 aux
4370 \end_layout
4371
4372 \end_inset
4373
4374  files, counters, and references, and can often make use of the 
4375 \begin_inset Flex Code
4376 status collapsed
4377
4378 \begin_layout Plain Layout
4379 bbl
4380 \end_layout
4381
4382 \end_inset
4383
4384  files generated by BibTeX.
4385  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4386  said that only TeX itself understands TeX---and LaTeX-based converters
4387  will often choke on what seem to be quite simple constructs; complex ones
4388  can throw them completely, and as of this writing, for example, the 
4389 \emph on
4390 Embedded Objects
4391 \emph default
4392  manual will not export with 
4393 \begin_inset Flex Code
4394 status collapsed
4395
4396 \begin_layout Plain Layout
4397 htlatex
4398 \end_layout
4399
4400 \end_inset
4401
4402 , though the others will.
4403  The other issue concerns how math is handled.
4404  These converters typically convert the formulae into little pictures that
4405  are then linked from the HTML document.
4406  Since these are actually generated by LaTeX, they are accurate.
4407  But they do not scale well, and just getting them to look as if they are
4408  actually meant to be in your document---so that the font sizes seem to
4409  be roughly the same---can be a challenge.
4410 \end_layout
4411
4412 \begin_layout Standard
4413 Alex Fernandez's 
4414 \begin_inset Flex Code
4415 status collapsed
4416
4417 \begin_layout Plain Layout
4418 eLyXer
4419 \end_layout
4420
4421 \end_inset
4422
4423  (
4424 \begin_inset CommandInset href
4425 LatexCommand href
4426 name "http://elyxer.nongnu.org/"
4427 target "http://elyxer.nongnu.org/"
4428
4429 \end_inset
4430
4431 ) solves some of these problems.
4432  In particular, the formulae it produces scale perfectly, since it renders
4433  math using a combination of HTML and CSS rather than converting the formulae
4434  to images.
4435  But even moderately complex formula are rendered less well than with 
4436 \begin_inset Flex Code
4437 status collapsed
4438
4439 \begin_layout Plain Layout
4440 htlatex
4441 \end_layout
4442
4443 \end_inset
4444
4445 ; this reflects the limitations of HTML.
4446 \begin_inset Foot
4447 status collapsed
4448
4449 \begin_layout Plain Layout
4450 That said, 
4451 \begin_inset Flex Code
4452 status collapsed
4453
4454 \begin_layout Plain Layout
4455 eLyXer
4456 \end_layout
4457
4458 \end_inset
4459
4460  can also use jsMath and MathJax for equations, but this setting is only
4461  available globally and requires one to have access to a server that runs
4462  the backend.
4463 \end_layout
4464
4465 \end_inset
4466
4467  More importantly (as of version 1.1.1, at least), 
4468 \begin_inset Flex Code
4469 status collapsed
4470
4471 \begin_layout Plain Layout
4472 eLyXer
4473 \end_layout
4474
4475 \end_inset
4476
4477  has limited support for math macros and no support for user-defined paragraph
4478  or character styles.
4479  These limitations make 
4480 \begin_inset Flex Code
4481 status collapsed
4482
4483 \begin_layout Plain Layout
4484 eLyXer
4485 \end_layout
4486
4487 \end_inset
4488
4489  unsuitable for many of the documents LyX users produce.
4490  In principle, of course, these problems could be solved, but the LyX developers
4491  have decided to follow a different path and have made LyX itself capable
4492  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4493  plaintext.
4494 \end_layout
4495
4496 \begin_layout Standard
4497 As of this writing, XHTML output remains under development and should probably
4498  be regarded as 
4499 \begin_inset Quotes eld
4500 \end_inset
4501
4502 experimental
4503 \begin_inset Quotes erd
4504 \end_inset
4505
4506 .
4507 \begin_inset Foot
4508 status collapsed
4509
4510 \begin_layout Plain Layout
4511 The file 
4512 \begin_inset Flex Code
4513 status collapsed
4514
4515 \begin_layout Plain Layout
4516 development/HTML.notes
4517 \end_layout
4518
4519 \end_inset
4520
4521 , which can be found in the LyX source tree or 
4522 \begin_inset CommandInset href
4523 LatexCommand href
4524 name "accessed online"
4525 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4526
4527 \end_inset
4528
4529 , usually contains up-to-date information about the state of XHTML output.
4530  See also the list of XHTML bugs on 
4531 \begin_inset CommandInset href
4532 LatexCommand href
4533 name "the bug tracker"
4534 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"
4535
4536 \end_inset
4537
4538 .
4539 \end_layout
4540
4541 \end_inset
4542
4543  Still, the developers have chosen this approach because it has several
4544  potential advantages over the other two.
4545 \end_layout
4546
4547 \begin_layout Standard
4548 These advantages are primarily due to the fact that the XHTML output routines,
4549  since they are part of LyX, know everything LyX knows about the document
4550  being exported.
4551 \begin_inset Foot
4552 status collapsed
4553
4554 \begin_layout Plain Layout
4555 Another advantage is that, since these routines are internal to LyX, they
4556  are immune to changes in LyX's file format, or to changes in the semantics
4557  of existing insets.
4558 \end_layout
4559
4560 \end_inset
4561
4562  So they know about the table of contents (as displayed in the outline),
4563  about the counters associated with different paragraph styles, and about
4564  user-defined styles.
4565  The XHTML output routines know what LyX knows about internationalization,
4566  too, so they will output 
4567 \begin_inset Quotes eld
4568 \end_inset
4569
4570 Chapter 1
4571 \begin_inset Quotes erd
4572 \end_inset
4573
4574  or 
4575 \begin_inset Quotes eld
4576 \end_inset
4577
4578
4579 \lang ngerman
4580 Kapitel
4581 \lang english
4582  1
4583 \begin_inset Quotes erd
4584 \end_inset
4585
4586 , depending upon the language in effect at the time.
4587  
4588 \end_layout
4589
4590 \begin_layout Standard
4591 Quite generally, the output routines know what LyX knows about document
4592  layout, that is, about how the document is to be rendered on screen.
4593  We use this information when we output the document as XHTML.
4594  In particular, LyX 
4595 \emph on
4596 automatically
4597 \emph default
4598  generates CSS style information corresponding to the layout information
4599  it uses to render the document on screen: if section headings are supposed
4600  to be sans-serif and bold as seen in LyX, then (by default) they will be
4601  sans-serif and bold when viewed in a web browser, too.
4602  And this is true not just for pre-defined styles, like Section, but for
4603  any style, including user-defined styles.
4604  Indeed, the XHTML output routines make no distinction between user-defined
4605  paragraph and character styles and LyX's own pre-defined styles: in each
4606  case, everything LyX knows about the styles is contained in the layout
4607  files.
4608  And much the same is true as regards pre-defined textual insets, such as
4609  footnotes, and various custom insets.
4610  
4611 \end_layout
4612
4613 \begin_layout Standard
4614 The result is that XHTML output can be customized and extended in exactly
4615  the same way LaTeX output can be customized and extended: through layout
4616  files and modules.
4617  See chapter five of the 
4618 \emph on
4619 Customization 
4620 \emph default
4621 manual for the details.
4622 \end_layout
4623
4624 \begin_layout Standard
4625 The remainder of this chapter contains more detailed information on XHTML
4626  output, its limitations, and ways to work around those limitations.
4627 \end_layout
4628
4629 \begin_layout Section
4630 Math Output in XHTML
4631 \end_layout
4632
4633 \begin_layout Standard
4634 LyX offers four choices for how math is rendered.
4635  These have various advantages and disadvantages:
4636 \end_layout
4637
4638 \begin_layout Itemize
4639 MathML
4640 \begin_inset Newline newline
4641 \end_inset
4642
4643 MathML is a dialect of XML designed specifically for mathematics on the
4644  web, and it typically renders very well in browsers that support it.
4645  The disadvantage is that not all browsers support MathML, and support is
4646  not complete even in the Gecko-based browsers, such as Firefox.
4647 \begin_inset Newline newline
4648 \end_inset
4649
4650 If LyX is unable to render a formula as MathML---for example, if the formula
4651  uses the 
4652 \begin_inset Flex Code
4653 status collapsed
4654
4655 \begin_layout Plain Layout
4656 xymatrix
4657 \end_layout
4658
4659 \end_inset
4660
4661  package or ERT---then it will instead output the formula as an image.
4662  
4663 \end_layout
4664
4665 \begin_layout Itemize
4666 HTML
4667 \begin_inset Newline newline
4668 \end_inset
4669
4670 As mentioned above, 
4671 \begin_inset Flex Code
4672 status collapsed
4673
4674 \begin_layout Plain Layout
4675 elyxer
4676 \end_layout
4677
4678 \end_inset
4679
4680  outputs math as HTML, styled by CSS.
4681 \begin_inset Foot
4682 status collapsed
4683
4684 \begin_layout Plain Layout
4685 LyX has borrowed some of the CSS for its HTML output from 
4686 \begin_inset Flex Code
4687 status collapsed
4688
4689 \begin_layout Plain Layout
4690 elyxer
4691 \end_layout
4692
4693 \end_inset
4694
4695 .
4696 \end_layout
4697
4698 \end_inset
4699
4700  For simple formulae, this can work quite well, though with more complicated
4701  formulae it tends to break down.
4702  Still, this method has the advantage that it is very widely supported and
4703  so it may be appropriate for documents that contain only a little, fairly
4704  simple math.
4705 \begin_inset Newline newline
4706 \end_inset
4707
4708 If Lyx is unable to render a formula as HTML---for example, if the formula
4709  uses the 
4710 \begin_inset Flex Code
4711 status collapsed
4712
4713 \begin_layout Plain Layout
4714 xymatrix
4715 \end_layout
4716
4717 \end_inset
4718
4719  package or ERT---then it will instead output the formula as an image.
4720  
4721 \end_layout
4722
4723 \begin_layout Itemize
4724 Images
4725 \begin_inset Newline newline
4726 \end_inset
4727
4728 Like 
4729 \begin_inset Flex Code
4730 status collapsed
4731
4732 \begin_layout Plain Layout
4733 htlatex
4734 \end_layout
4735
4736 \end_inset
4737
4738 , LyX will output formulae as images, the very same images, in fact, that
4739  are used for instant preview.
4740 \begin_inset Foot
4741 status collapsed
4742
4743 \begin_layout Plain Layout
4744 Instant preview does 
4745 \emph on
4746 not 
4747 \emph default
4748 have to be on for images to be output, however.
4749 \end_layout
4750
4751 \end_inset
4752
4753  The advantage to this method is that the images are simply generated by
4754  LaTeX, so they are very accurate.
4755  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4756  so they do not scale terribly well, and one cannot copy them, etc.
4757  (As of this writing, there are also problems about equation numbering.
4758  See 
4759 \begin_inset CommandInset href
4760 LatexCommand href
4761 name "bug 6894"
4762 target "http://www.lyx.org/trac/ticket/6894"
4763
4764 \end_inset
4765
4766 .)
4767 \begin_inset Newline newline
4768 \end_inset
4769
4770 The size of the images can be controlled by setting the 
4771 \begin_inset Quotes eld
4772 \end_inset
4773
4774 Math Images Scaling
4775 \begin_inset Quotes erd
4776 \end_inset
4777
4778  parameter under 
4779 \begin_inset Flex MenuItem
4780 status collapsed
4781
4782 \begin_layout Plain Layout
4783 Document\SpecialChar \menuseparator
4784 Settings\SpecialChar \menuseparator
4785 Output
4786 \end_layout
4787
4788 \end_inset
4789
4790 .
4791 \begin_inset Foot
4792 status collapsed
4793
4794 \begin_layout Plain Layout
4795 For those who want to know, this controls the resolution of the image in
4796  dots per inch and is based upon a default of 75 dpi.
4797 \end_layout
4798
4799 \end_inset
4800
4801
4802 \begin_inset Newline newline
4803 \end_inset
4804
4805 If LyX for some reason fails to create an image for a formula (e.g., if a
4806  required LaTeX package is not installed), then it will fall back to outputing
4807  the raw LaTeX.
4808 \end_layout
4809
4810 \begin_layout Itemize
4811 LaTeX
4812 \begin_inset Newline newline
4813 \end_inset
4814
4815 Finally, LyX will happily output math as LaTeX.
4816  As well as being the output of last resort, this method can be used with
4817  such tools as 
4818 \begin_inset CommandInset href
4819 LatexCommand href
4820 name "jsMath"
4821 target "http://www.math.union.edu/~dpvc/jsMath/"
4822
4823 \end_inset
4824
4825 , which uses JavaScript to render LaTeX embedded in HTML documents.
4826  LyX wraps the LaTeX in either a 
4827 \begin_inset Flex Code
4828 status collapsed
4829
4830 \begin_layout Plain Layout
4831 span
4832 \end_layout
4833
4834 \end_inset
4835
4836  (for inline formulas) or 
4837 \begin_inset Flex Code
4838 status collapsed
4839
4840 \begin_layout Plain Layout
4841 div
4842 \end_layout
4843
4844 \end_inset
4845
4846  (for displayed formulas) with 
4847 \begin_inset Flex Code
4848 status collapsed
4849
4850 \begin_layout Plain Layout
4851 class='math'
4852 \end_layout
4853
4854 \end_inset
4855
4856 , as is required for jsMath.
4857 \end_layout
4858
4859 \begin_layout Standard
4860 One of these output methods must be selected under 
4861 \begin_inset Flex MenuItem
4862 status collapsed
4863
4864 \begin_layout Plain Layout
4865 Document\SpecialChar \menuseparator
4866 Settings\SpecialChar \menuseparator
4867 Output
4868 \end_layout
4869
4870 \end_inset
4871
4872 .
4873  By default, LyX outputs MathML.
4874  This is a document-wide setting, therefore.
4875 \end_layout
4876
4877 \begin_layout Standard
4878 Eventually, LyX will offer the user the option to select an alternate output
4879  method for a particular inset, say, one that isn't being rendered very
4880  well by MathML.
4881 \begin_inset Foot
4882 status collapsed
4883
4884 \begin_layout Plain Layout
4885 That said, since LyX falls back to images if the inset contains ERT, then
4886  one can force output as an image by putting some harmless ERT into the
4887  math, for example: 
4888 \begin_inset Formula $a=b\relax$
4889 \end_inset
4890
4891 .
4892 \end_layout
4893
4894 \end_inset
4895
4896
4897 \end_layout
4898
4899 \begin_layout Section
4900 Bibliography and Citations
4901 \end_layout
4902
4903 \begin_layout Standard
4904 XHTML output fully supports bibliographies and citations.
4905  
4906 \end_layout
4907
4908 \begin_layout Standard
4909 Citation labels are generated by the same machinery that generates LyX's
4910  on-screen labels, so the labels will look in the output much as they do
4911  in LyX, though better.
4912  If you are using numerical citations, then LyX will output numerical labels,
4913  such as [1] or [17], rather than simply showing the citation key in square
4914  brackets, as it does on-screen.
4915  If you are using author-year citations, then LyX will add lowercase letters
4916  to the years, just as BibTeX does, if it finds more than one citation for
4917  a given author-year combination.
4918  The labels will be printed with the bibliography entries.
4919  Note that there is, at present, no way to customize the appearance of the
4920  labels, for example, to choose between square brackets and parentheses.
4921 \end_layout
4922
4923 \begin_layout Standard
4924 Bibliography output is handled by the same machinery that handles the presentati
4925 on of reference information in the citation dialog, so you will see in the
4926  XHTML output pretty much what you would see if you were to look at a given
4927  entry in the citation dialog.
4928  The formatting can be customized in your layout file or, preferably, in
4929  a module.
4930  See the 
4931 \emph on
4932 Customization
4933 \emph default
4934  manual for the details.
4935 \end_layout
4936
4937 \begin_layout Standard
4938 The main defect at present is that cross-referenced information is printed
4939  with every entry with which it is associated.
4940  So you can see things like this:
4941 \end_layout
4942
4943 \begin_layout Quote
4944 Jason Stanley, 
4945 \begin_inset Quotes eld
4946 \end_inset
4947
4948 Context and Logical Form
4949 \begin_inset Quotes erd
4950 \end_inset
4951
4952 , in 
4953 \emph on
4954 Language in Context: Selected Essays
4955 \emph default
4956  (Oxford: Oxford University Press, 2007), pp.
4957  30--68.
4958 \end_layout
4959
4960 \begin_layout Quote
4961 Jason Stanley, 
4962 \begin_inset Quotes eld
4963 \end_inset
4964
4965 Semantics in Context
4966 \begin_inset Quotes erd
4967 \end_inset
4968
4969 , in 
4970 \emph on
4971 Language in Context: Selected Essays
4972 \emph default
4973  (Oxford: Oxford University Press, 2007), pp.
4974  201--30.
4975 \end_layout
4976
4977 \begin_layout Standard
4978 This should be fixed before long.
4979 \end_layout
4980
4981 \begin_layout Standard
4982 There is no support at present for sectioned bibliographies.
4983  If you have multiple bibliographies, then LyX will print the same bibliography
4984  over and over.
4985 \end_layout
4986
4987 \begin_layout Section
4988 Indexes
4989 \end_layout
4990
4991 \begin_layout Standard
4992 LyX will happily export indexes as XHTML, but with certain limitations at
4993  the moment.
4994 \end_layout
4995
4996 \begin_layout Standard
4997 Index export will be most reliable when you do not attempt to use the fancy
4998  constructs that are described in the section on indexes in the 
4999 \emph on
5000 User's Guide
5001 \emph default
5002 .
5003 \begin_inset Foot
5004 status collapsed
5005
5006 \begin_layout Plain Layout
5007 The main issue here is that LyX itself does not really handle these.
5008  It just lets you enter what you would have to enter in raw LaTeX.
5009 \end_layout
5010
5011 \end_inset
5012
5013  We'll describe how they are handled using the subsection headings from
5014  that section.
5015 \end_layout
5016
5017 \begin_layout Itemize
5018 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5019  these, but the entries must be separated by 
5020 \begin_inset Quotes eld
5021 \end_inset
5022
5023  ! 
5024 \begin_inset Quotes erd
5025 \end_inset
5026
5027 , that is, there must be spaces around the exclamation point.
5028  This is because it is otherwise too difficult to check for escaped exclamation
5029  points, ones in math, and so forth.
5030 \end_layout
5031
5032 \begin_layout Itemize
5033 Page Ranges: There is no support at all for page ranges, since these make
5034  no sense with XHMTL.
5035  Instead, you will just get two index entries, one at either end.
5036 \end_layout
5037
5038 \begin_layout Itemize
5039 Cross-referencing: There is no support for cross-referencing.
5040  If LyX finds an entry containing the 
5041 \begin_inset Quotes eld
5042 \end_inset
5043
5044 |see\SpecialChar \ldots{}
5045
5046 \begin_inset Quotes erd
5047 \end_inset
5048
5049  construct, it is just dropped, and the rest is treated as an ordinary index
5050  entry.
5051 \end_layout
5052
5053 \begin_layout Itemize
5054 Index Entry Order: LyX does support attempts to fix the sorting order.
5055  It will take what is before the first `@' it finds and use that for sorting,
5056  taking what follows the first `@' to be the actual entry.
5057  At present, LyX does not check for escaped `@', so do not try to index
5058  email addresses.
5059 \end_layout
5060
5061 \begin_layout Itemize
5062 Index Entry Layout: You can format entries by using the text style dialog,
5063  or by using any other method available within LyX itself.
5064  There is no support for constructs like: 
5065 \begin_inset Quotes eld
5066 \end_inset
5067
5068 entry|textbf
5069 \begin_inset Quotes erd
5070 \end_inset
5071
5072 .
5073  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5074  and everything that follows it.
5075 \end_layout
5076
5077 \begin_layout Itemize
5078 Multiple Indexes: There is no support for multiple indexes.
5079  Rather, all index entries will be printed as one large index.
5080  To avoid our printing several versions of the index, we print only the
5081  main index, so make sure you have one.
5082 \end_layout
5083
5084 \begin_layout Section
5085 Nomenclature and Glossary
5086 \end_layout
5087
5088 \begin_layout Standard
5089 There is at present no support for glossaries.
5090  Adding it would be fairly trivial, and welcome.
5091 \end_layout
5092
5093 \begin_layout Chapter
5094 The LyX Server
5095 \end_layout
5096
5097 \begin_layout Section
5098 Introduction
5099 \end_layout
5100
5101 \begin_layout Standard
5102 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5103  and retrieve information about the LyX internal state.
5104  This is only intended for advanced users, but they should find it useful.
5105  It is by writing to the LyX server, for example, that bibliography managers,
5106  such as JabRef, are able to 
5107 \begin_inset Quotes eld
5108 \end_inset
5109
5110 push
5111 \begin_inset Quotes erd
5112 \end_inset
5113
5114  citations to LyX.
5115 \end_layout
5116
5117 \begin_layout Section
5118 Starting the LyX Server
5119 \end_layout
5120
5121 \begin_layout Standard
5122 The LyX server works through the use of a pair of named pipes.
5123  These are usually located in 
5124 \begin_inset Flex Code
5125 status collapsed
5126
5127 \begin_layout Plain Layout
5128 UserDir
5129 \end_layout
5130
5131 \end_inset
5132
5133 , (except on Windows, where 
5134 \emph on
5135 local
5136 \emph default
5137  named pipes are special objects located in 
5138 \begin_inset Flex Code
5139 status collapsed
5140
5141 \begin_layout Plain Layout
5142
5143 \backslash
5144
5145 \backslash
5146 .
5147 \backslash
5148 pipe
5149 \end_layout
5150
5151 \end_inset
5152
5153 ) and have the names 
5154 \begin_inset Quotes eld
5155 \end_inset
5156
5157
5158 \begin_inset Flex Code
5159 status collapsed
5160
5161 \begin_layout Plain Layout
5162 lyxpipe.in
5163 \end_layout
5164
5165 \end_inset
5166
5167
5168 \begin_inset Quotes erd
5169 \end_inset
5170
5171  and 
5172 \begin_inset Quotes eld
5173 \end_inset
5174
5175
5176 \begin_inset Flex Code
5177 status collapsed
5178
5179 \begin_layout Plain Layout
5180 lyxpipe.out
5181 \end_layout
5182
5183 \end_inset
5184
5185
5186 \begin_inset Quotes erd
5187 \end_inset
5188
5189 .
5190  External programs write into 
5191 \begin_inset Flex Code
5192 status collapsed
5193
5194 \begin_layout Plain Layout
5195 lyxpipe.in
5196 \end_layout
5197
5198 \end_inset
5199
5200  and read back data from 
5201 \begin_inset Flex Code
5202 status collapsed
5203
5204 \begin_layout Plain Layout
5205 lyxpipe.out
5206 \end_layout
5207
5208 \end_inset
5209
5210 .
5211  The stem of the pipe names can be defined in the 
5212 \begin_inset Flex MenuItem
5213 status collapsed
5214
5215 \begin_layout Plain Layout
5216 Tools\SpecialChar \menuseparator
5217 Preferences
5218 \end_layout
5219
5220 \end_inset
5221
5222  dialog, for example 
5223 \begin_inset Flex Code
5224 status collapsed
5225
5226 \begin_layout Plain Layout
5227 "/home/myhome/lyxpipe"
5228 \end_layout
5229
5230 \end_inset
5231
5232 , or 
5233 \begin_inset Flex Code
5234 status collapsed
5235
5236 \begin_layout Plain Layout
5237 "
5238 \backslash
5239
5240 \backslash
5241 .
5242 \backslash
5243 pipe
5244 \backslash
5245 lyxpipe"
5246 \end_layout
5247
5248 \end_inset
5249
5250  on Windows (but any working path can be used).
5251  You 
5252 \emph on
5253 must
5254 \emph default
5255  configure this manually in order for the server to start.
5256 \end_layout
5257
5258 \begin_layout Standard
5259 LyX will add the '
5260 \begin_inset Flex Code
5261 status collapsed
5262
5263 \begin_layout Plain Layout
5264 .in
5265 \end_layout
5266
5267 \end_inset
5268
5269 ' and '
5270 \begin_inset Flex Code
5271 status collapsed
5272
5273 \begin_layout Plain Layout
5274 .out
5275 \end_layout
5276
5277 \end_inset
5278
5279 ' to create the pipes.
5280  If one of the pipes already exists, LyX will assume that another LyX process
5281  is already running and will not start the server.
5282  On POSIX (Unix like) systems, if for some other reason, an unused 
5283 \begin_inset Quotes eld
5284 \end_inset
5285
5286 stale
5287 \begin_inset Quotes erd
5288 \end_inset
5289
5290  pipe is left in existence when LyX closes, then LyX will try to delete
5291  it.
5292  If this fails for some reason, you will need to delete the pipes manually
5293  and then restart LyX.
5294  On Windows, pipes are deleted by the OS on program termination or crash,
5295  so 
5296 \begin_inset Quotes eld
5297 \end_inset
5298
5299 stale
5300 \begin_inset Quotes erd
5301 \end_inset
5302
5303  pipes should not be possible.
5304 \end_layout
5305
5306 \begin_layout Standard
5307 To have several LyX processes with servers at the same time, you have to
5308  use different configurations, perhaps by using separate user directories,
5309  each with its own 
5310 \begin_inset Flex Code
5311 status collapsed
5312
5313 \begin_layout Plain Layout
5314 preferences
5315 \end_layout
5316
5317 \end_inset
5318
5319  file, for each process.
5320 \end_layout
5321
5322 \begin_layout Standard
5323 If you are developing a client program, you might find it useful to enable
5324  debugging information from the LyX server.
5325  Do this by starting LyX as 
5326 \begin_inset Flex Code
5327 status collapsed
5328
5329 \begin_layout Plain Layout
5330 lyx -dbg lyxserver
5331 \end_layout
5332
5333 \end_inset
5334
5335 .
5336 \end_layout
5337
5338 \begin_layout Standard
5339 You can find a complete example client written in C in the source distribution
5340  as 
5341 \begin_inset Flex Code
5342 status collapsed
5343
5344 \begin_layout Plain Layout
5345 development/lyxserver/server_monitor.c
5346 \end_layout
5347
5348 \end_inset
5349
5350 .
5351 \end_layout
5352
5353 \begin_layout Standard
5354 Another useful tool is the command-line based clientfound in 
5355 \begin_inset Flex Code
5356 status collapsed
5357
5358 \begin_layout Plain Layout
5359 src/client/lyxclient
5360 \end_layout
5361
5362 \end_inset
5363
5364 .
5365 \end_layout
5366
5367 \begin_layout Section
5368 Normal communication
5369 \end_layout
5370
5371 \begin_layout Standard
5372 To issue a LyX call, the client writes a line of ASCII text into the input
5373  pipe.
5374  This line has the following format:
5375 \end_layout
5376
5377 \begin_layout Quote
5378 LYXCMD:
5379 \emph on
5380 clientname
5381 \emph default
5382 :
5383 \emph on
5384 function
5385 \emph default
5386 :
5387 \emph on
5388 argument
5389 \end_layout
5390
5391 \begin_layout Description
5392 clientname is a name that the client can choose arbitrarily.
5393  Its only use is that LyX will echo it if it sends an answer—so a client
5394  can dispatch results from different requesters.
5395 \end_layout
5396
5397 \begin_layout Description
5398 function is the function you want LyX to perform.
5399  It is the same as the commands you'd use in the minibuffer.
5400 \end_layout
5401
5402 \begin_layout Description
5403 argument is an optional argument which is meaningful only to some functions
5404  (for instance, the 
5405 \begin_inset Quotes eld
5406 \end_inset
5407
5408 self-insert
5409 \begin_inset Quotes erd
5410 \end_inset
5411
5412  LFUN will insert the argument as text at the cursor position).
5413 \end_layout
5414
5415 \begin_layout Standard
5416 The answer from LyX will arrive in the output pipe and be of the form
5417 \end_layout
5418
5419 \begin_layout Quote
5420 INFO:
5421 \emph on
5422 clientname
5423 \emph default
5424 :
5425 \emph on
5426 function
5427 \emph default
5428 :
5429 \emph on
5430 data
5431 \end_layout
5432
5433 \begin_layout Standard
5434 where 
5435 \emph on
5436 clientname
5437 \emph default
5438  and 
5439 \emph on
5440 function
5441 \emph default
5442  are just echoed from the command request, while 
5443 \emph on
5444 data
5445 \emph default
5446  is more or less useful information filled according to how the command
5447  execution worked out.
5448  Some commands, such as 
5449 \begin_inset Quotes eld
5450 \end_inset
5451
5452 font-state
5453 \begin_inset Quotes erd
5454 \end_inset
5455
5456 , will return information about the internal state of LyX, while other will
5457  return an empty data-response.
5458  This means that the command execution went fine.
5459 \end_layout
5460
5461 \begin_layout Standard
5462 In case of errors, the response from LyX will have this form
5463 \end_layout
5464
5465 \begin_layout Quote
5466 ERROR:
5467 \emph on
5468 clientname
5469 \emph default
5470 :
5471 \emph on
5472 function
5473 \emph default
5474 :
5475 \emph on
5476 error message
5477 \end_layout
5478
5479 \begin_layout Standard
5480 where the 
5481 \emph on
5482 error message
5483 \emph default
5484  should contain an explanation of why the command failed.
5485 \end_layout
5486
5487 \begin_layout Standard
5488 Examples:
5489 \end_layout
5490
5491 \begin_layout LyX-Code
5492 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5493 \begin_inset Newline newline
5494 \end_inset
5495
5496 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5497 \begin_inset Newline newline
5498 \end_inset
5499
5500 read a <~/.lyxpipe.out
5501 \begin_inset Newline newline
5502 \end_inset
5503
5504 echo $a
5505 \end_layout
5506
5507 \begin_layout Section
5508 Notification
5509 \end_layout
5510
5511 \begin_layout Standard
5512 LyX can notify clients of events going on asynchronously.
5513  Currently it will only do this if the user binds a key sequence with the
5514  function 
5515 \begin_inset Quotes eld
5516 \end_inset
5517
5518 notify
5519 \begin_inset Quotes erd
5520 \end_inset
5521
5522 .
5523  The format of the string LyX sends is as follows:
5524 \end_layout
5525
5526 \begin_layout Quote
5527 \begin_inset Flex Code
5528 status collapsed
5529
5530 \begin_layout Plain Layout
5531 NOTIFY:
5532 \end_layout
5533
5534 \end_inset
5535
5536
5537 \emph on
5538 key-sequence
5539 \end_layout
5540
5541 \begin_layout Standard
5542 where 
5543 \emph on
5544 key-sequence
5545 \emph default
5546  is the printed representation of the key sequence that was actually typed
5547  by the user.
5548 \end_layout
5549
5550 \begin_layout Standard
5551 This mechanism can be used to extend LyX's command set and implement macros.
5552  Bind some key sequence to 
5553 \begin_inset Quotes eld
5554 \end_inset
5555
5556 notify
5557 \begin_inset Quotes erd
5558 \end_inset
5559
5560 .
5561  Then start a client that listens on the output pipe, dispatches the command
5562  according to the sequence, and starts a function that may use LyX calls
5563  and LyX requests to issue a command or a series of commands to LyX.
5564 \end_layout
5565
5566 \begin_layout Section
5567 The simple LyX Server Protocol
5568 \end_layout
5569
5570 \begin_layout Standard
5571 LyX implements a simple protocol that can be used for session management.
5572  All messages are of the form
5573 \end_layout
5574
5575 \begin_layout Quote
5576 LYXSRV:
5577 \emph on
5578 clientname
5579 \emph default
5580 :
5581 \emph on
5582 protocol message
5583 \end_layout
5584
5585 \begin_layout Standard
5586 where 
5587 \emph on
5588 protocol message
5589 \emph default
5590  can be 
5591 \begin_inset Quotes eld
5592 \end_inset
5593
5594 hello
5595 \begin_inset Quotes erd
5596 \end_inset
5597
5598  or 
5599 \begin_inset Quotes eld
5600 \end_inset
5601
5602 bye
5603 \begin_inset Quotes erd
5604 \end_inset
5605
5606 .
5607  If 
5608 \begin_inset Quotes eld
5609 \end_inset
5610
5611 hello
5612 \begin_inset Quotes erd
5613 \end_inset
5614
5615  is received from a client, LyX will report back to inform the client that
5616  it's listening to it's messages, while 
5617 \begin_inset Quotes eld
5618 \end_inset
5619
5620 bye
5621 \begin_inset Quotes erd
5622 \end_inset
5623
5624  sent from LyX will inform clients that LyX is closing.
5625 \end_layout
5626
5627 \begin_layout Section
5628 Reverse DVI/PDF search
5629 \end_layout
5630
5631 \begin_layout Standard
5632 Some DVI/PDF viewers
5633 \begin_inset Foot
5634 status collapsed
5635
5636 \begin_layout Plain Layout
5637 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5638  Skim on Mac OSX and SumatraPDF on Windows.
5639 \end_layout
5640
5641 \end_inset
5642
5643  provide 
5644 \emph on
5645 reverse search
5646 \emph default
5647  facility (also called 
5648 \emph on
5649 inverse search
5650 \emph default
5651 ).
5652  This means that you can tell LyX to put the cursor to a specific line in
5653  the document by clicking at the respective position in the DVI/PDF output.
5654  To achieve this, the viewer must be able to communicate with LyX.
5655  This is done via the LyX server either by using the named pipe (
5656 \emph on
5657 lyxpipe
5658 \emph default
5659 ), or the UNIX domain socket (
5660 \emph on
5661 lyxsocket
5662 \emph default
5663 ) that LyX creates in its temporary directory (this is the way the 
5664 \begin_inset Flex Code
5665 status collapsed
5666
5667 \begin_layout Plain Layout
5668 lyxclient
5669 \end_layout
5670
5671 \end_inset
5672
5673  program communicates with LyX).
5674  In some cases, you need a helper script that mediates between the viewer
5675  and LyX, in others, the viewer can communicate with LyX directly.
5676  This depends on the selected viewer and on your operating system.
5677  The same applies to the way viewers need to be configured and the way the
5678  reverse search is actually performed.
5679  In what follows, we will thus describe how to setup reverse search for
5680  specific viewers.
5681  Before we turn to this, though, we will explain what needs to be done generally
5682  to enable reverse search in the DVI/PDF output.
5683 \end_layout
5684
5685 \begin_layout Subsection
5686 Automatic setup
5687 \begin_inset CommandInset label
5688 LatexCommand label
5689 name "sub:rev-search"
5690
5691 \end_inset
5692
5693
5694 \end_layout
5695
5696 \begin_layout Standard
5697 In most cases LyX will do the work for you by enabling the option 
5698 \begin_inset Flex MenuItem
5699 status collapsed
5700
5701 \begin_layout Plain Layout
5702 Synchronize with Output
5703 \end_layout
5704
5705 \end_inset
5706
5707  in the menu 
5708 \begin_inset Flex MenuItem
5709 status collapsed
5710
5711 \begin_layout Plain Layout
5712 Document\SpecialChar \menuseparator
5713 Settings\SpecialChar \menuseparator
5714 Output
5715 \end_layout
5716
5717 \end_inset
5718
5719 .
5720  In such a case LyX will automatically insert the necessary SyncTeX macro
5721  (for PDF) or load the srcltx package (for DVI) respectively.
5722  This option can be easily reached also on 
5723 \begin_inset Flex Code
5724 status collapsed
5725
5726 \begin_layout Plain Layout
5727 View/Update
5728 \end_layout
5729
5730 \end_inset
5731
5732  Toolbar.
5733 \end_layout
5734
5735 \begin_layout Standard
5736 If you need a different setting, you can select or input a custom macro
5737  from the drop down box just below 
5738 \begin_inset Flex MenuItem
5739 status collapsed
5740
5741 \begin_layout Plain Layout
5742 Document\SpecialChar \menuseparator
5743 Settings\SpecialChar \menuseparator
5744 Output\SpecialChar \menuseparator
5745 Synchronize with Output
5746 \end_layout
5747
5748 \end_inset
5749
5750 .
5751 \end_layout
5752
5753 \begin_layout Standard
5754 Note that the method 
5755 \begin_inset Flex Code
5756 status collapsed
5757
5758 \begin_layout Plain Layout
5759
5760 \backslash
5761 synctex=1
5762 \end_layout
5763
5764 \end_inset
5765
5766  enables gzip compression.
5767  If your viewer does not support it, you should instead use 
5768 \begin_inset Flex Code
5769 status collapsed
5770
5771 \begin_layout Plain Layout
5772
5773 \backslash
5774 synctex=-1
5775 \end_layout
5776
5777 \end_inset
5778
5779 .
5780 \end_layout
5781
5782 \begin_layout Standard
5783 Please aöso note that including the 
5784 \begin_inset Flex Code
5785 status collapsed
5786
5787 \begin_layout Plain Layout
5788 srcltx
5789 \end_layout
5790
5791 \end_inset
5792
5793  package or 
5794 \begin_inset Flex Code
5795 status collapsed
5796
5797 \begin_layout Plain Layout
5798 src-specials
5799 \end_layout
5800
5801 \end_inset
5802
5803  sometimes has an undesired impact on the typesetting.
5804  Thus, you should switch output synchronization off for the final typesetting
5805  if you use the 
5806 \begin_inset Flex Code
5807 status collapsed
5808
5809 \begin_layout Plain Layout
5810 srcltx
5811 \end_layout
5812
5813 \end_inset
5814
5815  package or 
5816 \begin_inset Flex Code
5817 status collapsed
5818
5819 \begin_layout Plain Layout
5820 src-specials
5821 \end_layout
5822
5823 \end_inset
5824
5825 .
5826  
5827 \end_layout
5828
5829 \begin_layout Standard
5830 In case you need some more special settings that are not covered by the
5831  automatic settings, read the next section about how to set up output synchroniz
5832 ation manually.
5833  If the automatic setup suits your needs, you can readily jump to section
5834 \begin_inset space ~
5835 \end_inset
5836
5837
5838 \begin_inset CommandInset ref
5839 LatexCommand ref
5840 reference "sub:configuring-viewers"
5841
5842 \end_inset
5843
5844 , where the necessary configuration steps in your viewer -- needed both
5845  with the automatic and the manual setup -- are described.
5846 \end_layout
5847
5848 \begin_layout Subsection
5849 Manual setup
5850 \end_layout
5851
5852 \begin_layout Standard
5853 LaTeX provides several different methods for reverse search.
5854  Some are built-in in the 
5855 \begin_inset Flex Code
5856 status collapsed
5857
5858 \begin_layout Plain Layout
5859 latex/pdflatex
5860 \end_layout
5861
5862 \end_inset
5863
5864  program, some are provided by external packages.
5865  Your choice depends on whether your LaTeX distribution already provides
5866  a given method (the built-in methods are rather new) and whether your viewer
5867  can cope with it.
5868  The available methods are described in the following.
5869 \end_layout
5870
5871 \begin_layout Subsubsection*
5872 Built-in DVI-search via src-specials (DVI only) 
5873 \end_layout
5874
5875 \begin_layout Standard
5876 This method provides the DVI file with the necessary information for reverse
5877  search.
5878  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5879  distribution should include it), and it works reliably.
5880  To enable it, change the 
5881 \begin_inset Flex MenuItem
5882 status collapsed
5883
5884 \begin_layout Plain Layout
5885 LaT
5886 \begin_inset ERT
5887 status collapsed
5888
5889 \begin_layout Plain Layout
5890
5891 {}
5892 \end_layout
5893
5894 \end_inset
5895
5896 eX (plain)->DVI
5897 \end_layout
5898
5899 \end_inset
5900
5901  or 
5902 \begin_inset Flex MenuItem
5903 status collapsed
5904
5905 \begin_layout Plain Layout
5906 LaT
5907 \begin_inset ERT
5908 status collapsed
5909
5910 \begin_layout Plain Layout
5911
5912 {}
5913 \end_layout
5914
5915 \end_inset
5916
5917 eX (plain)->DraftDVI
5918 \end_layout
5919
5920 \end_inset
5921
5922  converter in 
5923 \begin_inset Flex MenuItem
5924 status collapsed
5925
5926 \begin_layout Plain Layout
5927 Preferences\SpecialChar \menuseparator
5928 File Handling\SpecialChar \menuseparator
5929 Converters
5930 \end_layout
5931
5932 \end_inset
5933
5934  to 
5935 \begin_inset Flex Code
5936 status collapsed
5937
5938 \begin_layout Plain Layout
5939 latex -src-specials $$i
5940 \end_layout
5941
5942 \end_inset
5943
5944 .
5945  If this doesn't work, check if your TeX engine needs different options
5946  (the syntax might differ in some distributions).
5947 \end_layout
5948
5949 \begin_layout Subsubsection*
5950 External Packages (PDFSync and scrltx) 
5951 \end_layout
5952
5953 \begin_layout Standard
5954 The packages 
5955 \emph on
5956 pdfsync
5957 \emph default
5958  and 
5959 \emph on
5960 scrltx
5961 \emph default
5962  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5963  respectively.
5964  In order to enable it, load the packages in the LyX preamble: 
5965 \end_layout
5966
5967 \begin_layout Itemize
5968 \begin_inset Flex Code
5969 status collapsed
5970
5971 \begin_layout Plain Layout
5972
5973 \backslash
5974 usepackage{pdfsync}
5975 \end_layout
5976
5977 \end_inset
5978
5979  for reverse PDF search,
5980 \end_layout
5981
5982 \begin_layout Itemize
5983 \begin_inset Flex Code
5984 status collapsed
5985
5986 \begin_layout Plain Layout
5987
5988 \backslash
5989 usepackage[active]{srcltx}
5990 \end_layout
5991
5992 \end_inset
5993
5994  for reverse DVI search.
5995 \end_layout
5996
5997 \begin_layout Standard
5998 If you want to be able to perform both DVI and PDF reverse searches, you
5999  can also insert in the preamble the following lines
6000 \end_layout
6001
6002 \begin_layout LyX-Code
6003
6004 \backslash
6005 usepackage{ifpdf}
6006 \begin_inset Newline newline
6007 \end_inset
6008
6009
6010 \backslash
6011 ifpdf
6012 \begin_inset Newline newline
6013 \end_inset
6014
6015   
6016 \backslash
6017 usepackage{pdfsync}
6018 \begin_inset Newline newline
6019 \end_inset
6020
6021
6022 \backslash
6023 else
6024 \begin_inset Newline newline
6025 \end_inset
6026
6027   
6028 \backslash
6029 usepackage[active]{srcltx}
6030 \begin_inset Newline newline
6031 \end_inset
6032
6033
6034 \backslash
6035 fi
6036 \end_layout
6037
6038 \begin_layout Standard
6039 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6040  right package will be used.
6041 \end_layout
6042
6043 \begin_layout Standard
6044 Note that PDFSync might affect the output layout of your document.
6045  It is therefore advised to disable PDFsync for final documents.
6046 \end_layout
6047
6048 \begin_layout Subsubsection*
6049 Built-in reverse search via SyncTeX (DVI and PDF) 
6050 \end_layout
6051
6052 \begin_layout Standard
6053 Recent versions of 
6054 \begin_inset Flex Code
6055 status collapsed
6056
6057 \begin_layout Plain Layout
6058 (pdf)latex
6059 \end_layout
6060
6061 \end_inset
6062
6063  have built-in support for both PDF and DVI reverse search.
6064  This so-called 
6065 \emph on
6066 SyncTeX
6067 \emph default
6068  facility is basically the result of the integration of the PDFSync package
6069  to the pdftex program and its merge with the 
6070 \emph on
6071 scr-specials
6072 \emph default
6073  approach.
6074  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6075  to use it.
6076  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6077  already provide SyncTeX support.
6078 \end_layout
6079
6080 \begin_layout Standard
6081 To enable SyncTeX for DVI output, change the 
6082 \begin_inset Flex MenuItem
6083 status collapsed
6084
6085 \begin_layout Plain Layout
6086 LaT
6087 \begin_inset ERT
6088 status collapsed
6089
6090 \begin_layout Plain Layout
6091
6092 {}
6093 \end_layout
6094
6095 \end_inset
6096
6097 eX (plain) -> DVI
6098 \end_layout
6099
6100 \end_inset
6101
6102  or 
6103 \begin_inset Flex MenuItem
6104 status collapsed
6105
6106 \begin_layout Plain Layout
6107 LaT
6108 \begin_inset ERT
6109 status collapsed
6110
6111 \begin_layout Plain Layout
6112
6113 {}
6114 \end_layout
6115
6116 \end_inset
6117
6118 eX (plain) -> DraftDVI
6119 \end_layout
6120
6121 \end_inset
6122
6123  converter in 
6124 \begin_inset Flex MenuItem
6125 status collapsed
6126
6127 \begin_layout Plain Layout
6128 Preferences\SpecialChar \menuseparator
6129 File Handling\SpecialChar \menuseparator
6130 Converters
6131 \end_layout
6132
6133 \end_inset
6134
6135  to 
6136 \begin_inset Flex Code
6137 status collapsed
6138
6139 \begin_layout Plain Layout
6140 latex -synctex=1 $$i
6141 \end_layout
6142
6143 \end_inset
6144
6145 , and for PDF output, change the 
6146 \begin_inset Flex MenuItem
6147 status collapsed
6148
6149 \begin_layout Plain Layout
6150 LaT
6151 \begin_inset ERT
6152 status collapsed
6153
6154 \begin_layout Plain Layout
6155
6156 {}
6157 \end_layout
6158
6159 \end_inset
6160
6161 eX (pdflatex) -> PDF (pdflatex)
6162 \end_layout
6163
6164 \end_inset
6165
6166  or converter to 
6167 \begin_inset Flex Code
6168 status collapsed
6169
6170 \begin_layout Plain Layout
6171 pdflatex -synctex=1 $$i
6172 \end_layout
6173
6174 \end_inset
6175
6176 .
6177  Check the documentation of your viewer whether the viewer needs to be configure
6178 d for the use with SyncTeX.
6179 \begin_inset Foot
6180 status collapsed
6181
6182 \begin_layout Plain Layout
6183 Note that the option 
6184 \begin_inset Flex Code
6185 status collapsed
6186
6187 \begin_layout Plain Layout
6188 -synctex=1
6189 \end_layout
6190
6191 \end_inset
6192
6193  option enables gzip compression.
6194  If your viewer does not support it, you should instead use 
6195 \begin_inset Flex Code
6196 status collapsed
6197
6198 \begin_layout Plain Layout
6199 -synctex=-1
6200 \end_layout
6201
6202 \end_inset
6203
6204 .
6205 \end_layout
6206
6207 \end_inset
6208
6209
6210 \end_layout
6211
6212 \begin_layout Subsection
6213 Configuring and using specific viewers
6214 \begin_inset CommandInset label
6215 LatexCommand label
6216 name "sub:configuring-viewers"
6217
6218 \end_inset
6219
6220
6221 \end_layout
6222
6223 \begin_layout Subsubsection*
6224 Xdvi (all platforms)
6225 \end_layout
6226
6227 \begin_layout Standard
6228 If you use 
6229 \begin_inset Flex Code
6230 status collapsed
6231
6232 \begin_layout Plain Layout
6233 xdvi
6234 \end_layout
6235
6236 \end_inset
6237
6238 , you don't need to do anything else for performing a reverse DVI search,
6239  as LyX already provides the necessary hooks for automatically using the
6240  
6241 \begin_inset Flex Code
6242 status collapsed
6243
6244 \begin_layout Plain Layout
6245 lyxclient
6246 \end_layout
6247
6248 \end_inset
6249
6250  program.
6251  Just setup your document as described above (reverse search is triggered
6252  by Ctrl-click or Alt-click on Mac OSX, respectively).
6253 \end_layout
6254
6255 \begin_layout Standard
6256 However, if for whatever reason you want to use the named pipe instead of
6257  the socket for communicating with LyX, simply change the DVI viewer in
6258  
6259 \begin_inset Flex MenuItem
6260 status collapsed
6261
6262 \begin_layout Plain Layout
6263 Preferences\SpecialChar \menuseparator
6264 File Handling\SpecialChar \menuseparator
6265 File formats
6266 \end_layout
6267
6268 \end_inset
6269
6270  to
6271 \begin_inset Foot
6272 status collapsed
6273
6274 \begin_layout Plain Layout
6275 On Mac OSX you have to use 
6276 \begin_inset Flex Code
6277 status collapsed
6278
6279 \begin_layout Plain Layout
6280 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6281 \end_layout
6282
6283 \end_inset
6284
6285
6286 \end_layout
6287
6288 \end_inset
6289
6290  
6291 \begin_inset Flex Code
6292 status collapsed
6293
6294 \begin_layout Plain Layout
6295 xdvi -editor 'lyxeditor.sh %f %l'
6296 \end_layout
6297
6298 \end_inset
6299
6300 , where 
6301 \begin_inset Flex Code
6302 status collapsed
6303
6304 \begin_layout Plain Layout
6305 lyxeditor.sh
6306 \end_layout
6307
6308 \end_inset
6309
6310  is a suitable script.
6311  For example, a minimal shell script is the following one:
6312 \end_layout
6313
6314 \begin_layout LyX-Code
6315 #!/bin/sh
6316 \begin_inset Newline newline
6317 \end_inset
6318
6319 LYXPIPE="/path/to/lyxpipe"
6320 \begin_inset Newline newline
6321 \end_inset
6322
6323 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6324 \begin_inset Newline newline
6325 \end_inset
6326
6327 echo "$COMMAND" > "${LYXPIPE}".in || exit
6328 \begin_inset Newline newline
6329 \end_inset
6330
6331 read < "${LYXPIPE}".out || exit
6332 \end_layout
6333
6334 \begin_layout Standard
6335 where 
6336 \begin_inset Flex Code
6337 status collapsed
6338
6339 \begin_layout Plain Layout
6340 /path/to/lyxpipe
6341 \end_layout
6342
6343 \end_inset
6344
6345  is the Ly
6346 \begin_inset ERT
6347 status collapsed
6348
6349 \begin_layout Plain Layout
6350
6351 {}
6352 \end_layout
6353
6354 \end_inset
6355
6356 XServer pipe path specified in 
6357 \begin_inset Flex MenuItem
6358 status collapsed
6359
6360 \begin_layout Plain Layout
6361 Preferences\SpecialChar \menuseparator
6362 Paths
6363 \end_layout
6364
6365 \end_inset
6366
6367 .
6368 \begin_inset Foot
6369 status collapsed
6370
6371 \begin_layout Plain Layout
6372 In the 
6373 \begin_inset Flex Code
6374 status collapsed
6375
6376 \begin_layout Plain Layout
6377 development/tools
6378 \end_layout
6379
6380 \end_inset
6381
6382  folder of a source distribution you can find a 
6383 \begin_inset Flex Code
6384 status collapsed
6385
6386 \begin_layout Plain Layout
6387 lyxeditor
6388 \end_layout
6389
6390 \end_inset
6391
6392  script which is able to locate the 
6393 \emph on
6394 lyxpipe
6395 \emph default
6396  based on your preferences.
6397 \end_layout
6398
6399 \end_inset
6400
6401
6402 \end_layout
6403
6404 \begin_layout Subsubsection*
6405 MacDviX (Mac OSX)
6406 \end_layout
6407
6408 \begin_layout Standard
6409 At the end of 
6410 \begin_inset Flex Code
6411 status collapsed
6412
6413 \begin_layout Plain Layout
6414 /Applications/MacDviX_Folder/calleditor.script
6415 \end_layout
6416
6417 \end_inset
6418
6419 , add the following lines:
6420 \end_layout
6421
6422 \begin_layout LyX-Code
6423 /Applications/Ly
6424 \begin_inset ERT
6425 status collapsed
6426
6427 \begin_layout Plain Layout
6428
6429 {}
6430 \end_layout
6431
6432 \end_inset
6433
6434 X.app/Contents/MacOS/lyxeditor "$2" $1
6435 \begin_inset Newline newline
6436 \end_inset
6437
6438 exit 1
6439 \end_layout
6440
6441 \begin_layout Standard
6442 Modify the lines accordingly if you install LyX somewhere else than in the
6443  Applications folder.
6444 \end_layout
6445
6446 \begin_layout Standard
6447 Reverse search is triggered by Alt-click (OPTION-click).
6448 \end_layout
6449
6450 \begin_layout Subsubsection*
6451 Skim (Mac OSX)
6452 \end_layout
6453
6454 \begin_layout Standard
6455 Enter 
6456 \begin_inset Flex Code
6457 status collapsed
6458
6459 \begin_layout Plain Layout
6460 open -a Skim.app $$i
6461 \end_layout
6462
6463 \end_inset
6464
6465  to the viewer setting in 
6466 \begin_inset Flex MenuItem
6467 status collapsed
6468
6469 \begin_layout Plain Layout
6470 Preferences\SpecialChar \menuseparator
6471 File Handling\SpecialChar \menuseparator
6472 File formats\SpecialChar \menuseparator
6473 PDF (pdflatex)
6474 \end_layout
6475
6476 \end_inset
6477
6478 , and then in 
6479 \begin_inset Flex MenuItem
6480 status collapsed
6481
6482 \begin_layout Plain Layout
6483 Skim\SpecialChar \menuseparator
6484 Preferences\SpecialChar \menuseparator
6485 Sync
6486 \end_layout
6487
6488 \end_inset
6489
6490  choose 
6491 \begin_inset Flex MenuItem
6492 status collapsed
6493
6494 \begin_layout Plain Layout
6495 custom
6496 \end_layout
6497
6498 \end_inset
6499
6500  preset and enter command 
6501 \begin_inset Flex MenuItem
6502 status collapsed
6503
6504 \begin_layout Plain Layout
6505 /Applications/LyX.app/Contents/MacOS/lyxeditor
6506 \end_layout
6507
6508 \end_inset
6509
6510 .
6511 \end_layout
6512
6513 \begin_layout Standard
6514 Reverse search is triggered by COMMAND-SHIFT-click
6515 \end_layout
6516
6517 \begin_layout Subsubsection*
6518 Okular (KDE)
6519 \end_layout
6520
6521 \begin_layout Standard
6522 Go to 
6523 \begin_inset Flex MenuItem
6524 status collapsed
6525
6526 \begin_layout Plain Layout
6527 Settings\SpecialChar \menuseparator
6528 Configure Okular\SpecialChar \ldots{}
6529 \SpecialChar \menuseparator
6530 Editor
6531 \end_layout
6532
6533 \end_inset
6534
6535 , select 
6536 \begin_inset Quotes eld
6537 \end_inset
6538
6539 Custom Text Editor
6540 \begin_inset Quotes erd
6541 \end_inset
6542
6543  and add the command 
6544 \begin_inset Flex Code
6545 status collapsed
6546
6547 \begin_layout Plain Layout
6548 lyxclient -g %f %l
6549 \end_layout
6550
6551 \end_inset
6552
6553 .
6554 \end_layout
6555
6556 \begin_layout Standard
6557 Reverse search is triggered by SHIFT-click.
6558 \end_layout
6559
6560 \begin_layout Subsubsection*
6561 YAP (Windows)
6562 \end_layout
6563
6564 \begin_layout Standard
6565 Launch yap, choose its 
6566 \begin_inset Flex MenuItem
6567 status collapsed
6568
6569 \begin_layout Plain Layout
6570 View\SpecialChar \menuseparator
6571 Options
6572 \end_layout
6573
6574 \end_inset
6575
6576  menu and select the 
6577 \begin_inset Quotes eld
6578 \end_inset
6579
6580 Inverse DVI Search
6581 \begin_inset Quotes erd
6582 \end_inset
6583
6584  tab.
6585  Click on the 
6586 \begin_inset Quotes eld
6587 \end_inset
6588
6589 New\SpecialChar \ldots{}
6590
6591 \begin_inset Quotes erd
6592 \end_inset
6593
6594  button and, in the window that opens, enter 
6595 \begin_inset Quotes eld
6596 \end_inset
6597
6598 LyX Editor
6599 \begin_inset Quotes erd
6600 \end_inset
6601
6602  (or any other name you like) in the 
6603 \begin_inset Quotes eld
6604 \end_inset
6605
6606 Name:
6607 \begin_inset Quotes erd
6608 \end_inset
6609
6610  field.
6611  Now click on the button labeled 
6612 \begin_inset Quotes eld
6613 \end_inset
6614
6615 \SpecialChar \ldots{}
6616
6617 \begin_inset Quotes erd
6618 \end_inset
6619
6620  to open a file dialog and navigate to the directory containing the batch
6621  file 
6622 \begin_inset Flex Code
6623 status collapsed
6624
6625 \begin_layout Plain Layout
6626 lyxeditor.bat
6627 \end_layout
6628
6629 \end_inset
6630
6631  (see below).
6632  Select 
6633 \begin_inset Flex Code
6634 status collapsed
6635
6636 \begin_layout Plain Layout
6637 lyxeditor.bat
6638 \end_layout
6639
6640 \end_inset
6641
6642  and then specify the program arguments as 
6643 \begin_inset Flex Code
6644 status collapsed
6645
6646 \begin_layout Plain Layout
6647 %f %l
6648 \end_layout
6649
6650 \end_inset
6651
6652 .
6653  The 
6654 \begin_inset Flex Code
6655 status collapsed
6656
6657 \begin_layout Plain Layout
6658 lyxeditor.bat
6659 \end_layout
6660
6661 \end_inset
6662
6663  wrapper is used for communicating with LyX through the 
6664 \emph on
6665 lyxpipe
6666 \emph default
6667  and is as follows:
6668 \end_layout
6669
6670 \begin_layout LyX-Code
6671 @echo off
6672 \begin_inset Newline newline
6673 \end_inset
6674
6675 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6676 \backslash
6677
6678 \backslash
6679 .
6680 \backslash
6681 pipe
6682 \backslash
6683 lyxpipe.in
6684 \begin_inset Newline newline
6685 \end_inset
6686
6687 type 
6688 \backslash
6689
6690 \backslash
6691 .
6692 \backslash
6693 pipe
6694 \backslash
6695 lyxpipe.out
6696 \end_layout
6697
6698 \begin_layout Standard
6699 Make sure that the LyXServer pipe path you specified in LyX is 
6700 \begin_inset Flex Code
6701 status collapsed
6702
6703 \begin_layout Plain Layout
6704
6705 \backslash
6706
6707 \backslash
6708 .
6709 \backslash
6710 pipe
6711 \backslash
6712 lyxpipe
6713 \end_layout
6714
6715 \end_inset
6716
6717 , otherwise change the 
6718 \begin_inset Flex Code
6719 status collapsed
6720
6721 \begin_layout Plain Layout
6722 lyxeditor.bat
6723 \end_layout
6724
6725 \end_inset
6726
6727  wrapper accordingly.
6728 \end_layout
6729
6730 \begin_layout Standard
6731 In yap, reverse search is triggered by double-click.
6732 \end_layout
6733
6734 \begin_layout Subsubsection*
6735 SumatraPDF (Windows)
6736 \end_layout
6737
6738 \begin_layout Standard
6739 In order to use SumatraPDF for inverse search, enter 
6740 \begin_inset Flex Code
6741 status collapsed
6742
6743 \begin_layout Plain Layout
6744 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6745 \end_layout
6746
6747 \end_inset
6748
6749  in the viewer setting in 
6750 \begin_inset Flex MenuItem
6751 status collapsed
6752
6753 \begin_layout Plain Layout
6754 Preferences\SpecialChar \menuseparator
6755 File Handling\SpecialChar \menuseparator
6756 File formats\SpecialChar \menuseparator
6757 PDF (pdflatex)
6758 \end_layout
6759
6760 \end_inset
6761
6762 , where 
6763 \begin_inset Flex Code
6764 status collapsed
6765
6766 \begin_layout Plain Layout
6767 lyxeditor.bat
6768 \end_layout
6769
6770 \end_inset
6771
6772  is the previous wrapper.
6773  If SumatraPDF.exe is not in your command PATH, use its full file name.
6774 \end_layout
6775
6776 \begin_layout Standard
6777 Reverse search is triggered by double-click.
6778 \end_layout
6779
6780 \begin_layout Subsubsection*
6781 YAP (Cygwin)
6782 \end_layout
6783
6784 \begin_layout Standard
6785 First of all, make sure that yap is your default DVI viewer in the Windows
6786  environment, then launch it, choose its 
6787 \begin_inset Flex MenuItem
6788 status collapsed
6789
6790 \begin_layout Plain Layout
6791 View\SpecialChar \menuseparator
6792 Options
6793 \end_layout
6794
6795 \end_inset
6796
6797  menu and select the 
6798 \begin_inset Quotes eld
6799 \end_inset
6800
6801 Inverse DVI Search
6802 \begin_inset Quotes erd
6803 \end_inset
6804
6805  tab.
6806  Click on the 
6807 \begin_inset Quotes eld
6808 \end_inset
6809
6810 New\SpecialChar \ldots{}
6811
6812 \begin_inset Quotes erd
6813 \end_inset
6814
6815  button and, in the window that opens, enter 
6816 \begin_inset Quotes eld
6817 \end_inset
6818
6819 LyX Editor
6820 \begin_inset Quotes erd
6821 \end_inset
6822
6823  (or any other name you like) in the 
6824 \begin_inset Quotes eld
6825 \end_inset
6826
6827 Name:
6828 \begin_inset Quotes erd
6829 \end_inset
6830
6831  field.
6832  Now click on the button labeled 
6833 \begin_inset Quotes eld
6834 \end_inset
6835
6836 \SpecialChar \ldots{}
6837
6838 \begin_inset Quotes erd
6839 \end_inset
6840
6841  to open a file dialog and navigate to the directory containing the 
6842 \begin_inset Flex Code
6843 status collapsed
6844
6845 \begin_layout Plain Layout
6846 lyxeditor.exe
6847 \end_layout
6848
6849 \end_inset
6850
6851  program (which is installed by default on Cygwin along with the LyX executable).
6852  Select 
6853 \begin_inset Flex Code
6854 status collapsed
6855
6856 \begin_layout Plain Layout
6857 lyxeditor.exe
6858 \end_layout
6859
6860 \end_inset
6861
6862  and then specify the program arguments as 
6863 \begin_inset Flex Code
6864 status collapsed
6865
6866 \begin_layout Plain Layout
6867 -g %f %l
6868 \end_layout
6869
6870 \end_inset
6871
6872 .
6873  In this way, you will be using the 
6874 \emph on
6875 lyxsocket
6876 \emph default
6877  for communicating with LyX.
6878  If, for whatever reason, you want to use the 
6879 \emph on
6880 lyxpipe
6881 \emph default
6882 , omit the 
6883 \begin_inset Flex Code
6884 status collapsed
6885
6886 \begin_layout Plain Layout
6887 -g
6888 \end_layout
6889
6890 \end_inset
6891
6892  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6893 \end_layout
6894
6895 \begin_layout Standard
6896 In yap, reverse search is triggered by double-click.
6897 \end_layout
6898
6899 \begin_layout Subsubsection*
6900 SumatraPDF (Cygwin)
6901 \end_layout
6902
6903 \begin_layout Standard
6904 In order to use SumatraPDF for inverse search, enter 
6905 \begin_inset Flex Code
6906 status collapsed
6907
6908 \begin_layout Plain Layout
6909 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6910 \end_layout
6911
6912 \end_inset
6913
6914  in the viewer setting in 
6915 \begin_inset Flex MenuItem
6916 status collapsed
6917
6918 \begin_layout Plain Layout
6919 Preferences\SpecialChar \menuseparator
6920 File Handling\SpecialChar \menuseparator
6921 File formats\SpecialChar \menuseparator
6922 PDF (pdflatex)
6923 \end_layout
6924
6925 \end_inset
6926
6927 .
6928  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6929  The 
6930 \begin_inset Flex Code
6931 status collapsed
6932
6933 \begin_layout Plain Layout
6934 -g
6935 \end_layout
6936
6937 \end_inset
6938
6939  enables communication via the 
6940 \emph on
6941 lyxsocket
6942 \emph default
6943 .
6944  Again, omit the 
6945 \begin_inset Flex Code
6946 status collapsed
6947
6948 \begin_layout Plain Layout
6949 -g
6950 \end_layout
6951
6952 \end_inset
6953
6954  option if you want to use the 
6955 \emph on
6956 lyxpipe
6957 \emph default
6958 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6959 \end_layout
6960
6961 \begin_layout Standard
6962 Reverse search is triggered by double-click.
6963 \end_layout
6964
6965 \begin_layout Section
6966 Forward search
6967 \end_layout
6968
6969 \begin_layout Standard
6970 Forward search is, as the name implies, in a sense the 
6971 \begin_inset Quotes eld
6972 \end_inset
6973
6974 opposite
6975 \begin_inset Quotes erd
6976 \end_inset
6977
6978  of reverse search.
6979  It allows you to let the viewer jump to a given position from within LyX.
6980  If forward search is set up (as described in what follows), you can put
6981  the cursor anywhere in your LyX document, and hit 
6982 \begin_inset Flex MenuItem
6983 status collapsed
6984
6985 \begin_layout Plain Layout
6986 Navigate\SpecialChar \menuseparator
6987 Forward search
6988 \end_layout
6989
6990 \end_inset
6991
6992  (or select 
6993 \begin_inset Flex MenuItem
6994 status collapsed
6995
6996 \begin_layout Plain Layout
6997 Forward search
6998 \end_layout
6999
7000 \end_inset
7001
7002  in the context menu via right mouse click), and then the viewer will jump
7003  to that position as well.
7004  This implies, of course, that your viewer supports this function.
7005 \end_layout
7006
7007 \begin_layout Standard
7008 To make forward search possible, you first need to provide the generated
7009  output PDF/DVI file with additional information about the TeX sources.
7010  This can be done via the methods described in the section 
7011 \begin_inset CommandInset ref
7012 LatexCommand ref
7013 reference "sub:rev-search"
7014
7015 \end_inset
7016
7017 .
7018 \end_layout
7019
7020 \begin_layout Standard
7021 Additionally, you need to configure LyX for using your viewers in 
7022 \begin_inset Flex MenuItem
7023 status collapsed
7024
7025 \begin_layout Plain Layout
7026 Tools\SpecialChar \menuseparator
7027 Preferences\SpecialChar \menuseparator
7028 Output\SpecialChar \menuseparator
7029 General
7030 \end_layout
7031
7032 \end_inset
7033
7034 .
7035  We provide a range of tested configurations for some viewers, which you
7036  can select from the drop down list.
7037  If none of these configurations suits you, you have to find out and enter
7038  a suitable configuration yourself.
7039  The definition syntax uses the following placeholders:
7040 \end_layout
7041
7042 \begin_layout Itemize
7043 \noindent
7044 \begin_inset Flex Code
7045 status collapsed
7046
7047 \begin_layout Plain Layout
7048 $$n
7049 \end_layout
7050
7051 \end_inset
7052
7053 : row number
7054 \end_layout
7055
7056 \begin_layout Itemize
7057 \noindent
7058 \begin_inset Flex Code
7059 status collapsed
7060
7061 \begin_layout Plain Layout
7062 $$t
7063 \end_layout
7064
7065 \end_inset
7066
7067 : name of the (temporary) exported .tex file (without path)
7068 \end_layout
7069
7070 \begin_layout Itemize
7071 \noindent
7072 \begin_inset Flex Code
7073 status collapsed
7074
7075 \begin_layout Plain Layout
7076 $$f
7077 \end_layout
7078
7079 \end_inset
7080
7081 : name of the (temporary) exported .tex file (including path)
7082 \end_layout
7083
7084 \begin_layout Itemize
7085 \noindent
7086 \begin_inset Flex Code
7087 status collapsed
7088
7089 \begin_layout Plain Layout
7090 $$o
7091 \end_layout
7092
7093 \end_inset
7094
7095 : name of the exported output file (either dvi or pdf, depending on which
7096  one exists in the temporary directory)
7097 \end_layout
7098
7099 \begin_layout Standard
7100 Note that only some of the viewers provide full forward search functionality,
7101  among them yap, xdvi, okular and Sumatra PDF.
7102 \begin_inset Foot
7103 status collapsed
7104
7105 \begin_layout Plain Layout
7106 For Sumatra CMCDDE is needed --- downloadable from 
7107 \begin_inset CommandInset href
7108 LatexCommand href
7109 target "http://www.istri.fr/zip/CMCDDE.zip"
7110
7111 \end_inset
7112
7113
7114 \end_layout
7115
7116 \end_inset
7117
7118  While many of the widespread PDF viewers (most notably Adobe Reader) do
7119  not support forward search at all, some other viewers -- e.
7120 \begin_inset space \thinspace{}
7121 \end_inset
7122
7123 g.
7124  evince and xpdf -- allow at least to reload the document and jump to a
7125  specific page of the file, so you can at least navigate 
7126 \begin_inset Quotes eld
7127 \end_inset
7128
7129 near
7130 \begin_inset Quotes erd
7131 \end_inset
7132
7133 .
7134  This latter functionality is provided by an external call of synctex (see
7135  the predefined example configurations).
7136  
7137 \end_layout
7138
7139 \begin_layout Standard
7140 Forward search works both with DVI and PDF output.
7141  LyX simply checks which preview format you have used before (i.
7142 \begin_inset space \thinspace{}
7143 \end_inset
7144
7145 e., which format is already there in the temporary directory) and chooses
7146  the appropriate configuration for the respective format.
7147 \end_layout
7148
7149 \begin_layout Chapter
7150 Special Document Classes
7151 \end_layout
7152
7153 \begin_layout Section
7154 A&A Paper
7155 \end_layout
7156
7157 \begin_layout Standard
7158 by 
7159 \noun on
7160 Peter Sütterlin
7161 \end_layout
7162
7163 \begin_layout Subsection
7164 Introduction
7165 \end_layout
7166
7167 \begin_layout Standard
7168 This section describes how LyX can be used to write articles for submission
7169  to the scientific journal 
7170 \emph on
7171 Astronomy and Astrophysics
7172 \emph default
7173  (www.edpsciences.fr/aa/ 
7174 \begin_inset Flex URL
7175 status collapsed
7176
7177 \begin_layout Plain Layout
7178
7179 http://www.edpsciences.fr/aa/
7180 \end_layout
7181
7182 \end_inset
7183
7184 ) using Version 5.01 of the document class 
7185 \family typewriter
7186 aa.cls
7187 \family default
7188 .
7189  This package can be downloaded from the ftp site
7190 \end_layout
7191
7192 \begin_layout Standard
7193 \begin_inset VSpace medskip
7194 \end_inset
7195
7196
7197 \end_layout
7198
7199 \begin_layout Standard
7200 \align center
7201 \begin_inset Flex URL
7202 status collapsed
7203
7204 \begin_layout Plain Layout
7205
7206 ftp://ftp.edpsciences.org/pub/aa/readme.html
7207 \end_layout
7208
7209 \end_inset
7210
7211
7212 \end_layout
7213
7214 \begin_layout Standard
7215 \begin_inset VSpace medskip
7216 \end_inset
7217
7218
7219 \end_layout
7220
7221 \begin_layout Standard
7222 A manual comes together with that package, and this text is not meant to
7223  replace the original manual but is merely a short guide in how to realize
7224  the correct form of your paper.
7225  
7226 \end_layout
7227
7228 \begin_layout Standard
7229 Please note that the publisher of the journal was changed from Springer
7230  to EDP Sciences starting January 1, 2001.
7231  That change involved also some slight changes to the style files, namely
7232  the removal of the thesaurus command.
7233  The LyX class aa supports the newest version of these style files, V 5.01.
7234  If you have an older version installed, please upgrade.
7235  For compatibility, the old (version 4) layout has been kept as 
7236 \family sans
7237 article (A&A V4)
7238 \family default
7239 .
7240  Please refer to the comments in 
7241 \family typewriter
7242 LyXDir/layouts/aapaper.layout
7243 \family default
7244 .
7245 \end_layout
7246
7247 \begin_layout Subsection
7248 Getting started
7249 \end_layout
7250
7251 \begin_layout Standard
7252 It is recommended you start from the example template distributed with LyX.
7253  If you are not using a template, note the following settings:
7254 \end_layout
7255
7256 \begin_layout Itemize
7257 Select 
7258 \family sans
7259 article (A&A)
7260 \family default
7261  in the 
7262 \family sans
7263 Document\SpecialChar \menuseparator
7264 Settings
7265 \family default
7266  dialog (OK, that one was obvious).
7267 \end_layout
7268
7269 \begin_layout Itemize
7270 Don't change the option 
7271 \family sans
7272 Page
7273 \begin_inset space ~
7274 \end_inset
7275
7276 style
7277 \family default
7278 : Leave it set to 
7279 \family sans
7280 default
7281 \family default
7282 .
7283  The whole layout is done by the macros, you shouldn't change anything.
7284 \end_layout
7285
7286 \begin_layout Subsection
7287 The header block
7288 \end_layout
7289
7290 \begin_layout Standard
7291 First thing to enter is the header information.
7292  It consists of seven entries, of which some are optional.
7293  They are
7294 \end_layout
7295
7296 \begin_layout Itemize
7297
7298 \family sans
7299 Title
7300 \family default
7301 : [required] 
7302 \end_layout
7303
7304 \begin_layout Itemize
7305
7306 \family sans
7307 Subtitle
7308 \family default
7309 : [optional] 
7310 \end_layout
7311
7312 \begin_layout Itemize
7313
7314 \family sans
7315 Author
7316 \family default
7317 : [required]
7318 \end_layout
7319
7320 \begin_layout Itemize
7321
7322 \family sans
7323 Address
7324 \family default
7325 : [required]
7326 \end_layout
7327
7328 \begin_layout Itemize
7329
7330 \family sans
7331 Offprints
7332 \family default
7333 : [optional] if more than one author: whom to contact for offprint requests.
7334 \end_layout
7335
7336 \begin_layout Itemize
7337
7338 \family sans
7339 Mail
7340 \family default
7341 : [optional] mail address for contacts.
7342 \end_layout
7343
7344 \begin_layout Itemize
7345
7346 \family sans
7347 Date
7348 \family default
7349 : [required].
7350  Suggested format is 
7351 \family typewriter
7352 Received: <date>; Accepted <date> 
7353 \end_layout
7354
7355 \begin_layout Standard
7356 There is no need to issue the 
7357 \family typewriter
7358
7359 \backslash
7360 maketitle
7361 \family default
7362  command, this is done automatically by LyX when the header is finished.
7363  Although the order of the single header entries doesn't matter it is advised
7364  to keep the above sequence, just to get the best optics and meets the layout
7365  of the real document.
7366 \end_layout
7367
7368 \begin_layout Standard
7369 If you want to place footnotes in the header block, e.
7370 \begin_inset space \thinspace{}
7371 \end_inset
7372
7373 g.
7374 \begin_inset space \space{}
7375 \end_inset
7376
7377 to state your present address, just use the standard footnote via the menu
7378  
7379 \family sans
7380 Insert\SpecialChar \menuseparator
7381 Footnote.
7382
7383 \family default
7384  LyX will automagically use the term 
7385 \family typewriter
7386
7387 \backslash
7388 thanks{}
7389 \family default
7390  in that case.
7391 \end_layout
7392
7393 \begin_layout Standard
7394 In addition to these topics, the macros use three additional LaTeX commands
7395  that have no counterpart in LyX:
7396 \end_layout
7397
7398 \begin_layout Itemize
7399
7400 \family typewriter
7401
7402 \backslash
7403 and
7404 \family default
7405  to separate different names for more than one author and institute, respectivel
7406 y.
7407 \end_layout
7408
7409 \begin_layout Itemize
7410
7411 \family typewriter
7412
7413 \backslash
7414 inst{<nr>}
7415 \family default
7416 to mark corresponding author/institute pairs.
7417  The institutes are numbered sequentially as they appear in the 
7418 \family sans
7419 Address
7420 \family default
7421  field, so you have to put a marker to each author.
7422 \end_layout
7423
7424 \begin_layout Itemize
7425
7426 \family typewriter
7427
7428 \backslash
7429 email{address}
7430 \family default
7431  to supply an email address for fast contact.
7432 \end_layout
7433
7434 \begin_layout Standard
7435 In all cases, the appropriate command has to be entered in LyX and marked
7436  as LaTeX code.
7437  See the examples.
7438  
7439 \end_layout
7440
7441 \begin_layout Subsection
7442 The abstract
7443 \end_layout
7444
7445 \begin_layout Standard
7446 The abstract should immediately follow the header block.
7447  With version 5 the abstract environment was changed to a command, and there
7448  is now a resctriction to only one paragraph.
7449  In addition, it should contain an entry with the keywords.
7450  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7451  command 
7452 \family typewriter
7453
7454 \backslash
7455 keywords{}
7456 \family default
7457  by hand and mark it as LaTeX code.
7458  Refer to the example paper.
7459 \end_layout
7460
7461 \begin_layout Subsection
7462 Supported environments
7463 \end_layout
7464
7465 \begin_layout Standard
7466 The A&A paper layout supports the following environments for structuring
7467  your text:
7468 \end_layout
7469
7470 \begin_layout Itemize
7471
7472 \family sans
7473 Standard
7474 \end_layout
7475
7476 \begin_layout Itemize
7477
7478 \family sans
7479 Section
7480 \end_layout
7481
7482 \begin_layout Itemize
7483
7484 \family sans
7485 Subsection
7486 \end_layout
7487
7488 \begin_layout Itemize
7489
7490 \family sans
7491 Subsubsection
7492 \end_layout
7493
7494 \begin_layout Itemize
7495
7496 \family sans
7497 Itemize
7498 \end_layout
7499
7500 \begin_layout Itemize
7501
7502 \family sans
7503 Enumerate
7504 \end_layout
7505
7506 \begin_layout Itemize
7507
7508 \family sans
7509 Description
7510 \end_layout
7511
7512 \begin_layout Itemize
7513
7514 \family sans
7515 Caption
7516 \end_layout
7517
7518 \begin_layout Itemize
7519
7520 \family sans
7521 Abstract
7522 \end_layout
7523
7524 \begin_layout Itemize
7525
7526 \family sans
7527 Acknowledgment
7528 \end_layout
7529
7530 \begin_layout Itemize
7531
7532 \family sans
7533 Bibliography
7534 \end_layout
7535
7536 \begin_layout Itemize
7537
7538 \family sans
7539 LaTeX
7540 \end_layout
7541
7542 \begin_layout Subsection
7543 Commands not supported by LyX
7544 \end_layout
7545
7546 \begin_layout Standard
7547 Some commands are not yet supported by the 
7548 \family sans
7549 paper (A&A)
7550 \family default
7551  layout for LyX.
7552  Some have already been mentioned.
7553  For the sake of completeness, they are listed all together here:
7554 \end_layout
7555
7556 \begin_layout Itemize
7557
7558 \family typewriter
7559
7560 \backslash
7561 and
7562 \end_layout
7563
7564 \begin_layout Itemize
7565
7566 \family typewriter
7567
7568 \backslash
7569 email
7570 \end_layout
7571
7572 \begin_layout Itemize
7573
7574 \family typewriter
7575
7576 \backslash
7577 appendix
7578 \end_layout
7579
7580 \begin_layout Itemize
7581
7582 \family typewriter
7583
7584 \backslash
7585 authorrunning
7586 \end_layout
7587
7588 \begin_layout Itemize
7589
7590 \family typewriter
7591
7592 \backslash
7593 inst{}
7594 \end_layout
7595
7596 \begin_layout Itemize
7597
7598 \family typewriter
7599
7600 \backslash
7601 keywords{}
7602 \end_layout
7603
7604 \begin_layout Itemize
7605
7606 \family typewriter
7607
7608 \backslash
7609 object{}
7610 \end_layout
7611
7612 \begin_layout Itemize
7613
7614 \family typewriter
7615
7616 \backslash
7617 titlerunning{}
7618 \end_layout
7619
7620 \begin_layout Standard
7621 If you want to use any of these commands, you have to enter them yourself.
7622  
7623 \series bold
7624 Do not forget to mark them as LaTeX code!
7625 \end_layout
7626
7627 \begin_layout Subsection
7628 Figure and Table Floats
7629 \end_layout
7630
7631 \begin_layout Standard
7632 LyX provides support for the necessary float environments 
7633 \family sans
7634 figure, figure*, table
7635 \family default
7636  and 
7637 \family sans
7638 table*
7639 \family default
7640 , therefore we won't tell much about it here.
7641  Refer to the 
7642 \emph on
7643 User's
7644 \begin_inset space ~
7645 \end_inset
7646
7647 Guide
7648 \emph default
7649 .
7650  Just remember that tables should be left-aligned.
7651  For that, select the table and change the alignment in 
7652 \family sans
7653 Edit\SpecialChar \menuseparator
7654 Paragraph
7655 \begin_inset space ~
7656 \end_inset
7657
7658 Settings.
7659 \end_layout
7660
7661 \begin_layout Standard
7662 There is only one special thing: the figures with caption besides the figure.
7663  To create such a figure, you have to do the following:
7664 \end_layout
7665
7666 \begin_layout Enumerate
7667 Create a wide figure float: 
7668 \family sans
7669 Insert\SpecialChar \menuseparator
7670 Float\SpecialChar \menuseparator
7671 Figure
7672 \family default
7673 , then right click in the figure and select 
7674 \family sans
7675 \bar under
7676 S
7677 \bar default
7678 pan
7679 \begin_inset space ~
7680 \end_inset
7681
7682 columns
7683 \family default
7684 .
7685 \end_layout
7686
7687 \begin_layout Enumerate
7688 Enter your caption text.
7689 \end_layout
7690
7691 \begin_layout Enumerate
7692 Press 
7693 \family sans
7694 Return
7695 \family default
7696  to move the cursor above the caption.
7697 \end_layout
7698
7699 \begin_layout Enumerate
7700 Insert your figure
7701 \end_layout
7702
7703 \begin_layout Enumerate
7704 Position the cursor behind the figure and insert a horizontal fill: 
7705 \family sans
7706 Insert\SpecialChar \menuseparator
7707 Special
7708 \begin_inset space ~
7709 \end_inset
7710
7711 Character\SpecialChar \menuseparator
7712 Horizontal
7713 \begin_inset space ~
7714 \end_inset
7715
7716 Fill
7717 \family default
7718 .
7719 \end_layout
7720
7721 \begin_layout Enumerate
7722 Switch to LaTeX mode: 
7723 \family sans
7724 M-c
7725 \begin_inset space ~
7726 \end_inset
7727
7728 t
7729 \family default
7730 .
7731 \end_layout
7732
7733 \begin_layout Enumerate
7734 Enter 
7735 \family typewriter
7736
7737 \backslash
7738 parbox[b]{55mm}{
7739 \family default
7740 .
7741  
7742 \series bold
7743 Do not close the brace!
7744 \end_layout
7745
7746 \begin_layout Enumerate
7747 Position the cursor behind the caption text, switch to LaTeX mode and insert
7748  the closing brace: 
7749 \family sans
7750 M-c
7751 \begin_inset space ~
7752 \end_inset
7753
7754 t
7755 \family default
7756  
7757 \family typewriter
7758 }
7759 \family default
7760 .
7761 \end_layout
7762
7763 \begin_layout Standard
7764 Also, refer to the figures in the example paper.
7765 \end_layout
7766
7767 \begin_layout Subsection
7768 Referee layout
7769 \end_layout
7770
7771 \begin_layout Standard
7772 For submission, the paper has to be formated in a special double-spacing
7773  layout.
7774  For this purpose, you have to give the option 
7775 \family typewriter
7776 referee
7777 \family default
7778  to the documentclass.
7779  This must be done using the extra class options field in the 
7780 \family sans
7781 Document\SpecialChar \menuseparator
7782 Settings
7783 \family default
7784  dialog.
7785  Just enter the string 
7786 \family typewriter
7787 referee
7788 \family default
7789  there.
7790 \end_layout
7791
7792 \begin_layout Subsection
7793 The example paper
7794 \end_layout
7795
7796 \begin_layout Standard
7797 The 
7798 \family sans
7799 Examples
7800 \family default
7801  directory contains an example paper written with LyX.
7802  It is the example paper from the original macro package, translated to
7803  LyX.
7804  Use it for inspiration, and compare the original LaTeX code with LyX way
7805  of writing.
7806 \end_layout
7807
7808 \begin_layout Section
7809 AASTeX
7810 \end_layout
7811
7812 \begin_layout Standard
7813 by 
7814 \noun on
7815 Mike Ressler
7816 \end_layout
7817
7818 \begin_layout Subsection
7819 Introduction
7820 \end_layout
7821
7822 \begin_layout Standard
7823 AASTeX is a set of macros produced by the American Astronomical Society
7824  to facilitate electronic manuscript submission to the three journals they
7825  publish: the Astrophysical Journal (including the Letters and Supplement),
7826  the Astronomical Journal, and the Publications of the Astronomical Society
7827  of the Pacific.
7828  LyX has proven to be an excellent tool for generating these documents,
7829  especially given its equation, citation, and figure handling capabilities.
7830  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7831  is the version described here, or higher.
7832  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7833  incompatible with LyX.
7834  The AASTeX package may be downloaded from the AASTeX Web site
7835 \end_layout
7836
7837 \begin_layout Standard
7838 \begin_inset VSpace medskip
7839 \end_inset
7840
7841
7842 \end_layout
7843
7844 \begin_layout Standard
7845 \align center
7846 \begin_inset Flex URL
7847 status collapsed
7848
7849 \begin_layout Plain Layout
7850
7851 http://www.journals.uchicago.edu/AAS/AASTeX
7852 \end_layout
7853
7854 \end_inset
7855
7856
7857 \end_layout
7858
7859 \begin_layout Standard
7860 \begin_inset VSpace medskip
7861 \end_inset
7862
7863
7864 \end_layout
7865
7866 \begin_layout Standard
7867 A complete user guide is contained in that package and you should familiarize
7868  yourself with it thoroughly before embarking on writing a paper in LyX.
7869  LyX will not reduce the need to figure out all the AASTeX commands, it
7870  will only reduce the drudgery of typing everything in.
7871  It is your responsibility to ensure that the final exported LaTeX document
7872  conforms completely to the requirements of the journal to which you are
7873  submitting your paper.
7874 \end_layout
7875
7876 \begin_layout Subsection
7877 Starting a New Paper
7878 \end_layout
7879
7880 \begin_layout Standard
7881 I strongly suggest that you start with the AASTeX template file.
7882  Click on 
7883 \family sans
7884 File\SpecialChar \menuseparator
7885 New from
7886 \family default
7887  
7888 \family sans
7889 Template
7890 \family default
7891 , enter the new file name, then choose the 
7892 \family typewriter
7893 aastex.lyx
7894 \family default
7895  template.
7896  This will show the most common fields found in a manuscript.
7897  Simply overwrite the existing text (including the brackets, 
7898 \family typewriter
7899 <>
7900 \family default
7901 ) with the correct information.
7902  Many of the AASTeX commands and environments can be implemented directly
7903  in LyX, but some cannot: most noticeably 
7904 \family typewriter
7905
7906 \backslash
7907 altaffilmark
7908 \family default
7909  and 
7910 \family typewriter
7911
7912 \backslash
7913 altaffiltext
7914 \family default
7915 , which should stick out like a sore thumb if you actually just opened the
7916  template file.
7917  For commands such as these, the LaTeX code must be entered directly and
7918  marked as such.
7919  Such commands are referred to as TeX code, or Evil Red Text.
7920  I tried to minimize the amount of TeX code needed in an AASTeX document,
7921  but there is still a bit more required than any of us would like.
7922 \end_layout
7923
7924 \begin_layout Subsection
7925 Finishing Your Paper
7926 \end_layout
7927
7928 \begin_layout Standard
7929 When the paper is finished to your satisfaction and previews/prints correctly,
7930  there are a few 
7931 \begin_inset Quotes eld
7932 \end_inset
7933
7934 postprocessing
7935 \begin_inset Quotes erd
7936 \end_inset
7937
7938  actions which need to be done before you submit it to the journals.
7939  
7940 \end_layout
7941
7942 \begin_layout Enumerate
7943 Export your paper as a LaTeX file (
7944 \family sans
7945 File\SpecialChar \menuseparator
7946 Export\SpecialChar \menuseparator
7947 LaTeX
7948 \family default
7949 ).
7950  
7951 \end_layout
7952
7953 \begin_layout Enumerate
7954 Edit the resulting 
7955 \family typewriter
7956 .tex
7957 \family default
7958  file with your favorite text editor
7959 \end_layout
7960
7961 \begin_deeper
7962 \begin_layout Enumerate
7963 remove the comment lines before the 
7964 \family typewriter
7965
7966 \backslash
7967 documentclass
7968 \family default
7969  command
7970 \end_layout
7971
7972 \begin_layout Enumerate
7973 remove the 
7974 \family typewriter
7975
7976 \backslash
7977 usepackage...{fontenc}
7978 \family default
7979  line if it appears (usually just after 
7980 \family typewriter
7981
7982 \backslash
7983 documentclass
7984 \family default
7985 }; also remove the 
7986 \family typewriter
7987
7988 \backslash
7989 secnumdepth
7990 \family default
7991  line if it appears.
7992 \end_layout
7993
7994 \begin_layout Enumerate
7995 remove everything between (and including) the 
7996 \family typewriter
7997
7998 \backslash
7999 makeatletter
8000 \family default
8001  and 
8002 \family typewriter
8003
8004 \backslash
8005 makeatother
8006 \family default
8007  commands, except for any commands you specifically put into the LaTeX preamble
8008  (which should appear immediately after the 
8009 \begin_inset Quotes eld
8010 \end_inset
8011
8012 User specified LaTeX commands
8013 \begin_inset Quotes erd
8014 \end_inset
8015
8016  comment in the 
8017 \family typewriter
8018 .tex
8019 \family default
8020  file).
8021 \end_layout
8022
8023 \end_deeper
8024 \begin_layout Enumerate
8025 Run the resulting file through LaTeX to make sure it still processes correctly.
8026 \end_layout
8027
8028 \begin_layout Enumerate
8029 Reread the journal requirements to make sure your filenames and formats
8030  are correct.
8031 \end_layout
8032
8033 \begin_layout Enumerate
8034 Submit it.
8035 \end_layout
8036
8037 \begin_layout Subsection
8038 Comments On Specific Commands
8039 \end_layout
8040
8041 \begin_layout Standard
8042 I will not describe the detailed usage of the individual AASTeX commands:
8043  the AASTeX User Guide (
8044 \family typewriter
8045 aasguide.tex
8046 \family default
8047 ) gives a good description of each.
8048  Thus it's probably easiest for me to go down the list as found in the guide
8049  and offer comments where necessary.
8050  So let's begin \SpecialChar \ldots{}
8051
8052 \end_layout
8053
8054 \begin_layout Subsubsection
8055 Things that work as expected
8056 \end_layout
8057
8058 \begin_layout Standard
8059 Because they work as you might expect, I simply list them and the section
8060  they are found in: 
8061 \family typewriter
8062
8063 \backslash
8064 documentclass
8065 \family default
8066  (2.1.1), 
8067 \family typewriter
8068
8069 \backslash
8070 begin{document}
8071 \family default
8072  (2.2), 
8073 \family typewriter
8074
8075 \backslash
8076 title
8077 \family default
8078  (2.3), 
8079 \family typewriter
8080
8081 \backslash
8082 author
8083 \family default
8084  (2.3), 
8085 \family typewriter
8086
8087 \backslash
8088 affil
8089 \family default
8090  (2.3), 
8091 \family typewriter
8092
8093 \backslash
8094 abstract
8095 \family default
8096  (2.4), 
8097 \family typewriter
8098
8099 \backslash
8100 keywords
8101 \family default
8102  (2.5), 
8103 \family typewriter
8104
8105 \backslash
8106 section
8107 \family default
8108  (2.7), 
8109 \family typewriter
8110
8111 \backslash
8112 subsection
8113 \family default
8114  (2.7), 
8115 \family typewriter
8116
8117 \backslash
8118 subsubsection
8119 \family default
8120  (2.7), 
8121 \family typewriter
8122
8123 \backslash
8124 paragraph
8125 \family default
8126  (2.7), 
8127 \family typewriter
8128
8129 \backslash
8130 facility
8131 \family default
8132  (2.10), 
8133 \family typewriter
8134
8135 \backslash
8136 begin{displaymath}
8137 \family default
8138  (2.12), 
8139 \family typewriter
8140
8141 \backslash
8142 begin{equation}
8143 \family default
8144  (2.12), 
8145 \family typewriter
8146
8147 \backslash
8148 begin{eqnarray}
8149 \family default
8150  (2.12), 
8151 \family typewriter
8152
8153 \backslash
8154 begin{mathletters}
8155 \family default
8156  (2.12), 
8157 \family typewriter
8158
8159 \backslash
8160 begin{thebibliography}
8161 \family default
8162  (2.13.1), 
8163 \family typewriter
8164
8165 \backslash
8166 bibitem
8167 \family default
8168  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8169  graphicx figure commands (2.14.1), 
8170 \family typewriter
8171
8172 \backslash
8173 begin{table}
8174 \family default
8175  (2.15.4), 
8176 \family typewriter
8177
8178 \backslash
8179 begin{tabular}
8180 \family default
8181  (2.15.4), 
8182 \family typewriter
8183
8184 \backslash
8185 caption
8186 \family default
8187  (2.15.4), 
8188 \family typewriter
8189
8190 \backslash
8191 label
8192 \family default
8193  (2.15.4, amongst other places), 
8194 \family typewriter
8195
8196 \backslash
8197 tablerefs
8198 \family default
8199  (2.15.5), 
8200 \family typewriter
8201
8202 \backslash
8203 tablecomments
8204 \family default
8205  (2.15.5), 
8206 \family typewriter
8207
8208 \backslash
8209 url
8210 \family default
8211  (2.17.4), 
8212 \family typewriter
8213
8214 \backslash
8215 end{document}
8216 \family default
8217  (2.18).
8218 \end_layout
8219
8220 \begin_layout Standard
8221 The following style options also work correctly: 
8222 \family typewriter
8223 longabstract
8224 \family default
8225  (2.4), 
8226 \family typewriter
8227 preprint
8228 \family default
8229  (3.2.1), 
8230 \family typewriter
8231 preprint2
8232 \family default
8233  (3.2.2), 
8234 \family typewriter
8235 eqsecnum
8236 \family default
8237  (3.3), 
8238 \family typewriter
8239 flushrt
8240 \family default
8241  (3.4).
8242  Simply put them in the 
8243 \family sans
8244 Options
8245 \family default
8246  box in 
8247 \family sans
8248 Layout\SpecialChar \menuseparator
8249 Document
8250 \family default
8251 .
8252 \end_layout
8253
8254 \begin_layout Subsubsection
8255 Things that work, but require more comment
8256 \end_layout
8257
8258 \begin_layout Standard
8259 The following items work, but require a little more discussion:
8260 \end_layout
8261
8262 \begin_layout Itemize
8263 These items are reserved for use by the journal editors, but you can put
8264  them into the LaTeX preamble if you feel compelled to do so: 
8265 \family typewriter
8266
8267 \backslash
8268 received
8269 \family default
8270
8271 \family typewriter
8272
8273 \backslash
8274 revised
8275 \family default
8276
8277 \family typewriter
8278
8279 \backslash
8280 accepted
8281 \family default
8282
8283 \family typewriter
8284
8285 \backslash
8286 ccc
8287 \family default
8288
8289 \family typewriter
8290
8291 \backslash
8292 cpright
8293 \family default
8294  (all from 2.1.3)
8295 \end_layout
8296
8297 \begin_layout Itemize
8298 These items may be placed in the LaTeX preamble, and are included as blanks
8299  in the template file: 
8300 \family typewriter
8301
8302 \backslash
8303 slugcomment
8304 \family default
8305  (2.1.4), 
8306 \family typewriter
8307
8308 \backslash
8309 shorttitle
8310 \family default
8311  (2.1.5), 
8312 \family typewriter
8313
8314 \backslash
8315 shortauthors
8316 \family default
8317  (2.1.5)
8318 \end_layout
8319
8320 \begin_layout Itemize
8321
8322 \family typewriter
8323
8324 \backslash
8325 email
8326 \family default
8327  (2.3) – can only be used 
8328 \begin_inset Quotes eld
8329 \end_inset
8330
8331 standalone
8332 \begin_inset Quotes erd
8333 \end_inset
8334
8335 , not in the middle of a paragraph.
8336  Use TeX code if you need to embed it.
8337 \end_layout
8338
8339 \begin_layout Itemize
8340
8341 \family typewriter
8342
8343 \backslash
8344 and
8345 \family default
8346  (2.3) – will have extra {} after it.
8347  This should not cause an error.
8348 \end_layout
8349
8350 \begin_layout Itemize
8351
8352 \family typewriter
8353
8354 \backslash
8355 notetoeditor
8356 \family default
8357  (2.6) – can only be used 
8358 \begin_inset Quotes eld
8359 \end_inset
8360
8361 standalone
8362 \begin_inset Quotes erd
8363 \end_inset
8364
8365 , not in the middle of a paragraph.
8366  Use TeX code if you need to embed it.
8367 \end_layout
8368
8369 \begin_layout Itemize
8370
8371 \family typewriter
8372
8373 \backslash
8374 placetable
8375 \family default
8376  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8377  hand
8378 \end_layout
8379
8380 \begin_layout Itemize
8381
8382 \family typewriter
8383
8384 \backslash
8385 placefigure
8386 \family default
8387  (2.8) – same as for 
8388 \family typewriter
8389
8390 \backslash
8391 placetable
8392 \end_layout
8393
8394 \begin_layout Itemize
8395
8396 \family typewriter
8397
8398 \backslash
8399 acknowledgements
8400 \family default
8401  (2.9) – will have extra {} after it.
8402  This should not cause an error.
8403 \end_layout
8404
8405 \begin_layout Itemize
8406
8407 \family typewriter
8408
8409 \backslash
8410 appendix
8411 \family default
8412  (2.11) – will have extra {} after it.
8413  This should not cause an error.
8414 \end_layout
8415
8416 \begin_layout Itemize
8417
8418 \family typewriter
8419
8420 \backslash
8421 figcaption
8422 \family default
8423  (2.14.2) – you can insert an optional filename argument by placing the cursor
8424  at the beginning of the text and selecting 
8425 \family sans
8426 Insert\SpecialChar \menuseparator
8427 Short Title
8428 \family default
8429 .
8430  
8431 \begin_inset Quotes eld
8432 \end_inset
8433
8434 Short Title
8435 \begin_inset Quotes erd
8436 \end_inset
8437
8438  inserts an optional argument of the type needed by 
8439 \family typewriter
8440
8441 \backslash
8442 figcaption
8443 \family default
8444 .
8445  Hopefully it will be renamed someday.
8446 \end_layout
8447
8448 \begin_layout Itemize
8449
8450 \family typewriter
8451
8452 \backslash
8453 objectname
8454 \family default
8455  (2.17.1) – same as 
8456 \family typewriter
8457
8458 \backslash
8459 figcaption
8460 \family default
8461  for the catalog ID optional parameter
8462 \end_layout
8463
8464 \begin_layout Itemize
8465
8466 \family typewriter
8467
8468 \backslash
8469 dataset
8470 \family default
8471  (2.17.1) – same as 
8472 \family typewriter
8473
8474 \backslash
8475 figcaption
8476 \family default
8477  for the catalog ID optional parameter
8478 \end_layout
8479
8480 \begin_layout Subsubsection
8481 Things not implemented, use TeX code
8482 \end_layout
8483
8484 \begin_layout Standard
8485
8486 \family typewriter
8487
8488 \backslash
8489 altaffilmark
8490 \family default
8491  (2.3), 
8492 \family typewriter
8493
8494 \backslash
8495 altaffiltext
8496 \family default
8497  (2.3), 
8498 \family typewriter
8499
8500 \backslash
8501 eqnum
8502 \family default
8503  (2.12), 
8504 \family typewriter
8505
8506 \backslash
8507 setcounter{equation}
8508 \family default
8509  (2.12), Journal name abbreviations (2.13.4), 
8510 \family typewriter
8511
8512 \backslash
8513 figurenum
8514 \family default
8515  (2.14.1), 
8516 \family typewriter
8517
8518 \backslash
8519 epsscale
8520 \family default
8521  (2.14.1), 
8522 \family typewriter
8523
8524 \backslash
8525 plotone
8526 \family default
8527  (2.14.1), 
8528 \family typewriter
8529
8530 \backslash
8531 plottwo
8532 \family default
8533  (2.14.1), 
8534 \family typewriter
8535
8536 \backslash
8537 tablenum
8538 \family default
8539  (2.15.4), 
8540 \family typewriter
8541
8542 \backslash
8543 tableline
8544 \family default
8545  (2.15.4, insert it as the first element in the lefthand cell after where
8546  you want it.
8547  Don't use any of LyX's rules in the table), 
8548 \family typewriter
8549
8550 \backslash
8551 tablenotemark
8552 \family default
8553  (2.15.5), 
8554 \family typewriter
8555
8556 \backslash
8557 tablenotetext
8558 \family default
8559  (2.15.5), much of Misc (2.17, except 
8560 \family typewriter
8561
8562 \backslash
8563 objectname
8564 \family default
8565
8566 \family typewriter
8567
8568 \backslash
8569 dataset
8570 \family default
8571
8572 \family typewriter
8573
8574 \backslash
8575 url
8576 \family default
8577 , and 
8578 \family typewriter
8579
8580 \backslash
8581 email
8582 \family default
8583 ; see above), 
8584 \family typewriter
8585
8586 \backslash
8587 singlespace
8588 \family default
8589  (3.1), 
8590 \family typewriter
8591
8592 \backslash
8593 doublespace
8594 \family default
8595  (3.1), 
8596 \family typewriter
8597
8598 \backslash
8599 onecolumn
8600 \family default
8601  (3.2), 
8602 \family typewriter
8603
8604 \backslash
8605 twocolumn
8606 \family default
8607  (3.2)
8608 \end_layout
8609
8610 \begin_layout Subsubsection
8611 Things that cannot be implemented
8612 \end_layout
8613
8614 \begin_layout Standard
8615 \SpecialChar \ldots{}
8616  at least in any meaningful sort of way, so I suggest ignoring them.
8617  They are the references environment (2.13.3), and the deluxetable environment
8618  (2.15).
8619  If you really, really need to use deluxetable, I suggest editing it in
8620  a separate file with a text editor, then using 
8621 \family sans
8622 Insert\SpecialChar \menuseparator
8623 Child
8624 \begin_inset space ~
8625 \end_inset
8626
8627 Document
8628 \family default
8629  to include it in your LyX document.
8630  See the 
8631 \family typewriter
8632 aas_sample.lyx
8633 \family default
8634  file to see an example of this.
8635 \end_layout
8636
8637 \begin_layout Subsection
8638 FAQs, Tips, Tricks, and Other Ruminations
8639 \end_layout
8640
8641 \begin_layout Subsubsection
8642 Getting LyX and AASTeX to cooperate
8643 \end_layout
8644
8645 \begin_layout Standard
8646 It can be a bit tricky to get LyX to recognize a new layout and document
8647  class.
8648  When all else fails, do this:
8649 \end_layout
8650
8651 \begin_layout Enumerate
8652 Make certain that LaTeX can find AASTeX.
8653  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8654  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8655 \family typewriter
8656 sample.tex
8657 \family default
8658 .
8659 \end_layout
8660
8661 \begin_layout Enumerate
8662 Make certain that 
8663 \family typewriter
8664 aastex.layout
8665 \family default
8666  appears in LyX's 
8667 \family typewriter
8668 layouts
8669 \family default
8670  folder
8671 \end_layout
8672
8673 \begin_layout Enumerate
8674 Rerun 
8675 \family sans
8676 Tools\SpecialChar \menuseparator
8677 Reconfigure
8678 \family default
8679  in LyX, then restart LyX.
8680 \end_layout
8681
8682 \begin_layout Enumerate
8683 Open a regular new file, not from a template.
8684  Does AASTeX appear in the class list in 
8685 \family sans
8686 Document\SpecialChar \menuseparator
8687 Settings
8688 \family default
8689 ?
8690 \end_layout
8691
8692 \begin_layout Standard
8693 If you get a warning from an existing AASTeX document about not being able
8694  to find the AASTeX layout or a message about 
8695 \begin_inset Quotes eld
8696 \end_inset
8697
8698 You should not mix title layouts with normal ones
8699 \begin_inset Quotes erd
8700 \end_inset
8701
8702 , things haven't been installed correctly.
8703 \end_layout
8704
8705 \begin_layout Subsubsection
8706 LaTeX error processing a table 
8707 \end_layout
8708
8709 \begin_layout Standard
8710 LyX, by default, attempts to center the table caption/title.
8711  This seems to produce a bad interaction in AASTeX so you should click somewhere
8712  in the caption/title, then select 
8713 \family sans
8714 Edit\SpecialChar \menuseparator
8715 Paragraph
8716 \begin_inset space ~
8717 \end_inset
8718
8719 Settings
8720 \family default
8721 , then set the 
8722 \family sans
8723 Alignment
8724 \family default
8725  to 
8726 \family sans
8727 Block
8728 \family default
8729 .
8730  This took care of it for me.
8731 \end_layout
8732
8733 \begin_layout Subsubsection
8734 References
8735 \end_layout
8736
8737 \begin_layout Standard
8738 A couple of things: 1) I have noticed some funny spacing in the reference
8739  entries in the text.
8740  When you enter the bibliography item data, make sure their is 
8741 \emph on
8742 no
8743 \emph default
8744  space between the last author and the parenthesis setting off the year;
8745  
8746 \emph on
8747 e.
8748 \begin_inset space \thinspace{}
8749 \end_inset
8750
8751 g.
8752 \begin_inset space \space{}
8753 \end_inset
8754
8755
8756 \emph default
8757 type 
8758 \family typewriter
8759 Ressler(1992)
8760 \family default
8761 , not 
8762 \family typewriter
8763 Ressler (1992)
8764 \family default
8765 .
8766  2) Entering the references at all is not obvious.
8767  The easiest thing is to start typing your first reference at the end of
8768  the document, then mark it as type 
8769 \family sans
8770 References
8771 \family default
8772 .
8773  That will put a small gray box in front of what you just typed.
8774  Click on the box to fill in the rest of the information.
8775  For new references, go to the end of an existing reference and press return.
8776  That will create a new line with its own box, etc.
8777 \end_layout
8778
8779 \begin_layout Subsubsection
8780 Including EPS files
8781 \end_layout
8782
8783 \begin_layout Standard
8784 Even though AASTeX provides its own figure commands (
8785 \family typewriter
8786
8787 \backslash
8788 plotone
8789 \family default
8790 , for example), I much prefer LaTeX's standard figure commands (with the
8791  default graphicx).
8792  You can insert the 
8793 \family typewriter
8794
8795 \backslash
8796 plotone
8797 \family default
8798 , etc.
8799 \begin_inset space ~
8800 \end_inset
8801
8802 commands as TeX code into a Figure Float box if you desire, but I never
8803  have much luck getting the layout right.
8804  With the standard graphics, LyX will insert a 
8805 \family typewriter
8806
8807 \backslash
8808 usepackage{graphicx}
8809 \family default
8810  command into the LaTeX preamble and handle the figures in the standard
8811  LaTeX2e way, interspersing the figures in the text.
8812  I believe ApJ accepts figures exactly this way now; AJ might still use
8813  the 
8814 \begin_inset Quotes eld
8815 \end_inset
8816
8817 stack everything at the end
8818 \begin_inset Quotes erd
8819 \end_inset
8820
8821  technique.
8822 \end_layout
8823
8824 \begin_layout Subsubsection
8825 Things I could have done, but didn't
8826 \end_layout
8827
8828 \begin_layout Standard
8829 There are a few 
8830 \begin_inset Quotes eld
8831 \end_inset
8832
8833 pretty
8834 \begin_inset Quotes erd
8835 \end_inset
8836
8837  things I could have implemented, but chose not to.
8838  For instance, I saw no point in double-spacing the text in the LyX window,
8839  even though it is double-spaced in the paper manuscript.
8840  Also, I chose not to make separate layouts for the preprint and preprint2
8841  styles.
8842  Since I assume you will spend most of your time in the plain manuscript
8843  mode anyway, I decided not to chew up more disk space with this.
8844  
8845 \end_layout
8846
8847 \begin_layout Subsection
8848 Final Caveat
8849 \end_layout
8850
8851 \begin_layout Standard
8852 Your mileage may vary.
8853  I've now had papers published by both ApJ and AJ that have had 98% of the
8854  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8855  cleanups.
8856  I have had no trouble with the submission process, and I'm sure the journals
8857  were never aware that there might be a difference.
8858  So, go forth and publish!
8859 \end_layout
8860
8861 \begin_layout Section
8862 AMS LaTeX
8863 \end_layout
8864
8865 \begin_layout Standard
8866 by 
8867 \noun on
8868 David Johnson
8869 \noun default
8870 ; updated by 
8871 \noun on
8872 Richard Heck
8873 \end_layout
8874
8875 \begin_layout Standard
8876 \begin_inset VSpace bigskip
8877 \end_inset
8878
8879
8880 \end_layout
8881
8882 \begin_layout Standard
8883 \noindent
8884 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8885  papers to be submitted to American Mathematical Society publications.
8886  The layouts are not tailored to a specific journal, but easily can be.
8887  You should refer to the AMS documentation for specific instructions for
8888  each journal (usually it will entail only changing a single line in the
8889  TeX output).
8890  That documentation is available on the Web at 
8891 \begin_inset Flex URL
8892 status open
8893
8894 \begin_layout Plain Layout
8895
8896 http://www.ams.org
8897 \end_layout
8898
8899 \end_inset
8900
8901  or by ftp at 
8902 \begin_inset Flex URL
8903 status open
8904
8905 \begin_layout Plain Layout
8906
8907 ftp://ftp.ams.org/pub/tex/amslatex/
8908 \end_layout
8909
8910 \end_inset
8911
8912 .
8913  These layouts are appropriate, and useful, for any mathematical writing.
8914  
8915 \end_layout
8916
8917 \begin_layout Standard
8918 There are two basic AMS LaTeX layouts: 
8919 \end_layout
8920
8921 \begin_layout Itemize
8922 amsart: The standard AMS article format.
8923 \end_layout
8924
8925 \begin_layout Itemize
8926 amsbook: the standard AMS book (really, monograph) format.
8927  
8928 \end_layout
8929
8930 \begin_layout Standard
8931 The layouts themselves contain only the minimum necessary to use the AMS
8932  classes.
8933  They do not, in particular, contain any of the `theorem' environments used
8934  for setting theorems, lemmas, and the like.
8935  These are contained, instead, in the 
8936 \begin_inset Flex Code
8937 status collapsed
8938
8939 \begin_layout Plain Layout
8940 Theorems (AMS)
8941 \end_layout
8942
8943 \end_inset
8944
8945  module, which is loaded by default when when you select one of the AMS
8946  classes.
8947  (It can also be used with other classes and can be removed, if you would
8948  rather use something else.) Less commonly used environments are in the 
8949 \begin_inset Flex Code
8950 status collapsed
8951
8952 \begin_layout Plain Layout
8953 Theorems (AMS-Extended)
8954 \end_layout
8955
8956 \end_inset
8957
8958  module, which must be loaded manually.
8959 \end_layout
8960
8961 \begin_layout Standard
8962 By default, theorems and the like are numbered consecutively throughout
8963  the document, but this may be modified by loading the module 
8964 \begin_inset Flex Code
8965 status collapsed
8966
8967 \begin_layout Plain Layout
8968 Theorems (Order by Section)
8969 \end_layout
8970
8971 \end_inset
8972
8973  or, if you are using 
8974 \begin_inset Flex Code
8975 status collapsed
8976
8977 \begin_layout Plain Layout
8978 book (AMS)
8979 \end_layout
8980
8981 \end_inset
8982
8983 , the module 
8984 \begin_inset Flex Code
8985 status collapsed
8986
8987 \begin_layout Plain Layout
8988 Theorems (Order by Chapter)
8989 \end_layout
8990
8991 \end_inset
8992
8993 .
8994  These will number the results as 
8995 \begin_inset Formula $n.m$
8996 \end_inset
8997
8998 , where the first number refers to the section (or chapter) and the second
8999  refers to the total number of results so far in that section (or chapter).
9000  Many environments are also available unnumbered.
9001  These are indicated by an asterisk at the end.
9002  If you happen to want 
9003 \emph on
9004 only
9005 \emph default
9006  unnumbered results, the module 
9007 \begin_inset Flex Code
9008 status collapsed
9009
9010 \begin_layout Plain Layout
9011 Theorems (Starred)
9012 \end_layout
9013
9014 \end_inset
9015
9016  provides that option.
9017 \end_layout
9018
9019 \begin_layout Standard
9020 Note that these modules do not 
9021 \emph on
9022 have
9023 \emph default
9024  to be used with the AMS classes.
9025  It is perfectly possible to use the 
9026 \begin_inset Flex Code
9027 status collapsed
9028
9029 \begin_layout Plain Layout
9030 Theorems (AMS)
9031 \end_layout
9032
9033 \end_inset
9034
9035  module, and the others mentioned, with other classes, such as 
9036 \begin_inset Flex Code
9037 status collapsed
9038
9039 \begin_layout Plain Layout
9040 article
9041 \end_layout
9042
9043 \end_inset
9044
9045
9046 \begin_inset Flex Code
9047 status collapsed
9048
9049 \begin_layout Plain Layout
9050 report
9051 \end_layout
9052
9053 \end_inset
9054
9055
9056 \begin_inset Flex Code
9057 status collapsed
9058
9059 \begin_layout Plain Layout
9060 book (KOMA-script)
9061 \end_layout
9062
9063 \end_inset
9064
9065 , and so forth.
9066 \end_layout
9067
9068 \begin_layout Subsection
9069 What these layouts provide
9070 \end_layout
9071
9072 \begin_layout Standard
9073 There is a long list of included environments provided by these layouts.
9074  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9075  variety of `theorem' environments.
9076  However, the AMS recommends the environments that are available in LyX.
9077  
9078 \end_layout
9079
9080 \begin_layout Standard
9081 The following environments—as well as the standard environments, such as
9082  
9083 \begin_inset Flex Noun
9084 status collapsed
9085
9086 \begin_layout Plain Layout
9087 section
9088 \end_layout
9089
9090 \end_inset
9091
9092
9093 \begin_inset Flex Noun
9094 status collapsed
9095
9096 \begin_layout Plain Layout
9097 bibliography
9098 \end_layout
9099
9100 \end_inset
9101
9102
9103 \begin_inset Flex Noun
9104 status collapsed
9105
9106 \begin_layout Plain Layout
9107 title
9108 \end_layout
9109
9110 \end_inset
9111
9112
9113 \begin_inset Flex Noun
9114 status collapsed
9115
9116 \begin_layout Plain Layout
9117 author
9118 \end_layout
9119
9120 \end_inset
9121
9122 , and 
9123 \begin_inset Flex Noun
9124 status collapsed
9125
9126 \begin_layout Plain Layout
9127 date
9128 \end_layout
9129
9130 \end_inset
9131
9132 —are provided by 
9133 \begin_inset Flex Code
9134 status collapsed
9135
9136 \begin_layout Plain Layout
9137 article (AMS)
9138 \end_layout
9139
9140 \end_inset
9141
9142  and 
9143 \begin_inset Flex Code
9144 status collapsed
9145
9146 \begin_layout Plain Layout
9147 book (AMS)
9148 \end_layout
9149
9150 \end_inset
9151
9152 :
9153 \end_layout
9154
9155 \begin_layout Description
9156 Address This should be the author's permanent address.
9157 \end_layout
9158
9159 \begin_layout Description
9160 Current
9161 \begin_inset space ~
9162 \end_inset
9163
9164 Address This should be the author's temporary address at the time of submission,
9165  if different from the Address.
9166 \end_layout
9167
9168 \begin_layout Description
9169 Email Author's e-mail address
9170 \end_layout
9171
9172 \begin_layout Description
9173 URL Author's Web address, if desired.
9174 \end_layout
9175
9176 \begin_layout Description
9177 Keywords Key words or phrases used to identify specific topics discussed
9178  in the paper.
9179 \end_layout
9180
9181 \begin_layout Description
9182 Subjectclass These refer to the AMS Subject Classifications, published and
9183  described in 
9184 \emph on
9185 Mathematical Reviews
9186 \emph default
9187 .
9188  These are also available online at the AMS cites listed above.
9189 \end_layout
9190
9191 \begin_layout Description
9192 Thanks
9193 \end_layout
9194
9195 \begin_layout Description
9196 Dedicatory
9197 \end_layout
9198
9199 \begin_layout Description
9200 Translator
9201 \end_layout
9202
9203 \begin_layout Standard
9204 The following environments are provided by both the 
9205 \begin_inset Flex Code
9206 status collapsed
9207
9208 \begin_layout Plain Layout
9209 Theorems
9210 \end_layout
9211
9212 \end_inset
9213
9214  and 
9215 \begin_inset Flex Code
9216 status collapsed
9217
9218 \begin_layout Plain Layout
9219 Theorems (AMS)
9220 \end_layout
9221
9222 \end_inset
9223
9224  modules, in the latter case in both starred (unnumbered) and unstarred
9225  (numbered) versions.
9226  These same environments are provided only in the starred versions by the
9227  
9228 \begin_inset Flex Code
9229 status collapsed
9230
9231 \begin_layout Plain Layout
9232 Theorems (Starred)
9233 \end_layout
9234
9235 \end_inset
9236
9237  module:
9238 \end_layout
9239
9240 \begin_layout Theorem
9241 This is typically used for the statements of major results.
9242  
9243 \end_layout
9244
9245 \begin_layout Corollary*
9246 This is used for statements which follow fairly directly from previous statement
9247 s.
9248  Again, these can be major results.
9249  
9250 \end_layout
9251
9252 \begin_layout Lemma
9253 These are smaller results needed to prove other statements.
9254 \end_layout
9255
9256 \begin_layout Proposition
9257 These are less major results which (hopefully) add to the general theory
9258  being discussed.
9259 \end_layout
9260
9261 \begin_layout Conjecture
9262 These are statements provided without justification, which the author does
9263  not know how to prove, but which seem to be true (to the author, at least).
9264 \end_layout
9265
9266 \begin_layout Definition*
9267 Guess what this is for.
9268  The font is different for this environment than for the previous ones.
9269  
9270 \end_layout
9271
9272 \begin_layout Example*
9273 Used for examples illustrating proven results.
9274 \end_layout
9275
9276 \begin_layout Problem
9277 It's not really known what this is for.
9278  You should figure it out.
9279 \end_layout
9280
9281 \begin_layout Exercise*
9282 Write a description for this one.
9283 \end_layout
9284
9285 \begin_layout Remark
9286 This environment is also a type of theorem, usually a lesser sort of observation.
9287 \end_layout
9288
9289 \begin_layout Claim*
9290 Often used in the course of giving a proof of a larger result.
9291 \end_layout
9292
9293 \begin_layout Case
9294 Generally, these are used to break up long arguments, using specific instances
9295  of some condition.
9296  
9297 \end_layout
9298
9299 \begin_layout Case
9300 The numbering scheme for cases is on its own, not together with other numbered
9301  statements.
9302  
9303 \end_layout
9304
9305 \begin_layout Proof
9306 At the end of this environment, a QED symbol (usually a square, but it can
9307  vary with different styles) is placed.
9308  If you want to have other environments within this one—for example, Case
9309  environments—and have the QED symbol appear only after them, then the other
9310  environments need to be nested within the proof environment.
9311  See the section 
9312 \emph on
9313 Nesting Environments
9314 \emph default
9315  of the 
9316 \emph on
9317 User's Guide
9318 \emph default
9319  for information on nesting.
9320 \end_layout
9321
9322 \begin_layout Standard
9323 And these environments are provided by 
9324 \begin_inset Flex Code
9325 status collapsed
9326
9327 \begin_layout Plain Layout
9328 Theorems (AMS-Extended)
9329 \end_layout
9330
9331 \end_inset
9332
9333 :
9334 \end_layout
9335
9336 \begin_layout Criterion*
9337 A required condition.
9338 \end_layout
9339
9340 \begin_layout Algorithm*
9341 A general procedure to be used.
9342 \end_layout
9343
9344 \begin_layout Axiom*
9345 This is a property or statement taken as true within the system being discussed.
9346 \end_layout
9347
9348 \begin_layout Condition*
9349 Sometimes used to state a condition assumed within the present context of
9350  discussion.
9351 \end_layout
9352
9353 \begin_layout Note*
9354 Similar to a Remark.
9355 \end_layout
9356
9357 \begin_layout Notation*
9358 Used for the explanation of, yes, notation.
9359 \end_layout
9360
9361 \begin_layout Summary
9362 Do we really need to tell you? 
9363 \end_layout
9364
9365 \begin_layout Acknowledgement*
9366 Acknowledgement.
9367 \end_layout
9368
9369 \begin_layout Conclusion*
9370 Sometimes used at the end of a long train of argument.
9371 \end_layout
9372
9373 \begin_layout Fact
9374 Used in a way similar to Proposition, though perhaps lower on the scale.
9375 \end_layout
9376
9377 \begin_layout Standard
9378 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9379  fonts packages.
9380  They need to be available on your system in order to use these environments.
9381 \end_layout
9382
9383 \begin_layout Section
9384 AGU journals (
9385 \family sans
9386 aguplus
9387 \family default
9388 )
9389 \end_layout
9390
9391 \begin_layout Standard
9392 by 
9393 \shape smallcaps
9394 Martin Vermeer
9395 \end_layout
9396
9397 \begin_layout Subsection
9398 Description
9399 \end_layout
9400
9401 \begin_layout Standard
9402 These are the layout files for some of the journals of the American Geophysical
9403  Society.
9404  It is assumed that you have both the AGU's own class files and AGUplus
9405  installed (everything to be found at
9406 \begin_inset Flex URL
9407 status collapsed
9408
9409 \begin_layout Plain Layout
9410
9411 ftp://ftp.agu.org/journals/latex/journals
9412 \end_layout
9413
9414 \end_inset
9415
9416 ).
9417 \end_layout
9418
9419 \begin_layout Subsection
9420 New styles
9421 \end_layout
9422
9423 \begin_layout Standard
9424 Redefined are 
9425 \family sans
9426 Paragraph
9427 \family default
9428
9429 \family sans
9430 Paragraph*
9431 \family default
9432 .
9433  They are still called this in the LyX GUI, though their LaTeX equivalents
9434  in the AGU classes are 
9435 \family sans
9436 Subsubsubsection
9437 \family default
9438  and 
9439 \family sans
9440 Subsubsubsection*
9441 \family default
9442 .
9443 \end_layout
9444
9445 \begin_layout Standard
9446 Newly defined styles are 
9447 \family sans
9448 Left_Header
9449 \family default
9450
9451 \family sans
9452 Right_Header
9453 \family default
9454
9455 \family sans
9456 Received
9457 \family default
9458
9459 \family sans
9460 Revised
9461 \family default
9462
9463 \family sans
9464 Accepted
9465 \family default
9466
9467 \family sans
9468 CCC
9469 \family default
9470
9471 \family sans
9472 PaperId
9473 \family default
9474
9475 \family sans
9476 AuthorAddr
9477 \family default
9478
9479 \family sans
9480 SlugComment
9481 \family default
9482 .
9483  These are mostly manuscript attributes and defined in the AGU class documentati
9484 on.
9485 \end_layout
9486
9487 \begin_layout Standard
9488 I suspect this is still badly incomplete.
9489 \end_layout
9490
9491 \begin_layout Subsection
9492 New floats
9493 \end_layout
9494
9495 \begin_layout Standard
9496
9497 \family sans
9498 Planotable
9499 \family default
9500  and 
9501 \family sans
9502 Plate
9503 \family default
9504 .
9505  We also have a new 
9506 \family sans
9507 Table_Caption
9508 \family default
9509 .
9510 \end_layout
9511
9512 \begin_layout Subsection
9513 Supported journals
9514 \end_layout
9515
9516 \begin_layout Itemize
9517
9518 \emph on
9519 Journal of Geophysical Research
9520 \emph default
9521
9522 \family typewriter
9523 jgrga.layout
9524 \family default
9525  — Martin Vermeer
9526 \end_layout
9527
9528 \begin_layout Standard
9529 Add your own, it isn't so hard! Look at the 
9530 \family typewriter
9531 jgrga.layout
9532 \family default
9533  example and 
9534 \family typewriter
9535 aguplus.inc
9536 \family default
9537 .
9538 \end_layout
9539
9540 \begin_layout Subsection
9541 Bugs and things to remember
9542 \end_layout
9543
9544 \begin_layout Standard
9545 In order to use the new layouts, you must remember to do the following for
9546  a new document:
9547 \end_layout
9548
9549 \begin_layout Enumerate
9550
9551 \emph on
9552 Turn off babel
9553 \emph default
9554 .
9555  This can be done in the 
9556 \family sans
9557 Layout\SpecialChar \menuseparator
9558 Document
9559 \family default
9560  or 
9561 \family sans
9562 Document\SpecialChar \menuseparator
9563 Settings
9564 \family default
9565  menu item.
9566  (AGU articles are always in English, right? So 
9567 \emph on
9568 don't
9569 \emph default
9570  choose a language.)
9571 \end_layout
9572
9573 \begin_layout Enumerate
9574 Enter 
9575 \family typewriter
9576 jgrga
9577 \family default
9578  into the document's 
9579 \family sans
9580 Extra Options
9581 \family default
9582  field.
9583  (Yes, this is a bug.)
9584 \end_layout
9585
9586 \begin_layout Enumerate
9587 Make sure you use the 
9588 \family typewriter
9589 agu.bst
9590 \family default
9591  bibliography style, by entering 
9592 \family sans
9593 agu
9594 \family default
9595  into the second field of the BibTeX inset.
9596  None of the standard styles will do.
9597 \end_layout
9598
9599 \begin_layout Section
9600 Broadway
9601 \end_layout
9602
9603 \begin_layout Standard
9604 by 
9605 \shape smallcaps
9606 Garst Reese
9607 \end_layout
9608
9609 \begin_layout Subsection
9610 Introduction
9611 \end_layout
9612
9613 \begin_layout Standard
9614 Broadway is for writing plays.
9615  The format is more decorative than Hollywood, and much less standardized.
9616  This format should be suitable for workshops.
9617 \end_layout
9618
9619 \begin_layout Subsection
9620 Special problems
9621 \end_layout
9622
9623 \begin_layout Standard
9624 The same as in Hollywood.
9625 \end_layout
9626
9627 \begin_layout Subsection
9628 Special features
9629 \end_layout
9630
9631 \begin_layout Standard
9632 Insert the 
9633 \family sans
9634 Speaker
9635 \family default
9636  names as labels then cross-reference the label to insert the name.
9637  The cross-reference dialog will show the current cast of characters.
9638 \end_layout
9639
9640 \begin_layout Subsection
9641 Paper size and Margins
9642 \end_layout
9643
9644 \begin_layout Standard
9645 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9646 \end_layout
9647
9648 \begin_layout Subsection
9649 Environments
9650 \end_layout
9651
9652 \begin_layout Standard
9653 The following environments are available.
9654  You can use broadway.bind to get the bind keys shown at the right.
9655 \end_layout
9656
9657 \begin_layout Itemize
9658
9659 \family sans
9660 Standard
9661 \begin_inset Newline newline
9662 \end_inset
9663
9664
9665 \family default
9666 You should not have to use this, but it is here for anything that does not
9667  fit otherwise.
9668 \end_layout
9669
9670 \begin_layout Itemize
9671
9672 \family sans
9673 Narrative
9674 \begin_inset space \hfill{}
9675 \end_inset
9676
9677 M-z n
9678 \begin_inset Newline newline
9679 \end_inset
9680
9681
9682 \family default
9683 Used to describe stage setting and the action.
9684  First use of speaker names in all CAPs.
9685 \end_layout
9686
9687 \begin_layout Itemize
9688
9689 \family sans
9690 ACT
9691 \begin_inset space \hfill{}
9692 \end_inset
9693
9694 M-z a
9695 \begin_inset Newline newline
9696 \end_inset
9697
9698
9699 \family default
9700 Automatically numbered.
9701  On screen it will be arabic, but will print as Roman.
9702 \end_layout
9703
9704 \begin_layout Itemize
9705
9706 \family sans
9707 ACT*
9708 \begin_inset space \hfill{}
9709 \end_inset
9710
9711 M-z S at
9712 \begin_inset Newline newline
9713 \end_inset
9714
9715
9716 \family default
9717 Subtitle for 
9718 \family sans
9719 ACT.
9720
9721 \family default
9722  It is just centered text.
9723 \end_layout
9724
9725 \begin_layout Itemize
9726
9727 \family sans
9728 SCENE
9729 \begin_inset space \hfill{}
9730 \end_inset
9731
9732 M-z S-S
9733 \begin_inset Newline newline
9734 \end_inset
9735
9736
9737 \family default
9738 Not automatically numbered.
9739  You supply the number.
9740  This is because I couldn't figure out how.
9741 \end_layout
9742
9743 \begin_layout Itemize
9744
9745 \family sans
9746 AT_RISE:
9747 \begin_inset space \hfill{}
9748 \end_inset
9749
9750 M-z S-R
9751 \begin_inset Newline newline
9752 \end_inset
9753
9754
9755 \family default
9756 A special case of Narrative to describe the setting and action as the curtain
9757  rises.
9758 \end_layout
9759
9760 \begin_layout Itemize
9761
9762 \family sans
9763 Speaker
9764 \begin_inset space \hfill{}
9765 \end_inset
9766
9767 M-z s
9768 \begin_inset Newline newline
9769 \end_inset
9770
9771
9772 \family default
9773 The speaker's (actor's) title, centered in all CAPS.
9774 \end_layout
9775
9776 \begin_layout Itemize
9777
9778 \family sans
9779 Parenthetical
9780 \begin_inset space \hfill{}
9781 \end_inset
9782
9783 M-z p
9784 \begin_inset Newline newline
9785 \end_inset
9786
9787
9788 \family default
9789 Instructions to the speaker.
9790  The parentheses are automatically inserted.
9791  The ( will appear on screen, but both will be in the printed play.
9792  This environment is only used within 
9793 \family sans
9794 Dialogue
9795 \family default
9796 .
9797 \end_layout
9798
9799 \begin_layout Itemize
9800
9801 \family sans
9802 Dialogue
9803 \begin_inset space \hfill{}
9804 \end_inset
9805
9806 M-z d
9807 \begin_inset Newline newline
9808 \end_inset
9809
9810
9811 \family default
9812 What the Speaker says.
9813 \end_layout
9814
9815 \begin_layout Itemize
9816
9817 \family sans
9818 CURTAIN
9819 \begin_inset space \hfill{}
9820 \end_inset
9821
9822 M-z S-C
9823 \begin_inset Newline newline
9824 \end_inset
9825
9826
9827 \family default
9828 The curtain comes down.
9829 \end_layout
9830
9831 \begin_layout Itemize
9832
9833 \family sans
9834 Title
9835 \begin_inset space \hfill{}
9836 \end_inset
9837
9838 M-z S-T
9839 \end_layout
9840
9841 \begin_layout Itemize
9842
9843 \family sans
9844 Author
9845 \begin_inset space \hfill{}
9846 \end_inset
9847
9848 M-z S-A
9849 \end_layout
9850
9851 \begin_layout Itemize
9852
9853 \family sans
9854 Right_Address
9855 \begin_inset space \hfill{}
9856 \end_inset
9857
9858 M-z r
9859 \end_layout
9860
9861 \begin_layout Standard
9862 Hello there.
9863 \end_layout
9864
9865 \begin_layout Section
9866 Dinbrief
9867 \end_layout
9868
9869 \begin_layout Standard
9870 The document class 
9871 \family sans
9872 dinbrief
9873 \family default
9874  can be used to type letters according to German conventions.
9875  A template file is included in 
9876 \family typewriter
9877 .../lyx/share/templates
9878 \family default
9879  for you to use as a starting point.
9880 \end_layout
9881
9882 \begin_layout Section
9883 EGS journals (
9884 \family sans
9885 egs
9886 \family default
9887 )
9888 \end_layout
9889
9890 \begin_layout Standard
9891 by 
9892 \shape smallcaps
9893 Martin Vermeer
9894 \end_layout
9895
9896 \begin_layout Subsection
9897 Description
9898 \end_layout
9899
9900 \begin_layout Standard
9901 This is the layout file for the European Geophysical Society journals.
9902  The needed 
9903 \family typewriter
9904 egs.cls
9905 \family default
9906  can be downloaded from the web site of the EGS under 
9907 \begin_inset Flex URL
9908 status collapsed
9909
9910 \begin_layout Plain Layout
9911
9912 www.copernicus.org
9913 \end_layout
9914
9915 \end_inset
9916
9917 .
9918 \end_layout
9919
9920 \begin_layout Subsection
9921 New styles
9922 \end_layout
9923
9924 \begin_layout Standard
9925
9926 \family sans
9927 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9928  Accepted
9929 \family default
9930
9931 \family sans
9932 Offsets
9933 \family default
9934 .
9935  The current layout file is unfortunately very unmodular and would benefit
9936  from using the various 
9937 \family typewriter
9938 std*.inc
9939 \family default
9940  file inclusions.
9941 \end_layout
9942
9943 \begin_layout Section
9944 Elsevier Journals
9945 \end_layout
9946
9947 \begin_layout Standard
9948 See the LyX template file 
9949 \family typewriter
9950 elsarticle.lyx
9951 \family default
9952 .
9953  It contains all infos you need.
9954 \end_layout
9955
9956 \begin_layout Section
9957 Foils [aka 
9958 \family sans
9959 FoilTeX
9960 \family default
9961 ]
9962 \begin_inset CommandInset label
9963 LatexCommand label
9964 name "sec:foiltex"
9965
9966 \end_inset
9967
9968
9969 \end_layout
9970
9971 \begin_layout Standard
9972 by 
9973 \noun on
9974 Allan Rae
9975 \end_layout
9976
9977 \begin_layout Subsection
9978 Introduction
9979 \end_layout
9980
9981 \begin_layout Standard
9982 This section describes how to use LyX to make slides for overhead projectors.
9983  There are two document classes that can do this: the default slides class
9984  and the 
9985 \family sans
9986 FoilTeX
9987 \family default
9988  slides class.
9989  This section documents the latter.
9990 \end_layout
9991
9992 \begin_layout Standard
9993 I'm going to say this again, nice and clear, so that there's no misunderstanding
9994 :
9995 \end_layout
9996
9997 \begin_layout Standard
9998 \begin_inset VSpace bigskip
9999 \end_inset
10000
10001
10002 \end_layout
10003
10004 \begin_layout Standard
10005 \align center
10006
10007 \size large
10008 This section documents the class 
10009 \begin_inset Quotes eld
10010 \end_inset
10011
10012
10013 \family sans
10014 slides (FoilTeX)
10015 \family default
10016
10017 \begin_inset Quotes erd
10018 \end_inset
10019
10020  
10021 \emph on
10022 only.
10023 \end_layout
10024
10025 \begin_layout Standard
10026 \begin_inset VSpace bigskip
10027 \end_inset
10028
10029
10030 \end_layout
10031
10032 \begin_layout Standard
10033 If you're looking for the documentation for 
10034 \begin_inset Quotes eld
10035 \end_inset
10036
10037
10038 \family sans
10039 slides (default)
10040 \family default
10041
10042 \begin_inset Quotes erd
10043 \end_inset
10044
10045 , check out section
10046 \begin_inset space ~
10047 \end_inset
10048
10049
10050 \begin_inset CommandInset ref
10051 LatexCommand ref
10052 reference "sec:slitex"
10053
10054 \end_inset
10055
10056 .
10057  If your machine doesn't have the 
10058 \family sans
10059 foils
10060 \family default
10061  class [
10062 \begin_inset Quotes eld
10063 \end_inset
10064
10065
10066 \family sans
10067 slides (FoilTeX)
10068 \family default
10069
10070 \begin_inset Quotes erd
10071 \end_inset
10072
10073 ] installed, you'll probably have to use the default 
10074 \family sans
10075 slides
10076 \family default
10077  class, which isn't quite as good as 
10078 \family sans
10079 foils.
10080 \end_layout
10081
10082 \begin_layout Standard
10083 The 
10084 \family sans
10085 foils
10086 \family default
10087  class is designed for use with version 2.1 of the 
10088 \family sans
10089 foils.cls
10090 \family default
10091  LaTeX class file which is now an integral part of LaTeX2e.
10092 \end_layout
10093
10094 \begin_layout Subsection
10095 Getting Started
10096 \end_layout
10097
10098 \begin_layout Standard
10099 Obviously, to use this document class, you need to select 
10100 \begin_inset Quotes eld
10101 \end_inset
10102
10103
10104 \family sans
10105 slides (FoilTeX)
10106 \family default
10107
10108 \begin_inset Quotes erd
10109 \end_inset
10110
10111  from the 
10112 \family sans
10113 Class
10114 \family default
10115  entry in the 
10116 \family sans
10117 Document
10118 \begin_inset space ~
10119 \end_inset
10120
10121 Layout
10122 \family default
10123  dialog.
10124  There are some settings in the 
10125 \family sans
10126 Document
10127 \begin_inset space ~
10128 \end_inset
10129
10130 Layout
10131 \family default
10132  dialog that you should know about that are specific to this class:
10133 \end_layout
10134
10135 \begin_layout Itemize
10136 Don't change the options 
10137 \family sans
10138 Sides
10139 \family default
10140  and 
10141 \family sans
10142 Columns
10143 \family default
10144  on the 
10145 \family sans
10146 Document
10147 \begin_inset space ~
10148 \end_inset
10149
10150 Layout
10151 \family default
10152  dialog.
10153  They're ignored by the 
10154 \family sans
10155 foils
10156 \family default
10157  class.
10158 \end_layout
10159
10160 \begin_layout Itemize
10161 The default font size is 20
10162 \begin_inset space \thinspace{}
10163 \end_inset
10164
10165 pt with the other options being 17
10166 \begin_inset space \thinspace{}
10167 \end_inset
10168
10169 pt, 25
10170 \begin_inset space \thinspace{}
10171 \end_inset
10172
10173 pt and 30
10174 \begin_inset space \thinspace{}
10175 \end_inset
10176
10177 pt.
10178 \end_layout
10179
10180 \begin_layout Itemize
10181 The default font is 
10182 \family sans
10183 sans
10184 \family default
10185  
10186 \family sans
10187 serif
10188 \family default
10189  but all math equations are still typeset in the usual roman font.
10190 \end_layout
10191
10192 \begin_layout Itemize
10193
10194 \family sans
10195 FoilTeX
10196 \family default
10197  supports A4 and Letter paper sizes as well as a special size for working
10198  with 35
10199 \begin_inset space \thinspace{}
10200 \end_inset
10201
10202 mm slides.
10203  It doesn't support A5, B5, legal or executive paper sizes.
10204 \end_layout
10205
10206 \begin_layout Itemize
10207 Don't bother changing the 
10208 \family sans
10209 Float Placement
10210 \family default
10211  settings because they are ignored anyway.
10212  All floats appear where they are defined in the text.
10213 \end_layout
10214
10215 \begin_layout Itemize
10216 The 
10217 \family sans
10218 Pagestyle
10219 \family default
10220  setting behaves a bit differently for this class.
10221  
10222 \family sans
10223 FoilTeX
10224 \family default
10225  provides extensive footer and header capabilities including a user-defined
10226  logo.
10227  See section
10228 \begin_inset space ~
10229 \end_inset
10230
10231
10232 \begin_inset CommandInset ref
10233 LatexCommand ref
10234 reference "sec:foilfoot"
10235
10236 \end_inset
10237
10238  for more details.
10239  The title page is treated differently to all other pages in the document
10240  and is 
10241 \emph on
10242 always
10243 \emph default
10244  unnumbered and 
10245 \emph on
10246 always
10247 \emph default
10248  has the logo centered at the bottom of the page (if one is defined).
10249  The possible page style choices and what they do are as follows:
10250 \end_layout
10251
10252 \begin_deeper
10253 \begin_layout Labeling
10254 \labelwidthstring MMMMMMM
10255
10256 \family sans
10257 \series bold
10258 empty
10259 \family default
10260 \series default
10261  The final output contains no page numbers, or other headers or footers
10262  (except footnotes of course).
10263  
10264 \end_layout
10265
10266 \begin_layout Labeling
10267 \labelwidthstring MMMMMMM
10268
10269 \family sans
10270 \series bold
10271 plain
10272 \family default
10273 \series default
10274  The final output contains page numbers centered at the bottom of the page.
10275  No other headings or footers (other than footnotes).
10276 \end_layout
10277
10278 \begin_layout Labeling
10279 \labelwidthstring MMMMMMM
10280
10281 \series bold
10282 foilheadings
10283 \series default
10284  Page numbers in lower right corner.
10285  Additional headers and footers are also shown.
10286  This is also the default.
10287 \end_layout
10288
10289 \begin_layout Labeling
10290 \labelwidthstring MMMMMMM
10291
10292 \series bold
10293 fancy
10294 \series default
10295  Gives you access to the 
10296 \family sans
10297 fancyheadings
10298 \family default
10299  package although its use with 
10300 \family sans
10301 FoilTeX
10302 \family default
10303  is discouraged by the writer of the 
10304 \family sans
10305 FoilTeX
10306 \family default
10307  package because of some potential page layout clashes.
10308 \end_layout
10309
10310 \end_deeper
10311 \begin_layout Subsubsection
10312 Extra Options
10313 \end_layout
10314
10315 \begin_layout Standard
10316 The following options may be used in the extra class options in the 
10317 \family sans
10318 Document\SpecialChar \menuseparator
10319 Settings
10320 \family default
10321  dialog.
10322 \end_layout
10323
10324 \begin_layout Labeling
10325 \labelwidthstring MMMMMMx
10326
10327 \series bold
10328 35mmSlide
10329 \series default
10330  This sets up the page layout for 7.33
10331 \begin_inset space \thinspace{}
10332 \end_inset
10333
10334 in by 11
10335 \begin_inset space \thinspace{}
10336 \end_inset
10337
10338 in paper, which is about the same aspect ratio as a 35
10339 \begin_inset space \thinspace{}
10340 \end_inset
10341
10342 mm slide, making it a bit easier to work with this medium.
10343 \end_layout
10344
10345 \begin_layout Labeling
10346 \labelwidthstring MMMMMMx
10347
10348 \series bold
10349 headrule
10350 \series default
10351  Places a rule across the page below the header on every page except the
10352  title page.
10353 \end_layout
10354
10355 \begin_layout Labeling
10356 \labelwidthstring MMMMMMx
10357
10358 \series bold
10359 footrule
10360 \series default
10361  Places a rule across the page above the footer on every page except the
10362  title page.
10363 \end_layout
10364
10365 \begin_layout Labeling
10366 \labelwidthstring MMMMMMx
10367
10368 \series bold
10369 dvips
10370 \series default
10371  This is automatically set each time you create a new 
10372 \family sans
10373 foils
10374 \family default
10375  document.
10376  This option tells 
10377 \family sans
10378 FoilTeX
10379 \family default
10380  to use the dvips driver to rotate those pages that are set as landscape
10381  foils.
10382 \end_layout
10383
10384 \begin_layout Labeling
10385 \labelwidthstring MMMMMMx
10386
10387 \series bold
10388 landscape
10389 \series default
10390  Simply changes the page dimensions to those of a landscape page but doesn't
10391  do any rotation.
10392  Thus if you use this option you need to use an external program to rotate
10393  each page or feed your paper through your printer as landscape.
10394  Note that this option effectively reverses the roles of the 
10395 \family sans
10396 Foilhead
10397 \family default
10398  and 
10399 \family sans
10400 Rotatefoilhead
10401 \family default
10402  environments (don't worry these are described in the next section).
10403 \end_layout
10404
10405 \begin_layout Labeling
10406 \labelwidthstring MMMMMMx
10407
10408 \series bold
10409 leqno
10410 \series default
10411  Equation numbers on the left.
10412 \end_layout
10413
10414 \begin_layout Labeling
10415 \labelwidthstring MMMMMMx
10416
10417 \series bold
10418 fleqn
10419 \series default
10420  Flush-left equations.
10421 \end_layout
10422
10423 \begin_layout Subsection
10424 Supported Environments
10425 \end_layout
10426
10427 \begin_layout Standard
10428 Most of the environments commonly supported in other classes are also supported
10429  by the 
10430 \family sans
10431 foils
10432 \family default
10433  class.
10434  There are several additional environments provided by 
10435 \family sans
10436 FoilTeX
10437 \family default
10438  as well as a couple added by LyX.
10439  The following environments are shared with other classes:
10440 \end_layout
10441
10442 \begin_layout Standard
10443 \begin_inset ERT
10444 status open
10445
10446 \begin_layout Plain Layout
10447
10448
10449 \backslash
10450 begin{multicols}{2}
10451 \end_layout
10452
10453 \end_inset
10454
10455
10456 \end_layout
10457
10458 \begin_layout Itemize
10459
10460 \family sans
10461 Standard
10462 \end_layout
10463
10464 \begin_layout Itemize
10465
10466 \family sans
10467 Itemize
10468 \end_layout
10469
10470 \begin_layout Itemize
10471
10472 \family sans
10473 Enumerate
10474 \end_layout
10475
10476 \begin_layout Itemize
10477
10478 \family sans
10479 Description
10480 \end_layout
10481
10482 \begin_layout Itemize
10483
10484 \family sans
10485 List
10486 \end_layout
10487
10488 \begin_layout Itemize
10489
10490 \family sans
10491 LyX-Code
10492 \end_layout
10493
10494 \begin_layout Itemize
10495
10496 \family sans
10497 Verse
10498 \end_layout
10499
10500 \begin_layout Itemize
10501
10502 \family sans
10503 Quote
10504 \end_layout
10505
10506 \begin_layout Itemize
10507
10508 \family sans
10509 Quotation
10510 \end_layout
10511
10512 \begin_layout Itemize
10513
10514 \family sans
10515 Title
10516 \end_layout
10517
10518 \begin_layout Itemize
10519
10520 \family sans
10521 Author
10522 \end_layout
10523
10524 \begin_layout Itemize
10525
10526 \family sans
10527 Date
10528 \end_layout
10529
10530 \begin_layout Itemize
10531
10532 \family sans
10533 Abstract
10534 \end_layout
10535
10536 \begin_layout Itemize
10537
10538 \family sans
10539 Bibliography
10540 \end_layout
10541
10542 \begin_layout Itemize
10543
10544 \family sans
10545 Address
10546 \end_layout
10547
10548 \begin_layout Itemize
10549
10550 \family sans
10551 RightAddress
10552 \end_layout
10553
10554 \begin_layout Itemize
10555
10556 \family sans
10557 Caption
10558 \end_layout
10559
10560 \begin_layout Itemize
10561
10562 \family sans
10563 Comment
10564 \end_layout
10565
10566 \begin_layout Standard
10567 \begin_inset ERT
10568 status open
10569
10570 \begin_layout Plain Layout
10571
10572
10573 \backslash
10574 end{multicols}
10575 \end_layout
10576
10577 \end_inset
10578
10579
10580 \end_layout
10581
10582 \begin_layout Standard
10583 That is, all the major environments apart from the sectioning environments.
10584  Since foils are essentially self-contained sections, with a title and body,
10585  
10586 \family sans
10587 FoilTeX
10588 \family default
10589  provides specific commands for starting new foils and these are:
10590 \end_layout
10591
10592 \begin_layout Itemize
10593
10594 \family sans
10595 Foilhead
10596 \end_layout
10597
10598 \begin_layout Itemize
10599
10600 \family sans
10601 Rotatefoilhead
10602 \end_layout
10603
10604 \begin_layout Standard
10605 LyX also provides slightly modified versions of these two environments called:
10606 \end_layout
10607
10608 \begin_layout Itemize
10609
10610 \family sans
10611 ShortFoilhead
10612 \end_layout
10613
10614 \begin_layout Itemize
10615
10616 \family sans
10617 ShortRotatefoilhead
10618 \end_layout
10619
10620 \begin_layout Standard
10621 and the differences will be explained in the next section.
10622 \end_layout
10623
10624 \begin_layout Standard
10625 Since foils are often used in presenting ideas or new theorems and such
10626  
10627 \family sans
10628 FoilTeX
10629 \family default
10630  also provides a comprehensive box of goodies for presenting them:
10631 \end_layout
10632
10633 \begin_layout Standard
10634 \begin_inset ERT
10635 status open
10636
10637 \begin_layout Plain Layout
10638
10639
10640 \backslash
10641 begin{multicols}{2}
10642 \end_layout
10643
10644 \end_inset
10645
10646
10647 \end_layout
10648
10649 \begin_layout Itemize
10650
10651 \family sans
10652 Theorem
10653 \end_layout
10654
10655 \begin_layout Itemize
10656
10657 \family sans
10658 Lemma
10659 \end_layout
10660
10661 \begin_layout Itemize
10662
10663 \family sans
10664 Corollary
10665 \end_layout
10666
10667 \begin_layout Itemize
10668
10669 \family sans
10670 Proposition
10671 \end_layout
10672
10673 \begin_layout Itemize
10674
10675 \family sans
10676 Definition
10677 \end_layout
10678
10679 \begin_layout Itemize
10680
10681 \family sans
10682 Proof
10683 \end_layout
10684
10685 \begin_layout Itemize
10686
10687 \family sans
10688 Theorem*
10689 \end_layout
10690
10691 \begin_layout Itemize
10692
10693 \family sans
10694 Lemma*
10695 \end_layout
10696
10697 \begin_layout Itemize
10698
10699 \family sans
10700 Corollary*
10701 \end_layout
10702
10703 \begin_layout Itemize
10704
10705 \family sans
10706 Proposition*
10707 \end_layout
10708
10709 \begin_layout Itemize
10710
10711 \family sans
10712 Definition*
10713 \end_layout
10714
10715 \begin_layout Standard
10716 \begin_inset ERT
10717 status open
10718
10719 \begin_layout Plain Layout
10720
10721
10722 \backslash
10723 end{multicols}
10724 \end_layout
10725
10726 \end_inset
10727
10728
10729 \end_layout
10730
10731 \begin_layout Standard
10732 The starred versions are unnumbered while the unstarred versions are numbered.
10733  There are also two list environments added by LyX and these are:
10734 \end_layout
10735
10736 \begin_layout Itemize
10737
10738 \family sans
10739 TickList
10740 \end_layout
10741
10742 \begin_layout Itemize
10743
10744 \family sans
10745 CrossList
10746 \end_layout
10747
10748 \begin_layout Standard
10749
10750 \family sans
10751 FoilTeX
10752 \family default
10753  provides some powerful header and footer capabilities that are best set
10754  in the preamble although they may be set at any point in a document.
10755  If you want to change these settings in your document the best place to
10756  do so is at the very top of a foil, i.
10757 \begin_inset space \thinspace{}
10758 \end_inset
10759
10760 e.
10761 \emph on
10762
10763 \begin_inset space \space{}
10764 \end_inset
10765
10766
10767 \emph default
10768 straight after the foilhead.
10769 \end_layout
10770
10771 \begin_layout Standard
10772 For this purpose, the following command styles are provided [
10773 \shape smallcaps
10774 Martin Vermeer
10775 \shape default
10776 ]:
10777 \end_layout
10778
10779 \begin_layout Standard
10780 \begin_inset ERT
10781 status open
10782
10783 \begin_layout Plain Layout
10784
10785
10786 \backslash
10787 begin{multicols}{2}
10788 \end_layout
10789
10790 \end_inset
10791
10792
10793 \end_layout
10794
10795 \begin_layout Itemize
10796
10797 \family sans
10798 My
10799 \begin_inset space ~
10800 \end_inset
10801
10802 Logo
10803 \end_layout
10804
10805 \begin_layout Itemize
10806
10807 \family sans
10808 Restriction
10809 \end_layout
10810
10811 \begin_layout Itemize
10812
10813 \family sans
10814 Right
10815 \begin_inset space ~
10816 \end_inset
10817
10818 Footer
10819 \end_layout
10820
10821 \begin_layout Itemize
10822
10823 \family sans
10824 Right
10825 \begin_inset space ~
10826 \end_inset
10827
10828 Header
10829 \end_layout
10830
10831 \begin_layout Itemize
10832
10833 \family sans
10834 Left
10835 \begin_inset space ~
10836 \end_inset
10837
10838 Header
10839 \end_layout
10840
10841 \begin_deeper
10842 \begin_layout Standard
10843 \begin_inset space ~
10844 \end_inset
10845
10846
10847 \end_layout
10848
10849 \end_deeper
10850 \begin_layout Standard
10851 \begin_inset ERT
10852 status open
10853
10854 \begin_layout Plain Layout
10855
10856
10857 \backslash
10858 end{multicols}
10859 \end_layout
10860
10861 \end_inset
10862
10863
10864 \end_layout
10865
10866 \begin_layout Standard
10867 There are also a few commands provided by 
10868 \family sans
10869 FoilTeX
10870 \family default
10871  that aren't directly supported by LyX but I'll tell you what they do and
10872  how to use them in section
10873 \begin_inset space ~
10874 \end_inset
10875
10876
10877 \begin_inset CommandInset ref
10878 LatexCommand ref
10879 reference "sec:unsuppfoils"
10880
10881 \end_inset
10882
10883 .
10884 \end_layout
10885
10886 \begin_layout Subsection
10887 Building a Set of Foils
10888 \end_layout
10889
10890 \begin_layout Standard
10891 This section will give a simple introduction to using the different environments
10892  to build a set of foils.
10893  If you want to see an example set of foils, take a look at the 
10894 \family typewriter
10895 Foils.lyx
10896 \family default
10897  file you find in LyX's 
10898 \family typewriter
10899 examples
10900 \family default
10901  folder.
10902 \end_layout
10903
10904 \begin_layout Subsubsection
10905 Give It a Title Page
10906 \end_layout
10907
10908 \begin_layout Standard
10909 Unlike other classes that provide 
10910 \family sans
10911 Title
10912 \family default
10913
10914 \family sans
10915 Author
10916 \family default
10917
10918 \family sans
10919 Date
10920 \family default
10921  and 
10922 \family sans
10923 Abstract
10924 \family default
10925  environments, 
10926 \family sans
10927 foils
10928 \family default
10929  creates the title on a page of its own.
10930  If you leave out the 
10931 \family sans
10932 Date
10933 \family default
10934  environment LaTeX will substitute the current date (every time you regenerate
10935  the output).
10936 \end_layout
10937
10938 \begin_layout Subsubsection
10939 Start a New Foil
10940 \end_layout
10941
10942 \begin_layout Standard
10943 As I mentioned earlier, there are four ways of starting a new foil.
10944  For portrait foils you should use 
10945 \family sans
10946 Foilhead
10947 \family default
10948  or 
10949 \family sans
10950 ShortFoilhead.
10951
10952 \family default
10953  The difference between these two environments is the amount of space between
10954  the title of the foil (the foilhead) and the body of the foil.
10955 \end_layout
10956
10957 \begin_layout Standard
10958 Landscape foils are generated using the 
10959 \family sans
10960 Rotatefoilhead
10961 \family default
10962  and 
10963 \family sans
10964 ShortRotatefoilhead
10965 \family default
10966  environments.
10967  Again the only difference is the spacing between foilhead and body.
10968  Both of the short versions have 0.5 inches less separation between the foilhead
10969  and the body.
10970  
10971 \end_layout
10972
10973 \begin_layout Standard
10974 One problem with the support for landscape foils is the requirement that
10975  you have to use the 
10976 \family typewriter
10977 dvips
10978 \family default
10979  driver to generate the PostScript output otherwise the foils won't be rotated.
10980  It is possible to get landscape foils even if you haven't got the 
10981 \family typewriter
10982 dvips
10983 \family default
10984  driver provided you can feed your foils sideways through your printer ;-)
10985 \end_layout
10986
10987 \begin_layout Subsubsection
10988 Theorems, Lemmas, Proofs and more
10989 \end_layout
10990
10991 \begin_layout Standard
10992 Due to a small bug in LyX you can't have two of the same type of these environme
10993 nts directly following each other.
10994  They must be separated by something.
10995  If you try, you will just be extending the previous environment as if you
10996  had merged the two environments together.
10997  So, how do you get around this problem? The simplest option is to insert
10998  some text between the two environments or add a 
10999 \family sans
11000 LaTeX
11001 \family default
11002  environment between the two with just a 
11003 \begin_inset Quotes eld
11004 \end_inset
11005
11006
11007 \family typewriter
11008 %
11009 \family default
11010
11011 \begin_inset Quotes erd
11012 \end_inset
11013
11014  in it.
11015  This will force LyX to produce two separate environments and hence the
11016  correct LaTeX output.
11017  An example is provided in the example file included with the LyX distribution.
11018  Remember, this problem only occurs if you are trying to place two of the
11019  same type of theorem-like environments one directly after the other.
11020 \end_layout
11021
11022 \begin_layout Subsubsection
11023 Lists
11024 \end_layout
11025
11026 \begin_layout Standard
11027 You get all the commonly supported list styles found in other classes as
11028  well as two new ones.
11029  I'll only describe the new ones here.
11030  If you want to find out more about the other list environments check out
11031  the 
11032 \emph on
11033 User's Guide.
11034
11035 \emph default
11036  If you intend to use itemized lists you might also want to read about the
11037  
11038 \family sans
11039 Itemize
11040 \begin_inset space ~
11041 \end_inset
11042
11043 Bullet
11044 \begin_inset space ~
11045 \end_inset
11046
11047 Selection
11048 \family default
11049  dialog described above in section
11050 \begin_inset space ~
11051 \end_inset
11052
11053
11054 \begin_inset CommandInset ref
11055 LatexCommand ref
11056 reference "sec:bullet"
11057
11058 \end_inset
11059
11060 .
11061 \end_layout
11062
11063 \begin_layout Standard
11064 The two new list styles, 
11065 \family sans
11066 TickList
11067 \family default
11068  and 
11069 \family sans
11070 CrossList
11071 \family default
11072 , are designed to make it easier for you to create lists of do's and don'ts
11073  or right and wrong by providing dedicated environments that use a tick
11074  or a cross as the label of the list.
11075  These lists are in fact dedicated variants of the 
11076 \family sans
11077 Itemize
11078 \family default
11079  environment.
11080  They do however require that you have the 
11081 \family typewriter
11082 psnfss
11083 \family default
11084  packages installed.
11085 \end_layout
11086
11087 \begin_layout Subsubsection
11088 Figures and Tables
11089 \end_layout
11090
11091 \begin_layout Standard
11092
11093 \family sans
11094 FoilTeX
11095 \family default
11096  redefines the floating tables and figures so that they appear exactly where
11097  they are in the text rather than pushing them to the top of the page or
11098  to some user specified location.
11099  In fact if you change the float placement settings they are simply ignored.
11100 \end_layout
11101
11102 \begin_layout Subsubsection
11103 Page Headers and Footers
11104 \begin_inset CommandInset label
11105 LatexCommand label
11106 name "sec:foilfoot"
11107
11108 \end_inset
11109
11110
11111 \end_layout
11112
11113 \begin_layout Standard
11114
11115 \family sans
11116 My
11117 \begin_inset space ~
11118 \end_inset
11119
11120 Logo
11121 \family default
11122  and 
11123 \family sans
11124 Restriction
11125 \family default
11126  are two commands used to control the left-footer text string.
11127  The first is meant to allow you to include a graphic logo on your foils
11128  and defaults to 
11129 \begin_inset Quotes eld
11130 \end_inset
11131
11132 -Typeset by 
11133 \family sans
11134 FoilTeX
11135 \family default
11136 -
11137 \begin_inset Quotes erd
11138 \end_inset
11139
11140 .
11141  While the second is meant to provide a classification for the audience,
11142  
11143 \emph on
11144 e.
11145 \begin_inset space \thinspace{}
11146 \end_inset
11147
11148 g.
11149 \emph default
11150
11151 \begin_inset space \space{}
11152 \end_inset
11153
11154 Confidential.
11155  It is empty by default.
11156 \end_layout
11157
11158 \begin_layout Standard
11159 The remaining page corners can be filled by 
11160 \family sans
11161 Right
11162 \begin_inset space ~
11163 \end_inset
11164
11165 Footer
11166 \family default
11167  (which defaults to page numbers), 
11168 \family sans
11169 Right
11170 \begin_inset space ~
11171 \end_inset
11172
11173 Header
11174 \family default
11175  (top right) and 
11176 \family sans
11177 Left
11178 \begin_inset space ~
11179 \end_inset
11180
11181 Header
11182 \family default
11183  (top left).
11184 \end_layout
11185
11186 \begin_layout Subsection
11187 Unsupported 
11188 \family sans
11189 FoilTeX
11190 \family default
11191  Goodies
11192 \begin_inset CommandInset label
11193 LatexCommand label
11194 name "sec:unsuppfoils"
11195
11196 \end_inset
11197
11198
11199 \end_layout
11200
11201 \begin_layout Standard
11202 All the commands mentioned below need to be set in a 
11203 \family sans
11204 LaTeX
11205 \family default
11206  environment or as 
11207 \family sans
11208 TeX
11209 \family default
11210  within another environment.
11211 \end_layout
11212
11213 \begin_layout Subsubsection
11214 Lengths
11215 \end_layout
11216
11217 \begin_layout Standard
11218 All lengths are adjusted using the 
11219 \family typewriter
11220
11221 \backslash
11222 setlength{
11223 \family default
11224 \emph on
11225 lengthname
11226 \family typewriter
11227 \emph default
11228 }{
11229 \family default
11230 \emph on
11231 newlength
11232 \family typewriter
11233 \emph default
11234 }
11235 \family default
11236  command.
11237  Where 
11238 \emph on
11239 lengthname
11240 \emph default
11241  should be replaced by the name given to the length you want to change and
11242  
11243 \emph on
11244 newlength
11245 \emph default
11246  is the length value.
11247  All lengths should be specified in units of length such as inches (
11248 \family typewriter
11249 in
11250 \family default
11251 ), millimeters (
11252 \family typewriter
11253 mm
11254 \family default
11255 ) or points (
11256 \family typewriter
11257 pt
11258 \family default
11259 ) or relative to some document or font-based length such as 
11260 \family typewriter
11261
11262 \backslash
11263 textwidth
11264 \family default
11265 .
11266  
11267 \end_layout
11268
11269 \begin_layout Standard
11270 It's possible to change the spacing between a foilhead and the body of the
11271  foil by adjusting the length specified by 
11272 \family typewriter
11273
11274 \backslash
11275 foilheadskip
11276 \family default
11277 .
11278  For example, to make 
11279 \emph on
11280 all
11281 \emph default
11282  foilheads 0.5
11283 \begin_inset space \space{}
11284 \end_inset
11285
11286 in closer to their bodies put the following in the preamble: 
11287 \family typewriter
11288
11289 \backslash
11290 setlength{
11291 \backslash
11292 foilheadskip}{-0.5in}
11293 \end_layout
11294
11295 \begin_layout Standard
11296 The spacings around floats can be adjusted by setting these lengths:
11297 \end_layout
11298
11299 \begin_layout Labeling
11300 \labelwidthstring MMMMMMMMMMM
11301
11302 \family typewriter
11303
11304 \backslash
11305 abovefloatskip
11306 \family default
11307  Separation between the text and the top of the float
11308 \end_layout
11309
11310 \begin_layout Labeling
11311 \labelwidthstring MMMMMMMMMMM
11312
11313 \family typewriter
11314
11315 \backslash
11316 abovecaptionskip
11317 \family default
11318  Separation between the float and the caption
11319 \end_layout
11320
11321 \begin_layout Labeling
11322 \labelwidthstring MMMMMMMMMMM
11323
11324 \family typewriter
11325
11326 \backslash
11327 belowcaptionskip
11328 \family default
11329  Separation between the caption and the following text
11330 \end_layout
11331
11332 \begin_layout Labeling
11333 \labelwidthstring MMMMMMMMMMM
11334
11335 \family typewriter
11336
11337 \backslash
11338 captionwidth
11339 \family default
11340  You can make the captions narrower than the surrounding text by adjusting
11341  this length.
11342  Best done relative to 
11343 \family typewriter
11344
11345 \backslash
11346 textwidth
11347 \family default
11348 .
11349 \end_layout
11350
11351 \begin_layout Standard
11352 There are also several title page related lengths that you may find useful
11353  if you have a long title or several authors:
11354 \end_layout
11355
11356 \begin_layout Labeling
11357 \labelwidthstring MMMMMMMMMMM
11358
11359 \family typewriter
11360
11361 \backslash
11362 abovetitleskip
11363 \family default
11364  Separation from headers to 
11365 \family sans
11366 Title
11367 \end_layout
11368
11369 \begin_layout Labeling
11370 \labelwidthstring MMMMMMMMMMM
11371
11372 \family typewriter
11373
11374 \backslash
11375 titleauthorskip
11376 \family default
11377  between 
11378 \family sans
11379 Title
11380 \family default
11381  and 
11382 \family sans
11383 Author
11384 \family default
11385  environments
11386 \end_layout
11387
11388 \begin_layout Labeling
11389 \labelwidthstring MMMMMMMMMMM
11390
11391 \family typewriter
11392
11393 \backslash
11394 authorauthorskip
11395 \family default
11396  between multiple 
11397 \family sans
11398 Author
11399 \family default
11400  lines
11401 \end_layout
11402
11403 \begin_layout Labeling
11404 \labelwidthstring MMMMMMMMMMM
11405
11406 \family typewriter
11407
11408 \backslash
11409 authordateskip
11410 \family default
11411  between the 
11412 \family sans
11413 Author
11414 \family default
11415  and the 
11416 \family sans
11417 Date
11418 \end_layout
11419
11420 \begin_layout Labeling
11421 \labelwidthstring MMMMMMMMMMM
11422
11423 \family typewriter
11424
11425 \backslash
11426 dateabstractskip
11427 \family default
11428  between the 
11429 \family sans
11430 Date
11431 \family default
11432  and the 
11433 \family sans
11434 Abstract
11435 \end_layout
11436
11437 \begin_layout Standard
11438 The last length related command affects all the list environments.
11439  If you place 
11440 \family typewriter
11441
11442 \backslash
11443 zerolistvertdimens
11444 \family default
11445  
11446 \emph on
11447 inside
11448 \emph default
11449  a list environment then all the vertical spacing between the list items
11450  is removed.
11451  Note that this is a command not a length so it doesn't require 
11452 \family typewriter
11453
11454 \backslash
11455 setlength
11456 \family default
11457  like the stuff mentioned above.
11458 \end_layout
11459
11460 \begin_layout Subsubsection
11461 Headers and Footers
11462 \end_layout
11463
11464 \begin_layout Standard
11465 The 
11466 \family typewriter
11467
11468 \backslash
11469 LogoOn
11470 \family default
11471  and 
11472 \family typewriter
11473
11474 \backslash
11475 LogoOff
11476 \family default
11477  commands control whether the logo in the 
11478 \family sans
11479 MyLogo
11480 \family default
11481  definition appear on a given page.
11482  If you put 
11483 \family typewriter
11484
11485 \backslash
11486 LogoOff
11487 \family default
11488  in the preamble then none of the foils will have the logo on them.
11489  If you don't want the logo on a particular page place the 
11490 \family typewriter
11491
11492 \backslash
11493 LogoOff
11494 \family default
11495  directly after the foilhead of that page and the 
11496 \family typewriter
11497
11498 \backslash
11499 LogoOn
11500 \family default
11501  directly after the next foilhead.
11502 \end_layout
11503
11504 \begin_layout Standard
11505 If you decide to use the 
11506 \family sans
11507 fancy
11508 \family default
11509  page style setting in the 
11510 \family sans
11511 Document
11512 \begin_inset space ~
11513 \end_inset
11514
11515 Layout
11516 \family default
11517  dialog you should probably add 
11518 \family typewriter
11519
11520 \backslash
11521 let
11522 \backslash
11523 headwidth
11524 \backslash
11525 textwidth
11526 \family default
11527  to your preamble so headers and footers on landscape pages are correctly
11528  placed when rotated.
11529  This is due to some clashes between the page layouts provided by the 
11530 \family sans
11531 fancyheadings
11532 \family default
11533  package and the 
11534 \family sans
11535 foils
11536 \family default
11537  class.
11538 \end_layout
11539
11540 \begin_layout Section
11541 Hollywood (Hollywood spec scripts)
11542 \end_layout
11543
11544 \begin_layout Standard
11545 by 
11546 \shape smallcaps
11547 Garst Reese
11548 \end_layout
11549
11550 \begin_layout Subsection
11551 Introduction
11552 \end_layout
11553
11554 \begin_layout Standard
11555 Getting the format of a Hollywood script right is a 
11556 \begin_inset Quotes eld
11557 \end_inset
11558
11559 rite of passage.
11560 \begin_inset Quotes erd
11561 \end_inset
11562
11563  It is designed to make the readers focus on content and to be easy and
11564  familiar for the actors to read.
11565  Each page of a script should be one minute of film.
11566  Nothing goes in a script that you cannot see or hear on screen.
11567  The courier 12 pt font should be used throughout.
11568  No italics.
11569 \end_layout
11570
11571 \begin_layout Subsection
11572 Special problems
11573 \end_layout
11574
11575 \begin_layout Standard
11576 Speakers' lines should NEVER break in mid-sentence.
11577  If a speaker's lines continue over a page break, repeat the 
11578 \family sans
11579 Speaker
11580 \family default
11581  title followed by (Cont'd).
11582 \end_layout
11583
11584 \begin_layout Subsection
11585 Special features
11586 \end_layout
11587
11588 \begin_layout Standard
11589 Insert the 
11590 \family sans
11591 Speaker
11592 \family default
11593  names as labels then cross-reference the label to insert the name.
11594  The cross-reference dialog will show the current cast of characters.
11595  You can use this to insert the speaker name in narratives also.
11596 \end_layout
11597
11598 \begin_layout Subsection
11599 Paper size and Margins
11600 \end_layout
11601
11602 \begin_layout Standard
11603 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11604 \end_layout
11605
11606 \begin_layout Subsection
11607 Environments
11608 \end_layout
11609
11610 \begin_layout Standard
11611 The following environments are available.
11612  You can use hollywood.bind to get the bind keys shown at the right.
11613 \end_layout
11614
11615 \begin_layout Itemize
11616
11617 \family sans
11618 Standard
11619 \begin_inset Newline newline
11620 \end_inset
11621
11622
11623 \family default
11624 Used where nothing else works.
11625  Try to avoid it.
11626 \end_layout
11627
11628 \begin_layout Itemize
11629
11630 \family sans
11631 FADE_IN
11632 \family default
11633 :
11634 \begin_inset space \hfill{}
11635 \end_inset
11636
11637
11638 \family sans
11639 M-z S-I
11640 \family default
11641
11642 \begin_inset Newline newline
11643 \end_inset
11644
11645 Usually followed by something like 
11646 \begin_inset Quotes eld
11647 \end_inset
11648
11649 on Sally waking up.
11650 \begin_inset Quotes erd
11651 \end_inset
11652
11653
11654 \end_layout
11655
11656 \begin_layout Itemize
11657
11658 \family sans
11659 INT:
11660 \begin_inset space \hfill{}
11661 \end_inset
11662
11663 M-z i
11664 \begin_inset Newline newline
11665 \end_inset
11666
11667
11668 \family default
11669 Introduces a new INTERIOR camera set-up.
11670  Always followed by DAY or NIGHT, or something similar to define the lighting
11671  required.
11672  Everthing on this line in CAPS.
11673 \end_layout
11674
11675 \begin_layout Itemize
11676
11677 \family sans
11678 EXT:
11679 \begin_inset space \hfill{}
11680 \end_inset
11681
11682 M-z e
11683 \begin_inset Newline newline
11684 \end_inset
11685
11686
11687 \family default
11688 Introduces a new EXTERIOR camera set-up.
11689  Everthing on this line in CAPS.
11690 \end_layout
11691
11692 \begin_layout Itemize
11693
11694 \family sans
11695 Speaker
11696 \begin_inset space \hfill{}
11697 \end_inset
11698
11699 M-z s
11700 \begin_inset Newline newline
11701 \end_inset
11702
11703
11704 \family default
11705 The character speaking.
11706 \end_layout
11707
11708 \begin_layout Itemize
11709
11710 \family sans
11711 Parenthetical
11712 \begin_inset space \hfill{}
11713 \end_inset
11714
11715 M-z p
11716 \begin_inset Newline newline
11717 \end_inset
11718
11719
11720 \family default
11721 Instructions to the speaker.
11722  The () are automatically inserted, but only the ( will show in LyX.
11723  Both will be printed.
11724 \end_layout
11725
11726 \begin_layout Itemize
11727
11728 \family sans
11729 Dialogue
11730 \begin_inset space \hfill{}
11731 \end_inset
11732
11733 M-z d
11734 \begin_inset Newline newline
11735 \end_inset
11736
11737
11738 \family default
11739 What the 
11740 \family sans
11741 Speaker
11742 \family default
11743  says.
11744 \end_layout
11745
11746 \begin_layout Itemize
11747
11748 \family sans
11749 Transition
11750 \begin_inset space \hfill{}
11751 \end_inset
11752
11753 M-z t
11754 \begin_inset Newline newline
11755 \end_inset
11756
11757
11758 \family default
11759 Camera movement instruction.
11760  e.
11761 \begin_inset space \thinspace{}
11762 \end_inset
11763
11764 g.
11765 \begin_inset space \space{}
11766 \end_inset
11767
11768 CUT TO:
11769 \end_layout
11770
11771 \begin_layout Itemize
11772
11773 \family sans
11774 FADE OUT:
11775 \begin_inset space \hfill{}
11776 \end_inset
11777
11778 M-z S-I
11779 \end_layout
11780
11781 \begin_layout Itemize
11782
11783 \family sans
11784 Author
11785 \begin_inset space \hfill{}
11786 \end_inset
11787
11788 M-z S-A
11789 \end_layout
11790
11791 \begin_layout Itemize
11792
11793 \family sans
11794 Title
11795 \begin_inset space \hfill{}
11796 \end_inset
11797
11798 M-z S-T
11799 \end_layout
11800
11801 \begin_layout Itemize
11802
11803 \family sans
11804 Right_Address
11805 \begin_inset space \hfill{}
11806 \end_inset
11807
11808 M-z r
11809 \end_layout
11810
11811 \begin_layout Subsection
11812 Script jargon
11813 \end_layout
11814
11815 \begin_layout Itemize
11816 (O.S) — off screen
11817 \end_layout
11818
11819 \begin_layout Itemize
11820 (V.0) — voice over
11821 \end_layout
11822
11823 \begin_layout Itemize
11824 b.
11825 \begin_inset space \thinspace{}
11826 \end_inset
11827
11828 g.
11829  — background
11830 \end_layout
11831
11832 \begin_layout Itemize
11833 C.U.
11834  — close-up
11835 \end_layout
11836
11837 \begin_layout Itemize
11838 PAN — camera movement
11839 \end_layout
11840
11841 \begin_layout Itemize
11842 INSERT — cut to close-up of
11843 \end_layout
11844
11845 \begin_layout Section
11846 ijmpc and ijmpd
11847 \end_layout
11848
11849 \begin_layout Standard
11850 by 
11851 \noun on
11852 Panayotis Papasotiriou
11853 \end_layout
11854
11855 \begin_layout Subsection
11856 Overview
11857 \end_layout
11858
11859 \begin_layout Standard
11860 The ijmpc package is a set of macros that facilitates electronic manuscript
11861  submission to the 
11862 \emph on
11863 International Journal of Modern Physics C
11864 \emph default
11865 .
11866  Similarly, the ijmpd package is for creating manuscripts to be submitted
11867  to the 
11868 \emph on
11869 International Journal of Modern Physics D
11870 \emph default
11871 .
11872  Both journals are published by World Scientific.
11873  The corresponding document classes are named 
11874 \family typewriter
11875 ws-ijmpc.cls
11876 \family default
11877  and 
11878 \family typewriter
11879 ws-ijmpd.cls
11880 \family default
11881 , respectively.
11882  These files, together with instructions for the authors, can be downloaded
11883  from the sites 
11884 \begin_inset Flex URL
11885 status collapsed
11886
11887 \begin_layout Plain Layout
11888
11889 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11890 \end_layout
11891
11892 \end_inset
11893
11894  and 
11895 \begin_inset Flex URL
11896 status collapsed
11897
11898 \begin_layout Plain Layout
11899
11900 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11901 \end_layout
11902
11903 \end_inset
11904
11905 .
11906  Both packages are modified versions of the standard 
11907 \begin_inset Quotes eld
11908 \end_inset
11909
11910 article
11911 \begin_inset Quotes erd
11912 \end_inset
11913
11914  package, and they are almost (but not exactly) identical.
11915  Most of their features are supported by LyX.
11916  I have used LyX successfully to write articles submitted to both journals
11917  without any problem.
11918 \end_layout
11919
11920 \begin_layout Subsection
11921 Writing a paper
11922 \end_layout
11923
11924 \begin_layout Standard
11925 As usual, the easiest way to write a paper is to start with a template.
11926  Click on 
11927 \family sans
11928 File\SpecialChar \menuseparator
11929 New from
11930 \family default
11931  
11932 \family sans
11933 \bar under
11934 T
11935 \bar default
11936 emplate
11937 \family default
11938 , then choose the 
11939 \family typewriter
11940 ijmpc.lyx
11941 \family default
11942  or 
11943 \family typewriter
11944 ijmpd.lyx
11945 \family default
11946  template.
11947  This will give an (almost) empty document that includes the most common
11948  fields found in a manuscript.
11949  Simply overwrite the existing text (including the brackets, 
11950 \family typewriter
11951 <>
11952 \family default
11953 ) with your text.
11954  You should keep in mind the following remarks.
11955 \end_layout
11956
11957 \begin_layout Enumerate
11958 LyX won't let you change the font size and the page style of the document,
11959  because such modifications are not allowed by both packages.
11960 \end_layout
11961
11962 \begin_layout Enumerate
11963 The language of the document should not be changed.
11964  Before previewing your paper, be sure that the babel package is not used.
11965  To do this, click on 
11966 \family sans
11967 Tools\SpecialChar \menuseparator
11968 Preferences
11969 \family default
11970 , select the 
11971 \family sans
11972 Lang Opts
11973 \family default
11974  tab, deselect the 
11975 \family sans
11976 Use babel
11977 \family default
11978  checkbox in the language settings, and click on 
11979 \family sans
11980 Apply
11981 \family default
11982  (or 
11983 \family sans
11984 Save
11985 \family default
11986 , if you wish to make this change permanent).
11987 \end_layout
11988
11989 \begin_layout Enumerate
11990 The 
11991 \begin_inset Quotes eld
11992 \end_inset
11993
11994 Keywords
11995 \begin_inset Quotes erd
11996 \end_inset
11997
11998  style must be used to define keywords.
11999 \end_layout
12000
12001 \begin_layout Enumerate
12002 The ijmpc package provides a style named 
12003 \begin_inset Quotes eld
12004 \end_inset
12005
12006 Classification Codes
12007 \begin_inset Quotes erd
12008 \end_inset
12009
12010 , which can be used to define classification codes, such as PACS numbers.
12011  Note that this facility is not supported by the ijmpd package.
12012 \end_layout
12013
12014 \begin_layout Enumerate
12015 Several new environments are available: 
12016 \begin_inset Quotes eld
12017 \end_inset
12018
12019 Definition
12020 \begin_inset Quotes erd
12021 \end_inset
12022
12023
12024 \begin_inset Quotes eld
12025 \end_inset
12026
12027 Step
12028 \begin_inset Quotes erd
12029 \end_inset
12030
12031
12032 \begin_inset Quotes eld
12033 \end_inset
12034
12035 Example
12036 \begin_inset Quotes erd
12037 \end_inset
12038
12039
12040 \begin_inset Quotes eld
12041 \end_inset
12042
12043 Remark
12044 \begin_inset Quotes erd
12045 \end_inset
12046
12047
12048 \begin_inset Quotes eld
12049 \end_inset
12050
12051 Notation
12052 \begin_inset Quotes erd
12053 \end_inset
12054
12055
12056 \begin_inset Quotes eld
12057 \end_inset
12058
12059 Theorem
12060 \begin_inset Quotes erd
12061 \end_inset
12062
12063
12064 \begin_inset Quotes eld
12065 \end_inset
12066
12067 Proof
12068 \begin_inset Quotes erd
12069 \end_inset
12070
12071
12072 \begin_inset Quotes eld
12073 \end_inset
12074
12075 Corollary
12076 \begin_inset Quotes erd
12077 \end_inset
12078
12079
12080 \begin_inset Quotes eld
12081 \end_inset
12082
12083 Lemma
12084 \begin_inset Quotes erd
12085 \end_inset
12086
12087
12088 \begin_inset Quotes eld
12089 \end_inset
12090
12091 Proposition
12092 \begin_inset Quotes erd
12093 \end_inset
12094
12095
12096 \begin_inset Quotes eld
12097 \end_inset
12098
12099 Prop
12100 \begin_inset Quotes erd
12101 \end_inset
12102
12103
12104 \begin_inset Quotes eld
12105 \end_inset
12106
12107 Question
12108 \begin_inset Quotes erd
12109 \end_inset
12110
12111
12112 \begin_inset Quotes eld
12113 \end_inset
12114
12115 Claim
12116 \begin_inset Quotes erd
12117 \end_inset
12118
12119 , and 
12120 \begin_inset Quotes eld
12121 \end_inset
12122
12123 Conjecture
12124 \begin_inset Quotes erd
12125 \end_inset
12126
12127 .
12128  Their use is more or less obvious.
12129  LyX supports all these environments; it will use the proper label, text
12130  style, and numbering scheme for each of them.
12131 \end_layout
12132
12133 \begin_layout Enumerate
12134 Both packages use basic citations; the natbib package should not be used.
12135  In LyX, citation references are shown as usual; in the output, citations
12136  are shown as superscripts.
12137  If you want to use a citation as normal text, you should use the 
12138 \family typewriter
12139 refcite
12140 \family default
12141  command, e.
12142 \begin_inset space \thinspace{}
12143 \end_inset
12144
12145 g.
12146 \begin_inset space \space{}
12147 \end_inset
12148
12149
12150 \begin_inset Quotes eld
12151 \end_inset
12152
12153 See Ref.
12154 \begin_inset space \space{}
12155 \end_inset
12156
12157
12158 \family typewriter
12159
12160 \backslash
12161 refcite{key}
12162 \family default
12163
12164 \begin_inset Quotes erd
12165 \end_inset
12166
12167 .
12168 \end_layout
12169
12170 \begin_layout Enumerate
12171 There is no 
12172 \begin_inset Quotes eld
12173 \end_inset
12174
12175 Acknowledgments
12176 \begin_inset Quotes erd
12177 \end_inset
12178
12179  section in both packages.
12180  To put acknowledgments, just use the 
12181 \begin_inset Quotes eld
12182 \end_inset
12183
12184 Section*
12185 \begin_inset Quotes erd
12186 \end_inset
12187
12188  environment.
12189 \end_layout
12190
12191 \begin_layout Enumerate
12192 Appendices may be added to the paper, 
12193 \emph on
12194 after
12195 \emph default
12196  the Acknowledgments and 
12197 \shape italic
12198 before
12199 \shape default
12200  the References.
12201  LyX provides a special environment, called 
12202 \begin_inset Quotes eld
12203 \end_inset
12204
12205 Appendices Section
12206 \begin_inset Quotes erd
12207 \end_inset
12208
12209  which marks the beginning of the appendices.
12210  This environment should be left blank; it just sends a LaTeX command, but
12211  nothing is really printed.
12212  In LyX, the word 
12213 \begin_inset Quotes eld
12214 \end_inset
12215
12216 Appendix
12217 \begin_inset Quotes erd
12218 \end_inset
12219
12220  is printed with blue letters, as a signal that all sections after that
12221  point are appendices.
12222  To write an appendix, use the 
12223 \begin_inset Quotes eld
12224 \end_inset
12225
12226 Appendix
12227 \begin_inset Quotes erd
12228 \end_inset
12229
12230  environment.
12231  LyX will number each appendix with capital letters, as required by both
12232  journals.
12233  Note that 
12234 \begin_inset Quotes eld
12235 \end_inset
12236
12237 Appendices Section
12238 \begin_inset Quotes erd
12239 \end_inset
12240
12241  
12242 \emph on
12243 must
12244 \emph default
12245  be present before the first appendix; if not, all appendices will be numbered
12246  as normal sections in the output.
12247 \end_layout
12248
12249 \begin_layout Enumerate
12250 The ijmpc and the ijmpd packages use the 
12251 \family typewriter
12252 tbl
12253 \family default
12254  command to implement table captions.
12255  As a result, a table created by LyX is printed correctly, but its caption
12256  is ignored.
12257  However, you can use some TeX code to overcome this problem, so that captions
12258  are printed as expected.
12259  To do so, create a float table as usual, remove the caption, and replace
12260  it with the TeX code 
12261 \family typewriter
12262
12263 \backslash
12264 tbl{
12265 \emph on
12266 your table caption
12267 \emph default
12268 }{
12269 \family default
12270  (sic); you must also the TeX code 
12271 \family typewriter
12272 }
12273 \family default
12274  immediately after the tabular material.
12275  Study the example table included in the template files to see how this
12276  trick is implemented.
12277  Alternatively, If you need table captions, you should implement the whole
12278  table float in a 
12279 \family typewriter
12280 .tex
12281 \family default
12282  file, then include this file to the LyX document (
12283 \family sans
12284 Insert\SpecialChar \menuseparator
12285 File\SpecialChar \menuseparator
12286 Child
12287 \begin_inset space ~
12288 \end_inset
12289
12290 Document
12291 \family default
12292 ).
12293  Details on how to create a table float can be found in the files 
12294 \family typewriter
12295 ws-ijmpc.tex
12296 \family default
12297  and 
12298 \family typewriter
12299 ws-ijmpd.tex
12300 \family default
12301 , included in the corresponding packages.
12302 \end_layout
12303
12304 \begin_layout Subsection
12305 Preparing a paper for submission
12306 \end_layout
12307
12308 \begin_layout Standard
12309 Before you submit your paper you must export the LyX document as a LaTeX
12310  file (
12311 \family sans
12312 File\SpecialChar \menuseparator
12313 Export\SpecialChar \menuseparator
12314 LaTeX
12315 \family default
12316 )
12317 \begin_inset Foot
12318 status open
12319
12320 \begin_layout Plain Layout
12321 Actually you have the choice between LaTeX (plain) and pdflatex.
12322  If you intend to use pdflatex to prepare the paper, you should use the
12323  pdflatex option so that included graphics are converted to PDF format,
12324  ready for use by pdflatex.
12325 \end_layout
12326
12327 \end_inset
12328
12329 , then make the following changes to the resulting 
12330 \family typewriter
12331 .tex
12332 \family default
12333  file.
12334 \end_layout
12335
12336 \begin_layout Enumerate
12337 Remove the comment lines before the 
12338 \family typewriter
12339
12340 \backslash
12341 documentclass
12342 \family default
12343  command.
12344 \end_layout
12345
12346 \begin_layout Enumerate
12347 Remove everything between (and including) the 
12348 \family typewriter
12349
12350 \backslash
12351 makeatletter
12352 \family default
12353  and 
12354 \family typewriter
12355
12356 \backslash
12357 makeatother
12358 \family default
12359  commands, except for any commands you specifically put into the LaTeX preamble.
12360 \end_layout
12361
12362 \begin_layout Standard
12363 The modified 
12364 \family typewriter
12365 .tex
12366 \family default
12367  file should be saved and processed through LaTeX as many times as necessary.
12368  You may also want to check the resulting 
12369 \family typewriter
12370 .dvi
12371 \family default
12372  document.
12373 \end_layout
12374
12375 \begin_layout Subsection
12376 Use of TeX code
12377 \end_layout
12378
12379 \begin_layout Standard
12380 The use of TeX code is reduced to two commands, which must be placed at
12381  the top of the document.
12382  If you started writing your paper by using the 
12383 \family typewriter
12384 ijmpc.lyx
12385 \family default
12386  or the 
12387 \family typewriter
12388 ijmpd.lyx
12389 \family default
12390  template, the TeX code needed is already in its place; you usually don't
12391  need to delete it.
12392  You may only modify the first TeX code to specify the information printed
12393  to the top of odd and even pages (authors' names and short paper's title,
12394  respectively).
12395  This TeX code must have the form 
12396 \family typewriter
12397
12398 \backslash
12399 markboth{Authors' Names}{Short Paper's Title}
12400 \family default
12401 .
12402 \end_layout
12403
12404 \begin_layout Section
12405 iopart
12406 \end_layout
12407
12408 \begin_layout Standard
12409 by 
12410 \noun on
12411 Uwe Stöhr
12412 \end_layout
12413
12414 \begin_layout Subsection
12415 Overview
12416 \end_layout
12417
12418 \begin_layout Standard
12419 The iopart package provides a document class to create electronic manuscript
12420  submission to the journals published by the Institute of Physics.
12421  Instructions for the authors how to create a paper using the iopart class
12422  can be downloaded together with the iopart package from the site 
12423 \begin_inset Flex URL
12424 status collapsed
12425
12426 \begin_layout Plain Layout
12427
12428 ftp://ftp.iop.org/pub/journals/latex2e
12429 \end_layout
12430
12431 \end_inset
12432
12433 .
12434 \end_layout
12435
12436 \begin_layout Subsection
12437 Writing a paper
12438 \end_layout
12439
12440 \begin_layout Standard
12441 The easiest way to write a paper is to start with the file 
12442 \emph on
12443 IOP-article.lyx
12444 \emph default
12445  that is available in LyX's examples files folder.
12446  Open this file, save it under a new name, and start writing.
12447  The example file explains how to use the special text environments.
12448  Here are the most important advices:
12449 \end_layout
12450
12451 \begin_layout Itemize
12452 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12453  two options 
12454 \family sans
12455 Use AMS math package
12456 \family default
12457  in the document settings under 
12458 \family sans
12459 Math Options
12460 \family default
12461  are not used!
12462 \end_layout
12463
12464 \begin_layout Itemize
12465
12466 \size normal
12467 The title environment defines the kind of your paper.
12468  So use one of the following environments for the title:
12469 \end_layout
12470
12471 \begin_deeper
12472 \begin_layout Itemize
12473
12474 \family sans
12475 \size normal
12476 Title
12477 \family default
12478  for a Paper
12479 \end_layout
12480
12481 \begin_layout Itemize
12482
12483 \family sans
12484 \size normal
12485 Review
12486 \family default
12487  for a Review
12488 \end_layout
12489
12490 \begin_layout Itemize
12491
12492 \family sans
12493 \size normal
12494 Topical
12495 \family default
12496  for a Topical review
12497 \end_layout
12498
12499 \begin_layout Itemize
12500
12501 \family sans
12502 \size normal
12503 Comment
12504 \family default
12505  for a Comment
12506 \end_layout
12507
12508 \begin_layout Itemize
12509
12510 \family sans
12511 \size normal
12512 Note
12513 \family default
12514  for a Note
12515 \end_layout
12516
12517 \begin_layout Itemize
12518
12519 \family sans
12520 \size normal
12521 Paper
12522 \family default
12523  for a Paper (same as Title)
12524 \end_layout
12525
12526 \begin_layout Itemize
12527
12528 \family sans
12529 \size normal
12530 Prelim
12531 \family default
12532  for a Preliminary communication
12533 \end_layout
12534
12535 \begin_layout Itemize
12536
12537 \family sans
12538 \size normal
12539 Rapid
12540 \family default
12541  for a Rapid communication
12542 \end_layout
12543
12544 \begin_layout Itemize
12545
12546 \family sans
12547 \size normal
12548 Letter
12549 \family default
12550  for a Letter to the editor
12551 \end_layout
12552
12553 \end_deeper
12554 \begin_layout Itemize
12555
12556 \size normal
12557 All title environments except of 
12558 \family sans
12559 Letter
12560 \family default
12561  can have an optional short title.
12562 \end_layout
12563
12564 \begin_layout Itemize
12565 There is a general title environment 
12566 \family sans
12567 Article
12568 \family default
12569  which is not directly supported by the LyX.
12570  This can be used as TeX code when your document doesn't fit into one of
12571  the other title types.
12572 \end_layout
12573
12574 \begin_layout Standard
12575 For more informations like hints for special table and formula formatting,
12576  look at the IOP author guidelines.
12577 \end_layout
12578
12579 \begin_layout Section
12580 Kluwer
12581 \end_layout
12582
12583 \begin_layout Standard
12584 by 
12585 \noun on
12586 Panayotis Papasotiriou
12587 \end_layout
12588
12589 \begin_layout Subsection
12590 Overview
12591 \end_layout
12592
12593 \begin_layout Standard
12594 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12595  that facilitates electronic manuscript submission to the journals they
12596  publish.
12597  Most known of them (at least in my domain of interest) are 
12598 \emph on
12599 Astrophysics and Space Science
12600 \emph default
12601  and 
12602 \emph on
12603 Solar Physics
12604 \emph default
12605 , but there are many others (see a complete list at 
12606 \begin_inset Flex URL
12607 status open
12608
12609 \begin_layout Plain Layout
12610
12611 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12612 \end_layout
12613
12614 \end_inset
12615
12616 ).
12617  The Kluwer package may be downloaded from the site 
12618 \begin_inset Flex URL
12619 status collapsed
12620
12621 \begin_layout Plain Layout
12622
12623 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12624 \end_layout
12625
12626 \end_inset
12627
12628 .
12629  A complete user guide is contained in that package (but it can also be
12630  downloaded separately).
12631 \end_layout
12632
12633 \begin_layout Standard
12634 LyX supports many features of the package but not everything.
12635  However, the TeX code needed is reduced to some 
12636 \begin_inset Quotes eld
12637 \end_inset
12638
12639 peculiar
12640 \begin_inset Quotes erd
12641 \end_inset
12642
12643  commands of the package (see
12644 \begin_inset space ~
12645 \end_inset
12646
12647
12648 \begin_inset CommandInset ref
12649 LatexCommand ref
12650 reference "subsec:kluwer_peculiarities"
12651
12652 \end_inset
12653
12654 ).
12655  I have recently used LyX to write an article submitted to the 
12656 \emph on
12657 Astrophysics and Space Science
12658 \emph default
12659  without any problem.
12660 \end_layout
12661
12662 \begin_layout Subsection
12663 Writing a paper
12664 \end_layout
12665
12666 \begin_layout Standard
12667 The easiest way to write a paper is to start with the Kluwer template file.
12668  Click on 
12669 \family sans
12670 File\SpecialChar \menuseparator
12671 New from
12672 \family default
12673  
12674 \family sans
12675 Template
12676 \family default
12677 , then choose the 
12678 \family typewriter
12679 kluwer.lyx
12680 \family default
12681  template.
12682  This will give an (almost) empty document that includes the most common
12683  fields found in a manuscript and a short description of their use.
12684  As in most templates, simply overwrite the existing text (including the
12685  brackets, 
12686 \family typewriter
12687 <>
12688 \family default
12689 ) with the correct information.
12690 \end_layout
12691
12692 \begin_layout Subsection
12693 Preparing a paper for submission
12694 \end_layout
12695
12696 \begin_layout Standard
12697 As in the AASTeX package, before you submit your paper to a journal you
12698  must 
12699 \begin_inset Quotes eld
12700 \end_inset
12701
12702 postprocess
12703 \begin_inset Quotes erd
12704 \end_inset
12705
12706  it as follows.
12707 \end_layout
12708
12709 \begin_layout Enumerate
12710 Export your paper as a LaTeX file.
12711  To do this, click on 
12712 \family sans
12713 File\SpecialChar \menuseparator
12714 Export\SpecialChar \menuseparator
12715 LaTeX
12716 \family default
12717 .
12718  
12719 \end_layout
12720
12721 \begin_layout Enumerate
12722 Edit the resulting 
12723 \family typewriter
12724 .tex
12725 \family default
12726  file with a text editor and make the following changes
12727 \end_layout
12728
12729 \begin_deeper
12730 \begin_layout Enumerate
12731 remove the comment lines before the 
12732 \family typewriter
12733
12734 \backslash
12735 documentclass
12736 \family default
12737  command,
12738 \end_layout
12739
12740 \begin_layout Enumerate
12741 remove everything between (and including) the 
12742 \family typewriter
12743
12744 \backslash
12745 makeatletter
12746 \family default
12747  and 
12748 \family typewriter
12749
12750 \backslash
12751 makeatother
12752 \family default
12753  commands, except for any commands you specifically put into the LaTeX preamble.
12754 \end_layout
12755
12756 \begin_layout Standard
12757 Save the resulting 
12758 \family typewriter
12759 .tex
12760 \family default
12761  file.
12762 \end_layout
12763
12764 \end_deeper
12765 \begin_layout Enumerate
12766 Run the 
12767 \family typewriter
12768 .tex
12769 \family default
12770  file through LaTeX as many times as necessary (usually up to three).
12771 \end_layout
12772
12773 \begin_layout Enumerate
12774 View the resulting 
12775 \family typewriter
12776 .dvi
12777 \family default
12778  document using, e.
12779 \begin_inset space \thinspace{}
12780 \end_inset
12781
12782 g.
12783 \begin_inset space \space{}
12784 \end_inset
12785
12786
12787 \family sans
12788 xdvi
12789 \family default
12790 , and check if everything is OK (it should, if you didn't make any mistake).
12791 \end_layout
12792
12793 \begin_layout Subsection
12794 \begin_inset Quotes eld
12795 \end_inset
12796
12797 Peculiarities
12798 \begin_inset Quotes erd
12799 \end_inset
12800
12801  of the Kluwer package
12802 \begin_inset CommandInset label
12803 LatexCommand label
12804 name "subsec:kluwer_peculiarities"
12805
12806 \end_inset
12807
12808
12809 \end_layout
12810
12811 \begin_layout Standard
12812 The Kluwer package has the following 
12813 \begin_inset Quotes eld
12814 \end_inset
12815
12816 peculiarities
12817 \begin_inset Quotes erd
12818 \end_inset
12819
12820 .
12821 \end_layout
12822
12823 \begin_layout Enumerate
12824 It is possible to write multiple articles in the same LaTeX file
12825 \begin_inset Foot
12826 status collapsed
12827
12828 \begin_layout Plain Layout
12829 I can't imagine any good reason to do this.
12830 \end_layout
12831
12832 \end_inset
12833
12834 .
12835  Each article must be included in the environment 
12836 \begin_inset Quotes eld
12837 \end_inset
12838
12839 article
12840 \begin_inset Quotes erd
12841 \end_inset
12842
12843 .
12844  Unfortunately, this environment cannot be omitted, even if you write just
12845  one article.
12846  Therefore, each article starts with the command 
12847 \family typewriter
12848
12849 \backslash
12850 begin{article}
12851 \family default
12852  and, obviously, ends with the command 
12853 \family typewriter
12854
12855 \backslash
12856 end{article}
12857 \family default
12858 .
12859  Although this can be implemented in LyX, I didn't included it, since it
12860  looks ugly and can confuse the novice user.
12861  Therefore, you need to enter them directly and mark them as LaTeX code
12862  (the well-known 
12863 \begin_inset Quotes eld
12864 \end_inset
12865
12866 TeX code
12867 \begin_inset Quotes erd
12868 \end_inset
12869
12870 ).
12871 \end_layout
12872
12873 \begin_layout Enumerate
12874 Information given at the beginning of the article (i.
12875 \begin_inset space \thinspace{}
12876 \end_inset
12877
12878 e.
12879 \begin_inset space \space{}
12880 \end_inset
12881
12882 title, subtitle, author, institution, running title, running author, abstract
12883  and keywords) must be included in an environment called 
12884 \begin_inset Quotes eld
12885 \end_inset
12886
12887 opening
12888 \begin_inset Quotes erd
12889 \end_inset
12890
12891 .
12892  This is not implemented in LyX, so you must enter title, subtitle etc.
12893 \begin_inset space ~
12894 \end_inset
12895
12896 between two TeX code lines (
12897 \family typewriter
12898
12899 \backslash
12900 begin{opening}
12901 \family default
12902  and 
12903 \family typewriter
12904
12905 \backslash
12906 end{opening}
12907 \family default
12908 ).
12909 \end_layout
12910
12911 \begin_layout Enumerate
12912 According to the user manual, the label of each bibliography item must be
12913  written as 
12914 \family typewriter
12915
12916 \backslash
12917 protect
12918 \backslash
12919 citeauthoryear{
12920 \family default
12921 \emph on
12922 author(s)
12923 \family typewriter
12924 \emph default
12925 }{
12926 \family default
12927 \emph on
12928 year
12929 \family typewriter
12930 \emph default
12931 }
12932 \family default
12933 .
12934 \end_layout
12935
12936 \begin_layout Standard
12937 The 
12938 \family typewriter
12939 kluwer.lyx
12940 \family default
12941  template takes care of all these 
12942 \begin_inset Quotes eld
12943 \end_inset
12944
12945 peculiarities
12946 \begin_inset Quotes erd
12947 \end_inset
12948
12949 .
12950  If you start a new paper using this template you don't need to do anything
12951  special.
12952  Just 
12953 \end_layout
12954
12955 \begin_layout Enumerate
12956 don't delete the TeX code included in the template, and
12957 \end_layout
12958
12959 \begin_layout Enumerate
12960 copy the example bibliography item included in the template and modify it
12961  as necessary to enter new bibliography items.
12962 \end_layout
12963
12964 \begin_layout Section
12965 Koma-Script
12966 \end_layout
12967
12968 \begin_layout Standard
12969 by 
12970 \noun on
12971 Bernd Rellermeyer
12972 \end_layout
12973
12974 \begin_layout Subsection
12975 Overview
12976 \end_layout
12977
12978 \begin_layout Standard
12979 The LyX document classes 
12980 \emph on
12981 article (koma-script)
12982 \emph default
12983
12984 \emph on
12985 report (koma-script)
12986 \emph default
12987
12988 \emph on
12989 book
12990 \emph default
12991  
12992 \emph on
12993 (koma-script)
12994 \emph default
12995 , and 
12996 \emph on
12997 letter
12998 \emph default
12999  
13000 \emph on
13001 (koma-script)
13002 \emph default
13003  correspond to the LaTeX document classes 
13004 \family typewriter
13005 scrartcl.cls
13006 \family default
13007
13008 \family typewriter
13009 scrreprt.cls
13010 \family default
13011
13012 \family typewriter
13013 scrbook.cls
13014 \family default
13015 , and 
13016 \family typewriter
13017 scrlettr.cls
13018 \family default
13019 , resp.
13020 \begin_inset space ~
13021 \end_inset
13022
13023 of the Koma-Script family.
13024  They are replacements for the standard document classes 
13025 \family typewriter
13026 article.cls
13027 \family default
13028
13029 \family typewriter
13030 report.cls
13031 \family default
13032
13033 \family typewriter
13034 book.cls
13035 \family default
13036  and 
13037 \family typewriter
13038 letter.cls
13039 \family default
13040 , resp., and fit better to European typography conventions in a number of
13041  points.
13042 \end_layout
13043
13044 \begin_layout Itemize
13045 Standard character size is 11pt in 
13046 \emph on
13047 article (koma-script)
13048 \emph default
13049
13050 \emph on
13051 report (koma-script)
13052 \emph default
13053 , and 
13054 \emph on
13055 book (koma-script)
13056 \emph default
13057 , and 12pt in 
13058 \emph on
13059 letter (koma-script)
13060 \emph default
13061 .
13062 \end_layout
13063
13064 \begin_layout Itemize
13065 Headings, labels of the description environment, and a number of elements
13066  of the 
13067 \emph on
13068 letter (koma-script)
13069 \emph default
13070  document class are set in a bold sans serif font.
13071 \begin_inset Foot
13072 status collapsed
13073
13074 \begin_layout Plain Layout
13075 There is a big difference between the bold sans serif old cm fonts and new
13076  ec fonts, especially in the appearance of headings.
13077  In comparison, the ec bold sans serif fonts look a bit thin.
13078  Here the LaTeX package 
13079 \family typewriter
13080 cmsd.sty by
13081 \family default
13082  
13083 \shape smallcaps
13084 Walter Schmidt
13085 \shape default
13086  helps to produce the 
13087 \begin_inset Quotes eld
13088 \end_inset
13089
13090 usual
13091 \begin_inset Quotes erd
13092 \end_inset
13093
13094  appearance when using the ec fonts.
13095 \end_layout
13096
13097 \end_inset
13098
13099  The numbering of chapter headings is made in the same way as the numbering
13100  of section headings, that is without the extra line 
13101 \begin_inset Quotes eld
13102 \end_inset
13103
13104 Chapter\SpecialChar \ldots{}
13105
13106 \begin_inset Quotes erd
13107 \end_inset
13108
13109 .
13110  In addition, the appearance of the headings can be modified by using a
13111  number of options (in LyX to be entered in the field 
13112 \family sans
13113 Extra
13114 \begin_inset space ~
13115 \end_inset
13116
13117 Options
13118 \family default
13119  of the dialog 
13120 \family sans
13121 Layout\SpecialChar \menuseparator
13122 Document
13123 \family default
13124 ).
13125  
13126 \end_layout
13127
13128 \begin_layout Itemize
13129 The main means in the Koma-Script document classes to design the type area
13130  are the options 
13131 \family sans
13132 BCOR
13133 \family default
13134  and 
13135 \family sans
13136 DIV
13137 \family default
13138  (in LyX to be entered in the extra class options field in the dialog 
13139 \family sans
13140 Document\SpecialChar \menuseparator
13141 Settings
13142 \family default
13143 ).
13144  They make a clearer modification of page margins possible as do the options
13145  of the dialog 
13146 \family sans
13147 Document\SpecialChar \menuseparator
13148 Settings
13149 \family default
13150 .
13151  
13152 \end_layout
13153
13154 \begin_layout Itemize
13155 The LaTeX document classes of the Koma-Script family define a number of
13156  additional commands.
13157  Those part of it which makes sense in LyX is implemented in corresponding
13158  paragraph types.
13159 \end_layout
13160
13161 \begin_layout Standard
13162 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13163  can be found in the Koma-Script documentation 
13164 \emph on
13165 scrguide
13166 \emph default
13167  (German) and 
13168 \emph on
13169 scrguien
13170 \emph default
13171  (English).
13172 \end_layout
13173
13174 \begin_layout Subsection
13175 article (koma-script), report (koma-script), and book (koma-script)
13176 \end_layout
13177
13178 \begin_layout Standard
13179 The document classes 
13180 \emph on
13181 article (koma-script)
13182 \emph default
13183
13184 \emph on
13185 report (koma-script)
13186 \emph default
13187 , and 
13188 \emph on
13189 book
13190 \emph default
13191  
13192 \emph on
13193 (koma-script)
13194 \emph default
13195  are implemented in the layout files 
13196 \family typewriter
13197 scrartcl.layout
13198 \family default
13199
13200 \family typewriter
13201 scrreprt.layout
13202 \family default
13203 , and 
13204 \family typewriter
13205 scrbook.layout
13206 \family default
13207 , resp.
13208  They contain all the paragraph types of the corresponding standard document
13209  classes 
13210 \emph on
13211 article
13212 \emph default
13213
13214 \emph on
13215 report
13216 \emph default
13217 , and 
13218 \emph on
13219 book
13220 \emph default
13221 , resp., partly modified, with the exception of the LyX specific 
13222 \family sans
13223 List
13224 \family default
13225 -type, which is replaced by the new 
13226 \family sans
13227 Labeling
13228 \family default
13229 -type having the same functionality.
13230  Beside the 
13231 \family sans
13232 Labeling
13233 \family default
13234 -Type there is a number of new paragraph types added.
13235  They are 
13236 \emph on
13237 not
13238 \emph default
13239  part of 
13240 \emph on
13241 letter (koma-script)
13242 \emph default
13243 .
13244 \end_layout
13245
13246 \begin_layout Itemize
13247
13248 \family sans
13249 Addpart, Addchap
13250 \family default
13251
13252 \family sans
13253 Addsec
13254 \family default
13255 : are equivalents to 
13256 \family sans
13257 Part*, Chapter*
13258 \family default
13259  and 
13260 \family sans
13261 Section*
13262 \family default
13263 , resp., additionally inserting an entry in the table of contents.
13264  
13265 \family sans
13266 Addpart
13267 \family default
13268  and 
13269 \family sans
13270 Addchap
13271 \family default
13272  are not contained in 
13273 \emph on
13274 article (koma-script)
13275 \emph default
13276 .
13277 \end_layout
13278
13279 \begin_layout Itemize
13280
13281 \family sans
13282 Addchap*
13283 \family default
13284
13285 \family sans
13286 Addsec*
13287 \family default
13288 : behave exactly as 
13289 \family sans
13290 Addchap
13291 \family default
13292  and 
13293 \family sans
13294 Addsec
13295 \family default
13296 , resp., additionally clearing running heads.
13297  
13298 \family sans
13299 Addchap*
13300 \family default
13301  is not contained in 
13302 \emph on
13303 article (koma-script)
13304 \emph default
13305 .
13306 \begin_inset Foot
13307 status collapsed
13308
13309 \begin_layout Plain Layout
13310 There is also an 
13311 \family typewriter
13312
13313 \backslash
13314 addpart*
13315 \family default
13316  command in 
13317 \emph on
13318 book (koma-script)
13319 \emph default
13320  and in 
13321 \emph on
13322 report (koma-script)
13323 \emph default
13324 , but since this is identical to 
13325 \family sans
13326 Part*
13327 \family default
13328 , is has not been implemented in LyX.
13329 \end_layout
13330
13331 \end_inset
13332
13333
13334 \end_layout
13335
13336 \begin_layout Itemize
13337
13338 \family sans
13339 Minisec
13340 \family default
13341 : generates a heading directly above the following paragraph in the standard
13342  character size without affecting the structure of the document.
13343 \end_layout
13344
13345 \begin_layout Itemize
13346
13347 \family sans
13348 Captionabove
13349 \family default
13350  and 
13351 \family sans
13352 Captionbelow
13353 \family default
13354  are special captions which respect the different space settings needed
13355  for captions placed above or below an element (if you follow strict typographic
13356  rules, you might want to place table captions always above the table).
13357  You can also use the class option 
13358 \family typewriter
13359 tablecaptionsabove
13360 \family default
13361 , which will switch 
13362 \family sans
13363 caption
13364 \family default
13365  to 
13366 \family sans
13367 captionabove
13368 \family default
13369  for tables and 
13370 \family sans
13371 captionbelow
13372 \family default
13373  for figures.
13374  You need at least Koma-Script version 2.8q to use this.
13375 \end_layout
13376
13377 \begin_layout Itemize
13378
13379 \family sans
13380 Dictum
13381 \family default
13382 : can be used to set a bonmot, e.
13383 \begin_inset space \thinspace{}
13384 \end_inset
13385
13386 g.
13387 \begin_inset space \space{}
13388 \end_inset
13389
13390 at the beginning of a chapter.
13391  If you use the optional argument (
13392 \family sans
13393 Insert\SpecialChar \menuseparator
13394 Short
13395 \begin_inset space ~
13396 \end_inset
13397
13398 Title
13399 \family default
13400 ), you can insert the dictum's author there.
13401  Dictum and author are separated by a line.
13402  You need at least Koma-Script version 2.8q to use this.
13403  
13404 \family sans
13405 Dictum
13406 \family default
13407  is not contained in 
13408 \emph on
13409 article (koma-script)
13410 \emph default
13411 .
13412 \end_layout
13413
13414 \begin_layout Standard
13415 The following types, together with the standard types 
13416 \family sans
13417 Title
13418 \family default
13419
13420 \family sans
13421 Author
13422 \family default
13423 , and 
13424 \family sans
13425 Date
13426 \family default
13427 , form the title area of the document.
13428  They must be entered ahead of the first 
13429 \begin_inset Quotes eld
13430 \end_inset
13431
13432 ordinary
13433 \begin_inset Quotes erd
13434 \end_inset
13435
13436  paragraph.
13437 \begin_inset Foot
13438 status collapsed
13439
13440 \begin_layout Plain Layout
13441 The corresponding LaTeX commands must appear before the 
13442 \family typewriter
13443
13444 \backslash
13445 maketitle
13446 \family default
13447  command.
13448 \end_layout
13449
13450 \end_inset
13451
13452  When such a type is used more than once, the latter usage overwrites the
13453  former one, that means, for every type only the latest usage is valid.
13454  The order of the different types however has, like 
13455 \family sans
13456 Title
13457 \family default
13458
13459 \family sans
13460 Author
13461 \family default
13462 , and 
13463 \family sans
13464 Date
13465 \family default
13466 , no effect on the appearance of the produced document.
13467 \end_layout
13468
13469 \begin_layout Itemize
13470
13471 \family sans
13472 Subject
13473 \family default
13474 : produces a centered paragraph above the ordinary title (
13475 \family sans
13476 Title
13477 \family default
13478
13479 \family sans
13480 Author
13481 \family default
13482
13483 \family sans
13484 Date
13485 \family default
13486 ) for the subject of the document.
13487 \end_layout
13488
13489 \begin_layout Itemize
13490
13491 \family sans
13492 Publishers
13493 \family default
13494 : produces a centered paragraph below the ordinary title (
13495 \family sans
13496 Title
13497 \family default
13498
13499 \family sans
13500 Author
13501 \family default
13502
13503 \family sans
13504 Date
13505 \family default
13506 ) for the publishers' name.
13507 \end_layout
13508
13509 \begin_layout Itemize
13510
13511 \family sans
13512 Dedication
13513 \family default
13514 : in 
13515 \emph on
13516 report (koma-script)
13517 \emph default
13518  and 
13519 \emph on
13520 book (koma-script)
13521 \emph default
13522  produces a centered paragraph on its own page behind the title page, or
13523  in 
13524 \emph on
13525 article (koma-script)
13526 \emph default
13527  produces a centered paragraph below 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 Publishers
13542 \family default
13543 ) for a dedication.
13544 \end_layout
13545
13546 \begin_layout Itemize
13547
13548 \family sans
13549 Titlehead
13550 \family default
13551 : produces a left aligned paragraph above the ordinary title (
13552 \family sans
13553 Title
13554 \family default
13555
13556 \family sans
13557 Author
13558 \family default
13559
13560 \family sans
13561 Date
13562 \family default
13563
13564 \family sans
13565 Subject
13566 \family default
13567 ) for a document`s head.
13568 \end_layout
13569
13570 \begin_layout Itemize
13571
13572 \family sans
13573 Uppertitleback
13574 \family default
13575 : produces in a double-sided print in 
13576 \emph on
13577 report (koma-script)
13578 \emph default
13579  and 
13580 \emph on
13581 book (koma-script)
13582 \emph default
13583  a left-aligned paragraph at the top of the title page`s back or has no
13584  effect in a single-sided print or in 
13585 \emph on
13586 article (koma-script)
13587 \emph default
13588 .
13589 \end_layout
13590
13591 \begin_layout Itemize
13592
13593 \family sans
13594 Lowertitleback
13595 \family default
13596 : produces in a double-sided print in 
13597 \emph on
13598 report (koma-script)
13599 \emph default
13600  and 
13601 \emph on
13602 book (koma-script)
13603 \emph default
13604  a left-aligned paragraph at the bottom of the title page`s back or has
13605  no effect in a single-sided print or in 
13606 \emph on
13607 article (koma-script)
13608 \emph default
13609 .
13610 \end_layout
13611
13612 \begin_layout Itemize
13613
13614 \family sans
13615 Extratitle
13616 \family default
13617 : produces a special 
13618 \begin_inset Quotes eld
13619 \end_inset
13620
13621 dirty
13622 \begin_inset Quotes erd
13623 \end_inset
13624
13625  page ahead of the actual document containing a paragraph without special
13626  formatting.
13627 \end_layout
13628
13629 \begin_layout Standard
13630 The layout files for the document classes 
13631 \emph on
13632 article (koma-script)
13633 \emph default
13634
13635 \emph on
13636 report (koma-script)
13637 \emph default
13638 , and 
13639 \emph on
13640 book (koma-script)
13641 \emph default
13642  do include the file 
13643 \family typewriter
13644 scrmacros.inc
13645 \family default
13646 .
13647  This is thought of as a place to define your own types.
13648  Copy scrmacros
13649 \family typewriter
13650 .inc
13651 \family default
13652  in your personal layout directory and edit the file!
13653 \end_layout
13654
13655 \begin_layout Subsection
13656 letter (koma-script)
13657 \end_layout
13658
13659 \begin_layout Standard
13660 \noindent
13661 The document class 
13662 \emph on
13663 letter (koma-script)
13664 \emph default
13665  is implemented in the layout file 
13666 \family typewriter
13667 scrlettr.layout
13668 \family default
13669 .
13670  It contains all the paragraph types of the corresponding standard document
13671  class 
13672 \emph on
13673 letter
13674 \emph default
13675 , partly modified, with the exception of the LyX specific types 
13676 \family sans
13677 LyX-Code
13678 \family default
13679  and 
13680 \family sans
13681 Comment
13682 \family default
13683  and the 
13684 \family sans
13685 List
13686 \family default
13687  type, which is replaced by the new 
13688 \family sans
13689 Labeling
13690 \family default
13691  type.
13692  In addition, it contains, in contrast to the standard document class, the
13693  standard types 
13694 \family sans
13695 LaTeX
13696 \family default
13697
13698 \family sans
13699 Quotation
13700 \family default
13701
13702 \family sans
13703 Quote
13704 \family default
13705 , and 
13706 \family sans
13707 Verse
13708 \family default
13709 .
13710  Furthermore, there are a number of new letter specific types.
13711 \end_layout
13712
13713 \begin_layout Standard
13714 The appearance of the letter produced by this document class can be controlled
13715  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13716 \begin_inset Foot
13717 status collapsed
13718
13719 \begin_layout Plain Layout
13720 For example, the standard appearance of the letter`s heading, consisting
13721  of name and address, is quite self-willed.
13722  An 
13723 \begin_inset Quotes eld
13724 \end_inset
13725
13726 ordinary
13727 \begin_inset Quotes erd
13728 \end_inset
13729
13730  heading is produced by the following LaTeX commands in the preamble:
13731 \end_layout
13732
13733 \begin_layout LyX-Code
13734
13735 \backslash
13736 firsthead{
13737 \backslash
13738 parbox[b]{
13739 \backslash
13740 textwidth}
13741 \end_layout
13742
13743 \begin_layout LyX-Code
13744   {
13745 \backslash
13746 ignorespaces 
13747 \backslash
13748 fromname
13749 \backslash
13750
13751 \backslash
13752  
13753 \backslash
13754 ignorespaces 
13755 \backslash
13756 fromaddress}} 
13757 \end_layout
13758
13759 \begin_layout LyX-Code
13760
13761 \backslash
13762 nexthead{
13763 \backslash
13764 parbox[b]{
13765 \backslash
13766 textwidth}
13767 \end_layout
13768
13769 \begin_layout LyX-Code
13770   {
13771 \backslash
13772 ignorespaces 
13773 \backslash
13774 fromname 
13775 \backslash
13776 hfill 
13777 \backslash
13778 ignorespaces 
13779 \backslash
13780 pagename
13781 \backslash
13782  
13783 \backslash
13784 thepage}}
13785 \end_layout
13786
13787 \end_inset
13788
13789  A detailed German description of such LaTeX commands can be found in the
13790  Koma-Script documentation 
13791 \emph on
13792 scrguide
13793 \emph default
13794 .
13795  With it, the letter's author can produce his personal letter layout.
13796 \end_layout
13797
13798 \begin_layout Standard
13799 The types 
13800 \family sans
13801 Letter
13802 \family default
13803  and 
13804 \family sans
13805 Opening
13806 \family default
13807  define the beginning of the letter and must be used in every letter.
13808  To emphasize them in the LyX document class, they are marked with the letter
13809  
13810 \shape italic
13811 L
13812 \shape default
13813  or 
13814 \shape italic
13815 O
13816 \shape default
13817 , resp.
13818 \begin_inset space ~
13819 \end_inset
13820
13821 in the left margin.
13822  It is possible to write any number of letters in one file.
13823  An 
13824 \family sans
13825 Opening
13826 \family default
13827  type produces a new letter using the same addressee and a 
13828 \family sans
13829 Letter
13830 \family default
13831  type produces a new addressee.
13832  The types 
13833 \family sans
13834 Closing
13835 \family default
13836
13837 \family sans
13838 PS
13839 \family default
13840
13841 \family sans
13842 CC
13843 \family default
13844 , and 
13845 \family sans
13846 Encl
13847 \family default
13848  are ordinary paragraph types and can also be used several times in one
13849  and the same letter.
13850 \end_layout
13851
13852 \begin_layout Itemize
13853
13854 \family sans
13855 Letter
13856 \family default
13857 : produces a paragraph for the addressee and implicitly defines the beginning
13858  of the letter.
13859 \end_layout
13860
13861 \begin_layout Itemize
13862
13863 \family sans
13864 Opening
13865 \family default
13866 : produces a paragraph for the form of address and implicitly produces a
13867  new letter.
13868 \end_layout
13869
13870 \begin_layout Itemize
13871
13872 \family sans
13873 Closing
13874 \family default
13875 : produces a paragraph for a close.
13876 \end_layout
13877
13878 \begin_layout Itemize
13879
13880 \family sans
13881 PS
13882 \family default
13883 : produces a paragraph for a postscript.
13884 \end_layout
13885
13886 \begin_layout Itemize
13887
13888 \family sans
13889 CC
13890 \family default
13891 : produces a paragraph for a distribution list.
13892 \end_layout
13893
13894 \begin_layout Itemize
13895
13896 \family sans
13897 Encl
13898 \family default
13899 : produces a paragraph for enclosures.
13900 \end_layout
13901
13902 \begin_layout Standard
13903 The types 
13904 \family sans
13905 Name
13906 \family default
13907
13908 \family sans
13909 Signature
13910 \family default
13911
13912 \family sans
13913 Address
13914 \family default
13915
13916 \family sans
13917 Telephone
13918 \family default
13919
13920 \family sans
13921 Place
13922 \family default
13923
13924 \family sans
13925 Backaddress
13926 \family default
13927
13928 \family sans
13929 Specialmail
13930 \family default
13931
13932 \family sans
13933 Location
13934 \family default
13935
13936 \family sans
13937 Title
13938 \family default
13939 , and 
13940 \family sans
13941 Subject
13942 \family default
13943  are input types provided with a label to enter information, which will
13944  be processed by the document class.
13945 \begin_inset Foot
13946 status open
13947
13948 \begin_layout Plain Layout
13949 It could be seen as a matter of inconsequence, that the types 
13950 \family sans
13951 Letter
13952 \family default
13953  and 
13954 \family sans
13955 Opening
13956 \family default
13957  described above are not such input types as well.
13958  Because of the special meaning of those types, however, I have implemented
13959  them as ordinary paragraph types with a one letter mark in the left margin.
13960  Moreover, it would affect my feeling of symmetry, if the 
13961 \family sans
13962 Opening
13963 \family default
13964  type and the 
13965 \family sans
13966 Closing
13967 \family default
13968  type had such a serious different appearance.
13969 \end_layout
13970
13971 \end_inset
13972
13973  The types must be used ahead of the corresponding 
13974 \family sans
13975 Opening
13976 \family default
13977  type.
13978 \end_layout
13979
13980 \begin_layout Standard
13981 An implementation of these types in a WYSIWYG fashion does not seem to make
13982  sense, because the real appearance of the produced letter does not only
13983  depend on the usage of the particular type, but also on other factors.
13984  For example, a signature entered in the 
13985 \family sans
13986 Signature
13987 \family default
13988  type will in the standard behavior appear in the produced letter only,
13989  when in the same letter also a 
13990 \family sans
13991 Closing
13992 \family default
13993  type is used.
13994  The entered value of the 
13995 \family sans
13996 Telephone
13997 \family default
13998  type will in the standard behavior not appear in the produced letter at
13999  all.
14000  The possibility to design the letter`s heading freely is already indicated
14001  in a footnote above.
14002 \end_layout
14003
14004 \begin_layout Standard
14005 The input types can also be used as empty paragraphs.
14006  This makes sense e.
14007 \begin_inset space \thinspace{}
14008 \end_inset
14009
14010 g.
14011 \begin_inset space \space{}
14012 \end_inset
14013
14014 for the 
14015 \family sans
14016 Signature
14017 \family default
14018  type.
14019  If the 
14020 \family sans
14021 Signature
14022 \family default
14023  type is not used at all, in the standard behavior the value of the 
14024 \family sans
14025 Name
14026 \family default
14027  type is used as signature, whereas if an empty 
14028 \family sans
14029 Signature
14030 \family default
14031  type is used, no signature value is defined.
14032 \end_layout
14033
14034 \begin_layout Standard
14035 By using the input types it is possible to write a letter template, containing
14036  filled input types with your personal dates (name, address, etc.) and empty
14037  input types for other dates you want to enter.
14038 \end_layout
14039
14040 \begin_layout Itemize
14041
14042 \family sans
14043 Name
14044 \family default
14045 : sender's name, in the standard behavior appears as a centered paragraph
14046  in small caps in the letter`s heading.
14047 \end_layout
14048
14049 \begin_layout Itemize
14050
14051 \family sans
14052 Signature
14053 \family default
14054 : sender's signature, in the standard behavior appears below the 
14055 \family sans
14056 Closing
14057 \family default
14058  type.
14059  If no 
14060 \family sans
14061 Signature
14062 \family default
14063  type is used, the value of the 
14064 \family sans
14065 Name
14066 \family default
14067  type appears instead.
14068 \end_layout
14069
14070 \begin_layout Itemize
14071
14072 \family sans
14073 Address
14074 \family default
14075 : sender's address, in the standard behavior appears in a centered paragraph
14076  in the letter`s heading below the sender's name.
14077 \end_layout
14078
14079 \begin_layout Itemize
14080
14081 \family sans
14082 Telephone
14083 \family default
14084 : sender's telephone number, in the standard behavior only sets the LaTeX
14085  variable 
14086 \family typewriter
14087
14088 \backslash
14089 telephonenum
14090 \family default
14091 .
14092 \end_layout
14093
14094 \begin_layout Itemize
14095
14096 \family sans
14097 Place
14098 \family default
14099 : place of the letter`s making.
14100 \end_layout
14101
14102 \begin_layout Itemize
14103
14104 \family sans
14105 Date
14106 \family default
14107 : date of the letter`s making.
14108  
14109 \family sans
14110 Place
14111 \family default
14112  and 
14113 \family sans
14114 Date
14115 \family default
14116 , in the standard behavior, produce the place and the date in a right-aligned
14117  line below the addressee's field.
14118  If an empty 
14119 \family sans
14120 Date
14121 \family default
14122  type is used, neither place nor date appear, independent of the value of
14123  the 
14124 \family sans
14125 Place
14126 \family default
14127  type.
14128  If no 
14129 \family sans
14130 Date
14131 \family default
14132  type is used, the date of the letter `s production is used.
14133 \end_layout
14134
14135 \begin_layout Itemize
14136
14137 \family sans
14138 Backaddress
14139 \family default
14140 : sender`s back address, in the standard behavior appears above the addressee's
14141  field in a small sans serif font.
14142 \end_layout
14143
14144 \begin_layout Itemize
14145
14146 \family sans
14147 Specialmail
14148 \family default
14149 : special mail information, in the standard behavior appears underlined
14150  above the addressee's field below the back address.
14151 \end_layout
14152
14153 \begin_layout Itemize
14154
14155 \family sans
14156 Location
14157 \family default
14158 : additional information, in the standard behavior appears on right side
14159  below the addressee`s field.
14160 \end_layout
14161
14162 \begin_layout Itemize
14163
14164 \family sans
14165 Title
14166 \family default
14167 : the letter's title, in the standard behavior appears in a big, bold, sans
14168  serif font above the subject.
14169 \end_layout
14170
14171 \begin_layout Itemize
14172
14173 \family sans
14174 Subject
14175 \family default
14176 : the letter's subject, in the standard behavior appears in a bold font
14177  above the 
14178 \family sans
14179 Opening
14180 \family default
14181  paragraph.
14182 \end_layout
14183
14184 \begin_layout Standard
14185 The types 
14186 \family sans
14187 Yourref
14188 \family default
14189
14190 \family sans
14191 Yourmail
14192 \family default
14193
14194 \family sans
14195 Myref
14196 \family default
14197
14198 \family sans
14199 Customer
14200 \family default
14201 , and 
14202 \family sans
14203 Invoice
14204 \family default
14205  produce a business letter like line above the 
14206 \family sans
14207 Title
14208 \family default
14209  line containing the fields 
14210 \begin_inset Quotes eld
14211 \end_inset
14212
14213 Your ref.
14214 \begin_inset Quotes erd
14215 \end_inset
14216
14217
14218 \begin_inset Quotes eld
14219 \end_inset
14220
14221 Your letter of
14222 \begin_inset Quotes erd
14223 \end_inset
14224
14225
14226 \begin_inset Quotes eld
14227 \end_inset
14228
14229 Our ref.
14230 \begin_inset Quotes erd
14231 \end_inset
14232
14233
14234 \begin_inset Quotes eld
14235 \end_inset
14236
14237 Customer no.
14238 \begin_inset Quotes erd
14239 \end_inset
14240
14241
14242 \begin_inset Quotes eld
14243 \end_inset
14244
14245 Invoice no.
14246 \begin_inset Quotes erd
14247 \end_inset
14248
14249 , and 
14250 \begin_inset Quotes eld
14251 \end_inset
14252
14253 Date
14254 \begin_inset Quotes erd
14255 \end_inset
14256
14257 .
14258  For the date field, the value of the 
14259 \family sans
14260 Date
14261 \family default
14262  type is used.
14263  If one of these 
14264 \begin_inset Quotes eld
14265 \end_inset
14266
14267 business letter types
14268 \begin_inset Quotes erd
14269 \end_inset
14270
14271  is used, the value of the 
14272 \family sans
14273 Place
14274 \family default
14275  type however does not appear, but only the LaTeX variable 
14276 \family typewriter
14277
14278 \backslash
14279 fromplace
14280 \family default
14281  is set.
14282  The ordinary output of place and date in a right-aligned line below the
14283  addressee`s field is suppressed.
14284  The types are implemented as input types provided with a label and must
14285  be used ahead of the corresponding 
14286 \family sans
14287 Opening
14288 \family default
14289  type.
14290 \end_layout
14291
14292 \begin_layout Itemize
14293
14294 \family sans
14295 Yourref
14296 \family default
14297 : Your ref.
14298 \end_layout
14299
14300 \begin_layout Itemize
14301
14302 \family sans
14303 Yourmail
14304 \family default
14305 : Your letter of.
14306 \end_layout
14307
14308 \begin_layout Itemize
14309
14310 \family sans
14311 Myref
14312 \family default
14313 : Our ref.
14314 \end_layout
14315
14316 \begin_layout Itemize
14317
14318 \family sans
14319 Customer
14320 \family default
14321 : Customer no.
14322 \end_layout
14323
14324 \begin_layout Itemize
14325
14326 \family sans
14327 Invoice
14328 \family default
14329 : Invoice no.
14330 \end_layout
14331
14332 \begin_layout Subsection
14333 The new letter class: letter (koma-script v.2)
14334 \end_layout
14335
14336 \begin_layout Standard
14337 by 
14338 \noun on
14339 Jürgen Spitzmüller
14340 \end_layout
14341
14342 \begin_layout Standard
14343 \begin_inset VSpace medskip
14344 \end_inset
14345
14346
14347 \end_layout
14348
14349 \begin_layout Standard
14350 \noindent
14351 Koma-Script version 2.8 has introduced a new letter class 
14352 \family typewriter
14353 scrlttr2
14354 \family default
14355  which supersedes the now unsupported 
14356 \family typewriter
14357 scrlettr
14358 \family default
14359 .
14360  It has — on the LaTeX side — a completely new interface and is not compatible
14361  with the old class.
14362  Therefore, LyX supports both, though it is recommended you use the new
14363  class.
14364 \end_layout
14365
14366 \begin_layout Standard
14367 This class covers the same functionality as 
14368 \emph on
14369 letter (koma-script),
14370 \emph default
14371  and a few more.
14372  The basic items are 
14373 \family sans
14374 Address
14375 \family default
14376  (receiver's address, same as 
14377 \family sans
14378 Letter
14379 \family default
14380  in the old layout), 
14381 \family sans
14382 Opening
14383 \family default
14384 , and 
14385 \family sans
14386 Closing
14387 \family default
14388 .
14389  
14390 \family sans
14391 NextAddress
14392 \family default
14393  will start a new letter (i.
14394 \begin_inset space \thinspace{}
14395 \end_inset
14396
14397 e.
14398 \begin_inset space \space{}
14399 \end_inset
14400
14401 you can write several letters per document).
14402  New elements are sender's 
14403 \family sans
14404 E-Mail
14405 \family default
14406
14407 \family sans
14408 URL
14409 \family default
14410
14411 \family sans
14412 Fax
14413 \family default
14414
14415 \family sans
14416 Bank
14417 \family default
14418  and the possibility to use a 
14419 \family sans
14420 Logo
14421 \family default
14422  (via 
14423 \family sans
14424 Insert\SpecialChar \menuseparator
14425 Graphics
14426 \family default
14427 ) in the header.
14428 \end_layout
14429
14430 \begin_layout Standard
14431 The biggest improvement is, though, that the letter's layout is configurable
14432  to meet almost any needs.
14433  This can be done via the preamble or with a special style file (Letter
14434  Class Option, extension 
14435 \family typewriter
14436 *.lco
14437 \family default
14438 ), that will be read in as a class option.
14439 \begin_inset Foot
14440 status collapsed
14441
14442 \begin_layout Plain Layout
14443 The KOMA package comes with some default 
14444 \family typewriter
14445 *.lco
14446 \family default
14447  files.
14448  There is, for instance, a 
14449 \family typewriter
14450 DIN.lco
14451 \family default
14452  file that follows german typesetting rules, or a 
14453 \family typewriter
14454 KOMAold.lco
14455 \family default
14456  that provides the default layout of the old 
14457 \family typewriter
14458 scrlettr
14459 \family default
14460  class.
14461  The latter can be loaded with the class option 
14462 \family typewriter
14463 KOMAold
14464 \family default
14465 , inserted via the 
14466 \family sans
14467 \bar under
14468 L
14469 \bar default
14470 ayout\SpecialChar \menuseparator
14471
14472 \bar under
14473 D
14474 \bar default
14475 ocument\SpecialChar \menuseparator
14476 Extra Options
14477 \family default
14478  field.
14479 \end_layout
14480
14481 \end_inset
14482
14483  Have a look at the 
14484 \emph on
14485 koma-letter2
14486 \emph default
14487  template that is included in LyX for examples.
14488  A detailed description is to be found in the Koma-Script documentation
14489  (
14490 \emph on
14491 scrguide
14492 \emph default
14493 ).
14494 \end_layout
14495
14496 \begin_layout Subsection
14497 Problems
14498 \end_layout
14499
14500 \begin_layout Standard
14501 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14502  some problems.
14503 \end_layout
14504
14505 \begin_layout Itemize
14506 The chapter number of a 
14507 \family sans
14508 Chapter
14509 \family default
14510  type appears on a line of its own above the chapter heading instead of
14511  appearing in the same line ahead of it.
14512  The cause for that is the LyX internal behavior for the labeltype 
14513 \family sans
14514 Counter_Chapter
14515 \family default
14516  in the layout file.
14517 \end_layout
14518
14519 \begin_layout Itemize
14520 The headings of the types 
14521 \family sans
14522 Addchap
14523 \family default
14524  and 
14525 \family sans
14526 Addsec
14527 \family default
14528  are only put in the 
14529 \begin_inset Quotes eld
14530 \end_inset
14531
14532 true
14533 \begin_inset Quotes erd
14534 \end_inset
14535
14536  LaTeX table of contents, but not in the LyX table of contents (
14537 \family sans
14538 Document\SpecialChar \menuseparator
14539 Table
14540 \begin_inset space ~
14541 \end_inset
14542
14543 of
14544 \begin_inset space ~
14545 \end_inset
14546
14547 Contents
14548 \family default
14549 ).
14550 \end_layout
14551
14552 \begin_layout Itemize
14553 The paragraphs in a 
14554 \emph on
14555 letter
14556 \emph default
14557  document class appear in a skip separation mode, not indented.
14558  This is the standard behavior, no special LaTeX commands are needed for
14559  that.
14560  But in the 
14561 \family sans
14562 Document\SpecialChar \menuseparator
14563 Settings
14564 \family default
14565  dialog the corresponding radio button indicates 
14566 \family sans
14567 Indent
14568 \family default
14569 .
14570  A 
14571 \family sans
14572 Skip
14573 \family default
14574  value always has the effect that extra LaTeX commands are inserted in the
14575  document to produce the gap, which is not what is wanted in this case.
14576 \end_layout
14577
14578 \begin_layout Section
14579 Memoir
14580 \end_layout
14581
14582 \begin_layout Standard
14583 By 
14584 \noun on
14585 Jürgen Spitzmüller
14586 \end_layout
14587
14588 \begin_layout Subsection
14589 Overview
14590 \end_layout
14591
14592 \begin_layout Standard
14593 Memoir is a very powerful and constantly evolving class.
14594  It has been designed with regard to fictional and non-fictional literature.
14595  Its aim is to let the user have maximum control over the typesetting of
14596  his document.
14597  Memoir is based on the standard book class, but it can also emulate the
14598  article class (see below).
14599 \end_layout
14600
14601 \begin_layout Standard
14602 Peter Wilson, the developer of Memoir, is known as the author of lots of
14603  useful packages in the LaTeX world.
14604  Most of them have been merged with Memoir.
14605  Therefore, it is much easier to layout the table of contents, appendices,
14606  chapter designs and such.
14607  LyX, though, does not support all of these goodies natively.
14608  Some of them might be added to forthcoming releases
14609 \begin_inset Foot
14610 status collapsed
14611
14612 \begin_layout Plain Layout
14613 You are invited to send suggestions to 
14614 \begin_inset Flex URL
14615 status collapsed
14616
14617 \begin_layout Plain Layout
14618
14619 lyx-devel@lists.lyx.org
14620 \end_layout
14621
14622 \end_inset
14623
14624 .
14625 \end_layout
14626
14627 \end_inset
14628
14629 , lots will probably never be supported, due to the limitations of LyX's
14630  framework.
14631  Of course you can still use all features with the help of some native LaTeX
14632  commands (TeX code
14633 \begin_inset Foot
14634 status collapsed
14635
14636 \begin_layout Plain Layout
14637 Cf.
14638 \begin_inset ERT
14639 status collapsed
14640
14641 \begin_layout Plain Layout
14642
14643
14644 \backslash
14645  
14646 \end_layout
14647
14648 \end_inset
14649
14650 section
14651 \begin_inset space ~
14652 \end_inset
14653
14654
14655 \begin_inset CommandInset ref
14656 LatexCommand ref
14657 reference "sec:Inserting-TeX-Code"
14658
14659 \end_inset
14660
14661  for details.
14662 \end_layout
14663
14664 \end_inset
14665
14666 ).
14667  In this section, we can only list those features that are natively supported
14668  by LyX.
14669  For detailed descriptions (and for the rest of features) we recommend you
14670  have a look at the detailed manual of the Memoir class
14671 \begin_inset Foot
14672 status collapsed
14673
14674 \begin_layout Plain Layout
14675 Cf.
14676 \begin_inset ERT
14677 status collapsed
14678
14679 \begin_layout Plain Layout
14680
14681
14682 \backslash
14683  
14684 \end_layout
14685
14686 \end_inset
14687
14688
14689 \begin_inset Flex URL
14690 status collapsed
14691
14692 \begin_layout Plain Layout
14693
14694 CTAN:/macros/latex/memoir/memman.pdf
14695 \end_layout
14696
14697 \end_inset
14698
14699 .
14700 \end_layout
14701
14702 \end_inset
14703
14704 , which is not only a user guide for the class, but also both a comprehensive
14705  description on good typesetting and a superb example for good typesetting
14706  itself.
14707 \end_layout
14708
14709 \begin_layout Subsection
14710 Basic features and restrictions
14711 \end_layout
14712
14713 \begin_layout Standard
14714 Memoir supports basically all features of the standard book classes.
14715  There are, however, some differences, as follows:
14716 \end_layout
14717
14718 \begin_layout Description
14719 Font
14720 \begin_inset space ~
14721 \end_inset
14722
14723 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14724 \end_layout
14725
14726 \begin_layout Description
14727 Page
14728 \begin_inset space ~
14729 \end_inset
14730
14731 style: The fancy page style is not supported, due to a command clash between
14732  Memoir and the fancyhdr package (they both define a command with the same
14733  name, which confuses LaTeX).
14734  Instead, Memoir comes with a number of its own page styles (see 
14735 \family sans
14736 Layout\SpecialChar \menuseparator
14737 Document\SpecialChar \menuseparator
14738 Page
14739 \begin_inset space ~
14740 \end_inset
14741
14742 Style
14743 \family default
14744 ).
14745  If you want to use these for the chapter pages, you have to use the command
14746  
14747 \family typewriter
14748
14749 \backslash
14750 chapterstyle
14751 \family default
14752  in the main text or in preamble (e.
14753 \begin_inset space \thinspace{}
14754 \end_inset
14755
14756 g.
14757 \begin_inset space \space{}
14758 \end_inset
14759
14760
14761 \family typewriter
14762
14763 \backslash
14764 chapterstyle{companion}
14765 \family default
14766 ).
14767 \end_layout
14768
14769 \begin_layout Description
14770 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14771  optional argument in the standard classes.
14772  With this, you can specify an alternative version of the title for the
14773  table of contents and the headers (for instance, if the title is too long).
14774  In LyX, you can do this via 
14775 \family sans
14776 Insert\SpecialChar \menuseparator
14777 Short
14778 \begin_inset space ~
14779 \end_inset
14780
14781 Title
14782 \family default
14783  at the beginning of a chapter/section.
14784  Memoir features a second optional argument and thus separates the table
14785  of contents from the header.
14786  You can define three variants of a title with this: one for the main text,
14787  one for the table of contents, and one for the headers.
14788  Simply insert two optional arguments if you need this feature, the first
14789  one containing the short title for the Table of Contents, the second one
14790  containing an alternative short title for the headers.
14791 \end_layout
14792
14793 \begin_layout Description
14794 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14795  of contents, the list of figures and the list of table start a new page
14796  automatically.
14797  Memoir does not follow this route.
14798  You have to insert a page break yourself, if you want to have one.
14799 \end_layout
14800
14801 \begin_layout Description
14802 Titlepage: For some unknown reason, Memoir uses pagination on the title
14803  page (in the standard classes, title pages are 
14804 \begin_inset Quotes eld
14805 \end_inset
14806
14807 empty
14808 \begin_inset Quotes erd
14809 \end_inset
14810
14811 ).
14812  If you want an empty title page, type 
14813 \family typewriter
14814
14815 \backslash
14816 aliaspagestyle{title}{empty}
14817 \family default
14818  in the preamble.
14819 \end_layout
14820
14821 \begin_layout Description
14822 Article: With the class option 
14823 \emph on
14824 article
14825 \emph default
14826  (to be inserted in 
14827 \family sans
14828 Layout\SpecialChar \menuseparator
14829 Document\SpecialChar \menuseparator
14830 Extra
14831 \begin_inset space ~
14832 \end_inset
14833
14834 Options
14835 \family default
14836 ), you can emulate article style.
14837  That is, counters (footnotes, figures, tables etc.) will not be reset on
14838  new chapters, chapters don't start a new page (but are—in contrary to 
14839 \begin_inset Quotes eld
14840 \end_inset
14841
14842 real
14843 \begin_inset Quotes erd
14844 \end_inset
14845
14846  article classes—still allowed), parts, though, use their own page, as in
14847  book.
14848 \end_layout
14849
14850 \begin_layout Description
14851 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14852  font commands, which have been used in the old LaTeX version 2.09 (e.
14853 \begin_inset space \thinspace{}
14854 \end_inset
14855
14856 g.
14857 \begin_inset space \space{}
14858 \end_inset
14859
14860
14861 \family typewriter
14862
14863 \backslash
14864 rm
14865 \family default
14866
14867 \family typewriter
14868
14869 \backslash
14870 it
14871 \family default
14872 ).
14873  It produces an error and stops LaTeX whenever such a command appears.
14874  The class option 
14875 \emph on
14876 oldfontcommands
14877 \emph default
14878  reallows the commands and spits out warnings instead (which does at least
14879  not stop LaTeX).
14880  Since a lot of packages and particularly BibTeX style files are still using
14881  those commands, we have decided to use this option by default.
14882 \end_layout
14883
14884 \begin_layout Subsection
14885 Extra features
14886 \end_layout
14887
14888 \begin_layout Standard
14889 We will only describe the features supported by LyX (which is not much currently
14890 ).
14891  Please consult the Memoir manual
14892 \begin_inset Foot
14893 status collapsed
14894
14895 \begin_layout Plain Layout
14896 Cf.
14897 \begin_inset ERT
14898 status collapsed
14899
14900 \begin_layout Plain Layout
14901
14902
14903 \backslash
14904  
14905 \end_layout
14906
14907 \end_inset
14908
14909
14910 \begin_inset Flex URL
14911 status collapsed
14912
14913 \begin_layout Plain Layout
14914
14915 CTAN:/macros/latex/memoir/memman.pdf
14916 \end_layout
14917
14918 \end_inset
14919
14920 .
14921 \end_layout
14922
14923 \end_inset
14924
14925  for details.
14926 \end_layout
14927
14928 \begin_layout Description
14929 Abstract: You may wonder why an abstract is an extra feature.
14930  Well, it is in book class.
14931  Usually books don't have abstracts.
14932  Memoir, however, has.
14933  You can use it wherever and how often you like.
14934 \end_layout
14935
14936 \begin_layout Description
14937 Chapterprecis: You may know this older typesetting style: The contents of
14938  a chapter are summarized below the title and also in the table of contents
14939  (e.
14940 \begin_inset space \thinspace{}
14941 \end_inset
14942
14943 g.
14944 \begin_inset space \space{}
14945 \end_inset
14946
14947
14948 \emph on
14949 Our hero arrives in Troia; he loses some friends; he finds others
14950 \emph default
14951 ).
14952  Chapterprecis does exactly this.
14953  It is therefore only sensible below a chapter.
14954 \end_layout
14955
14956 \begin_layout Description
14957 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14958  The epigraph environment provides an elegant way of typesetting such a
14959  motto.
14960  The motto itself (text) and its author (source) are divided by a short
14961  line.
14962  Unfortunately, we have to fool LyX a bit here again, since the environment
14963  needs two arguments (text and source).
14964  In this case, we have to use curly brackets (in TeX mode) between the two
14965  arguments: 
14966 \emph on
14967 <smart slogan>
14968 \emph default
14969  
14970 \family typewriter
14971 }{
14972 \family default
14973  
14974 \emph on
14975 <author of the slogan>.
14976 \end_layout
14977
14978 \begin_layout Description
14979 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14980  complex figurative poems).
14981  LyX can only support a few of them.
14982  One is poemtitle, which is a centered title for poems, which will also
14983  be added to the table of contents (verse is the standard environment for
14984  poems.
14985  Memoir has some enhanced versions of verse, but you need to use TeX code,
14986  because they have to be nested inside regular verse environments, which
14987  is not possible with LyX).
14988 \end_layout
14989
14990 \begin_layout Description
14991 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14992 \end_layout
14993
14994 \begin_layout Section
14995 Article (mwart), book (mwbk) and report (mwrep)
14996 \begin_inset Argument
14997 status collapsed
14998
14999 \begin_layout Plain Layout
15000 The 
15001 \family typewriter
15002 mw
15003 \family default
15004  Classes
15005 \end_layout
15006
15007 \end_inset
15008
15009
15010 \end_layout
15011
15012 \begin_layout Standard
15013 by 
15014 \noun on
15015 Tomasz Luczak
15016 \end_layout
15017
15018 \begin_layout Standard
15019 The LyX document classes 
15020 \emph on
15021 article (mwart)
15022 \emph default
15023
15024 \emph on
15025 report (mwrep)
15026 \emph default
15027  and 
15028 \emph on
15029 book
15030 \emph default
15031  
15032 \emph on
15033 (mwbk)
15034 \emph default
15035  correspond to the LaTeX document classes 
15036 \family typewriter
15037 mwart.cls
15038 \family default
15039
15040 \family typewriter
15041 mwrep.cls
15042 \family default
15043  and 
15044 \family typewriter
15045 mwbk.cls
15046 \family default
15047 , resp.
15048  They are replacements for the standard document classes 
15049 \family typewriter
15050 article.cls
15051 \family default
15052
15053 \family typewriter
15054 report.cls
15055 \family default
15056  and 
15057 \family typewriter
15058 book.cls
15059 \family default
15060 , resp., and fit better to Polish typography conventions in a number of points.
15061  
15062 \end_layout
15063
15064 \begin_layout Standard
15065 Basic differences:
15066 \end_layout
15067
15068 \begin_layout Itemize
15069 Unnumbered titles (with star, e.
15070 \begin_inset space \thinspace{}
15071 \end_inset
15072
15073 g.
15074 \begin_inset space \space{}
15075 \end_inset
15076
15077
15078 \family sans
15079 Section*
15080 \family default
15081 ) are added into table of contents,
15082 \end_layout
15083
15084 \begin_layout Itemize
15085 Additional page styles:
15086 \end_layout
15087
15088 \begin_deeper
15089 \begin_layout Description
15090 uheadings header with separated lines,
15091 \end_layout
15092
15093 \begin_layout Description
15094 myheadings custom header, contents headers via commands: 
15095 \family typewriter
15096
15097 \backslash
15098 markright
15099 \family default
15100  and 
15101 \family typewriter
15102
15103 \backslash
15104 markboth
15105 \family default
15106 ,
15107 \end_layout
15108
15109 \begin_layout Description
15110 myuheadings custom header with separated lines,
15111 \end_layout
15112
15113 \begin_layout Description
15114 outer page number is placed on outer side of page
15115 \end_layout
15116
15117 \end_deeper
15118 \begin_layout Itemize
15119 Options 
15120 \end_layout
15121
15122 \begin_deeper
15123 \begin_layout Description
15124 rmheadings serif titles — default,
15125 \end_layout
15126
15127 \begin_layout Description
15128 sfheadings sansserif titles,
15129 \end_layout
15130
15131 \begin_layout Description
15132 authortitle on title page first placed is author next title — default,
15133 \end_layout
15134
15135 \begin_layout Description
15136 titleauthor on title page first placed is title next author,
15137 \end_layout
15138
15139 \begin_layout Description
15140 withmarginpar reserve place on page for margins.
15141 \end_layout
15142
15143 \end_deeper
15144 \begin_layout Section
15145 Paper
15146 \end_layout
15147
15148 \begin_layout Standard
15149 The document class 
15150 \family sans
15151 paper
15152 \family default
15153  provides an alternative to the standard 
15154 \family sans
15155 article
15156 \family default
15157  class.
15158  It provides similar functionality, but you might prefer this layout with
15159  sans serif sections, headings, and more.
15160 \end_layout
15161
15162 \begin_layout Section
15163 RevTeX4
15164 \end_layout
15165
15166 \begin_layout Standard
15167 by 
15168 \noun on
15169 Amir Karger
15170 \end_layout
15171
15172 \begin_layout Standard
15173 \begin_inset VSpace bigskip
15174 \end_inset
15175
15176
15177 \end_layout
15178
15179 \begin_layout Standard
15180 \noindent
15181 The 
15182 \family sans
15183 Revtex
15184 \begin_inset space ~
15185 \end_inset
15186
15187 4
15188 \family default
15189  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15190 \begin_inset Formula $\beta$
15191 \end_inset
15192
15193  release of May, 1999) class.
15194 \end_layout
15195
15196 \begin_layout Standard
15197 LyX has a 
15198 \family sans
15199 Revtex
15200 \family default
15201  textclass, which works with RevTeX 3.1.
15202  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15203  That means that it doesn't interact very well with LyX, which requires
15204  LaTeX2e, although it has been kludged to work.
15205  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15206  LyX with the 
15207 \family sans
15208 RevTeX
15209 \begin_inset space ~
15210 \end_inset
15211
15212 4
15213 \family default
15214  textclass should also be pretty easy to use.
15215 \end_layout
15216
15217 \begin_layout Standard
15218 These documents are supposed to be used in 
15219 \emph on
15220 addition
15221 \emph default
15222  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15223  macros, and assume you'll know what to put in the preamble if necessary.
15224 \end_layout
15225
15226 \begin_layout Subsection
15227 Installation
15228 \end_layout
15229
15230 \begin_layout Standard
15231 All you need to do is install RevTeX 4, as described in the package's README
15232  file.
15233  The package can be found at The RevTeX 4 Web Site 
15234 \begin_inset Flex URL
15235 status collapsed
15236
15237 \begin_layout Plain Layout
15238
15239 http://publish.aps.org/revtex4/
15240 \end_layout
15241
15242 \end_inset
15243
15244 .
15245  Install it somewhere that LaTeX can see it.
15246  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15247  (i.
15248 \begin_inset space \thinspace{}
15249 \end_inset
15250
15251 e.
15252 \begin_inset space \space{}
15253 \end_inset
15254
15255 not the directory where you installed the class file.) Then, if you reconfigure
15256  LyX, it will find the class file and let you use the RevTeX4 textclass.
15257 \end_layout
15258
15259 \begin_layout Standard
15260 Probably the easiest way to get started is either to import a RevTeX 4 document
15261  using 
15262 \family typewriter
15263 tex2lyx
15264 \family default
15265 , or to use the 
15266 \family sans
15267 Revtex
15268 \begin_inset space ~
15269 \end_inset
15270
15271 4
15272 \family default
15273  template, found in the templates directory.
15274 \end_layout
15275
15276 \begin_layout Subsection
15277 Preamble Matter
15278 \end_layout
15279
15280 \begin_layout Standard
15281 Optional arguments to 
15282 \family typewriter
15283
15284 \backslash
15285 documentclass
15286 \family default
15287 , like 
15288 \begin_inset Quotes eld
15289 \end_inset
15290
15291 preprint
15292 \begin_inset Quotes erd
15293 \end_inset
15294
15295  and 
15296 \begin_inset Quotes eld
15297 \end_inset
15298
15299 aps
15300 \begin_inset Quotes erd
15301 \end_inset
15302
15303 , go in the 
15304 \family sans
15305 E
15306 \bar under
15307 x
15308 \bar default
15309 tra
15310 \begin_inset space ~
15311 \end_inset
15312
15313 Options
15314 \family default
15315  field in the 
15316 \family sans
15317 Document
15318 \begin_inset space ~
15319 \end_inset
15320
15321 Layout
15322 \family default
15323  dialog, as usual.
15324  Remember that in RevTeX, at least one optional argument is required! 
15325 \end_layout
15326
15327 \begin_layout Standard
15328 Other preamble matter, like 
15329 \family typewriter
15330
15331 \backslash
15332 draft
15333 \family default
15334  etc.
15335 \begin_inset space ~
15336 \end_inset
15337
15338 goes in the 
15339 \family sans
15340 LaTeX
15341 \begin_inset space ~
15342 \end_inset
15343
15344 Preamble
15345 \family default
15346  dialog, also as usual.
15347 \end_layout
15348
15349 \begin_layout Subsection
15350 Layouts
15351 \end_layout
15352
15353 \begin_layout Standard
15354 The layouts basically correspond to the commands in RevTeX4.0.
15355  For example, the Email layout corresponds to 
15356 \family typewriter
15357
15358 \backslash
15359 email{}
15360 \family default
15361 .
15362  Note that (at least as of RevTeX 4.0 Beta), the 
15363 \family sans
15364 Address
15365 \family default
15366  and 
15367 \family sans
15368 Affiliation
15369 \family default
15370  layouts are exactly equivalent, so you shouldn't need to use both.
15371 \begin_inset Foot
15372 status collapsed
15373
15374 \begin_layout Plain Layout
15375 In case you're curious, both were included so that 
15376 \family typewriter
15377 tex2lyx
15378 \family default
15379  would be able to translate both 
15380 \family typewriter
15381
15382 \backslash
15383 address
15384 \family default
15385  and 
15386 \family typewriter
15387
15388 \backslash
15389 affiliation
15390 \family default
15391 .
15392 \end_layout
15393
15394 \end_inset
15395
15396
15397 \end_layout
15398
15399 \begin_layout Subsection
15400 Important Notes
15401 \end_layout
15402
15403 \begin_layout Standard
15404 There are a couple of important unique aspects of RevTeX 4 which might cause
15405  bugs that will be even more confusing in LyX.
15406 \end_layout
15407
15408 \begin_layout Standard
15409 In RevTeX, the 
15410 \family typewriter
15411
15412 \backslash
15413 thanks
15414 \family default
15415  command goes 
15416 \emph on
15417 outside
15418 \emph default
15419  the 
15420 \family typewriter
15421
15422 \backslash
15423 author
15424 \family default
15425  command.
15426  The LyX equivalent is that there is a separate Thanks layout.
15427  Do 
15428 \emph on
15429 not
15430 \emph default
15431  write footnotes in the 
15432 \family sans
15433 Author
15434 \family default
15435  layout, or weird things may happen.
15436  See the RevTeX 4 documentation for more details.
15437 \end_layout
15438
15439 \begin_layout Standard
15440 Also, the 
15441 \family sans
15442 Author
15443 \begin_inset space ~
15444 \end_inset
15445
15446 Email
15447 \family default
15448
15449 \family sans
15450 Author
15451 \begin_inset space ~
15452 \end_inset
15453
15454 URL
15455 \family default
15456 , and 
15457 \family sans
15458 Thanks
15459 \family default
15460  layouts must be placed 
15461 \emph on
15462 in between
15463 \emph default
15464  the 
15465 \family sans
15466 Author
15467 \family default
15468  layout and the corresponding 
15469 \family sans
15470 Address
15471 \family default
15472  (or equivalent 
15473 \family sans
15474 Affiliation
15475 \family default
15476 ) layout.
15477  If you put the 
15478 \family sans
15479 Thanks
15480 \family default
15481  after the 
15482 \family sans
15483 Address
15484 \family default
15485 , the LaTeX won't compile.
15486 \end_layout
15487
15488 \begin_layout Subsection
15489 Drawbacks
15490 \end_layout
15491
15492 \begin_layout Standard
15493 The main problem with this layout is that you can't use the optional arguments
15494  to layouts like Email and Title.
15495  (The problem is not unique to this layout; you can't use optional arguments
15496  to the Section layouts either.) This means that after you export that file
15497  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15498  need to edit the LaTeX file with a text editor to add the optional arguments
15499  to set, e.
15500 \begin_inset space \thinspace{}
15501 \end_inset
15502
15503 g.
15504 \begin_inset space \space{}
15505 \end_inset
15506
15507 the running title for the page headers.
15508  Lacking these layouts makes the 
15509 \family typewriter
15510
15511 \backslash
15512 altaffiliation
15513 \family default
15514  (and the equivalent 
15515 \family typewriter
15516
15517 \backslash
15518 altaddress
15519 \family default
15520 ) useless, so the corresponding layouts don't exist, and will have to be
15521  added by hand.
15522 \begin_inset Foot
15523 status collapsed
15524
15525 \begin_layout Plain Layout
15526
15527 \emph on
15528 Note from JMarc:
15529 \emph default
15530  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15531  has not been updated yet to take advantage of it.
15532 \end_layout
15533
15534 \end_inset
15535
15536  
15537 \end_layout
15538
15539 \begin_layout Section
15540 Springer Journals (
15541 \family sans
15542 svjour
15543 \family default
15544 )
15545 \end_layout
15546
15547 \begin_layout Standard
15548 by 
15549 \noun on
15550 Martin Vermeer
15551 \end_layout
15552
15553 \begin_layout Subsection
15554 Description
15555 \end_layout
15556
15557 \begin_layout Standard
15558 These are the layout files for some of the journal formats used by Springer
15559  Verlag and listed on 
15560 \begin_inset Flex URL
15561 status collapsed
15562
15563 \begin_layout Plain Layout
15564
15565 http://www.springer.de/author/tex/help-journals.html
15566 \end_layout
15567
15568 \end_inset
15569
15570 , where you should also go to fetch the class files (yes, these are LaTeX2e
15571  now!).
15572  It is a modular system: the things common to all journals are implemented
15573  in 
15574 \family typewriter
15575 svjour.inc
15576 \family default
15577 , which journal-specific layout files (such as, e.
15578 \begin_inset space \thinspace{}
15579 \end_inset
15580
15581 g.
15582 \begin_inset space \space{}
15583 \end_inset
15584
15585
15586 \family typewriter
15587 svjog.layout
15588 \family default
15589  for Journal of Geodesy) can include.
15590 \end_layout
15591
15592 \begin_layout Standard
15593 This means that implementing support for any other Springer journal on this
15594  list is as simple as writing your own 
15595 \family typewriter
15596 sv
15597 \family default
15598 <myjournal>
15599 \family typewriter
15600 .layout
15601 \family default
15602  file following the outline given in 
15603 \family typewriter
15604 svjog.layout
15605 \family default
15606 .
15607  
15608 \end_layout
15609
15610 \begin_layout Standard
15611 It is reasonably well tested only for the Journal of Geodesy.
15612  
15613 \family typewriter
15614 svjour
15615 \family default
15616  and 
15617 \family typewriter
15618 svjog
15619 \family default
15620  come with the standard LyX distribution.
15621  Install the relevant class file (downloaded from Springer) in a proper
15622  directory, reconfigure LaTeX (in the teTeX case by running 
15623 \family typewriter
15624 texhash
15625 \family default
15626 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15627  and it should work.
15628 \end_layout
15629
15630 \begin_layout Subsection
15631 New styles
15632 \end_layout
15633
15634 \begin_layout Standard
15635 A large number of theorem-like styles — 
15636 \family sans
15637 Claim, Conjecture,
15638 \family default
15639  
15640 \family sans
15641 \SpecialChar \ldots{}
15642 Theorem
15643 \family default
15644 .
15645 \end_layout
15646
15647 \begin_layout Standard
15648
15649 \family sans
15650 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15651  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15652 \family default
15653 .
15654  See the Springer class file documentation for details.
15655 \end_layout
15656
15657 \begin_layout Subsection
15658 Supported journals
15659 \end_layout
15660
15661 \begin_layout Itemize
15662
15663 \emph on
15664 Journal of Geodesy
15665 \emph default
15666
15667 \family typewriter
15668 svjog.layout
15669 \family default
15670  — Martin Vermeer
15671 \end_layout
15672
15673 \begin_layout Itemize
15674
15675 \emph on
15676 Probability Theory and Related Fields
15677 \emph default
15678
15679 \family typewriter
15680 svprobth.layout
15681 \family default
15682  — Jean-Marc Lasgouttes
15683 \end_layout
15684
15685 \begin_layout Standard
15686 Add your own, it isn't so hard!
15687 \end_layout
15688
15689 \begin_layout Subsection
15690 Credits
15691 \end_layout
15692
15693 \begin_layout Standard
15694 These files are partly based on the older 
15695 \family typewriter
15696 ejour2.layout
15697 \family default
15698 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15699  file from Springer.
15700  All this, and the 
15701 \family typewriter
15702 ejour2
15703 \family default
15704  layout, are now defunct.
15705  Jean-Marc Lasgouttes helped out big in making me find my way around the
15706  LyX layout file mechanism.
15707 \end_layout
15708
15709 \begin_layout Subsection
15710 Bugs
15711 \end_layout
15712
15713 \begin_layout Standard
15714 Probably.
15715  But probably less than in the old hacked-LaTeX 
15716 \family typewriter
15717 ejour2
15718 \family default
15719 .
15720 \end_layout
15721
15722 \begin_layout Standard
15723 Limitations e.
15724 \begin_inset space \thinspace{}
15725 \end_inset
15726
15727 g.: does not display the number for theorem-like layouts, just #.
15728 \end_layout
15729
15730 \begin_layout Section
15731 Slides [aka 
15732 \noun on
15733 SliTeX
15734 \noun default
15735 ]
15736 \begin_inset CommandInset label
15737 LatexCommand label
15738 name "sec:slitex"
15739
15740 \end_inset
15741
15742
15743 \end_layout
15744
15745 \begin_layout Standard
15746 by 
15747 \noun on
15748 John Weiss
15749 \noun default
15750  
15751 \end_layout
15752
15753 \begin_layout Subsection
15754 Introduction
15755 \end_layout
15756
15757 \begin_layout Standard
15758 This section describes how to use LyX to make slides for overhead projectors.
15759  There are two document classes that can do this: the default slides class
15760  and the 
15761 \family sans
15762 FoilTeX
15763 \family default
15764  slides class.
15765  This section documents the former.
15766 \end_layout
15767
15768 \begin_layout Standard
15769 I'm going to say this again, nice and clear, so that there's no misunderstanding
15770 :
15771 \end_layout
15772
15773 \begin_layout Standard
15774 \begin_inset VSpace bigskip
15775 \end_inset
15776
15777
15778 \end_layout
15779
15780 \begin_layout Standard
15781 \align center
15782
15783 \size large
15784 This section documents the class 
15785 \begin_inset Quotes eld
15786 \end_inset
15787
15788
15789 \family sans
15790 slides (default)
15791 \family default
15792
15793 \begin_inset Quotes erd
15794 \end_inset
15795
15796  
15797 \emph on
15798 only.
15799 \end_layout
15800
15801 \begin_layout Standard
15802 \begin_inset VSpace bigskip
15803 \end_inset
15804
15805
15806 \end_layout
15807
15808 \begin_layout Standard
15809 If you're looking for the documentation for 
15810 \begin_inset Quotes eld
15811 \end_inset
15812
15813
15814 \family sans
15815 slides (FoilTeX)
15816 \family default
15817
15818 \begin_inset Quotes erd
15819 \end_inset
15820
15821 , check out section
15822 \begin_inset space ~
15823 \end_inset
15824
15825
15826 \begin_inset CommandInset ref
15827 LatexCommand ref
15828 reference "sec:foiltex"
15829
15830 \end_inset
15831
15832 .
15833  The 
15834 \family sans
15835 foils
15836 \family default
15837  class [
15838 \begin_inset Quotes eld
15839 \end_inset
15840
15841
15842 \family sans
15843 slides (FoilTeX)
15844 \family default
15845
15846 \begin_inset Quotes erd
15847 \end_inset
15848
15849 ] is actually somewhat better than the default 
15850 \family sans
15851 slides
15852 \family default
15853  class,
15854 \begin_inset Foot
15855 status collapsed
15856
15857 \begin_layout Plain Layout
15858 \SpecialChar \ldots{}
15859 or so I've been told repeatedly by its advocates.
15860  Having never used it, I have no idea if this claim is true or not.
15861 \end_layout
15862
15863 \end_inset
15864
15865  which this section documents.
15866 \end_layout
15867
15868 \begin_layout Standard
15869 This class is the LaTeX2e improvement of the old 
15870 \noun on
15871 SliTeX
15872 \noun default
15873  package.
15874  Every LaTeX2e distribution includes this class [which I'll just refer to
15875  as 
15876 \begin_inset Quotes eld
15877 \end_inset
15878
15879
15880 \family sans
15881 slides
15882 \family default
15883
15884 \begin_inset Quotes erd
15885 \end_inset
15886
15887  from now on], so you're bound to have it.
15888  As I noted earlier, there are other classes, such as 
15889 \family sans
15890 foils
15891 \family default
15892 , which also produce slides for overhead projectors and do a better job
15893  at it.
15894  However, there are some things which 
15895 \family sans
15896 slides
15897 \family default
15898  can do which the others can't, such as generate overlays.
15899  Read on to learn more!
15900 \end_layout
15901
15902 \begin_layout Subsection
15903 Getting Started
15904 \begin_inset CommandInset label
15905 LatexCommand label
15906 name "sec:slidesetup"
15907
15908 \end_inset
15909
15910
15911 \end_layout
15912
15913 \begin_layout Standard
15914 Obviously, to use this document class, you need to select 
15915 \begin_inset Quotes eld
15916 \end_inset
15917
15918
15919 \family sans
15920 slides (default)
15921 \family default
15922
15923 \begin_inset Quotes erd
15924 \end_inset
15925
15926  from the class list in the 
15927 \family sans
15928 Document\SpecialChar \menuseparator
15929 Settings
15930 \family default
15931  dialog.
15932  There are some other special things you should know about this class:
15933 \end_layout
15934
15935 \begin_layout Itemize
15936 Don't bother changing the options 
15937 \family sans
15938 Sides and Columns
15939 \family default
15940 .
15941  They're not supported by the 
15942 \family sans
15943 slides
15944 \family default
15945  class, anyways.
15946 \end_layout
15947
15948 \begin_layout Itemize
15949 The option 
15950 \family sans
15951 Page
15952 \begin_inset space ~
15953 \end_inset
15954
15955 style
15956 \family default
15957  behaves a bit differently for this class.
15958  The possible choices and what they do are as follows:
15959 \end_layout
15960
15961 \begin_deeper
15962 \begin_layout Description
15963
15964 \family sans
15965 plain
15966 \family default
15967  The final output contains page numbers in the lower right corner.
15968 \end_layout
15969
15970 \begin_layout Description
15971
15972 \family sans
15973 headings
15974 \family default
15975  Like 
15976 \family sans
15977 plain
15978 \family default
15979 , but also prints out any time markers you've put in.
15980  This is the default.
15981 \end_layout
15982
15983 \begin_layout Description
15984
15985 \family sans
15986 empty
15987 \family default
15988  The final output contains no page numbers, time markers, or alignment markers.
15989 \end_layout
15990
15991 \end_deeper
15992 \begin_layout Itemize
15993 The 
15994 \family sans
15995 slides
15996 \family default
15997  class has an extra option: 
15998 \family typewriter
15999 clock
16000 \family default
16001 .
16002  To use it, put 
16003 \begin_inset Quotes eld
16004 \end_inset
16005
16006
16007 \family typewriter
16008 clock
16009 \family default
16010
16011 \begin_inset Quotes erd
16012 \end_inset
16013
16014  in the extra class options.
16015 \end_layout
16016
16017 \begin_deeper
16018 \begin_layout Standard
16019 Using this options allows you to add time markers to 
16020 \family sans
16021 Note
16022 \family default
16023 s.
16024  See section
16025 \begin_inset space ~
16026 \end_inset
16027
16028
16029 \begin_inset CommandInset ref
16030 LatexCommand ref
16031 reference "sec:slideNote"
16032
16033 \end_inset
16034
16035  for more details.
16036 \end_layout
16037
16038 \end_deeper
16039 \begin_layout Standard
16040 You can also use the template file 
16041 \begin_inset Quotes eld
16042 \end_inset
16043
16044
16045 \family typewriter
16046 slides.lyx
16047 \family default
16048
16049 \begin_inset Quotes erd
16050 \end_inset
16051
16052  to automatically set up a document to use the 
16053 \family sans
16054 slides
16055 \family default
16056  class [using 
16057 \family sans
16058 File\SpecialChar \menuseparator
16059 New
16060 \begin_inset space ~
16061 \end_inset
16062
16063 from
16064 \begin_inset space ~
16065 \end_inset
16066
16067 Template
16068 \family default
16069  to open your new document].
16070  The template file also contains some examples of the special paragraph
16071  environments used by this class.
16072  I'll describe those next.
16073 \end_layout
16074
16075 \begin_layout Subsection
16076 Paragraph Environments
16077 \end_layout
16078
16079 \begin_layout Subsubsection
16080 Supported Environments
16081 \end_layout
16082
16083 \begin_layout Standard
16084 The first thing you'll notice when you start up a new 
16085 \family sans
16086 slides
16087 \family default
16088  document is the font size and type: it's the equivalent of the size 
16089 \begin_inset Quotes eld
16090 \end_inset
16091
16092
16093 \family sans
16094 Largest
16095 \family default
16096
16097 \begin_inset Quotes erd
16098 \end_inset
16099
16100  in the 
16101 \family sans
16102 Sans
16103 \begin_inset space ~
16104 \end_inset
16105
16106 Serif
16107 \family default
16108  font.
16109  This is also what's used in the output.
16110  Think of this as a 
16111 \begin_inset Quotes eld
16112 \end_inset
16113
16114 visual cue
16115 \begin_inset Quotes erd
16116 \end_inset
16117
16118  to remind you that this is a slide.
16119  Your final slides will use a larger font; ergo, you'll have less space.
16120  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16121 \end_layout
16122
16123 \begin_layout Standard
16124 The next thing that becomes obvious is the changes to the paragraph environment
16125  pull-down box [at the far-left end of the toolbar].
16126  Most of the paragraph environments you're used to seeing are missing.
16127  There are also five new ones.
16128  That's because the 
16129 \family sans
16130 slides
16131 \family default
16132  class itself only supports certain paragraph environments:
16133 \end_layout
16134
16135 \begin_layout Itemize
16136
16137 \family sans
16138 Standard
16139 \end_layout
16140
16141 \begin_layout Itemize
16142
16143 \family sans
16144 Itemize
16145 \end_layout
16146
16147 \begin_layout Itemize
16148
16149 \family sans
16150 Enumerate
16151 \end_layout
16152
16153 \begin_layout Itemize
16154
16155 \family sans
16156 Description
16157 \end_layout
16158
16159 \begin_layout Itemize
16160
16161 \family sans
16162 List
16163 \end_layout
16164
16165 \begin_layout Itemize
16166
16167 \family sans
16168 Quotation
16169 \end_layout
16170
16171 \begin_layout Itemize
16172
16173 \family sans
16174 Quote
16175 \end_layout
16176
16177 \begin_layout Itemize
16178
16179 \family sans
16180 Verse
16181 \end_layout
16182
16183 \begin_layout Itemize
16184
16185 \family sans
16186 Caption
16187 \end_layout
16188
16189 \begin_layout Itemize
16190
16191 \family sans
16192 LyX-Code
16193 \end_layout
16194
16195 \begin_layout Itemize
16196
16197 \family sans
16198 Comment
16199 \end_layout
16200
16201 \begin_layout Standard
16202 All of the other standard environments, including the section-heading environmen
16203 ts, aren't used in the 
16204 \family sans
16205 slides
16206 \family default
16207  class.
16208 \end_layout
16209
16210 \begin_layout Standard
16211 On the other hand, you'll notice the following new environments:
16212 \end_layout
16213
16214 \begin_layout Itemize
16215
16216 \family sans
16217 Slide
16218 \end_layout
16219
16220 \begin_layout Itemize
16221
16222 \family sans
16223 Overlay
16224 \end_layout
16225
16226 \begin_layout Itemize
16227
16228 \family sans
16229 Note
16230 \end_layout
16231
16232 \begin_layout Itemize
16233
16234 \family sans
16235 InvisibleText
16236 \end_layout
16237
16238 \begin_layout Itemize
16239
16240 \family sans
16241 VisibleText
16242 \end_layout
16243
16244 \begin_layout Standard
16245 These five are kind of quirky, due to a 
16246 \begin_inset Quotes eld
16247 \end_inset
16248
16249 feature
16250 \begin_inset Quotes erd
16251 \end_inset
16252
16253  in LyX.
16254  You see, LyX doesn't permit you to nest any other paragraph environment
16255  into an empty environment.
16256  Now, that's fine and dandy, but it means that you wouldn't be able to start
16257  a slide with anything except plain text.
16258  To deal with this, I've performed a little 
16259 \begin_inset Quotes eld
16260 \end_inset
16261
16262 LaTeX magic.
16263 \begin_inset Quotes erd
16264 \end_inset
16265
16266  
16267 \end_layout
16268
16269 \begin_layout Subsubsection
16270 Quirks of the New Environments
16271 \begin_inset CommandInset label
16272 LatexCommand label
16273 name "sec:slideQuirk"
16274
16275 \end_inset
16276
16277
16278 \end_layout
16279
16280 \begin_layout Standard
16281 All five of the new paragraph environments are somewhat quirky due to inherent
16282  limitiations in the current version of LyX.
16283  As I just mentioned, LyX forbids environments that begin with another environme
16284 nt.
16285  To get around this, the 
16286 \family sans
16287 Slide
16288 \family default
16289  environment isn't a paragraph environment as described in the 
16290 \emph on
16291 User's Guide
16292 \emph default
16293 .
16294  
16295 \end_layout
16296
16297 \begin_layout Standard
16298 You should consider 
16299 \family sans
16300 Slide
16301 \family default
16302
16303 \family sans
16304 Overlay
16305 \family default
16306 , and 
16307 \family sans
16308 Note
16309 \family default
16310  to be 
16311 \begin_inset Quotes eld
16312 \end_inset
16313
16314 pseudo-environments.
16315 \begin_inset Quotes erd
16316 \end_inset
16317
16318  They look like a section heading or a 
16319 \begin_inset Quotes eld
16320 \end_inset
16321
16322
16323 \family sans
16324 Caption
16325 \family default
16326 ,
16327 \begin_inset Quotes erd
16328 \end_inset
16329
16330  but really begin a [and, if necessary, end the previous] paragraph environment.
16331  Likewise, treat 
16332 \family sans
16333 InvisibleText
16334 \family default
16335  and 
16336 \family sans
16337 VisibleText
16338 \family default
16339  as 
16340 \begin_inset Quotes eld
16341 \end_inset
16342
16343 pseudo-commands.
16344 \begin_inset Quotes erd
16345 \end_inset
16346
16347  These two perform some action.
16348 \end_layout
16349
16350 \begin_layout Standard
16351 A common feature of all five environments, 
16352 \family sans
16353 Slide
16354 \family default
16355
16356 \family sans
16357 Overlay
16358 \family default
16359
16360 \family sans
16361 Note
16362 \family default
16363
16364 \family sans
16365 InvisibleText
16366 \family default
16367  and 
16368 \family sans
16369 VisibleText
16370 \family default
16371 , is a rather long-ish label.
16372  The text following this label — ordinarily the contents of the paragraph
16373  environment — is utterly irrelevant for 
16374 \family sans
16375 Slide
16376 \family default
16377
16378 \family sans
16379 Overlay
16380 \family default
16381
16382 \family sans
16383 Note
16384 \family default
16385
16386 \family sans
16387 InvisibleText
16388 \family default
16389  and 
16390 \family sans
16391 VisibleText
16392 \family default
16393 .
16394  LyX completely ignores it.
16395  In fact, you can leave these five environments completely empty.
16396  
16397 \end_layout
16398
16399 \begin_layout Standard
16400 While you don't 
16401 \emph on
16402 have
16403 \emph default
16404  to put any text after the rather long-ish label, you might want to.
16405  This could be a short description of the contents of the 
16406 \family sans
16407 Slide
16408 \family default
16409 , for example.
16410  In that case, enter your descriptive comment and hit 
16411 \family sans
16412 Return
16413 \family default
16414  as you normally would.
16415 \end_layout
16416
16417 \begin_layout Standard
16418 If, on the other hand, you don't want to enter any descriptive text, you'll
16419  hit another LyX quirk.
16420  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16421  environment until you put something in the old one.
16422  So, do this:
16423 \end_layout
16424
16425 \begin_layout Itemize
16426 Start entering the text that will 
16427 \emph on
16428 follow
16429 \emph default
16430  the new 
16431 \family sans
16432 Slide
16433 \family default
16434
16435 \family sans
16436 Overlay
16437 \family default
16438
16439 \family sans
16440 Note
16441 \family default
16442
16443 \family sans
16444 InvisibleText
16445 \family default
16446  or 
16447 \family sans
16448 VisibleText
16449 \family default
16450 .
16451  
16452 \end_layout
16453
16454 \begin_layout Itemize
16455 Now move to the beginning of that paragraph.
16456  
16457 \end_layout
16458
16459 \begin_layout Itemize
16460 Next, hit 
16461 \family sans
16462 Return
16463 \family default
16464 .
16465  
16466 \end_layout
16467
16468 \begin_layout Itemize
16469 Finally, change this new, empty paragraph to a 
16470 \family sans
16471 Slide
16472 \family default
16473
16474 \family sans
16475 Overlay
16476 \family default
16477
16478 \family sans
16479 Note
16480 \family default
16481
16482 \family sans
16483 InvisibleText
16484 \family default
16485  or 
16486 \family sans
16487 VisibleText
16488 \family default
16489 .
16490  
16491 \end_layout
16492
16493 \begin_layout Standard
16494 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16495
16496 \end_layout
16497
16498 \begin_layout Subsection
16499 Making a Presentation with 
16500 \family sans
16501 Slide
16502 \family default
16503
16504 \family sans
16505 Overlay
16506 \family default
16507  and 
16508 \family sans
16509 Note
16510 \end_layout
16511
16512 \begin_layout Subsubsection
16513 Using the 
16514 \family sans
16515 Slide
16516 \family default
16517  Environment
16518 \end_layout
16519
16520 \begin_layout Standard
16521 If you're expecting this section to teach you how to actually make a presentatio
16522 n, you'll be sorely disappointed.
16523  Naturally, I'll describe all of the ways the 
16524 \family sans
16525 slides
16526 \family default
16527  class can assist you in preparing the materials for a presentation.
16528  Filling in the contents, however, is up to you.
16529  [Then again, that 
16530 \emph on
16531 is
16532 \emph default
16533  the LyX philosophy.]
16534 \end_layout
16535
16536 \begin_layout Standard
16537 Choosing the 
16538 \family sans
16539 Slide
16540 \family default
16541  environment [in the manner described in section
16542 \begin_inset space ~
16543 \end_inset
16544
16545
16546 \begin_inset CommandInset ref
16547 LatexCommand ref
16548 reference "sec:slideQuirk"
16549
16550 \end_inset
16551
16552 ] tells LyX to begin a new slide [duh].
16553  The label for this environment/
16554 \begin_inset Quotes erd
16555 \end_inset
16556
16557 pseudo-command
16558 \begin_inset Quotes erd
16559 \end_inset
16560
16561  is an 
16562 \begin_inset Quotes eld
16563 \end_inset
16564
16565 ASCII line,
16566 \begin_inset Quotes erd
16567 \end_inset
16568
16569  in cool blue, followed by the label, 
16570 \begin_inset Quotes eld
16571 \end_inset
16572
16573 NewSlide:
16574 \begin_inset Quotes erd
16575 \end_inset
16576
16577 .
16578  Any text or paragraph environments that follow this one go on the new slide.
16579  It's that simple.
16580 \end_layout
16581
16582 \begin_layout Standard
16583 Slides are probably the only time you'll need to forcibly end pages in LyX
16584  (this can be specified in the 
16585 \family sans
16586 Paragraph Layout
16587 \family default
16588  dialog).
16589  In fact, you'll want to, once you finish entering the contents of one slide.
16590  If you've entered more text than can physically fit on a slide, the extra
16591  overflows onto a new slide.
16592  I don't recommend doing this, however, since the overflow slide won't have
16593  any page number on it.
16594  Furthermore, it may interfere with any 
16595 \family sans
16596 Overlay
16597 \family default
16598  you've made to accompany the oversized 
16599 \family sans
16600 Slide
16601 \family default
16602 .
16603 \end_layout
16604
16605 \begin_layout Standard
16606 The 
16607 \family sans
16608 Overlay
16609 \family default
16610  and 
16611 \family sans
16612 Note
16613 \family default
16614  environments work the same way as the 
16615 \family sans
16616 Slide
16617 \family default
16618  environment.
16619  They both create an 
16620 \begin_inset Quotes eld
16621 \end_inset
16622
16623 ASCII line
16624 \begin_inset Quotes erd
16625 \end_inset
16626
16627  followed by a label [
16628 \begin_inset Quotes eld
16629 \end_inset
16630
16631 NewOverlay:
16632 \begin_inset Quotes erd
16633 \end_inset
16634
16635  and 
16636 \begin_inset Quotes eld
16637 \end_inset
16638
16639 NewNote:
16640 \begin_inset Quotes erd
16641 \end_inset
16642
16643 , respectively].
16644  The color is a stunning magenta instead of blue, and the 
16645 \begin_inset Quotes eld
16646 \end_inset
16647
16648 ASCII line
16649 \begin_inset Quotes erd
16650 \end_inset
16651
16652  will look different, in style and in length.
16653  The label fonts of all three also differ from one another.
16654 \end_layout
16655
16656 \begin_layout Standard
16657 As with a 
16658 \family sans
16659 Slide
16660 \family default
16661 , if the contents of a 
16662 \family sans
16663 Note
16664 \family default
16665  or 
16666 \family sans
16667 Overlay
16668 \family default
16669  exceed the physical size of a slide or sheet of paper, the extra will overflow
16670  onto a new sheet.
16671  Again, you should avoid this.
16672  It defeats the whole purpose of 
16673 \family sans
16674 Note
16675 \family default
16676 s and 
16677 \family sans
16678 Overlay
16679 \family default
16680 s.
16681 \end_layout
16682
16683 \begin_layout Subsubsection
16684 Using 
16685 \family sans
16686 Overlay
16687 \family default
16688  with 
16689 \family sans
16690 Slide
16691 \end_layout
16692
16693 \begin_layout Standard
16694 The idea behind an 
16695 \family sans
16696 Overlay
16697 \family default
16698  is a slide that sits atop another slide.
16699  Perhaps you wish to discuss a figure on the main 
16700 \family sans
16701 Slide
16702 \family default
16703  before displaying the text associated with it.
16704  One way to accomplish this is tape a flap of dark paper over the part of
16705  the 
16706 \family sans
16707 Slide
16708 \family default
16709  you want to display later.
16710  This method fails, however, if you wish to overlap one graph with another,
16711  for example.
16712  You would then have to fumble while speaking to align the two separate,
16713  overlapping 
16714 \family sans
16715 Slide
16716 \family default
16717 s to align the two graphs.
16718  The use of an 
16719 \family sans
16720 Overlay
16721 \family default
16722  environment in both cases makes life much easier.
16723 \end_layout
16724
16725 \begin_layout Standard
16726 Each 
16727 \family sans
16728 Overlay
16729 \family default
16730  receives the page number of its 
16731 \begin_inset Quotes eld
16732 \end_inset
16733
16734 parent
16735 \begin_inset Quotes erd
16736 \end_inset
16737
16738  
16739 \family sans
16740 Slide
16741 \family default
16742 , appended by 
16743 \begin_inset Quotes eld
16744 \end_inset
16745
16746
16747 \family typewriter
16748 -a
16749 \family default
16750
16751 \begin_inset Quotes erd
16752 \end_inset
16753
16754 .
16755 \begin_inset Foot
16756 status collapsed
16757
16758 \begin_layout Plain Layout
16759 Presumably, mutliple 
16760 \family sans
16761 Overlay
16762 \family default
16763 s would have 
16764 \begin_inset Quotes eld
16765 \end_inset
16766
16767
16768 \family typewriter
16769 -a
16770 \family default
16771
16772 \begin_inset Quotes erd
16773 \end_inset
16774
16775
16776 \begin_inset Quotes eld
16777 \end_inset
16778
16779
16780 \family typewriter
16781 -b
16782 \family default
16783
16784 \begin_inset Quotes erd
16785 \end_inset
16786
16787
16788 \begin_inset Quotes eld
16789 \end_inset
16790
16791
16792 \family typewriter
16793 -c
16794 \family default
16795
16796 \begin_inset Quotes erd
16797 \end_inset
16798
16799 , etc.
16800 \begin_inset space ~
16801 \end_inset
16802
16803 appended to the page number of the parent 
16804 \family sans
16805 Slide
16806 \family default
16807 .
16808  
16809 \end_layout
16810
16811 \end_inset
16812
16813  Clearly, you want the contents of both the 
16814 \family sans
16815 Slide
16816 \family default
16817  and the 
16818 \family sans
16819 Overlay
16820 \family default
16821  to each fit on a single physical slide! You should probably consider an
16822  
16823 \family sans
16824 Overlay
16825 \family default
16826  as 
16827 \begin_inset Quotes eld
16828 \end_inset
16829
16830 part of
16831 \begin_inset Quotes erd
16832 \end_inset
16833
16834  a 
16835 \family sans
16836 Slide
16837 \family default
16838 .
16839  Indeed, the LyX 
16840 \family sans
16841 slides
16842 \family default
16843  class provides a visual cue for this: the label at the start of an 
16844 \family sans
16845 Overlay
16846 \family default
16847  is shorter than that at the start of a 
16848 \family sans
16849 Slide
16850 \family default
16851 .
16852  Lastly, when you generate printable output, you'll find alignment markers
16853  in all four corners of both the 
16854 \family sans
16855 Overlay
16856 \family default
16857  page and its parent 
16858 \family sans
16859 Slide
16860 \family default
16861 .
16862  These will assist you in lining up the two physical slides.
16863 \end_layout
16864
16865 \begin_layout Standard
16866 The major problem in overlaying two slides is aligning the contents of the
16867  two transparencies.
16868  How much space should you leave for that graph on the second slide? Worse
16869  still, what if you want a graph and a sentence on second slide, but there
16870  is text on the main transparency that goes in between them? You could try
16871  and insert vertical space of the right size.
16872  The better way is to use 
16873 \family sans
16874 InvisibleText
16875 \family default
16876  and 
16877 \family sans
16878 VisibleText
16879 \family default
16880 .
16881 \end_layout
16882
16883 \begin_layout Standard
16884 As their names imply, 
16885 \family sans
16886 InvisibleText
16887 \family default
16888  and 
16889 \family sans
16890 VisibleText
16891 \family default
16892  are two command-like paragraph environments that make all subsequent text
16893  invisible and visible, respectively.
16894  Note from section
16895 \begin_inset space ~
16896 \end_inset
16897
16898
16899 \begin_inset CommandInset ref
16900 LatexCommand ref
16901 reference "sec:slideQuirk"
16902
16903 \end_inset
16904
16905  that you don't place anything 
16906 \emph on
16907 into
16908 \emph default
16909  these two environments, however.
16910  When you create an 
16911 \family sans
16912 InvisibleText
16913 \family default
16914 , it inserts a centered, sky-blue label into the page reading 
16915 \begin_inset Quotes eld
16916 \end_inset
16917
16918 <Invisible Text Follows>
16919 \begin_inset Quotes erd
16920 \end_inset
16921
16922 .
16923  For paragraphs following this label, the parts of the 
16924 \family sans
16925 Slide
16926 \family default
16927  [or 
16928 \family sans
16929 Overlay
16930 \family default
16931 ; it doesn't matter which] where they would be contain instead blank space.
16932  
16933 \end_layout
16934
16935 \begin_layout Standard
16936 For 
16937 \family sans
16938 VisibleText
16939 \family default
16940 , the corresponding centered label is 
16941 \begin_inset Quotes eld
16942 \end_inset
16943
16944 <Visible Text Follows>
16945 \begin_inset Quotes erd
16946 \end_inset
16947
16948  in blazing green.
16949  Paragraphs following this label behave normally.
16950  Note that the beginning of a new 
16951 \family sans
16952 Slide
16953 \family default
16954
16955 \family sans
16956 Overlay
16957 \family default
16958 , or 
16959 \family sans
16960 Note
16961 \family default
16962  automatically shuts off an 
16963 \family sans
16964 InvisibleText
16965 \family default
16966 .
16967  It's therefore not necessary to use 
16968 \family sans
16969 VisibleText
16970 \family default
16971  at the end of a 
16972 \family sans
16973 Slide
16974 \family default
16975 .
16976 \end_layout
16977
16978 \begin_layout Standard
16979 By now, it should be obvious how to create overlay transparencies using
16980  the proper combination of 
16981 \family sans
16982 InvisibleText
16983 \family default
16984  and 
16985 \family sans
16986 VisibleText
16987 \family default
16988  on a 
16989 \family sans
16990 Slide
16991 \family default
16992  and 
16993 \family sans
16994 Overlay
16995 \family default
16996 :
16997 \end_layout
16998
16999 \begin_layout Enumerate
17000 Create a 
17001 \family sans
17002 Slide
17003 \family default
17004 , including everything that will appear on it, whether on the main slide
17005  or on the 
17006 \family sans
17007 Overlay
17008 \family default
17009 .
17010 \end_layout
17011
17012 \begin_layout Enumerate
17013 Before each figure or paragraph that will appear only on the 
17014 \family sans
17015 Overlay
17016 \family default
17017 , insert an 
17018 \family sans
17019 InvisibleText
17020 \family default
17021  environment.
17022  If necessary, insert a 
17023 \family sans
17024 VisibleText
17025 \family default
17026  environment after the 
17027 \family sans
17028 Overlay
17029 \family default
17030 -only text.
17031 \end_layout
17032
17033 \begin_layout Enumerate
17034 Start an 
17035 \family sans
17036 Overlay
17037 \family default
17038  immediately following the 
17039 \family sans
17040 Slide
17041 \family default
17042 .
17043 \end_layout
17044
17045 \begin_layout Enumerate
17046 Copy the contents of this 
17047 \family sans
17048 Slide
17049 \family default
17050  into the 
17051 \family sans
17052 Overlay
17053 \family default
17054 .
17055 \end_layout
17056
17057 \begin_layout Enumerate
17058 Within the 
17059 \family sans
17060 Overlay
17061 \family default
17062 , change all of the 
17063 \family sans
17064 InvisibleText
17065 \family default
17066  lines to 
17067 \family sans
17068 VisibleText
17069 \family default
17070  and vice-versa.
17071 \end_layout
17072
17073 \begin_layout Standard
17074 That's it.
17075  You've just made an 
17076 \family sans
17077 Overlay
17078 \family default
17079 .
17080 \end_layout
17081
17082 \begin_layout Standard
17083 There's one problem with the way I've designed the LyX 
17084 \family sans
17085 slides
17086 \family default
17087  class: you can't make text in the middle of a paragraph invisible, nor
17088  make text in the middle of an invisible paragraph visible again.
17089  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17090 \begin_inset Foot
17091 status collapsed
17092
17093 \begin_layout Plain Layout
17094 The commands of interest are: 
17095 \end_layout
17096
17097 \begin_layout Itemize
17098
17099 \family typewriter
17100 {
17101 \backslash
17102 invisible \SpecialChar \ldots{}
17103  }
17104 \end_layout
17105
17106 \begin_layout Itemize
17107
17108 \family typewriter
17109 {
17110 \backslash
17111 visible \SpecialChar \ldots{}
17112  }
17113 \end_layout
17114
17115 \begin_layout Plain Layout
17116 \SpecialChar \ldots{}
17117 and need to be marked as TeX.
17118  The text whose 
17119 \begin_inset Quotes eld
17120 \end_inset
17121
17122 visibility
17123 \begin_inset Quotes erd
17124 \end_inset
17125
17126  you wish to change goes in between the brackets [and after the 
17127 \family typewriter
17128
17129 \backslash
17130 invisible
17131 \family default
17132  or 
17133 \family typewriter
17134
17135 \backslash
17136 visible
17137 \family default
17138  command].
17139  If you don't know how to mark text as TeX, see the appropriate section
17140  of the 
17141 \emph on
17142 User's Guide
17143 \emph default
17144 .
17145 \end_layout
17146
17147 \end_inset
17148
17149
17150 \end_layout
17151
17152 \begin_layout Subsubsection
17153 Using 
17154 \family sans
17155 Note
17156 \family default
17157  with 
17158 \family sans
17159 Slide
17160 \family default
17161
17162 \begin_inset CommandInset label
17163 LatexCommand label
17164 name "sec:slideNote"
17165
17166 \end_inset
17167
17168
17169 \end_layout
17170
17171 \begin_layout Standard
17172 Like an 
17173 \family sans
17174 Overlay
17175 \family default
17176 , a 
17177 \family sans
17178 Note
17179 \family default
17180  is associated with a 
17181 \begin_inset Quotes eld
17182 \end_inset
17183
17184 parent
17185 \begin_inset Quotes erd
17186 \end_inset
17187
17188  
17189 \family sans
17190 Slide
17191 \family default
17192 .
17193  Here, too, the LyX 
17194 \family sans
17195 slides
17196 \family default
17197  class provides visual cues.
17198  The label for a 
17199 \family sans
17200 Note
17201 \family default
17202  is shorter than that of a 
17203 \family sans
17204 Slide
17205 \family default
17206  [yet longer than that of an 
17207 \family sans
17208 Overlay
17209 \family default
17210 ] and, like the label of an 
17211 \family sans
17212 Overlay
17213 \family default
17214  is shockingly magenta.
17215  Additionally, the printed 
17216 \family sans
17217 Note
17218 \family default
17219  has the page number of its 
17220 \begin_inset Quotes eld
17221 \end_inset
17222
17223 parent
17224 \begin_inset Quotes erd
17225 \end_inset
17226
17227  
17228 \family sans
17229 Slide
17230 \family default
17231 , appended by 
17232 \begin_inset Quotes eld
17233 \end_inset
17234
17235
17236 \family typewriter
17237 -
17238 \family default
17239 1
17240 \begin_inset Quotes erd
17241 \end_inset
17242
17243
17244 \begin_inset Quotes eld
17245 \end_inset
17246
17247
17248 \family typewriter
17249 -
17250 \family default
17251 2
17252 \begin_inset Quotes erd
17253 \end_inset
17254
17255
17256 \begin_inset Quotes eld
17257 \end_inset
17258
17259
17260 \family typewriter
17261 -
17262 \family default
17263 3
17264 \begin_inset Quotes erd
17265 \end_inset
17266
17267 , etc.
17268  You can have multiple 
17269 \family sans
17270 Note
17271 \family default
17272 s associated with a single 
17273 \family sans
17274 Slide
17275 \family default
17276 , and, as with 
17277 \family sans
17278 Slide
17279 \family default
17280  and 
17281 \family sans
17282 Overlay
17283 \family default
17284 , you'll probably want to break up long 
17285 \family sans
17286 Note
17287 \family default
17288 s so that they fit on a single sheet of paper.
17289 \end_layout
17290
17291 \begin_layout Standard
17292 The purpose of a 
17293 \family sans
17294 Note
17295 \family default
17296  is obvious: it contains anything additional you might want to say about
17297  a 
17298 \family sans
17299 Slide
17300 \family default
17301 .
17302  It could also be used as a sheet of reminders for a particular 
17303 \family sans
17304 Slide
17305 \family default
17306 .
17307  In the case of the latter, you might want to make use of time markers.
17308  Currently, the LyX 
17309 \family sans
17310 slides
17311 \family default
17312  class has no 
17313 \begin_inset Quotes eld
17314 \end_inset
17315
17316 native
17317 \begin_inset Quotes erd
17318 \end_inset
17319
17320  support for time markers, a 
17321 \noun on
17322 SliTeX
17323 \noun default
17324  feature.
17325  So, you'll have to resort to using the LaTeX codes.
17326 \end_layout
17327
17328 \begin_layout Standard
17329 To use time markers, you'll need to specify the extra class option 
17330 \begin_inset Quotes eld
17331 \end_inset
17332
17333
17334 \family typewriter
17335 clock
17336 \family default
17337
17338 \begin_inset Quotes erd
17339 \end_inset
17340
17341  [see section
17342 \begin_inset space ~
17343 \end_inset
17344
17345
17346 \begin_inset CommandInset ref
17347 LatexCommand ref
17348 reference "sec:slidesetup"
17349
17350 \end_inset
17351
17352 ].
17353  This option turns on timing marks, which will appear in the lower-left-hand
17354  corner of every 
17355 \family sans
17356 Note
17357 \family default
17358  you generate.
17359  To set what appears in the time marker, you use the LaTeX commands 
17360 \begin_inset Quotes eld
17361 \end_inset
17362
17363
17364 \family typewriter
17365
17366 \backslash
17367 settime{}
17368 \family default
17369
17370 \begin_inset Quotes erd
17371 \end_inset
17372
17373  and 
17374 \begin_inset Quotes eld
17375 \end_inset
17376
17377
17378 \family typewriter
17379
17380 \backslash
17381 addtime{}
17382 \family default
17383
17384 \begin_inset Quotes erd
17385 \end_inset
17386
17387 .
17388  The arguments of both commands are time measured in seconds.
17389  
17390 \begin_inset Quotes eld
17391 \end_inset
17392
17393
17394 \family typewriter
17395
17396 \backslash
17397 settime{}
17398 \family default
17399
17400 \begin_inset Quotes erd
17401 \end_inset
17402
17403  sets the time marker to a given time.
17404  
17405 \begin_inset Quotes eld
17406 \end_inset
17407
17408
17409 \family typewriter
17410
17411 \backslash
17412 addtime{}
17413 \family default
17414
17415 \begin_inset Quotes erd
17416 \end_inset
17417
17418  increments the time marker by the specified amount.
17419  Using time markers and 
17420 \family sans
17421 Note
17422 \family default
17423 s in this fashion, you can remind yourself how much time to spend on a particula
17424
17425 \family sans
17426 Slide
17427 \family default
17428 .
17429 \end_layout
17430
17431 \begin_layout Standard
17432 There's one last feature to describe.
17433  Clearly, you'd like to print out all of your 
17434 \family sans
17435 Slide
17436 \family default
17437 s and 
17438 \family sans
17439 Overlay
17440 \family default
17441 s on transparencies while printing all of your 
17442 \family sans
17443 Note
17444 \family default
17445 s on plain paper.
17446  However, a 
17447 \family sans
17448 Note
17449 \family default
17450  
17451 \emph on
17452 must
17453 \emph default
17454  follow the 
17455 \family sans
17456 Slide
17457 \family default
17458  with which it is associated.
17459  What's a person to do?
17460 \end_layout
17461
17462 \begin_layout Standard
17463 Luckily, there are two LaTeX commands that allow you to select what to print
17464  out.
17465  Both must be placed into the preamble of your document.
17466  The command 
17467 \begin_inset Quotes eld
17468 \end_inset
17469
17470
17471 \family typewriter
17472
17473 \backslash
17474 onlyslides{
17475 \backslash
17476 slides}
17477 \family default
17478
17479 \begin_inset Quotes erd
17480 \end_inset
17481
17482  will cause the output to contain only the 
17483 \family sans
17484 Slide
17485 \family default
17486 s and 
17487 \family sans
17488 Overlay
17489 \family default
17490 s.
17491  Correspondingly, the command 
17492 \begin_inset Quotes eld
17493 \end_inset
17494
17495
17496 \family typewriter
17497
17498 \backslash
17499 onlynotes{
17500 \backslash
17501 notes}
17502 \family default
17503
17504 \begin_inset Quotes erd
17505 \end_inset
17506
17507  prevents the output of anything but 
17508 \family sans
17509 Note
17510 \family default
17511 s.
17512  I'd advise placing both commands in the preamble and initially comment
17513  both out.
17514  You can then preview your entire presentation as you write.
17515  When you're done writing, you can then uncomment one of the two to select
17516  what you want to print.
17517  I like to uncomment 
17518 \begin_inset Quotes eld
17519 \end_inset
17520
17521
17522 \family typewriter
17523
17524 \backslash
17525 onlyslides{
17526 \backslash
17527 slides}
17528 \family default
17529
17530 \begin_inset Quotes erd
17531 \end_inset
17532
17533  , print to a file with 
17534 \begin_inset Quotes eld
17535 \end_inset
17536
17537
17538 \family typewriter
17539 -slides
17540 \family default
17541
17542 \begin_inset Quotes erd
17543 \end_inset
17544
17545  in its name, comment it back out, then uncomment 
17546 \begin_inset Quotes eld
17547 \end_inset
17548
17549
17550 \family typewriter
17551
17552 \backslash
17553 onlynotes{
17554 \backslash
17555 notes}
17556 \family default
17557
17558 \begin_inset Quotes erd
17559 \end_inset
17560
17561  and print to a 
17562 \begin_inset Quotes eld
17563 \end_inset
17564
17565
17566 \family typewriter
17567 *-notes.ps
17568 \family default
17569
17570 \begin_inset Quotes erd
17571 \end_inset
17572
17573  file.
17574  I can then send either file to a printer, loading transparencies or plain
17575  paper as appropriate.
17576 \end_layout
17577
17578 \begin_layout Standard
17579 You can also provide other arguments to the 
17580 \begin_inset Quotes eld
17581 \end_inset
17582
17583
17584 \family typewriter
17585
17586 \backslash
17587 onlyslides{}
17588 \family default
17589
17590 \begin_inset Quotes erd
17591 \end_inset
17592
17593  and 
17594 \begin_inset Quotes eld
17595 \end_inset
17596
17597
17598 \family typewriter
17599
17600 \backslash
17601 onlynotes{}
17602 \family default
17603
17604 \begin_inset Quotes erd
17605 \end_inset
17606
17607  commands.
17608  See a good LaTeX book for details.
17609 \end_layout
17610
17611 \begin_layout Subsection
17612 The 
17613 \family sans
17614 slides
17615 \family default
17616  Class Template File
17617 \end_layout
17618
17619 \begin_layout Standard
17620 I have also provided a template file, 
17621 \begin_inset Quotes eld
17622 \end_inset
17623
17624
17625 \family typewriter
17626 slides.lyx
17627 \family default
17628
17629 \begin_inset Quotes erd
17630 \end_inset
17631
17632 , with the 
17633 \family sans
17634 slides
17635 \family default
17636  class.
17637  To use it, begin your new presentation with 
17638 \family sans
17639 \bar under
17640 F
17641 \bar default
17642 ile\SpecialChar \menuseparator
17643 New
17644 \begin_inset space ~
17645 \end_inset
17646
17647 from
17648 \begin_inset space ~
17649 \end_inset
17650
17651
17652 \bar under
17653 T
17654 \bar default
17655 emplate
17656 \family default
17657 .
17658  Your new LyX presentation file will contain an example 
17659 \family sans
17660 Slide
17661 \family default
17662  – 
17663 \family sans
17664 Overlay
17665 \family default
17666  – 
17667 \family sans
17668 Note
17669 \family default
17670  triplet.
17671  The 
17672 \family sans
17673 Slide
17674 \family default
17675  and 
17676 \family sans
17677 Overlay
17678 \family default
17679  additionally contain an example of the use of 
17680 \family sans
17681 InvisibleText
17682 \family default
17683  and 
17684 \family sans
17685 VisibleText
17686 \family default
17687 .
17688  Lastly, the preamble will contain:
17689 \end_layout
17690
17691 \begin_layout LyX-Code
17692 % Uncomment to print out only slides and overlays
17693 \end_layout
17694
17695 \begin_layout LyX-Code
17696 %
17697 \end_layout
17698
17699 \begin_layout LyX-Code
17700 %
17701 \backslash
17702 onlyslides{
17703 \backslash
17704 slides}
17705 \begin_inset Newline newline
17706 \end_inset
17707
17708  
17709 \end_layout
17710
17711 \begin_layout LyX-Code
17712 % Uncomment to print out only notes
17713 \end_layout
17714
17715 \begin_layout LyX-Code
17716 %
17717 \end_layout
17718
17719 \begin_layout LyX-Code
17720 %
17721 \backslash
17722 onlynotes{
17723 \backslash
17724 notes}
17725 \end_layout
17726
17727 \begin_layout Standard
17728 One final thing: I created this class to support the LaTeX2e 
17729 \begin_inset Quotes eld
17730 \end_inset
17731
17732
17733 \noun on
17734 SliTeX
17735 \noun default
17736  emulation
17737 \begin_inset Quotes erd
17738 \end_inset
17739
17740  class, one of the built-in LaTeX2e classes.
17741  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17742  built-in slide class.
17743  It's here if you want it or need it.
17744  There exist other LaTeX2e classes for creating presentations, such as the
17745  
17746 \family sans
17747 Foils
17748 \family default
17749  class [see section
17750 \begin_inset space ~
17751 \end_inset
17752
17753
17754 \begin_inset CommandInset ref
17755 LatexCommand ref
17756 reference "sec:foiltex"
17757
17758 \end_inset
17759
17760 ] or the 
17761 \begin_inset Quotes eld
17762 \end_inset
17763
17764
17765 \family typewriter
17766 seminar
17767 \family default
17768
17769 \begin_inset Quotes erd
17770 \end_inset
17771
17772  package [present on some TeX distributions].
17773  The latter is not yet supported under LyX.
17774 \begin_inset Foot
17775 status collapsed
17776
17777 \begin_layout Plain Layout
17778 Perhaps you can take on the task\SpecialChar \ldots{}
17779
17780 \end_layout
17781
17782 \end_inset
17783
17784  I know nothing about these other classes.
17785  Try them out to see what sort of alternative they provide.
17786 \end_layout
17787
17788 \begin_layout Chapter
17789 LyX Features needing Extra Software
17790 \end_layout
17791
17792 \begin_layout Section
17793 Checking TeX
17794 \end_layout
17795
17796 \begin_layout Standard
17797 by 
17798 \noun on
17799 Asger Alstrup
17800 \end_layout
17801
17802 \begin_layout Subsection
17803 Introduction
17804 \end_layout
17805
17806 \begin_layout Standard
17807 If you have the 
17808 \family typewriter
17809 chktex
17810 \family default
17811  program installed
17812 \begin_inset Foot
17813 status collapsed
17814
17815 \begin_layout Plain Layout
17816
17817 \family typewriter
17818 chktex
17819 \family default
17820  is not yet available when you are using the LaTeX distribution MiKTeX.
17821 \end_layout
17822
17823 \end_inset
17824
17825 , you'll find in the 
17826 \family sans
17827 Tools
17828 \family default
17829  menu the entry: 
17830 \family sans
17831 Check
17832 \begin_inset space ~
17833 \end_inset
17834
17835 TeX
17836 \family default
17837 .
17838  You can get 
17839 \family typewriter
17840 chktex
17841 \family default
17842  from CTAN, 
17843 \begin_inset CommandInset href
17844 LatexCommand href
17845 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17846
17847 \end_inset
17848
17849 .
17850 \end_layout
17851
17852 \begin_layout Standard
17853 The 
17854 \family sans
17855 ChkTeX
17856 \family default
17857  package is a program that was written by 
17858 \begin_inset Flex Noun
17859 status collapsed
17860
17861 \begin_layout Plain Layout
17862 Jens T.
17863 \begin_inset space ~
17864 \end_inset
17865
17866 Berger Thielemann
17867 \end_layout
17868
17869 \end_inset
17870
17871  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17872  and easy to forget.
17873  The program runs over your LaTeX file, checks the integrity of the file,
17874  and flags some common errors.
17875  In other technical words, it is 
17876 \family typewriter
17877 lint
17878 \family default
17879  for LaTeX.
17880 \end_layout
17881
17882 \begin_layout Standard
17883 Well, what is a syntax checker doing in LyX which is supposed to produce
17884  correct LaTeX anyways? The answer is simple: Just as 
17885 \family typewriter
17886 Lint
17887 \family default
17888  not only checks the 
17889 \emph on
17890 syntax
17891 \emph default
17892  of C programs, but also does 
17893 \emph on
17894 semantic
17895 \emph default
17896  checks for type-errors, 
17897 \family sans
17898 ChkTeX
17899 \family default
17900  catches some common 
17901 \emph on
17902 typographic
17903 \emph default
17904  errors, in addition to the syntactical ones.
17905  Specifically, 
17906 \family sans
17907 ChkTeX
17908 \family default
17909  is capable of detecting several common errors, such as
17910 \end_layout
17911
17912 \begin_layout Itemize
17913 Ellipsis detection:
17914 \begin_inset Newline newline
17915 \end_inset
17916
17917 Use \SpecialChar \ldots{}
17918  instead of ...
17919 \end_layout
17920
17921 \begin_layout Itemize
17922 No space in front of/after parenthesis:
17923 \begin_inset Newline newline
17924 \end_inset
17925
17926 ( wrong spacing )
17927 \end_layout
17928
17929 \begin_layout Itemize
17930 Enforcement of normal space after common abbreviations:
17931 \begin_inset Newline newline
17932 \end_inset
17933
17934 e.
17935 \begin_inset space \thinspace{}
17936 \end_inset
17937
17938 g.
17939 \begin_inset space \space{}
17940 \end_inset
17941
17942 is too wide spacing.
17943 \end_layout
17944
17945 \begin_layout Itemize
17946 Enforcement of end-of-sentence space when the last sentence ends with a
17947  capital letter:
17948 \begin_inset Newline newline
17949 \end_inset
17950
17951 This is a TEST.
17952  And this is wrong spacing.
17953 \end_layout
17954
17955 \begin_layout Itemize
17956 Space in front of labels and similar commands:
17957 \begin_inset Newline newline
17958 \end_inset
17959
17960 The label should stick right up to the text to avoid falling to a wrong
17961  page.
17962  
17963 \begin_inset CommandInset label
17964 LatexCommand label
17965 name "sec:chktex"
17966
17967 \end_inset
17968
17969  
17970 \begin_inset Foot
17971 status collapsed
17972
17973 \begin_layout Plain Layout
17974 This footnote is in danger of falling off to a wrong page
17975 \end_layout
17976
17977 \end_inset
17978
17979  The label is separated too much.
17980 \end_layout
17981
17982 \begin_layout Itemize
17983 Space in front of references, instead of hard spaces:
17984 \begin_inset Newline newline
17985 \end_inset
17986
17987 If you have bad luck, the text will break right between the referenced text
17988  and reference number, and that's a pity.
17989  See section 
17990 \begin_inset CommandInset ref
17991 LatexCommand ref
17992 reference "sec:chktex"
17993
17994 \end_inset
17995
17996 .
17997 \end_layout
17998
17999 \begin_layout Itemize
18000 Use of 
18001 \begin_inset Quotes eld
18002 \end_inset
18003
18004 x
18005 \begin_inset Quotes erd
18006 \end_inset
18007
18008  instead of 
18009 \begin_inset Formula $\times$
18010 \end_inset
18011
18012  between numbers:
18013 \begin_inset Newline newline
18014 \end_inset
18015
18016 2x2 looks cheap compared to 
18017 \begin_inset Formula $2\times2$
18018 \end_inset
18019
18020 .
18021 \end_layout
18022
18023 \begin_layout Standard
18024 and more \SpecialChar \ldots{}
18025  It is an invaluable tool when you are 
18026 \begin_inset Quotes eld
18027 \end_inset
18028
18029 finishing up
18030 \begin_inset Quotes erd
18031 \end_inset
18032
18033  your document before printing, and you should run it right after the obligatory
18034  spelling check, and before you go fine tuning the typesetting.
18035 \end_layout
18036
18037 \begin_layout Subsection
18038 How to use it
18039 \end_layout
18040
18041 \begin_layout Standard
18042 If you have the program installed, usage is as simple as choosing 
18043 \family sans
18044 Tools\SpecialChar \menuseparator
18045 Check
18046 \begin_inset space ~
18047 \end_inset
18048
18049 TeX
18050 \family default
18051 .
18052  This will make LyX generate a LaTeX file of your document, start 
18053 \family sans
18054 ChkTeX
18055 \family default
18056  to check it, and then make LyX insert 
18057 \begin_inset Quotes eld
18058 \end_inset
18059
18060 error boxes
18061 \begin_inset Quotes erd
18062 \end_inset
18063
18064  with the warnings from 
18065 \family sans
18066 ChkTeX
18067 \family default
18068 , if there were any.
18069  The warnings will be placed close to the point of the mistake, and you
18070  can quickly find them by using the 
18071 \family sans
18072 Navigate\SpecialChar \menuseparator
18073 Error
18074 \family default
18075  menu item, or the shortcut key 
18076 \family sans
18077 C-g
18078 \family default
18079  from the default 
18080 \family typewriter
18081 cua
18082 \family default
18083  bind file.
18084  Open the error boxes by clicking on them with the mouse, or use the shortcut
18085  key 
18086 \family sans
18087 C-i
18088 \family default
18089  from 
18090 \family typewriter
18091 cua
18092 \family default
18093  bindings, or the corresponding 
18094 \family sans
18095 C-o
18096 \family default
18097  for the alternate 
18098 \family typewriter
18099 emacs
18100 \family default
18101  bind file.
18102  Read the warning and correct the mistake, if it is a mistake.
18103  If you have trouble understanding what the warning is about, you can safely
18104  ignore it.
18105  Remember that there is a hidden layer between the document on screen and
18106  the technical details in invoking 
18107 \family sans
18108 ChkTeX
18109 \family default
18110 , and this gap can make some warnings seem arcane or just plain silly.
18111 \end_layout
18112
18113 \begin_layout Standard
18114 This document is an excellent testing bed for the feature, and it should
18115  provide quite a few warnings for you to fiddle with.
18116  Since computers are only so smart, expect most of the warnings to be false
18117  alarms, though.
18118 \end_layout
18119
18120 \begin_layout Subsection
18121 How to fine tune it
18122 \end_layout
18123
18124 \begin_layout Standard
18125 Sometimes, you'll find that 
18126 \family sans
18127 ChkTeX
18128 \family default
18129  makes more noise than suits your mood.
18130  Then you can choose not to use it, wait until your mood changes, or try
18131  to customize 
18132 \family sans
18133 ChkTeX
18134 \family default
18135  to get better along with you.
18136 \end_layout
18137
18138 \begin_layout Standard
18139 Although 
18140 \family sans
18141 ChkTeX
18142 \family default
18143  
18144 \emph on
18145 is
18146 \emph default
18147  very configurable and extensible, you shouldn't expect to solve all problems
18148  with 
18149 \family sans
18150 ChkTeX
18151 \family default
18152  in LyX this way.
18153  Since LyX has to generate a somewhat special LaTeX file to be able to match
18154  the line numbers from the 
18155 \family sans
18156 ChkTeX
18157 \family default
18158  output
18159 \begin_inset Foot
18160 status collapsed
18161
18162 \begin_layout Plain Layout
18163 You can inspect the specific output from 
18164 \family sans
18165 chktex
18166 \family default
18167  by using 
18168 \family sans
18169 Edit\SpecialChar \menuseparator
18170 View
18171 \begin_inset space ~
18172 \end_inset
18173
18174 LaTeX
18175 \begin_inset space ~
18176 \end_inset
18177
18178 Log
18179 \family default
18180  right after a 
18181 \family sans
18182 chktex
18183 \family default
18184  run.
18185 \end_layout
18186
18187 \end_inset
18188
18189  to the internal document structure, some of the warnings will not appear
18190  correctly.
18191  There are two things you can do about this:
18192 \end_layout
18193
18194 \begin_layout Itemize
18195 Fine tune the 
18196 \family sans
18197 ChkTeX
18198 \family default
18199  invocation command line in 
18200 \begin_inset Flex MenuItem
18201 status collapsed
18202
18203 \begin_layout Plain Layout
18204 Tools\SpecialChar \menuseparator
18205 Preferences\SpecialChar \menuseparator
18206 Output\SpecialChar \menuseparator
18207 LaTeX\SpecialChar \menuseparator
18208 CheckTeX command
18209 \end_layout
18210
18211 \end_inset
18212
18213 , or the global 
18214 \family sans
18215 ChkTeX
18216 \family default
18217  installation configuration file (usually with the file 
18218 \family typewriter
18219 chktexrc
18220 \family default
18221 ).
18222  See below to learn what warnings can be enabled and disabled on the command
18223  line.
18224 \end_layout
18225
18226 \begin_layout Itemize
18227 Export your document as a raw LaTeX file using 
18228 \family sans
18229 File\SpecialChar \menuseparator
18230 Export\SpecialChar \menuseparator
18231 LaTeX
18232 \family default
18233  and run 
18234 \family typewriter
18235 chktex
18236 \family default
18237  manually on that.
18238  Invoked in this way, it can be a hassle to find the corresponding place
18239  in the document inside LyX, but with a little patience, you should be able
18240  to do it.
18241 \end_layout
18242
18243 \begin_layout Standard
18244 Here follows the warning messages that can be enabled and disabled in 
18245 \family sans
18246 Preferences
18247 \family default
18248 .
18249  Use 
18250 \family typewriter
18251 -n#
18252 \family default
18253  to disable a warning, and 
18254 \family typewriter
18255 -w#
18256 \family default
18257  to enable a warning.
18258  The emphasized entries are disabled by default, because the default is
18259  "
18260 \family typewriter
18261 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18262 \family default
18263 ".
18264 \end_layout
18265
18266 \begin_layout Standard
18267 Notice that you should only use the options that enable and disable warnings,
18268  because LyX relies on some of the other command line parameters to be set
18269  in a specific way to have a chance to communicate with 
18270 \family typewriter
18271 chktex
18272 \family default
18273 .
18274 \end_layout
18275
18276 \begin_layout Enumerate
18277
18278 \size small
18279 \emph on
18280 Command terminated with space.
18281 \end_layout
18282
18283 \begin_layout Enumerate
18284
18285 \size small
18286 Non-breaking space (
18287 \begin_inset Quotes eld
18288 \end_inset
18289
18290
18291 \family typewriter
18292 ~
18293 \family default
18294
18295 \begin_inset Quotes erd
18296 \end_inset
18297
18298 ) should have been used.
18299 \end_layout
18300
18301 \begin_layout Enumerate
18302
18303 \size small
18304 \emph on
18305 You should enclose the previous parenthesis with 
18306 \begin_inset Quotes eld
18307 \end_inset
18308
18309
18310 \family typewriter
18311 {}
18312 \family default
18313
18314 \begin_inset Quotes erd
18315 \end_inset
18316
18317 .
18318 \end_layout
18319
18320 \begin_layout Enumerate
18321
18322 \size small
18323 Italic correction (
18324 \begin_inset Quotes eld
18325 \end_inset
18326
18327
18328 \family typewriter
18329
18330 \backslash
18331 /
18332 \family default
18333
18334 \begin_inset Quotes erd
18335 \end_inset
18336
18337 ) found in non-italic buffer.
18338 \end_layout
18339
18340 \begin_layout Enumerate
18341
18342 \size small
18343 Italic correction (
18344 \begin_inset Quotes eld
18345 \end_inset
18346
18347
18348 \family typewriter
18349
18350 \backslash
18351 /
18352 \family default
18353
18354 \begin_inset Quotes erd
18355 \end_inset
18356
18357 ) found more than once.
18358 \end_layout
18359
18360 \begin_layout Enumerate
18361
18362 \size small
18363 \emph on
18364 No italic correction (
18365 \begin_inset Quotes eld
18366 \end_inset
18367
18368
18369 \family typewriter
18370
18371 \backslash
18372 /
18373 \family default
18374
18375 \begin_inset Quotes erd
18376 \end_inset
18377
18378 ) found.
18379 \end_layout
18380
18381 \begin_layout Enumerate
18382
18383 \size small
18384 Accent command 
18385 \begin_inset Quotes eld
18386 \end_inset
18387
18388
18389 \family typewriter
18390 cmd
18391 \family default
18392
18393 \begin_inset Quotes erd
18394 \end_inset
18395
18396  needs use of 
18397 \begin_inset Quotes eld
18398 \end_inset
18399
18400
18401 \family typewriter
18402 cmd
18403 \family default
18404
18405 \begin_inset Quotes erd
18406 \end_inset
18407
18408 .
18409 \end_layout
18410
18411 \begin_layout Enumerate
18412
18413 \size small
18414 Wrong length of dash may have been used.
18415 \end_layout
18416
18417 \begin_layout Enumerate
18418
18419 \size small
18420 \emph on
18421 \begin_inset Quotes eld
18422 \end_inset
18423
18424
18425 \family typewriter
18426 %s
18427 \family default
18428
18429 \begin_inset Quotes erd
18430 \end_inset
18431
18432  expected, found 
18433 \begin_inset Quotes eld
18434 \end_inset
18435
18436
18437 \family typewriter
18438 %s
18439 \family default
18440
18441 \begin_inset Quotes erd
18442 \end_inset
18443
18444 .
18445 \end_layout
18446
18447 \begin_layout Enumerate
18448
18449 \size small
18450 Solo 
18451 \begin_inset Quotes eld
18452 \end_inset
18453
18454
18455 \family typewriter
18456 %s
18457 \family default
18458
18459 \begin_inset Quotes erd
18460 \end_inset
18461
18462  found.
18463 \end_layout
18464
18465 \begin_layout Enumerate
18466
18467 \size small
18468 You should use 
18469 \begin_inset Quotes eld
18470 \end_inset
18471
18472
18473 \family typewriter
18474 %s
18475 \family default
18476
18477 \begin_inset Quotes erd
18478 \end_inset
18479
18480  to achieve an ellipsis.
18481 \end_layout
18482
18483 \begin_layout Enumerate
18484
18485 \size small
18486 Inter-word spacing (
18487 \begin_inset Quotes eld
18488 \end_inset
18489
18490
18491 \family typewriter
18492
18493 \backslash
18494
18495 \family default
18496  
18497 \begin_inset Quotes eld
18498 \end_inset
18499
18500 ) should perhaps be used.
18501 \end_layout
18502
18503 \begin_layout Enumerate
18504
18505 \size small
18506 Inter-sentence spacing (
18507 \begin_inset Quotes eld
18508 \end_inset
18509
18510
18511 \family typewriter
18512
18513 \backslash
18514 @
18515 \family default
18516
18517 \begin_inset Quotes erd
18518 \end_inset
18519
18520 ) should perhaps be used.
18521 \end_layout
18522
18523 \begin_layout Enumerate
18524
18525 \size small
18526 Could not find argument for command.
18527 \end_layout
18528
18529 \begin_layout Enumerate
18530
18531 \size small
18532 No match found for 
18533 \begin_inset Quotes eld
18534 \end_inset
18535
18536
18537 \family typewriter
18538 %s
18539 \family default
18540
18541 \begin_inset Quotes erd
18542 \end_inset
18543
18544 .
18545 \end_layout
18546
18547 \begin_layout Enumerate
18548
18549 \size small
18550 Math mode still on at end of LaTeX file.
18551 \end_layout
18552
18553 \begin_layout Enumerate
18554
18555 \size small
18556 Number of 
18557 \begin_inset Quotes eld
18558 \end_inset
18559
18560
18561 \family typewriter
18562 char
18563 \family default
18564
18565 \begin_inset Quotes erd
18566 \end_inset
18567
18568  doesn't match the number of 
18569 \begin_inset Quotes eld
18570 \end_inset
18571
18572
18573 \family typewriter
18574 char
18575 \family default
18576
18577 \begin_inset Quotes erd
18578 \end_inset
18579
18580 .
18581 \end_layout
18582
18583 \begin_layout Enumerate
18584
18585 \size small
18586 You should use either 
18587 \family typewriter
18588
18589 \begin_inset Quotes eld
18590 \end_inset
18591
18592
18593 \family default
18594  or 
18595 \family typewriter
18596
18597 \begin_inset Quotes erd
18598 \end_inset
18599
18600
18601 \family default
18602  as an alternative to 
18603 \begin_inset Quotes eld
18604 \end_inset
18605
18606
18607 \family typewriter
18608 "
18609 \family default
18610
18611 \begin_inset Quotes erd
18612 \end_inset
18613
18614 .
18615 \end_layout
18616
18617 \begin_layout Enumerate
18618
18619 \size small
18620 You should use "
18621 \family typewriter
18622 '
18623 \family default
18624 " (ASCII 39) instead of "
18625 \family typewriter
18626 ´
18627 \family default
18628 " (ASCII 180).
18629 \end_layout
18630
18631 \begin_layout Enumerate
18632
18633 \size small
18634 User-specified pattern found.
18635 \end_layout
18636
18637 \begin_layout Enumerate
18638
18639 \size small
18640 This command might not be intended.
18641 \end_layout
18642
18643 \begin_layout Enumerate
18644
18645 \size small
18646 \emph on
18647 Comment displayed.
18648 \end_layout
18649
18650 \begin_layout Enumerate
18651
18652 \size small
18653 Either 
18654 \family typewriter
18655 ''
18656 \backslash
18657 ,'
18658 \family default
18659  or 
18660 \family typewriter
18661 '
18662 \backslash
18663 ,''
18664 \family default
18665  will look better.
18666 \end_layout
18667
18668 \begin_layout Enumerate
18669
18670 \size small
18671 Delete this space to maintain correct page references.
18672 \end_layout
18673
18674 \begin_layout Enumerate
18675
18676 \size small
18677 \emph on
18678 You might wish to put this between a pair of 
18679 \begin_inset Quotes eld
18680 \end_inset
18681
18682
18683 \family typewriter
18684 {}
18685 \family default
18686
18687 \begin_inset Quotes erd
18688 \end_inset
18689
18690 .
18691 \end_layout
18692
18693 \begin_layout Enumerate
18694
18695 \size small
18696 You ought to remove spaces in front of punctuation.
18697 \end_layout
18698
18699 \begin_layout Enumerate
18700
18701 \size small
18702 Could not execute LaTeX command.
18703 \end_layout
18704
18705 \begin_layout Enumerate
18706
18707 \size small
18708 Don't use 
18709 \family typewriter
18710
18711 \backslash
18712 /
18713 \family default
18714  in front of small punctuation.
18715 \end_layout
18716
18717 \begin_layout Enumerate
18718
18719 \family typewriter
18720 \size small
18721 $
18722 \backslash
18723 times$
18724 \family default
18725  may look prettier here.
18726 \end_layout
18727
18728 \begin_layout Enumerate
18729
18730 \size small
18731 \emph on
18732 Multiple spaces detected in output.
18733 \end_layout
18734
18735 \begin_layout Enumerate
18736
18737 \size small
18738 This text may be ignored.
18739 \end_layout
18740
18741 \begin_layout Enumerate
18742
18743 \size small
18744 Use 
18745 \family typewriter
18746
18747 \begin_inset Quotes eld
18748 \end_inset
18749
18750
18751 \family default
18752  to begin quotation, not 
18753 \family typewriter
18754 '
18755 \family default
18756 .
18757 \end_layout
18758
18759 \begin_layout Enumerate
18760
18761 \size small
18762 Use 
18763 \family typewriter
18764 '
18765 \family default
18766  to end quotation, not 
18767 \family typewriter
18768
18769 \begin_inset Quotes eld
18770 \end_inset
18771
18772
18773 \family default
18774 .
18775 \end_layout
18776
18777 \begin_layout Enumerate
18778
18779 \size small
18780 Don't mix quotes.
18781 \end_layout
18782
18783 \begin_layout Enumerate
18784
18785 \size small
18786 You should perhaps use 
18787 \begin_inset Quotes eld
18788 \end_inset
18789
18790
18791 \family typewriter
18792 cmd
18793 \family default
18794
18795 \begin_inset Quotes erd
18796 \end_inset
18797
18798  instead.
18799 \end_layout
18800
18801 \begin_layout Enumerate
18802
18803 \size small
18804 You should put a space in front of/after parenthesis.
18805 \end_layout
18806
18807 \begin_layout Enumerate
18808
18809 \size small
18810 You should avoid spaces in front of/after parenthesis.
18811 \end_layout
18812
18813 \begin_layout Enumerate
18814
18815 \size small
18816 \emph on
18817 You should not use punctuation in front of/after quotes.
18818 \end_layout
18819
18820 \begin_layout Enumerate
18821
18822 \size small
18823 Double space found.
18824 \end_layout
18825
18826 \begin_layout Enumerate
18827
18828 \size small
18829 You should put punctuation outside inner/inside display math mode.
18830 \end_layout
18831
18832 \begin_layout Enumerate
18833
18834 \size small
18835 You ought to not use primitive TeX in LaTeX code.
18836 \end_layout
18837
18838 \begin_layout Enumerate
18839
18840 \size small
18841 You should remove spaces in front of 
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
18854 \end_layout
18855
18856 \begin_layout Enumerate
18857
18858 \size small
18859 \begin_inset Quotes eld
18860 \end_inset
18861
18862
18863 \family typewriter
18864 %s
18865 \family default
18866
18867 \begin_inset Quotes erd
18868 \end_inset
18869
18870  is normally not followed by 
18871 \begin_inset Quotes eld
18872 \end_inset
18873
18874
18875 \family typewriter
18876 %c
18877 \family default
18878
18879 \begin_inset Quotes erd
18880 \end_inset
18881
18882 .
18883 \end_layout
18884
18885 \begin_layout Standard
18886 In later versions of LyX, we hope to provide a more complete interface to
18887  this tool (and it's smaller cousin 
18888 \family typewriter
18889 lacheck
18890 \family default
18891 ) to exploit the full power of it.
18892  But it's not exactly useless as it is now: go try it on one of your existing
18893  documents of a certain length and be surprised.
18894 \end_layout
18895
18896 \begin_layout Section
18897 Version Control in LyX
18898 \end_layout
18899
18900 \begin_layout Standard
18901 by
18902 \noun on
18903  Lars Gullik Bjønnes 
18904 \noun default
18905 and 
18906 \noun on
18907 Pavel Sanda
18908 \end_layout
18909
18910 \begin_layout Subsection
18911 Introduction
18912 \end_layout
18913
18914 \begin_layout Standard
18915 LyX supports some of the most basic RCS/CVS/SVN commands.
18916  If you need something a bit more sophisticated you will have to do that
18917  manually in a terminal.
18918 \end_layout
18919
18920 \begin_layout Standard
18921 Also note that CVS support is not as good as subversion support so we advise
18922  using SVN instead.
18923  A good place to start learning Subversion is SVN Book
18924 \begin_inset Foot
18925 status open
18926
18927 \begin_layout Plain Layout
18928 \begin_inset CommandInset href
18929 LatexCommand href
18930 target "http://svnbook.red-bean.com/"
18931
18932 \end_inset
18933
18934
18935 \end_layout
18936
18937 \end_inset
18938
18939 .
18940  In the case of RCS you should read 
18941 \begin_inset Quotes eld
18942 \end_inset
18943
18944 rcsintro
18945 \begin_inset Quotes erd
18946 \end_inset
18947
18948  (a man file, read it with 
18949 \family typewriter
18950 man rcsintro
18951 \family default
18952 ).
18953  This file describes all the basic features of RCS.
18954  You should especially notice the comment about a RCS directory, and the
18955  notion of a master RCS file (the file ending in 
18956 \family typewriter
18957 ,v
18958 \family default
18959 ).
18960 \end_layout
18961
18962 \begin_layout Standard
18963 Before you begin to use the version control features in LyX, you should
18964  be familiar with RCS/CVS/SVN usage.
18965  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18966  package—no guarantees are made for older versions.
18967  Most of the log messages are not currently displayed after operations —
18968  you can check them in the Messages pane if unsure.
18969  Regular users of version control will appreciate VC toolbar, which can
18970  be enabled via 
18971 \family sans
18972 View\SpecialChar \menuseparator
18973 Toolbars\SpecialChar \menuseparator
18974 Version
18975 \begin_inset space ~
18976 \end_inset
18977
18978 Control
18979 \family default
18980 .
18981 \end_layout
18982
18983 \begin_layout Standard
18984 For introducing your own external commands consult vc-command in the manual
18985  of LyX functions.
18986 \end_layout
18987
18988 \begin_layout Subsection
18989 RCS commands in LyX
18990 \end_layout
18991
18992 \begin_layout Standard
18993 The following sections describe the RCS commands supported by LyX.
18994  You can find them in the 
18995 \family sans
18996 File\SpecialChar \menuseparator
18997 Version
18998 \begin_inset space ~
18999 \end_inset
19000
19001 Control
19002 \family default
19003  submenu.
19004  LyX was tested against RCS 5.7/5.8
19005 \begin_inset Foot
19006 status open
19007
19008 \begin_layout Plain Layout
19009 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19010  in order to work properly with LyX.
19011  In particular time zone (TZ) should be set and more importantly RCSINIT
19012  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19013  expects archive to be found in file.lyx,v within the original document directory.
19014  See also README shipped with Windows RCS binaries.
19015 \end_layout
19016
19017 \end_inset
19018
19019 .
19020 \end_layout
19021
19022 \begin_layout Subsubsection
19023
19024 \family sans
19025 Register
19026 \end_layout
19027
19028 \begin_layout Standard
19029 If your document is not under revision control, this is the only item shown
19030  in the menu.
19031  And if it is under revision control, the 
19032 \family sans
19033 Register
19034 \family default
19035  item is not visible.
19036  
19037 \end_layout
19038
19039 \begin_layout Standard
19040 This command registers your document with RCS (unless you are under the
19041  directory managed by CVS)\SpecialChar \@.
19042  You are asked interactively to supply an initial
19043  description of the document.
19044  The document is now set in Read-Only mode and you have to 
19045 \family sans
19046 Check
19047 \begin_inset space ~
19048 \end_inset
19049
19050 Out
19051 \begin_inset space ~
19052 \end_inset
19053
19054 For
19055 \begin_inset space ~
19056 \end_inset
19057
19058 Edit
19059 \family default
19060 , before making any changes to it.
19061  A document under revision control has a 
19062 \begin_inset Quotes eld
19063 \end_inset
19064
19065 [RCS:<version> <locker>]
19066 \begin_inset Quotes erd
19067 \end_inset
19068
19069  item tagged to the filename in the minibuffer.
19070 \end_layout
19071
19072 \begin_layout Standard
19073 RCS command that is run: 
19074 \family typewriter
19075 ci -q -u -i -t-"<initial description>" <file-name>
19076 \end_layout
19077
19078 \begin_layout Standard
19079 Read 
19080 \family typewriter
19081 man ci
19082 \family default
19083  to understand the switches.
19084  
19085 \end_layout
19086
19087 \begin_layout Subsubsection
19088
19089 \family sans
19090 Check In Changes
19091 \end_layout
19092
19093 \begin_layout Standard
19094 When you are finished editing a file, you check in your changes.
19095  When you do this, you are asked for a description of the changes.
19096  This is stored in the history log.
19097  The version number is bumped, your changes are applied to the master RCS
19098  file, the document is unlocked and set to Read-Only mode.
19099  
19100 \end_layout
19101
19102 \begin_layout Standard
19103 RCS command: 
19104 \family typewriter
19105 ci -q -u -m"<description>" <file-name>
19106 \end_layout
19107
19108 \begin_layout Subsubsection
19109
19110 \family sans
19111 Check Out For Edit
19112 \end_layout
19113
19114 \begin_layout Standard
19115 By doing this you lock the document so that only you can edit it.
19116  This will also make the document Read-Write only for you.
19117  You will usually continue editing for a while and when you are finished
19118  you check in your changes.
19119  The status line is changed to reflect that you have locked the file.
19120  
19121 \end_layout
19122
19123 \begin_layout Standard
19124 RCS command: 
19125 \family typewriter
19126 co -q -l <file-name>
19127 \end_layout
19128
19129 \begin_layout Subsubsection
19130
19131 \family sans
19132 Revert To Repository Version
19133 \end_layout
19134
19135 \begin_layout Standard
19136 This will discard all changes made to the document since the last check
19137  in.
19138  You get a warning before changes are discarded.
19139 \end_layout
19140
19141 \begin_layout Standard
19142 RCS command: 
19143 \family typewriter
19144 co -f -u<version> <file-name>
19145 \end_layout
19146
19147 \begin_layout Subsubsection
19148
19149 \family sans
19150 Undo Last Checkin
19151 \end_layout
19152
19153 \begin_layout Standard
19154 This makes as if the last check in never happened.
19155  No changes are made to the document loaded into LyX, but the last version
19156  is removed from the master RCS file.
19157  
19158 \end_layout
19159
19160 \begin_layout Standard
19161 RCS command: 
19162 \family typewriter
19163 rcs -o<version> <file-name>
19164 \end_layout
19165
19166 \begin_layout Subsubsection
19167
19168 \family sans
19169 Show History
19170 \end_layout
19171
19172 \begin_layout Standard
19173 This shows the complete history of the RCS document.
19174  The output of 
19175 \family typewriter
19176 rlog <file-name>
19177 \family default
19178  is shown in a browser.
19179  See 
19180 \family typewriter
19181 man rlog
19182 \family default
19183  for more info.
19184 \end_layout
19185
19186 \begin_layout Subsubsection
19187 Revision info
19188 \end_layout
19189
19190 \begin_layout Standard
19191 LyX supports RCS version number, author name, date and time of last commit.
19192  All those are extracted from 
19193 \family typewriter
19194 rlog -r <file-name>
19195 \family default
19196 .
19197  For other details see 
19198 \begin_inset CommandInset ref
19199 LatexCommand ref
19200 reference "sub:VCS-Revision-Information"
19201
19202 \end_inset
19203
19204  for details.
19205 \end_layout
19206
19207 \begin_layout Subsection
19208 CVS commands in LyX
19209 \end_layout
19210
19211 \begin_layout Standard
19212 A subset of CVS operations is supported by LyX.
19213  You can find the commands in the 
19214 \family sans
19215 File\SpecialChar \menuseparator
19216 Version
19217 \begin_inset space ~
19218 \end_inset
19219
19220 Control
19221 \family default
19222  submenu.
19223  The version control system SVN is more powerful, so please use it instead
19224  of CVS if possible.
19225 \end_layout
19226
19227 \begin_layout Subsubsection
19228
19229 \family sans
19230 General CVS usage
19231 \end_layout
19232
19233 \begin_layout Standard
19234 If you start from scratch with CVS you have to create your repository and
19235  checkout the working copy with external tools.
19236  If you're using a client-server setup you may need to login before doing
19237  the first repository checkout.
19238 \end_layout
19239
19240 \begin_layout Standard
19241 If your documents are under revision control and others are using the same
19242  repository problems arise when different changes to the same document at
19243  the same location happen.
19244  Standard CVS repositories doesn't operate with a file locking mechanism.
19245  This may be surprising, but conflicts only occur if people disagree on
19246  the proper content of the same part of a document.
19247  So, if co-workers are used to communicate regularly, these conflicts occur
19248  rarely.
19249  If they don't communicate they have a fundamental problem anyway.
19250  Nevertheless some people like to work with so called 
19251 \begin_inset Quotes eld
19252 \end_inset
19253
19254 reserved checkouts
19255 \begin_inset Quotes erd
19256 \end_inset
19257
19258 .
19259  If they do so the working copy of all files is readonly when checked out
19260  first and the user starts editing after using a special command to make
19261  the working copy writable.
19262  When the changes are checked in the working copy returns to readonly state.
19263  With LyX one has to edit the 
19264 \begin_inset Flex Code
19265 status collapsed
19266
19267 \begin_layout Plain Layout
19268 .cvsrc
19269 \end_layout
19270
19271 \end_inset
19272
19273  file and add the line 
19274 \begin_inset Flex Code
19275 status collapsed
19276
19277 \begin_layout Plain Layout
19278 cvs -r
19279 \end_layout
19280
19281 \end_inset
19282
19283  to work with reserved checkouts.
19284  The benefit is the possibility to see who is using a writable copy of some
19285  document.
19286  It's not guaranteed only one user makes a copy writable.
19287 \end_layout
19288
19289 \begin_layout Standard
19290 LyX tries to guess if you're using reserved or non-reserved checkouts.
19291  If your working copy is readonly or it is writable and an additional copy
19292  of your document exists in the CVS/Base sub-directory a reserved otherwise
19293  a non-reserved checkout is assumed.
19294  When a reserved checkout is detected you have to use 
19295 \begin_inset Flex MenuItem
19296 status collapsed
19297
19298 \begin_layout Plain Layout
19299 Check Out
19300 \end_layout
19301
19302 \end_inset
19303
19304  to make your working copy writable if it's readonly.
19305  After doing so the 
19306 \begin_inset Flex MenuItem
19307 status collapsed
19308
19309 \begin_layout Plain Layout
19310 Check In
19311 \end_layout
19312
19313 \end_inset
19314
19315  operation is possible and that makes your working copy readonly again after
19316  transferring your changes to the repository.
19317 \end_layout
19318
19319 \begin_layout Standard
19320 More information about CVS can be found here 
19321 \begin_inset Flex URL
19322 status collapsed
19323
19324 \begin_layout Plain Layout
19325
19326 http://www.nongnu.org/cvs
19327 \end_layout
19328
19329 \end_inset
19330
19331  and here 
19332 \begin_inset Flex URL
19333 status collapsed
19334
19335 \begin_layout Plain Layout
19336
19337 http://ximbiot.com/cvs
19338 \end_layout
19339
19340 \end_inset
19341
19342 .
19343 \end_layout
19344
19345 \begin_layout Standard
19346 Read 
19347 \family typewriter
19348 man cvs
19349 \family default
19350  to understand the sub-commands and the switches mentioned below.
19351 \end_layout
19352
19353 \begin_layout Subsubsection
19354
19355 \family sans
19356 Register
19357 \end_layout
19358
19359 \begin_layout Standard
19360 If your document is not under revision control, this is the only item shown
19361  in the menu.
19362  And if it is under revision control, the 
19363 \family sans
19364 \bar under
19365 R
19366 \bar default
19367 egister
19368 \family default
19369  item is not visible.
19370  
19371 \end_layout
19372
19373 \begin_layout Standard
19374 This command registers in CVS your document 
19375 \begin_inset Flex Strong
19376 status collapsed
19377
19378 \begin_layout Plain Layout
19379
19380 \emph on
19381 only
19382 \end_layout
19383
19384 \end_inset
19385
19386  in the case you have already the documents directory under CVS control
19387  (in particular 
19388 \family typewriter
19389 CVS/Entries
19390 \family default
19391  file exists).
19392  This means you have to create or checkout the archive by yourself using
19393  external tools.
19394  (In case you forget that step LyX registers the document with RCS.)
19395 \end_layout
19396
19397 \begin_layout Standard
19398 Then you are asked interactively to supply an initial description of the
19399  document.
19400  Don't forget that registered file is not yet checked in.
19401 \end_layout
19402
19403 \begin_layout Standard
19404 CVS command that is run: 
19405 \family typewriter
19406 cvs -q add -m"<entered message>" "<file-name>"
19407 \end_layout
19408
19409 \begin_layout Standard
19410 The term 
19411 \family typewriter
19412 "<file-name>"
19413 \family default
19414  above and for all other CVS commands is an abbreviation for 
19415 \begin_inset Quotes eld
19416 \end_inset
19417
19418 change the current working directory to file location and use the file name
19419  without path component as argument
19420 \begin_inset Quotes erd
19421 \end_inset
19422
19423 .
19424 \end_layout
19425
19426 \begin_layout Subsubsection
19427
19428 \family sans
19429 Check In Changes
19430 \end_layout
19431
19432 \begin_layout Standard
19433 When you are finished editing a file, you commit your changes.
19434  When you do this and you had changed the document, you are asked for a
19435  description of the changes.
19436  After that changes are written to the repository.
19437  In case you didn't change the document and a reserved checkout is detected
19438  the reservation made on 
19439 \begin_inset Flex MenuItem
19440 status collapsed
19441
19442 \begin_layout Plain Layout
19443 Check Out
19444 \end_layout
19445
19446 \end_inset
19447
19448  is undone.
19449 \end_layout
19450
19451 \begin_layout Labeling
19452 \labelwidthstring 00.00.0000
19453 CVS
19454 \begin_inset space ~
19455 \end_inset
19456
19457 command: 
19458 \begin_inset space ~
19459 \end_inset
19460
19461
19462 \begin_inset Newline newline
19463 \end_inset
19464
19465
19466 \begin_inset Flex Code
19467 status collapsed
19468
19469 \begin_layout Plain Layout
19470 cvs 
19471 \family typewriter
19472 -q commit -m"<description>" "<file-name>"
19473 \end_layout
19474
19475 \end_inset
19476
19477  or
19478 \begin_inset Newline newline
19479 \end_inset
19480
19481
19482 \begin_inset Flex Code
19483 status collapsed
19484
19485 \begin_layout Plain Layout
19486 cvs -q unedit 
19487 \family typewriter
19488 "<file-name>"
19489 \end_layout
19490
19491 \end_inset
19492
19493
19494 \end_layout
19495
19496 \begin_layout Subsubsection
19497
19498 \family sans
19499 Check Out Changes
19500 \end_layout
19501
19502 \begin_layout Standard
19503 When you are sharing a repository with others, you may have to incorporate
19504  their changes into your working copy.
19505 \end_layout
19506
19507 \begin_layout Standard
19508 CVS command: 
19509 \family typewriter
19510 cvs -q update "<file-name>"
19511 \end_layout
19512
19513 \begin_layout Standard
19514 If a readonly checkout is detected the working copy is made writable and
19515  reserved.
19516 \end_layout
19517
19518 \begin_layout Standard
19519 CVS command: 
19520 \family typewriter
19521 cvs -q edit "<file-name>"
19522 \end_layout
19523
19524 \begin_layout Subsubsection
19525
19526 \family sans
19527 Revert To Repository Version
19528 \end_layout
19529
19530 \begin_layout Standard
19531 This will discard all changes made to the document since the last check
19532  in.
19533  You get a warning before changes are discarded.
19534  Firstly the file is deleted, secondly CVS update command is run.
19535 \end_layout
19536
19537 \begin_layout Standard
19538 CVS command: 
19539 \family typewriter
19540 cvs -q update "<file-name>"
19541 \end_layout
19542
19543 \begin_layout Standard
19544 If a reserved checkout is detected and the working copy has no changes only
19545  the reservation is undone.
19546 \end_layout
19547
19548 \begin_layout Standard
19549 CVS command: 
19550 \family typewriter
19551 cvs -q unedit "<file-name>"
19552 \end_layout
19553
19554 \begin_layout Subsubsection
19555 Update of the local directory checkout from repository
19556 \end_layout
19557
19558 \begin_layout Standard
19559 Once your documents gets more complex, containing sub-documents and pictures,
19560  including external 
19561 \begin_inset Flex Code
19562 status collapsed
19563
19564 \begin_layout Plain Layout
19565 .tex
19566 \end_layout
19567
19568 \end_inset
19569
19570  files and so on using version control becomes more complicated.
19571  LyX supports updating the whole tree in which resides the document.
19572  This become especially useful once you cooperate with people which neither
19573  have detailed knowledge about CVS usage nor they have ambition to commit
19574  additional material to the repository.
19575  You have to organize the files structure so that all external files are
19576  in the same directory or subdirectories of the document.
19577  It's good practice anyway to store multipart documents in an extra directory.
19578 \end_layout
19579
19580 \begin_layout Standard
19581 The 
19582 \begin_inset Flex Code
19583 status collapsed
19584
19585 \begin_layout Plain Layout
19586 Update local directory from repository
19587 \end_layout
19588
19589 \end_inset
19590
19591  command updates the whole directory.
19592  If local changes are detected user is warned before update starts.
19593  In case of merge conflicts both versions of the conflicting document parts
19594  are placed in the final document.
19595  You have to review and correct the result of the merge.
19596  You'll find the conflicts enclosed in pairs of 
19597 \begin_inset Flex Code
19598 status collapsed
19599
19600 \begin_layout Plain Layout
19601 <<<<<<<
19602 \end_layout
19603
19604 \end_inset
19605
19606  and 
19607 \begin_inset Flex Code
19608 status collapsed
19609
19610 \begin_layout Plain Layout
19611 >>>>>>>
19612 \end_layout
19613
19614 \end_inset
19615
19616  separated by 
19617 \begin_inset Flex Code
19618 status collapsed
19619
19620 \begin_layout Plain Layout
19621 =======
19622 \end_layout
19623
19624 \end_inset
19625
19626 .
19627  The first part is your version as before the update operation with the
19628  document name prepended.
19629  The second one is the repository version with the version number after
19630  the sequence of 
19631 \begin_inset Flex Code
19632 status collapsed
19633
19634 \begin_layout Plain Layout
19635 >
19636 \end_layout
19637
19638 \end_inset
19639
19640  signs.
19641 \end_layout
19642
19643 \begin_layout Labeling
19644 \labelwidthstring 00.00.0000
19645 CVS
19646 \begin_inset space ~
19647 \end_inset
19648
19649 commands: 
19650 \begin_inset space ~
19651 \end_inset
19652
19653
19654 \begin_inset Newline newline
19655 \end_inset
19656
19657
19658 \begin_inset Flex Code
19659 status collapsed
19660
19661 \begin_layout Plain Layout
19662 cd $path; cvs diff 
19663 \family typewriter
19664 "."
19665 \end_layout
19666
19667 \end_inset
19668
19669  (Ask if changes are detected.)
19670 \begin_inset Newline newline
19671 \end_inset
19672
19673
19674 \begin_inset Flex Code
19675 status collapsed
19676
19677 \begin_layout Plain Layout
19678 cd $path; cvs -q update 
19679 \family typewriter
19680 "."
19681 \end_layout
19682
19683 \end_inset
19684
19685
19686 \end_layout
19687
19688 \begin_layout Standard
19689 where 
19690 \begin_inset Flex Code
19691 status collapsed
19692
19693 \begin_layout Plain Layout
19694 $path
19695 \end_layout
19696
19697 \end_inset
19698
19699  stands for the path to the document.
19700 \end_layout
19701
19702 \begin_layout Subsubsection
19703
19704 \family sans
19705 Show History
19706 \end_layout
19707
19708 \begin_layout Standard
19709 This shows the complete history of the CVS document.
19710  The output of 
19711 \family typewriter
19712 cvs log "<file-name>"
19713 \family default
19714  is shown in a browser.
19715 \end_layout
19716
19717 \begin_layout Subsection
19718 SVN commands in LyX
19719 \end_layout
19720
19721 \begin_layout Standard
19722 SVN is now partially supported by LyX.
19723  You can find the commands in the 
19724 \family sans
19725 File\SpecialChar \menuseparator
19726 Version
19727 \begin_inset space ~
19728 \end_inset
19729
19730 Control
19731 \family default
19732  submenu.
19733  Please note that if you use password protected access to repository via
19734  ssh, you will be asked in terminal window.
19735  LyX was tested against SVN 1.5 and 1.6
19736 \begin_inset Foot
19737 status open
19738
19739 \begin_layout Plain Layout
19740 Most of the commands will work with 1.4 too, see 
19741 \begin_inset CommandInset ref
19742 LatexCommand ref
19743 reference "sub:SVN-Repo-Update"
19744
19745 \end_inset
19746
19747 .
19748 \end_layout
19749
19750 \end_inset
19751
19752
19753 \end_layout
19754
19755 \begin_layout Subsubsection
19756
19757 \family sans
19758 Register
19759 \end_layout
19760
19761 \begin_layout Standard
19762 If your document is not under revision control, this is the only item shown
19763  in the menu.
19764  And if it is under revision control, the 
19765 \family sans
19766 \bar under
19767 R
19768 \bar default
19769 egister
19770 \family default
19771  item is not visible.
19772  
19773 \end_layout
19774
19775 \begin_layout Standard
19776 This command registers in SVN your document ONLY in case you have already
19777  the documents directory under SVN control (in particular 
19778 \family typewriter
19779 .svn/entries
19780 \family default
19781  file exists).
19782  This means you have to checkout the archive by yourself.
19783  
19784 \end_layout
19785
19786 \begin_layout Standard
19787 Then you are asked interactively to supply an initial description of the
19788  document.
19789  Don't forget that registered file is not yet commited.
19790 \end_layout
19791
19792 \begin_layout Standard
19793 SVN command that is run: 
19794 \family typewriter
19795 svn add -q 
19796 \begin_inset Quotes eld
19797 \end_inset
19798
19799 <file-name>
19800 \begin_inset Quotes erd
19801 \end_inset
19802
19803
19804 \end_layout
19805
19806 \begin_layout Standard
19807 Read 
19808 \family typewriter
19809 man svn
19810 \family default
19811  to understand the switches.
19812  
19813 \end_layout
19814
19815 \begin_layout Subsubsection
19816
19817 \family sans
19818 Check In Changes
19819 \end_layout
19820
19821 \begin_layout Standard
19822 When you are finished editing a file, you commit your changes.
19823  When you do this, you are asked for a description of the changes.
19824  After that changes are commited.
19825 \end_layout
19826
19827 \begin_layout Standard
19828 SVN command:
19829 \begin_inset Foot
19830 status collapsed
19831
19832 \begin_layout Plain Layout
19833 In case locking is not enabled.
19834  See Section 
19835 \begin_inset CommandInset ref
19836 LatexCommand ref
19837 reference "subsec:SVN-File-Locking"
19838
19839 \end_inset
19840
19841 .
19842 \end_layout
19843
19844 \end_inset
19845
19846  
19847 \family typewriter
19848 svn commit -q -m"<description>" <file-name>
19849 \end_layout
19850
19851 \begin_layout Subsubsection
19852
19853 \family sans
19854 Check Out For Edit
19855 \end_layout
19856
19857 \begin_layout Standard
19858 Updates the changes of this file from the repository.
19859  Be sure you understand SVN merging and conflicts resolving before using
19860  this function, because all conflicts has to be resolved manually by you!
19861 \end_layout
19862
19863 \begin_layout Standard
19864 SVN command:
19865 \begin_inset Foot
19866 status collapsed
19867
19868 \begin_layout Plain Layout
19869 Ditto.
19870 \end_layout
19871
19872 \end_inset
19873
19874  
19875 \family typewriter
19876 svn update --non-interactive 
19877 \begin_inset Quotes eld
19878 \end_inset
19879
19880 <file-name>
19881 \begin_inset Quotes erd
19882 \end_inset
19883
19884
19885 \end_layout
19886
19887 \begin_layout Subsubsection
19888
19889 \family sans
19890 Revert To Repository Version
19891 \end_layout
19892
19893 \begin_layout Standard
19894 This will discard all changes made to the document since the last check
19895  in.
19896  You get a warning before changes are discarded.
19897  
19898 \end_layout
19899
19900 \begin_layout Standard
19901 SVN command: 
19902 \family typewriter
19903 svn revert -q 
19904 \begin_inset Quotes eld
19905 \end_inset
19906
19907 <file-name>
19908 \begin_inset Quotes erd
19909 \end_inset
19910
19911
19912 \end_layout
19913
19914 \begin_layout Subsubsection
19915 \begin_inset CommandInset label
19916 LatexCommand label
19917 name "sub:SVN-Repo-Update"
19918
19919 \end_inset
19920
19921 Update of the local directory checkout from repository
19922 \begin_inset Foot
19923 status collapsed
19924
19925 \begin_layout Plain Layout
19926 Note that this command will work only with subversion 
19927 \begin_inset Formula $\geqq1.5$
19928 \end_inset
19929
19930
19931 \end_layout
19932
19933 \end_inset
19934
19935
19936 \end_layout
19937
19938 \begin_layout Standard
19939 All the commands above have one shortcomming - they deal with the current
19940  document only.
19941  Once your document contains pictures, includes external 
19942 \begin_inset Flex Code
19943 status collapsed
19944
19945 \begin_layout Plain Layout
19946 .tex
19947 \end_layout
19948
19949 \end_inset
19950
19951  files and so on administration becomes more complicated.
19952  LyX now supports updating the whole tree in which resides the document
19953 \begin_inset Foot
19954 status collapsed
19955
19956 \begin_layout Plain Layout
19957 One need to organize the files structure so that all external files are
19958  in the same directory or subdirectories of the document.
19959  
19960 \end_layout
19961
19962 \end_inset
19963
19964 .
19965  This become especially useful once you cooperate with people which neither
19966  know about subversion management nor they have ambition to commit additional
19967  material to the repository.
19968  
19969 \end_layout
19970
19971 \begin_layout Standard
19972 \begin_inset Flex Code
19973 status collapsed
19974
19975 \begin_layout Plain Layout
19976 Update local directory from repository
19977 \end_layout
19978
19979 \end_inset
19980
19981  command updates the whole directory and in case of merge conflicts local
19982  version of the files are left, so no unintended data loss occurs.
19983  If local changes are detected user is warned before update starts.
19984 \end_layout
19985
19986 \begin_layout Labeling
19987 \labelwidthstring 00.00.0000
19988 SVN
19989 \begin_inset space ~
19990 \end_inset
19991
19992 commands: 
19993 \begin_inset space ~
19994 \end_inset
19995
19996
19997 \begin_inset Newline newline
19998 \end_inset
19999
20000
20001 \begin_inset Flex Code
20002 status collapsed
20003
20004 \begin_layout Plain Layout
20005 svn diff $path
20006 \end_layout
20007
20008 \end_inset
20009
20010  (Ask if changes are detected.)
20011 \begin_inset Newline newline
20012 \end_inset
20013
20014
20015 \begin_inset Flex Code
20016 status collapsed
20017
20018 \begin_layout Plain Layout
20019 svn update --accept mine-full $path
20020 \end_layout
20021
20022 \end_inset
20023
20024
20025 \end_layout
20026
20027 \begin_layout Standard
20028 where 
20029 \begin_inset Flex Code
20030 status collapsed
20031
20032 \begin_layout Plain Layout
20033 $path
20034 \end_layout
20035
20036 \end_inset
20037
20038  stands for the path to the document.
20039 \end_layout
20040
20041 \begin_layout Subsubsection
20042
20043 \family sans
20044 Show History
20045 \end_layout
20046
20047 \begin_layout Standard
20048 This shows the complete history of the SVN document.
20049  The output of 
20050 \family typewriter
20051 svn log 
20052 \begin_inset Quotes eld
20053 \end_inset
20054
20055 <file-name>
20056 \begin_inset Quotes erd
20057 \end_inset
20058
20059
20060 \family default
20061  is shown in a browser.
20062 \end_layout
20063
20064 \begin_layout Subsubsection
20065 File Locking
20066 \begin_inset CommandInset label
20067 LatexCommand label
20068 name "subsec:SVN-File-Locking"
20069
20070 \end_inset
20071
20072
20073 \end_layout
20074
20075 \begin_layout Standard
20076 The file exchange through various revision control systems brings the problem
20077  of merge conflicts in case two different users try to edit the same (parts
20078  of) document.
20079  When such a conflict happens it needs manual resolving and one reasonable
20080  alternative is to provide some kind of locking mechanism, which guarantees
20081  that only one user is allowed to edit file at the given time.
20082 \end_layout
20083
20084 \begin_layout Standard
20085 SVN has two such mechanisms to provide mutual exclusivity for file access
20086  - locks and automatic setting of write permissions (see sec.
20087  
20088 \begin_inset CommandInset ref
20089 LatexCommand ref
20090 reference "subsec:Automatical-Locking-Property"
20091
20092 \end_inset
20093
20094 ) based on 
20095 \begin_inset Flex Code
20096 status collapsed
20097
20098 \begin_layout Plain Layout
20099 svn:needs-lock
20100 \end_layout
20101
20102 \end_inset
20103
20104  file svn property
20105 \begin_inset Foot
20106 status open
20107
20108 \begin_layout Plain Layout
20109 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20110 \end_layout
20111
20112 \end_inset
20113
20114 .
20115  If this property is detected for a given document LyX starts to use SVN
20116  locks for document editing automatically and the whole check-in/out mechanism
20117  switches to the same regimen as for RCS.
20118  This in particular means there are two different modes of file use in LyX:
20119 \end_layout
20120
20121 \begin_layout Itemize
20122 Unlocked state.
20123  The loaded file is in the read-only mode.
20124  For editing on needs to check-out.
20125  
20126 \emph on
20127 Check-out
20128 \emph default
20129  consists of updating from the repository and gaining write lock.
20130  If the lock is not possible to obtain, we remain in unlocked state.
20131 \end_layout
20132
20133 \begin_layout Itemize
20134 Locked state.
20135  The loaded file is in the 'normal' edit mode.
20136  No other user is allowed to edit the file.
20137  
20138 \emph on
20139 Check-in
20140 \emph default
20141  consists of commiting changes and releasing write-lock.
20142  If no changes have been made to the document, no commit will be produced
20143 \begin_inset Foot
20144 status collapsed
20145
20146 \begin_layout Plain Layout
20147 Don't be puzzled by the fact that you will be asked for commit message anyway.
20148 \end_layout
20149
20150 \end_inset
20151
20152  and only the write-lock will be released.
20153 \end_layout
20154
20155 \begin_layout Standard
20156 SVN commands:
20157 \end_layout
20158
20159 \begin_layout Labeling
20160 \labelwidthstring 00.00.0000
20161 Check-in:
20162 \family typewriter
20163  svn commit -q -m"<description>" "<file-name>"
20164 \begin_inset Newline newline
20165 \end_inset
20166
20167 svn unlock "<file-name>"
20168 \end_layout
20169
20170 \begin_layout Labeling
20171 \labelwidthstring 00.00.0000
20172 Check-out: 
20173 \family typewriter
20174 svn update "<file-name>"
20175 \begin_inset Newline newline
20176 \end_inset
20177
20178 svn lock "<file-name>"
20179 \end_layout
20180
20181 \begin_layout Subsubsection
20182
20183 \family typewriter
20184 \begin_inset CommandInset label
20185 LatexCommand label
20186 name "subsec:Automatical-Locking-Property"
20187
20188 \end_inset
20189
20190
20191 \family default
20192 Automatic Locking Property
20193 \end_layout
20194
20195 \begin_layout Standard
20196 The above mentioned automatic setting of write permissions of the .lyx file
20197  can be set through
20198 \family sans
20199 \bar under
20200  F
20201 \bar default
20202 ile\SpecialChar \menuseparator
20203
20204 \bar under
20205 V
20206 \bar default
20207 ersion
20208 \begin_inset space ~
20209 \end_inset
20210
20211 Control\SpecialChar \menuseparator
20212
20213 \bar under
20214 T
20215 \bar default
20216 oggle locking property
20217 \family default
20218 .
20219  This command is active only when the file is not locked on the svn server
20220  (i.e.
20221  you need to check-out before proceeding).
20222 \end_layout
20223
20224 \begin_layout Labeling
20225 \labelwidthstring 00.00.0000
20226 SVN
20227 \begin_inset space ~
20228 \end_inset
20229
20230 commands:
20231 \end_layout
20232
20233 \begin_layout Labeling
20234 \labelwidthstring 00.00.0000
20235 Set:
20236 \family typewriter
20237  svn propset svn:needs-lock ON "<file-name>"
20238 \end_layout
20239
20240 \begin_layout Labeling
20241 \labelwidthstring 00.00.0000
20242 Unset: 
20243 \family typewriter
20244 svn propdel svn:needs-lock "<file-name>"
20245 \end_layout
20246
20247 \begin_layout Subsubsection
20248 \begin_inset CommandInset label
20249 LatexCommand label
20250 name "sub:VCS-Revision-Information"
20251
20252 \end_inset
20253
20254 Revision Information in Documents
20255 \end_layout
20256
20257 \begin_layout Standard
20258 There are more possibilities how to activate revision information in our
20259  document.
20260 \end_layout
20261
20262 \begin_layout Itemize
20263 LyX supports directly:
20264 \end_layout
20265
20266 \begin_deeper
20267 \begin_layout Itemize
20268 tree revision information (
20269 \begin_inset Flex Code
20270 status collapsed
20271
20272 \begin_layout Plain Layout
20273 vcs-tree-revision
20274 \end_layout
20275
20276 \end_inset
20277
20278 ).
20279  The result is the output of the 
20280 \begin_inset Flex Code
20281 status collapsed
20282
20283 \begin_layout Plain Layout
20284 svnversion
20285 \end_layout
20286
20287 \end_inset
20288
20289  command, the following table gives you an idea, how to read the results.
20290 \end_layout
20291
20292 \begin_layout Standard
20293 \align center
20294 \begin_inset Tabular
20295 <lyxtabular version="3" rows="6" columns="2">
20296 <features rotate="0" tabularvalignment="middle">
20297 <column alignment="center" valignment="top" width="0">
20298 <column alignment="center" valignment="top" width="0">
20299 <row>
20300 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20301 \begin_inset Text
20302
20303 \begin_layout Plain Layout
20304 Output
20305 \end_layout
20306
20307 \end_inset
20308 </cell>
20309 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20310 \begin_inset Text
20311
20312 \begin_layout Plain Layout
20313 Meaning
20314 \end_layout
20315
20316 \end_inset
20317 </cell>
20318 </row>
20319 <row>
20320 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20321 \begin_inset Text
20322
20323 \begin_layout Plain Layout
20324 4123:4168
20325 \end_layout
20326
20327 \end_inset
20328 </cell>
20329 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20330 \begin_inset Text
20331
20332 \begin_layout Plain Layout
20333 mixed revision working copy
20334 \end_layout
20335
20336 \end_inset
20337 </cell>
20338 </row>
20339 <row>
20340 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20341 \begin_inset Text
20342
20343 \begin_layout Plain Layout
20344 4168M
20345 \end_layout
20346
20347 \end_inset
20348 </cell>
20349 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20350 \begin_inset Text
20351
20352 \begin_layout Plain Layout
20353 modified working copy
20354 \end_layout
20355
20356 \end_inset
20357 </cell>
20358 </row>
20359 <row>
20360 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20361 \begin_inset Text
20362
20363 \begin_layout Plain Layout
20364 4123S
20365 \end_layout
20366
20367 \end_inset
20368 </cell>
20369 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20370 \begin_inset Text
20371
20372 \begin_layout Plain Layout
20373 switched working copy
20374 \end_layout
20375
20376 \end_inset
20377 </cell>
20378 </row>
20379 <row>
20380 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20381 \begin_inset Text
20382
20383 \begin_layout Plain Layout
20384 4123P
20385 \end_layout
20386
20387 \end_inset
20388 </cell>
20389 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20390 \begin_inset Text
20391
20392 \begin_layout Plain Layout
20393 partial working copy, from a sparse checkout
20394 \end_layout
20395
20396 \end_inset
20397 </cell>
20398 </row>
20399 <row>
20400 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20401 \begin_inset Text
20402
20403 \begin_layout Plain Layout
20404 4123:4168MS
20405 \end_layout
20406
20407 \end_inset
20408 </cell>
20409 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20410 \begin_inset Text
20411
20412 \begin_layout Plain Layout
20413 mixed revision, modified, switched working copy
20414 \end_layout
20415
20416 \end_inset
20417 </cell>
20418 </row>
20419 </lyxtabular>
20420
20421 \end_inset
20422
20423
20424 \end_layout
20425
20426 \begin_layout Itemize
20427 file revision information.
20428  The result comes from parsing the output of 
20429 \begin_inset Flex Code
20430 status collapsed
20431
20432 \begin_layout Plain Layout
20433 svn
20434 \begin_inset space ~
20435 \end_inset
20436
20437 info
20438 \begin_inset space ~
20439 \end_inset
20440
20441 --xml
20442 \begin_inset space ~
20443 \end_inset
20444
20445 file.lyx
20446 \end_layout
20447
20448 \end_inset
20449
20450 .
20451  Supported flags are:
20452 \end_layout
20453
20454 \begin_deeper
20455 \begin_layout Itemize
20456 version number of the last commit (
20457 \begin_inset Flex Code
20458 status collapsed
20459
20460 \begin_layout Plain Layout
20461 vcs-revision
20462 \end_layout
20463
20464 \end_inset
20465
20466 )
20467 \end_layout
20468
20469 \begin_layout Itemize
20470 author of the last commit (
20471 \begin_inset Flex Code
20472 status collapsed
20473
20474 \begin_layout Plain Layout
20475 vcs-author
20476 \end_layout
20477
20478 \end_inset
20479
20480 )
20481 \end_layout
20482
20483 \begin_layout Itemize
20484 date of the last commit (
20485 \begin_inset Flex Code
20486 status collapsed
20487
20488 \begin_layout Plain Layout
20489 vcs-date
20490 \end_layout
20491
20492 \end_inset
20493
20494 )
20495 \end_layout
20496
20497 \begin_layout Itemize
20498 time of the last commit (
20499 \begin_inset Flex Code
20500 status collapsed
20501
20502 \begin_layout Plain Layout
20503 vcs-time
20504 \end_layout
20505
20506 \end_inset
20507
20508 )
20509 \end_layout
20510
20511 \end_deeper
20512 \begin_layout Standard
20513 You can obtain this info via InsetInfo (e.g.
20514  
20515 \begin_inset Flex Code
20516 status collapsed
20517
20518 \begin_layout Plain Layout
20519 info-insert buffer vcs-date
20520 \end_layout
20521
20522 \end_inset
20523
20524 ).
20525  The information will be available only when you have the file stored under
20526  svn managment (i.e.
20527  the 
20528 \begin_inset Flex Code
20529 status collapsed
20530
20531 \begin_layout Plain Layout
20532 .svn
20533 \end_layout
20534
20535 \end_inset
20536
20537  directory is available with your document).
20538 \end_layout
20539
20540 \end_deeper
20541 \begin_layout Itemize
20542 Another---a hacking one---possibility is to use svn keywords
20543 \begin_inset Foot
20544 status collapsed
20545
20546 \begin_layout Plain Layout
20547 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20548 \end_layout
20549
20550 \end_inset
20551
20552 .
20553  In short -- you set file keywords property (e.g.
20554  
20555 \family sans
20556 svn propset svn:keywords 'Rev' file.lyx
20557 \family default
20558 ) and then paste keyword TeX code
20559 \begin_inset Foot
20560 status collapsed
20561
20562 \begin_layout Plain Layout
20563 This is an easy way how to ensure that LyX won't break the line in the middle
20564  of keyword tag.
20565 \end_layout
20566
20567 \end_inset
20568
20569  tag in your document (e.g.
20570  
20571 \begin_inset ERT
20572 status open
20573
20574 \begin_layout Plain Layout
20575
20576 $Rev$
20577 \end_layout
20578
20579 \end_inset
20580
20581 ).
20582  This way svn client will automatically substitute revision number (e.g.
20583  
20584 \begin_inset ERT
20585 status open
20586
20587 \begin_layout Plain Layout
20588
20589 $Rev: 59 $
20590 \end_layout
20591
20592 \end_inset
20593
20594 ) after each update and commit.
20595  There are more problems with this approach.
20596  Firstly, the '$' character is used in TeX world for math equations, so
20597  any occurence of math formula 
20598 \begin_inset Formula $Rev$
20599 \end_inset
20600
20601  become 
20602 \begin_inset Formula $Rev:59$
20603 \end_inset
20604
20605  in your LyX document.
20606  Similarly for other keywords like Id, Date, Author, etc.
20607  Secondly svn output is dependent on your locales, so its very easy that
20608  svn would produce some problematic strings once Date is used.
20609  Thirdly you get the whole 'Rev: 59' string in your document instead of
20610  the plain number.
20611  Until subversion implements user's custom keywords it will be hard to use
20612  this approach reliably or let LyX to support it directly.
20613 \end_layout
20614
20615 \begin_layout Subsection
20616 SVN and Windows Environment
20617 \end_layout
20618
20619 \begin_layout Quote
20620 My inclination is to say that if the user cannot figure out the command
20621  line operations on their own fairly quickly, they would be well advised
20622  to use TortoiseSVN.
20623  ---P.
20624  A.
20625  Rubin
20626 \end_layout
20627
20628 \begin_layout Subsubsection
20629 Preparation
20630 \end_layout
20631
20632 \begin_layout Standard
20633 In addition to installing LyX, and having access to a Subversion repository,
20634  the user will need to install the Subversion client program.
20635  A Windows installer for the client program is available from 
20636 \begin_inset CommandInset href
20637 LatexCommand href
20638 name "CollabNet"
20639 target "http://www.collab.net/nonav/downloads/subversion/"
20640
20641 \end_inset
20642
20643 .
20644  The user may also want to install 
20645 \begin_inset CommandInset href
20646 LatexCommand href
20647 name "TortoiseSVN"
20648 target "http://tortoisesvn.tigris.org/"
20649
20650 \end_inset
20651
20652 , which integrates Subversion operations into the context (rightclick) menu
20653  of Windows Explorer.
20654  Operations done outside LyX will typically be more convenient using the
20655  Explorer context menu.
20656  Note that TortoiseSVN is not a replacement for the client program, which
20657  is what LyX itself will use.
20658 \end_layout
20659
20660 \begin_layout Subsubsection
20661 Bringing a document under Subversion control
20662 \end_layout
20663
20664 \begin_layout Standard
20665 Before a LyX document can be brought under version control in Subversion,
20666  its parent directory needs to be under version control.
20667  If the document is being added to a project already in the repository,
20668  this is accomplished by checking the project out to the directory where
20669  the new document will be placed.
20670  If the project itself is not yet under version control (for instance, if
20671  this document starts a new project), the directory must be imported into
20672  the repository.
20673  This is done outside LyX.
20674  Both import and checkout are easily accomplished from the Explorer context
20675  menu using TortoiseSVN, or alternatively can be done using the command
20676  line client at a DOS prompt.
20677  The procedure for importing the project using TortoiseSVN is described
20678  below, assuming an existing repository and a new project being started
20679  in 
20680 \family typewriter
20681 C:
20682 \backslash
20683 new project
20684 \family default
20685 .
20686  For information on using the Subversion client program, run 
20687 \family typewriter
20688 svn --help 
20689 \family default
20690 in a DOS shell.
20691 \end_layout
20692
20693 \begin_layout Enumerate
20694 Locate 
20695 \family typewriter
20696 C:
20697 \backslash
20698 new project 
20699 \family default
20700 in Windows Explorer, right click it, and select 
20701 \family typewriter
20702 TortoiseSVN > Repo-browser
20703 \family default
20704 .
20705  If necessary, adjust the URL for the repository, then click OK.
20706 \end_layout
20707
20708 \begin_layout Enumerate
20709 Right click the level of the repository under which you want to place the
20710  new project folder (typically the top level) and click 
20711 \family typewriter
20712 Create folder\SpecialChar \ldots{}
20713
20714 \family default
20715  Supply a name for the project folder and click OK.
20716  Add a message for the log file if desired, then click OK again.
20717  The new project folder should appear in the repository.
20718  Finally, click OK again to exit the repository browser.
20719 \end_layout
20720
20721 \begin_layout Enumerate
20722 Once again right click 
20723 \family typewriter
20724 C:
20725 \backslash
20726 new project
20727 \family default
20728 , this time selecting SVN Checkout\SpecialChar \ldots{}
20729  Select the URL of the project folder
20730  you just created in the repository, and set the checkout directory to 
20731 \family typewriter
20732 C:
20733 \backslash
20734 new project.
20735
20736 \family default
20737  Click OK.
20738  You will be warned about a non-empty folder; click OK to proceed.
20739  You should now have a 
20740 \family typewriter
20741 .svn
20742 \family default
20743  directory under 
20744 \family typewriter
20745 C:
20746 \backslash
20747 new project.
20748 \end_layout
20749
20750 \begin_layout Enumerate
20751 Create or open your document in LyX and click 
20752 \family sans
20753 \bar under
20754 F
20755 \bar default
20756 ile\SpecialChar \menuseparator
20757
20758 \bar under
20759 V
20760 \bar default
20761 ersion
20762 \begin_inset space ~
20763 \end_inset
20764
20765 Control\SpecialChar \menuseparator
20766
20767 \bar under
20768 R
20769 \bar default
20770 egister.
20771  
20772 \family default
20773 Add a log message and click OK to commit the document to version control.
20774 \end_layout
20775
20776 \begin_layout Standard
20777 From this point onward, you should have full functionality in the 
20778 \family sans
20779 \bar under
20780 F
20781 \bar default
20782 ile\SpecialChar \menuseparator
20783
20784 \bar under
20785 V
20786 \bar default
20787 ersion
20788 \begin_inset space ~
20789 \end_inset
20790
20791 Control
20792 \family default
20793  menu.
20794  You also have the option of checking the document in and out, viewing its
20795  history, etc.
20796  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20797  client program from a command prompt.
20798 \end_layout
20799
20800 \begin_layout Subsubsection
20801 SSH tunnel used with SVN under Windows
20802 \end_layout
20803
20804 \begin_layout Standard
20805 Compared with Linux setting up an svn client to communicate over ssh under
20806  Windows is a rather troublesome task.
20807  We will at least offer some hints how to setup the client side but prior
20808  knowledge about ssh and the Windows command line is needed, also be prepared
20809  for a great deal of frustration\SpecialChar \ldots{}
20810
20811 \end_layout
20812
20813 \begin_layout Enumerate
20814 Get an svn client for windows, as described in the previous sections.
20815  When it is a fresh install run some svn command (e.g.
20816  
20817 \begin_inset Flex Code
20818 status collapsed
20819
20820 \begin_layout Plain Layout
20821 svn --version
20822 \end_layout
20823
20824 \end_inset
20825
20826 ) to create config files, which you will need to change later on.
20827 \end_layout
20828
20829 \begin_layout Enumerate
20830 Choose an ssh client for Windows.
20831  There are several possibilities, we will use the one from Putty tools
20832 \begin_inset Foot
20833 status open
20834
20835 \begin_layout Plain Layout
20836 \begin_inset Flex URL
20837 status collapsed
20838
20839 \begin_layout Plain Layout
20840
20841 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20842 \end_layout
20843
20844 \end_inset
20845
20846
20847 \end_layout
20848
20849 \end_inset
20850
20851 .
20852  You will need to set the connection up so that the client doesn't ask for
20853  any password from you.
20854  To keep things easy we will use only keys without any additional password
20855  protection etc.
20856 \end_layout
20857
20858 \begin_deeper
20859 \begin_layout Enumerate
20860 Generate keys by 
20861 \begin_inset Flex Code
20862 status collapsed
20863
20864 \begin_layout Plain Layout
20865 puttygen
20866 \end_layout
20867
20868 \end_inset
20869
20870 .
20871  Save your private .ppk key file and put the public one on the server side.
20872  If the SVN server runs on Linux, note that the format of the public key
20873  is not compatible with Linux openssh and you will need to direcly copy-paste
20874  the key from the “
20875 \emph on
20876 Public key for pasting into OpenSSH authorized_keys file
20877 \emph default
20878 :” edit field into the server's 
20879 \begin_inset Flex Code
20880 status collapsed
20881
20882 \begin_layout Plain Layout
20883 ~/.ssh/authorized_keys
20884 \end_layout
20885
20886 \end_inset
20887
20888  / 
20889 \begin_inset Flex Code
20890 status collapsed
20891
20892 \begin_layout Plain Layout
20893 authorized_keys2
20894 \end_layout
20895
20896 \end_inset
20897
20898  file.
20899 \end_layout
20900
20901 \begin_layout Enumerate
20902 Get the Putty's 
20903 \begin_inset Flex Code
20904 status collapsed
20905
20906 \begin_layout Plain Layout
20907 plink
20908 \end_layout
20909
20910 \end_inset
20911
20912 .
20913  In the SVN config file
20914 \begin_inset Foot
20915 status collapsed
20916
20917 \begin_layout Plain Layout
20918 Exact path depends on Windows version, usually somewhere around 
20919 \begin_inset Flex Code
20920 status collapsed
20921
20922 \begin_layout Plain Layout
20923 c:
20924 \backslash
20925 Documents and Settings
20926 \backslash
20927 user
20928 \backslash
20929 Application Data
20930 \backslash
20931 Subversion
20932 \backslash
20933 config
20934 \end_layout
20935
20936 \end_inset
20937
20938  / 
20939 \begin_inset Flex Code
20940 status collapsed
20941
20942 \begin_layout Plain Layout
20943 AppData
20944 \backslash
20945 Roaming
20946 \backslash
20947 Subversion
20948 \end_layout
20949
20950 \end_inset
20951
20952 .
20953 \end_layout
20954
20955 \end_inset
20956
20957 , section [tunnels], setup ssh command, e.g.
20958  
20959 \begin_inset Flex Code
20960 status collapsed
20961
20962 \begin_layout Plain Layout
20963 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20964 \end_layout
20965
20966 \end_inset
20967
20968 .
20969 \begin_inset Foot
20970 status collapsed
20971
20972 \begin_layout Plain Layout
20973 It will usually take a lot of time to get exact command right and it depends
20974  on many things.
20975  For example do not have some remote server saved as a default session in
20976  Putty etc.
20977  If things fail, try to connect via plink without SVN first.
20978 \end_layout
20979
20980 \end_inset
20981
20982
20983 \end_layout
20984
20985 \end_deeper
20986 \begin_layout Enumerate
20987 Checkout the SVN archive, e.g.
20988  
20989 \begin_inset Flex Code
20990 status collapsed
20991
20992 \begin_layout Plain Layout
20993 svn co svn+ssh://user@server/repository_path
20994 \end_layout
20995
20996 \end_inset
20997
20998 .
20999 \end_layout
21000
21001 \begin_layout Subsubsection
21002 End-of-Line Conversions
21003 \end_layout
21004
21005 \begin_layout Standard
21006 When the collaborators are mixing Linux and Windows environments, LyX will
21007  use different line endings inside the .lyx files.
21008  This is not a problem as far as LyX functionality is concerned, but the
21009  commit diffs will be huge and merge-conflicts prone.
21010  Fortunately SVN itself knows
21011 \begin_inset Foot
21012 status collapsed
21013
21014 \begin_layout Plain Layout
21015 \begin_inset Flex URL
21016 status collapsed
21017
21018 \begin_layout Plain Layout
21019
21020 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21021 \end_layout
21022
21023 \end_inset
21024
21025
21026 \end_layout
21027
21028 \end_inset
21029
21030  how to deal with CR/LF problems when switching .lyx files to the 
21031 \begin_inset Flex Code
21032 status collapsed
21033
21034 \begin_layout Plain Layout
21035 native
21036 \end_layout
21037
21038 \end_inset
21039
21040  mode.
21041 \begin_inset Foot
21042 status collapsed
21043
21044 \begin_layout Plain Layout
21045 For the lazy guys: 
21046 \begin_inset Flex Code
21047 status collapsed
21048
21049 \begin_layout Plain Layout
21050 svn propset svn:eol-style native FILE_NAME
21051 \end_layout
21052
21053 \end_inset
21054
21055
21056 \end_layout
21057
21058 \end_inset
21059
21060
21061 \end_layout
21062
21063 \begin_layout Subsection
21064 Further tuning
21065 \end_layout
21066
21067 \begin_layout Standard
21068 With the recent addition of the vc-command function LyX power users are
21069  allowed to create their own commands for revision control.
21070 \end_layout
21071
21072 \begin_layout Standard
21073 As an example you can see how two TortoiseSVN commands could be integrated
21074  directly:
21075 \end_layout
21076
21077 \begin_layout Description
21078 Commit: 
21079 \begin_inset Flex Code
21080 status collapsed
21081
21082 \begin_layout Plain Layout
21083 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21084 \end_layout
21085
21086 \end_inset
21087
21088
21089 \end_layout
21090
21091 \begin_layout Description
21092 Revert: 
21093 \begin_inset Flex Code
21094 status collapsed
21095
21096 \begin_layout Plain Layout
21097 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21098 \end_layout
21099
21100 \end_inset
21101
21102
21103 \end_layout
21104
21105 \begin_layout Subsection
21106 Version control and Document comparison
21107 \end_layout
21108
21109 \begin_layout Standard
21110 One of the typical uses of version control is to inspect the changes between
21111  revisions, usually by creating 
21112 \begin_inset Flex Code
21113 status collapsed
21114
21115 \begin_layout Plain Layout
21116 diff
21117 \end_layout
21118
21119 \end_inset
21120
21121  dumps.
21122  While this is useful for plain text files, it is much less useful in the
21123  case of LyX files, which have more a complicated structure.
21124  Hence we provide binding to the Document comparison feature.
21125  There are two ways of calling this feature - either by direct call of 
21126 \begin_inset Flex Code
21127 status collapsed
21128
21129 \begin_layout Plain Layout
21130 VC_COMPARE
21131 \end_layout
21132
21133 \end_inset
21134
21135  LyX function (for details see LyX functions manual) or by icon/menu item
21136  
21137 \begin_inset Flex MenuItem
21138 status collapsed
21139
21140 \begin_layout Plain Layout
21141 Compare with older revision...
21142 \end_layout
21143
21144 \end_inset
21145
21146 .
21147  One can either compare two chosen revisions of the document or he can simply
21148  compare the current version of edited text with older revisions (where
21149  '
21150 \begin_inset Flex MenuItem
21151 status collapsed
21152
21153 \begin_layout Plain Layout
21154 0
21155 \end_layout
21156
21157 \end_inset
21158
21159 ' revisions back means comparison of the edited file with last commited
21160  revision).
21161  
21162 \end_layout
21163
21164 \begin_layout Standard
21165 This feature is supported for SVN and RCS though due to the more complicated
21166  versioning scheme of RCS there is a constraint -- when addressing the revisions
21167  in dialog, numbers always point to the last number in RCS revision number,
21168  i.e.
21169  '35' in '1.2.35'.
21170 \end_layout
21171
21172 \begin_layout Section
21173 Literate Programming
21174 \end_layout
21175
21176 \begin_layout Standard
21177 Updated by 
21178 \noun on
21179 Kayvan Sylvan 
21180 \noun default
21181 (kayvan@sylvan.com)
21182 \noun on
21183
21184 \noun default
21185 original documentation written by 
21186 \noun on
21187 Edmar Wienskoski Jr.
21188
21189 \noun default
21190  (edmar-w-jr@technologist.com)
21191 \end_layout
21192
21193 \begin_layout Subsection
21194 Introduction
21195 \end_layout
21196
21197 \begin_layout Standard
21198 The main purpose of this documentation is to show you how to use LyX for
21199  literate programming, where it is assumed that you are familiar with this
21200  programming technique, and know what 
21201 \begin_inset Quotes eld
21202 \end_inset
21203
21204 tangling
21205 \begin_inset Quotes erd
21206 \end_inset
21207
21208  and 
21209 \begin_inset Quotes eld
21210 \end_inset
21211
21212 weaving
21213 \begin_inset Quotes erd
21214 \end_inset
21215
21216  means.
21217  If that is not the case, please follow the web links provided in the following
21218  sections.
21219  There is a lot of good documentation out there covering old development
21220  history to the latest tools tips.
21221 \end_layout
21222
21223 \begin_layout Standard
21224 It is also assumed that you are familiar with LyX itself to a point that
21225  you are comfortable changing your LyX preferences, and X resources file.
21226  If that is not the case please refer to other LyX documentation to cover
21227  your specific needs.
21228 \end_layout
21229
21230 \begin_layout Subsection
21231 Literate Programming
21232 \end_layout
21233
21234 \begin_layout Standard
21235 From the Literate Programming FAQ: 
21236 \end_layout
21237
21238 \begin_layout Quotation
21239 Literate programming is the combination of documentation and source together
21240  in a fashion suited for reading by human beings.
21241  In fact, literate programs should be enjoyable reading, even inviting!
21242  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21243  and documentation in a single file.
21244  Literate programming tools then parse the file to produce either readable
21245  documentation or compilable source.
21246  The WEB style of literate programming was created by D.
21247 \begin_inset space \thinspace{}
21248 \end_inset
21249
21250 E.
21251  Knuth during the development of his TeX typesetting software.
21252  
21253 \end_layout
21254
21255 \begin_layout Standard
21256 Another excerpt says:
21257 \end_layout
21258
21259 \begin_layout Quotation
21260
21261 \emph on
21262 How is literate programming different from verbose commenting?
21263 \end_layout
21264
21265 \begin_layout Quotation
21266 There are three distinguishing characteristics.
21267  In order of importance, they are: 
21268 \end_layout
21269
21270 \begin_deeper
21271 \begin_layout Itemize
21272 flexible order of elaboration 
21273 \end_layout
21274
21275 \begin_layout Itemize
21276 automatic support for browsing 
21277 \end_layout
21278
21279 \begin_layout Itemize
21280 typeset documentation, especially diagrams and mathematics 
21281 \end_layout
21282
21283 \end_deeper
21284 \begin_layout Standard
21285 Now that I sparked your curiosity, take a look in the references.
21286 \end_layout
21287
21288 \begin_layout Subsubsection
21289 References
21290 \end_layout
21291
21292 \begin_layout Standard
21293 The complete Literate Programming FAQ can be found at:
21294 \end_layout
21295
21296 \begin_layout Quote
21297 Literate Programming FAQ 
21298 \begin_inset Flex URL
21299 status collapsed
21300
21301 \begin_layout Plain Layout
21302
21303 http://www.literateprogramming.com/lpfaq.pdf
21304 \end_layout
21305
21306 \end_inset
21307
21308
21309 \end_layout
21310
21311 \begin_layout Standard
21312 The FAQ lists 23 (twenty three!) different literate programming tools.
21313  Where some are specialized or 
21314 \begin_inset Quotes eld
21315 \end_inset
21316
21317 tailored
21318 \begin_inset Quotes erd
21319 \end_inset
21320
21321  for particular programming languages, while other have general scope.
21322  I selected 
21323 \noun on
21324 Noweb
21325 \noun default
21326  for my own use for several reasons:
21327 \end_layout
21328
21329 \begin_layout Itemize
21330 It can generate the documentation either in LaTeX or HTML.
21331 \end_layout
21332
21333 \begin_layout Itemize
21334 It has a open architecture, i.
21335 \begin_inset space \thinspace{}
21336 \end_inset
21337
21338 e.
21339 \begin_inset space \space{}
21340 \end_inset
21341
21342 it is easy to plug in new filters and to perform special processing that
21343  you may need.
21344  
21345 \end_layout
21346
21347 \begin_layout Itemize
21348 There is a good selection of filters available already (the HTML is one
21349  of them).
21350 \end_layout
21351
21352 \begin_layout Itemize
21353 It is free.
21354 \end_layout
21355
21356 \begin_layout Standard
21357 The Noweb web page can be found at: 
21358 \end_layout
21359
21360 \begin_layout Quote
21361 Noweb home page 
21362 \begin_inset Flex URL
21363 status collapsed
21364
21365 \begin_layout Plain Layout
21366
21367 http://www.cs.virginia.edu/~nr/noweb/
21368 \end_layout
21369
21370 \end_inset
21371
21372
21373 \end_layout
21374
21375 \begin_layout Standard
21376 Starting from there you can reach many other interesting links and even
21377  some literate program examples.
21378 \end_layout
21379
21380 \begin_layout Subsection
21381 LyX and Literate Programming
21382 \end_layout
21383
21384 \begin_layout Standard
21385 The LyX support for Literate Programming is provided by using the generic
21386  LyX converters mechanism.
21387  This support is provided in a 
21388 \begin_inset Quotes eld
21389 \end_inset
21390
21391 Noweb independent
21392 \begin_inset Quotes erd
21393 \end_inset
21394
21395  way, i.
21396 \begin_inset space \thinspace{}
21397 \end_inset
21398
21399 e.
21400 \begin_inset space \space{}
21401 \end_inset
21402
21403 you will be able to use this new LyX feature with some other literate programmin
21404 g tool of your choice by just changing your LyX preferences.
21405 \end_layout
21406
21407 \begin_layout Subsubsection
21408 Generating documents and code (weaving and tangling)
21409 \end_layout
21410
21411 \begin_layout Paragraph
21412 Selecting the document class
21413 \end_layout
21414
21415 \begin_layout Standard
21416 If you have installed Noweb and LyX successfully, whenever you open a new
21417  document or try to change the document class of an existing one, you will
21418  find that there are three new document classes available:
21419 \end_layout
21420
21421 \begin_layout Itemize
21422 Article (Noweb)
21423 \end_layout
21424
21425 \begin_layout Itemize
21426 Book (Noweb)
21427 \end_layout
21428
21429 \begin_layout Itemize
21430 Report (Noweb)
21431 \end_layout
21432
21433 \begin_layout Standard
21434 You must select one of them to create your literate documents from.
21435  
21436 \end_layout
21437
21438 \begin_layout Standard
21439 Note that literate documents are not limited to these three classes.
21440  New classes can be generated from other styles like letter or in combination
21441  with other class variations like Article (AMS).
21442  If you have special needs that cannot be covered by one of the existing
21443  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21444  will arrange to insert a new entry, or teach you how to do it.
21445 \begin_inset Foot
21446 status collapsed
21447
21448 \begin_layout Plain Layout
21449 It is very simple, it involves the creation of a file with four lines, and
21450  re-running of the auto configuration.
21451 \end_layout
21452
21453 \end_inset
21454
21455  Moreover, if you use a literate tool other than Noweb you may need to create
21456  a new set of document classes for it.
21457 \end_layout
21458
21459 \begin_layout Paragraph
21460 Typing code in
21461 \end_layout
21462
21463 \begin_layout Standard
21464 LyX enables you to write code with a layout named 
21465 \noun on
21466 Scrap
21467 \noun default
21468 .
21469 \begin_inset Foot
21470 status collapsed
21471
21472 \begin_layout Plain Layout
21473 The equivalent Noweb term is 
21474 \begin_inset Quotes eld
21475 \end_inset
21476
21477 Chunk
21478 \begin_inset Quotes erd
21479 \end_inset
21480
21481 .
21482  For historical reasons, I got used to the term 
21483 \begin_inset Quotes eld
21484 \end_inset
21485
21486 scrap
21487 \begin_inset Quotes erd
21488 \end_inset
21489
21490  introduced by other literate tool named Nuweb, which I used for many years
21491  before rendering myself to Noweb.
21492 \end_layout
21493
21494 \end_inset
21495
21496  Noweb delimits scraps like this:
21497 \end_layout
21498
21499 \begin_layout LyX-Code
21500 <<My scrap>>=
21501 \end_layout
21502
21503 \begin_layout LyX-Code
21504   code
21505 \end_layout
21506
21507 \begin_layout LyX-Code
21508   more code
21509 \end_layout
21510
21511 \begin_layout LyX-Code
21512   even more code
21513 \end_layout
21514
21515 \begin_layout LyX-Code
21516   @
21517 \end_layout
21518
21519 \begin_layout Standard
21520 The problem is that whatever is written in between the << and the 
21521 \family typewriter
21522 @
21523 \family default
21524  must be taken literally, i.
21525 \begin_inset space \thinspace{}
21526 \end_inset
21527
21528 e.
21529 \begin_inset space \space{}
21530 \end_inset
21531
21532 LyX should be prevented from making any special interpretation of what has
21533  been written.
21534  This is handled by a special layout named Scrap, that works like a normal
21535  paragraph but has a free spacing capability.
21536 \end_layout
21537
21538 \begin_layout Standard
21539 The down side of the Scrap paragraph layout is that consecutive paragraphs
21540  of code will be spaced with one empty line in the source code and also
21541  in the printed documentation.
21542  The work around is to enter each line of code within a single Scrap, with
21543  a newline (ctrl-return).
21544  The example above will look like this:
21545 \begin_inset Foot
21546 status collapsed
21547
21548 \begin_layout Plain Layout
21549 If you have a printed version of this document you will not see any difference
21550  between the previous example and this one.
21551 \end_layout
21552
21553 \end_inset
21554
21555
21556 \end_layout
21557
21558 \begin_layout LyX-Code
21559 <<My scrap>>=
21560 \begin_inset Newline newline
21561 \end_inset
21562
21563   code
21564 \begin_inset Newline newline
21565 \end_inset
21566
21567   more code
21568 \begin_inset Newline newline
21569 \end_inset
21570
21571   even more code
21572 \begin_inset Newline newline
21573 \end_inset
21574
21575   @
21576 \end_layout
21577
21578 \begin_layout Standard
21579 This layout works fine.
21580  The only real inconvenience is that you have to type ctrl-return instead
21581  of a plain return.
21582 \begin_inset Foot
21583 status collapsed
21584
21585 \begin_layout Plain Layout
21586 It is in my list of 
21587 \begin_inset Quotes eld
21588 \end_inset
21589
21590 improvements
21591 \begin_inset Quotes erd
21592 \end_inset
21593
21594  to fix that.
21595 \end_layout
21596
21597 \end_inset
21598
21599
21600 \end_layout
21601
21602 \begin_layout Standard
21603 As a special note, you can also use the 
21604 \begin_inset Quotes eld
21605 \end_inset
21606
21607 %def
21608 \begin_inset Quotes erd
21609 \end_inset
21610
21611  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21612 rence:
21613 \end_layout
21614
21615 \begin_layout LyX-Code
21616 <<My scrap>>=
21617 \begin_inset Newline newline
21618 \end_inset
21619
21620   def some_function(args):
21621 \begin_inset Newline newline
21622 \end_inset
21623
21624     "This is the doc string for this function."
21625 \begin_inset Newline newline
21626 \end_inset
21627
21628     print "My args: ", args
21629 \end_layout
21630
21631 \begin_layout LyX-Code
21632 @ %def some_function
21633 \end_layout
21634
21635 \begin_layout Standard
21636 For an example of this usage and the resulting cross-reference output, look
21637  at the Literate python program in 
21638 \emph on
21639 LIBDIR/examples/listerrors.lyx
21640 \emph default
21641  which should make this all clear.
21642 \end_layout
21643
21644 \begin_layout Paragraph
21645 Generating the documentation
21646 \end_layout
21647
21648 \begin_layout Standard
21649 At this point you already have a new document file with a proper document
21650  class, and with some code and text on it.
21651  How do I print it? The answer is simple, you select 
21652 \family sans
21653 View\SpecialChar \menuseparator
21654 DVI,
21655 \family default
21656  etc.
21657  Just like you would do for a plain document.
21658  No special procedure is required.
21659 \end_layout
21660
21661 \begin_layout Standard
21662 To help orientate you, I will now explain what happens inside LyX:
21663 \end_layout
21664
21665 \begin_layout Enumerate
21666 When the 
21667 \family sans
21668 Update\SpecialChar \menuseparator
21669 DVI
21670 \family default
21671  menu option is chosen, a LaTeX file is generated.
21672  
21673 \end_layout
21674
21675 \begin_deeper
21676 \begin_layout Standard
21677 If the document is of any literate class the generated file will be named
21678  with an extension name defined by the 
21679 \begin_inset Quotes eld
21680 \end_inset
21681
21682 literate
21683 \begin_inset Quotes erd
21684 \end_inset
21685
21686  format (defined in the Preferences panel), otherwise the file will have
21687  the usual 
21688 \family typewriter
21689 .tex
21690 \family default
21691  extension.
21692 \end_layout
21693
21694 \end_deeper
21695 \begin_layout Enumerate
21696 Note that the only difference so far is in the name of the file, no special
21697  processing is required by LyX.
21698  Given that you formatted the code using the Scrap layout that, by itself,
21699  takes care of the business.
21700 \end_layout
21701
21702 \begin_layout Enumerate
21703 If the document is of any literate class LyX will then use the internal
21704  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21705 \begin_inset Foot
21706 status collapsed
21707
21708 \begin_layout Plain Layout
21709 The converters are defined in the 
21710 \family sans
21711 Tools\SpecialChar \menuseparator
21712 Preferences
21713 \family default
21714  panel, under the 
21715 \begin_inset Quotes eld
21716 \end_inset
21717
21718 Conversion
21719 \begin_inset Quotes erd
21720 \end_inset
21721
21722  tab.
21723  See section 
21724 \emph on
21725 Converters
21726 \emph default
21727  of the 
21728 \emph on
21729 Customization
21730 \emph default
21731  manual for general information about converters.
21732 \end_layout
21733
21734 \end_inset
21735
21736  to generate the LaTeX file.
21737 \end_layout
21738
21739 \begin_deeper
21740 \begin_layout Standard
21741 Otherwise it will just skip this step.
21742 \end_layout
21743
21744 \end_deeper
21745 \begin_layout Enumerate
21746 Finally, LaTeX is invoked and the regular post processing continues as in
21747  a plain document.
21748 \end_layout
21749
21750 \begin_layout Standard
21751 Independence from a particular 
21752 \begin_inset Quotes eld
21753 \end_inset
21754
21755 literate tool
21756 \begin_inset Quotes erd
21757 \end_inset
21758
21759  is easily achieved by changing the commands that are run by the various
21760  converters.
21761 \end_layout
21762
21763 \begin_layout Paragraph
21764 Generating the code
21765 \end_layout
21766
21767 \begin_layout Standard
21768 When the build menu option is chosen or the corresponding button in the
21769  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21770  Next, LyX invokes the 
21771 \family typewriter
21772 Noweb->Program
21773 \family default
21774  converter.
21775  This converter needs to be defined by the user and is not installed by
21776  default, though the Program format is.
21777  This converter (like any other converter) will have two parts:
21778 \end_layout
21779
21780 \begin_layout Enumerate
21781 The converter program itself.
21782  This program performs the conversion from the one format to the other (in
21783  this case, from the Noweb format to the Program pseudo-format).
21784 \end_layout
21785
21786 \begin_layout Enumerate
21787 The error log parser.
21788  This is a program whose sole purpose is to rewrite error messages in a
21789  format that LyX understands.
21790  This makes it possible for LyX to place error boxes in the right places
21791  in the file buffer.
21792 \end_layout
21793
21794 \begin_layout Standard
21795 The first part, the 
21796 \begin_inset Quotes eld
21797 \end_inset
21798
21799 Converter
21800 \begin_inset Quotes erd
21801 \end_inset
21802
21803  setting, should be set to 
21804 \begin_inset Quotes eld
21805 \end_inset
21806
21807
21808 \family typewriter
21809 build-script $$i
21810 \family default
21811
21812 \begin_inset Quotes erd
21813 \end_inset
21814
21815 .
21816  This basically means that LyX will call 
21817 \begin_inset Quotes eld
21818 \end_inset
21819
21820 build-script
21821 \begin_inset Quotes erd
21822 \end_inset
21823
21824  (a program or script) with the name of the Noweb file (normally a file
21825  in the LyX temp directory).
21826  
21827 \end_layout
21828
21829 \begin_layout Standard
21830 This is an implementation of 
21831 \begin_inset Quotes eld
21832 \end_inset
21833
21834 build-script
21835 \begin_inset Quotes erd
21836 \end_inset
21837
21838  that you can place in a directory on your path:
21839 \end_layout
21840
21841 \begin_layout LyX-Code
21842 #!/bin/sh
21843 \end_layout
21844
21845 \begin_layout LyX-Code
21846 #
21847 \end_layout
21848
21849 \begin_layout LyX-Code
21850 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21851 \end_layout
21852
21853 \begin_layout Standard
21854 The next part of the converter setting is the 
21855 \begin_inset Quotes eld
21856 \end_inset
21857
21858 Flags
21859 \begin_inset Quotes erd
21860 \end_inset
21861
21862  which is to be set to 
21863 \begin_inset Quotes eld
21864 \end_inset
21865
21866
21867 \family typewriter
21868 parselog=listerrors
21869 \family default
21870
21871 \begin_inset Quotes erd
21872 \end_inset
21873
21874 .
21875  This will run any errors that are generated by the 
21876 \begin_inset Quotes eld
21877 \end_inset
21878
21879 build-script
21880 \begin_inset Quotes erd
21881 \end_inset
21882
21883  process through the 
21884 \begin_inset Quotes eld
21885 \end_inset
21886
21887 listerrors
21888 \begin_inset Quotes erd
21889 \end_inset
21890
21891  program.
21892 \end_layout
21893
21894 \begin_layout Standard
21895 The converter code looks in 
21896 \emph on
21897 MYLYXDIR/scripts
21898 \emph default
21899  first, then in 
21900 \emph on
21901 LIBDIR/scripts
21902 \emph default
21903  then on the path for the 
21904 \begin_inset Quotes eld
21905 \end_inset
21906
21907 listerrors
21908 \begin_inset Quotes erd
21909 \end_inset
21910
21911  program.
21912 \end_layout
21913
21914 \begin_layout Standard
21915 The build will normally take place in LyX's temporary directory, so the
21916  files produced by the conversion will be in that directory.
21917  LyX will copy out what it regards as the `main' file, but the 
21918 \family typewriter
21919 Noweb->Program
21920 \family default
21921  conversion may produce several files, and so most of these would then be
21922  deleted when LyX was closed.
21923  The present solution is to use a `copier',
21924 \begin_inset Foot
21925 status collapsed
21926
21927 \begin_layout Plain Layout
21928 See section 
21929 \emph on
21930 Copiers
21931 \emph default
21932  of the 
21933 \emph on
21934 Customization
21935 \emph default
21936  manual for information on these.
21937 \end_layout
21938
21939 \end_inset
21940
21941  in this case, the 
21942 \family typewriter
21943 ext_copy.py
21944 \family default
21945  script in its default mode, so that the entire contents of the temporary
21946  directory is copied.
21947  More will get copied than is needed, to be sure, but nothing will be lost.
21948  If, however, you know what extensions the generated files will have, this
21949  can be improved by using the 
21950 \family typewriter
21951 -e
21952 \family default
21953  option to 
21954 \family typewriter
21955 ext_copy
21956 \family default
21957 .
21958  This option takes a comma-separated list of extensions to copy.
21959  So, for example, if the conversion will generate only files with the extensions
21960  
21961 \family typewriter
21962 .c
21963 \family default
21964  and 
21965 \family typewriter
21966 .h
21967 \family default
21968 , then the correct definition would be:
21969 \end_layout
21970
21971 \begin_layout LyX-Code
21972 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21973 \end_layout
21974
21975 \begin_layout Standard
21976 The result will be that only files with these two extensions will be copied
21977  out.
21978 \end_layout
21979
21980 \begin_layout Paragraph
21981 Build instructions in the document
21982 \end_layout
21983
21984 \begin_layout Standard
21985 The last piece of the integration between LyX and noweb is the 
21986 \begin_inset Quotes eld
21987 \end_inset
21988
21989 build-script
21990 \begin_inset Quotes erd
21991 \end_inset
21992
21993  scrap.
21994  Generally, the instructions for building your program should be embedded
21995  in a scrap of its own.
21996  The noweb-specific 
21997 \begin_inset Quotes eld
21998 \end_inset
21999
22000 build-script
22001 \begin_inset Quotes erd
22002 \end_inset
22003
22004  above uses the notangle command to look for this scrap (called 
22005 \begin_inset Quotes eld
22006 \end_inset
22007
22008 build-script
22009 \begin_inset Quotes erd
22010 \end_inset
22011
22012 ) and runs its contents through 
22013 \begin_inset Quotes eld
22014 \end_inset
22015
22016 sh
22017 \begin_inset Quotes erd
22018 \end_inset
22019
22020 .
22021 \end_layout
22022
22023 \begin_layout Standard
22024 Typically, such a scrap would look something like this:
22025 \end_layout
22026
22027 \begin_layout LyX-Code
22028 <<build-script>>=
22029 \begin_inset Newline newline
22030 \end_inset
22031
22032 #!/bin/sh
22033 \begin_inset Newline newline
22034 \end_inset
22035
22036
22037 \begin_inset Newline newline
22038 \end_inset
22039
22040 if [ -z "${NOWEB_SOURCE}" ]
22041 \begin_inset Newline newline
22042 \end_inset
22043
22044 then
22045 \begin_inset Newline newline
22046 \end_inset
22047
22048   NOWEB_SOURCE=myfile.nw
22049 \begin_inset Newline newline
22050 \end_inset
22051
22052 fi
22053 \begin_inset Newline newline
22054 \end_inset
22055
22056 [...
22057  code to extract files ...]
22058 \begin_inset Newline newline
22059 \end_inset
22060
22061 [...
22062  code to compile files ...]
22063 \begin_inset Newline newline
22064 \end_inset
22065
22066 @
22067 \end_layout
22068
22069 \begin_layout Standard
22070 Look in 
22071 \emph on
22072 LIBDIR/examples/listerrors.lyx
22073 \emph default
22074  or in 
22075 \emph on
22076 LIBDIR/examples/Literate.lyx
22077 \emph default
22078  which implement two versions of the 
22079 \begin_inset Quotes eld
22080 \end_inset
22081
22082 listerrors
22083 \begin_inset Quotes erd
22084 \end_inset
22085
22086  program for some illustrations of how all of these pieces go together or
22087  in 
22088 \emph on
22089 LIBDIR/examples/noweb2lyx.lyx.
22090
22091 \emph default
22092  Interestingly, these three files show off the language-indepence of the
22093  LyX literate programming support since they are written in Python, C and
22094  Perl respectively.
22095 \end_layout
22096
22097 \begin_layout Subsubsection
22098 Configuring LyX
22099 \end_layout
22100
22101 \begin_layout Standard
22102 All the Literate Programming support is configured by the 
22103 \family sans
22104 Tools\SpecialChar \menuseparator
22105 Preferences
22106 \family default
22107  panel in the 
22108 \begin_inset Quotes eld
22109 \end_inset
22110
22111 Conversion
22112 \begin_inset Quotes erd
22113 \end_inset
22114
22115  tab.
22116  The important parts are:
22117 \end_layout
22118
22119 \begin_layout Description
22120 the
22121 \begin_inset space ~
22122 \end_inset
22123
22124
22125 \begin_inset Quotes eld
22126 \end_inset
22127
22128 literate
22129 \begin_inset Quotes erd
22130 \end_inset
22131
22132
22133 \begin_inset space ~
22134 \end_inset
22135
22136 format Set up via the Formats tab, this is where the Noweb-specific pieces
22137  are set up.
22138  The 
22139 \family sans
22140 GUI Name
22141 \family default
22142  is set to 
22143 \family typewriter
22144 NoWeb
22145 \family default
22146 , the file extension is set to 
22147 \family typewriter
22148 .nw
22149 \family default
22150 .
22151  This tells LyX to create a file with a 
22152 \family typewriter
22153 .nw
22154 \family default
22155  extension in the first step of the conversion process.
22156 \end_layout
22157
22158 \begin_layout Description
22159 the
22160 \begin_inset space ~
22161 \end_inset
22162
22163
22164 \family sans
22165 Program
22166 \family default
22167
22168 \begin_inset space ~
22169 \end_inset
22170
22171 format This is an empty format whose sole purpose is to be the endpoint
22172  of a conversion (which then allows us to set up a converter for it).
22173 \end_layout
22174
22175 \begin_layout Description
22176
22177 \family sans
22178 NoWeb
22179 \family default
22180 ->
22181 \family sans
22182 LaTeX
22183 \family default
22184  This converter performs the 
22185 \begin_inset Quotes eld
22186 \end_inset
22187
22188 weaving
22189 \begin_inset Quotes erd
22190 \end_inset
22191
22192  of the literate document.
22193  For Noweb, it is set to 
22194 \begin_inset Quotes eld
22195 \end_inset
22196
22197
22198 \family typewriter
22199 noweave -delay -index $$i > $$o
22200 \family default
22201
22202 \begin_inset Quotes erd
22203 \end_inset
22204
22205
22206 \end_layout
22207
22208 \begin_layout Description
22209
22210 \family sans
22211 NoWeb
22212 \family default
22213 ->
22214 \family sans
22215 Program
22216 \family default
22217  This performs the 
22218 \begin_inset Quotes eld
22219 \end_inset
22220
22221 tangling step
22222 \begin_inset Quotes erd
22223 \end_inset
22224
22225 .
22226  As stated above, the Converter is set to 
22227 \begin_inset Quotes eld
22228 \end_inset
22229
22230
22231 \family typewriter
22232 build-script $$i
22233 \family default
22234
22235 \begin_inset Quotes erd
22236 \end_inset
22237
22238 , with Flags set to 
22239 \begin_inset Quotes eld
22240 \end_inset
22241
22242
22243 \family typewriter
22244 originaldir,parselog=listerrors
22245 \family default
22246
22247 \begin_inset Quotes erd
22248 \end_inset
22249
22250 .
22251 \end_layout
22252
22253 \begin_layout Subsubsection
22254 Debug extensions
22255 \end_layout
22256
22257 \begin_layout Standard
22258 There is also a new function implemented in the LyX server, the 
22259 \begin_inset Quotes eld
22260 \end_inset
22261
22262 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22263  
22264 \end_layout
22265
22266 \begin_layout Standard
22267 When debugging code with ddd/gdb, it is possible to invoke a text editor
22268  at the current execution position with a single key stroke.
22269  The default ddd configuration for that is shift-ctrl-V.
22270  It happens that you can define the editor command line invocation in ddd
22271  by accessing the 
22272 \family sans
22273 Edit\SpecialChar \menuseparator
22274 Preferences\SpecialChar \menuseparator
22275 Helpers
22276 \family default
22277  dialog and changing the "Edit Sources" entry.
22278 \end_layout
22279
22280 \begin_layout Standard
22281 I take advantage of the new created LyX server function and this ddd feature,
22282  and set 
22283 \begin_inset Quotes eld
22284 \end_inset
22285
22286 Edit Sources
22287 \begin_inset Quotes erd
22288 \end_inset
22289
22290  to:
22291 \end_layout
22292
22293 \begin_layout LyX-Code
22294 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22295 \end_layout
22296
22297 \begin_layout Standard
22298 With this, whenever you are using ddd and find a point in the program that
22299  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22300  ddd you forward this information to LyX through the LyX server and then
22301  the LyX window will show the same file with the cursor at the same position
22302  ddd was pointing to.
22303  No more guessing or long scrolling to locate a point in the program back
22304  from debugging !
22305 \end_layout
22306
22307 \begin_layout Standard
22308 Note however that you must enable the LyX server to get this feature working
22309  (it is disabled by default).
22310  You can enable it in 
22311 \family sans
22312 Preferences
22313 \family default
22314  (tabs 
22315 \family sans
22316 Inputs
22317 \family default
22318
22319 \family sans
22320 Paths
22321 \family default
22322 ) by entering in the 
22323 \family sans
22324 LyXserver pipe
22325 \family default
22326  a path like 
22327 \begin_inset Quotes eld
22328 \end_inset
22329
22330
22331 \family typewriter
22332 /home/<your-home-directory>/.lyx/lyxpipe
22333 \family default
22334
22335 \begin_inset Quotes erd
22336 \end_inset
22337
22338
22339 \end_layout
22340
22341 \begin_layout Standard
22342 Read the LyX server documentation in the 
22343 \emph on
22344 Customization Manual
22345 \emph default
22346  for further information.
22347 \end_layout
22348
22349 \begin_layout Subsubsection
22350 Toolbar extensions
22351 \end_layout
22352
22353 \begin_layout Standard
22354 There are six new buttons that can be added to your LyX toolbar.
22355  Five of these buttons are short cuts to layout styles: 
22356 \family sans
22357 Standard
22358 \family default
22359
22360 \family sans
22361 Section
22362 \family default
22363
22364 \family sans
22365 LaTeX
22366 \family default
22367
22368 \family sans
22369 LyX-Code
22370 \family default
22371 , and 
22372 \family sans
22373 Scrap
22374 \family default
22375 .
22376  The last one is a short cut to the 
22377 \begin_inset Quotes eld
22378 \end_inset
22379
22380 Build Program
22381 \begin_inset Quotes erd
22382 \end_inset
22383
22384  File menu entry.
22385  
22386 \end_layout
22387
22388 \begin_layout Standard
22389 LyX has a range of buttons that are available for tool bar customization.
22390  In my toolbar I like to combine the six short cuts above with two more:
22391  One for 
22392 \family sans
22393 View
22394 \family default
22395 \SpecialChar \menuseparator
22396
22397 \family sans
22398 Update
22399 \family default
22400 \SpecialChar \menuseparator
22401
22402 \family sans
22403 DVI
22404 \family default
22405  and the other for 
22406 \family sans
22407 View\SpecialChar \menuseparator
22408 DVI
22409 \family default
22410  File menu entries.
22411  Here is how it looks like:
22412 \end_layout
22413
22414 \begin_layout LyX-Code
22415 Toolbar
22416 \end_layout
22417
22418 \begin_layout LyX-Code
22419   Layouts
22420 \end_layout
22421
22422 \begin_layout LyX-Code
22423   Icon "layout Standard"
22424 \end_layout
22425
22426 \begin_layout LyX-Code
22427   Icon "layout Section"
22428 \end_layout
22429
22430 \begin_layout LyX-Code
22431   Icon "layout LaTeX"
22432 \end_layout
22433
22434 \begin_layout LyX-Code
22435   Icon "layout LyX-Code"
22436 \end_layout
22437
22438 \begin_layout LyX-Code
22439   Icon "layout Scrap"
22440 \end_layout
22441
22442 \begin_layout LyX-Code
22443   Separator
22444 \end_layout
22445
22446 \begin_layout LyX-Code
22447   Icon "buffer-view"
22448 \end_layout
22449
22450 \begin_layout LyX-Code
22451   Icon "buffer-typeset"
22452 \end_layout
22453
22454 \begin_layout LyX-Code
22455   Icon "build-program"
22456 \end_layout
22457
22458 \begin_layout LyX-Code
22459   Separator
22460 \end_layout
22461
22462 \begin_layout LyX-Code
22463 .
22464 \end_layout
22465
22466 \begin_layout LyX-Code
22467 .
22468 \end_layout
22469
22470 \begin_layout LyX-Code
22471 .
22472 \end_layout
22473
22474 \begin_layout LyX-Code
22475 End
22476 \end_layout
22477
22478 \begin_layout Subsubsection
22479 Colors customization
22480 \end_layout
22481
22482 \begin_layout Standard
22483 There are a number of colors in LyX that can be customized in 
22484 \family sans
22485 Preferences
22486 \family default
22487 .
22488  One of the things that bothers people is the LaTeX font color.
22489  The default color is red, since the scraps uses LaTeX font, and there is
22490  a lot of scraps in literate documents, you may get tired of seeing everything
22491  in red.
22492  You can change it by going to the tabs 
22493 \family sans
22494 Look&Feel
22495 \family default
22496
22497 \family sans
22498 Colors.
22499 \end_layout
22500
22501 \begin_layout Standard
22502 The next thing is the visible presence of the newline character in the screen.
22503  You can choose the color of this particular character and make it blend
22504  in the background.
22505  I recommend you choosing a color that is close to the background but not
22506  equal, that way you still can see it is there, but it is not bothering
22507  you anymore.
22508  
22509 \end_layout
22510
22511 \begin_layout Chapter
22512 Special features
22513 \end_layout
22514
22515 \begin_layout Standard
22516 You can do everything with LyX that you can do with LaTeX.
22517  However, LyX cannot support every LaTeX feature directly.
22518  But you can always use TeX Code.
22519  This chapter shows you some more special things you might want to use.
22520  For other special things you can do with figures, tables, floats, boxes
22521  and notes, have a look at the 
22522 \emph on
22523 Embedded
22524 \begin_inset space ~
22525 \end_inset
22526
22527 Objects
22528 \emph default
22529  manual.
22530 \end_layout
22531
22532 \begin_layout Section
22533 Multiple Text Columns
22534 \end_layout
22535
22536 \begin_layout Standard
22537 This feature is independent of the option 
22538 \family sans
22539 Two-column document
22540 \family default
22541  in the document settings under 
22542 \family sans
22543 Text Layout
22544 \family default
22545 .
22546  If you want to have 2
22547 \begin_inset space ~
22548 \end_inset
22549
22550 columns for the whole document, it is recommended to use the 
22551 \family sans
22552 Two-column document
22553 \family default
22554  option.
22555  For all other cases use this feature.
22556 \end_layout
22557
22558 \begin_layout Standard
22559 To use multiple text columns in your document, you have to load the module
22560  
22561 \family sans
22562 Multiple Columns
22563 \family default
22564  (menu 
22565 \family sans
22566 Document\SpecialChar \menuseparator
22567 Settings\SpecialChar \menuseparator
22568 Modules
22569 \family default
22570 ) and must have the LaTeX-package 
22571 \series bold
22572 multicol
22573 \series default
22574
22575 \begin_inset Index idx
22576 status collapsed
22577
22578 \begin_layout Plain Layout
22579 LaTeX-packages ! multicol
22580 \end_layout
22581
22582 \end_inset
22583
22584  installed.
22585 \end_layout
22586
22587 \begin_layout Standard
22588 Footnotes within multiple columns will be placed at the bottom of the page
22589  and not under each column.
22590  Within the different columns you can use everything, with the limitation
22591  that for floats you need to use the float option 
22592 \family sans
22593 Span columns
22594 \family default
22595 .
22596 \end_layout
22597
22598 \begin_layout Subsection
22599 Basics
22600 \end_layout
22601
22602 \begin_layout Standard
22603 If you want to have 2
22604 \begin_inset space ~
22605 \end_inset
22606
22607 columns in your text, use the style 
22608 \family sans
22609 Begin Multiple Columns
22610 \family default
22611  where the columns should start.
22612  The content of the style is the number of the columns, so in this case
22613  use a 
22614 \begin_inset Quotes eld
22615 \end_inset
22616
22617 2
22618 \begin_inset Quotes erd
22619 \end_inset
22620
22621 .
22622  At the point where the columns should end use the style 
22623 \family sans
22624 End Multiple Columns
22625 \family default
22626  and keep it empty.
22627 \end_layout
22628
22629 \begin_layout Standard
22630 Here is an example:
22631 \end_layout
22632
22633 \begin_layout Begin Multiple Columns
22634 2
22635 \end_layout
22636
22637 \begin_layout Standard
22638 \noindent
22639
22640 \series bold
22641 \size small
22642 The Adventure of the Empty House
22643 \series default
22644
22645 \begin_inset Newline newline
22646 \end_inset
22647
22648 by 
22649 \noun on
22650 Sir Arthur Conan Doyle
22651 \end_layout
22652
22653 \begin_layout Standard
22654
22655 \size small
22656 It was in the spring of the year 1894 that all London was interested, and
22657  the fashionable world dismayed, by the murder of the Honourable Ronald
22658  Adair under most unusual and inexplicable circumstances.
22659  The public has already learned those particulars of the crime which came
22660  out in the police investigation, but a good deal was suppressed upon that
22661  occasion, since the case for the prosecution was so overwhelmingly strong
22662  that it was not necessary to bring forward all the facts.
22663  Only now, at the end of nearly ten years, am I allowed to supply those
22664  missing links which make up the whole of that remarkable chain.
22665  The crime was of interest in itself, but that interest was as nothing to
22666  me compared to the inconceivable sequel, which afforded me the greatest
22667  shock and surprise of any event in my adventurous life.
22668  Even now, after this long interval, I find myself thrilling as I think
22669  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22670 ty which utterly submerged my mind.
22671  Let me say to that public, which has shown some interest in those glimpses
22672  which I have occasionally given them of the thoughts and actions of a very
22673  remarkable man, that they are not to blame me if I have not shared my knowledge
22674  with them, for I should have considered it my first duty to do so, had
22675  I not been barred by a positive prohibition from his own lips, which was
22676  only withdrawn upon the third of last month.
22677 \end_layout
22678
22679 \begin_layout End Multiple Columns
22680
22681 \end_layout
22682
22683 \begin_layout Standard
22684 Here is an example with 3
22685 \begin_inset space ~
22686 \end_inset
22687
22688 columns:
22689 \end_layout
22690
22691 \begin_layout Begin Multiple Columns
22692 3
22693 \end_layout
22694
22695 \begin_layout Standard
22696
22697 \size footnotesize
22698 It can be imagined that my close intimacy with Sherlock Holmes had interested
22699  me deeply in crime, and that after his disappearance I never failed to
22700  read with care the various problems which came before the public.
22701  And I even attempted, more than once, for my own private satisfaction,
22702  to employ his methods in their solution, though with indifferent success.
22703  There was none, however, which appealed to me like this tragedy of Ronald
22704  Adair.
22705  As I read the evidence at the inquest, which led up to a verdict of willful
22706  murder against some person or persons unknown, I realized more clearly
22707  than I had ever done the loss which the community had sustained by the
22708  death of Sherlock Holmes.
22709  There were points about this strange business which would, I was sure,
22710  have specially appealed to him, and the efforts of the police would have
22711  been supplemented, or more probably anticipated, by the trained observation
22712  and the alert mind of the first criminal agent in Europe.
22713  All day, as I drove upon my round, I turned over the case in my mind and
22714  found no explanation which appeared to me to be adequate.
22715  At the risk of telling a twice-told tale, I will recapitulate the facts
22716  as they were known to the public at the conclusion of the inquest.
22717 \end_layout
22718
22719 \begin_layout End Multiple Columns
22720
22721 \end_layout
22722
22723 \begin_layout Standard
22724 You can have up to 10
22725 \begin_inset space ~
22726 \end_inset
22727
22728 columns if you want to, but that might not be very pleasant for the readers
22729  of your document.
22730 \end_layout
22731
22732 \begin_layout Standard
22733 \begin_inset Newpage newpage
22734 \end_inset
22735
22736
22737 \end_layout
22738
22739 \begin_layout Subsection
22740 Columns inside Columns
22741 \end_layout
22742
22743 \begin_layout Standard
22744 You can also have columns inside columns:
22745 \end_layout
22746
22747 \begin_layout Begin Multiple Columns
22748 2
22749 \end_layout
22750
22751 \begin_layout Standard
22752
22753 \size footnotesize
22754 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22755  at that time governor of one of the Australian colonies.
22756  Adair's mother had returned from Australia to undergo the operation for
22757  cataract, and she, her son Ronald, and her daughter Hilda were living together
22758  at 427 Park Lane.
22759 \end_layout
22760
22761 \begin_layout Begin Multiple Columns
22762 2
22763 \end_layout
22764
22765 \begin_layout Standard
22766
22767 \size footnotesize
22768 The youth moved in the best society–had, so far as was known, no enemies
22769  and no particular vices.
22770  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22771  had been broken off by mutual consent some months before, and there was
22772  no sign that it had left any very profound feeling behind it.
22773  For the rest {sic} the man's life moved in a narrow and conventional circle,
22774  for his habits were quiet and his nature unemotional.
22775  Yet it was upon this easy-going young aristocrat that death came, in most
22776  strange and unexpected form, between the hours of ten and eleven-twenty
22777  on the night of March 30, 1894.
22778 \end_layout
22779
22780 \begin_layout End Multiple Columns
22781
22782 \end_layout
22783
22784 \begin_layout Standard
22785
22786 \size footnotesize
22787 Ronald Adair was fond of cards–playing continually, but never for such stakes
22788  as would hurt him.
22789  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22790  It was shown that, after dinner on the day of his death, he had played
22791  a rubber of whist at the latter club.
22792  He had also played there in the afternoon.
22793
22794 \size default
22795  
22796 \size footnotesize
22797 The evidence of those who had played with him– Mr.
22798  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22799  and that there was a fairly equal fall of the cards.
22800  Adair might have lost five pounds, but not more.
22801  His fortune was a considerable one, and such a loss could not in any way
22802  affect him.
22803  He had played nearly every day at one club or other, but he was a cautious
22804  player, and usually rose a winner.
22805  It came out in evidence that, in partnership with Colonel Moran, he had
22806  actually won as much as four hundred and twenty pounds in a sitting, some
22807  weeks before, from Godfrey Milner and Lord Balmoral.
22808  So much for his recent history as it came out at the inquest.
22809 \end_layout
22810
22811 \begin_layout End Multiple Columns
22812
22813 \end_layout
22814
22815 \begin_layout Subsection
22816 Advanced Examples
22817 \end_layout
22818
22819 \begin_layout Standard
22820 The examples in this section show some more special features of multiple
22821  columns.
22822 \end_layout
22823
22824 \begin_layout Standard
22825 For more features of multiple columns, have a look at the documentation
22826  of the LaTeX-package 
22827 \series bold
22828 multicol
22829 \series default
22830
22831 \begin_inset Index idx
22832 status collapsed
22833
22834 \begin_layout Plain Layout
22835 LaTeX-packages ! multicol
22836 \end_layout
22837
22838 \end_inset
22839
22840
22841 \begin_inset CommandInset citation
22842 LatexCommand cite
22843 key "multicol"
22844
22845 \end_inset
22846
22847 .
22848 \end_layout
22849
22850 \begin_layout Subsubsection
22851 Preface
22852 \end_layout
22853
22854 \begin_layout Standard
22855 To add a preface text for multiple columns, add the command
22856 \end_layout
22857
22858 \begin_layout Standard
22859
22860 \series bold
22861 }[
22862 \end_layout
22863
22864 \begin_layout Standard
22865 as TeX Code behind the number of columns in the
22866 \family sans
22867  Begin Multiple Columns
22868 \family default
22869  style.
22870  Behind the command follows the preface text.
22871  At the end of the style use the command
22872 \end_layout
22873
22874 \begin_layout Standard
22875
22876 \series bold
22877 ]{
22878 \end_layout
22879
22880 \begin_layout Standard
22881 as TeX Code.
22882  An example with some preface text:
22883 \end_layout
22884
22885 \begin_layout Standard
22886 \begin_inset VSpace bigskip
22887 \end_inset
22888
22889
22890 \end_layout
22891
22892 \begin_layout Begin Multiple Columns
22893 2
22894 \begin_inset ERT
22895 status collapsed
22896
22897 \begin_layout Plain Layout
22898
22899 }[
22900 \end_layout
22901
22902 \end_inset
22903
22904 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22905
22906 \begin_inset ERT
22907 status collapsed
22908
22909 \begin_layout Plain Layout
22910
22911 ]{
22912 \end_layout
22913
22914 \end_inset
22915
22916
22917 \end_layout
22918
22919 \begin_layout Standard
22920
22921 \size small
22922 On the evening of the crime, he returned from the club exactly at ten.
22923  His mother and sister were out spending the evening with a relation.
22924  The servant deposed that she heard him enter the front room on the second
22925  floor, generally used as his sitting-room.
22926  She had lit a fire there, and as it smoked she had opened the window.
22927  No sound was heard from the room until eleven-twenty, the hour of the return
22928  of Lady Maynooth and her daughter.
22929  Desiring to say good-night, she attempted to enter her son's room.
22930  The door was locked on the inside, and no answer could be got to their
22931  cries and knocking.
22932  Help was obtained, and the door forced.
22933  The unfortunate young man was found lying near the table.
22934  His head had been horribly mutilated by an expanding revolver bullet, but
22935  no weapon of any sort was to be found in the room.
22936 \end_layout
22937
22938 \begin_layout End Multiple Columns
22939
22940 \end_layout
22941
22942 \begin_layout Standard
22943 You can also use a section heading as the preface if you use a section command
22944  as TeX Code behind the first TeX Code.
22945  For example the command
22946 \end_layout
22947
22948 \begin_layout Standard
22949
22950 \series bold
22951
22952 \backslash
22953 subsection{subsection title}
22954 \end_layout
22955
22956 \begin_layout Standard
22957 creates a subsection.
22958  In this example the preface is a subsubsection:
22959 \end_layout
22960
22961 \begin_layout Begin Multiple Columns
22962 2
22963 \begin_inset ERT
22964 status collapsed
22965
22966 \begin_layout Plain Layout
22967
22968 }[
22969 \end_layout
22970
22971 \end_inset
22972
22973
22974 \begin_inset ERT
22975 status collapsed
22976
22977 \begin_layout Plain Layout
22978
22979
22980 \backslash
22981 subsubsection{
22982 \end_layout
22983
22984 \end_inset
22985
22986 This is a subsubsection heading as a preface
22987 \begin_inset ERT
22988 status collapsed
22989
22990 \begin_layout Plain Layout
22991
22992 }
22993 \end_layout
22994
22995 \end_inset
22996
22997
22998 \begin_inset ERT
22999 status collapsed
23000
23001 \begin_layout Plain Layout
23002
23003 ]{
23004 \end_layout
23005
23006 \end_inset
23007
23008
23009 \end_layout
23010
23011 \begin_layout Standard
23012
23013 \size small
23014 A minute examination of the circumstances served only to make the case more
23015  complex.
23016  In the first place, no reason could be given why the young man should have
23017  fastened the door upon the inside.
23018  There was the possibility that the murderer had done this, and had afterwards
23019  escaped by the window.
23020  The drop was at least twenty feet, however, and a bed of crocuses in full
23021  bloom lay beneath.
23022  Neither the flowers nor the earth showed any sign of having been disturbed,
23023  nor were there any marks upon the narrow strip of grass which separated
23024  the house from the road.
23025  Apparently, therefore, it was the young man himself who had fastened the
23026  door.
23027  But how did he come by his death? No one could have climbed up to the window
23028  without leaving traces.
23029  Suppose a man had fired through the window, he would indeed be a remarkable
23030  shot who could with a revolver inflict so deadly a wound.
23031  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23032  a hundred yards of the house.
23033  No one had heard a shot.
23034 \end_layout
23035
23036 \begin_layout End Multiple Columns
23037
23038 \end_layout
23039
23040 \begin_layout Standard
23041 If there is less vertical space left on the page at the beginning of the
23042  multiple columns than needed for 6
23043 \begin_inset space ~
23044 \end_inset
23045
23046 text lines, a page break will be inserted before the multiple columns.
23047  Depending on the number of lines of the preface text, you might want to
23048  change this value.
23049  It is determined by inserting the command
23050 \end_layout
23051
23052 \begin_layout Standard
23053
23054 \series bold
23055 ][number
23056 \backslash
23057 baselineskip
23058 \end_layout
23059
23060 \begin_layout Standard
23061 as TeX Code behind the preface definition but before the final 
23062 \series bold
23063 ]{
23064 \series default
23065  command.
23066  
23067 \emph on
23068 number
23069 \emph default
23070  is hereby the number of text lines.
23071  In this example the space is set to 7
23072 \begin_inset space ~
23073 \end_inset
23074
23075 text lines:
23076 \end_layout
23077
23078 \begin_layout Begin Multiple Columns
23079 2
23080 \begin_inset ERT
23081 status collapsed
23082
23083 \begin_layout Plain Layout
23084
23085 }[
23086 \end_layout
23087
23088 \end_inset
23089
23090
23091 \begin_inset ERT
23092 status collapsed
23093
23094 \begin_layout Plain Layout
23095
23096
23097 \backslash
23098 subsubsection{
23099 \end_layout
23100
23101 \end_inset
23102
23103 This is the sectioning command
23104 \begin_inset Newline newline
23105 \end_inset
23106
23107 as a preface and
23108 \begin_inset Newline newline
23109 \end_inset
23110
23111 with multiple text lines
23112 \begin_inset ERT
23113 status collapsed
23114
23115 \begin_layout Plain Layout
23116
23117 }
23118 \end_layout
23119
23120 \end_inset
23121
23122
23123 \begin_inset ERT
23124 status collapsed
23125
23126 \begin_layout Plain Layout
23127
23128 ][7
23129 \backslash
23130 baselineskip
23131 \end_layout
23132
23133 \end_inset
23134
23135
23136 \begin_inset ERT
23137 status collapsed
23138
23139 \begin_layout Plain Layout
23140
23141 ]{
23142 \end_layout
23143
23144 \end_inset
23145
23146
23147 \end_layout
23148
23149 \begin_layout Standard
23150
23151 \size small
23152 On the evening of the crime, he returned from the club exactly at ten.
23153  His mother and sister were out spending the evening with a relation.
23154  The servant deposed that she heard him enter the front room on the second
23155  floor, generally used as his sitting-room.
23156  She had lit a fire there, and as it smoked she had opened the window.
23157  No sound was heard from the room until eleven-twenty, the hour of the return
23158  of Lady Maynooth and her daughter.
23159  Desiring to say good-night, she attempted to enter her son's room.
23160  The door was locked on the inside, and no answer could be got to their
23161  cries and knocking.
23162  Help was obtained, and the door forced.
23163  The unfortunate young man was found lying near the table.
23164  His head had been horribly mutilated by an expanding revolver bullet, but
23165  no weapon of any sort was to be found in the room.
23166 \end_layout
23167
23168 \begin_layout End Multiple Columns
23169
23170 \end_layout
23171
23172 \begin_layout Subsubsection
23173 Surrounding Space
23174 \end_layout
23175
23176 \begin_layout Standard
23177 The amount of space before and after multiple columns can be changed by
23178  changing the length 
23179 \series bold
23180
23181 \backslash
23182 multicolsep
23183 \series default
23184 .
23185  For example the command
23186 \end_layout
23187
23188 \begin_layout Standard
23189
23190 \series bold
23191
23192 \backslash
23193 setlength{
23194 \backslash
23195 multicolsep}{3cm}
23196 \end_layout
23197
23198 \begin_layout Standard
23199 in TeX Code changes its value to 3
23200 \begin_inset space \thinspace{}
23201 \end_inset
23202
23203 cm.
23204  The change must be made before the multiple columns' start.
23205  The predefined value is 13
23206 \begin_inset space \thinspace{}
23207 \end_inset
23208
23209 pt.
23210 \end_layout
23211
23212 \begin_layout Standard
23213 For this example 
23214 \series bold
23215
23216 \backslash
23217 multicolsep
23218 \series default
23219  was set to 2.5
23220 \begin_inset space \thinspace{}
23221 \end_inset
23222
23223 cm:
23224 \end_layout
23225
23226 \begin_layout Standard
23227 \begin_inset ERT
23228 status open
23229
23230 \begin_layout Plain Layout
23231
23232
23233 \backslash
23234 setlength{
23235 \backslash
23236 multicolsep}{2.5cm}
23237 \end_layout
23238
23239 \end_inset
23240
23241
23242 \end_layout
23243
23244 \begin_layout Begin Multiple Columns
23245 2
23246 \end_layout
23247
23248 \begin_layout Standard
23249
23250 \size small
23251 All day I turned these facts over in my mind, endeavouring to hit upon some
23252  theory which could reconcile them all, and to find that line of least resistanc
23253 e which my poor friend had declared to be the starting-point of every investigat
23254 ion.
23255  I confess that I made little progress.
23256  In the evening I strolled across the Park, and found myself about six o'clock
23257  at the Oxford Street end of Park Lane.
23258  A group of loafers upon the pavements, all staring up at a particular window,
23259  directed me to the house which I had come to see.
23260  A tall, thin man with coloured glasses, whom I strongly suspected of being
23261  a plain-clothes detective, was pointing out some theory of his own, while
23262  the others crowded round to listen to what he said.
23263  I got as near him as I could, but his observations seemed to me to be absurd,
23264  so I withdrew again in some disgust.
23265  As I did so I struck against an elderly, deformed man, who had been behind
23266  me, and I knocked down several books which he was carrying.
23267 \end_layout
23268
23269 \begin_layout End Multiple Columns
23270
23271 \end_layout
23272
23273 \begin_layout Standard
23274 \begin_inset Note Greyedout
23275 status open
23276
23277 \begin_layout Plain Layout
23278
23279 \series bold
23280 Note:
23281 \series default
23282  The values you set with 
23283 \series bold
23284
23285 \backslash
23286 setlength
23287 \series default
23288  will be used for all following multiple columns until you change them again.
23289 \end_layout
23290
23291 \end_inset
23292
23293
23294 \end_layout
23295
23296 \begin_layout Standard
23297 \begin_inset ERT
23298 status collapsed
23299
23300 \begin_layout Plain Layout
23301
23302
23303 \backslash
23304 setlength{
23305 \backslash
23306 multicolsep}{13pt}
23307 \end_layout
23308
23309 \end_inset
23310
23311
23312 \begin_inset Note Note
23313 status collapsed
23314
23315 \begin_layout Plain Layout
23316 go back to the default
23317 \end_layout
23318
23319 \end_inset
23320
23321
23322 \end_layout
23323
23324 \begin_layout Standard
23325 \begin_inset Newpage newpage
23326 \end_inset
23327
23328
23329 \end_layout
23330
23331 \begin_layout Subsubsection
23332 Column Separation
23333 \end_layout
23334
23335 \begin_layout Standard
23336 The width of the columns is automatically calculated, but you can modify
23337  the space between the columns.
23338  This is done by changing the length 
23339 \series bold
23340
23341 \backslash
23342 columnsep
23343 \series default
23344 .
23345  Its predefined value is 10
23346 \begin_inset space \thinspace{}
23347 \end_inset
23348
23349 pt.
23350  Here is an example where 
23351 \series bold
23352
23353 \backslash
23354 columnsep
23355 \series default
23356  is set to 3
23357 \begin_inset space \thinspace{}
23358 \end_inset
23359
23360 cm:
23361 \end_layout
23362
23363 \begin_layout Standard
23364 \begin_inset ERT
23365 status open
23366
23367 \begin_layout Plain Layout
23368
23369
23370 \backslash
23371 setlength{
23372 \backslash
23373 columnsep}{3cm}
23374 \end_layout
23375
23376 \end_inset
23377
23378
23379 \end_layout
23380
23381 \begin_layout Begin Multiple Columns
23382 2
23383 \end_layout
23384
23385 \begin_layout Standard
23386
23387 \size small
23388 My observations of No.
23389 \begin_inset space \space{}
23390 \end_inset
23391
23392 427 Park Lane did little to clear up the problem in which I was interested.
23393  The house was separated from the street by a low wall and railing, the
23394  whole not more than five feet high.
23395  It was perfectly easy, therefore, for anyone to get into the garden, but
23396  the window was entirely inaccessible, since there was no water pipe or
23397  anything which could help the most active man to climb it.
23398  More puzzled than ever, I retraced my steps to Kensington.
23399  I had not been in my study five minutes when the maid entered to say that
23400  a person desired to see me.
23401  To my astonishment it was none other than my strange old book collector,
23402  his sharp, wizened face peering out from a frame of white hair, and his
23403  precious volumes, a dozen of them at least, wedged under his right arm.
23404 \end_layout
23405
23406 \begin_layout End Multiple Columns
23407
23408 \end_layout
23409
23410 \begin_layout Standard
23411 \begin_inset ERT
23412 status collapsed
23413
23414 \begin_layout Plain Layout
23415
23416
23417 \backslash
23418 setlength{
23419 \backslash
23420 columnsep}{10pt}
23421 \end_layout
23422
23423 \end_inset
23424
23425
23426 \begin_inset Note Note
23427 status collapsed
23428
23429 \begin_layout Plain Layout
23430 go back to the default
23431 \end_layout
23432
23433 \end_inset
23434
23435
23436 \end_layout
23437
23438 \begin_layout Subsubsection
23439 Vertical Lines
23440 \end_layout
23441
23442 \begin_layout Standard
23443 Between the columns a rule with a width of the length 
23444 \series bold
23445
23446 \backslash
23447 columnseprule
23448 \series default
23449  is placed.
23450  If this rule width is set to 0
23451 \begin_inset space \thinspace{}
23452 \end_inset
23453
23454 pt (this is the default), the rule is suppressed.
23455  In the following example the line is 2
23456 \begin_inset space \thinspace{}
23457 \end_inset
23458
23459 pt wide:
23460 \end_layout
23461
23462 \begin_layout Standard
23463 \begin_inset ERT
23464 status open
23465
23466 \begin_layout Plain Layout
23467
23468
23469 \backslash
23470 setlength{
23471 \backslash
23472 columnseprule}{2pt}
23473 \end_layout
23474
23475 \end_inset
23476
23477
23478 \end_layout
23479
23480 \begin_layout Begin Multiple Columns
23481 2
23482 \end_layout
23483
23484 \begin_layout Standard
23485
23486 \size small
23487 \begin_inset Quotes eld
23488 \end_inset
23489
23490 You're surprised to see me, sir,
23491 \begin_inset Quotes erd
23492 \end_inset
23493
23494  said he, in a strange, croaking voice.
23495 \end_layout
23496
23497 \begin_layout Standard
23498
23499 \size small
23500 I acknowledged that I was.
23501 \end_layout
23502
23503 \begin_layout Standard
23504
23505 \size small
23506 \begin_inset Quotes eld
23507 \end_inset
23508
23509 Well, I've a conscience, sir, and when I chanced to see you go into this
23510  house, as I came hobbling after you, I thought to myself, I'll just step
23511  in and see that kind gentleman, and tell him that if I was a bit gruff
23512  in my manner there was not any harm meant, and that I am much obliged to
23513  him for picking up my books.
23514 \begin_inset Quotes erd
23515 \end_inset
23516
23517
23518 \end_layout
23519
23520 \begin_layout Standard
23521
23522 \size small
23523 \begin_inset Quotes eld
23524 \end_inset
23525
23526 You make too much of a trifle,
23527 \begin_inset Quotes erd
23528 \end_inset
23529
23530  said I.
23531  
23532 \begin_inset Quotes eld
23533 \end_inset
23534
23535 May I ask how you knew who I was?
23536 \begin_inset Quotes erd
23537 \end_inset
23538
23539
23540 \end_layout
23541
23542 \begin_layout Standard
23543
23544 \size small
23545 \begin_inset Quotes eld
23546 \end_inset
23547
23548 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23549  you'll find my little bookshop at the corner of Church Street, and very
23550  happy to see you, I am sure.
23551  Maybe you collect yourself, sir.
23552  Here's 
23553 \noun on
23554 British
23555 \begin_inset space ~
23556 \end_inset
23557
23558 Birds
23559 \noun default
23560 , and 
23561 \noun on
23562 Catullus
23563 \noun default
23564 , and 
23565 \noun on
23566 The Holy War
23567 \noun default
23568 --a bargain, every one of them.
23569  With five volumes you could just fill that gap on that second shelf.
23570  It looks untidy, does it not, sir?
23571 \begin_inset Quotes erd
23572 \end_inset
23573
23574
23575 \end_layout
23576
23577 \begin_layout End Multiple Columns
23578
23579 \end_layout
23580
23581 \begin_layout Standard
23582 \begin_inset ERT
23583 status collapsed
23584
23585 \begin_layout Plain Layout
23586
23587
23588 \backslash
23589 setlength{
23590 \backslash
23591 columnseprule}{0pt}
23592 \end_layout
23593
23594 \end_inset
23595
23596
23597 \begin_inset Note Note
23598 status collapsed
23599
23600 \begin_layout Plain Layout
23601 go back to the default
23602 \end_layout
23603
23604 \end_inset
23605
23606
23607 \end_layout
23608
23609 \begin_layout Standard
23610 \begin_inset Newpage newpage
23611 \end_inset
23612
23613
23614 \end_layout
23615
23616 \begin_layout Section
23617 Non-standard Paragraph Shapes
23618 \end_layout
23619
23620 \begin_layout Standard
23621 \begin_inset ERT
23622 status collapsed
23623
23624 \begin_layout Plain Layout
23625
23626
23627 \backslash
23628 begin{sloppypar}
23629 \end_layout
23630
23631 \end_inset
23632
23633
23634 \end_layout
23635
23636 \begin_layout Standard
23637 \begin_inset ERT
23638 status collapsed
23639
23640 \begin_layout Plain Layout
23641
23642
23643 \backslash
23644 newdimen
23645 \backslash
23646 varunit 
23647 \end_layout
23648
23649 \begin_layout Plain Layout
23650
23651
23652 \backslash
23653 setlength{
23654 \backslash
23655 varunit}{4.5in}
23656 \end_layout
23657
23658 \end_inset
23659
23660
23661 \end_layout
23662
23663 \begin_layout Standard
23664 \noindent
23665 \begin_inset ERT
23666 status collapsed
23667
23668 \begin_layout Plain Layout
23669
23670
23671 \backslash
23672 parshape 19 0.45
23673 \backslash
23674 varunit 0.332
23675 \backslash
23676 varunit
23677 \end_layout
23678
23679 \begin_layout Plain Layout
23680
23681 0.40
23682 \backslash
23683 varunit 0.300
23684 \backslash
23685 varunit
23686 \end_layout
23687
23688 \begin_layout Plain Layout
23689
23690 0.35
23691 \backslash
23692 varunit 0.293
23693 \backslash
23694 varunit
23695 \end_layout
23696
23697 \begin_layout Plain Layout
23698
23699 0.30
23700 \backslash
23701 varunit 0.300
23702 \backslash
23703 varunit
23704 \end_layout
23705
23706 \begin_layout Plain Layout
23707
23708 0.25
23709 \backslash
23710 varunit 0.317
23711 \backslash
23712 varunit
23713 \end_layout
23714
23715 \begin_layout Plain Layout
23716
23717 0.20
23718 \backslash
23719 varunit 0.342
23720 \backslash
23721 varunit
23722 \end_layout
23723
23724 \begin_layout Plain Layout
23725
23726 0.15
23727 \backslash
23728 varunit 0.373
23729 \backslash
23730 varunit
23731 \end_layout
23732
23733 \begin_layout Plain Layout
23734
23735 0.10
23736 \backslash
23737 varunit 0.410
23738 \backslash
23739 varunit
23740 \end_layout
23741
23742 \begin_layout Plain Layout
23743
23744 0.05
23745 \backslash
23746 varunit 0.453
23747 \backslash
23748 varunit
23749 \end_layout
23750
23751 \begin_layout Plain Layout
23752
23753 0.00
23754 \backslash
23755 varunit 0.500
23756 \backslash
23757 varunit
23758 \end_layout
23759
23760 \begin_layout Plain Layout
23761
23762 0.05
23763 \backslash
23764 varunit 0.453
23765 \backslash
23766 varunit
23767 \end_layout
23768
23769 \begin_layout Plain Layout
23770
23771 0.10
23772 \backslash
23773 varunit 0.410
23774 \backslash
23775 varunit
23776 \end_layout
23777
23778 \begin_layout Plain Layout
23779
23780 0.15
23781 \backslash
23782 varunit 0.373
23783 \backslash
23784 varunit
23785 \end_layout
23786
23787 \begin_layout Plain Layout
23788
23789 0.20
23790 \backslash
23791 varunit 0.342
23792 \backslash
23793 varunit
23794 \end_layout
23795
23796 \begin_layout Plain Layout
23797
23798 0.25
23799 \backslash
23800 varunit 0.317
23801 \backslash
23802 varunit
23803 \end_layout
23804
23805 \begin_layout Plain Layout
23806
23807 0.30
23808 \backslash
23809 varunit 0.300
23810 \backslash
23811 varunit
23812 \end_layout
23813
23814 \begin_layout Plain Layout
23815
23816 0.35
23817 \backslash
23818 varunit 0.293
23819 \backslash
23820 varunit
23821 \end_layout
23822
23823 \begin_layout Plain Layout
23824
23825 0.40
23826 \backslash
23827 varunit 0.300
23828 \backslash
23829 varunit
23830 \end_layout
23831
23832 \begin_layout Plain Layout
23833
23834 0.45
23835 \backslash
23836 varunit 0.332
23837 \backslash
23838 varunit
23839 \end_layout
23840
23841 \begin_layout Plain Layout
23842
23843 \end_layout
23844
23845 \end_inset
23846
23847 There are times when the tyranny of rectangular paragraphs must be overthrown.
23848  In such situations, a call to the delightful plain TeX command 
23849 \family typewriter
23850
23851 \backslash
23852 parshape
23853 \family default
23854  is called for.
23855  As you can see, completely arbitrary shapes can be laid out with a suitable
23856  set of line length definitions.
23857  While this parshape may look a bit silly and useless, one could conceive
23858  of situations such as finely tuned dropped capitals, word wrapping around
23859  non-rectangular graphics, etc.
23860  which will benefit from such handcrafting.
23861 \end_layout
23862
23863 \begin_layout Standard
23864 \begin_inset VSpace bigskip
23865 \end_inset
23866
23867
23868 \end_layout
23869
23870 \begin_layout Standard
23871 The syntax is 
23872 \family typewriter
23873
23874 \backslash
23875 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23876  #nindent #nlength
23877 \family default
23878 , where 
23879 \family typewriter
23880 numlines
23881 \family default
23882  is the number of lines of text which define the paragraph.
23883  If there turn out to be fewer lines, the shape is truncated; if there are
23884  more, the excess lines have the same dimensions as the last line of the
23885  definition.
23886  The 
23887 \family typewriter
23888 #nindent
23889 \family default
23890  and 
23891 \family typewriter
23892 #nlength
23893 \family default
23894  entries specify the indentation of the line from the left margin, and the
23895  length of the line as measured from that point.
23896  The shape applies only to the current paragraph; everything is reset to
23897  normal for the next paragraph.
23898 \end_layout
23899
23900 \begin_layout Standard
23901 \begin_inset ERT
23902 status collapsed
23903
23904 \begin_layout Plain Layout
23905
23906
23907 \backslash
23908 end{sloppypar}
23909 \end_layout
23910
23911 \end_inset
23912
23913
23914 \end_layout
23915
23916 \begin_layout Bibliography
23917 \begin_inset CommandInset bibitem
23918 LatexCommand bibitem
23919 key "multicol"
23920
23921 \end_inset
23922
23923 Documentation of the LaTeX-package 
23924 \begin_inset CommandInset href
23925 LatexCommand href
23926 name "multicol"
23927 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23928
23929 \end_inset
23930
23931
23932 \begin_inset Index idx
23933 status collapsed
23934
23935 \begin_layout Plain Layout
23936 LaTeX-packages ! multicol
23937 \end_layout
23938
23939 \end_inset
23940
23941
23942 \end_layout
23943
23944 \end_body
23945 \end_document