]> git.lyx.org Git - features.git/blob - lib/doc/Additional.lyx
Additional.lyx: references to knitr & Sweave doc
[features.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 444
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_math auto
74 \font_default_family default
75 \use_non_tex_fonts false
76 \font_sc false
77 \font_osf false
78 \font_sf_scale 100
79 \font_tt_scale 100
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 true
134 \output_changes false
135 \html_math_output 0
136 \html_css_as_file 0
137 \html_be_strict true
138 \author 274215730 "scott" 
139 \end_header
140
141 \begin_body
142
143 \begin_layout Title
144 Additional LyX Features
145 \end_layout
146
147 \begin_layout Subtitle
148 Version 2.0.x
149 \end_layout
150
151 \begin_layout Author
152 by the LyX Team
153 \begin_inset Foot
154 status collapsed
155
156 \begin_layout Plain Layout
157 \noindent
158 Principal maintainer of this file is
159 \noun on
160  Richard Heck
161 \noun default
162 .
163  If you have comments or error corrections, please send them to the LyX
164  Documentation mailing list, 
165 \begin_inset Flex Code
166 status collapsed
167
168 \begin_layout Plain Layout
169 \noindent
170 <lyx-docs@lists.lyx.org>
171 \end_layout
172
173 \end_inset
174
175 .
176 \end_layout
177
178 \end_inset
179
180
181 \end_layout
182
183 \begin_layout Standard
184 \begin_inset CommandInset toc
185 LatexCommand tableofcontents
186
187 \end_inset
188
189
190 \end_layout
191
192 \begin_layout Chapter
193 Introduction
194 \end_layout
195
196 \begin_layout Standard
197 This manual is essentially Part II of the 
198 \emph on
199 User's Guide\SpecialChar \@.
200
201 \emph default
202  The reason for separating the two documents is simple: the 
203 \emph on
204 User's Guide
205 \emph default
206  is already quite lengthy, and it contains information on all of the basic
207  features one needs to know in order to prepare most documents.
208  However, the LyX Team has worked to make LyX extensible through various
209  configuration files and external packages.
210  That means that if you want to support the Fizzwizzle LaTeX package, you
211  can create a layout file (or module) for it without having to alter LyX
212  itself.
213  We've already had contributions of several new features this way, and some
214  of them are documented here.
215  There are also some more `advanced' features, such as how to control the
216  presentation of bibliographies and how to work with multi-part documents,
217  that are not covered in the 
218 \emph on
219 User's Guide
220 \emph default
221  and are discussed here.
222 \end_layout
223
224 \begin_layout Standard
225 This manual also documents some special features, like fax support, version
226  control, and SGML support, which require additional software to work properly.
227  There is also a chapter on LyX's support for HTML.
228  And lastly, there's a chapter of LaTeX tools and tips, things you can use
229  to spruce up your documents by directly using the powerful features of
230  LaTeX.
231  After all, LyX 
232 \emph on
233 is
234 \emph default
235  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
236 \end_layout
237
238 \begin_layout Standard
239 If you haven't read the 
240 \emph on
241 Introduction
242 \emph default
243  yet, you are definitely in the wrong manual.
244  The 
245 \emph on
246 Introduction
247 \emph default
248  is the first place to go, since it describes the notation and format of
249  all of the manuals.
250  You should also be thoroughly familiar with the 
251 \emph on
252 User's Guide
253 \emph default
254  and all of the basic features of LyX before attempting to read this one.
255 \end_layout
256
257 \begin_layout Standard
258 Since many of the topics in this manual depend heavily on LyX's interaction
259  with LaTeX, this first chapter covers the inner workings of LyX and how
260  to direct LyX to generate exactly the LaTeX code you want.
261  It is obviously for more seasoned LyX users.
262 \end_layout
263
264 \begin_layout Chapter
265 LyX and LaTeX
266 \end_layout
267
268 \begin_layout Section
269 How LyX Uses LaTeX
270 \end_layout
271
272 \begin_layout Standard
273 This chapter is for both TeX-nicians and the LaTeX-curious.
274  In it, we'll explain how LyX and LaTeX work together to produce printable
275  output.
276  This is the only place in any of the manuals where we assume you know something
277  about LaTeX.
278 \end_layout
279
280 \begin_layout Standard
281 At one time, LyX was called a 
282 \begin_inset Quotes eld
283 \end_inset
284
285 WYSIWYM frontend to LaTeX,
286 \begin_inset Quotes erd
287 \end_inset
288
289  but that's no longer true.
290  There are frontends to LaTeX out there.
291 \begin_inset Foot
292 status collapsed
293
294 \begin_layout Plain Layout
295 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
296  There are also the LaTeX modes for vi and emacs, of course.
297 \end_layout
298
299 \end_inset
300
301  These are basically text editors with the ability to run LaTeX and mark
302  any errors in the file you're editing.
303  Although LyX 
304 \emph on
305 is
306 \emph default
307  an editor, and it 
308 \emph on
309 does
310 \emph default
311  run LaTeX, and it also indicates errors in the file, it also does much,
312  much more.
313  For one thing, you don't need to know LaTeX to use LyX effectively.
314  And LyX has added its own extensions to LaTeX.
315  Try the following sometime: select 
316 \begin_inset Flex MenuItem
317 status collapsed
318
319 \begin_layout Plain Layout
320 Export\SpecialChar \menuseparator
321 LaTeX
322 \end_layout
323
324 \end_inset
325
326  from the 
327 \begin_inset Flex MenuItem
328 status collapsed
329
330 \begin_layout Plain Layout
331 File
332 \end_layout
333
334 \end_inset
335
336  menu (or 
337 \begin_inset Flex MenuItem
338 status collapsed
339
340 \begin_layout Plain Layout
341 View\SpecialChar \menuseparator
342 Source
343 \end_layout
344
345 \end_inset
346
347 ), then look at the preamble of the resulting 
348 \begin_inset Flex Code
349 status collapsed
350
351 \begin_layout Plain Layout
352 .tex
353 \end_layout
354
355 \end_inset
356
357  file.
358  You'll notice a variety of new macros defined specifically by LyX.
359  These macros are defined automatically, according to the features you use
360  in the document.
361 \end_layout
362
363 \begin_layout Standard
364 There are several commands that automatically invoke LaTeX.
365  They are:
366 \end_layout
367
368 \begin_layout Itemize
369 \begin_inset Flex MenuItem
370 status collapsed
371
372 \begin_layout Plain Layout
373 View\SpecialChar \menuseparator
374 View
375 \end_layout
376
377 \end_inset
378
379
380 \end_layout
381
382 \begin_layout Itemize
383 \begin_inset Flex MenuItem
384 status collapsed
385
386 \begin_layout Plain Layout
387 View\SpecialChar \menuseparator
388 Update
389 \end_layout
390
391 \end_inset
392
393
394 \end_layout
395
396 \begin_layout Itemize
397 \begin_inset Flex MenuItem
398 status collapsed
399
400 \begin_layout Plain Layout
401 File\SpecialChar \menuseparator
402 Print
403 \end_layout
404
405 \end_inset
406
407
408 \end_layout
409
410 \begin_layout Itemize
411 \begin_inset Flex MenuItem
412 status collapsed
413
414 \begin_layout Plain Layout
415 File\SpecialChar \menuseparator
416 Fax
417 \end_layout
418
419 \end_inset
420
421
422 \end_layout
423
424 \begin_layout Standard
425 They will only invoke LaTeX if the file has changed since the last time
426  LaTeX was run.
427  
428 \end_layout
429
430 \begin_layout Standard
431 When LyX runs LaTeX on the file you're editing, it performs these steps:
432 \end_layout
433
434 \begin_layout Enumerate
435 Convert the document to LaTeX and save to a file with the extension 
436 \begin_inset Flex Code
437 status collapsed
438
439 \begin_layout Plain Layout
440 .tex
441 \end_layout
442
443 \end_inset
444
445  in place of 
446 \begin_inset Flex Code
447 status collapsed
448
449 \begin_layout Plain Layout
450 .lyx
451 \end_layout
452
453 \end_inset
454
455 .
456 \end_layout
457
458 \begin_layout Enumerate
459 Run LaTeX on the 
460 \begin_inset Flex Code
461 status collapsed
462
463 \begin_layout Plain Layout
464 .tex
465 \end_layout
466
467 \end_inset
468
469  file (maybe several times), and run any other commands (such as 
470 \begin_inset Flex Code
471 status collapsed
472
473 \begin_layout Plain Layout
474 bibtex
475 \end_layout
476
477 \end_inset
478
479  or 
480 \begin_inset Flex Code
481 status collapsed
482
483 \begin_layout Plain Layout
484 makeindex
485 \end_layout
486
487 \end_inset
488
489 ) needed to compile the LaTeX file.
490 \end_layout
491
492 \begin_layout Enumerate
493 If there are any errors, show the error log.
494 \end_layout
495
496 \begin_layout Standard
497 If you have run LaTeX using 
498 \begin_inset Flex MenuItem
499 status collapsed
500
501 \begin_layout Plain Layout
502 View
503 \bar under
504 \SpecialChar \menuseparator
505
506 \bar default
507 DVI
508 \end_layout
509
510 \end_inset
511
512 , LyX then runs a DVI viewer to display the DVI-file.
513  If you have used 
514 \begin_inset Flex MenuItem
515 status collapsed
516
517 \begin_layout Plain Layout
518 View
519 \bar under
520 \SpecialChar \menuseparator
521
522 \bar default
523 PostScript
524 \end_layout
525
526 \end_inset
527
528 , LyX performs further steps:
529 \end_layout
530
531 \begin_layout Itemize
532 Run 
533 \begin_inset Flex Code
534 status collapsed
535
536 \begin_layout Plain Layout
537 dvips
538 \end_layout
539
540 \end_inset
541
542  to convert the DVI file to PostScript.
543 \end_layout
544
545 \begin_layout Itemize
546 Run a PostScript viewer, such as 
547 \begin_inset Flex Code
548 status collapsed
549
550 \begin_layout Plain Layout
551 ghostview
552 \end_layout
553
554 \end_inset
555
556 , to display the PostScript file.
557 \end_layout
558
559 \begin_layout Standard
560 LyX does similar things when viewing, or exporting, other formats.
561 \end_layout
562
563 \begin_layout Section
564 Translating LaTeX files into LyX
565 \end_layout
566
567 \begin_layout Standard
568 You can import a LaTeX file into LyX by using the 
569 \begin_inset Flex MenuItem
570 status collapsed
571
572 \begin_layout Plain Layout
573 File\SpecialChar \menuseparator
574 Import\SpecialChar \menuseparator
575 LaTeX
576 \end_layout
577
578 \end_inset
579
580  command in LyX.
581  This will call a program named 
582 \begin_inset Flex Code
583 status collapsed
584
585 \begin_layout Plain Layout
586 tex2lyx
587 \end_layout
588
589 \end_inset
590
591  which will create a file 
592 \begin_inset Flex Code
593 status collapsed
594
595 \begin_layout Plain Layout
596 foo.lyx
597 \end_layout
598
599 \end_inset
600
601  from the file 
602 \begin_inset Flex Code
603 status collapsed
604
605 \begin_layout Plain Layout
606 foo.tex
607 \end_layout
608
609 \end_inset
610
611 .
612  LyX will then open that file.
613 \begin_inset Foot
614 status collapsed
615
616 \begin_layout Plain Layout
617 \begin_inset Flex Code
618 status collapsed
619
620 \begin_layout Plain Layout
621 tex2lyx
622 \end_layout
623
624 \end_inset
625
626  can also be run from the command line, of course.
627 \end_layout
628
629 \end_inset
630
631
632 \end_layout
633
634 \begin_layout Standard
635 \begin_inset Flex Code
636 status collapsed
637
638 \begin_layout Plain Layout
639 tex2lyx
640 \end_layout
641
642 \end_inset
643
644  will translate most legal LaTeX, but not everything.
645  It will put things it doesn't understand into TeX code, so after translating
646  a file with 
647 \begin_inset Flex Code
648 status collapsed
649
650 \begin_layout Plain Layout
651 tex2lyx
652 \end_layout
653
654 \end_inset
655
656 , you can look for TeX code and hand-edit it until it looks right.
657 \end_layout
658
659 \begin_layout Standard
660 If you don't know what TeX code is, read the next section.
661 \end_layout
662
663 \begin_layout Section
664 \begin_inset CommandInset label
665 LatexCommand label
666 name "sec:Inserting-TeX-Code"
667
668 \end_inset
669
670 Inserting TeX Code into LyX Documents 
671 \end_layout
672
673 \begin_layout Standard
674 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
675  You can always insert TeX code into any LyX document.
676  LyX cannot, and will never be able to, display every possible LaTeX construct.
677  If ever you need to insert LaTeX commands into your LyX document, you can
678  use the 
679 \begin_inset Flex Code
680 status collapsed
681
682 \begin_layout Plain Layout
683 TeX Code
684 \end_layout
685
686 \end_inset
687
688  box, which you can insert into your document with 
689 \begin_inset Flex MenuItem
690 status collapsed
691
692 \begin_layout Plain Layout
693 Insert\SpecialChar \menuseparator
694 TeX Code
695 \end_layout
696
697 \end_inset
698
699  or the keyboard shortcut 
700 \begin_inset Info
701 type  "shortcut"
702 arg   "ert-insert"
703 \end_inset
704
705 .
706 \end_layout
707
708 \begin_layout Standard
709 Here's an example of inserting LaTeX commands in a LyX document.
710  The code looks like this:
711 \end_layout
712
713 \begin_layout LyX-Code
714
715 \backslash
716 begin{tabular}{ll}
717 \begin_inset Newline newline
718 \end_inset
719
720
721 \backslash
722 begin{minipage}{5cm}
723 \begin_inset Newline newline
724 \end_inset
725
726 This is an example of a minipage environment.
727  You 
728 \begin_inset Newline newline
729 \end_inset
730
731 can put nearly everything in it, even (non-floating) 
732 \begin_inset Newline newline
733 \end_inset
734
735 figures and tables.
736  
737 \begin_inset Newline newline
738 \end_inset
739
740
741 \backslash
742 end{minipage}
743 \begin_inset Newline newline
744 \end_inset
745
746 &
747 \begin_inset Newline newline
748 \end_inset
749
750
751 \backslash
752 begin{minipage}{5cm}
753 \begin_inset Newline newline
754 \end_inset
755
756
757 \backslash
758 begin{verbatim}
759 \begin_inset Newline newline
760 \end_inset
761
762
763 \backslash
764 begin{minipage}{5cm}
765 \begin_inset Newline newline
766 \end_inset
767
768 This ...
769  
770 \begin_inset Newline newline
771 \end_inset
772
773
774 \backslash
775 end{minipage}
776 \begin_inset Newline newline
777 \end_inset
778
779
780 \backslash
781 end{verbatim}
782 \begin_inset Newline newline
783 \end_inset
784
785
786 \backslash
787 end{minipage}
788 \begin_inset Newline newline
789 \end_inset
790
791
792 \backslash
793 end{tabular}
794 \end_layout
795
796 \begin_layout LyX-Code
797
798 \end_layout
799
800 \begin_layout Standard
801 The 
802 \begin_inset Flex Code
803 status collapsed
804
805 \begin_layout Plain Layout
806 TeX Code
807 \end_layout
808
809 \end_inset
810
811  box containing this text is directly after this paragraph.
812  Those of you reading the manual in LyX will only see the TeX code inset.
813  Those reading a printed version of the manuals will see the actual results:
814 \begin_inset VSpace bigskip
815 \end_inset
816
817
818 \end_layout
819
820 \begin_layout Standard
821 \begin_inset ERT
822 status open
823
824 \begin_layout Plain Layout
825
826
827 \backslash
828 begin{tabular}{ll}
829 \end_layout
830
831 \begin_layout Plain Layout
832
833
834 \backslash
835 begin{minipage}{5cm}
836 \end_layout
837
838 \begin_layout Plain Layout
839
840 This is an example of a minipage environment.
841  You can put nearly everything in it, even (non-floating) figures and tables.
842  
843 \end_layout
844
845 \begin_layout Plain Layout
846
847
848 \backslash
849 end{minipage}
850 \end_layout
851
852 \begin_layout Plain Layout
853
854 &
855 \end_layout
856
857 \begin_layout Plain Layout
858
859
860 \backslash
861 begin{minipage}{5cm}
862 \end_layout
863
864 \begin_layout Plain Layout
865
866
867 \backslash
868 begin{verbatim}
869 \end_layout
870
871 \begin_layout Plain Layout
872
873
874 \backslash
875 begin{minipage}{5cm}
876 \end_layout
877
878 \begin_layout Plain Layout
879
880 This ...
881  
882 \end_layout
883
884 \begin_layout Plain Layout
885
886
887 \backslash
888 end{minipage}
889 \end_layout
890
891 \begin_layout Plain Layout
892
893
894 \backslash
895 end{verbatim}
896 \end_layout
897
898 \begin_layout Plain Layout
899
900
901 \backslash
902 end{minipage}
903 \end_layout
904
905 \begin_layout Plain Layout
906
907
908 \backslash
909 end{tabular}
910 \end_layout
911
912 \end_inset
913
914
915 \begin_inset VSpace bigskip
916 \end_inset
917
918
919 \end_layout
920
921 \begin_layout Standard
922 In addition to using TeX code, you can also create a separate file containing
923  some complex LaTeX structure and then use 
924 \begin_inset Flex MenuItem
925 status collapsed
926
927 \begin_layout Plain Layout
928 Insert\SpecialChar \menuseparator
929 Child
930 \begin_inset space ~
931 \end_inset
932
933 Document
934 \end_layout
935
936 \end_inset
937
938  to include your file (you should select the type 
939 \begin_inset Flex Code
940 status collapsed
941
942 \begin_layout Plain Layout
943 Input
944 \end_layout
945
946 \end_inset
947
948 ).
949  We recommend that you only do this if you have a 
950 \begin_inset Flex Code
951 status collapsed
952
953 \begin_layout Plain Layout
954 .tex
955 \end_layout
956
957 \end_inset
958
959  file which you 
960 \emph on
961 know
962 \emph default
963  works already.
964  Otherwise, you'll have a big job tracking down LaTeX errors.
965 \end_layout
966
967 \begin_layout Standard
968 There are a few last points to emphasize:
969 \end_layout
970
971 \begin_layout Itemize
972 LyX 
973 \emph on
974 does not
975 \emph default
976  check if your LaTeX code is correct.
977 \end_layout
978
979 \begin_layout Itemize
980 Beware of reinventing the wheel.
981 \end_layout
982
983 \begin_layout Standard
984 On that last point, LyX does have quite a few features tucked into it, and
985  more are coming.
986  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
987  feature before you decide you have to do it by hand.
988  Moreover, there are numerous LaTeX packages out there to do all sorts of
989  things, from labels to envelopes to fancy multipage tables.
990  Check out 
991 \begin_inset CommandInset href
992 LatexCommand href
993 name "CTAN"
994 target "http://www.ctan.org/"
995
996 \end_inset
997
998  for details.
999 \end_layout
1000
1001 \begin_layout Standard
1002 If you do need to do some wild and fancy things within your document, be
1003  sure to check out a good LaTeX book for assistance.
1004  There are a number of them listed in the bibliography of the 
1005 \emph on
1006 User's Guide
1007 \emph default
1008 .
1009 \end_layout
1010
1011 \begin_layout Section
1012 LyX and the LaTeX Preamble
1013 \end_layout
1014
1015 \begin_layout Subsection
1016 About the LaTeX Preamble
1017 \end_layout
1018
1019 \begin_layout Standard
1020 If you already know LaTeX, there is no need to explain here what the preamble
1021  is good for.
1022  If you don't, the following will give you some ideas—we recommend again
1023  that you consult a LaTeX book for further information.
1024  In any case, you should read the points below, because they explain what
1025  you can do and what you don't need to do in the LaTeX preamble of a LyX
1026  document.
1027 \end_layout
1028
1029 \begin_layout Standard
1030 The LaTeX preamble comes at the very beginning of a document, 
1031 \emph on
1032 before
1033 \emph default
1034  the text.
1035  It serves to:
1036 \end_layout
1037
1038 \begin_layout Itemize
1039 Declare the document class.
1040  
1041 \begin_inset Newline newline
1042 \end_inset
1043
1044 LyX already does this for you.
1045  If you're a seasoned LaTeX-nician, and you have a custom document class
1046  you want to use, check out the 
1047 \emph on
1048 Customization Manual
1049 \emph default
1050  for information on how to make LyX interface to it.
1051 \end_layout
1052
1053 \begin_layout Itemize
1054 Declare the usage of packages.
1055  
1056 \begin_inset Newline newline
1057 \end_inset
1058
1059 LaTeX packages provide special commands, which are only available within
1060  a document when the package has been declared in the preamble.
1061  In addition to providing special commands, the inclusion of a package can
1062  change the document.
1063  For example, the package 
1064 \begin_inset Flex Code
1065 status collapsed
1066
1067 \begin_layout Plain Layout
1068 indentfirst
1069 \end_layout
1070
1071 \end_inset
1072
1073  forces all paragraphs to be indented.
1074  There are other packages for labels, envelopes, margins, etc.
1075  
1076 \end_layout
1077
1078 \begin_layout Itemize
1079 Set counters, variables, lengths and widths.
1080  
1081 \begin_inset Newline newline
1082 \end_inset
1083
1084 There are several LaTeX counters and variables that 
1085 \emph on
1086 must
1087 \emph default
1088  be set globally from within the preamble in order to have the desired effect.
1089  (There are variables that you can set and reset inside the document, too.)
1090  Margins are a good example of something that must be set in the preamble.
1091  Another example is the label format for lists.
1092  You can actually set these just about anywhere, but it's best to do it
1093  just once, inside the preamble.
1094 \end_layout
1095
1096 \begin_layout Itemize
1097 Declare user defined commands (with 
1098 \begin_inset Flex Code
1099 status collapsed
1100
1101 \begin_layout Plain Layout
1102
1103 \backslash
1104 newcommand
1105 \end_layout
1106
1107 \end_inset
1108
1109  or 
1110 \begin_inset Flex Code
1111 status collapsed
1112
1113 \begin_layout Plain Layout
1114
1115 \backslash
1116 renewcommand
1117 \end_layout
1118
1119 \end_inset
1120
1121 ).
1122 \begin_inset Newline newline
1123 \end_inset
1124
1125 These are abbreviations for LaTeX commands which appear very often inside
1126  a document.
1127  Although the preamble is a good place to declare such commands, they 
1128 \emph on
1129 can
1130 \emph default
1131  be declared anywhere (before they are used for the first time, of course).
1132  This can be useful if there is a lot of raw LaTeX code in your document,
1133  which normally should not be the case.
1134 \end_layout
1135
1136 \begin_layout Standard
1137 LyX adds its own set of definitions to the preamble of the 
1138 \begin_inset Flex Code
1139 status collapsed
1140
1141 \begin_layout Plain Layout
1142 .tex
1143 \end_layout
1144
1145 \end_inset
1146
1147  file it produces.
1148  This makes LaTeX files generated by LyX portable.
1149 \end_layout
1150
1151 \begin_layout Subsection
1152 Changing the Preamble
1153 \end_layout
1154
1155 \begin_layout Standard
1156 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1157  can't change them without patching LyX itself.
1158  You can, however, add your own stuff to the preamble by selecting 
1159 \begin_inset Flex MenuItem
1160 status collapsed
1161
1162 \begin_layout Plain Layout
1163 LaTeX
1164 \begin_inset space ~
1165 \end_inset
1166
1167 Preamble
1168 \end_layout
1169
1170 \end_inset
1171
1172  in the 
1173 \begin_inset Flex MenuItem
1174 status collapsed
1175
1176 \begin_layout Plain Layout
1177 Document\SpecialChar \menuseparator
1178 Settings
1179 \end_layout
1180
1181 \end_inset
1182
1183  dialog.
1184  LyX adds anything in the 
1185 \begin_inset Flex MenuItem
1186 status collapsed
1187
1188 \begin_layout Plain Layout
1189 Preamble
1190 \end_layout
1191
1192 \end_inset
1193
1194  dialog to its own built-in preamble.
1195  Before adding your own declarations in the preamble, you should make sure
1196  that LyX doesn't already support what you want to do.
1197  (Remember what we said about reinventing the wheel?) Also, 
1198 \emph on
1199 make sure your preamble code is correct
1200 \emph default
1201 .
1202  LyX doesn't check it for you.
1203  If there is an error, you're likely to get an error like 
1204 \begin_inset Quotes eld
1205 \end_inset
1206
1207
1208 \begin_inset Flex Code
1209 status collapsed
1210
1211 \begin_layout Plain Layout
1212 Missing 
1213 \backslash
1214 begin{document}
1215 \end_layout
1216
1217 \end_inset
1218
1219
1220 \begin_inset Quotes erd
1221 \end_inset
1222
1223 .
1224  If you see this error, check your preamble.
1225 \end_layout
1226
1227 \begin_layout Subsection
1228 Examples
1229 \end_layout
1230
1231 \begin_layout Standard
1232 Here are some examples of what you can add to a preamble, and what they
1233  do.
1234 \end_layout
1235
1236 \begin_layout Subsubsection
1237 Example #1: Offsets
1238 \end_layout
1239
1240 \begin_layout Standard
1241 There are two variables under LaTeX that control page position: 
1242 \begin_inset Flex Code
1243 status collapsed
1244
1245 \begin_layout Plain Layout
1246
1247 \backslash
1248 hoffset
1249 \end_layout
1250
1251 \end_inset
1252
1253  and 
1254 \begin_inset Flex Code
1255 status collapsed
1256
1257 \begin_layout Plain Layout
1258
1259 \backslash
1260 voffset
1261 \end_layout
1262
1263 \end_inset
1264
1265 .
1266  Their names should be self-explanatory.
1267  These variables are useful if you think for a moment about computer labels.
1268  Sometimes, the size of a print medium and the area of the medium that you
1269  can actually print on aren't the same.
1270  This is where 
1271 \begin_inset Flex Code
1272 status collapsed
1273
1274 \begin_layout Plain Layout
1275
1276 \backslash
1277 hoffset
1278 \end_layout
1279
1280 \end_inset
1281
1282  and 
1283 \begin_inset Flex Code
1284 status collapsed
1285
1286 \begin_layout Plain Layout
1287
1288 \backslash
1289 voffset
1290 \end_layout
1291
1292 \end_inset
1293
1294  come in.
1295 \end_layout
1296
1297 \begin_layout Standard
1298 The default values for 
1299 \begin_inset Flex Code
1300 status collapsed
1301
1302 \begin_layout Plain Layout
1303
1304 \backslash
1305 hoffset
1306 \end_layout
1307
1308 \end_inset
1309
1310  and 
1311 \begin_inset Flex Code
1312 status collapsed
1313
1314 \begin_layout Plain Layout
1315
1316 \backslash
1317 voffset
1318 \end_layout
1319
1320 \end_inset
1321
1322  are both 0
1323 \begin_inset space \thinspace{}
1324 \end_inset
1325
1326 points, i.
1327 \begin_inset space \thinspace{}
1328 \end_inset
1329
1330 e.
1331 \begin_inset space \space{}
1332 \end_inset
1333
1334 the page isn't shifted.
1335  Unfortunately, some DVI drivers always seem to shift the page.
1336  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1337  If you're using LyX on a system that you don't personally maintain, and
1338  your sysadmin is a doofus, 
1339 \begin_inset Flex Code
1340 status collapsed
1341
1342 \begin_layout Plain Layout
1343
1344 \backslash
1345 hoffset
1346 \end_layout
1347
1348 \end_inset
1349
1350  and 
1351 \begin_inset Flex Code
1352 status collapsed
1353
1354 \begin_layout Plain Layout
1355
1356 \backslash
1357 voffset
1358 \end_layout
1359
1360 \end_inset
1361
1362  can save the day.
1363  Suppose your left and top margins are always 0.5
1364 \begin_inset space \thinspace{}
1365 \end_inset
1366
1367 inches too big.
1368  You can add this to the preamble:
1369 \end_layout
1370
1371 \begin_layout LyX-Code
1372
1373 \backslash
1374 setlength{
1375 \backslash
1376 hoffset}{-0.5 in}
1377 \end_layout
1378
1379 \begin_layout LyX-Code
1380
1381 \backslash
1382 setlength{
1383 \backslash
1384 voffset}{-0.5 in}
1385 \end_layout
1386
1387 \begin_layout Standard
1388 and your margins should now be correct.
1389 \end_layout
1390
1391 \begin_layout Subsubsection
1392 Example #2: Labels
1393 \end_layout
1394
1395 \begin_layout Standard
1396 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1397  There's a rather nice package, available at your nearest CTAN archive,
1398  for printing sheets of labels: 
1399 \begin_inset Flex Code
1400 status collapsed
1401
1402 \begin_layout Plain Layout
1403 labels.sty
1404 \end_layout
1405
1406 \end_inset
1407
1408 .
1409  Now, your system may not have this package installed by default.
1410  We leave that up to you to check.
1411  You'll also want to read the documentation for it; we're not going to do
1412  that for you.
1413  Since this is an example, however, we'll give you an example of how you
1414  use this package.
1415 \end_layout
1416
1417 \begin_layout Standard
1418 First, make sure you're using the 
1419 \begin_inset Flex Code
1420 status collapsed
1421
1422 \begin_layout Plain Layout
1423 article
1424 \end_layout
1425
1426 \end_inset
1427
1428  document class.
1429  Next, you need to put the following in your preamble:
1430 \end_layout
1431
1432 \begin_layout LyX-Code
1433
1434 \backslash
1435 usepackage{labels}
1436 \end_layout
1437
1438 \begin_layout LyX-Code
1439
1440 \backslash
1441 LabelCols=3
1442 \end_layout
1443
1444 \begin_layout LyX-Code
1445
1446 \backslash
1447 LabelRows=7
1448 \end_layout
1449
1450 \begin_layout LyX-Code
1451
1452 \backslash
1453 LeftBorder=8mm
1454 \end_layout
1455
1456 \begin_layout LyX-Code
1457
1458 \backslash
1459 RightBorder=8mm
1460 \end_layout
1461
1462 \begin_layout LyX-Code
1463
1464 \backslash
1465 TopBorder=9mm
1466 \end_layout
1467
1468 \begin_layout LyX-Code
1469
1470 \backslash
1471 BottomBorder=2mm
1472 \end_layout
1473
1474 \begin_layout Standard
1475 This sets things up for Avery label sheets, stock #5360.
1476  You're now ready to print labels, but you'll need to insert LaTeX code,
1477  placing the commands 
1478 \begin_inset Flex Code
1479 status collapsed
1480
1481 \begin_layout Plain Layout
1482
1483 \backslash
1484 begin{labels}
1485 \end_layout
1486
1487 \end_inset
1488
1489  and 
1490 \begin_inset Flex Code
1491 status collapsed
1492
1493 \begin_layout Plain Layout
1494
1495 \backslash
1496 end{labels}
1497 \end_layout
1498
1499 \end_inset
1500
1501  around each label text.
1502  This and other special features of 
1503 \begin_inset Flex Code
1504 status collapsed
1505
1506 \begin_layout Plain Layout
1507 labels.sty
1508 \end_layout
1509
1510 \end_inset
1511
1512  are explained in its documentation.
1513 \end_layout
1514
1515 \begin_layout Standard
1516 Someday, someone may write a LyX layout file to support this package directly.
1517  Maybe that someone is you.
1518 \end_layout
1519
1520 \begin_layout Subsubsection
1521 Example #3: Paragraph Indentation
1522 \end_layout
1523
1524 \begin_layout Standard
1525 Americans are trained to indent the first line of 
1526 \emph on
1527 every
1528 \emph default
1529  paragraph.
1530  As with all of their other weird quirks, most Americans will whine and
1531  moan until they can have their way and indent the first line of all paragraphs.
1532  (Yes, we're joking.
1533  (We are?) 
1534 \emph on
1535 Yeah
1536 \emph default
1537 , we are.)
1538 \end_layout
1539
1540 \begin_layout Standard
1541 Of course, this behavior isn't standard typography.
1542  In books, you typically only indent the first line of a paragraph 
1543 \emph on
1544 if
1545 \emph default
1546  it follows another one.
1547  The idea behind indenting the first line of a paragraph is to distinguish
1548  neighboring paragraphs from one another.
1549  If there is no previous paragraph—for example, if it follows a figure or
1550  is the first paragraph in a section—then there is no need for indentation.
1551  
1552 \end_layout
1553
1554 \begin_layout Standard
1555 If you're a typical American (we're still joking!), though, you don't care
1556  about such esoteric things; you want your indentation! Add this to the
1557  preamble:
1558 \end_layout
1559
1560 \begin_layout LyX-Code
1561
1562 \backslash
1563 usepackage{indentfirst}
1564 \end_layout
1565
1566 \begin_layout Standard
1567 If your TeX distribution isn't braindead, you'll have this package, and
1568  all of your paragraphs will get the indentation the Founding Fathers intended
1569  they should have.
1570 \end_layout
1571
1572 \begin_layout Subsubsection
1573 Example #4: This Document
1574 \end_layout
1575
1576 \begin_layout Standard
1577 You can also check out the preamble of this document to get an idea of some
1578  of the advanced things you can do.
1579 \end_layout
1580
1581 \begin_layout Section
1582 LyX and LaTeX Errors
1583 \end_layout
1584
1585 \begin_layout Standard
1586 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1587  going.
1588  It then uses the logfile from the LaTeX run to do a post-mortem.
1589  After analyzing the logfile, LyX displays a dialog listing the errors.
1590  Clicking on any one of them will take you to the position in your LyX file
1591  where the error occurred.
1592 \begin_inset Foot
1593 status collapsed
1594
1595 \begin_layout Plain Layout
1596 Well, usually.
1597  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1598  right line.
1599  There are also cases where LaTeX reports the error on one line, but the
1600  actual error is earlier.
1601  This is not unlike forgetting a closing brace in a program: You'll get
1602  an error, but only later.
1603 \end_layout
1604
1605 \end_inset
1606
1607
1608 \end_layout
1609
1610 \begin_layout Standard
1611 Some folks also like to look at the log file directly: It is available from
1612  
1613 \begin_inset Flex MenuItem
1614 status collapsed
1615
1616 \begin_layout Plain Layout
1617 Document
1618 \bar under
1619 \SpecialChar \menuseparator
1620
1621 \bar default
1622 Latex
1623 \begin_inset space ~
1624 \end_inset
1625
1626 Log
1627 \end_layout
1628
1629 \end_inset
1630
1631 .
1632  There are some fairly common error messages and warnings.
1633  We'll cover those here.
1634  You should look at a good LaTeX book for a complete listing.
1635 \end_layout
1636
1637 \begin_layout Itemize
1638 \begin_inset Flex Code
1639 status collapsed
1640
1641 \begin_layout Plain Layout
1642 LaTeX Warning
1643 \end_layout
1644
1645 \end_inset
1646
1647
1648 \begin_inset Newline newline
1649 \end_inset
1650
1651 Anything beginning with these words is a warning message for the purpose
1652  of 
1653 \begin_inset Quotes eld
1654 \end_inset
1655
1656 debugging
1657 \begin_inset Quotes erd
1658 \end_inset
1659
1660  the LaTeX code itself.
1661  You'll get messages like this if you added or changed cross-references
1662  or bibliography entries, in which case, LaTeX is trying to tell you that
1663  you need to make another run.
1664  You can by-and-large ignore these.
1665 \end_layout
1666
1667 \begin_layout Itemize
1668 \begin_inset Flex Code
1669 status collapsed
1670
1671 \begin_layout Plain Layout
1672 LaTeX Font Warning
1673 \end_layout
1674
1675 \end_inset
1676
1677
1678 \begin_inset Newline newline
1679 \end_inset
1680
1681 Another warning message, this time about fonts which LaTeX couldn't find.
1682  The rest of the message will often say something about a replacement font
1683  that LaTeX used.
1684  You can safely ignore these, too.
1685 \end_layout
1686
1687 \begin_layout Itemize
1688 \begin_inset Flex Code
1689 status collapsed
1690
1691 \begin_layout Plain Layout
1692 Overfull 
1693 \backslash
1694 hbox
1695 \end_layout
1696
1697 \end_inset
1698
1699
1700 \begin_inset Newline newline
1701 \end_inset
1702
1703 LaTeX absolutely 
1704 \emph on
1705 loves
1706 \emph default
1707  to spew these out.
1708  They are warnings about lines that were too long and run past the right
1709  margin.
1710  Almost always, this is unnoticeable in the final output.
1711  (It can be just a point or two.) Or, only one or two characters extend past
1712  the margin.
1713  LaTeX seems to generate at least one of these messages for just about any
1714  document you write.
1715 \begin_inset Newline newline
1716 \end_inset
1717
1718 You can ignore these messages.
1719  Your eyes will tell you if there's a problem with something that's too
1720  wide; just look at the output.
1721 \begin_inset Foot
1722 status collapsed
1723
1724 \begin_layout Plain Layout
1725 You can also enable the `draft' option in 
1726 \begin_inset Flex MenuItem
1727 status collapsed
1728
1729 \begin_layout Plain Layout
1730 Document
1731 \bar under
1732 \SpecialChar \menuseparator
1733
1734 \bar default
1735 Settings
1736 \end_layout
1737
1738 \end_inset
1739
1740 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1741 \end_layout
1742
1743 \end_inset
1744
1745
1746 \end_layout
1747
1748 \begin_layout Itemize
1749 \begin_inset Flex Code
1750 status collapsed
1751
1752 \begin_layout Plain Layout
1753 Underfull 
1754 \backslash
1755 hbox
1756 \end_layout
1757
1758 \end_inset
1759
1760
1761 \begin_inset Newline newline
1762 \end_inset
1763
1764 Not quite as common as its cousin.
1765  LaTeX seems to like to print lines that are a bit too wide as opposed to
1766  ones that are a bit too narrow.
1767  We have no idea why.
1768 \end_layout
1769
1770 \begin_layout Itemize
1771 \begin_inset Flex Code
1772 status collapsed
1773
1774 \begin_layout Plain Layout
1775 Overfull 
1776 \backslash
1777 vbox
1778 \end_layout
1779
1780 \end_inset
1781
1782  and 
1783 \begin_inset Flex Code
1784 status collapsed
1785
1786 \begin_layout Plain Layout
1787 Underfull 
1788 \backslash
1789 vbox
1790 \end_layout
1791
1792 \end_inset
1793
1794
1795 \begin_inset Newline newline
1796 \end_inset
1797
1798 Warnings about troubles breaking the page.
1799  Once again, just look at the output.
1800  Your eyes will tell you where something has gone wrong.
1801 \end_layout
1802
1803 \begin_layout Itemize
1804 \begin_inset Flex Code
1805 status collapsed
1806
1807 \begin_layout Plain Layout
1808 LaTeX Error: File 
1809 \begin_inset Quotes els
1810 \end_inset
1811
1812 Xxxx
1813 \begin_inset Quotes ers
1814 \end_inset
1815
1816  not found
1817 \end_layout
1818
1819 \end_inset
1820
1821
1822 \begin_inset Newline newline
1823 \end_inset
1824
1825 The file 
1826 \begin_inset Quotes eld
1827 \end_inset
1828
1829 Xxxx
1830 \begin_inset Quotes erd
1831 \end_inset
1832
1833  isn't installed on this system.
1834  This usually appears because some package your document needs isn't installed.
1835  If you didn't touch the preamble or didn't use the 
1836 \begin_inset Flex Code
1837 status collapsed
1838
1839 \begin_layout Plain Layout
1840
1841 \backslash
1842 usepackage{}
1843 \end_layout
1844
1845 \end_inset
1846
1847  command, then one of the packages LyX tried to load is missing.
1848  Use 
1849 \begin_inset Flex MenuItem
1850 status collapsed
1851
1852 \begin_layout Plain Layout
1853 Help\SpecialChar \menuseparator
1854 LaTeX Configuration
1855 \end_layout
1856
1857 \end_inset
1858
1859  to get a list of packages that LyX knows about.
1860  This file is updated whenever you reconfigure LyX (using 
1861 \begin_inset Flex MenuItem
1862 status collapsed
1863
1864 \begin_layout Plain Layout
1865 Tools\SpecialChar \menuseparator
1866 Reconfigure
1867 \end_layout
1868
1869 \end_inset
1870
1871 ) and tells you which packages have been detected and what they do.
1872 \begin_inset Newline newline
1873 \end_inset
1874
1875 If you did use the 
1876 \begin_inset Flex Code
1877 status collapsed
1878
1879 \begin_layout Plain Layout
1880
1881 \backslash
1882 usepackage{}
1883 \end_layout
1884
1885 \end_inset
1886
1887  command and the package in question isn't installed, then you'll need to
1888  install it yourself.
1889 \end_layout
1890
1891 \begin_layout Itemize
1892 \begin_inset Flex Code
1893 status collapsed
1894
1895 \begin_layout Plain Layout
1896 LaTeX Error: Unknown option
1897 \end_layout
1898
1899 \end_inset
1900
1901
1902 \begin_inset Newline newline
1903 \end_inset
1904
1905 Error messages beginning with this are trying to tell you that you specified
1906  a bad or undefined option to a package.
1907  Check the package's documentation.
1908 \end_layout
1909
1910 \begin_layout Itemize
1911 \begin_inset Flex Code
1912 status collapsed
1913
1914 \begin_layout Plain Layout
1915 Undefined control sequence
1916 \end_layout
1917
1918 \end_inset
1919
1920
1921 \begin_inset Newline newline
1922 \end_inset
1923
1924 If you've inserted LaTeX code into your document, but made a typo, you'll
1925  get one of these.
1926  You may have forgotten to load a package.
1927  In any case, this error message usually means that you used an undefined
1928  command.
1929  
1930 \end_layout
1931
1932 \begin_layout Standard
1933 There are other error and warning messages.
1934  Some are self-explanatory.
1935  These are usually LaTeX messages.
1936  Others are downright cryptic.
1937  These are usually TeX error messages, and we really have 
1938 \emph on
1939 no clue
1940 \emph default
1941  what they mean or how to decipher them.
1942  No-one does.
1943 \end_layout
1944
1945 \begin_layout Standard
1946 There's a general sequence you should follow if you get error messages:
1947 \end_layout
1948
1949 \begin_layout Enumerate
1950 Look at the LaTeX code you inserted for typos.
1951 \end_layout
1952
1953 \begin_layout Enumerate
1954 If there are no typos, check that you used the command(s) correctly.
1955 \end_layout
1956
1957 \begin_layout Enumerate
1958 If you get a bunch of error boxes piled up at the very top of the document—and
1959  especially if you see a 
1960 \begin_inset Quotes eld
1961 \end_inset
1962
1963
1964 \begin_inset Flex Code
1965 status collapsed
1966
1967 \begin_layout Plain Layout
1968 Missing 
1969 \backslash
1970 begin{document}
1971 \end_layout
1972
1973 \end_inset
1974
1975
1976 \begin_inset Quotes erd
1977 \end_inset
1978
1979  error—it means that there are errors in the preamble.
1980  Start debugging your preamble.
1981 \end_layout
1982
1983 \begin_layout Enumerate
1984 If you didn't add anything to the preamble and didn't add any LaTeX code
1985  to the document, the first suspect is your LaTeX distribution itself.
1986  Check for missing packages and install them.
1987 \end_layout
1988
1989 \begin_layout Enumerate
1990 Okay, so there are no missing packages.
1991  Did you use any of the fine-tuning options in LyX? Specifically, did you
1992  
1993 \emph on
1994 misuse
1995 \emph default
1996  any of them, like trying to manually insert lots of 
1997 \begin_inset Flex Code
1998 status collapsed
1999
2000 \begin_layout Plain Layout
2001 Protected
2002 \begin_inset space ~
2003 \end_inset
2004
2005 Blanks
2006 \end_layout
2007
2008 \end_inset
2009
2010
2011 \begin_inset Flex Code
2012 status collapsed
2013
2014 \begin_layout Plain Layout
2015 Linebreaks
2016 \end_layout
2017
2018 \end_inset
2019
2020 , or 
2021 \begin_inset Flex Code
2022 status collapsed
2023
2024 \begin_layout Plain Layout
2025 Pagebreaks
2026 \end_layout
2027
2028 \end_inset
2029
2030 ? Did you try to kludge something together with these instead of using the
2031  appropriate paragraph environment?
2032 \end_layout
2033
2034 \begin_layout Enumerate
2035 All right, you didn't use any of the fine-tuning options, you played by
2036  the rules.
2037  Did you try to pull a fancy maneuver? Did you do something funky inside
2038  a table or an equation, like inserting a graphic into a table cell?
2039 \end_layout
2040
2041 \begin_layout Enumerate
2042 Do you have long sections of text where LaTeX cannot find a place to break
2043  a line? By default, LaTeX is rather strict about how much extra inter-word
2044  spacing it will add in order to break a line.
2045  Preferably, you should rework the paragraph to avoid the problem.
2046  If this isn't an option, you can wrap your text in 
2047 \begin_inset Flex Code
2048 status collapsed
2049
2050 \begin_layout Plain Layout
2051
2052 \backslash
2053 sloppypar
2054 \end_layout
2055
2056 \end_inset
2057
2058  to make LaTeX's line breaking more, well, sloppy.
2059 \end_layout
2060
2061 \begin_layout Enumerate
2062 Did you go overboard with the nesting? LyX (currently) doesn't check to
2063  make sure you're in the limits for nesting environments.
2064  If you nested a bunch of environments to the 
2065 \begin_inset Formula $17^{\mathrm{th}}$
2066 \end_inset
2067
2068  level, that's the problem.
2069  (The limit in LaTeX is five.)
2070 \end_layout
2071
2072 \begin_layout Enumerate
2073 Okay, you didn't get any error messages, but your output looks awful.
2074  If you have a table or figure that's too wide or long for the page, you
2075  need to:
2076 \end_layout
2077
2078 \begin_deeper
2079 \begin_layout Enumerate
2080 rescale the figure so it fits.
2081 \end_layout
2082
2083 \begin_layout Enumerate
2084 trim down the table so it fits.
2085 \end_layout
2086
2087 \end_deeper
2088 \begin_layout Enumerate
2089 If something else is wrong with the output, and you didn't try to pull anything
2090  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2091 \end_layout
2092
2093 \begin_layout Standard
2094 If all this doesn't help—well, then 
2095 \emph on
2096 perhaps
2097 \emph default
2098  you might have found a bug in LyX\SpecialChar \ldots{}
2099 .
2100 \end_layout
2101
2102 \begin_layout Chapter
2103 Supplemental Tools
2104 \end_layout
2105
2106 \begin_layout Section
2107 Customizing Bibliographies with BibTeX
2108 \end_layout
2109
2110 \begin_layout Standard
2111 The most basic information about how to use BibTeX with LyX is contained
2112  in the section 
2113 \emph on
2114 Bibliography databases (BibTeX)
2115 \emph default
2116  of the 
2117 \emph on
2118 User's Guide
2119 \emph default
2120 .
2121  The following subsections explain special bibliography features supported
2122  by LyX.
2123 \end_layout
2124
2125 \begin_layout Subsection
2126 Alternative Citation Styles
2127 \end_layout
2128
2129 \begin_layout Standard
2130 Standard BibTeX uses numbers (e.
2131 \begin_inset space \thinspace{}
2132 \end_inset
2133
2134 g.
2135 \begin_inset space \space{}
2136 \end_inset
2137
2138
2139 \begin_inset Quotes eld
2140 \end_inset
2141
2142 [12]
2143 \begin_inset Quotes erd
2144 \end_inset
2145
2146 ) to refer to a cited work.
2147  However, in many scientific disciplines, other citation styles are in use.
2148  The most common one is the author-year style (e.
2149 \begin_inset space \thinspace{}
2150 \end_inset
2151
2152 g.
2153 \begin_inset space \space{}
2154 \end_inset
2155
2156
2157 \begin_inset Quotes eld
2158 \end_inset
2159
2160 Knuth 1984a
2161 \begin_inset Quotes erd
2162 \end_inset
2163
2164 ).
2165  LyX supports two packages that provide this style, 
2166 \begin_inset Flex Code
2167 status collapsed
2168
2169 \begin_layout Plain Layout
2170 natbib
2171 \end_layout
2172
2173 \end_inset
2174
2175  and 
2176 \begin_inset Flex Code
2177 status collapsed
2178
2179 \begin_layout Plain Layout
2180 jurabib
2181 \end_layout
2182
2183 \end_inset
2184
2185 .
2186  Both packages have their pros and cons, which cannot be listed in detail.
2187  If you only want to have simple author-year (or author-numerical) style,
2188  or if you want to use one of the countless style files for 
2189 \begin_inset Flex Code
2190 status collapsed
2191
2192 \begin_layout Plain Layout
2193 natbib
2194 \end_layout
2195
2196 \end_inset
2197
2198 , then the established 
2199 \begin_inset Flex Code
2200 status collapsed
2201
2202 \begin_layout Plain Layout
2203 natbib
2204 \end_layout
2205
2206 \end_inset
2207
2208  package is probably your choice.
2209  If you need special features like short title references, ibidem etc., you
2210  might consider the 
2211 \begin_inset Flex Code
2212 status collapsed
2213
2214 \begin_layout Plain Layout
2215 jurabib
2216 \end_layout
2217
2218 \end_inset
2219
2220  package.
2221 \end_layout
2222
2223 \begin_layout Standard
2224 The handling of both packages in LyX is basically the same.
2225  Go to 
2226 \begin_inset Flex MenuItem
2227 status collapsed
2228
2229 \begin_layout Plain Layout
2230 Document\SpecialChar \menuseparator
2231 Settings
2232 \end_layout
2233
2234 \end_inset
2235
2236  and select under 
2237 \begin_inset Flex MenuItem
2238 status collapsed
2239
2240 \begin_layout Plain Layout
2241 Bibliography
2242 \end_layout
2243
2244 \end_inset
2245
2246  the option 
2247 \begin_inset Flex MenuItem
2248 status collapsed
2249
2250 \begin_layout Plain Layout
2251 Natbib
2252 \end_layout
2253
2254 \end_inset
2255
2256  or 
2257 \begin_inset Flex MenuItem
2258 status collapsed
2259
2260 \begin_layout Plain Layout
2261 Jurabib
2262 \end_layout
2263
2264 \end_inset
2265
2266 .
2267  With both packages, you will get some extra features in the citation dialog
2268  and you can select the style of the reference (
2269 \begin_inset Quotes eld
2270 \end_inset
2271
2272 Knuth 1984
2273 \begin_inset Quotes erd
2274 \end_inset
2275
2276
2277 \begin_inset Quotes eld
2278 \end_inset
2279
2280 Knuth (1984)
2281 \begin_inset Quotes erd
2282 \end_inset
2283
2284
2285 \begin_inset Quotes eld
2286 \end_inset
2287
2288 Knuth, 1984
2289 \begin_inset Quotes erd
2290 \end_inset
2291
2292
2293 \begin_inset Quotes eld
2294 \end_inset
2295
2296 1984
2297 \begin_inset Quotes erd
2298 \end_inset
2299
2300  etc.).
2301  Note that both packages need specifically designed style files.
2302  They both ship their own, but there are lots of additional style files,
2303  and there is even an interactive style file builder
2304 \begin_inset Foot
2305 status collapsed
2306
2307 \begin_layout Plain Layout
2308 See 
2309 \begin_inset Flex URL
2310 status open
2311
2312 \begin_layout Plain Layout
2313
2314 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2315 \end_layout
2316
2317 \end_inset
2318
2319
2320 \end_layout
2321
2322 \end_inset
2323
2324  for 
2325 \begin_inset Flex Code
2326 status collapsed
2327
2328 \begin_layout Plain Layout
2329 natbib
2330 \end_layout
2331
2332 \end_inset
2333
2334 .
2335 \end_layout
2336
2337 \begin_layout Subsection
2338 Sectioned Bibliographies
2339 \end_layout
2340
2341 \begin_layout Standard
2342 Sometimes you might need to divide your bibliography into several sections.
2343  If you are for instance a historian, the possibility to separate sources
2344  and scientific works is most likely a 
2345 \begin_inset Quotes eld
2346 \end_inset
2347
2348 must have
2349 \begin_inset Quotes erd
2350 \end_inset
2351
2352 .
2353  Unfortunately, BibTeX itself does not allow you to do this.
2354  But with the help of some LaTeX packages, BibTeX can be extended to fit
2355  your needs.
2356 \end_layout
2357
2358 \begin_layout Standard
2359 LyX provides native support for one of these packages, 
2360 \family typewriter
2361 bibtopic
2362 \family default
2363 .
2364 \begin_inset Foot
2365 status collapsed
2366
2367 \begin_layout Plain Layout
2368 Available from 
2369 \begin_inset Flex URL
2370 status open
2371
2372 \begin_layout Plain Layout
2373
2374 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2375 \end_layout
2376
2377 \end_inset
2378
2379
2380 \end_layout
2381
2382 \end_inset
2383
2384  The advantage of this package (compared to other packages like 
2385 \family typewriter
2386 multibib
2387 \family default
2388 ) is that you don't need to define new citation commands.
2389  Instead, you need to prepare different bibliographic databases which include
2390  the entries for the different sections of the bibliography.
2391  For example: If you want to divide your bibliography into the sections
2392  
2393 \begin_inset Quotes eld
2394 \end_inset
2395
2396 Sources
2397 \begin_inset Quotes erd
2398 \end_inset
2399
2400  and 
2401 \begin_inset Quotes eld
2402 \end_inset
2403
2404 Scientific works
2405 \begin_inset Quotes erd
2406 \end_inset
2407
2408 , you first need to create two bibliographic databases, e.
2409 \begin_inset space \thinspace{}
2410 \end_inset
2411
2412 g.
2413 \begin_inset space \space{}
2414 \end_inset
2415
2416
2417 \begin_inset Flex Code
2418 status collapsed
2419
2420 \begin_layout Plain Layout
2421 sources.bib
2422 \end_layout
2423
2424 \end_inset
2425
2426  and 
2427 \begin_inset Flex Code
2428 status collapsed
2429
2430 \begin_layout Plain Layout
2431 scientific.bib
2432 \end_layout
2433
2434 \end_inset
2435
2436 .
2437  
2438 \end_layout
2439
2440 \begin_layout Standard
2441 Go to 
2442 \begin_inset Flex MenuItem
2443 status collapsed
2444
2445 \begin_layout Plain Layout
2446 Document\SpecialChar \menuseparator
2447 Settings
2448 \end_layout
2449
2450 \end_inset
2451
2452  and check under 
2453 \begin_inset Flex MenuItem
2454 status collapsed
2455
2456 \begin_layout Plain Layout
2457 Bibliography
2458 \end_layout
2459
2460 \end_inset
2461
2462  the option 
2463 \begin_inset Flex MenuItem
2464 status collapsed
2465
2466 \begin_layout Plain Layout
2467 Sectioned bibliography
2468 \end_layout
2469
2470 \end_inset
2471
2472 .
2473  Now you can insert multiple BibTeX bibliographies, one for each section
2474  of your bibliography.
2475  Returning to our example: Insert the BibTeX bibliography 
2476 \begin_inset Flex Code
2477 status collapsed
2478
2479 \begin_layout Plain Layout
2480 sources.bib
2481 \end_layout
2482
2483 \end_inset
2484
2485  and a second one for the database 
2486 \begin_inset Flex Code
2487 status collapsed
2488
2489 \begin_layout Plain Layout
2490 scientific.bib
2491 \end_layout
2492
2493 \end_inset
2494
2495 .
2496  You are free to use the same or different styles for each section.
2497  Additionally, you can choose if the bibliography section should contain
2498  
2499 \begin_inset Quotes eld
2500 \end_inset
2501
2502 all cited references
2503 \begin_inset Quotes erd
2504 \end_inset
2505
2506  of the specified database(s) (which is the default), 
2507 \begin_inset Quotes eld
2508 \end_inset
2509
2510 all uncited references
2511 \begin_inset Quotes erd
2512 \end_inset
2513
2514  or even 
2515 \begin_inset Quotes eld
2516 \end_inset
2517
2518 all references
2519 \begin_inset Quotes erd
2520 \end_inset
2521
2522 .
2523  This might be useful if you would like to separate your bibliography into
2524  three sections: 
2525 \begin_inset Quotes eld
2526 \end_inset
2527
2528 Cited sources
2529 \begin_inset Quotes erd
2530 \end_inset
2531
2532
2533 \begin_inset Quotes eld
2534 \end_inset
2535
2536 Uncited sources
2537 \begin_inset Quotes erd
2538 \end_inset
2539
2540 , and 
2541 \begin_inset Quotes eld
2542 \end_inset
2543
2544 Scientific works
2545 \begin_inset Quotes erd
2546 \end_inset
2547
2548 .
2549  The titles for the sections can be added as ordinary sections or subsections.
2550  Since 
2551 \begin_inset Flex Code
2552 status collapsed
2553
2554 \begin_layout Plain Layout
2555 bibtopic
2556 \end_layout
2557
2558 \end_inset
2559
2560  removes the bibliography title, you have to manually re-add that, too (as
2561  a chapter* or section*, for instance).
2562 \end_layout
2563
2564 \begin_layout Subsection
2565 Multiple Bibliographies
2566 \end_layout
2567
2568 \begin_layout Standard
2569 Multiple bibliographies, e.
2570 \begin_inset space \thinspace{}
2571 \end_inset
2572
2573 g.
2574 \begin_inset space \space{}
2575 \end_inset
2576
2577 a bibliography for each section or chapter of the document, are not supported
2578  by BibTeX itself.
2579  But the 
2580 \begin_inset Flex Code
2581 status collapsed
2582
2583 \begin_layout Plain Layout
2584 bibtopic
2585 \end_layout
2586
2587 \end_inset
2588
2589  package, which is used for the creation of sectioned bibliographies in
2590  LyX (see the previous section), provides an easy way to solve this task,
2591  if you are willing to use some 
2592 \begin_inset Flex MenuItem
2593 status collapsed
2594
2595 \begin_layout Plain Layout
2596 TeX Code
2597 \end_layout
2598
2599 \end_inset
2600
2601  (see section
2602 \begin_inset space ~
2603 \end_inset
2604
2605
2606 \begin_inset CommandInset ref
2607 LatexCommand ref
2608 reference "sec:Inserting-TeX-Code"
2609
2610 \end_inset
2611
2612 ).
2613 \begin_inset Foot
2614 status collapsed
2615
2616 \begin_layout Plain Layout
2617 An alternative approach is to use the 
2618 \begin_inset Flex Code
2619 status collapsed
2620
2621 \begin_layout Plain Layout
2622 chapterbib
2623 \end_layout
2624
2625 \end_inset
2626
2627  or 
2628 \begin_inset Flex Code
2629 status collapsed
2630
2631 \begin_layout Plain Layout
2632 bibunits
2633 \end_layout
2634
2635 \end_inset
2636
2637  package, respectively.
2638 \end_layout
2639
2640 \end_inset
2641
2642
2643 \end_layout
2644
2645 \begin_layout Standard
2646 First go to 
2647 \begin_inset Flex MenuItem
2648 status collapsed
2649
2650 \begin_layout Plain Layout
2651 Document\SpecialChar \menuseparator
2652 Settings
2653 \end_layout
2654
2655 \end_inset
2656
2657  and under 
2658 \begin_inset Flex MenuItem
2659 status collapsed
2660
2661 \begin_layout Plain Layout
2662 Bibliography
2663 \end_layout
2664
2665 \end_inset
2666
2667  check 
2668 \begin_inset Flex MenuItem
2669 status collapsed
2670
2671 \begin_layout Plain Layout
2672 Sectioned bibliography
2673 \end_layout
2674
2675 \end_inset
2676
2677 .
2678  In the document, you have to enclose the sections, which shall contain
2679  their own bibliography (including the BibTeX bibliography itself), between
2680  
2681 \begin_inset Flex Code
2682 status collapsed
2683
2684 \begin_layout Plain Layout
2685
2686 \backslash
2687 begin{btUnit}
2688 \end_layout
2689
2690 \end_inset
2691
2692  and 
2693 \begin_inset Flex Code
2694 status collapsed
2695
2696 \begin_layout Plain Layout
2697
2698 \backslash
2699 end{btUnit}
2700 \end_layout
2701
2702 \end_inset
2703
2704  (those commands have to be inserted as TeX code).
2705  The bibliography will contain all references that have been cited in the
2706  current 
2707 \begin_inset Flex Code
2708 status collapsed
2709
2710 \begin_layout Plain Layout
2711 btUnit
2712 \end_layout
2713
2714 \end_inset
2715
2716 .
2717  
2718 \series bold
2719 Note:
2720 \series default
2721  If you are using this approach, then every citation reference has to be
2722  inside some 
2723 \begin_inset Flex Code
2724 status collapsed
2725
2726 \begin_layout Plain Layout
2727 btUnit
2728 \end_layout
2729
2730 \end_inset
2731
2732 .
2733  Also, the 
2734 \begin_inset Flex Code
2735 status collapsed
2736
2737 \begin_layout Plain Layout
2738 btUnit
2739 \end_layout
2740
2741 \end_inset
2742
2743 s cannot be nested.
2744 \end_layout
2745
2746 \begin_layout Section
2747 Multipart Documents
2748 \end_layout
2749
2750 \begin_layout Subsection
2751 General Operation
2752 \end_layout
2753
2754 \begin_layout Standard
2755 When you are working on a large file with many sections, it is often convenient
2756  to break up the document into several files, or perhaps you have something
2757  where a table may change from time to time, but the preceding text does
2758  not.
2759  In these cases, you should seriously consider using multipart documents.
2760  For example, scientific papers often have five major sections: the introduction
2761 , observations, results, discussion, and conclusion.
2762  Each of these could be its own separate LyX file, with one 
2763 \begin_inset Quotes eld
2764 \end_inset
2765
2766 master
2767 \begin_inset Quotes erd
2768 \end_inset
2769
2770  file which contains the title, authors, abstract, references, etc., plus
2771  the five included files.
2772  It is important to note that each of these files is a full LyX file which
2773  can be formatted and printed on its own, as well as included in a master
2774  file.
2775  Each of these files must have the same document class, however—don't attempt
2776  to mix book classes with article classes.
2777  You may also include LaTeX files; however, these files must not have their
2778  own preamble (i.
2779 \begin_inset space \thinspace{}
2780 \end_inset
2781
2782 e.
2783 \begin_inset space \space{}
2784 \end_inset
2785
2786 everything up to and including the 
2787 \begin_inset Flex Code
2788 status collapsed
2789
2790 \begin_layout Plain Layout
2791
2792 \backslash
2793 begin{document}
2794 \end_layout
2795
2796 \end_inset
2797
2798  line as well as the 
2799 \begin_inset Flex Code
2800 status collapsed
2801
2802 \begin_layout Plain Layout
2803
2804 \backslash
2805 end{document}
2806 \end_layout
2807
2808 \end_inset
2809
2810  line must be deleted) or else errors will be generated when you try to
2811  make a DVI file.
2812 \end_layout
2813
2814 \begin_layout Standard
2815 LyX allows you to include files quite easily with 
2816 \begin_inset Flex MenuItem
2817 status collapsed
2818
2819 \begin_layout Plain Layout
2820 Insert\SpecialChar \menuseparator
2821 ChiId
2822 \begin_inset space ~
2823 \end_inset
2824
2825 Document
2826 \end_layout
2827
2828 \end_inset
2829
2830 .
2831  When you click on this selection a small box is inserted into the file
2832  at the current cursor location.
2833  Clicking on the box raises a dialog which allows you to select the file
2834  to be included, and the method of its inclusion.
2835  
2836 \end_layout
2837
2838 \begin_layout Standard
2839 The file selection box should by now be obvious.
2840  The three inclusion methods are 
2841 \begin_inset Quotes eld
2842 \end_inset
2843
2844 include
2845 \begin_inset Quotes erd
2846 \end_inset
2847
2848
2849 \begin_inset Quotes eld
2850 \end_inset
2851
2852 input
2853 \begin_inset Quotes erd
2854 \end_inset
2855
2856 , and 
2857 \begin_inset Quotes eld
2858 \end_inset
2859
2860 verbatim
2861 \begin_inset Quotes erd
2862 \end_inset
2863
2864 .
2865  The difference between 
2866 \begin_inset Quotes eld
2867 \end_inset
2868
2869 include
2870 \begin_inset Quotes erd
2871 \end_inset
2872
2873  and 
2874 \begin_inset Quotes eld
2875 \end_inset
2876
2877 input
2878 \begin_inset Quotes erd
2879 \end_inset
2880
2881  is really only meaningful to LaTeXperts, but the practical difference is
2882  that files that are 
2883 \begin_inset Quotes eld
2884 \end_inset
2885
2886 included
2887 \begin_inset Quotes erd
2888 \end_inset
2889
2890  are typeset beginning on a new page, while files that are 
2891 \begin_inset Quotes eld
2892 \end_inset
2893
2894 inputted
2895 \begin_inset Quotes erd
2896 \end_inset
2897
2898  are typeset starting on the current page.
2899 \end_layout
2900
2901 \begin_layout Standard
2902 Generally, the master file is converted into a full LaTeX file before typesettin
2903 g, while the included files are converted to LaTeX files that do not have
2904  all the preamble information.
2905 \end_layout
2906
2907 \begin_layout Standard
2908
2909 \begin_inset Quotes eld
2910 \end_inset
2911
2912 verbatim
2913 \begin_inset Quotes erd
2914 \end_inset
2915
2916  included file allows you to include a file typeset exactly as it appears
2917  in the file, i.
2918 \begin_inset space \thinspace{}
2919 \end_inset
2920
2921 e.
2922 \begin_inset space \space{}
2923 \end_inset
2924
2925 in 
2926 \begin_inset Flex Code
2927 status collapsed
2928
2929 \begin_layout Plain Layout
2930 verbatim
2931 \end_layout
2932
2933 \end_inset
2934
2935  mode, with the characters set in a fixed-width typewriter font.
2936  Normally, spaces in this file are invisible, though two consecutive spaces
2937  are conserved, unlike LyX's normal treatment of spaces.
2938  However, setting the 
2939 \begin_inset Flex MenuItem
2940 status collapsed
2941
2942 \begin_layout Plain Layout
2943 Mark
2944 \begin_inset space ~
2945 \end_inset
2946
2947 spaces
2948 \begin_inset space ~
2949 \end_inset
2950
2951 in
2952 \begin_inset space ~
2953 \end_inset
2954
2955 output
2956 \end_layout
2957
2958 \end_inset
2959
2960  checkbox typesets a mark to unambiguously define the presence of a space.
2961  
2962 \end_layout
2963
2964 \begin_layout Subsection
2965 Cross-References Between Files
2966 \end_layout
2967
2968 \begin_layout Standard
2969 \begin_inset Box Shadowbox
2970 position "t"
2971 hor_pos "c"
2972 has_inner_box 1
2973 inner_pos "t"
2974 use_parbox 0
2975 use_makebox 0
2976 width "100col%"
2977 special "none"
2978 height "1in"
2979 height_special "totalheight"
2980 status open
2981
2982 \begin_layout Plain Layout
2983 This section is somewhat out of date.
2984  Need to describe default master documents and how children are opened when
2985  the master is.
2986  [[FIXME]]
2987 \end_layout
2988
2989 \end_inset
2990
2991
2992 \end_layout
2993
2994 \begin_layout Standard
2995 It is possible to set up cross-references between the different files.
2996  First, open all the files in question: let's call them A and B in a two
2997  file example, where B is included in A.
2998  Let's say you insert a label in A, then want to reference it in B.
2999  Open the cross-reference dialog whilst in document B, and you can select
3000  the 
3001 \begin_inset Quotes eld
3002 \end_inset
3003
3004 buffer
3005 \begin_inset Quotes erd
3006 \end_inset
3007
3008  to use.
3009 \end_layout
3010
3011 \begin_layout Subsection
3012 Bibliography Lists in all Subdocuments
3013 \end_layout
3014
3015 \begin_layout Standard
3016 \begin_inset Box Frameless
3017 position "t"
3018 hor_pos "c"
3019 has_inner_box 1
3020 inner_pos "t"
3021 use_parbox 0
3022 use_makebox 0
3023 width "100col%"
3024 special "none"
3025 height "1in"
3026 height_special "totalheight"
3027 status open
3028
3029 \begin_layout Plain Layout
3030 This section also needs updating.
3031  There is now material about this on the wiki, and it could be copied here.
3032 \end_layout
3033
3034 \end_inset
3035
3036
3037 \end_layout
3038
3039 \begin_layout Standard
3040 Copy the bibliography list with all entries to all subdocuments and transform
3041  them to a comment.
3042  This way LyX will find the 
3043 \begin_inset Flex Code
3044 status collapsed
3045
3046 \begin_layout Plain Layout
3047 .bib
3048 \end_layout
3049
3050 \end_inset
3051
3052 -files and you can easily insert references without making the bibliography
3053  list visible.
3054 \end_layout
3055
3056 \begin_layout Standard
3057 As the bibliography list is in a comment, LaTeX won't use use it and the
3058  references will look like this: [?], instead of like this: [1].
3059  One solution is to use the LaTeX-package 
3060 \begin_inset Flex Code
3061 status collapsed
3062
3063 \begin_layout Plain Layout
3064 comment
3065 \end_layout
3066
3067 \end_inset
3068
3069  that will only include comments by processing the files separately.
3070  To do this, add in the LaTeX preamble of every subdocument the following:
3071 \end_layout
3072
3073 \begin_layout LyX-Code
3074
3075 \backslash
3076 usepackage{comment}
3077 \end_layout
3078
3079 \begin_layout LyX-Code
3080
3081 \backslash
3082 includecomment{comment}
3083 \end_layout
3084
3085 \begin_layout Standard
3086 See also 
3087 \begin_inset Flex URL
3088 status collapsed
3089
3090 \begin_layout Plain Layout
3091
3092 http://wiki.lyx.org/FAQ/Unsorted#toc31
3093 \end_layout
3094
3095 \end_inset
3096
3097 .
3098 \end_layout
3099
3100 \begin_layout Section
3101 LyX Archives
3102 \end_layout
3103
3104 \begin_layout Standard
3105 Users sometimes need to be able to 
3106 \begin_inset Quotes eld
3107 \end_inset
3108
3109 bundle
3110 \begin_inset Quotes erd
3111 \end_inset
3112
3113  a LyX file together with all the images (and other files) on which it depends,
3114  either for sending to a publisher or for sharing with a co-author.
3115  LyX 2.0 includes a Python script (
3116 \begin_inset Flex Code
3117 status collapsed
3118
3119 \begin_layout Plain Layout
3120 lyxpak.py
3121 \end_layout
3122
3123 \end_inset
3124
3125 ) that automates this process.
3126  To use it, you must have either the 
3127 \begin_inset Flex Code
3128 status collapsed
3129
3130 \begin_layout Plain Layout
3131 zipfile
3132 \end_layout
3133
3134 \end_inset
3135
3136  or 
3137 \begin_inset Flex Code
3138 status collapsed
3139
3140 \begin_layout Plain Layout
3141 tarfile
3142 \end_layout
3143
3144 \end_inset
3145
3146  python modules installed on your system.
3147  By default, the script prefers the 
3148 \begin_inset Flex Code
3149 status collapsed
3150
3151 \begin_layout Plain Layout
3152 gzip
3153 \end_layout
3154
3155 \end_inset
3156
3157 -compressed 
3158 \begin_inset Flex Code
3159 status collapsed
3160
3161 \begin_layout Plain Layout
3162 tar
3163 \end_layout
3164
3165 \end_inset
3166
3167  format on Unix-like systems and the 
3168 \begin_inset Flex Code
3169 status collapsed
3170
3171 \begin_layout Plain Layout
3172 zip
3173 \end_layout
3174
3175 \end_inset
3176
3177  format on Windows.
3178 \end_layout
3179
3180 \begin_layout Standard
3181 LyX's configuration process will set the script up to export a `LyX Archive',
3182  and this format will then be available under 
3183 \begin_inset Flex Code
3184 status collapsed
3185
3186 \begin_layout Plain Layout
3187 File\SpecialChar \menuseparator
3188 Export
3189 \end_layout
3190
3191 \end_inset
3192
3193 .
3194 \end_layout
3195
3196 \begin_layout Standard
3197 Independently of the platform, the generation of a particular archive format
3198  can be forced by adding either the 
3199 \begin_inset Flex Code
3200 status collapsed
3201
3202 \begin_layout Plain Layout
3203 -t
3204 \end_layout
3205
3206 \end_inset
3207
3208  (for the 
3209 \begin_inset Flex Code
3210 status collapsed
3211
3212 \begin_layout Plain Layout
3213 tar
3214 \end_layout
3215
3216 \end_inset
3217
3218  format) or 
3219 \begin_inset Flex Code
3220 status collapsed
3221
3222 \begin_layout Plain Layout
3223 -z
3224 \end_layout
3225
3226 \end_inset
3227
3228  (for the 
3229 \begin_inset Flex Code
3230 status collapsed
3231
3232 \begin_layout Plain Layout
3233 zip
3234 \end_layout
3235
3236 \end_inset
3237
3238  format) switch to the 
3239 \begin_inset Flex Code
3240 status collapsed
3241
3242 \begin_layout Plain Layout
3243 LyX\SpecialChar \menuseparator
3244 LyX Archive
3245 \end_layout
3246
3247 \end_inset
3248
3249  converter in 
3250 \begin_inset Flex Code
3251 status collapsed
3252
3253 \begin_layout Plain Layout
3254 Tools\SpecialChar \menuseparator
3255 Preferences\SpecialChar \menuseparator
3256 File Handling\SpecialChar \menuseparator
3257 Converters
3258 \end_layout
3259
3260 \end_inset
3261
3262 .
3263  (Make sure you add the switch after the script name, not before it.)
3264 \end_layout
3265
3266 \begin_layout Section
3267 Fancy Headers and Footers
3268 \end_layout
3269
3270 \begin_layout Standard
3271 The default page layout is rather plain; for an 
3272 \begin_inset Flex Code
3273 status collapsed
3274
3275 \begin_layout Plain Layout
3276 article
3277 \end_layout
3278
3279 \end_inset
3280
3281  document class, all you get is a centered page number at the bottom of
3282  the page.
3283  This document uses KOMA-script's book class, so it appears to be a bit
3284  fancier.
3285  But to really put on a show, you need to set the document page style to
3286  
3287 \begin_inset Quotes eld
3288 \end_inset
3289
3290 fancy
3291 \begin_inset Quotes erd
3292 \end_inset
3293
3294 , as mentioned in the 
3295 \emph on
3296 User Guide
3297 \emph default
3298 .
3299  This section describes the LaTeX code you need to insert in your LaTeX
3300  preamble in order to get the desired effects.
3301 \end_layout
3302
3303 \begin_layout Standard
3304 For more information on fancy headers, see the 
3305 \begin_inset Flex Code
3306 status collapsed
3307
3308 \begin_layout Plain Layout
3309 fancyhdr
3310 \end_layout
3311
3312 \end_inset
3313
3314  package documentation.
3315  (
3316 \begin_inset Flex URL
3317 status collapsed
3318
3319 \begin_layout Plain Layout
3320
3321 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3322 \end_layout
3323
3324 \end_inset
3325
3326 )
3327 \end_layout
3328
3329 \begin_layout Standard
3330 The page header is divided into three fields, not surprisingly labeled 
3331 \begin_inset Quotes eld
3332 \end_inset
3333
3334 left
3335 \begin_inset Quotes erd
3336 \end_inset
3337
3338
3339 \begin_inset Quotes eld
3340 \end_inset
3341
3342 center
3343 \begin_inset Quotes erd
3344 \end_inset
3345
3346 , and 
3347 \begin_inset Quotes eld
3348 \end_inset
3349
3350 right
3351 \begin_inset Quotes erd
3352 \end_inset
3353
3354 .
3355  The footer is also divided into these three fields.
3356  The LaTeX commands to set these fields in the simplest manner are 
3357 \begin_inset Flex Code
3358 status collapsed
3359
3360 \begin_layout Plain Layout
3361
3362 \backslash
3363 lhead
3364 \end_layout
3365
3366 \end_inset
3367
3368
3369 \begin_inset Flex Code
3370 status collapsed
3371
3372 \begin_layout Plain Layout
3373
3374 \backslash
3375 chead
3376 \end_layout
3377
3378 \end_inset
3379
3380
3381 \begin_inset Flex Code
3382 status collapsed
3383
3384 \begin_layout Plain Layout
3385
3386 \backslash
3387 rhead
3388 \end_layout
3389
3390 \end_inset
3391
3392
3393 \begin_inset Flex Code
3394 status collapsed
3395
3396 \begin_layout Plain Layout
3397
3398 \backslash
3399 lfoot
3400 \end_layout
3401
3402 \end_inset
3403
3404 , etc.
3405  Suppose you wish to put your name in the upper left hand corner of each
3406  page.
3407  Simply insert the following command in the preamble: 
3408 \end_layout
3409
3410 \begin_layout Standard
3411
3412 \family typewriter
3413
3414 \backslash
3415 lhead{John Q.
3416  DocWriter}
3417 \end_layout
3418
3419 \begin_layout Standard
3420 You will now see your name in the upper left.
3421  If a field has a default entry that you would like to get rid of (often
3422  the page number appears in the central footer) simply include a command
3423  with a blank argument, e.
3424 \begin_inset space \thinspace{}
3425 \end_inset
3426
3427 g.:
3428 \end_layout
3429
3430 \begin_layout Standard
3431
3432 \family typewriter
3433
3434 \backslash
3435 cfoot{}
3436 \end_layout
3437
3438 \begin_layout Standard
3439 Let's get really fancy: lets put the section number with the word 
3440 \begin_inset Quotes eld
3441 \end_inset
3442
3443 Section
3444 \begin_inset Quotes erd
3445 \end_inset
3446
3447  (e.
3448 \begin_inset space \thinspace{}
3449 \end_inset
3450
3451 g.
3452 \begin_inset space \space{}
3453 \end_inset
3454
3455 Section 3) in the upper left, the page number (e.
3456 \begin_inset space \thinspace{}
3457 \end_inset
3458
3459 g.
3460 \begin_inset space \space{}
3461 \end_inset
3462
3463 Page 4) in the upper right, your name in the lower left, and the date in
3464  the lower right.
3465  The following commands should now appear in the preamble:
3466 \end_layout
3467
3468 \begin_layout Standard
3469
3470 \family typewriter
3471
3472 \backslash
3473 lhead{Section 
3474 \backslash
3475 thesection}
3476 \end_layout
3477
3478 \begin_layout Standard
3479
3480 \family typewriter
3481
3482 \backslash
3483 chead{}
3484 \end_layout
3485
3486 \begin_layout Standard
3487
3488 \family typewriter
3489
3490 \backslash
3491 rhead{Page 
3492 \backslash
3493 thepage}
3494 \end_layout
3495
3496 \begin_layout Standard
3497
3498 \family typewriter
3499
3500 \backslash
3501 lfoot{John Q.
3502  DocWriter}
3503 \end_layout
3504
3505 \begin_layout Standard
3506
3507 \family typewriter
3508
3509 \backslash
3510 cfoot{}
3511 \end_layout
3512
3513 \begin_layout Standard
3514
3515 \family typewriter
3516
3517 \backslash
3518 rfoot{
3519 \backslash
3520 today}
3521 \end_layout
3522
3523 \begin_layout Standard
3524 The commands 
3525 \begin_inset Flex Code
3526 status collapsed
3527
3528 \begin_layout Plain Layout
3529
3530 \backslash
3531 thesection
3532 \end_layout
3533
3534 \end_inset
3535
3536  and 
3537 \begin_inset Flex Code
3538 status collapsed
3539
3540 \begin_layout Plain Layout
3541
3542 \backslash
3543 thepage
3544 \end_layout
3545
3546 \end_inset
3547
3548  access LaTeX's section and page counters, and so print out the current
3549  section and page numbers.
3550  
3551 \begin_inset Flex Code
3552 status collapsed
3553
3554 \begin_layout Plain Layout
3555
3556 \backslash
3557 today
3558 \end_layout
3559
3560 \end_inset
3561
3562  simply prints out today's date.
3563 \end_layout
3564
3565 \begin_layout Standard
3566 The thicknesses of the horizontal rules drawn beneath the header and above
3567  the footer can also be modified.
3568  If you don't want one of the rules, set its thickness to 0.
3569  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3570  Use commands
3571 \family typewriter
3572  
3573 \family default
3574 like 
3575 \begin_inset Flex Code
3576 status collapsed
3577
3578 \begin_layout Plain Layout
3579
3580 \backslash
3581 renewcommand{
3582 \backslash
3583 headrulewidth}{0.4pt}
3584 \end_layout
3585
3586 \end_inset
3587
3588  and 
3589 \begin_inset Flex Code
3590 status collapsed
3591
3592 \begin_layout Plain Layout
3593
3594 \backslash
3595 renewcommand{
3596 \backslash
3597 footrulewidth}{0.4pt}
3598 \end_layout
3599
3600 \end_inset
3601
3602  to set the thicknesses.
3603 \end_layout
3604
3605 \begin_layout Standard
3606 You can switch the header/footer settings on and off for individual pages
3607  using commands like 
3608 \begin_inset Flex Code
3609 status collapsed
3610
3611 \begin_layout Plain Layout
3612
3613 \backslash
3614 thispagestyle{empty}
3615 \end_layout
3616
3617 \end_inset
3618
3619
3620 \begin_inset Flex Code
3621 status collapsed
3622
3623 \begin_layout Plain Layout
3624
3625 \backslash
3626 thispagestyle{plain}
3627 \end_layout
3628
3629 \end_inset
3630
3631 , and 
3632 \begin_inset Flex Code
3633 status collapsed
3634
3635 \begin_layout Plain Layout
3636
3637 \backslash
3638 thispagestyle{fancy}
3639 \end_layout
3640
3641 \end_inset
3642
3643 .
3644  Simply insert them in the text on the page you want changed and mark them
3645  as TeX code.
3646  In fact, title pages are marked as plain by default, while following pages
3647  are marked fancy when using the global fancy setting.
3648 \end_layout
3649
3650 \begin_layout Standard
3651 As a final example, it is possible to include an image in the header or
3652  footer.
3653  Suppose you want to put a company logo in the upper lefthand corner.
3654  You might try something like
3655 \end_layout
3656
3657 \begin_layout Standard
3658
3659 \family typewriter
3660
3661 \backslash
3662 lhead{
3663 \backslash
3664 resizebox{1in}{!}{
3665 \backslash
3666 includegraphics{logo.eps}}}
3667 \end_layout
3668
3669 \begin_layout Standard
3670 \noindent
3671 (you may need to preface this with 
3672 \begin_inset Flex Code
3673 status collapsed
3674
3675 \begin_layout Plain Layout
3676 \noindent
3677
3678 \backslash
3679 usepackage{graphics}
3680 \end_layout
3681
3682 \end_inset
3683
3684  if you don't include graphics elsewhere in your document).
3685 \end_layout
3686
3687 \begin_layout Section
3688 Itemize Bullet Selection
3689 \begin_inset CommandInset label
3690 LatexCommand label
3691 name "sec:bullet"
3692
3693 \end_inset
3694
3695
3696 \end_layout
3697
3698 \begin_layout Standard
3699 by
3700 \noun on
3701  Allan Rae
3702 \end_layout
3703
3704 \begin_layout Subsection
3705 Introduction
3706 \end_layout
3707
3708 \begin_layout Standard
3709 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3710  Using this dialog you can easily specify what bullet shape to use at each
3711  level of an itemized list.
3712  These settings are document-wide so you won't be able to specify different
3713  sets of bullets for different paragraphs.
3714 \begin_inset Foot
3715 status collapsed
3716
3717 \begin_layout Plain Layout
3718 Well, actually you can but you'll have to do it by hand.
3719 \end_layout
3720
3721 \end_inset
3722
3723
3724 \end_layout
3725
3726 \begin_layout Subsection
3727 How it looks
3728 \end_layout
3729
3730 \begin_layout Standard
3731 Open the dialog by selecting the 
3732 \begin_inset Flex MenuItem
3733 status collapsed
3734
3735 \begin_layout Plain Layout
3736 Document\SpecialChar \menuseparator
3737 Settings
3738 \end_layout
3739
3740 \end_inset
3741
3742  menu item and then select the 
3743 \begin_inset Flex MenuItem
3744 status collapsed
3745
3746 \begin_layout Plain Layout
3747 Bullets
3748 \end_layout
3749
3750 \end_inset
3751
3752  tab.
3753 \end_layout
3754
3755 \begin_layout Standard
3756 The dialog provides you with a table of bullet shapes.
3757  A column of buttons on the left of the table provides access to the six
3758  different panels of bullet shapes.
3759  The row of buttons across the top is used to select which bullet depth
3760  you are changing.
3761  A text entry under the table shows the currently selected bullet shape's
3762  LaTeX equivalent and this can be edited if desired.
3763  If you do modify the text you will also need to specify any needed packages
3764  in the LaTeX preamble.
3765 \end_layout
3766
3767 \begin_layout Standard
3768 The six panels are divided up by the packages they require.
3769  The following table shows the mappings from button name to LaTeX package.
3770 \end_layout
3771
3772 \begin_layout Standard
3773 \align center
3774 \begin_inset Tabular
3775 <lyxtabular version="3" rows="7" columns="2">
3776 <features rotate="0" tabularvalignment="middle">
3777 <column alignment="center" valignment="top" width="0pt">
3778 <column alignment="center" valignment="top" width="0pt">
3779 <row>
3780 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3781 \begin_inset Text
3782
3783 \begin_layout Plain Layout
3784
3785 \family roman
3786 \series medium
3787 \shape up
3788 \size normal
3789 \emph off
3790 \bar no
3791 \noun off
3792 \color none
3793 Button
3794 \end_layout
3795
3796 \end_inset
3797 </cell>
3798 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3799 \begin_inset Text
3800
3801 \begin_layout Plain Layout
3802
3803 \family roman
3804 \series medium
3805 \shape up
3806 \size normal
3807 \emph off
3808 \bar no
3809 \noun off
3810 \color none
3811 Packages Required
3812 \end_layout
3813
3814 \end_inset
3815 </cell>
3816 </row>
3817 <row>
3818 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3819 \begin_inset Text
3820
3821 \begin_layout Plain Layout
3822
3823 \family sans
3824 \series medium
3825 \shape up
3826 \size normal
3827 \emph off
3828 \bar no
3829 \noun off
3830 \color none
3831 Standard
3832 \end_layout
3833
3834 \end_inset
3835 </cell>
3836 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3837 \begin_inset Text
3838
3839 \begin_layout Plain Layout
3840
3841 \series medium
3842 \shape up
3843 \size normal
3844 \emph off
3845 \bar no
3846 \noun off
3847 \color none
3848 base LaTeX
3849 \end_layout
3850
3851 \end_inset
3852 </cell>
3853 </row>
3854 <row>
3855 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3856 \begin_inset Text
3857
3858 \begin_layout Plain Layout
3859
3860 \family sans
3861 \series medium
3862 \shape up
3863 \size normal
3864 \emph off
3865 \bar no
3866 \noun off
3867 \color none
3868 Maths
3869 \end_layout
3870
3871 \end_inset
3872 </cell>
3873 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3874 \begin_inset Text
3875
3876 \begin_layout Plain Layout
3877
3878 \family typewriter
3879 \series medium
3880 \shape up
3881 \size normal
3882 \emph off
3883 \bar no
3884 \noun off
3885 \color none
3886 amssymb.sty
3887 \end_layout
3888
3889 \end_inset
3890 </cell>
3891 </row>
3892 <row>
3893 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3894 \begin_inset Text
3895
3896 \begin_layout Plain Layout
3897
3898 \family sans
3899 \series medium
3900 \shape up
3901 \size normal
3902 \emph off
3903 \bar no
3904 \noun off
3905 \color none
3906 Ding1
3907 \end_layout
3908
3909 \end_inset
3910 </cell>
3911 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3912 \begin_inset Text
3913
3914 \begin_layout Plain Layout
3915
3916 \family typewriter
3917 \series medium
3918 \shape up
3919 \size normal
3920 \emph off
3921 \bar no
3922 \noun off
3923 \color none
3924 pifont.sty
3925 \end_layout
3926
3927 \end_inset
3928 </cell>
3929 </row>
3930 <row>
3931 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3932 \begin_inset Text
3933
3934 \begin_layout Plain Layout
3935
3936 \family sans
3937 \series medium
3938 \shape up
3939 \size normal
3940 \emph off
3941 \bar no
3942 \noun off
3943 \color none
3944 Ding2
3945 \end_layout
3946
3947 \end_inset
3948 </cell>
3949 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3950 \begin_inset Text
3951
3952 \begin_layout Plain Layout
3953
3954 \family typewriter
3955 \series medium
3956 \shape up
3957 \size normal
3958 \emph off
3959 \bar no
3960 \noun off
3961 \color none
3962 pifont.sty
3963 \end_layout
3964
3965 \end_inset
3966 </cell>
3967 </row>
3968 <row>
3969 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3970 \begin_inset Text
3971
3972 \begin_layout Plain Layout
3973
3974 \family sans
3975 \series medium
3976 \shape up
3977 \size normal
3978 \emph off
3979 \bar no
3980 \noun off
3981 \color none
3982 Ding3
3983 \end_layout
3984
3985 \end_inset
3986 </cell>
3987 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3988 \begin_inset Text
3989
3990 \begin_layout Plain Layout
3991
3992 \family typewriter
3993 \series medium
3994 \shape up
3995 \size normal
3996 \emph off
3997 \bar no
3998 \noun off
3999 \color none
4000 pifont.sty
4001 \end_layout
4002
4003 \end_inset
4004 </cell>
4005 </row>
4006 <row>
4007 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4008 \begin_inset Text
4009
4010 \begin_layout Plain Layout
4011
4012 \family sans
4013 \series medium
4014 \shape up
4015 \size normal
4016 \emph off
4017 \bar no
4018 \noun off
4019 \color none
4020 Ding4
4021 \end_layout
4022
4023 \end_inset
4024 </cell>
4025 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4026 \begin_inset Text
4027
4028 \begin_layout Plain Layout
4029
4030 \family typewriter
4031 \series medium
4032 \shape up
4033 \size normal
4034 \emph off
4035 \bar no
4036 \noun off
4037 \color none
4038 pifont.sty
4039 \end_layout
4040
4041 \end_inset
4042 </cell>
4043 </row>
4044 </lyxtabular>
4045
4046 \end_inset
4047
4048
4049 \end_layout
4050
4051 \begin_layout Standard
4052 LyX doesn't stop you using bullets from packages you don't have.
4053  If you get errors from LaTeX when you try to view or print the file, then
4054  it is likely you are missing a package.
4055 \begin_inset Foot
4056 status collapsed
4057
4058 \begin_layout Plain Layout
4059 LyX doesn't restrict your use since you may be editing locally and exporting
4060  elsewhere.
4061 \end_layout
4062
4063 \end_inset
4064
4065
4066 \end_layout
4067
4068 \begin_layout Subsection
4069 How to use it
4070 \end_layout
4071
4072 \begin_layout Standard
4073 Select which bullet depth you want to change then select the bullet shape
4074  and size.
4075  Any changes will not be visible in LyX, but are visible when viewing the
4076  document.
4077 \end_layout
4078
4079 \begin_layout Standard
4080 You can reset a bullet shape to the default simply by clicking your right
4081  mouse button on the appropriate bullet depth button.
4082 \begin_inset Foot
4083 status collapsed
4084
4085 \begin_layout Plain Layout
4086 If you 
4087 \emph on
4088 really
4089 \emph default
4090  want to have multiple sets of paragraphs with different sets of bullets
4091  in each, then you're going to have to get your hands dirty with TeX code.
4092  The bullet selection dialog can help though because it provides you with
4093  the LaTeX code for a wide range of bullet shapes.
4094  To make your own custom paragraphs you have the following options:
4095 \end_layout
4096
4097 \begin_layout Plain Layout
4098 \begin_inset ERT
4099 status open
4100
4101 \begin_layout Plain Layout
4102
4103
4104 \backslash
4105 let
4106 \backslash
4107 savelabelitemi=
4108 \backslash
4109 labelitemi
4110 \end_layout
4111
4112 \end_inset
4113
4114
4115 \end_layout
4116
4117 \begin_layout Plain Layout
4118 \begin_inset ERT
4119 status open
4120
4121 \begin_layout Plain Layout
4122
4123
4124 \backslash
4125 renewcommand
4126 \backslash
4127 labelitemi[0]{
4128 \backslash
4129 small
4130 \backslash
4131 (
4132 \backslash
4133 sharp
4134 \backslash
4135 )}
4136 \end_layout
4137
4138 \end_inset
4139
4140
4141 \end_layout
4142
4143 \begin_layout Itemize
4144 Use the LaTeX command 
4145 \begin_inset Flex Code
4146 status collapsed
4147
4148 \begin_layout Plain Layout
4149
4150 \backslash
4151 renewcommand{}{}
4152 \end_layout
4153
4154 \end_inset
4155
4156  to specify a new bullet shape for a given depth.
4157  You'll also need to save the current bullet shape so you can restore it
4158  again afterwards.
4159  In this itemized list the following LaTeX code was used to change the bullet
4160  used for the first depth.
4161 \end_layout
4162
4163 \begin_deeper
4164 \begin_layout LyX-Code
4165
4166 \backslash
4167 let
4168 \backslash
4169 savelabelitemi=
4170 \backslash
4171 labelitemi 
4172 \end_layout
4173
4174 \begin_layout LyX-Code
4175
4176 \backslash
4177 renewcommand
4178 \backslash
4179 labelitemi[0]{
4180 \backslash
4181 small
4182 \backslash
4183 (
4184 \backslash
4185 sharp
4186 \backslash
4187 )}
4188 \end_layout
4189
4190 \end_deeper
4191 \begin_layout Itemize
4192 Note that the itemize depth is specified in Roman numerals as part of the
4193  
4194 \family typewriter
4195
4196 \backslash
4197 labelitem
4198 \family default
4199  command.
4200 \end_layout
4201
4202 \begin_layout Itemize
4203 \begin_inset ERT
4204 status open
4205
4206 \begin_layout Plain Layout
4207
4208 [
4209 \backslash
4210 (
4211 \backslash
4212 star
4213 \backslash
4214 )]
4215 \end_layout
4216
4217 \end_inset
4218
4219  Specify each individual entry by starting each item with the bullet shape
4220  enclosed in square brackets and set as 
4221 \begin_inset Flex MenuItem
4222 status collapsed
4223
4224 \begin_layout Plain Layout
4225 TeX Code
4226 \end_layout
4227
4228 \end_inset
4229
4230 .
4231  For example, this item was started with 
4232 \begin_inset Flex Code
4233 status collapsed
4234
4235 \begin_layout Plain Layout
4236 [
4237 \backslash
4238 (
4239 \backslash
4240 star
4241 \backslash
4242 )]
4243 \end_layout
4244
4245 \end_inset
4246
4247 .
4248 \end_layout
4249
4250 \begin_layout Plain Layout
4251 \begin_inset ERT
4252 status open
4253
4254 \begin_layout Plain Layout
4255
4256
4257 \backslash
4258 renewcommand
4259 \backslash
4260 labelitemi[0]{
4261 \backslash
4262 savelabelitemi}
4263 \end_layout
4264
4265 \end_inset
4266
4267
4268 \end_layout
4269
4270 \begin_layout Plain Layout
4271 You'll also need to revert the labelitem back to its previous setting for
4272  the global bullet shape settings to remain in effect.
4273  The way used here was:
4274 \end_layout
4275
4276 \begin_layout LyX-Code
4277
4278 \backslash
4279 renewcommand
4280 \backslash
4281 labelitemi[0]{
4282 \backslash
4283 savelabelitemi}
4284 \end_layout
4285
4286 \end_inset
4287
4288
4289 \end_layout
4290
4291 \begin_layout Chapter
4292 LyX and the World Wide Web
4293 \end_layout
4294
4295 \begin_layout Standard
4296 LyX has long supported the export of documents to various web-friendly formats,
4297  such as HTML.
4298  Before verson 2.0, however, HTML export was always accomplished by the use
4299  of external converters.
4300 \begin_inset Foot
4301 status collapsed
4302
4303 \begin_layout Plain Layout
4304 For details on the use of external converters with LyX, see the 
4305 \emph on
4306 Converters
4307 \emph default
4308  section of the Customization manual.
4309 \end_layout
4310
4311 \end_inset
4312
4313  These fall into two large groups: there are converters that use LaTeX as
4314  an intermediate format, such as 
4315 \begin_inset Flex Code
4316 status collapsed
4317
4318 \begin_layout Plain Layout
4319 htlatex
4320 \end_layout
4321
4322 \end_inset
4323
4324
4325 \begin_inset Flex Code
4326 status collapsed
4327
4328 \begin_layout Plain Layout
4329 html2latex
4330 \end_layout
4331
4332 \end_inset
4333
4334 , and 
4335 \begin_inset Flex Code
4336 status collapsed
4337
4338 \begin_layout Plain Layout
4339 plastex
4340 \end_layout
4341
4342 \end_inset
4343
4344 , relying upon LyX to produce the LaTeX; and there is a converter that works
4345  directly on LyX files, 
4346 \begin_inset Flex Code
4347 status collapsed
4348
4349 \begin_layout Plain Layout
4350 eLyXer
4351 \end_layout
4352
4353 \end_inset
4354
4355 .
4356  All of these have different advantages and disadvantages.
4357  
4358 \end_layout
4359
4360 \begin_layout Standard
4361 The LaTeX-based converters have the advantage that, in principle, they know
4362  everything about the exported document that LaTeX does.
4363  Such converters do not care, for example, if a certain block of code was
4364  produced by LyX or was Evil Red Text.
4365  These converters know about 
4366 \begin_inset Flex Code
4367 status collapsed
4368
4369 \begin_layout Plain Layout
4370 aux
4371 \end_layout
4372
4373 \end_inset
4374
4375  files, counters, and references, and can often make use of the 
4376 \begin_inset Flex Code
4377 status collapsed
4378
4379 \begin_layout Plain Layout
4380 bbl
4381 \end_layout
4382
4383 \end_inset
4384
4385  files generated by BibTeX.
4386  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4387  said that only TeX itself understands TeX---and LaTeX-based converters
4388  will often choke on what seem to be quite simple constructs; complex ones
4389  can throw them completely, and as of this writing, for example, the 
4390 \emph on
4391 Embedded Objects
4392 \emph default
4393  manual will not export with 
4394 \begin_inset Flex Code
4395 status collapsed
4396
4397 \begin_layout Plain Layout
4398 htlatex
4399 \end_layout
4400
4401 \end_inset
4402
4403 , though the others will.
4404  The other issue concerns how math is handled.
4405  These converters typically convert the formulae into little pictures that
4406  are then linked from the HTML document.
4407  Since these are actually generated by LaTeX, they are accurate.
4408  But they do not scale well, and just getting them to look as if they are
4409  actually meant to be in your document---so that the font sizes seem to
4410  be roughly the same---can be a challenge.
4411 \end_layout
4412
4413 \begin_layout Standard
4414 Alex Fernandez's 
4415 \begin_inset Flex Code
4416 status collapsed
4417
4418 \begin_layout Plain Layout
4419 eLyXer
4420 \end_layout
4421
4422 \end_inset
4423
4424  (
4425 \begin_inset CommandInset href
4426 LatexCommand href
4427 name "http://elyxer.nongnu.org/"
4428 target "http://elyxer.nongnu.org/"
4429
4430 \end_inset
4431
4432 ) solves some of these problems.
4433  In particular, the formulae it produces scale perfectly, since it renders
4434  math using a combination of HTML and CSS rather than converting the formulae
4435  to images.
4436  But even moderately complex formula are rendered less well than with 
4437 \begin_inset Flex Code
4438 status collapsed
4439
4440 \begin_layout Plain Layout
4441 htlatex
4442 \end_layout
4443
4444 \end_inset
4445
4446 ; this reflects the limitations of HTML.
4447 \begin_inset Foot
4448 status collapsed
4449
4450 \begin_layout Plain Layout
4451 That said, 
4452 \begin_inset Flex Code
4453 status collapsed
4454
4455 \begin_layout Plain Layout
4456 eLyXer
4457 \end_layout
4458
4459 \end_inset
4460
4461  can also use jsMath and MathJax for equations, but this setting is only
4462  available globally and requires one to have access to a server that runs
4463  the backend.
4464 \end_layout
4465
4466 \end_inset
4467
4468  More importantly (as of version 1.1.1, at least), 
4469 \begin_inset Flex Code
4470 status collapsed
4471
4472 \begin_layout Plain Layout
4473 eLyXer
4474 \end_layout
4475
4476 \end_inset
4477
4478  has limited support for math macros and no support for user-defined paragraph
4479  or character styles.
4480  These limitations make 
4481 \begin_inset Flex Code
4482 status collapsed
4483
4484 \begin_layout Plain Layout
4485 eLyXer
4486 \end_layout
4487
4488 \end_inset
4489
4490  unsuitable for many of the documents LyX users produce.
4491  In principle, of course, these problems could be solved, but the LyX developers
4492  have decided to follow a different path and have made LyX itself capable
4493  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4494  plaintext.
4495 \end_layout
4496
4497 \begin_layout Standard
4498 As of this writing, XHTML output remains under development and should probably
4499  be regarded as 
4500 \begin_inset Quotes eld
4501 \end_inset
4502
4503 experimental
4504 \begin_inset Quotes erd
4505 \end_inset
4506
4507 .
4508 \begin_inset Foot
4509 status collapsed
4510
4511 \begin_layout Plain Layout
4512 The file 
4513 \begin_inset Flex Code
4514 status collapsed
4515
4516 \begin_layout Plain Layout
4517 development/HTML.notes
4518 \end_layout
4519
4520 \end_inset
4521
4522 , which can be found in the LyX source tree or 
4523 \begin_inset CommandInset href
4524 LatexCommand href
4525 name "accessed online"
4526 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4527
4528 \end_inset
4529
4530 , usually contains up-to-date information about the state of XHTML output.
4531  See also the list of XHTML bugs on 
4532 \begin_inset CommandInset href
4533 LatexCommand href
4534 name "the bug tracker"
4535 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"
4536
4537 \end_inset
4538
4539 .
4540 \end_layout
4541
4542 \end_inset
4543
4544  Still, the developers have chosen this approach because it has several
4545  potential advantages over the other two.
4546 \end_layout
4547
4548 \begin_layout Standard
4549 These advantages are primarily due to the fact that the XHTML output routines,
4550  since they are part of LyX, know everything LyX knows about the document
4551  being exported.
4552 \begin_inset Foot
4553 status collapsed
4554
4555 \begin_layout Plain Layout
4556 Another advantage is that, since these routines are internal to LyX, they
4557  are immune to changes in LyX's file format, or to changes in the semantics
4558  of existing insets.
4559 \end_layout
4560
4561 \end_inset
4562
4563  So they know about the table of contents (as displayed in the outline),
4564  about the counters associated with different paragraph styles, and about
4565  user-defined styles.
4566  The XHTML output routines know what LyX knows about internationalization,
4567  too, so they will output 
4568 \begin_inset Quotes eld
4569 \end_inset
4570
4571 Chapter 1
4572 \begin_inset Quotes erd
4573 \end_inset
4574
4575  or 
4576 \begin_inset Quotes eld
4577 \end_inset
4578
4579
4580 \lang ngerman
4581 Kapitel
4582 \lang english
4583  1
4584 \begin_inset Quotes erd
4585 \end_inset
4586
4587 , depending upon the language in effect at the time.
4588  
4589 \end_layout
4590
4591 \begin_layout Standard
4592 Quite generally, the output routines know what LyX knows about document
4593  layout, that is, about how the document is to be rendered on screen.
4594  We use this information when we output the document as XHTML.
4595  In particular, LyX 
4596 \emph on
4597 automatically
4598 \emph default
4599  generates CSS style information corresponding to the layout information
4600  it uses to render the document on screen: if section headings are supposed
4601  to be sans-serif and bold as seen in LyX, then (by default) they will be
4602  sans-serif and bold when viewed in a web browser, too.
4603  And this is true not just for pre-defined styles, like Section, but for
4604  any style, including user-defined styles.
4605  Indeed, the XHTML output routines make no distinction between user-defined
4606  paragraph and character styles and LyX's own pre-defined styles: in each
4607  case, everything LyX knows about the styles is contained in the layout
4608  files.
4609  And much the same is true as regards pre-defined textual insets, such as
4610  footnotes, and various custom insets.
4611  
4612 \end_layout
4613
4614 \begin_layout Standard
4615 The result is that XHTML output can be customized and extended in exactly
4616  the same way LaTeX output can be customized and extended: through layout
4617  files and modules.
4618  See chapter five of the 
4619 \emph on
4620 Customization 
4621 \emph default
4622 manual for the details.
4623 \end_layout
4624
4625 \begin_layout Standard
4626 The remainder of this chapter contains more detailed information on XHTML
4627  output, its limitations, and ways to work around those limitations.
4628 \end_layout
4629
4630 \begin_layout Section
4631 Math Output in XHTML
4632 \end_layout
4633
4634 \begin_layout Standard
4635 LyX offers four choices for how math is rendered.
4636  These have various advantages and disadvantages:
4637 \end_layout
4638
4639 \begin_layout Itemize
4640 MathML
4641 \begin_inset Newline newline
4642 \end_inset
4643
4644 MathML is a dialect of XML designed specifically for mathematics on the
4645  web, and it typically renders very well in browsers that support it.
4646  The disadvantage is that not all browsers support MathML, and support is
4647  not complete even in the Gecko-based browsers, such as Firefox.
4648 \begin_inset Newline newline
4649 \end_inset
4650
4651 If LyX is unable to render a formula as MathML---for example, if the formula
4652  uses the 
4653 \begin_inset Flex Code
4654 status collapsed
4655
4656 \begin_layout Plain Layout
4657 xymatrix
4658 \end_layout
4659
4660 \end_inset
4661
4662  package or ERT---then it will instead output the formula as an image.
4663  
4664 \end_layout
4665
4666 \begin_layout Itemize
4667 HTML
4668 \begin_inset Newline newline
4669 \end_inset
4670
4671 As mentioned above, 
4672 \begin_inset Flex Code
4673 status collapsed
4674
4675 \begin_layout Plain Layout
4676 elyxer
4677 \end_layout
4678
4679 \end_inset
4680
4681  outputs math as HTML, styled by CSS.
4682 \begin_inset Foot
4683 status collapsed
4684
4685 \begin_layout Plain Layout
4686 LyX has borrowed some of the CSS for its HTML output from 
4687 \begin_inset Flex Code
4688 status collapsed
4689
4690 \begin_layout Plain Layout
4691 elyxer
4692 \end_layout
4693
4694 \end_inset
4695
4696 .
4697 \end_layout
4698
4699 \end_inset
4700
4701  For simple formulae, this can work quite well, though with more complicated
4702  formulae it tends to break down.
4703  Still, this method has the advantage that it is very widely supported and
4704  so it may be appropriate for documents that contain only a little, fairly
4705  simple math.
4706 \begin_inset Newline newline
4707 \end_inset
4708
4709 If Lyx is unable to render a formula as HTML---for example, if the formula
4710  uses the 
4711 \begin_inset Flex Code
4712 status collapsed
4713
4714 \begin_layout Plain Layout
4715 xymatrix
4716 \end_layout
4717
4718 \end_inset
4719
4720  package or ERT---then it will instead output the formula as an image.
4721  
4722 \end_layout
4723
4724 \begin_layout Itemize
4725 Images
4726 \begin_inset Newline newline
4727 \end_inset
4728
4729 Like 
4730 \begin_inset Flex Code
4731 status collapsed
4732
4733 \begin_layout Plain Layout
4734 htlatex
4735 \end_layout
4736
4737 \end_inset
4738
4739 , LyX will output formulae as images, the very same images, in fact, that
4740  are used for instant preview.
4741 \begin_inset Foot
4742 status collapsed
4743
4744 \begin_layout Plain Layout
4745 Instant preview does 
4746 \emph on
4747 not 
4748 \emph default
4749 have to be on for images to be output, however.
4750 \end_layout
4751
4752 \end_inset
4753
4754  The advantage to this method is that the images are simply generated by
4755  LaTeX, so they are very accurate.
4756  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4757  so they do not scale terribly well, and one cannot copy them, etc.
4758  (As of this writing, there are also problems about equation numbering.
4759  See 
4760 \begin_inset CommandInset href
4761 LatexCommand href
4762 name "bug 6894"
4763 target "http://www.lyx.org/trac/ticket/6894"
4764
4765 \end_inset
4766
4767 .)
4768 \begin_inset Newline newline
4769 \end_inset
4770
4771 The size of the images can be controlled by setting the 
4772 \begin_inset Quotes eld
4773 \end_inset
4774
4775 Math Images Scaling
4776 \begin_inset Quotes erd
4777 \end_inset
4778
4779  parameter under 
4780 \begin_inset Flex MenuItem
4781 status collapsed
4782
4783 \begin_layout Plain Layout
4784 Document\SpecialChar \menuseparator
4785 Settings\SpecialChar \menuseparator
4786 Output
4787 \end_layout
4788
4789 \end_inset
4790
4791 .
4792 \begin_inset Foot
4793 status collapsed
4794
4795 \begin_layout Plain Layout
4796 For those who want to know, this controls the resolution of the image in
4797  dots per inch and is based upon a default of 75 dpi.
4798 \end_layout
4799
4800 \end_inset
4801
4802
4803 \begin_inset Newline newline
4804 \end_inset
4805
4806 If LyX for some reason fails to create an image for a formula (e.g., if a
4807  required LaTeX package is not installed), then it will fall back to outputing
4808  the raw LaTeX.
4809 \end_layout
4810
4811 \begin_layout Itemize
4812 LaTeX
4813 \begin_inset Newline newline
4814 \end_inset
4815
4816 Finally, LyX will happily output math as LaTeX.
4817  As well as being the output of last resort, this method can be used with
4818  such tools as 
4819 \begin_inset CommandInset href
4820 LatexCommand href
4821 name "jsMath"
4822 target "http://www.math.union.edu/~dpvc/jsMath/"
4823
4824 \end_inset
4825
4826 , which uses JavaScript to render LaTeX embedded in HTML documents.
4827  LyX wraps the LaTeX in either a 
4828 \begin_inset Flex Code
4829 status collapsed
4830
4831 \begin_layout Plain Layout
4832 span
4833 \end_layout
4834
4835 \end_inset
4836
4837  (for inline formulas) or 
4838 \begin_inset Flex Code
4839 status collapsed
4840
4841 \begin_layout Plain Layout
4842 div
4843 \end_layout
4844
4845 \end_inset
4846
4847  (for displayed formulas) with 
4848 \begin_inset Flex Code
4849 status collapsed
4850
4851 \begin_layout Plain Layout
4852 class='math'
4853 \end_layout
4854
4855 \end_inset
4856
4857 , as is required for jsMath.
4858 \end_layout
4859
4860 \begin_layout Standard
4861 One of these output methods must be selected under 
4862 \begin_inset Flex MenuItem
4863 status collapsed
4864
4865 \begin_layout Plain Layout
4866 Document\SpecialChar \menuseparator
4867 Settings\SpecialChar \menuseparator
4868 Output
4869 \end_layout
4870
4871 \end_inset
4872
4873 .
4874  By default, LyX outputs MathML.
4875  This is a document-wide setting, therefore.
4876 \end_layout
4877
4878 \begin_layout Standard
4879 Eventually, LyX will offer the user the option to select an alternate output
4880  method for a particular inset, say, one that isn't being rendered very
4881  well by MathML.
4882 \begin_inset Foot
4883 status collapsed
4884
4885 \begin_layout Plain Layout
4886 That said, since LyX falls back to images if the inset contains ERT, then
4887  one can force output as an image by putting some harmless ERT into the
4888  math, for example: 
4889 \begin_inset Formula $a=b\relax$
4890 \end_inset
4891
4892 .
4893 \end_layout
4894
4895 \end_inset
4896
4897
4898 \end_layout
4899
4900 \begin_layout Section
4901 Bibliography and Citations
4902 \end_layout
4903
4904 \begin_layout Standard
4905 XHTML output fully supports bibliographies and citations.
4906  
4907 \end_layout
4908
4909 \begin_layout Standard
4910 Citation labels are generated by the same machinery that generates LyX's
4911  on-screen labels, so the labels will look in the output much as they do
4912  in LyX, though better.
4913  If you are using numerical citations, then LyX will output numerical labels,
4914  such as [1] or [17], rather than simply showing the citation key in square
4915  brackets, as it does on-screen.
4916  If you are using author-year citations, then LyX will add lowercase letters
4917  to the years, just as BibTeX does, if it finds more than one citation for
4918  a given author-year combination.
4919  The labels will be printed with the bibliography entries.
4920  Note that there is, at present, no way to customize the appearance of the
4921  labels, for example, to choose between square brackets and parentheses.
4922 \end_layout
4923
4924 \begin_layout Standard
4925 Bibliography output is handled by the same machinery that handles the presentati
4926 on of reference information in the citation dialog, so you will see in the
4927  XHTML output pretty much what you would see if you were to look at a given
4928  entry in the citation dialog.
4929  The formatting can be customized in your layout file or, preferably, in
4930  a module.
4931  See the 
4932 \emph on
4933 Customization
4934 \emph default
4935  manual for the details.
4936 \end_layout
4937
4938 \begin_layout Standard
4939 The main defect at present is that cross-referenced information is printed
4940  with every entry with which it is associated.
4941  So you can see things like this:
4942 \end_layout
4943
4944 \begin_layout Quote
4945 Jason Stanley, 
4946 \begin_inset Quotes eld
4947 \end_inset
4948
4949 Context and Logical Form
4950 \begin_inset Quotes erd
4951 \end_inset
4952
4953 , in 
4954 \emph on
4955 Language in Context: Selected Essays
4956 \emph default
4957  (Oxford: Oxford University Press, 2007), pp.
4958  30--68.
4959 \end_layout
4960
4961 \begin_layout Quote
4962 Jason Stanley, 
4963 \begin_inset Quotes eld
4964 \end_inset
4965
4966 Semantics in Context
4967 \begin_inset Quotes erd
4968 \end_inset
4969
4970 , in 
4971 \emph on
4972 Language in Context: Selected Essays
4973 \emph default
4974  (Oxford: Oxford University Press, 2007), pp.
4975  201--30.
4976 \end_layout
4977
4978 \begin_layout Standard
4979 This should be fixed before long.
4980 \end_layout
4981
4982 \begin_layout Standard
4983 There is no support at present for sectioned bibliographies.
4984  If you have multiple bibliographies, then LyX will print the same bibliography
4985  over and over.
4986 \end_layout
4987
4988 \begin_layout Section
4989 Indexes
4990 \end_layout
4991
4992 \begin_layout Standard
4993 LyX will happily export indexes as XHTML, but with certain limitations at
4994  the moment.
4995 \end_layout
4996
4997 \begin_layout Standard
4998 Index export will be most reliable when you do not attempt to use the fancy
4999  constructs that are described in the section on indexes in the 
5000 \emph on
5001 User's Guide
5002 \emph default
5003 .
5004 \begin_inset Foot
5005 status collapsed
5006
5007 \begin_layout Plain Layout
5008 The main issue here is that LyX itself does not really handle these.
5009  It just lets you enter what you would have to enter in raw LaTeX.
5010 \end_layout
5011
5012 \end_inset
5013
5014  We'll describe how they are handled using the subsection headings from
5015  that section.
5016 \end_layout
5017
5018 \begin_layout Itemize
5019 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5020  these, but the entries must be separated by 
5021 \begin_inset Quotes eld
5022 \end_inset
5023
5024  ! 
5025 \begin_inset Quotes erd
5026 \end_inset
5027
5028 , that is, there must be spaces around the exclamation point.
5029  This is because it is otherwise too difficult to check for escaped exclamation
5030  points, ones in math, and so forth.
5031 \end_layout
5032
5033 \begin_layout Itemize
5034 Page Ranges: There is no support at all for page ranges, since these make
5035  no sense with XHMTL.
5036  Instead, you will just get two index entries, one at either end.
5037 \end_layout
5038
5039 \begin_layout Itemize
5040 Cross-referencing: There is no support for cross-referencing.
5041  If LyX finds an entry containing the 
5042 \begin_inset Quotes eld
5043 \end_inset
5044
5045 |see\SpecialChar \ldots{}
5046
5047 \begin_inset Quotes erd
5048 \end_inset
5049
5050  construct, it is just dropped, and the rest is treated as an ordinary index
5051  entry.
5052 \end_layout
5053
5054 \begin_layout Itemize
5055 Index Entry Order: LyX does support attempts to fix the sorting order.
5056  It will take what is before the first `@' it finds and use that for sorting,
5057  taking what follows the first `@' to be the actual entry.
5058  At present, LyX does not check for escaped `@', so do not try to index
5059  email addresses.
5060 \end_layout
5061
5062 \begin_layout Itemize
5063 Index Entry Layout: You can format entries by using the text style dialog,
5064  or by using any other method available within LyX itself.
5065  There is no support for constructs like: 
5066 \begin_inset Quotes eld
5067 \end_inset
5068
5069 entry|textbf
5070 \begin_inset Quotes erd
5071 \end_inset
5072
5073 .
5074  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5075  and everything that follows it.
5076 \end_layout
5077
5078 \begin_layout Itemize
5079 Multiple Indexes: There is no support for multiple indexes.
5080  Rather, all index entries will be printed as one large index.
5081  To avoid our printing several versions of the index, we print only the
5082  main index, so make sure you have one.
5083 \end_layout
5084
5085 \begin_layout Section
5086 Nomenclature and Glossary
5087 \end_layout
5088
5089 \begin_layout Standard
5090 There is at present no support for glossaries.
5091  Adding it would be fairly trivial, and welcome.
5092 \end_layout
5093
5094 \begin_layout Chapter
5095 The LyX Server
5096 \end_layout
5097
5098 \begin_layout Section
5099 Introduction
5100 \end_layout
5101
5102 \begin_layout Standard
5103 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5104  and retrieve information about the LyX internal state.
5105  This is only intended for advanced users, but they should find it useful.
5106  It is by writing to the LyX server, for example, that bibliography managers,
5107  such as JabRef, are able to 
5108 \begin_inset Quotes eld
5109 \end_inset
5110
5111 push
5112 \begin_inset Quotes erd
5113 \end_inset
5114
5115  citations to LyX.
5116 \end_layout
5117
5118 \begin_layout Section
5119 Starting the LyX Server
5120 \end_layout
5121
5122 \begin_layout Standard
5123 The LyX server works through the use of a pair of named pipes.
5124  These are usually located in 
5125 \begin_inset Flex Code
5126 status collapsed
5127
5128 \begin_layout Plain Layout
5129 UserDir
5130 \end_layout
5131
5132 \end_inset
5133
5134 , (except on Windows, where 
5135 \emph on
5136 local
5137 \emph default
5138  named pipes are special objects located in 
5139 \begin_inset Flex Code
5140 status collapsed
5141
5142 \begin_layout Plain Layout
5143
5144 \backslash
5145
5146 \backslash
5147 .
5148 \backslash
5149 pipe
5150 \end_layout
5151
5152 \end_inset
5153
5154 ) and have the names 
5155 \begin_inset Quotes eld
5156 \end_inset
5157
5158
5159 \begin_inset Flex Code
5160 status collapsed
5161
5162 \begin_layout Plain Layout
5163 lyxpipe.in
5164 \end_layout
5165
5166 \end_inset
5167
5168
5169 \begin_inset Quotes erd
5170 \end_inset
5171
5172  and 
5173 \begin_inset Quotes eld
5174 \end_inset
5175
5176
5177 \begin_inset Flex Code
5178 status collapsed
5179
5180 \begin_layout Plain Layout
5181 lyxpipe.out
5182 \end_layout
5183
5184 \end_inset
5185
5186
5187 \begin_inset Quotes erd
5188 \end_inset
5189
5190 .
5191  External programs write into 
5192 \begin_inset Flex Code
5193 status collapsed
5194
5195 \begin_layout Plain Layout
5196 lyxpipe.in
5197 \end_layout
5198
5199 \end_inset
5200
5201  and read back data from 
5202 \begin_inset Flex Code
5203 status collapsed
5204
5205 \begin_layout Plain Layout
5206 lyxpipe.out
5207 \end_layout
5208
5209 \end_inset
5210
5211 .
5212  The stem of the pipe names can be defined in the 
5213 \begin_inset Flex MenuItem
5214 status collapsed
5215
5216 \begin_layout Plain Layout
5217 Tools\SpecialChar \menuseparator
5218 Preferences
5219 \end_layout
5220
5221 \end_inset
5222
5223  dialog, for example 
5224 \begin_inset Flex Code
5225 status collapsed
5226
5227 \begin_layout Plain Layout
5228 "/home/myhome/lyxpipe"
5229 \end_layout
5230
5231 \end_inset
5232
5233 , or 
5234 \begin_inset Flex Code
5235 status collapsed
5236
5237 \begin_layout Plain Layout
5238 "
5239 \backslash
5240
5241 \backslash
5242 .
5243 \backslash
5244 pipe
5245 \backslash
5246 lyxpipe"
5247 \end_layout
5248
5249 \end_inset
5250
5251  on Windows (but any working path can be used).
5252  You 
5253 \emph on
5254 must
5255 \emph default
5256  configure this manually in order for the server to start.
5257 \end_layout
5258
5259 \begin_layout Standard
5260 LyX will add the '
5261 \begin_inset Flex Code
5262 status collapsed
5263
5264 \begin_layout Plain Layout
5265 .in
5266 \end_layout
5267
5268 \end_inset
5269
5270 ' and '
5271 \begin_inset Flex Code
5272 status collapsed
5273
5274 \begin_layout Plain Layout
5275 .out
5276 \end_layout
5277
5278 \end_inset
5279
5280 ' to create the pipes.
5281  If one of the pipes already exists, LyX will assume that another LyX process
5282  is already running and will not start the server.
5283  On POSIX (Unix like) systems, if for some other reason, an unused 
5284 \begin_inset Quotes eld
5285 \end_inset
5286
5287 stale
5288 \begin_inset Quotes erd
5289 \end_inset
5290
5291  pipe is left in existence when LyX closes, then LyX will try to delete
5292  it.
5293  If this fails for some reason, you will need to delete the pipes manually
5294  and then restart LyX.
5295  On Windows, pipes are deleted by the OS on program termination or crash,
5296  so 
5297 \begin_inset Quotes eld
5298 \end_inset
5299
5300 stale
5301 \begin_inset Quotes erd
5302 \end_inset
5303
5304  pipes should not be possible.
5305 \end_layout
5306
5307 \begin_layout Standard
5308 To have several LyX processes with servers at the same time, you have to
5309  use different configurations, perhaps by using separate user directories,
5310  each with its own 
5311 \begin_inset Flex Code
5312 status collapsed
5313
5314 \begin_layout Plain Layout
5315 preferences
5316 \end_layout
5317
5318 \end_inset
5319
5320  file, for each process.
5321 \end_layout
5322
5323 \begin_layout Standard
5324 If you are developing a client program, you might find it useful to enable
5325  debugging information from the LyX server.
5326  Do this by starting LyX as 
5327 \begin_inset Flex Code
5328 status collapsed
5329
5330 \begin_layout Plain Layout
5331 lyx -dbg lyxserver
5332 \end_layout
5333
5334 \end_inset
5335
5336 .
5337 \end_layout
5338
5339 \begin_layout Standard
5340 You can find a complete example client written in C in the source distribution
5341  as 
5342 \begin_inset Flex Code
5343 status collapsed
5344
5345 \begin_layout Plain Layout
5346 development/lyxserver/server_monitor.c
5347 \end_layout
5348
5349 \end_inset
5350
5351 .
5352 \end_layout
5353
5354 \begin_layout Standard
5355 Another useful tool is the command-line based clientfound in 
5356 \begin_inset Flex Code
5357 status collapsed
5358
5359 \begin_layout Plain Layout
5360 src/client/lyxclient
5361 \end_layout
5362
5363 \end_inset
5364
5365 .
5366 \end_layout
5367
5368 \begin_layout Section
5369 Normal communication
5370 \end_layout
5371
5372 \begin_layout Standard
5373 To issue a LyX call, the client writes a line of ASCII text into the input
5374  pipe.
5375  This line has the following format:
5376 \end_layout
5377
5378 \begin_layout Quote
5379 LYXCMD:
5380 \emph on
5381 clientname
5382 \emph default
5383 :
5384 \emph on
5385 function
5386 \emph default
5387 :
5388 \emph on
5389 argument
5390 \end_layout
5391
5392 \begin_layout Description
5393 clientname is a name that the client can choose arbitrarily.
5394  Its only use is that LyX will echo it if it sends an answer—so a client
5395  can dispatch results from different requesters.
5396 \end_layout
5397
5398 \begin_layout Description
5399 function is the function you want LyX to perform.
5400  It is the same as the commands you'd use in the minibuffer.
5401 \end_layout
5402
5403 \begin_layout Description
5404 argument is an optional argument which is meaningful only to some functions
5405  (for instance, the 
5406 \begin_inset Quotes eld
5407 \end_inset
5408
5409 self-insert
5410 \begin_inset Quotes erd
5411 \end_inset
5412
5413  LFUN will insert the argument as text at the cursor position).
5414 \end_layout
5415
5416 \begin_layout Standard
5417 The answer from LyX will arrive in the output pipe and be of the form
5418 \end_layout
5419
5420 \begin_layout Quote
5421 INFO:
5422 \emph on
5423 clientname
5424 \emph default
5425 :
5426 \emph on
5427 function
5428 \emph default
5429 :
5430 \emph on
5431 data
5432 \end_layout
5433
5434 \begin_layout Standard
5435 where 
5436 \emph on
5437 clientname
5438 \emph default
5439  and 
5440 \emph on
5441 function
5442 \emph default
5443  are just echoed from the command request, while 
5444 \emph on
5445 data
5446 \emph default
5447  is more or less useful information filled according to how the command
5448  execution worked out.
5449  Some commands, such as 
5450 \begin_inset Quotes eld
5451 \end_inset
5452
5453 font-state
5454 \begin_inset Quotes erd
5455 \end_inset
5456
5457 , will return information about the internal state of LyX, while other will
5458  return an empty data-response.
5459  This means that the command execution went fine.
5460 \end_layout
5461
5462 \begin_layout Standard
5463 In case of errors, the response from LyX will have this form
5464 \end_layout
5465
5466 \begin_layout Quote
5467 ERROR:
5468 \emph on
5469 clientname
5470 \emph default
5471 :
5472 \emph on
5473 function
5474 \emph default
5475 :
5476 \emph on
5477 error message
5478 \end_layout
5479
5480 \begin_layout Standard
5481 where the 
5482 \emph on
5483 error message
5484 \emph default
5485  should contain an explanation of why the command failed.
5486 \end_layout
5487
5488 \begin_layout Standard
5489 Examples:
5490 \end_layout
5491
5492 \begin_layout LyX-Code
5493 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5494 \begin_inset Newline newline
5495 \end_inset
5496
5497 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5498 \begin_inset Newline newline
5499 \end_inset
5500
5501 read a <~/.lyxpipe.out
5502 \begin_inset Newline newline
5503 \end_inset
5504
5505 echo $a
5506 \end_layout
5507
5508 \begin_layout Section
5509 Notification
5510 \end_layout
5511
5512 \begin_layout Standard
5513 LyX can notify clients of events going on asynchronously.
5514  Currently it will only do this if the user binds a key sequence with the
5515  function 
5516 \begin_inset Quotes eld
5517 \end_inset
5518
5519 notify
5520 \begin_inset Quotes erd
5521 \end_inset
5522
5523 .
5524  The format of the string LyX sends is as follows:
5525 \end_layout
5526
5527 \begin_layout Quote
5528 \begin_inset Flex Code
5529 status collapsed
5530
5531 \begin_layout Plain Layout
5532 NOTIFY:
5533 \end_layout
5534
5535 \end_inset
5536
5537
5538 \emph on
5539 key-sequence
5540 \end_layout
5541
5542 \begin_layout Standard
5543 where 
5544 \emph on
5545 key-sequence
5546 \emph default
5547  is the printed representation of the key sequence that was actually typed
5548  by the user.
5549 \end_layout
5550
5551 \begin_layout Standard
5552 This mechanism can be used to extend LyX's command set and implement macros.
5553  Bind some key sequence to 
5554 \begin_inset Quotes eld
5555 \end_inset
5556
5557 notify
5558 \begin_inset Quotes erd
5559 \end_inset
5560
5561 .
5562  Then start a client that listens on the output pipe, dispatches the command
5563  according to the sequence, and starts a function that may use LyX calls
5564  and LyX requests to issue a command or a series of commands to LyX.
5565 \end_layout
5566
5567 \begin_layout Section
5568 The simple LyX Server Protocol
5569 \end_layout
5570
5571 \begin_layout Standard
5572 LyX implements a simple protocol that can be used for session management.
5573  All messages are of the form
5574 \end_layout
5575
5576 \begin_layout Quote
5577 LYXSRV:
5578 \emph on
5579 clientname
5580 \emph default
5581 :
5582 \emph on
5583 protocol message
5584 \end_layout
5585
5586 \begin_layout Standard
5587 where 
5588 \emph on
5589 protocol message
5590 \emph default
5591  can be 
5592 \begin_inset Quotes eld
5593 \end_inset
5594
5595 hello
5596 \begin_inset Quotes erd
5597 \end_inset
5598
5599  or 
5600 \begin_inset Quotes eld
5601 \end_inset
5602
5603 bye
5604 \begin_inset Quotes erd
5605 \end_inset
5606
5607 .
5608  If 
5609 \begin_inset Quotes eld
5610 \end_inset
5611
5612 hello
5613 \begin_inset Quotes erd
5614 \end_inset
5615
5616  is received from a client, LyX will report back to inform the client that
5617  it's listening to it's messages, while 
5618 \begin_inset Quotes eld
5619 \end_inset
5620
5621 bye
5622 \begin_inset Quotes erd
5623 \end_inset
5624
5625  sent from LyX will inform clients that LyX is closing.
5626 \end_layout
5627
5628 \begin_layout Section
5629 Reverse DVI/PDF search
5630 \end_layout
5631
5632 \begin_layout Standard
5633 Some DVI/PDF viewers
5634 \begin_inset Foot
5635 status collapsed
5636
5637 \begin_layout Plain Layout
5638 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5639  Skim on Mac OSX and SumatraPDF on Windows.
5640 \end_layout
5641
5642 \end_inset
5643
5644  provide 
5645 \emph on
5646 reverse search
5647 \emph default
5648  facility (also called 
5649 \emph on
5650 inverse search
5651 \emph default
5652 ).
5653  This means that you can tell LyX to put the cursor to a specific line in
5654  the document by clicking at the respective position in the DVI/PDF output.
5655  To achieve this, the viewer must be able to communicate with LyX.
5656  This is done via the LyX server either by using the named pipe (
5657 \emph on
5658 lyxpipe
5659 \emph default
5660 ), or the UNIX domain socket (
5661 \emph on
5662 lyxsocket
5663 \emph default
5664 ) that LyX creates in its temporary directory (this is the way the 
5665 \begin_inset Flex Code
5666 status collapsed
5667
5668 \begin_layout Plain Layout
5669 lyxclient
5670 \end_layout
5671
5672 \end_inset
5673
5674  program communicates with LyX).
5675  In some cases, you need a helper script that mediates between the viewer
5676  and LyX, in others, the viewer can communicate with LyX directly.
5677  This depends on the selected viewer and on your operating system.
5678  The same applies to the way viewers need to be configured and the way the
5679  reverse search is actually performed.
5680  In what follows, we will thus describe how to setup reverse search for
5681  specific viewers.
5682  Before we turn to this, though, we will explain what needs to be done generally
5683  to enable reverse search in the DVI/PDF output.
5684 \end_layout
5685
5686 \begin_layout Subsection
5687 Automatic setup
5688 \begin_inset CommandInset label
5689 LatexCommand label
5690 name "sub:rev-search"
5691
5692 \end_inset
5693
5694
5695 \end_layout
5696
5697 \begin_layout Standard
5698 In most cases LyX will do the work for you by enabling the option 
5699 \begin_inset Flex MenuItem
5700 status collapsed
5701
5702 \begin_layout Plain Layout
5703 Synchronize with Output
5704 \end_layout
5705
5706 \end_inset
5707
5708  in the menu 
5709 \begin_inset Flex MenuItem
5710 status collapsed
5711
5712 \begin_layout Plain Layout
5713 Document\SpecialChar \menuseparator
5714 Settings\SpecialChar \menuseparator
5715 Output
5716 \end_layout
5717
5718 \end_inset
5719
5720 .
5721  In such a case LyX will automatically insert the necessary SyncTeX macro
5722  (for PDF) or load the srcltx package (for DVI) respectively.
5723  This option can be easily reached also on 
5724 \begin_inset Flex Code
5725 status collapsed
5726
5727 \begin_layout Plain Layout
5728 View/Update
5729 \end_layout
5730
5731 \end_inset
5732
5733  Toolbar.
5734 \end_layout
5735
5736 \begin_layout Standard
5737 If you need a different setting, you can select or input a custom macro
5738  from the drop down box just below 
5739 \begin_inset Flex MenuItem
5740 status collapsed
5741
5742 \begin_layout Plain Layout
5743 Document\SpecialChar \menuseparator
5744 Settings\SpecialChar \menuseparator
5745 Output\SpecialChar \menuseparator
5746 Synchronize with Output
5747 \end_layout
5748
5749 \end_inset
5750
5751 .
5752 \end_layout
5753
5754 \begin_layout Standard
5755 Note that the method 
5756 \begin_inset Flex Code
5757 status collapsed
5758
5759 \begin_layout Plain Layout
5760
5761 \backslash
5762 synctex=1
5763 \end_layout
5764
5765 \end_inset
5766
5767  enables gzip compression.
5768  If your viewer does not support it, you should instead use 
5769 \begin_inset Flex Code
5770 status collapsed
5771
5772 \begin_layout Plain Layout
5773
5774 \backslash
5775 synctex=-1
5776 \end_layout
5777
5778 \end_inset
5779
5780 .
5781 \end_layout
5782
5783 \begin_layout Standard
5784 Please aöso note that including the 
5785 \begin_inset Flex Code
5786 status collapsed
5787
5788 \begin_layout Plain Layout
5789 srcltx
5790 \end_layout
5791
5792 \end_inset
5793
5794  package or 
5795 \begin_inset Flex Code
5796 status collapsed
5797
5798 \begin_layout Plain Layout
5799 src-specials
5800 \end_layout
5801
5802 \end_inset
5803
5804  sometimes has an undesired impact on the typesetting.
5805  Thus, you should switch output synchronization off for the final typesetting
5806  if you use the 
5807 \begin_inset Flex Code
5808 status collapsed
5809
5810 \begin_layout Plain Layout
5811 srcltx
5812 \end_layout
5813
5814 \end_inset
5815
5816  package or 
5817 \begin_inset Flex Code
5818 status collapsed
5819
5820 \begin_layout Plain Layout
5821 src-specials
5822 \end_layout
5823
5824 \end_inset
5825
5826 .
5827  
5828 \end_layout
5829
5830 \begin_layout Standard
5831 In case you need some more special settings that are not covered by the
5832  automatic settings, read the next section about how to set up output synchroniz
5833 ation manually.
5834  If the automatic setup suits your needs, you can readily jump to section
5835 \begin_inset space ~
5836 \end_inset
5837
5838
5839 \begin_inset CommandInset ref
5840 LatexCommand ref
5841 reference "sub:configuring-viewers"
5842
5843 \end_inset
5844
5845 , where the necessary configuration steps in your viewer -- needed both
5846  with the automatic and the manual setup -- are described.
5847 \end_layout
5848
5849 \begin_layout Subsection
5850 Manual setup
5851 \end_layout
5852
5853 \begin_layout Standard
5854 LaTeX provides several different methods for reverse search.
5855  Some are built-in in the 
5856 \begin_inset Flex Code
5857 status collapsed
5858
5859 \begin_layout Plain Layout
5860 latex/pdflatex
5861 \end_layout
5862
5863 \end_inset
5864
5865  program, some are provided by external packages.
5866  Your choice depends on whether your LaTeX distribution already provides
5867  a given method (the built-in methods are rather new) and whether your viewer
5868  can cope with it.
5869  The available methods are described in the following.
5870 \end_layout
5871
5872 \begin_layout Subsubsection*
5873 Built-in DVI-search via src-specials (DVI only) 
5874 \end_layout
5875
5876 \begin_layout Standard
5877 This method provides the DVI file with the necessary information for reverse
5878  search.
5879  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5880  distribution should include it), and it works reliably.
5881  To enable it, change the 
5882 \begin_inset Flex MenuItem
5883 status collapsed
5884
5885 \begin_layout Plain Layout
5886 LaT
5887 \begin_inset ERT
5888 status collapsed
5889
5890 \begin_layout Plain Layout
5891
5892 {}
5893 \end_layout
5894
5895 \end_inset
5896
5897 eX (plain)->DVI
5898 \end_layout
5899
5900 \end_inset
5901
5902  or 
5903 \begin_inset Flex MenuItem
5904 status collapsed
5905
5906 \begin_layout Plain Layout
5907 LaT
5908 \begin_inset ERT
5909 status collapsed
5910
5911 \begin_layout Plain Layout
5912
5913 {}
5914 \end_layout
5915
5916 \end_inset
5917
5918 eX (plain)->DraftDVI
5919 \end_layout
5920
5921 \end_inset
5922
5923  converter in 
5924 \begin_inset Flex MenuItem
5925 status collapsed
5926
5927 \begin_layout Plain Layout
5928 Preferences\SpecialChar \menuseparator
5929 File Handling\SpecialChar \menuseparator
5930 Converters
5931 \end_layout
5932
5933 \end_inset
5934
5935  to 
5936 \begin_inset Flex Code
5937 status collapsed
5938
5939 \begin_layout Plain Layout
5940 latex -src-specials $$i
5941 \end_layout
5942
5943 \end_inset
5944
5945 .
5946  If this doesn't work, check if your TeX engine needs different options
5947  (the syntax might differ in some distributions).
5948 \end_layout
5949
5950 \begin_layout Subsubsection*
5951 External Packages (PDFSync and scrltx) 
5952 \end_layout
5953
5954 \begin_layout Standard
5955 The packages 
5956 \emph on
5957 pdfsync
5958 \emph default
5959  and 
5960 \emph on
5961 scrltx
5962 \emph default
5963  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5964  respectively.
5965  In order to enable it, load the packages in the LyX preamble: 
5966 \end_layout
5967
5968 \begin_layout Itemize
5969 \begin_inset Flex Code
5970 status collapsed
5971
5972 \begin_layout Plain Layout
5973
5974 \backslash
5975 usepackage{pdfsync}
5976 \end_layout
5977
5978 \end_inset
5979
5980  for reverse PDF search,
5981 \end_layout
5982
5983 \begin_layout Itemize
5984 \begin_inset Flex Code
5985 status collapsed
5986
5987 \begin_layout Plain Layout
5988
5989 \backslash
5990 usepackage[active]{srcltx}
5991 \end_layout
5992
5993 \end_inset
5994
5995  for reverse DVI search.
5996 \end_layout
5997
5998 \begin_layout Standard
5999 If you want to be able to perform both DVI and PDF reverse searches, you
6000  can also insert in the preamble the following lines
6001 \end_layout
6002
6003 \begin_layout LyX-Code
6004
6005 \backslash
6006 usepackage{ifpdf}
6007 \begin_inset Newline newline
6008 \end_inset
6009
6010
6011 \backslash
6012 ifpdf
6013 \begin_inset Newline newline
6014 \end_inset
6015
6016   
6017 \backslash
6018 usepackage{pdfsync}
6019 \begin_inset Newline newline
6020 \end_inset
6021
6022
6023 \backslash
6024 else
6025 \begin_inset Newline newline
6026 \end_inset
6027
6028   
6029 \backslash
6030 usepackage[active]{srcltx}
6031 \begin_inset Newline newline
6032 \end_inset
6033
6034
6035 \backslash
6036 fi
6037 \end_layout
6038
6039 \begin_layout Standard
6040 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6041  right package will be used.
6042 \end_layout
6043
6044 \begin_layout Standard
6045 Note that PDFSync might affect the output layout of your document.
6046  It is therefore advised to disable PDFsync for final documents.
6047 \end_layout
6048
6049 \begin_layout Subsubsection*
6050 Built-in reverse search via SyncTeX (DVI and PDF) 
6051 \end_layout
6052
6053 \begin_layout Standard
6054 Recent versions of 
6055 \begin_inset Flex Code
6056 status collapsed
6057
6058 \begin_layout Plain Layout
6059 (pdf)latex
6060 \end_layout
6061
6062 \end_inset
6063
6064  have built-in support for both PDF and DVI reverse search.
6065  This so-called 
6066 \emph on
6067 SyncTeX
6068 \emph default
6069  facility is basically the result of the integration of the PDFSync package
6070  to the pdftex program and its merge with the 
6071 \emph on
6072 scr-specials
6073 \emph default
6074  approach.
6075  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6076  to use it.
6077  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6078  already provide SyncTeX support.
6079 \end_layout
6080
6081 \begin_layout Standard
6082 To enable SyncTeX for DVI output, change the 
6083 \begin_inset Flex MenuItem
6084 status collapsed
6085
6086 \begin_layout Plain Layout
6087 LaT
6088 \begin_inset ERT
6089 status collapsed
6090
6091 \begin_layout Plain Layout
6092
6093 {}
6094 \end_layout
6095
6096 \end_inset
6097
6098 eX (plain) -> DVI
6099 \end_layout
6100
6101 \end_inset
6102
6103  or 
6104 \begin_inset Flex MenuItem
6105 status collapsed
6106
6107 \begin_layout Plain Layout
6108 LaT
6109 \begin_inset ERT
6110 status collapsed
6111
6112 \begin_layout Plain Layout
6113
6114 {}
6115 \end_layout
6116
6117 \end_inset
6118
6119 eX (plain) -> DraftDVI
6120 \end_layout
6121
6122 \end_inset
6123
6124  converter in 
6125 \begin_inset Flex MenuItem
6126 status collapsed
6127
6128 \begin_layout Plain Layout
6129 Preferences\SpecialChar \menuseparator
6130 File Handling\SpecialChar \menuseparator
6131 Converters
6132 \end_layout
6133
6134 \end_inset
6135
6136  to 
6137 \begin_inset Flex Code
6138 status collapsed
6139
6140 \begin_layout Plain Layout
6141 latex -synctex=1 $$i
6142 \end_layout
6143
6144 \end_inset
6145
6146 , and for PDF output, change the 
6147 \begin_inset Flex MenuItem
6148 status collapsed
6149
6150 \begin_layout Plain Layout
6151 LaT
6152 \begin_inset ERT
6153 status collapsed
6154
6155 \begin_layout Plain Layout
6156
6157 {}
6158 \end_layout
6159
6160 \end_inset
6161
6162 eX (pdflatex) -> PDF (pdflatex)
6163 \end_layout
6164
6165 \end_inset
6166
6167  or converter to 
6168 \begin_inset Flex Code
6169 status collapsed
6170
6171 \begin_layout Plain Layout
6172 pdflatex -synctex=1 $$i
6173 \end_layout
6174
6175 \end_inset
6176
6177 .
6178  Check the documentation of your viewer whether the viewer needs to be configure
6179 d for the use with SyncTeX.
6180 \begin_inset Foot
6181 status collapsed
6182
6183 \begin_layout Plain Layout
6184 Note that the option 
6185 \begin_inset Flex Code
6186 status collapsed
6187
6188 \begin_layout Plain Layout
6189 -synctex=1
6190 \end_layout
6191
6192 \end_inset
6193
6194  option enables gzip compression.
6195  If your viewer does not support it, you should instead use 
6196 \begin_inset Flex Code
6197 status collapsed
6198
6199 \begin_layout Plain Layout
6200 -synctex=-1
6201 \end_layout
6202
6203 \end_inset
6204
6205 .
6206 \end_layout
6207
6208 \end_inset
6209
6210
6211 \end_layout
6212
6213 \begin_layout Subsection
6214 Configuring and using specific viewers
6215 \begin_inset CommandInset label
6216 LatexCommand label
6217 name "sub:configuring-viewers"
6218
6219 \end_inset
6220
6221
6222 \end_layout
6223
6224 \begin_layout Subsubsection*
6225 Xdvi (all platforms)
6226 \end_layout
6227
6228 \begin_layout Standard
6229 If you use 
6230 \begin_inset Flex Code
6231 status collapsed
6232
6233 \begin_layout Plain Layout
6234 xdvi
6235 \end_layout
6236
6237 \end_inset
6238
6239 , you don't need to do anything else for performing a reverse DVI search,
6240  as LyX already provides the necessary hooks for automatically using the
6241  
6242 \begin_inset Flex Code
6243 status collapsed
6244
6245 \begin_layout Plain Layout
6246 lyxclient
6247 \end_layout
6248
6249 \end_inset
6250
6251  program.
6252  Just setup your document as described above (reverse search is triggered
6253  by Ctrl-click or Alt-click on Mac OSX, respectively).
6254 \end_layout
6255
6256 \begin_layout Standard
6257 However, if for whatever reason you want to use the named pipe instead of
6258  the socket for communicating with LyX, simply change the DVI viewer in
6259  
6260 \begin_inset Flex MenuItem
6261 status collapsed
6262
6263 \begin_layout Plain Layout
6264 Preferences\SpecialChar \menuseparator
6265 File Handling\SpecialChar \menuseparator
6266 File formats
6267 \end_layout
6268
6269 \end_inset
6270
6271  to
6272 \begin_inset Foot
6273 status collapsed
6274
6275 \begin_layout Plain Layout
6276 On Mac OSX you have to use 
6277 \begin_inset Flex Code
6278 status collapsed
6279
6280 \begin_layout Plain Layout
6281 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6282 \end_layout
6283
6284 \end_inset
6285
6286
6287 \end_layout
6288
6289 \end_inset
6290
6291  
6292 \begin_inset Flex Code
6293 status collapsed
6294
6295 \begin_layout Plain Layout
6296 xdvi -editor 'lyxeditor.sh %f %l'
6297 \end_layout
6298
6299 \end_inset
6300
6301 , where 
6302 \begin_inset Flex Code
6303 status collapsed
6304
6305 \begin_layout Plain Layout
6306 lyxeditor.sh
6307 \end_layout
6308
6309 \end_inset
6310
6311  is a suitable script.
6312  For example, a minimal shell script is the following one:
6313 \end_layout
6314
6315 \begin_layout LyX-Code
6316 #!/bin/sh
6317 \begin_inset Newline newline
6318 \end_inset
6319
6320 LYXPIPE="/path/to/lyxpipe"
6321 \begin_inset Newline newline
6322 \end_inset
6323
6324 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6325 \begin_inset Newline newline
6326 \end_inset
6327
6328 echo "$COMMAND" > "${LYXPIPE}".in || exit
6329 \begin_inset Newline newline
6330 \end_inset
6331
6332 read < "${LYXPIPE}".out || exit
6333 \end_layout
6334
6335 \begin_layout Standard
6336 where 
6337 \begin_inset Flex Code
6338 status collapsed
6339
6340 \begin_layout Plain Layout
6341 /path/to/lyxpipe
6342 \end_layout
6343
6344 \end_inset
6345
6346  is the Ly
6347 \begin_inset ERT
6348 status collapsed
6349
6350 \begin_layout Plain Layout
6351
6352 {}
6353 \end_layout
6354
6355 \end_inset
6356
6357 XServer pipe path specified in 
6358 \begin_inset Flex MenuItem
6359 status collapsed
6360
6361 \begin_layout Plain Layout
6362 Preferences\SpecialChar \menuseparator
6363 Paths
6364 \end_layout
6365
6366 \end_inset
6367
6368 .
6369 \begin_inset Foot
6370 status collapsed
6371
6372 \begin_layout Plain Layout
6373 In the 
6374 \begin_inset Flex Code
6375 status collapsed
6376
6377 \begin_layout Plain Layout
6378 development/tools
6379 \end_layout
6380
6381 \end_inset
6382
6383  folder of a source distribution you can find a 
6384 \begin_inset Flex Code
6385 status collapsed
6386
6387 \begin_layout Plain Layout
6388 lyxeditor
6389 \end_layout
6390
6391 \end_inset
6392
6393  script which is able to locate the 
6394 \emph on
6395 lyxpipe
6396 \emph default
6397  based on your preferences.
6398 \end_layout
6399
6400 \end_inset
6401
6402
6403 \end_layout
6404
6405 \begin_layout Subsubsection*
6406 MacDviX (Mac OSX)
6407 \end_layout
6408
6409 \begin_layout Standard
6410 At the end of 
6411 \begin_inset Flex Code
6412 status collapsed
6413
6414 \begin_layout Plain Layout
6415 /Applications/MacDviX_Folder/calleditor.script
6416 \end_layout
6417
6418 \end_inset
6419
6420 , add the following lines:
6421 \end_layout
6422
6423 \begin_layout LyX-Code
6424 /Applications/Ly
6425 \begin_inset ERT
6426 status collapsed
6427
6428 \begin_layout Plain Layout
6429
6430 {}
6431 \end_layout
6432
6433 \end_inset
6434
6435 X.app/Contents/MacOS/lyxeditor "$2" $1
6436 \begin_inset Newline newline
6437 \end_inset
6438
6439 exit 1
6440 \end_layout
6441
6442 \begin_layout Standard
6443 Modify the lines accordingly if you install LyX somewhere else than in the
6444  Applications folder.
6445 \end_layout
6446
6447 \begin_layout Standard
6448 Reverse search is triggered by Alt-click (OPTION-click).
6449 \end_layout
6450
6451 \begin_layout Subsubsection*
6452 Skim (Mac OSX)
6453 \end_layout
6454
6455 \begin_layout Standard
6456 Enter 
6457 \begin_inset Flex Code
6458 status collapsed
6459
6460 \begin_layout Plain Layout
6461 open -a Skim.app $$i
6462 \end_layout
6463
6464 \end_inset
6465
6466  to the viewer setting in 
6467 \begin_inset Flex MenuItem
6468 status collapsed
6469
6470 \begin_layout Plain Layout
6471 Preferences\SpecialChar \menuseparator
6472 File Handling\SpecialChar \menuseparator
6473 File formats\SpecialChar \menuseparator
6474 PDF (pdflatex)
6475 \end_layout
6476
6477 \end_inset
6478
6479 , and then in 
6480 \begin_inset Flex MenuItem
6481 status collapsed
6482
6483 \begin_layout Plain Layout
6484 Skim\SpecialChar \menuseparator
6485 Preferences\SpecialChar \menuseparator
6486 Sync
6487 \end_layout
6488
6489 \end_inset
6490
6491  choose 
6492 \begin_inset Flex MenuItem
6493 status collapsed
6494
6495 \begin_layout Plain Layout
6496 custom
6497 \end_layout
6498
6499 \end_inset
6500
6501  preset and enter command 
6502 \begin_inset Flex MenuItem
6503 status collapsed
6504
6505 \begin_layout Plain Layout
6506 /Applications/LyX.app/Contents/MacOS/lyxeditor
6507 \end_layout
6508
6509 \end_inset
6510
6511 .
6512 \end_layout
6513
6514 \begin_layout Standard
6515 Reverse search is triggered by COMMAND-SHIFT-click
6516 \end_layout
6517
6518 \begin_layout Subsubsection*
6519 Okular (KDE)
6520 \end_layout
6521
6522 \begin_layout Standard
6523 Go to 
6524 \begin_inset Flex MenuItem
6525 status collapsed
6526
6527 \begin_layout Plain Layout
6528 Settings\SpecialChar \menuseparator
6529 Configure Okular\SpecialChar \ldots{}
6530 \SpecialChar \menuseparator
6531 Editor
6532 \end_layout
6533
6534 \end_inset
6535
6536 , select 
6537 \begin_inset Quotes eld
6538 \end_inset
6539
6540 Custom Text Editor
6541 \begin_inset Quotes erd
6542 \end_inset
6543
6544  and add the command 
6545 \begin_inset Flex Code
6546 status collapsed
6547
6548 \begin_layout Plain Layout
6549 lyxclient -g %f %l
6550 \end_layout
6551
6552 \end_inset
6553
6554 .
6555 \end_layout
6556
6557 \begin_layout Standard
6558 Reverse search is triggered by SHIFT-click.
6559 \end_layout
6560
6561 \begin_layout Subsubsection*
6562 YAP (Windows)
6563 \end_layout
6564
6565 \begin_layout Standard
6566 Launch yap, choose its 
6567 \begin_inset Flex MenuItem
6568 status collapsed
6569
6570 \begin_layout Plain Layout
6571 View\SpecialChar \menuseparator
6572 Options
6573 \end_layout
6574
6575 \end_inset
6576
6577  menu and select the 
6578 \begin_inset Quotes eld
6579 \end_inset
6580
6581 Inverse DVI Search
6582 \begin_inset Quotes erd
6583 \end_inset
6584
6585  tab.
6586  Click on the 
6587 \begin_inset Quotes eld
6588 \end_inset
6589
6590 New\SpecialChar \ldots{}
6591
6592 \begin_inset Quotes erd
6593 \end_inset
6594
6595  button and, in the window that opens, enter 
6596 \begin_inset Quotes eld
6597 \end_inset
6598
6599 LyX Editor
6600 \begin_inset Quotes erd
6601 \end_inset
6602
6603  (or any other name you like) in the 
6604 \begin_inset Quotes eld
6605 \end_inset
6606
6607 Name:
6608 \begin_inset Quotes erd
6609 \end_inset
6610
6611  field.
6612  Now click on the button labeled 
6613 \begin_inset Quotes eld
6614 \end_inset
6615
6616 \SpecialChar \ldots{}
6617
6618 \begin_inset Quotes erd
6619 \end_inset
6620
6621  to open a file dialog and navigate to the directory containing the batch
6622  file 
6623 \begin_inset Flex Code
6624 status collapsed
6625
6626 \begin_layout Plain Layout
6627 lyxeditor.bat
6628 \end_layout
6629
6630 \end_inset
6631
6632  (see below).
6633  Select 
6634 \begin_inset Flex Code
6635 status collapsed
6636
6637 \begin_layout Plain Layout
6638 lyxeditor.bat
6639 \end_layout
6640
6641 \end_inset
6642
6643  and then specify the program arguments as 
6644 \begin_inset Flex Code
6645 status collapsed
6646
6647 \begin_layout Plain Layout
6648 %f %l
6649 \end_layout
6650
6651 \end_inset
6652
6653 .
6654  The 
6655 \begin_inset Flex Code
6656 status collapsed
6657
6658 \begin_layout Plain Layout
6659 lyxeditor.bat
6660 \end_layout
6661
6662 \end_inset
6663
6664  wrapper is used for communicating with LyX through the 
6665 \emph on
6666 lyxpipe
6667 \emph default
6668  and is as follows:
6669 \end_layout
6670
6671 \begin_layout LyX-Code
6672 @echo off
6673 \begin_inset Newline newline
6674 \end_inset
6675
6676 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6677 \backslash
6678
6679 \backslash
6680 .
6681 \backslash
6682 pipe
6683 \backslash
6684 lyxpipe.in
6685 \begin_inset Newline newline
6686 \end_inset
6687
6688 type 
6689 \backslash
6690
6691 \backslash
6692 .
6693 \backslash
6694 pipe
6695 \backslash
6696 lyxpipe.out
6697 \end_layout
6698
6699 \begin_layout Standard
6700 Make sure that the LyXServer pipe path you specified in LyX is 
6701 \begin_inset Flex Code
6702 status collapsed
6703
6704 \begin_layout Plain Layout
6705
6706 \backslash
6707
6708 \backslash
6709 .
6710 \backslash
6711 pipe
6712 \backslash
6713 lyxpipe
6714 \end_layout
6715
6716 \end_inset
6717
6718 , otherwise change the 
6719 \begin_inset Flex Code
6720 status collapsed
6721
6722 \begin_layout Plain Layout
6723 lyxeditor.bat
6724 \end_layout
6725
6726 \end_inset
6727
6728  wrapper accordingly.
6729 \end_layout
6730
6731 \begin_layout Standard
6732 In yap, reverse search is triggered by double-click.
6733 \end_layout
6734
6735 \begin_layout Subsubsection*
6736 SumatraPDF (Windows)
6737 \end_layout
6738
6739 \begin_layout Standard
6740 In order to use SumatraPDF for inverse search, enter 
6741 \begin_inset Flex Code
6742 status collapsed
6743
6744 \begin_layout Plain Layout
6745 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6746 \end_layout
6747
6748 \end_inset
6749
6750  in the viewer setting in 
6751 \begin_inset Flex MenuItem
6752 status collapsed
6753
6754 \begin_layout Plain Layout
6755 Preferences\SpecialChar \menuseparator
6756 File Handling\SpecialChar \menuseparator
6757 File formats\SpecialChar \menuseparator
6758 PDF (pdflatex)
6759 \end_layout
6760
6761 \end_inset
6762
6763 , where 
6764 \begin_inset Flex Code
6765 status collapsed
6766
6767 \begin_layout Plain Layout
6768 lyxeditor.bat
6769 \end_layout
6770
6771 \end_inset
6772
6773  is the previous wrapper.
6774  If SumatraPDF.exe is not in your command PATH, use its full file name.
6775 \end_layout
6776
6777 \begin_layout Standard
6778 Reverse search is triggered by double-click.
6779 \end_layout
6780
6781 \begin_layout Subsubsection*
6782 YAP (Cygwin)
6783 \end_layout
6784
6785 \begin_layout Standard
6786 First of all, make sure that yap is your default DVI viewer in the Windows
6787  environment, then launch it, choose its 
6788 \begin_inset Flex MenuItem
6789 status collapsed
6790
6791 \begin_layout Plain Layout
6792 View\SpecialChar \menuseparator
6793 Options
6794 \end_layout
6795
6796 \end_inset
6797
6798  menu and select the 
6799 \begin_inset Quotes eld
6800 \end_inset
6801
6802 Inverse DVI Search
6803 \begin_inset Quotes erd
6804 \end_inset
6805
6806  tab.
6807  Click on the 
6808 \begin_inset Quotes eld
6809 \end_inset
6810
6811 New\SpecialChar \ldots{}
6812
6813 \begin_inset Quotes erd
6814 \end_inset
6815
6816  button and, in the window that opens, enter 
6817 \begin_inset Quotes eld
6818 \end_inset
6819
6820 LyX Editor
6821 \begin_inset Quotes erd
6822 \end_inset
6823
6824  (or any other name you like) in the 
6825 \begin_inset Quotes eld
6826 \end_inset
6827
6828 Name:
6829 \begin_inset Quotes erd
6830 \end_inset
6831
6832  field.
6833  Now click on the button labeled 
6834 \begin_inset Quotes eld
6835 \end_inset
6836
6837 \SpecialChar \ldots{}
6838
6839 \begin_inset Quotes erd
6840 \end_inset
6841
6842  to open a file dialog and navigate to the directory containing the 
6843 \begin_inset Flex Code
6844 status collapsed
6845
6846 \begin_layout Plain Layout
6847 lyxeditor.exe
6848 \end_layout
6849
6850 \end_inset
6851
6852  program (which is installed by default on Cygwin along with the LyX executable).
6853  Select 
6854 \begin_inset Flex Code
6855 status collapsed
6856
6857 \begin_layout Plain Layout
6858 lyxeditor.exe
6859 \end_layout
6860
6861 \end_inset
6862
6863  and then specify the program arguments as 
6864 \begin_inset Flex Code
6865 status collapsed
6866
6867 \begin_layout Plain Layout
6868 -g %f %l
6869 \end_layout
6870
6871 \end_inset
6872
6873 .
6874  In this way, you will be using the 
6875 \emph on
6876 lyxsocket
6877 \emph default
6878  for communicating with LyX.
6879  If, for whatever reason, you want to use the 
6880 \emph on
6881 lyxpipe
6882 \emph default
6883 , omit the 
6884 \begin_inset Flex Code
6885 status collapsed
6886
6887 \begin_layout Plain Layout
6888 -g
6889 \end_layout
6890
6891 \end_inset
6892
6893  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6894 \end_layout
6895
6896 \begin_layout Standard
6897 In yap, reverse search is triggered by double-click.
6898 \end_layout
6899
6900 \begin_layout Subsubsection*
6901 SumatraPDF (Cygwin)
6902 \end_layout
6903
6904 \begin_layout Standard
6905 In order to use SumatraPDF for inverse search, enter 
6906 \begin_inset Flex Code
6907 status collapsed
6908
6909 \begin_layout Plain Layout
6910 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6911 \end_layout
6912
6913 \end_inset
6914
6915  in the viewer setting in 
6916 \begin_inset Flex MenuItem
6917 status collapsed
6918
6919 \begin_layout Plain Layout
6920 Preferences\SpecialChar \menuseparator
6921 File Handling\SpecialChar \menuseparator
6922 File formats\SpecialChar \menuseparator
6923 PDF (pdflatex)
6924 \end_layout
6925
6926 \end_inset
6927
6928 .
6929  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6930  The 
6931 \begin_inset Flex Code
6932 status collapsed
6933
6934 \begin_layout Plain Layout
6935 -g
6936 \end_layout
6937
6938 \end_inset
6939
6940  enables communication via the 
6941 \emph on
6942 lyxsocket
6943 \emph default
6944 .
6945  Again, omit the 
6946 \begin_inset Flex Code
6947 status collapsed
6948
6949 \begin_layout Plain Layout
6950 -g
6951 \end_layout
6952
6953 \end_inset
6954
6955  option if you want to use the 
6956 \emph on
6957 lyxpipe
6958 \emph default
6959 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6960 \end_layout
6961
6962 \begin_layout Standard
6963 Reverse search is triggered by double-click.
6964 \end_layout
6965
6966 \begin_layout Section
6967 Forward search
6968 \end_layout
6969
6970 \begin_layout Standard
6971 Forward search is, as the name implies, in a sense the 
6972 \begin_inset Quotes eld
6973 \end_inset
6974
6975 opposite
6976 \begin_inset Quotes erd
6977 \end_inset
6978
6979  of reverse search.
6980  It allows you to let the viewer jump to a given position from within LyX.
6981  If forward search is set up (as described in what follows), you can put
6982  the cursor anywhere in your LyX document, and hit 
6983 \begin_inset Flex MenuItem
6984 status collapsed
6985
6986 \begin_layout Plain Layout
6987 Navigate\SpecialChar \menuseparator
6988 Forward search
6989 \end_layout
6990
6991 \end_inset
6992
6993  (or select 
6994 \begin_inset Flex MenuItem
6995 status collapsed
6996
6997 \begin_layout Plain Layout
6998 Forward search
6999 \end_layout
7000
7001 \end_inset
7002
7003  in the context menu via right mouse click), and then the viewer will jump
7004  to that position as well.
7005  This implies, of course, that your viewer supports this function.
7006 \end_layout
7007
7008 \begin_layout Standard
7009 To make forward search possible, you first need to provide the generated
7010  output PDF/DVI file with additional information about the TeX sources.
7011  This can be done via the methods described in the section 
7012 \begin_inset CommandInset ref
7013 LatexCommand ref
7014 reference "sub:rev-search"
7015
7016 \end_inset
7017
7018 .
7019 \end_layout
7020
7021 \begin_layout Standard
7022 Additionally, you need to configure LyX for using your viewers in 
7023 \begin_inset Flex MenuItem
7024 status collapsed
7025
7026 \begin_layout Plain Layout
7027 Tools\SpecialChar \menuseparator
7028 Preferences\SpecialChar \menuseparator
7029 Output\SpecialChar \menuseparator
7030 General
7031 \end_layout
7032
7033 \end_inset
7034
7035 .
7036  We provide a range of tested configurations for some viewers, which you
7037  can select from the drop down list.
7038  If none of these configurations suits you, you have to find out and enter
7039  a suitable configuration yourself.
7040  The definition syntax uses the following placeholders:
7041 \end_layout
7042
7043 \begin_layout Itemize
7044 \noindent
7045 \begin_inset Flex Code
7046 status collapsed
7047
7048 \begin_layout Plain Layout
7049 $$n
7050 \end_layout
7051
7052 \end_inset
7053
7054 : row number
7055 \end_layout
7056
7057 \begin_layout Itemize
7058 \noindent
7059 \begin_inset Flex Code
7060 status collapsed
7061
7062 \begin_layout Plain Layout
7063 $$t
7064 \end_layout
7065
7066 \end_inset
7067
7068 : name of the (temporary) exported .tex file (without path)
7069 \end_layout
7070
7071 \begin_layout Itemize
7072 \noindent
7073 \begin_inset Flex Code
7074 status collapsed
7075
7076 \begin_layout Plain Layout
7077 $$f
7078 \end_layout
7079
7080 \end_inset
7081
7082 : name of the (temporary) exported .tex file (including path)
7083 \end_layout
7084
7085 \begin_layout Itemize
7086 \noindent
7087 \begin_inset Flex Code
7088 status collapsed
7089
7090 \begin_layout Plain Layout
7091 $$o
7092 \end_layout
7093
7094 \end_inset
7095
7096 : name of the exported output file (either dvi or pdf, depending on which
7097  one exists in the temporary directory)
7098 \end_layout
7099
7100 \begin_layout Standard
7101 Note that only some of the viewers provide full forward search functionality,
7102  among them yap, xdvi, okular and Sumatra PDF.
7103 \begin_inset Foot
7104 status collapsed
7105
7106 \begin_layout Plain Layout
7107 For Sumatra CMCDDE is needed --- downloadable from 
7108 \begin_inset CommandInset href
7109 LatexCommand href
7110 target "http://www.istri.fr/zip/CMCDDE.zip"
7111
7112 \end_inset
7113
7114
7115 \end_layout
7116
7117 \end_inset
7118
7119  While many of the widespread PDF viewers (most notably Adobe Reader) do
7120  not support forward search at all, some other viewers -- e.
7121 \begin_inset space \thinspace{}
7122 \end_inset
7123
7124 g.
7125  evince and xpdf -- allow at least to reload the document and jump to a
7126  specific page of the file, so you can at least navigate 
7127 \begin_inset Quotes eld
7128 \end_inset
7129
7130 near
7131 \begin_inset Quotes erd
7132 \end_inset
7133
7134 .
7135  This latter functionality is provided by an external call of synctex (see
7136  the predefined example configurations).
7137  
7138 \end_layout
7139
7140 \begin_layout Standard
7141 Forward search works both with DVI and PDF output.
7142  LyX simply checks which preview format you have used before (i.
7143 \begin_inset space \thinspace{}
7144 \end_inset
7145
7146 e., which format is already there in the temporary directory) and chooses
7147  the appropriate configuration for the respective format.
7148 \end_layout
7149
7150 \begin_layout Chapter
7151 Special Document Classes
7152 \end_layout
7153
7154 \begin_layout Section
7155 A&A Paper
7156 \end_layout
7157
7158 \begin_layout Standard
7159 by 
7160 \noun on
7161 Peter Sütterlin
7162 \end_layout
7163
7164 \begin_layout Subsection
7165 Introduction
7166 \end_layout
7167
7168 \begin_layout Standard
7169 This section describes how LyX can be used to write articles for submission
7170  to the scientific journal 
7171 \emph on
7172 Astronomy and Astrophysics
7173 \emph default
7174  (www.edpsciences.fr/aa/ 
7175 \begin_inset Flex URL
7176 status collapsed
7177
7178 \begin_layout Plain Layout
7179
7180 http://www.edpsciences.fr/aa/
7181 \end_layout
7182
7183 \end_inset
7184
7185 ) using Version 5.01 of the document class 
7186 \family typewriter
7187 aa.cls
7188 \family default
7189 .
7190  This package can be downloaded from the ftp site
7191 \end_layout
7192
7193 \begin_layout Standard
7194 \begin_inset VSpace medskip
7195 \end_inset
7196
7197
7198 \end_layout
7199
7200 \begin_layout Standard
7201 \align center
7202 \begin_inset Flex URL
7203 status collapsed
7204
7205 \begin_layout Plain Layout
7206
7207 ftp://ftp.edpsciences.org/pub/aa/readme.html
7208 \end_layout
7209
7210 \end_inset
7211
7212
7213 \end_layout
7214
7215 \begin_layout Standard
7216 \begin_inset VSpace medskip
7217 \end_inset
7218
7219
7220 \end_layout
7221
7222 \begin_layout Standard
7223 A manual comes together with that package, and this text is not meant to
7224  replace the original manual but is merely a short guide in how to realize
7225  the correct form of your paper.
7226  
7227 \end_layout
7228
7229 \begin_layout Standard
7230 Please note that the publisher of the journal was changed from Springer
7231  to EDP Sciences starting January 1, 2001.
7232  That change involved also some slight changes to the style files, namely
7233  the removal of the thesaurus command.
7234  The LyX class aa supports the newest version of these style files, V 5.01.
7235  If you have an older version installed, please upgrade.
7236  For compatibility, the old (version 4) layout has been kept as 
7237 \family sans
7238 article (A&A V4)
7239 \family default
7240 .
7241  Please refer to the comments in 
7242 \family typewriter
7243 LyXDir/layouts/aapaper.layout
7244 \family default
7245 .
7246 \end_layout
7247
7248 \begin_layout Subsection
7249 Getting started
7250 \end_layout
7251
7252 \begin_layout Standard
7253 It is recommended you start from the example template distributed with LyX.
7254  If you are not using a template, note the following settings:
7255 \end_layout
7256
7257 \begin_layout Itemize
7258 Select 
7259 \family sans
7260 article (A&A)
7261 \family default
7262  in the 
7263 \family sans
7264 Document\SpecialChar \menuseparator
7265 Settings
7266 \family default
7267  dialog (OK, that one was obvious).
7268 \end_layout
7269
7270 \begin_layout Itemize
7271 Don't change the option 
7272 \family sans
7273 Page
7274 \begin_inset space ~
7275 \end_inset
7276
7277 style
7278 \family default
7279 : Leave it set to 
7280 \family sans
7281 default
7282 \family default
7283 .
7284  The whole layout is done by the macros, you shouldn't change anything.
7285 \end_layout
7286
7287 \begin_layout Subsection
7288 The header block
7289 \end_layout
7290
7291 \begin_layout Standard
7292 First thing to enter is the header information.
7293  It consists of seven entries, of which some are optional.
7294  They are
7295 \end_layout
7296
7297 \begin_layout Itemize
7298
7299 \family sans
7300 Title
7301 \family default
7302 : [required] 
7303 \end_layout
7304
7305 \begin_layout Itemize
7306
7307 \family sans
7308 Subtitle
7309 \family default
7310 : [optional] 
7311 \end_layout
7312
7313 \begin_layout Itemize
7314
7315 \family sans
7316 Author
7317 \family default
7318 : [required]
7319 \end_layout
7320
7321 \begin_layout Itemize
7322
7323 \family sans
7324 Address
7325 \family default
7326 : [required]
7327 \end_layout
7328
7329 \begin_layout Itemize
7330
7331 \family sans
7332 Offprints
7333 \family default
7334 : [optional] if more than one author: whom to contact for offprint requests.
7335 \end_layout
7336
7337 \begin_layout Itemize
7338
7339 \family sans
7340 Mail
7341 \family default
7342 : [optional] mail address for contacts.
7343 \end_layout
7344
7345 \begin_layout Itemize
7346
7347 \family sans
7348 Date
7349 \family default
7350 : [required].
7351  Suggested format is 
7352 \family typewriter
7353 Received: <date>; Accepted <date> 
7354 \end_layout
7355
7356 \begin_layout Standard
7357 There is no need to issue the 
7358 \family typewriter
7359
7360 \backslash
7361 maketitle
7362 \family default
7363  command, this is done automatically by LyX when the header is finished.
7364  Although the order of the single header entries doesn't matter it is advised
7365  to keep the above sequence, just to get the best optics and meets the layout
7366  of the real document.
7367 \end_layout
7368
7369 \begin_layout Standard
7370 If you want to place footnotes in the header block, e.
7371 \begin_inset space \thinspace{}
7372 \end_inset
7373
7374 g.
7375 \begin_inset space \space{}
7376 \end_inset
7377
7378 to state your present address, just use the standard footnote via the menu
7379  
7380 \family sans
7381 Insert\SpecialChar \menuseparator
7382 Footnote.
7383
7384 \family default
7385  LyX will automagically use the term 
7386 \family typewriter
7387
7388 \backslash
7389 thanks{}
7390 \family default
7391  in that case.
7392 \end_layout
7393
7394 \begin_layout Standard
7395 In addition to these topics, the macros use three additional LaTeX commands
7396  that have no counterpart in LyX:
7397 \end_layout
7398
7399 \begin_layout Itemize
7400
7401 \family typewriter
7402
7403 \backslash
7404 and
7405 \family default
7406  to separate different names for more than one author and institute, respectivel
7407 y.
7408 \end_layout
7409
7410 \begin_layout Itemize
7411
7412 \family typewriter
7413
7414 \backslash
7415 inst{<nr>}
7416 \family default
7417 to mark corresponding author/institute pairs.
7418  The institutes are numbered sequentially as they appear in the 
7419 \family sans
7420 Address
7421 \family default
7422  field, so you have to put a marker to each author.
7423 \end_layout
7424
7425 \begin_layout Itemize
7426
7427 \family typewriter
7428
7429 \backslash
7430 email{address}
7431 \family default
7432  to supply an email address for fast contact.
7433 \end_layout
7434
7435 \begin_layout Standard
7436 In all cases, the appropriate command has to be entered in LyX and marked
7437  as LaTeX code.
7438  See the examples.
7439  
7440 \end_layout
7441
7442 \begin_layout Subsection
7443 The abstract
7444 \end_layout
7445
7446 \begin_layout Standard
7447 The abstract should immediately follow the header block.
7448  With version 5 the abstract environment was changed to a command, and there
7449  is now a resctriction to only one paragraph.
7450  In addition, it should contain an entry with the keywords.
7451  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7452  command 
7453 \family typewriter
7454
7455 \backslash
7456 keywords{}
7457 \family default
7458  by hand and mark it as LaTeX code.
7459  Refer to the example paper.
7460 \end_layout
7461
7462 \begin_layout Subsection
7463 Supported environments
7464 \end_layout
7465
7466 \begin_layout Standard
7467 The A&A paper layout supports the following environments for structuring
7468  your text:
7469 \end_layout
7470
7471 \begin_layout Itemize
7472
7473 \family sans
7474 Standard
7475 \end_layout
7476
7477 \begin_layout Itemize
7478
7479 \family sans
7480 Section
7481 \end_layout
7482
7483 \begin_layout Itemize
7484
7485 \family sans
7486 Subsection
7487 \end_layout
7488
7489 \begin_layout Itemize
7490
7491 \family sans
7492 Subsubsection
7493 \end_layout
7494
7495 \begin_layout Itemize
7496
7497 \family sans
7498 Itemize
7499 \end_layout
7500
7501 \begin_layout Itemize
7502
7503 \family sans
7504 Enumerate
7505 \end_layout
7506
7507 \begin_layout Itemize
7508
7509 \family sans
7510 Description
7511 \end_layout
7512
7513 \begin_layout Itemize
7514
7515 \family sans
7516 Caption
7517 \end_layout
7518
7519 \begin_layout Itemize
7520
7521 \family sans
7522 Abstract
7523 \end_layout
7524
7525 \begin_layout Itemize
7526
7527 \family sans
7528 Acknowledgment
7529 \end_layout
7530
7531 \begin_layout Itemize
7532
7533 \family sans
7534 Bibliography
7535 \end_layout
7536
7537 \begin_layout Itemize
7538
7539 \family sans
7540 LaTeX
7541 \end_layout
7542
7543 \begin_layout Subsection
7544 Commands not supported by LyX
7545 \end_layout
7546
7547 \begin_layout Standard
7548 Some commands are not yet supported by the 
7549 \family sans
7550 paper (A&A)
7551 \family default
7552  layout for LyX.
7553  Some have already been mentioned.
7554  For the sake of completeness, they are listed all together here:
7555 \end_layout
7556
7557 \begin_layout Itemize
7558
7559 \family typewriter
7560
7561 \backslash
7562 and
7563 \end_layout
7564
7565 \begin_layout Itemize
7566
7567 \family typewriter
7568
7569 \backslash
7570 email
7571 \end_layout
7572
7573 \begin_layout Itemize
7574
7575 \family typewriter
7576
7577 \backslash
7578 appendix
7579 \end_layout
7580
7581 \begin_layout Itemize
7582
7583 \family typewriter
7584
7585 \backslash
7586 authorrunning
7587 \end_layout
7588
7589 \begin_layout Itemize
7590
7591 \family typewriter
7592
7593 \backslash
7594 inst{}
7595 \end_layout
7596
7597 \begin_layout Itemize
7598
7599 \family typewriter
7600
7601 \backslash
7602 keywords{}
7603 \end_layout
7604
7605 \begin_layout Itemize
7606
7607 \family typewriter
7608
7609 \backslash
7610 object{}
7611 \end_layout
7612
7613 \begin_layout Itemize
7614
7615 \family typewriter
7616
7617 \backslash
7618 titlerunning{}
7619 \end_layout
7620
7621 \begin_layout Standard
7622 If you want to use any of these commands, you have to enter them yourself.
7623  
7624 \series bold
7625 Do not forget to mark them as LaTeX code!
7626 \end_layout
7627
7628 \begin_layout Subsection
7629 Figure and Table Floats
7630 \end_layout
7631
7632 \begin_layout Standard
7633 LyX provides support for the necessary float environments 
7634 \family sans
7635 figure, figure*, table
7636 \family default
7637  and 
7638 \family sans
7639 table*
7640 \family default
7641 , therefore we won't tell much about it here.
7642  Refer to the 
7643 \emph on
7644 User's
7645 \begin_inset space ~
7646 \end_inset
7647
7648 Guide
7649 \emph default
7650 .
7651  Just remember that tables should be left-aligned.
7652  For that, select the table and change the alignment in 
7653 \family sans
7654 Edit\SpecialChar \menuseparator
7655 Paragraph
7656 \begin_inset space ~
7657 \end_inset
7658
7659 Settings.
7660 \end_layout
7661
7662 \begin_layout Standard
7663 There is only one special thing: the figures with caption besides the figure.
7664  To create such a figure, you have to do the following:
7665 \end_layout
7666
7667 \begin_layout Enumerate
7668 Create a wide figure float: 
7669 \family sans
7670 Insert\SpecialChar \menuseparator
7671 Float\SpecialChar \menuseparator
7672 Figure
7673 \family default
7674 , then right click in the figure and select 
7675 \family sans
7676 \bar under
7677 S
7678 \bar default
7679 pan
7680 \begin_inset space ~
7681 \end_inset
7682
7683 columns
7684 \family default
7685 .
7686 \end_layout
7687
7688 \begin_layout Enumerate
7689 Enter your caption text.
7690 \end_layout
7691
7692 \begin_layout Enumerate
7693 Press 
7694 \family sans
7695 Return
7696 \family default
7697  to move the cursor above the caption.
7698 \end_layout
7699
7700 \begin_layout Enumerate
7701 Insert your figure
7702 \end_layout
7703
7704 \begin_layout Enumerate
7705 Position the cursor behind the figure and insert a horizontal fill: 
7706 \family sans
7707 Insert\SpecialChar \menuseparator
7708 Special
7709 \begin_inset space ~
7710 \end_inset
7711
7712 Character\SpecialChar \menuseparator
7713 Horizontal
7714 \begin_inset space ~
7715 \end_inset
7716
7717 Fill
7718 \family default
7719 .
7720 \end_layout
7721
7722 \begin_layout Enumerate
7723 Switch to LaTeX mode: 
7724 \family sans
7725 M-c
7726 \begin_inset space ~
7727 \end_inset
7728
7729 t
7730 \family default
7731 .
7732 \end_layout
7733
7734 \begin_layout Enumerate
7735 Enter 
7736 \family typewriter
7737
7738 \backslash
7739 parbox[b]{55mm}{
7740 \family default
7741 .
7742  
7743 \series bold
7744 Do not close the brace!
7745 \end_layout
7746
7747 \begin_layout Enumerate
7748 Position the cursor behind the caption text, switch to LaTeX mode and insert
7749  the closing brace: 
7750 \family sans
7751 M-c
7752 \begin_inset space ~
7753 \end_inset
7754
7755 t
7756 \family default
7757  
7758 \family typewriter
7759 }
7760 \family default
7761 .
7762 \end_layout
7763
7764 \begin_layout Standard
7765 Also, refer to the figures in the example paper.
7766 \end_layout
7767
7768 \begin_layout Subsection
7769 Referee layout
7770 \end_layout
7771
7772 \begin_layout Standard
7773 For submission, the paper has to be formated in a special double-spacing
7774  layout.
7775  For this purpose, you have to give the option 
7776 \family typewriter
7777 referee
7778 \family default
7779  to the documentclass.
7780  This must be done using the extra class options field in the 
7781 \family sans
7782 Document\SpecialChar \menuseparator
7783 Settings
7784 \family default
7785  dialog.
7786  Just enter the string 
7787 \family typewriter
7788 referee
7789 \family default
7790  there.
7791 \end_layout
7792
7793 \begin_layout Subsection
7794 The example paper
7795 \end_layout
7796
7797 \begin_layout Standard
7798 The 
7799 \family sans
7800 Examples
7801 \family default
7802  directory contains an example paper written with LyX.
7803  It is the example paper from the original macro package, translated to
7804  LyX.
7805  Use it for inspiration, and compare the original LaTeX code with LyX way
7806  of writing.
7807 \end_layout
7808
7809 \begin_layout Section
7810 AASTeX
7811 \end_layout
7812
7813 \begin_layout Standard
7814 by 
7815 \noun on
7816 Mike Ressler
7817 \end_layout
7818
7819 \begin_layout Subsection
7820 Introduction
7821 \end_layout
7822
7823 \begin_layout Standard
7824 AASTeX is a set of macros produced by the American Astronomical Society
7825  to facilitate electronic manuscript submission to the three journals they
7826  publish: the Astrophysical Journal (including the Letters and Supplement),
7827  the Astronomical Journal, and the Publications of the Astronomical Society
7828  of the Pacific.
7829  LyX has proven to be an excellent tool for generating these documents,
7830  especially given its equation, citation, and figure handling capabilities.
7831  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7832  is the version described here, or higher.
7833  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7834  incompatible with LyX.
7835  The AASTeX package may be downloaded from the AASTeX Web site
7836 \end_layout
7837
7838 \begin_layout Standard
7839 \begin_inset VSpace medskip
7840 \end_inset
7841
7842
7843 \end_layout
7844
7845 \begin_layout Standard
7846 \align center
7847 \begin_inset Flex URL
7848 status collapsed
7849
7850 \begin_layout Plain Layout
7851
7852 http://www.journals.uchicago.edu/AAS/AASTeX
7853 \end_layout
7854
7855 \end_inset
7856
7857
7858 \end_layout
7859
7860 \begin_layout Standard
7861 \begin_inset VSpace medskip
7862 \end_inset
7863
7864
7865 \end_layout
7866
7867 \begin_layout Standard
7868 A complete user guide is contained in that package and you should familiarize
7869  yourself with it thoroughly before embarking on writing a paper in LyX.
7870  LyX will not reduce the need to figure out all the AASTeX commands, it
7871  will only reduce the drudgery of typing everything in.
7872  It is your responsibility to ensure that the final exported LaTeX document
7873  conforms completely to the requirements of the journal to which you are
7874  submitting your paper.
7875 \end_layout
7876
7877 \begin_layout Subsection
7878 Starting a New Paper
7879 \end_layout
7880
7881 \begin_layout Standard
7882 I strongly suggest that you start with the AASTeX template file.
7883  Click on 
7884 \family sans
7885 File\SpecialChar \menuseparator
7886 New from
7887 \family default
7888  
7889 \family sans
7890 Template
7891 \family default
7892 , enter the new file name, then choose the 
7893 \family typewriter
7894 aastex.lyx
7895 \family default
7896  template.
7897  This will show the most common fields found in a manuscript.
7898  Simply overwrite the existing text (including the brackets, 
7899 \family typewriter
7900 <>
7901 \family default
7902 ) with the correct information.
7903  Many of the AASTeX commands and environments can be implemented directly
7904  in LyX, but some cannot: most noticeably 
7905 \family typewriter
7906
7907 \backslash
7908 altaffilmark
7909 \family default
7910  and 
7911 \family typewriter
7912
7913 \backslash
7914 altaffiltext
7915 \family default
7916 , which should stick out like a sore thumb if you actually just opened the
7917  template file.
7918  For commands such as these, the LaTeX code must be entered directly and
7919  marked as such.
7920  Such commands are referred to as TeX code, or Evil Red Text.
7921  I tried to minimize the amount of TeX code needed in an AASTeX document,
7922  but there is still a bit more required than any of us would like.
7923 \end_layout
7924
7925 \begin_layout Subsection
7926 Finishing Your Paper
7927 \end_layout
7928
7929 \begin_layout Standard
7930 When the paper is finished to your satisfaction and previews/prints correctly,
7931  there are a few 
7932 \begin_inset Quotes eld
7933 \end_inset
7934
7935 postprocessing
7936 \begin_inset Quotes erd
7937 \end_inset
7938
7939  actions which need to be done before you submit it to the journals.
7940  
7941 \end_layout
7942
7943 \begin_layout Enumerate
7944 Export your paper as a LaTeX file (
7945 \family sans
7946 File\SpecialChar \menuseparator
7947 Export\SpecialChar \menuseparator
7948 LaTeX
7949 \family default
7950 ).
7951  
7952 \end_layout
7953
7954 \begin_layout Enumerate
7955 Edit the resulting 
7956 \family typewriter
7957 .tex
7958 \family default
7959  file with your favorite text editor
7960 \end_layout
7961
7962 \begin_deeper
7963 \begin_layout Enumerate
7964 remove the comment lines before the 
7965 \family typewriter
7966
7967 \backslash
7968 documentclass
7969 \family default
7970  command
7971 \end_layout
7972
7973 \begin_layout Enumerate
7974 remove the 
7975 \family typewriter
7976
7977 \backslash
7978 usepackage...{fontenc}
7979 \family default
7980  line if it appears (usually just after 
7981 \family typewriter
7982
7983 \backslash
7984 documentclass
7985 \family default
7986 }; also remove the 
7987 \family typewriter
7988
7989 \backslash
7990 secnumdepth
7991 \family default
7992  line if it appears.
7993 \end_layout
7994
7995 \begin_layout Enumerate
7996 remove everything between (and including) the 
7997 \family typewriter
7998
7999 \backslash
8000 makeatletter
8001 \family default
8002  and 
8003 \family typewriter
8004
8005 \backslash
8006 makeatother
8007 \family default
8008  commands, except for any commands you specifically put into the LaTeX preamble
8009  (which should appear immediately after the 
8010 \begin_inset Quotes eld
8011 \end_inset
8012
8013 User specified LaTeX commands
8014 \begin_inset Quotes erd
8015 \end_inset
8016
8017  comment in the 
8018 \family typewriter
8019 .tex
8020 \family default
8021  file).
8022 \end_layout
8023
8024 \end_deeper
8025 \begin_layout Enumerate
8026 Run the resulting file through LaTeX to make sure it still processes correctly.
8027 \end_layout
8028
8029 \begin_layout Enumerate
8030 Reread the journal requirements to make sure your filenames and formats
8031  are correct.
8032 \end_layout
8033
8034 \begin_layout Enumerate
8035 Submit it.
8036 \end_layout
8037
8038 \begin_layout Subsection
8039 Comments On Specific Commands
8040 \end_layout
8041
8042 \begin_layout Standard
8043 I will not describe the detailed usage of the individual AASTeX commands:
8044  the AASTeX User Guide (
8045 \family typewriter
8046 aasguide.tex
8047 \family default
8048 ) gives a good description of each.
8049  Thus it's probably easiest for me to go down the list as found in the guide
8050  and offer comments where necessary.
8051  So let's begin \SpecialChar \ldots{}
8052
8053 \end_layout
8054
8055 \begin_layout Subsubsection
8056 Things that work as expected
8057 \end_layout
8058
8059 \begin_layout Standard
8060 Because they work as you might expect, I simply list them and the section
8061  they are found in: 
8062 \family typewriter
8063
8064 \backslash
8065 documentclass
8066 \family default
8067  (2.1.1), 
8068 \family typewriter
8069
8070 \backslash
8071 begin{document}
8072 \family default
8073  (2.2), 
8074 \family typewriter
8075
8076 \backslash
8077 title
8078 \family default
8079  (2.3), 
8080 \family typewriter
8081
8082 \backslash
8083 author
8084 \family default
8085  (2.3), 
8086 \family typewriter
8087
8088 \backslash
8089 affil
8090 \family default
8091  (2.3), 
8092 \family typewriter
8093
8094 \backslash
8095 abstract
8096 \family default
8097  (2.4), 
8098 \family typewriter
8099
8100 \backslash
8101 keywords
8102 \family default
8103  (2.5), 
8104 \family typewriter
8105
8106 \backslash
8107 section
8108 \family default
8109  (2.7), 
8110 \family typewriter
8111
8112 \backslash
8113 subsection
8114 \family default
8115  (2.7), 
8116 \family typewriter
8117
8118 \backslash
8119 subsubsection
8120 \family default
8121  (2.7), 
8122 \family typewriter
8123
8124 \backslash
8125 paragraph
8126 \family default
8127  (2.7), 
8128 \family typewriter
8129
8130 \backslash
8131 facility
8132 \family default
8133  (2.10), 
8134 \family typewriter
8135
8136 \backslash
8137 begin{displaymath}
8138 \family default
8139  (2.12), 
8140 \family typewriter
8141
8142 \backslash
8143 begin{equation}
8144 \family default
8145  (2.12), 
8146 \family typewriter
8147
8148 \backslash
8149 begin{eqnarray}
8150 \family default
8151  (2.12), 
8152 \family typewriter
8153
8154 \backslash
8155 begin{mathletters}
8156 \family default
8157  (2.12), 
8158 \family typewriter
8159
8160 \backslash
8161 begin{thebibliography}
8162 \family default
8163  (2.13.1), 
8164 \family typewriter
8165
8166 \backslash
8167 bibitem
8168 \family default
8169  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8170  graphicx figure commands (2.14.1), 
8171 \family typewriter
8172
8173 \backslash
8174 begin{table}
8175 \family default
8176  (2.15.4), 
8177 \family typewriter
8178
8179 \backslash
8180 begin{tabular}
8181 \family default
8182  (2.15.4), 
8183 \family typewriter
8184
8185 \backslash
8186 caption
8187 \family default
8188  (2.15.4), 
8189 \family typewriter
8190
8191 \backslash
8192 label
8193 \family default
8194  (2.15.4, amongst other places), 
8195 \family typewriter
8196
8197 \backslash
8198 tablerefs
8199 \family default
8200  (2.15.5), 
8201 \family typewriter
8202
8203 \backslash
8204 tablecomments
8205 \family default
8206  (2.15.5), 
8207 \family typewriter
8208
8209 \backslash
8210 url
8211 \family default
8212  (2.17.4), 
8213 \family typewriter
8214
8215 \backslash
8216 end{document}
8217 \family default
8218  (2.18).
8219 \end_layout
8220
8221 \begin_layout Standard
8222 The following style options also work correctly: 
8223 \family typewriter
8224 longabstract
8225 \family default
8226  (2.4), 
8227 \family typewriter
8228 preprint
8229 \family default
8230  (3.2.1), 
8231 \family typewriter
8232 preprint2
8233 \family default
8234  (3.2.2), 
8235 \family typewriter
8236 eqsecnum
8237 \family default
8238  (3.3), 
8239 \family typewriter
8240 flushrt
8241 \family default
8242  (3.4).
8243  Simply put them in the 
8244 \family sans
8245 Options
8246 \family default
8247  box in 
8248 \family sans
8249 Layout\SpecialChar \menuseparator
8250 Document
8251 \family default
8252 .
8253 \end_layout
8254
8255 \begin_layout Subsubsection
8256 Things that work, but require more comment
8257 \end_layout
8258
8259 \begin_layout Standard
8260 The following items work, but require a little more discussion:
8261 \end_layout
8262
8263 \begin_layout Itemize
8264 These items are reserved for use by the journal editors, but you can put
8265  them into the LaTeX preamble if you feel compelled to do so: 
8266 \family typewriter
8267
8268 \backslash
8269 received
8270 \family default
8271
8272 \family typewriter
8273
8274 \backslash
8275 revised
8276 \family default
8277
8278 \family typewriter
8279
8280 \backslash
8281 accepted
8282 \family default
8283
8284 \family typewriter
8285
8286 \backslash
8287 ccc
8288 \family default
8289
8290 \family typewriter
8291
8292 \backslash
8293 cpright
8294 \family default
8295  (all from 2.1.3)
8296 \end_layout
8297
8298 \begin_layout Itemize
8299 These items may be placed in the LaTeX preamble, and are included as blanks
8300  in the template file: 
8301 \family typewriter
8302
8303 \backslash
8304 slugcomment
8305 \family default
8306  (2.1.4), 
8307 \family typewriter
8308
8309 \backslash
8310 shorttitle
8311 \family default
8312  (2.1.5), 
8313 \family typewriter
8314
8315 \backslash
8316 shortauthors
8317 \family default
8318  (2.1.5)
8319 \end_layout
8320
8321 \begin_layout Itemize
8322
8323 \family typewriter
8324
8325 \backslash
8326 email
8327 \family default
8328  (2.3) – can only be used 
8329 \begin_inset Quotes eld
8330 \end_inset
8331
8332 standalone
8333 \begin_inset Quotes erd
8334 \end_inset
8335
8336 , not in the middle of a paragraph.
8337  Use TeX code if you need to embed it.
8338 \end_layout
8339
8340 \begin_layout Itemize
8341
8342 \family typewriter
8343
8344 \backslash
8345 and
8346 \family default
8347  (2.3) – will have extra {} after it.
8348  This should not cause an error.
8349 \end_layout
8350
8351 \begin_layout Itemize
8352
8353 \family typewriter
8354
8355 \backslash
8356 notetoeditor
8357 \family default
8358  (2.6) – can only be used 
8359 \begin_inset Quotes eld
8360 \end_inset
8361
8362 standalone
8363 \begin_inset Quotes erd
8364 \end_inset
8365
8366 , not in the middle of a paragraph.
8367  Use TeX code if you need to embed it.
8368 \end_layout
8369
8370 \begin_layout Itemize
8371
8372 \family typewriter
8373
8374 \backslash
8375 placetable
8376 \family default
8377  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8378  hand
8379 \end_layout
8380
8381 \begin_layout Itemize
8382
8383 \family typewriter
8384
8385 \backslash
8386 placefigure
8387 \family default
8388  (2.8) – same as for 
8389 \family typewriter
8390
8391 \backslash
8392 placetable
8393 \end_layout
8394
8395 \begin_layout Itemize
8396
8397 \family typewriter
8398
8399 \backslash
8400 acknowledgements
8401 \family default
8402  (2.9) – will have extra {} after it.
8403  This should not cause an error.
8404 \end_layout
8405
8406 \begin_layout Itemize
8407
8408 \family typewriter
8409
8410 \backslash
8411 appendix
8412 \family default
8413  (2.11) – will have extra {} after it.
8414  This should not cause an error.
8415 \end_layout
8416
8417 \begin_layout Itemize
8418
8419 \family typewriter
8420
8421 \backslash
8422 figcaption
8423 \family default
8424  (2.14.2) – you can insert an optional filename argument by placing the cursor
8425  at the beginning of the text and selecting 
8426 \family sans
8427 Insert\SpecialChar \menuseparator
8428 Short Title
8429 \family default
8430 .
8431  
8432 \begin_inset Quotes eld
8433 \end_inset
8434
8435 Short Title
8436 \begin_inset Quotes erd
8437 \end_inset
8438
8439  inserts an optional argument of the type needed by 
8440 \family typewriter
8441
8442 \backslash
8443 figcaption
8444 \family default
8445 .
8446  Hopefully it will be renamed someday.
8447 \end_layout
8448
8449 \begin_layout Itemize
8450
8451 \family typewriter
8452
8453 \backslash
8454 objectname
8455 \family default
8456  (2.17.1) – same as 
8457 \family typewriter
8458
8459 \backslash
8460 figcaption
8461 \family default
8462  for the catalog ID optional parameter
8463 \end_layout
8464
8465 \begin_layout Itemize
8466
8467 \family typewriter
8468
8469 \backslash
8470 dataset
8471 \family default
8472  (2.17.1) – same as 
8473 \family typewriter
8474
8475 \backslash
8476 figcaption
8477 \family default
8478  for the catalog ID optional parameter
8479 \end_layout
8480
8481 \begin_layout Subsubsection
8482 Things not implemented, use TeX code
8483 \end_layout
8484
8485 \begin_layout Standard
8486
8487 \family typewriter
8488
8489 \backslash
8490 altaffilmark
8491 \family default
8492  (2.3), 
8493 \family typewriter
8494
8495 \backslash
8496 altaffiltext
8497 \family default
8498  (2.3), 
8499 \family typewriter
8500
8501 \backslash
8502 eqnum
8503 \family default
8504  (2.12), 
8505 \family typewriter
8506
8507 \backslash
8508 setcounter{equation}
8509 \family default
8510  (2.12), Journal name abbreviations (2.13.4), 
8511 \family typewriter
8512
8513 \backslash
8514 figurenum
8515 \family default
8516  (2.14.1), 
8517 \family typewriter
8518
8519 \backslash
8520 epsscale
8521 \family default
8522  (2.14.1), 
8523 \family typewriter
8524
8525 \backslash
8526 plotone
8527 \family default
8528  (2.14.1), 
8529 \family typewriter
8530
8531 \backslash
8532 plottwo
8533 \family default
8534  (2.14.1), 
8535 \family typewriter
8536
8537 \backslash
8538 tablenum
8539 \family default
8540  (2.15.4), 
8541 \family typewriter
8542
8543 \backslash
8544 tableline
8545 \family default
8546  (2.15.4, insert it as the first element in the lefthand cell after where
8547  you want it.
8548  Don't use any of LyX's rules in the table), 
8549 \family typewriter
8550
8551 \backslash
8552 tablenotemark
8553 \family default
8554  (2.15.5), 
8555 \family typewriter
8556
8557 \backslash
8558 tablenotetext
8559 \family default
8560  (2.15.5), much of Misc (2.17, except 
8561 \family typewriter
8562
8563 \backslash
8564 objectname
8565 \family default
8566
8567 \family typewriter
8568
8569 \backslash
8570 dataset
8571 \family default
8572
8573 \family typewriter
8574
8575 \backslash
8576 url
8577 \family default
8578 , and 
8579 \family typewriter
8580
8581 \backslash
8582 email
8583 \family default
8584 ; see above), 
8585 \family typewriter
8586
8587 \backslash
8588 singlespace
8589 \family default
8590  (3.1), 
8591 \family typewriter
8592
8593 \backslash
8594 doublespace
8595 \family default
8596  (3.1), 
8597 \family typewriter
8598
8599 \backslash
8600 onecolumn
8601 \family default
8602  (3.2), 
8603 \family typewriter
8604
8605 \backslash
8606 twocolumn
8607 \family default
8608  (3.2)
8609 \end_layout
8610
8611 \begin_layout Subsubsection
8612 Things that cannot be implemented
8613 \end_layout
8614
8615 \begin_layout Standard
8616 \SpecialChar \ldots{}
8617  at least in any meaningful sort of way, so I suggest ignoring them.
8618  They are the references environment (2.13.3), and the deluxetable environment
8619  (2.15).
8620  If you really, really need to use deluxetable, I suggest editing it in
8621  a separate file with a text editor, then using 
8622 \family sans
8623 Insert\SpecialChar \menuseparator
8624 Child
8625 \begin_inset space ~
8626 \end_inset
8627
8628 Document
8629 \family default
8630  to include it in your LyX document.
8631  See the 
8632 \family typewriter
8633 aas_sample.lyx
8634 \family default
8635  file to see an example of this.
8636 \end_layout
8637
8638 \begin_layout Subsection
8639 FAQs, Tips, Tricks, and Other Ruminations
8640 \end_layout
8641
8642 \begin_layout Subsubsection
8643 Getting LyX and AASTeX to cooperate
8644 \end_layout
8645
8646 \begin_layout Standard
8647 It can be a bit tricky to get LyX to recognize a new layout and document
8648  class.
8649  When all else fails, do this:
8650 \end_layout
8651
8652 \begin_layout Enumerate
8653 Make certain that LaTeX can find AASTeX.
8654  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8655  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8656 \family typewriter
8657 sample.tex
8658 \family default
8659 .
8660 \end_layout
8661
8662 \begin_layout Enumerate
8663 Make certain that 
8664 \family typewriter
8665 aastex.layout
8666 \family default
8667  appears in LyX's 
8668 \family typewriter
8669 layouts
8670 \family default
8671  folder
8672 \end_layout
8673
8674 \begin_layout Enumerate
8675 Rerun 
8676 \family sans
8677 Tools\SpecialChar \menuseparator
8678 Reconfigure
8679 \family default
8680  in LyX, then restart LyX.
8681 \end_layout
8682
8683 \begin_layout Enumerate
8684 Open a regular new file, not from a template.
8685  Does AASTeX appear in the class list in 
8686 \family sans
8687 Document\SpecialChar \menuseparator
8688 Settings
8689 \family default
8690 ?
8691 \end_layout
8692
8693 \begin_layout Standard
8694 If you get a warning from an existing AASTeX document about not being able
8695  to find the AASTeX layout or a message about 
8696 \begin_inset Quotes eld
8697 \end_inset
8698
8699 You should not mix title layouts with normal ones
8700 \begin_inset Quotes erd
8701 \end_inset
8702
8703 , things haven't been installed correctly.
8704 \end_layout
8705
8706 \begin_layout Subsubsection
8707 LaTeX error processing a table 
8708 \end_layout
8709
8710 \begin_layout Standard
8711 LyX, by default, attempts to center the table caption/title.
8712  This seems to produce a bad interaction in AASTeX so you should click somewhere
8713  in the caption/title, then select 
8714 \family sans
8715 Edit\SpecialChar \menuseparator
8716 Paragraph
8717 \begin_inset space ~
8718 \end_inset
8719
8720 Settings
8721 \family default
8722 , then set the 
8723 \family sans
8724 Alignment
8725 \family default
8726  to 
8727 \family sans
8728 Block
8729 \family default
8730 .
8731  This took care of it for me.
8732 \end_layout
8733
8734 \begin_layout Subsubsection
8735 References
8736 \end_layout
8737
8738 \begin_layout Standard
8739 A couple of things: 1) I have noticed some funny spacing in the reference
8740  entries in the text.
8741  When you enter the bibliography item data, make sure their is 
8742 \emph on
8743 no
8744 \emph default
8745  space between the last author and the parenthesis setting off the year;
8746  
8747 \emph on
8748 e.
8749 \begin_inset space \thinspace{}
8750 \end_inset
8751
8752 g.
8753 \begin_inset space \space{}
8754 \end_inset
8755
8756
8757 \emph default
8758 type 
8759 \family typewriter
8760 Ressler(1992)
8761 \family default
8762 , not 
8763 \family typewriter
8764 Ressler (1992)
8765 \family default
8766 .
8767  2) Entering the references at all is not obvious.
8768  The easiest thing is to start typing your first reference at the end of
8769  the document, then mark it as type 
8770 \family sans
8771 References
8772 \family default
8773 .
8774  That will put a small gray box in front of what you just typed.
8775  Click on the box to fill in the rest of the information.
8776  For new references, go to the end of an existing reference and press return.
8777  That will create a new line with its own box, etc.
8778 \end_layout
8779
8780 \begin_layout Subsubsection
8781 Including EPS files
8782 \end_layout
8783
8784 \begin_layout Standard
8785 Even though AASTeX provides its own figure commands (
8786 \family typewriter
8787
8788 \backslash
8789 plotone
8790 \family default
8791 , for example), I much prefer LaTeX's standard figure commands (with the
8792  default graphicx).
8793  You can insert the 
8794 \family typewriter
8795
8796 \backslash
8797 plotone
8798 \family default
8799 , etc.
8800 \begin_inset space ~
8801 \end_inset
8802
8803 commands as TeX code into a Figure Float box if you desire, but I never
8804  have much luck getting the layout right.
8805  With the standard graphics, LyX will insert a 
8806 \family typewriter
8807
8808 \backslash
8809 usepackage{graphicx}
8810 \family default
8811  command into the LaTeX preamble and handle the figures in the standard
8812  LaTeX2e way, interspersing the figures in the text.
8813  I believe ApJ accepts figures exactly this way now; AJ might still use
8814  the 
8815 \begin_inset Quotes eld
8816 \end_inset
8817
8818 stack everything at the end
8819 \begin_inset Quotes erd
8820 \end_inset
8821
8822  technique.
8823 \end_layout
8824
8825 \begin_layout Subsubsection
8826 Things I could have done, but didn't
8827 \end_layout
8828
8829 \begin_layout Standard
8830 There are a few 
8831 \begin_inset Quotes eld
8832 \end_inset
8833
8834 pretty
8835 \begin_inset Quotes erd
8836 \end_inset
8837
8838  things I could have implemented, but chose not to.
8839  For instance, I saw no point in double-spacing the text in the LyX window,
8840  even though it is double-spaced in the paper manuscript.
8841  Also, I chose not to make separate layouts for the preprint and preprint2
8842  styles.
8843  Since I assume you will spend most of your time in the plain manuscript
8844  mode anyway, I decided not to chew up more disk space with this.
8845  
8846 \end_layout
8847
8848 \begin_layout Subsection
8849 Final Caveat
8850 \end_layout
8851
8852 \begin_layout Standard
8853 Your mileage may vary.
8854  I've now had papers published by both ApJ and AJ that have had 98% of the
8855  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8856  cleanups.
8857  I have had no trouble with the submission process, and I'm sure the journals
8858  were never aware that there might be a difference.
8859  So, go forth and publish!
8860 \end_layout
8861
8862 \begin_layout Section
8863 AMS LaTeX
8864 \end_layout
8865
8866 \begin_layout Standard
8867 by 
8868 \noun on
8869 David Johnson
8870 \noun default
8871 ; updated by 
8872 \noun on
8873 Richard Heck
8874 \end_layout
8875
8876 \begin_layout Standard
8877 \begin_inset VSpace bigskip
8878 \end_inset
8879
8880
8881 \end_layout
8882
8883 \begin_layout Standard
8884 \noindent
8885 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8886  papers to be submitted to American Mathematical Society publications.
8887  The layouts are not tailored to a specific journal, but easily can be.
8888  You should refer to the AMS documentation for specific instructions for
8889  each journal (usually it will entail only changing a single line in the
8890  TeX output).
8891  That documentation is available on the Web at 
8892 \begin_inset Flex URL
8893 status open
8894
8895 \begin_layout Plain Layout
8896
8897 http://www.ams.org
8898 \end_layout
8899
8900 \end_inset
8901
8902  or by ftp at 
8903 \begin_inset Flex URL
8904 status open
8905
8906 \begin_layout Plain Layout
8907
8908 ftp://ftp.ams.org/pub/tex/amslatex/
8909 \end_layout
8910
8911 \end_inset
8912
8913 .
8914  These layouts are appropriate, and useful, for any mathematical writing.
8915  
8916 \end_layout
8917
8918 \begin_layout Standard
8919 There are two basic AMS LaTeX layouts: 
8920 \end_layout
8921
8922 \begin_layout Itemize
8923 amsart: The standard AMS article format.
8924 \end_layout
8925
8926 \begin_layout Itemize
8927 amsbook: the standard AMS book (really, monograph) format.
8928  
8929 \end_layout
8930
8931 \begin_layout Standard
8932 The layouts themselves contain only the minimum necessary to use the AMS
8933  classes.
8934  They do not, in particular, contain any of the `theorem' environments used
8935  for setting theorems, lemmas, and the like.
8936  These are contained, instead, in the 
8937 \begin_inset Flex Code
8938 status collapsed
8939
8940 \begin_layout Plain Layout
8941 Theorems (AMS)
8942 \end_layout
8943
8944 \end_inset
8945
8946  module, which is loaded by default when when you select one of the AMS
8947  classes.
8948  (It can also be used with other classes and can be removed, if you would
8949  rather use something else.) Less commonly used environments are in the 
8950 \begin_inset Flex Code
8951 status collapsed
8952
8953 \begin_layout Plain Layout
8954 Theorems (AMS-Extended)
8955 \end_layout
8956
8957 \end_inset
8958
8959  module, which must be loaded manually.
8960 \end_layout
8961
8962 \begin_layout Standard
8963 By default, theorems and the like are numbered consecutively throughout
8964  the document, but this may be modified by loading the module 
8965 \begin_inset Flex Code
8966 status collapsed
8967
8968 \begin_layout Plain Layout
8969 Theorems (Order by Section)
8970 \end_layout
8971
8972 \end_inset
8973
8974  or, if you are using 
8975 \begin_inset Flex Code
8976 status collapsed
8977
8978 \begin_layout Plain Layout
8979 book (AMS)
8980 \end_layout
8981
8982 \end_inset
8983
8984 , the module 
8985 \begin_inset Flex Code
8986 status collapsed
8987
8988 \begin_layout Plain Layout
8989 Theorems (Order by Chapter)
8990 \end_layout
8991
8992 \end_inset
8993
8994 .
8995  These will number the results as 
8996 \begin_inset Formula $n.m$
8997 \end_inset
8998
8999 , where the first number refers to the section (or chapter) and the second
9000  refers to the total number of results so far in that section (or chapter).
9001  Many environments are also available unnumbered.
9002  These are indicated by an asterisk at the end.
9003  If you happen to want 
9004 \emph on
9005 only
9006 \emph default
9007  unnumbered results, the module 
9008 \begin_inset Flex Code
9009 status collapsed
9010
9011 \begin_layout Plain Layout
9012 Theorems (Starred)
9013 \end_layout
9014
9015 \end_inset
9016
9017  provides that option.
9018 \end_layout
9019
9020 \begin_layout Standard
9021 Note that these modules do not 
9022 \emph on
9023 have
9024 \emph default
9025  to be used with the AMS classes.
9026  It is perfectly possible to use the 
9027 \begin_inset Flex Code
9028 status collapsed
9029
9030 \begin_layout Plain Layout
9031 Theorems (AMS)
9032 \end_layout
9033
9034 \end_inset
9035
9036  module, and the others mentioned, with other classes, such as 
9037 \begin_inset Flex Code
9038 status collapsed
9039
9040 \begin_layout Plain Layout
9041 article
9042 \end_layout
9043
9044 \end_inset
9045
9046
9047 \begin_inset Flex Code
9048 status collapsed
9049
9050 \begin_layout Plain Layout
9051 report
9052 \end_layout
9053
9054 \end_inset
9055
9056
9057 \begin_inset Flex Code
9058 status collapsed
9059
9060 \begin_layout Plain Layout
9061 book (KOMA-script)
9062 \end_layout
9063
9064 \end_inset
9065
9066 , and so forth.
9067 \end_layout
9068
9069 \begin_layout Subsection
9070 What these layouts provide
9071 \end_layout
9072
9073 \begin_layout Standard
9074 There is a long list of included environments provided by these layouts.
9075  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9076  variety of `theorem' environments.
9077  However, the AMS recommends the environments that are available in LyX.
9078  
9079 \end_layout
9080
9081 \begin_layout Standard
9082 The following environments—as well as the standard environments, such as
9083  
9084 \begin_inset Flex Noun
9085 status collapsed
9086
9087 \begin_layout Plain Layout
9088 section
9089 \end_layout
9090
9091 \end_inset
9092
9093
9094 \begin_inset Flex Noun
9095 status collapsed
9096
9097 \begin_layout Plain Layout
9098 bibliography
9099 \end_layout
9100
9101 \end_inset
9102
9103
9104 \begin_inset Flex Noun
9105 status collapsed
9106
9107 \begin_layout Plain Layout
9108 title
9109 \end_layout
9110
9111 \end_inset
9112
9113
9114 \begin_inset Flex Noun
9115 status collapsed
9116
9117 \begin_layout Plain Layout
9118 author
9119 \end_layout
9120
9121 \end_inset
9122
9123 , and 
9124 \begin_inset Flex Noun
9125 status collapsed
9126
9127 \begin_layout Plain Layout
9128 date
9129 \end_layout
9130
9131 \end_inset
9132
9133 —are provided by 
9134 \begin_inset Flex Code
9135 status collapsed
9136
9137 \begin_layout Plain Layout
9138 article (AMS)
9139 \end_layout
9140
9141 \end_inset
9142
9143  and 
9144 \begin_inset Flex Code
9145 status collapsed
9146
9147 \begin_layout Plain Layout
9148 book (AMS)
9149 \end_layout
9150
9151 \end_inset
9152
9153 :
9154 \end_layout
9155
9156 \begin_layout Description
9157 Address This should be the author's permanent address.
9158 \end_layout
9159
9160 \begin_layout Description
9161 Current
9162 \begin_inset space ~
9163 \end_inset
9164
9165 Address This should be the author's temporary address at the time of submission,
9166  if different from the Address.
9167 \end_layout
9168
9169 \begin_layout Description
9170 Email Author's e-mail address
9171 \end_layout
9172
9173 \begin_layout Description
9174 URL Author's Web address, if desired.
9175 \end_layout
9176
9177 \begin_layout Description
9178 Keywords Key words or phrases used to identify specific topics discussed
9179  in the paper.
9180 \end_layout
9181
9182 \begin_layout Description
9183 Subjectclass These refer to the AMS Subject Classifications, published and
9184  described in 
9185 \emph on
9186 Mathematical Reviews
9187 \emph default
9188 .
9189  These are also available online at the AMS cites listed above.
9190 \end_layout
9191
9192 \begin_layout Description
9193 Thanks
9194 \end_layout
9195
9196 \begin_layout Description
9197 Dedicatory
9198 \end_layout
9199
9200 \begin_layout Description
9201 Translator
9202 \end_layout
9203
9204 \begin_layout Standard
9205 The following environments are provided by both the 
9206 \begin_inset Flex Code
9207 status collapsed
9208
9209 \begin_layout Plain Layout
9210 Theorems
9211 \end_layout
9212
9213 \end_inset
9214
9215  and 
9216 \begin_inset Flex Code
9217 status collapsed
9218
9219 \begin_layout Plain Layout
9220 Theorems (AMS)
9221 \end_layout
9222
9223 \end_inset
9224
9225  modules, in the latter case in both starred (unnumbered) and unstarred
9226  (numbered) versions.
9227  These same environments are provided only in the starred versions by the
9228  
9229 \begin_inset Flex Code
9230 status collapsed
9231
9232 \begin_layout Plain Layout
9233 Theorems (Starred)
9234 \end_layout
9235
9236 \end_inset
9237
9238  module:
9239 \end_layout
9240
9241 \begin_layout Theorem
9242 This is typically used for the statements of major results.
9243  
9244 \end_layout
9245
9246 \begin_layout Corollary*
9247 This is used for statements which follow fairly directly from previous statement
9248 s.
9249  Again, these can be major results.
9250  
9251 \end_layout
9252
9253 \begin_layout Lemma
9254 These are smaller results needed to prove other statements.
9255 \end_layout
9256
9257 \begin_layout Proposition
9258 These are less major results which (hopefully) add to the general theory
9259  being discussed.
9260 \end_layout
9261
9262 \begin_layout Conjecture
9263 These are statements provided without justification, which the author does
9264  not know how to prove, but which seem to be true (to the author, at least).
9265 \end_layout
9266
9267 \begin_layout Definition*
9268 Guess what this is for.
9269  The font is different for this environment than for the previous ones.
9270  
9271 \end_layout
9272
9273 \begin_layout Example*
9274 Used for examples illustrating proven results.
9275 \end_layout
9276
9277 \begin_layout Problem
9278 It's not really known what this is for.
9279  You should figure it out.
9280 \end_layout
9281
9282 \begin_layout Exercise*
9283 Write a description for this one.
9284 \end_layout
9285
9286 \begin_layout Remark
9287 This environment is also a type of theorem, usually a lesser sort of observation.
9288 \end_layout
9289
9290 \begin_layout Claim*
9291 Often used in the course of giving a proof of a larger result.
9292 \end_layout
9293
9294 \begin_layout Case
9295 Generally, these are used to break up long arguments, using specific instances
9296  of some condition.
9297  
9298 \end_layout
9299
9300 \begin_layout Case
9301 The numbering scheme for cases is on its own, not together with other numbered
9302  statements.
9303  
9304 \end_layout
9305
9306 \begin_layout Proof
9307 At the end of this environment, a QED symbol (usually a square, but it can
9308  vary with different styles) is placed.
9309  If you want to have other environments within this one—for example, Case
9310  environments—and have the QED symbol appear only after them, then the other
9311  environments need to be nested within the proof environment.
9312  See the section 
9313 \emph on
9314 Nesting Environments
9315 \emph default
9316  of the 
9317 \emph on
9318 User's Guide
9319 \emph default
9320  for information on nesting.
9321 \end_layout
9322
9323 \begin_layout Standard
9324 And these environments are provided by 
9325 \begin_inset Flex Code
9326 status collapsed
9327
9328 \begin_layout Plain Layout
9329 Theorems (AMS-Extended)
9330 \end_layout
9331
9332 \end_inset
9333
9334 :
9335 \end_layout
9336
9337 \begin_layout Criterion*
9338 A required condition.
9339 \end_layout
9340
9341 \begin_layout Algorithm*
9342 A general procedure to be used.
9343 \end_layout
9344
9345 \begin_layout Axiom*
9346 This is a property or statement taken as true within the system being discussed.
9347 \end_layout
9348
9349 \begin_layout Condition*
9350 Sometimes used to state a condition assumed within the present context of
9351  discussion.
9352 \end_layout
9353
9354 \begin_layout Note*
9355 Similar to a Remark.
9356 \end_layout
9357
9358 \begin_layout Notation*
9359 Used for the explanation of, yes, notation.
9360 \end_layout
9361
9362 \begin_layout Summary
9363 Do we really need to tell you? 
9364 \end_layout
9365
9366 \begin_layout Acknowledgement*
9367 Acknowledgement.
9368 \end_layout
9369
9370 \begin_layout Conclusion*
9371 Sometimes used at the end of a long train of argument.
9372 \end_layout
9373
9374 \begin_layout Fact
9375 Used in a way similar to Proposition, though perhaps lower on the scale.
9376 \end_layout
9377
9378 \begin_layout Standard
9379 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9380  fonts packages.
9381  They need to be available on your system in order to use these environments.
9382 \end_layout
9383
9384 \begin_layout Section
9385 AGU journals (
9386 \family sans
9387 aguplus
9388 \family default
9389 )
9390 \end_layout
9391
9392 \begin_layout Standard
9393 by 
9394 \shape smallcaps
9395 Martin Vermeer
9396 \end_layout
9397
9398 \begin_layout Subsection
9399 Description
9400 \end_layout
9401
9402 \begin_layout Standard
9403 These are the layout files for some of the journals of the American Geophysical
9404  Society.
9405  It is assumed that you have both the AGU's own class files and AGUplus
9406  installed (everything to be found at
9407 \begin_inset Flex URL
9408 status collapsed
9409
9410 \begin_layout Plain Layout
9411
9412 ftp://ftp.agu.org/journals/latex/journals
9413 \end_layout
9414
9415 \end_inset
9416
9417 ).
9418 \end_layout
9419
9420 \begin_layout Subsection
9421 New styles
9422 \end_layout
9423
9424 \begin_layout Standard
9425 Redefined are 
9426 \family sans
9427 Paragraph
9428 \family default
9429
9430 \family sans
9431 Paragraph*
9432 \family default
9433 .
9434  They are still called this in the LyX GUI, though their LaTeX equivalents
9435  in the AGU classes are 
9436 \family sans
9437 Subsubsubsection
9438 \family default
9439  and 
9440 \family sans
9441 Subsubsubsection*
9442 \family default
9443 .
9444 \end_layout
9445
9446 \begin_layout Standard
9447 Newly defined styles are 
9448 \family sans
9449 Left_Header
9450 \family default
9451
9452 \family sans
9453 Right_Header
9454 \family default
9455
9456 \family sans
9457 Received
9458 \family default
9459
9460 \family sans
9461 Revised
9462 \family default
9463
9464 \family sans
9465 Accepted
9466 \family default
9467
9468 \family sans
9469 CCC
9470 \family default
9471
9472 \family sans
9473 PaperId
9474 \family default
9475
9476 \family sans
9477 AuthorAddr
9478 \family default
9479
9480 \family sans
9481 SlugComment
9482 \family default
9483 .
9484  These are mostly manuscript attributes and defined in the AGU class documentati
9485 on.
9486 \end_layout
9487
9488 \begin_layout Standard
9489 I suspect this is still badly incomplete.
9490 \end_layout
9491
9492 \begin_layout Subsection
9493 New floats
9494 \end_layout
9495
9496 \begin_layout Standard
9497
9498 \family sans
9499 Planotable
9500 \family default
9501  and 
9502 \family sans
9503 Plate
9504 \family default
9505 .
9506  We also have a new 
9507 \family sans
9508 Table_Caption
9509 \family default
9510 .
9511 \end_layout
9512
9513 \begin_layout Subsection
9514 Supported journals
9515 \end_layout
9516
9517 \begin_layout Itemize
9518
9519 \emph on
9520 Journal of Geophysical Research
9521 \emph default
9522
9523 \family typewriter
9524 jgrga.layout
9525 \family default
9526  — Martin Vermeer
9527 \end_layout
9528
9529 \begin_layout Standard
9530 Add your own, it isn't so hard! Look at the 
9531 \family typewriter
9532 jgrga.layout
9533 \family default
9534  example and 
9535 \family typewriter
9536 aguplus.inc
9537 \family default
9538 .
9539 \end_layout
9540
9541 \begin_layout Subsection
9542 Bugs and things to remember
9543 \end_layout
9544
9545 \begin_layout Standard
9546 In order to use the new layouts, you must remember to do the following for
9547  a new document:
9548 \end_layout
9549
9550 \begin_layout Enumerate
9551
9552 \emph on
9553 Turn off babel
9554 \emph default
9555 .
9556  This can be done in the 
9557 \family sans
9558 Layout\SpecialChar \menuseparator
9559 Document
9560 \family default
9561  or 
9562 \family sans
9563 Document\SpecialChar \menuseparator
9564 Settings
9565 \family default
9566  menu item.
9567  (AGU articles are always in English, right? So 
9568 \emph on
9569 don't
9570 \emph default
9571  choose a language.)
9572 \end_layout
9573
9574 \begin_layout Enumerate
9575 Enter 
9576 \family typewriter
9577 jgrga
9578 \family default
9579  into the document's 
9580 \family sans
9581 Extra Options
9582 \family default
9583  field.
9584  (Yes, this is a bug.)
9585 \end_layout
9586
9587 \begin_layout Enumerate
9588 Make sure you use the 
9589 \family typewriter
9590 agu.bst
9591 \family default
9592  bibliography style, by entering 
9593 \family sans
9594 agu
9595 \family default
9596  into the second field of the BibTeX inset.
9597  None of the standard styles will do.
9598 \end_layout
9599
9600 \begin_layout Section
9601 Broadway
9602 \end_layout
9603
9604 \begin_layout Standard
9605 by 
9606 \shape smallcaps
9607 Garst Reese
9608 \end_layout
9609
9610 \begin_layout Subsection
9611 Introduction
9612 \end_layout
9613
9614 \begin_layout Standard
9615 Broadway is for writing plays.
9616  The format is more decorative than Hollywood, and much less standardized.
9617  This format should be suitable for workshops.
9618 \end_layout
9619
9620 \begin_layout Subsection
9621 Special problems
9622 \end_layout
9623
9624 \begin_layout Standard
9625 The same as in Hollywood.
9626 \end_layout
9627
9628 \begin_layout Subsection
9629 Special features
9630 \end_layout
9631
9632 \begin_layout Standard
9633 Insert the 
9634 \family sans
9635 Speaker
9636 \family default
9637  names as labels then cross-reference the label to insert the name.
9638  The cross-reference dialog will show the current cast of characters.
9639 \end_layout
9640
9641 \begin_layout Subsection
9642 Paper size and Margins
9643 \end_layout
9644
9645 \begin_layout Standard
9646 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9647 \end_layout
9648
9649 \begin_layout Subsection
9650 Environments
9651 \end_layout
9652
9653 \begin_layout Standard
9654 The following environments are available.
9655  You can use broadway.bind to get the bind keys shown at the right.
9656 \end_layout
9657
9658 \begin_layout Itemize
9659
9660 \family sans
9661 Standard
9662 \begin_inset Newline newline
9663 \end_inset
9664
9665
9666 \family default
9667 You should not have to use this, but it is here for anything that does not
9668  fit otherwise.
9669 \end_layout
9670
9671 \begin_layout Itemize
9672
9673 \family sans
9674 Narrative
9675 \begin_inset space \hfill{}
9676 \end_inset
9677
9678 M-z n
9679 \begin_inset Newline newline
9680 \end_inset
9681
9682
9683 \family default
9684 Used to describe stage setting and the action.
9685  First use of speaker names in all CAPs.
9686 \end_layout
9687
9688 \begin_layout Itemize
9689
9690 \family sans
9691 ACT
9692 \begin_inset space \hfill{}
9693 \end_inset
9694
9695 M-z a
9696 \begin_inset Newline newline
9697 \end_inset
9698
9699
9700 \family default
9701 Automatically numbered.
9702  On screen it will be arabic, but will print as Roman.
9703 \end_layout
9704
9705 \begin_layout Itemize
9706
9707 \family sans
9708 ACT*
9709 \begin_inset space \hfill{}
9710 \end_inset
9711
9712 M-z S at
9713 \begin_inset Newline newline
9714 \end_inset
9715
9716
9717 \family default
9718 Subtitle for 
9719 \family sans
9720 ACT.
9721
9722 \family default
9723  It is just centered text.
9724 \end_layout
9725
9726 \begin_layout Itemize
9727
9728 \family sans
9729 SCENE
9730 \begin_inset space \hfill{}
9731 \end_inset
9732
9733 M-z S-S
9734 \begin_inset Newline newline
9735 \end_inset
9736
9737
9738 \family default
9739 Not automatically numbered.
9740  You supply the number.
9741  This is because I couldn't figure out how.
9742 \end_layout
9743
9744 \begin_layout Itemize
9745
9746 \family sans
9747 AT_RISE:
9748 \begin_inset space \hfill{}
9749 \end_inset
9750
9751 M-z S-R
9752 \begin_inset Newline newline
9753 \end_inset
9754
9755
9756 \family default
9757 A special case of Narrative to describe the setting and action as the curtain
9758  rises.
9759 \end_layout
9760
9761 \begin_layout Itemize
9762
9763 \family sans
9764 Speaker
9765 \begin_inset space \hfill{}
9766 \end_inset
9767
9768 M-z s
9769 \begin_inset Newline newline
9770 \end_inset
9771
9772
9773 \family default
9774 The speaker's (actor's) title, centered in all CAPS.
9775 \end_layout
9776
9777 \begin_layout Itemize
9778
9779 \family sans
9780 Parenthetical
9781 \begin_inset space \hfill{}
9782 \end_inset
9783
9784 M-z p
9785 \begin_inset Newline newline
9786 \end_inset
9787
9788
9789 \family default
9790 Instructions to the speaker.
9791  The parentheses are automatically inserted.
9792  The ( will appear on screen, but both will be in the printed play.
9793  This environment is only used within 
9794 \family sans
9795 Dialogue
9796 \family default
9797 .
9798 \end_layout
9799
9800 \begin_layout Itemize
9801
9802 \family sans
9803 Dialogue
9804 \begin_inset space \hfill{}
9805 \end_inset
9806
9807 M-z d
9808 \begin_inset Newline newline
9809 \end_inset
9810
9811
9812 \family default
9813 What the Speaker says.
9814 \end_layout
9815
9816 \begin_layout Itemize
9817
9818 \family sans
9819 CURTAIN
9820 \begin_inset space \hfill{}
9821 \end_inset
9822
9823 M-z S-C
9824 \begin_inset Newline newline
9825 \end_inset
9826
9827
9828 \family default
9829 The curtain comes down.
9830 \end_layout
9831
9832 \begin_layout Itemize
9833
9834 \family sans
9835 Title
9836 \begin_inset space \hfill{}
9837 \end_inset
9838
9839 M-z S-T
9840 \end_layout
9841
9842 \begin_layout Itemize
9843
9844 \family sans
9845 Author
9846 \begin_inset space \hfill{}
9847 \end_inset
9848
9849 M-z S-A
9850 \end_layout
9851
9852 \begin_layout Itemize
9853
9854 \family sans
9855 Right_Address
9856 \begin_inset space \hfill{}
9857 \end_inset
9858
9859 M-z r
9860 \end_layout
9861
9862 \begin_layout Standard
9863 Hello there.
9864 \end_layout
9865
9866 \begin_layout Section
9867 Dinbrief
9868 \end_layout
9869
9870 \begin_layout Standard
9871 The document class 
9872 \family sans
9873 dinbrief
9874 \family default
9875  can be used to type letters according to German conventions.
9876  A template file is included in 
9877 \family typewriter
9878 .../lyx/share/templates
9879 \family default
9880  for you to use as a starting point.
9881 \end_layout
9882
9883 \begin_layout Section
9884 EGS journals (
9885 \family sans
9886 egs
9887 \family default
9888 )
9889 \end_layout
9890
9891 \begin_layout Standard
9892 by 
9893 \shape smallcaps
9894 Martin Vermeer
9895 \end_layout
9896
9897 \begin_layout Subsection
9898 Description
9899 \end_layout
9900
9901 \begin_layout Standard
9902 This is the layout file for the European Geophysical Society journals.
9903  The needed 
9904 \family typewriter
9905 egs.cls
9906 \family default
9907  can be downloaded from the web site of the EGS under 
9908 \begin_inset Flex URL
9909 status collapsed
9910
9911 \begin_layout Plain Layout
9912
9913 www.copernicus.org
9914 \end_layout
9915
9916 \end_inset
9917
9918 .
9919 \end_layout
9920
9921 \begin_layout Subsection
9922 New styles
9923 \end_layout
9924
9925 \begin_layout Standard
9926
9927 \family sans
9928 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9929  Accepted
9930 \family default
9931
9932 \family sans
9933 Offsets
9934 \family default
9935 .
9936  The current layout file is unfortunately very unmodular and would benefit
9937  from using the various 
9938 \family typewriter
9939 std*.inc
9940 \family default
9941  file inclusions.
9942 \end_layout
9943
9944 \begin_layout Section
9945 Elsevier Journals
9946 \end_layout
9947
9948 \begin_layout Standard
9949 See the LyX template file 
9950 \family typewriter
9951 elsarticle.lyx
9952 \family default
9953 .
9954  It contains all infos you need.
9955 \end_layout
9956
9957 \begin_layout Section
9958 Foils [aka 
9959 \family sans
9960 FoilTeX
9961 \family default
9962 ]
9963 \begin_inset CommandInset label
9964 LatexCommand label
9965 name "sec:foiltex"
9966
9967 \end_inset
9968
9969
9970 \end_layout
9971
9972 \begin_layout Standard
9973 by 
9974 \noun on
9975 Allan Rae
9976 \end_layout
9977
9978 \begin_layout Subsection
9979 Introduction
9980 \end_layout
9981
9982 \begin_layout Standard
9983 This section describes how to use LyX to make slides for overhead projectors.
9984  There are two document classes that can do this: the default slides class
9985  and the 
9986 \family sans
9987 FoilTeX
9988 \family default
9989  slides class.
9990  This section documents the latter.
9991 \end_layout
9992
9993 \begin_layout Standard
9994 I'm going to say this again, nice and clear, so that there's no misunderstanding
9995 :
9996 \end_layout
9997
9998 \begin_layout Standard
9999 \begin_inset VSpace bigskip
10000 \end_inset
10001
10002
10003 \end_layout
10004
10005 \begin_layout Standard
10006 \align center
10007
10008 \size large
10009 This section documents the class 
10010 \begin_inset Quotes eld
10011 \end_inset
10012
10013
10014 \family sans
10015 slides (FoilTeX)
10016 \family default
10017
10018 \begin_inset Quotes erd
10019 \end_inset
10020
10021  
10022 \emph on
10023 only.
10024 \end_layout
10025
10026 \begin_layout Standard
10027 \begin_inset VSpace bigskip
10028 \end_inset
10029
10030
10031 \end_layout
10032
10033 \begin_layout Standard
10034 If you're looking for the documentation for 
10035 \begin_inset Quotes eld
10036 \end_inset
10037
10038
10039 \family sans
10040 slides (default)
10041 \family default
10042
10043 \begin_inset Quotes erd
10044 \end_inset
10045
10046 , check out section
10047 \begin_inset space ~
10048 \end_inset
10049
10050
10051 \begin_inset CommandInset ref
10052 LatexCommand ref
10053 reference "sec:slitex"
10054
10055 \end_inset
10056
10057 .
10058  If your machine doesn't have the 
10059 \family sans
10060 foils
10061 \family default
10062  class [
10063 \begin_inset Quotes eld
10064 \end_inset
10065
10066
10067 \family sans
10068 slides (FoilTeX)
10069 \family default
10070
10071 \begin_inset Quotes erd
10072 \end_inset
10073
10074 ] installed, you'll probably have to use the default 
10075 \family sans
10076 slides
10077 \family default
10078  class, which isn't quite as good as 
10079 \family sans
10080 foils.
10081 \end_layout
10082
10083 \begin_layout Standard
10084 The 
10085 \family sans
10086 foils
10087 \family default
10088  class is designed for use with version 2.1 of the 
10089 \family sans
10090 foils.cls
10091 \family default
10092  LaTeX class file which is now an integral part of LaTeX2e.
10093 \end_layout
10094
10095 \begin_layout Subsection
10096 Getting Started
10097 \end_layout
10098
10099 \begin_layout Standard
10100 Obviously, to use this document class, you need to select 
10101 \begin_inset Quotes eld
10102 \end_inset
10103
10104
10105 \family sans
10106 slides (FoilTeX)
10107 \family default
10108
10109 \begin_inset Quotes erd
10110 \end_inset
10111
10112  from the 
10113 \family sans
10114 Class
10115 \family default
10116  entry in the 
10117 \family sans
10118 Document
10119 \begin_inset space ~
10120 \end_inset
10121
10122 Layout
10123 \family default
10124  dialog.
10125  There are some settings in the 
10126 \family sans
10127 Document
10128 \begin_inset space ~
10129 \end_inset
10130
10131 Layout
10132 \family default
10133  dialog that you should know about that are specific to this class:
10134 \end_layout
10135
10136 \begin_layout Itemize
10137 Don't change the options 
10138 \family sans
10139 Sides
10140 \family default
10141  and 
10142 \family sans
10143 Columns
10144 \family default
10145  on the 
10146 \family sans
10147 Document
10148 \begin_inset space ~
10149 \end_inset
10150
10151 Layout
10152 \family default
10153  dialog.
10154  They're ignored by the 
10155 \family sans
10156 foils
10157 \family default
10158  class.
10159 \end_layout
10160
10161 \begin_layout Itemize
10162 The default font size is 20
10163 \begin_inset space \thinspace{}
10164 \end_inset
10165
10166 pt with the other options being 17
10167 \begin_inset space \thinspace{}
10168 \end_inset
10169
10170 pt, 25
10171 \begin_inset space \thinspace{}
10172 \end_inset
10173
10174 pt and 30
10175 \begin_inset space \thinspace{}
10176 \end_inset
10177
10178 pt.
10179 \end_layout
10180
10181 \begin_layout Itemize
10182 The default font is 
10183 \family sans
10184 sans
10185 \family default
10186  
10187 \family sans
10188 serif
10189 \family default
10190  but all math equations are still typeset in the usual roman font.
10191 \end_layout
10192
10193 \begin_layout Itemize
10194
10195 \family sans
10196 FoilTeX
10197 \family default
10198  supports A4 and Letter paper sizes as well as a special size for working
10199  with 35
10200 \begin_inset space \thinspace{}
10201 \end_inset
10202
10203 mm slides.
10204  It doesn't support A5, B5, legal or executive paper sizes.
10205 \end_layout
10206
10207 \begin_layout Itemize
10208 Don't bother changing the 
10209 \family sans
10210 Float Placement
10211 \family default
10212  settings because they are ignored anyway.
10213  All floats appear where they are defined in the text.
10214 \end_layout
10215
10216 \begin_layout Itemize
10217 The 
10218 \family sans
10219 Pagestyle
10220 \family default
10221  setting behaves a bit differently for this class.
10222  
10223 \family sans
10224 FoilTeX
10225 \family default
10226  provides extensive footer and header capabilities including a user-defined
10227  logo.
10228  See section
10229 \begin_inset space ~
10230 \end_inset
10231
10232
10233 \begin_inset CommandInset ref
10234 LatexCommand ref
10235 reference "sec:foilfoot"
10236
10237 \end_inset
10238
10239  for more details.
10240  The title page is treated differently to all other pages in the document
10241  and is 
10242 \emph on
10243 always
10244 \emph default
10245  unnumbered and 
10246 \emph on
10247 always
10248 \emph default
10249  has the logo centered at the bottom of the page (if one is defined).
10250  The possible page style choices and what they do are as follows:
10251 \end_layout
10252
10253 \begin_deeper
10254 \begin_layout Labeling
10255 \labelwidthstring MMMMMMM
10256
10257 \family sans
10258 \series bold
10259 empty
10260 \family default
10261 \series default
10262  The final output contains no page numbers, or other headers or footers
10263  (except footnotes of course).
10264  
10265 \end_layout
10266
10267 \begin_layout Labeling
10268 \labelwidthstring MMMMMMM
10269
10270 \family sans
10271 \series bold
10272 plain
10273 \family default
10274 \series default
10275  The final output contains page numbers centered at the bottom of the page.
10276  No other headings or footers (other than footnotes).
10277 \end_layout
10278
10279 \begin_layout Labeling
10280 \labelwidthstring MMMMMMM
10281
10282 \series bold
10283 foilheadings
10284 \series default
10285  Page numbers in lower right corner.
10286  Additional headers and footers are also shown.
10287  This is also the default.
10288 \end_layout
10289
10290 \begin_layout Labeling
10291 \labelwidthstring MMMMMMM
10292
10293 \series bold
10294 fancy
10295 \series default
10296  Gives you access to the 
10297 \family sans
10298 fancyheadings
10299 \family default
10300  package although its use with 
10301 \family sans
10302 FoilTeX
10303 \family default
10304  is discouraged by the writer of the 
10305 \family sans
10306 FoilTeX
10307 \family default
10308  package because of some potential page layout clashes.
10309 \end_layout
10310
10311 \end_deeper
10312 \begin_layout Subsubsection
10313 Extra Options
10314 \end_layout
10315
10316 \begin_layout Standard
10317 The following options may be used in the extra class options in the 
10318 \family sans
10319 Document\SpecialChar \menuseparator
10320 Settings
10321 \family default
10322  dialog.
10323 \end_layout
10324
10325 \begin_layout Labeling
10326 \labelwidthstring MMMMMMx
10327
10328 \series bold
10329 35mmSlide
10330 \series default
10331  This sets up the page layout for 7.33
10332 \begin_inset space \thinspace{}
10333 \end_inset
10334
10335 in by 11
10336 \begin_inset space \thinspace{}
10337 \end_inset
10338
10339 in paper, which is about the same aspect ratio as a 35
10340 \begin_inset space \thinspace{}
10341 \end_inset
10342
10343 mm slide, making it a bit easier to work with this medium.
10344 \end_layout
10345
10346 \begin_layout Labeling
10347 \labelwidthstring MMMMMMx
10348
10349 \series bold
10350 headrule
10351 \series default
10352  Places a rule across the page below the header on every page except the
10353  title page.
10354 \end_layout
10355
10356 \begin_layout Labeling
10357 \labelwidthstring MMMMMMx
10358
10359 \series bold
10360 footrule
10361 \series default
10362  Places a rule across the page above the footer on every page except the
10363  title page.
10364 \end_layout
10365
10366 \begin_layout Labeling
10367 \labelwidthstring MMMMMMx
10368
10369 \series bold
10370 dvips
10371 \series default
10372  This is automatically set each time you create a new 
10373 \family sans
10374 foils
10375 \family default
10376  document.
10377  This option tells 
10378 \family sans
10379 FoilTeX
10380 \family default
10381  to use the dvips driver to rotate those pages that are set as landscape
10382  foils.
10383 \end_layout
10384
10385 \begin_layout Labeling
10386 \labelwidthstring MMMMMMx
10387
10388 \series bold
10389 landscape
10390 \series default
10391  Simply changes the page dimensions to those of a landscape page but doesn't
10392  do any rotation.
10393  Thus if you use this option you need to use an external program to rotate
10394  each page or feed your paper through your printer as landscape.
10395  Note that this option effectively reverses the roles of the 
10396 \family sans
10397 Foilhead
10398 \family default
10399  and 
10400 \family sans
10401 Rotatefoilhead
10402 \family default
10403  environments (don't worry these are described in the next section).
10404 \end_layout
10405
10406 \begin_layout Labeling
10407 \labelwidthstring MMMMMMx
10408
10409 \series bold
10410 leqno
10411 \series default
10412  Equation numbers on the left.
10413 \end_layout
10414
10415 \begin_layout Labeling
10416 \labelwidthstring MMMMMMx
10417
10418 \series bold
10419 fleqn
10420 \series default
10421  Flush-left equations.
10422 \end_layout
10423
10424 \begin_layout Subsection
10425 Supported Environments
10426 \end_layout
10427
10428 \begin_layout Standard
10429 Most of the environments commonly supported in other classes are also supported
10430  by the 
10431 \family sans
10432 foils
10433 \family default
10434  class.
10435  There are several additional environments provided by 
10436 \family sans
10437 FoilTeX
10438 \family default
10439  as well as a couple added by LyX.
10440  The following environments are shared with other classes:
10441 \end_layout
10442
10443 \begin_layout Standard
10444 \begin_inset ERT
10445 status open
10446
10447 \begin_layout Plain Layout
10448
10449
10450 \backslash
10451 begin{multicols}{2}
10452 \end_layout
10453
10454 \end_inset
10455
10456
10457 \end_layout
10458
10459 \begin_layout Itemize
10460
10461 \family sans
10462 Standard
10463 \end_layout
10464
10465 \begin_layout Itemize
10466
10467 \family sans
10468 Itemize
10469 \end_layout
10470
10471 \begin_layout Itemize
10472
10473 \family sans
10474 Enumerate
10475 \end_layout
10476
10477 \begin_layout Itemize
10478
10479 \family sans
10480 Description
10481 \end_layout
10482
10483 \begin_layout Itemize
10484
10485 \family sans
10486 List
10487 \end_layout
10488
10489 \begin_layout Itemize
10490
10491 \family sans
10492 LyX-Code
10493 \end_layout
10494
10495 \begin_layout Itemize
10496
10497 \family sans
10498 Verse
10499 \end_layout
10500
10501 \begin_layout Itemize
10502
10503 \family sans
10504 Quote
10505 \end_layout
10506
10507 \begin_layout Itemize
10508
10509 \family sans
10510 Quotation
10511 \end_layout
10512
10513 \begin_layout Itemize
10514
10515 \family sans
10516 Title
10517 \end_layout
10518
10519 \begin_layout Itemize
10520
10521 \family sans
10522 Author
10523 \end_layout
10524
10525 \begin_layout Itemize
10526
10527 \family sans
10528 Date
10529 \end_layout
10530
10531 \begin_layout Itemize
10532
10533 \family sans
10534 Abstract
10535 \end_layout
10536
10537 \begin_layout Itemize
10538
10539 \family sans
10540 Bibliography
10541 \end_layout
10542
10543 \begin_layout Itemize
10544
10545 \family sans
10546 Address
10547 \end_layout
10548
10549 \begin_layout Itemize
10550
10551 \family sans
10552 RightAddress
10553 \end_layout
10554
10555 \begin_layout Itemize
10556
10557 \family sans
10558 Caption
10559 \end_layout
10560
10561 \begin_layout Itemize
10562
10563 \family sans
10564 Comment
10565 \end_layout
10566
10567 \begin_layout Standard
10568 \begin_inset ERT
10569 status open
10570
10571 \begin_layout Plain Layout
10572
10573
10574 \backslash
10575 end{multicols}
10576 \end_layout
10577
10578 \end_inset
10579
10580
10581 \end_layout
10582
10583 \begin_layout Standard
10584 That is, all the major environments apart from the sectioning environments.
10585  Since foils are essentially self-contained sections, with a title and body,
10586  
10587 \family sans
10588 FoilTeX
10589 \family default
10590  provides specific commands for starting new foils and these are:
10591 \end_layout
10592
10593 \begin_layout Itemize
10594
10595 \family sans
10596 Foilhead
10597 \end_layout
10598
10599 \begin_layout Itemize
10600
10601 \family sans
10602 Rotatefoilhead
10603 \end_layout
10604
10605 \begin_layout Standard
10606 LyX also provides slightly modified versions of these two environments called:
10607 \end_layout
10608
10609 \begin_layout Itemize
10610
10611 \family sans
10612 ShortFoilhead
10613 \end_layout
10614
10615 \begin_layout Itemize
10616
10617 \family sans
10618 ShortRotatefoilhead
10619 \end_layout
10620
10621 \begin_layout Standard
10622 and the differences will be explained in the next section.
10623 \end_layout
10624
10625 \begin_layout Standard
10626 Since foils are often used in presenting ideas or new theorems and such
10627  
10628 \family sans
10629 FoilTeX
10630 \family default
10631  also provides a comprehensive box of goodies for presenting them:
10632 \end_layout
10633
10634 \begin_layout Standard
10635 \begin_inset ERT
10636 status open
10637
10638 \begin_layout Plain Layout
10639
10640
10641 \backslash
10642 begin{multicols}{2}
10643 \end_layout
10644
10645 \end_inset
10646
10647
10648 \end_layout
10649
10650 \begin_layout Itemize
10651
10652 \family sans
10653 Theorem
10654 \end_layout
10655
10656 \begin_layout Itemize
10657
10658 \family sans
10659 Lemma
10660 \end_layout
10661
10662 \begin_layout Itemize
10663
10664 \family sans
10665 Corollary
10666 \end_layout
10667
10668 \begin_layout Itemize
10669
10670 \family sans
10671 Proposition
10672 \end_layout
10673
10674 \begin_layout Itemize
10675
10676 \family sans
10677 Definition
10678 \end_layout
10679
10680 \begin_layout Itemize
10681
10682 \family sans
10683 Proof
10684 \end_layout
10685
10686 \begin_layout Itemize
10687
10688 \family sans
10689 Theorem*
10690 \end_layout
10691
10692 \begin_layout Itemize
10693
10694 \family sans
10695 Lemma*
10696 \end_layout
10697
10698 \begin_layout Itemize
10699
10700 \family sans
10701 Corollary*
10702 \end_layout
10703
10704 \begin_layout Itemize
10705
10706 \family sans
10707 Proposition*
10708 \end_layout
10709
10710 \begin_layout Itemize
10711
10712 \family sans
10713 Definition*
10714 \end_layout
10715
10716 \begin_layout Standard
10717 \begin_inset ERT
10718 status open
10719
10720 \begin_layout Plain Layout
10721
10722
10723 \backslash
10724 end{multicols}
10725 \end_layout
10726
10727 \end_inset
10728
10729
10730 \end_layout
10731
10732 \begin_layout Standard
10733 The starred versions are unnumbered while the unstarred versions are numbered.
10734  There are also two list environments added by LyX and these are:
10735 \end_layout
10736
10737 \begin_layout Itemize
10738
10739 \family sans
10740 TickList
10741 \end_layout
10742
10743 \begin_layout Itemize
10744
10745 \family sans
10746 CrossList
10747 \end_layout
10748
10749 \begin_layout Standard
10750
10751 \family sans
10752 FoilTeX
10753 \family default
10754  provides some powerful header and footer capabilities that are best set
10755  in the preamble although they may be set at any point in a document.
10756  If you want to change these settings in your document the best place to
10757  do so is at the very top of a foil, i.
10758 \begin_inset space \thinspace{}
10759 \end_inset
10760
10761 e.
10762 \emph on
10763
10764 \begin_inset space \space{}
10765 \end_inset
10766
10767
10768 \emph default
10769 straight after the foilhead.
10770 \end_layout
10771
10772 \begin_layout Standard
10773 For this purpose, the following command styles are provided [
10774 \shape smallcaps
10775 Martin Vermeer
10776 \shape default
10777 ]:
10778 \end_layout
10779
10780 \begin_layout Standard
10781 \begin_inset ERT
10782 status open
10783
10784 \begin_layout Plain Layout
10785
10786
10787 \backslash
10788 begin{multicols}{2}
10789 \end_layout
10790
10791 \end_inset
10792
10793
10794 \end_layout
10795
10796 \begin_layout Itemize
10797
10798 \family sans
10799 My
10800 \begin_inset space ~
10801 \end_inset
10802
10803 Logo
10804 \end_layout
10805
10806 \begin_layout Itemize
10807
10808 \family sans
10809 Restriction
10810 \end_layout
10811
10812 \begin_layout Itemize
10813
10814 \family sans
10815 Right
10816 \begin_inset space ~
10817 \end_inset
10818
10819 Footer
10820 \end_layout
10821
10822 \begin_layout Itemize
10823
10824 \family sans
10825 Right
10826 \begin_inset space ~
10827 \end_inset
10828
10829 Header
10830 \end_layout
10831
10832 \begin_layout Itemize
10833
10834 \family sans
10835 Left
10836 \begin_inset space ~
10837 \end_inset
10838
10839 Header
10840 \end_layout
10841
10842 \begin_deeper
10843 \begin_layout Standard
10844 \begin_inset space ~
10845 \end_inset
10846
10847
10848 \end_layout
10849
10850 \end_deeper
10851 \begin_layout Standard
10852 \begin_inset ERT
10853 status open
10854
10855 \begin_layout Plain Layout
10856
10857
10858 \backslash
10859 end{multicols}
10860 \end_layout
10861
10862 \end_inset
10863
10864
10865 \end_layout
10866
10867 \begin_layout Standard
10868 There are also a few commands provided by 
10869 \family sans
10870 FoilTeX
10871 \family default
10872  that aren't directly supported by LyX but I'll tell you what they do and
10873  how to use them in section
10874 \begin_inset space ~
10875 \end_inset
10876
10877
10878 \begin_inset CommandInset ref
10879 LatexCommand ref
10880 reference "sec:unsuppfoils"
10881
10882 \end_inset
10883
10884 .
10885 \end_layout
10886
10887 \begin_layout Subsection
10888 Building a Set of Foils
10889 \end_layout
10890
10891 \begin_layout Standard
10892 This section will give a simple introduction to using the different environments
10893  to build a set of foils.
10894  If you want to see an example set of foils, take a look at the 
10895 \family typewriter
10896 Foils.lyx
10897 \family default
10898  file you find in LyX's 
10899 \family typewriter
10900 examples
10901 \family default
10902  folder.
10903 \end_layout
10904
10905 \begin_layout Subsubsection
10906 Give It a Title Page
10907 \end_layout
10908
10909 \begin_layout Standard
10910 Unlike other classes that provide 
10911 \family sans
10912 Title
10913 \family default
10914
10915 \family sans
10916 Author
10917 \family default
10918
10919 \family sans
10920 Date
10921 \family default
10922  and 
10923 \family sans
10924 Abstract
10925 \family default
10926  environments, 
10927 \family sans
10928 foils
10929 \family default
10930  creates the title on a page of its own.
10931  If you leave out the 
10932 \family sans
10933 Date
10934 \family default
10935  environment LaTeX will substitute the current date (every time you regenerate
10936  the output).
10937 \end_layout
10938
10939 \begin_layout Subsubsection
10940 Start a New Foil
10941 \end_layout
10942
10943 \begin_layout Standard
10944 As I mentioned earlier, there are four ways of starting a new foil.
10945  For portrait foils you should use 
10946 \family sans
10947 Foilhead
10948 \family default
10949  or 
10950 \family sans
10951 ShortFoilhead.
10952
10953 \family default
10954  The difference between these two environments is the amount of space between
10955  the title of the foil (the foilhead) and the body of the foil.
10956 \end_layout
10957
10958 \begin_layout Standard
10959 Landscape foils are generated using the 
10960 \family sans
10961 Rotatefoilhead
10962 \family default
10963  and 
10964 \family sans
10965 ShortRotatefoilhead
10966 \family default
10967  environments.
10968  Again the only difference is the spacing between foilhead and body.
10969  Both of the short versions have 0.5 inches less separation between the foilhead
10970  and the body.
10971  
10972 \end_layout
10973
10974 \begin_layout Standard
10975 One problem with the support for landscape foils is the requirement that
10976  you have to use the 
10977 \family typewriter
10978 dvips
10979 \family default
10980  driver to generate the PostScript output otherwise the foils won't be rotated.
10981  It is possible to get landscape foils even if you haven't got the 
10982 \family typewriter
10983 dvips
10984 \family default
10985  driver provided you can feed your foils sideways through your printer ;-)
10986 \end_layout
10987
10988 \begin_layout Subsubsection
10989 Theorems, Lemmas, Proofs and more
10990 \end_layout
10991
10992 \begin_layout Standard
10993 Due to a small bug in LyX you can't have two of the same type of these environme
10994 nts directly following each other.
10995  They must be separated by something.
10996  If you try, you will just be extending the previous environment as if you
10997  had merged the two environments together.
10998  So, how do you get around this problem? The simplest option is to insert
10999  some text between the two environments or add a 
11000 \family sans
11001 LaTeX
11002 \family default
11003  environment between the two with just a 
11004 \begin_inset Quotes eld
11005 \end_inset
11006
11007
11008 \family typewriter
11009 %
11010 \family default
11011
11012 \begin_inset Quotes erd
11013 \end_inset
11014
11015  in it.
11016  This will force LyX to produce two separate environments and hence the
11017  correct LaTeX output.
11018  An example is provided in the example file included with the LyX distribution.
11019  Remember, this problem only occurs if you are trying to place two of the
11020  same type of theorem-like environments one directly after the other.
11021 \end_layout
11022
11023 \begin_layout Subsubsection
11024 Lists
11025 \end_layout
11026
11027 \begin_layout Standard
11028 You get all the commonly supported list styles found in other classes as
11029  well as two new ones.
11030  I'll only describe the new ones here.
11031  If you want to find out more about the other list environments check out
11032  the 
11033 \emph on
11034 User's Guide.
11035
11036 \emph default
11037  If you intend to use itemized lists you might also want to read about the
11038  
11039 \family sans
11040 Itemize
11041 \begin_inset space ~
11042 \end_inset
11043
11044 Bullet
11045 \begin_inset space ~
11046 \end_inset
11047
11048 Selection
11049 \family default
11050  dialog described above in section
11051 \begin_inset space ~
11052 \end_inset
11053
11054
11055 \begin_inset CommandInset ref
11056 LatexCommand ref
11057 reference "sec:bullet"
11058
11059 \end_inset
11060
11061 .
11062 \end_layout
11063
11064 \begin_layout Standard
11065 The two new list styles, 
11066 \family sans
11067 TickList
11068 \family default
11069  and 
11070 \family sans
11071 CrossList
11072 \family default
11073 , are designed to make it easier for you to create lists of do's and don'ts
11074  or right and wrong by providing dedicated environments that use a tick
11075  or a cross as the label of the list.
11076  These lists are in fact dedicated variants of the 
11077 \family sans
11078 Itemize
11079 \family default
11080  environment.
11081  They do however require that you have the 
11082 \family typewriter
11083 psnfss
11084 \family default
11085  packages installed.
11086 \end_layout
11087
11088 \begin_layout Subsubsection
11089 Figures and Tables
11090 \end_layout
11091
11092 \begin_layout Standard
11093
11094 \family sans
11095 FoilTeX
11096 \family default
11097  redefines the floating tables and figures so that they appear exactly where
11098  they are in the text rather than pushing them to the top of the page or
11099  to some user specified location.
11100  In fact if you change the float placement settings they are simply ignored.
11101 \end_layout
11102
11103 \begin_layout Subsubsection
11104 Page Headers and Footers
11105 \begin_inset CommandInset label
11106 LatexCommand label
11107 name "sec:foilfoot"
11108
11109 \end_inset
11110
11111
11112 \end_layout
11113
11114 \begin_layout Standard
11115
11116 \family sans
11117 My
11118 \begin_inset space ~
11119 \end_inset
11120
11121 Logo
11122 \family default
11123  and 
11124 \family sans
11125 Restriction
11126 \family default
11127  are two commands used to control the left-footer text string.
11128  The first is meant to allow you to include a graphic logo on your foils
11129  and defaults to 
11130 \begin_inset Quotes eld
11131 \end_inset
11132
11133 -Typeset by 
11134 \family sans
11135 FoilTeX
11136 \family default
11137 -
11138 \begin_inset Quotes erd
11139 \end_inset
11140
11141 .
11142  While the second is meant to provide a classification for the audience,
11143  
11144 \emph on
11145 e.
11146 \begin_inset space \thinspace{}
11147 \end_inset
11148
11149 g.
11150 \emph default
11151
11152 \begin_inset space \space{}
11153 \end_inset
11154
11155 Confidential.
11156  It is empty by default.
11157 \end_layout
11158
11159 \begin_layout Standard
11160 The remaining page corners can be filled by 
11161 \family sans
11162 Right
11163 \begin_inset space ~
11164 \end_inset
11165
11166 Footer
11167 \family default
11168  (which defaults to page numbers), 
11169 \family sans
11170 Right
11171 \begin_inset space ~
11172 \end_inset
11173
11174 Header
11175 \family default
11176  (top right) and 
11177 \family sans
11178 Left
11179 \begin_inset space ~
11180 \end_inset
11181
11182 Header
11183 \family default
11184  (top left).
11185 \end_layout
11186
11187 \begin_layout Subsection
11188 Unsupported 
11189 \family sans
11190 FoilTeX
11191 \family default
11192  Goodies
11193 \begin_inset CommandInset label
11194 LatexCommand label
11195 name "sec:unsuppfoils"
11196
11197 \end_inset
11198
11199
11200 \end_layout
11201
11202 \begin_layout Standard
11203 All the commands mentioned below need to be set in a 
11204 \family sans
11205 LaTeX
11206 \family default
11207  environment or as 
11208 \family sans
11209 TeX
11210 \family default
11211  within another environment.
11212 \end_layout
11213
11214 \begin_layout Subsubsection
11215 Lengths
11216 \end_layout
11217
11218 \begin_layout Standard
11219 All lengths are adjusted using the 
11220 \family typewriter
11221
11222 \backslash
11223 setlength{
11224 \family default
11225 \emph on
11226 lengthname
11227 \family typewriter
11228 \emph default
11229 }{
11230 \family default
11231 \emph on
11232 newlength
11233 \family typewriter
11234 \emph default
11235 }
11236 \family default
11237  command.
11238  Where 
11239 \emph on
11240 lengthname
11241 \emph default
11242  should be replaced by the name given to the length you want to change and
11243  
11244 \emph on
11245 newlength
11246 \emph default
11247  is the length value.
11248  All lengths should be specified in units of length such as inches (
11249 \family typewriter
11250 in
11251 \family default
11252 ), millimeters (
11253 \family typewriter
11254 mm
11255 \family default
11256 ) or points (
11257 \family typewriter
11258 pt
11259 \family default
11260 ) or relative to some document or font-based length such as 
11261 \family typewriter
11262
11263 \backslash
11264 textwidth
11265 \family default
11266 .
11267  
11268 \end_layout
11269
11270 \begin_layout Standard
11271 It's possible to change the spacing between a foilhead and the body of the
11272  foil by adjusting the length specified by 
11273 \family typewriter
11274
11275 \backslash
11276 foilheadskip
11277 \family default
11278 .
11279  For example, to make 
11280 \emph on
11281 all
11282 \emph default
11283  foilheads 0.5
11284 \begin_inset space \space{}
11285 \end_inset
11286
11287 in closer to their bodies put the following in the preamble: 
11288 \family typewriter
11289
11290 \backslash
11291 setlength{
11292 \backslash
11293 foilheadskip}{-0.5in}
11294 \end_layout
11295
11296 \begin_layout Standard
11297 The spacings around floats can be adjusted by setting these lengths:
11298 \end_layout
11299
11300 \begin_layout Labeling
11301 \labelwidthstring MMMMMMMMMMM
11302
11303 \family typewriter
11304
11305 \backslash
11306 abovefloatskip
11307 \family default
11308  Separation between the text and the top of the float
11309 \end_layout
11310
11311 \begin_layout Labeling
11312 \labelwidthstring MMMMMMMMMMM
11313
11314 \family typewriter
11315
11316 \backslash
11317 abovecaptionskip
11318 \family default
11319  Separation between the float and the caption
11320 \end_layout
11321
11322 \begin_layout Labeling
11323 \labelwidthstring MMMMMMMMMMM
11324
11325 \family typewriter
11326
11327 \backslash
11328 belowcaptionskip
11329 \family default
11330  Separation between the caption and the following text
11331 \end_layout
11332
11333 \begin_layout Labeling
11334 \labelwidthstring MMMMMMMMMMM
11335
11336 \family typewriter
11337
11338 \backslash
11339 captionwidth
11340 \family default
11341  You can make the captions narrower than the surrounding text by adjusting
11342  this length.
11343  Best done relative to 
11344 \family typewriter
11345
11346 \backslash
11347 textwidth
11348 \family default
11349 .
11350 \end_layout
11351
11352 \begin_layout Standard
11353 There are also several title page related lengths that you may find useful
11354  if you have a long title or several authors:
11355 \end_layout
11356
11357 \begin_layout Labeling
11358 \labelwidthstring MMMMMMMMMMM
11359
11360 \family typewriter
11361
11362 \backslash
11363 abovetitleskip
11364 \family default
11365  Separation from headers to 
11366 \family sans
11367 Title
11368 \end_layout
11369
11370 \begin_layout Labeling
11371 \labelwidthstring MMMMMMMMMMM
11372
11373 \family typewriter
11374
11375 \backslash
11376 titleauthorskip
11377 \family default
11378  between 
11379 \family sans
11380 Title
11381 \family default
11382  and 
11383 \family sans
11384 Author
11385 \family default
11386  environments
11387 \end_layout
11388
11389 \begin_layout Labeling
11390 \labelwidthstring MMMMMMMMMMM
11391
11392 \family typewriter
11393
11394 \backslash
11395 authorauthorskip
11396 \family default
11397  between multiple 
11398 \family sans
11399 Author
11400 \family default
11401  lines
11402 \end_layout
11403
11404 \begin_layout Labeling
11405 \labelwidthstring MMMMMMMMMMM
11406
11407 \family typewriter
11408
11409 \backslash
11410 authordateskip
11411 \family default
11412  between the 
11413 \family sans
11414 Author
11415 \family default
11416  and the 
11417 \family sans
11418 Date
11419 \end_layout
11420
11421 \begin_layout Labeling
11422 \labelwidthstring MMMMMMMMMMM
11423
11424 \family typewriter
11425
11426 \backslash
11427 dateabstractskip
11428 \family default
11429  between the 
11430 \family sans
11431 Date
11432 \family default
11433  and the 
11434 \family sans
11435 Abstract
11436 \end_layout
11437
11438 \begin_layout Standard
11439 The last length related command affects all the list environments.
11440  If you place 
11441 \family typewriter
11442
11443 \backslash
11444 zerolistvertdimens
11445 \family default
11446  
11447 \emph on
11448 inside
11449 \emph default
11450  a list environment then all the vertical spacing between the list items
11451  is removed.
11452  Note that this is a command not a length so it doesn't require 
11453 \family typewriter
11454
11455 \backslash
11456 setlength
11457 \family default
11458  like the stuff mentioned above.
11459 \end_layout
11460
11461 \begin_layout Subsubsection
11462 Headers and Footers
11463 \end_layout
11464
11465 \begin_layout Standard
11466 The 
11467 \family typewriter
11468
11469 \backslash
11470 LogoOn
11471 \family default
11472  and 
11473 \family typewriter
11474
11475 \backslash
11476 LogoOff
11477 \family default
11478  commands control whether the logo in the 
11479 \family sans
11480 MyLogo
11481 \family default
11482  definition appear on a given page.
11483  If you put 
11484 \family typewriter
11485
11486 \backslash
11487 LogoOff
11488 \family default
11489  in the preamble then none of the foils will have the logo on them.
11490  If you don't want the logo on a particular page place the 
11491 \family typewriter
11492
11493 \backslash
11494 LogoOff
11495 \family default
11496  directly after the foilhead of that page and the 
11497 \family typewriter
11498
11499 \backslash
11500 LogoOn
11501 \family default
11502  directly after the next foilhead.
11503 \end_layout
11504
11505 \begin_layout Standard
11506 If you decide to use the 
11507 \family sans
11508 fancy
11509 \family default
11510  page style setting in the 
11511 \family sans
11512 Document
11513 \begin_inset space ~
11514 \end_inset
11515
11516 Layout
11517 \family default
11518  dialog you should probably add 
11519 \family typewriter
11520
11521 \backslash
11522 let
11523 \backslash
11524 headwidth
11525 \backslash
11526 textwidth
11527 \family default
11528  to your preamble so headers and footers on landscape pages are correctly
11529  placed when rotated.
11530  This is due to some clashes between the page layouts provided by the 
11531 \family sans
11532 fancyheadings
11533 \family default
11534  package and the 
11535 \family sans
11536 foils
11537 \family default
11538  class.
11539 \end_layout
11540
11541 \begin_layout Section
11542 Hollywood (Hollywood spec scripts)
11543 \end_layout
11544
11545 \begin_layout Standard
11546 by 
11547 \shape smallcaps
11548 Garst Reese
11549 \end_layout
11550
11551 \begin_layout Subsection
11552 Introduction
11553 \end_layout
11554
11555 \begin_layout Standard
11556 Getting the format of a Hollywood script right is a 
11557 \begin_inset Quotes eld
11558 \end_inset
11559
11560 rite of passage.
11561 \begin_inset Quotes erd
11562 \end_inset
11563
11564  It is designed to make the readers focus on content and to be easy and
11565  familiar for the actors to read.
11566  Each page of a script should be one minute of film.
11567  Nothing goes in a script that you cannot see or hear on screen.
11568  The courier 12 pt font should be used throughout.
11569  No italics.
11570 \end_layout
11571
11572 \begin_layout Subsection
11573 Special problems
11574 \end_layout
11575
11576 \begin_layout Standard
11577 Speakers' lines should NEVER break in mid-sentence.
11578  If a speaker's lines continue over a page break, repeat the 
11579 \family sans
11580 Speaker
11581 \family default
11582  title followed by (Cont'd).
11583 \end_layout
11584
11585 \begin_layout Subsection
11586 Special features
11587 \end_layout
11588
11589 \begin_layout Standard
11590 Insert the 
11591 \family sans
11592 Speaker
11593 \family default
11594  names as labels then cross-reference the label to insert the name.
11595  The cross-reference dialog will show the current cast of characters.
11596  You can use this to insert the speaker name in narratives also.
11597 \end_layout
11598
11599 \begin_layout Subsection
11600 Paper size and Margins
11601 \end_layout
11602
11603 \begin_layout Standard
11604 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11605 \end_layout
11606
11607 \begin_layout Subsection
11608 Environments
11609 \end_layout
11610
11611 \begin_layout Standard
11612 The following environments are available.
11613  You can use hollywood.bind to get the bind keys shown at the right.
11614 \end_layout
11615
11616 \begin_layout Itemize
11617
11618 \family sans
11619 Standard
11620 \begin_inset Newline newline
11621 \end_inset
11622
11623
11624 \family default
11625 Used where nothing else works.
11626  Try to avoid it.
11627 \end_layout
11628
11629 \begin_layout Itemize
11630
11631 \family sans
11632 FADE_IN
11633 \family default
11634 :
11635 \begin_inset space \hfill{}
11636 \end_inset
11637
11638
11639 \family sans
11640 M-z S-I
11641 \family default
11642
11643 \begin_inset Newline newline
11644 \end_inset
11645
11646 Usually followed by something like 
11647 \begin_inset Quotes eld
11648 \end_inset
11649
11650 on Sally waking up.
11651 \begin_inset Quotes erd
11652 \end_inset
11653
11654
11655 \end_layout
11656
11657 \begin_layout Itemize
11658
11659 \family sans
11660 INT:
11661 \begin_inset space \hfill{}
11662 \end_inset
11663
11664 M-z i
11665 \begin_inset Newline newline
11666 \end_inset
11667
11668
11669 \family default
11670 Introduces a new INTERIOR camera set-up.
11671  Always followed by DAY or NIGHT, or something similar to define the lighting
11672  required.
11673  Everthing on this line in CAPS.
11674 \end_layout
11675
11676 \begin_layout Itemize
11677
11678 \family sans
11679 EXT:
11680 \begin_inset space \hfill{}
11681 \end_inset
11682
11683 M-z e
11684 \begin_inset Newline newline
11685 \end_inset
11686
11687
11688 \family default
11689 Introduces a new EXTERIOR camera set-up.
11690  Everthing on this line in CAPS.
11691 \end_layout
11692
11693 \begin_layout Itemize
11694
11695 \family sans
11696 Speaker
11697 \begin_inset space \hfill{}
11698 \end_inset
11699
11700 M-z s
11701 \begin_inset Newline newline
11702 \end_inset
11703
11704
11705 \family default
11706 The character speaking.
11707 \end_layout
11708
11709 \begin_layout Itemize
11710
11711 \family sans
11712 Parenthetical
11713 \begin_inset space \hfill{}
11714 \end_inset
11715
11716 M-z p
11717 \begin_inset Newline newline
11718 \end_inset
11719
11720
11721 \family default
11722 Instructions to the speaker.
11723  The () are automatically inserted, but only the ( will show in LyX.
11724  Both will be printed.
11725 \end_layout
11726
11727 \begin_layout Itemize
11728
11729 \family sans
11730 Dialogue
11731 \begin_inset space \hfill{}
11732 \end_inset
11733
11734 M-z d
11735 \begin_inset Newline newline
11736 \end_inset
11737
11738
11739 \family default
11740 What the 
11741 \family sans
11742 Speaker
11743 \family default
11744  says.
11745 \end_layout
11746
11747 \begin_layout Itemize
11748
11749 \family sans
11750 Transition
11751 \begin_inset space \hfill{}
11752 \end_inset
11753
11754 M-z t
11755 \begin_inset Newline newline
11756 \end_inset
11757
11758
11759 \family default
11760 Camera movement instruction.
11761  e.
11762 \begin_inset space \thinspace{}
11763 \end_inset
11764
11765 g.
11766 \begin_inset space \space{}
11767 \end_inset
11768
11769 CUT TO:
11770 \end_layout
11771
11772 \begin_layout Itemize
11773
11774 \family sans
11775 FADE OUT:
11776 \begin_inset space \hfill{}
11777 \end_inset
11778
11779 M-z S-I
11780 \end_layout
11781
11782 \begin_layout Itemize
11783
11784 \family sans
11785 Author
11786 \begin_inset space \hfill{}
11787 \end_inset
11788
11789 M-z S-A
11790 \end_layout
11791
11792 \begin_layout Itemize
11793
11794 \family sans
11795 Title
11796 \begin_inset space \hfill{}
11797 \end_inset
11798
11799 M-z S-T
11800 \end_layout
11801
11802 \begin_layout Itemize
11803
11804 \family sans
11805 Right_Address
11806 \begin_inset space \hfill{}
11807 \end_inset
11808
11809 M-z r
11810 \end_layout
11811
11812 \begin_layout Subsection
11813 Script jargon
11814 \end_layout
11815
11816 \begin_layout Itemize
11817 (O.S) — off screen
11818 \end_layout
11819
11820 \begin_layout Itemize
11821 (V.0) — voice over
11822 \end_layout
11823
11824 \begin_layout Itemize
11825 b.
11826 \begin_inset space \thinspace{}
11827 \end_inset
11828
11829 g.
11830  — background
11831 \end_layout
11832
11833 \begin_layout Itemize
11834 C.U.
11835  — close-up
11836 \end_layout
11837
11838 \begin_layout Itemize
11839 PAN — camera movement
11840 \end_layout
11841
11842 \begin_layout Itemize
11843 INSERT — cut to close-up of
11844 \end_layout
11845
11846 \begin_layout Section
11847 ijmpc and ijmpd
11848 \end_layout
11849
11850 \begin_layout Standard
11851 by 
11852 \noun on
11853 Panayotis Papasotiriou
11854 \end_layout
11855
11856 \begin_layout Subsection
11857 Overview
11858 \end_layout
11859
11860 \begin_layout Standard
11861 The ijmpc package is a set of macros that facilitates electronic manuscript
11862  submission to the 
11863 \emph on
11864 International Journal of Modern Physics C
11865 \emph default
11866 .
11867  Similarly, the ijmpd package is for creating manuscripts to be submitted
11868  to the 
11869 \emph on
11870 International Journal of Modern Physics D
11871 \emph default
11872 .
11873  Both journals are published by World Scientific.
11874  The corresponding document classes are named 
11875 \family typewriter
11876 ws-ijmpc.cls
11877 \family default
11878  and 
11879 \family typewriter
11880 ws-ijmpd.cls
11881 \family default
11882 , respectively.
11883  These files, together with instructions for the authors, can be downloaded
11884  from the sites 
11885 \begin_inset Flex URL
11886 status collapsed
11887
11888 \begin_layout Plain Layout
11889
11890 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11891 \end_layout
11892
11893 \end_inset
11894
11895  and 
11896 \begin_inset Flex URL
11897 status collapsed
11898
11899 \begin_layout Plain Layout
11900
11901 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11902 \end_layout
11903
11904 \end_inset
11905
11906 .
11907  Both packages are modified versions of the standard 
11908 \begin_inset Quotes eld
11909 \end_inset
11910
11911 article
11912 \begin_inset Quotes erd
11913 \end_inset
11914
11915  package, and they are almost (but not exactly) identical.
11916  Most of their features are supported by LyX.
11917  I have used LyX successfully to write articles submitted to both journals
11918  without any problem.
11919 \end_layout
11920
11921 \begin_layout Subsection
11922 Writing a paper
11923 \end_layout
11924
11925 \begin_layout Standard
11926 As usual, the easiest way to write a paper is to start with a template.
11927  Click on 
11928 \family sans
11929 File\SpecialChar \menuseparator
11930 New from
11931 \family default
11932  
11933 \family sans
11934 \bar under
11935 T
11936 \bar default
11937 emplate
11938 \family default
11939 , then choose the 
11940 \family typewriter
11941 ijmpc.lyx
11942 \family default
11943  or 
11944 \family typewriter
11945 ijmpd.lyx
11946 \family default
11947  template.
11948  This will give an (almost) empty document that includes the most common
11949  fields found in a manuscript.
11950  Simply overwrite the existing text (including the brackets, 
11951 \family typewriter
11952 <>
11953 \family default
11954 ) with your text.
11955  You should keep in mind the following remarks.
11956 \end_layout
11957
11958 \begin_layout Enumerate
11959 LyX won't let you change the font size and the page style of the document,
11960  because such modifications are not allowed by both packages.
11961 \end_layout
11962
11963 \begin_layout Enumerate
11964 The language of the document should not be changed.
11965  Before previewing your paper, be sure that the babel package is not used.
11966  To do this, click on 
11967 \family sans
11968 Tools\SpecialChar \menuseparator
11969 Preferences
11970 \family default
11971 , select the 
11972 \family sans
11973 Lang Opts
11974 \family default
11975  tab, deselect the 
11976 \family sans
11977 Use babel
11978 \family default
11979  checkbox in the language settings, and click on 
11980 \family sans
11981 Apply
11982 \family default
11983  (or 
11984 \family sans
11985 Save
11986 \family default
11987 , if you wish to make this change permanent).
11988 \end_layout
11989
11990 \begin_layout Enumerate
11991 The 
11992 \begin_inset Quotes eld
11993 \end_inset
11994
11995 Keywords
11996 \begin_inset Quotes erd
11997 \end_inset
11998
11999  style must be used to define keywords.
12000 \end_layout
12001
12002 \begin_layout Enumerate
12003 The ijmpc package provides a style named 
12004 \begin_inset Quotes eld
12005 \end_inset
12006
12007 Classification Codes
12008 \begin_inset Quotes erd
12009 \end_inset
12010
12011 , which can be used to define classification codes, such as PACS numbers.
12012  Note that this facility is not supported by the ijmpd package.
12013 \end_layout
12014
12015 \begin_layout Enumerate
12016 Several new environments are available: 
12017 \begin_inset Quotes eld
12018 \end_inset
12019
12020 Definition
12021 \begin_inset Quotes erd
12022 \end_inset
12023
12024
12025 \begin_inset Quotes eld
12026 \end_inset
12027
12028 Step
12029 \begin_inset Quotes erd
12030 \end_inset
12031
12032
12033 \begin_inset Quotes eld
12034 \end_inset
12035
12036 Example
12037 \begin_inset Quotes erd
12038 \end_inset
12039
12040
12041 \begin_inset Quotes eld
12042 \end_inset
12043
12044 Remark
12045 \begin_inset Quotes erd
12046 \end_inset
12047
12048
12049 \begin_inset Quotes eld
12050 \end_inset
12051
12052 Notation
12053 \begin_inset Quotes erd
12054 \end_inset
12055
12056
12057 \begin_inset Quotes eld
12058 \end_inset
12059
12060 Theorem
12061 \begin_inset Quotes erd
12062 \end_inset
12063
12064
12065 \begin_inset Quotes eld
12066 \end_inset
12067
12068 Proof
12069 \begin_inset Quotes erd
12070 \end_inset
12071
12072
12073 \begin_inset Quotes eld
12074 \end_inset
12075
12076 Corollary
12077 \begin_inset Quotes erd
12078 \end_inset
12079
12080
12081 \begin_inset Quotes eld
12082 \end_inset
12083
12084 Lemma
12085 \begin_inset Quotes erd
12086 \end_inset
12087
12088
12089 \begin_inset Quotes eld
12090 \end_inset
12091
12092 Proposition
12093 \begin_inset Quotes erd
12094 \end_inset
12095
12096
12097 \begin_inset Quotes eld
12098 \end_inset
12099
12100 Prop
12101 \begin_inset Quotes erd
12102 \end_inset
12103
12104
12105 \begin_inset Quotes eld
12106 \end_inset
12107
12108 Question
12109 \begin_inset Quotes erd
12110 \end_inset
12111
12112
12113 \begin_inset Quotes eld
12114 \end_inset
12115
12116 Claim
12117 \begin_inset Quotes erd
12118 \end_inset
12119
12120 , and 
12121 \begin_inset Quotes eld
12122 \end_inset
12123
12124 Conjecture
12125 \begin_inset Quotes erd
12126 \end_inset
12127
12128 .
12129  Their use is more or less obvious.
12130  LyX supports all these environments; it will use the proper label, text
12131  style, and numbering scheme for each of them.
12132 \end_layout
12133
12134 \begin_layout Enumerate
12135 Both packages use basic citations; the natbib package should not be used.
12136  In LyX, citation references are shown as usual; in the output, citations
12137  are shown as superscripts.
12138  If you want to use a citation as normal text, you should use the 
12139 \family typewriter
12140 refcite
12141 \family default
12142  command, e.
12143 \begin_inset space \thinspace{}
12144 \end_inset
12145
12146 g.
12147 \begin_inset space \space{}
12148 \end_inset
12149
12150
12151 \begin_inset Quotes eld
12152 \end_inset
12153
12154 See Ref.
12155 \begin_inset space \space{}
12156 \end_inset
12157
12158
12159 \family typewriter
12160
12161 \backslash
12162 refcite{key}
12163 \family default
12164
12165 \begin_inset Quotes erd
12166 \end_inset
12167
12168 .
12169 \end_layout
12170
12171 \begin_layout Enumerate
12172 There is no 
12173 \begin_inset Quotes eld
12174 \end_inset
12175
12176 Acknowledgments
12177 \begin_inset Quotes erd
12178 \end_inset
12179
12180  section in both packages.
12181  To put acknowledgments, just use the 
12182 \begin_inset Quotes eld
12183 \end_inset
12184
12185 Section*
12186 \begin_inset Quotes erd
12187 \end_inset
12188
12189  environment.
12190 \end_layout
12191
12192 \begin_layout Enumerate
12193 Appendices may be added to the paper, 
12194 \emph on
12195 after
12196 \emph default
12197  the Acknowledgments and 
12198 \shape italic
12199 before
12200 \shape default
12201  the References.
12202  LyX provides a special environment, called 
12203 \begin_inset Quotes eld
12204 \end_inset
12205
12206 Appendices Section
12207 \begin_inset Quotes erd
12208 \end_inset
12209
12210  which marks the beginning of the appendices.
12211  This environment should be left blank; it just sends a LaTeX command, but
12212  nothing is really printed.
12213  In LyX, the word 
12214 \begin_inset Quotes eld
12215 \end_inset
12216
12217 Appendix
12218 \begin_inset Quotes erd
12219 \end_inset
12220
12221  is printed with blue letters, as a signal that all sections after that
12222  point are appendices.
12223  To write an appendix, use the 
12224 \begin_inset Quotes eld
12225 \end_inset
12226
12227 Appendix
12228 \begin_inset Quotes erd
12229 \end_inset
12230
12231  environment.
12232  LyX will number each appendix with capital letters, as required by both
12233  journals.
12234  Note that 
12235 \begin_inset Quotes eld
12236 \end_inset
12237
12238 Appendices Section
12239 \begin_inset Quotes erd
12240 \end_inset
12241
12242  
12243 \emph on
12244 must
12245 \emph default
12246  be present before the first appendix; if not, all appendices will be numbered
12247  as normal sections in the output.
12248 \end_layout
12249
12250 \begin_layout Enumerate
12251 The ijmpc and the ijmpd packages use the 
12252 \family typewriter
12253 tbl
12254 \family default
12255  command to implement table captions.
12256  As a result, a table created by LyX is printed correctly, but its caption
12257  is ignored.
12258  However, you can use some TeX code to overcome this problem, so that captions
12259  are printed as expected.
12260  To do so, create a float table as usual, remove the caption, and replace
12261  it with the TeX code 
12262 \family typewriter
12263
12264 \backslash
12265 tbl{
12266 \emph on
12267 your table caption
12268 \emph default
12269 }{
12270 \family default
12271  (sic); you must also the TeX code 
12272 \family typewriter
12273 }
12274 \family default
12275  immediately after the tabular material.
12276  Study the example table included in the template files to see how this
12277  trick is implemented.
12278  Alternatively, If you need table captions, you should implement the whole
12279  table float in a 
12280 \family typewriter
12281 .tex
12282 \family default
12283  file, then include this file to the LyX document (
12284 \family sans
12285 Insert\SpecialChar \menuseparator
12286 File\SpecialChar \menuseparator
12287 Child
12288 \begin_inset space ~
12289 \end_inset
12290
12291 Document
12292 \family default
12293 ).
12294  Details on how to create a table float can be found in the files 
12295 \family typewriter
12296 ws-ijmpc.tex
12297 \family default
12298  and 
12299 \family typewriter
12300 ws-ijmpd.tex
12301 \family default
12302 , included in the corresponding packages.
12303 \end_layout
12304
12305 \begin_layout Subsection
12306 Preparing a paper for submission
12307 \end_layout
12308
12309 \begin_layout Standard
12310 Before you submit your paper you must export the LyX document as a LaTeX
12311  file (
12312 \family sans
12313 File\SpecialChar \menuseparator
12314 Export\SpecialChar \menuseparator
12315 LaTeX
12316 \family default
12317 )
12318 \begin_inset Foot
12319 status open
12320
12321 \begin_layout Plain Layout
12322 Actually you have the choice between LaTeX (plain) and pdflatex.
12323  If you intend to use pdflatex to prepare the paper, you should use the
12324  pdflatex option so that included graphics are converted to PDF format,
12325  ready for use by pdflatex.
12326 \end_layout
12327
12328 \end_inset
12329
12330 , then make the following changes to the resulting 
12331 \family typewriter
12332 .tex
12333 \family default
12334  file.
12335 \end_layout
12336
12337 \begin_layout Enumerate
12338 Remove the comment lines before the 
12339 \family typewriter
12340
12341 \backslash
12342 documentclass
12343 \family default
12344  command.
12345 \end_layout
12346
12347 \begin_layout Enumerate
12348 Remove everything between (and including) the 
12349 \family typewriter
12350
12351 \backslash
12352 makeatletter
12353 \family default
12354  and 
12355 \family typewriter
12356
12357 \backslash
12358 makeatother
12359 \family default
12360  commands, except for any commands you specifically put into the LaTeX preamble.
12361 \end_layout
12362
12363 \begin_layout Standard
12364 The modified 
12365 \family typewriter
12366 .tex
12367 \family default
12368  file should be saved and processed through LaTeX as many times as necessary.
12369  You may also want to check the resulting 
12370 \family typewriter
12371 .dvi
12372 \family default
12373  document.
12374 \end_layout
12375
12376 \begin_layout Subsection
12377 Use of TeX code
12378 \end_layout
12379
12380 \begin_layout Standard
12381 The use of TeX code is reduced to two commands, which must be placed at
12382  the top of the document.
12383  If you started writing your paper by using the 
12384 \family typewriter
12385 ijmpc.lyx
12386 \family default
12387  or the 
12388 \family typewriter
12389 ijmpd.lyx
12390 \family default
12391  template, the TeX code needed is already in its place; you usually don't
12392  need to delete it.
12393  You may only modify the first TeX code to specify the information printed
12394  to the top of odd and even pages (authors' names and short paper's title,
12395  respectively).
12396  This TeX code must have the form 
12397 \family typewriter
12398
12399 \backslash
12400 markboth{Authors' Names}{Short Paper's Title}
12401 \family default
12402 .
12403 \end_layout
12404
12405 \begin_layout Section
12406 iopart
12407 \end_layout
12408
12409 \begin_layout Standard
12410 by 
12411 \noun on
12412 Uwe Stöhr
12413 \end_layout
12414
12415 \begin_layout Subsection
12416 Overview
12417 \end_layout
12418
12419 \begin_layout Standard
12420 The iopart package provides a document class to create electronic manuscript
12421  submission to the journals published by the Institute of Physics.
12422  Instructions for the authors how to create a paper using the iopart class
12423  can be downloaded together with the iopart package from the site 
12424 \begin_inset Flex URL
12425 status collapsed
12426
12427 \begin_layout Plain Layout
12428
12429 ftp://ftp.iop.org/pub/journals/latex2e
12430 \end_layout
12431
12432 \end_inset
12433
12434 .
12435 \end_layout
12436
12437 \begin_layout Subsection
12438 Writing a paper
12439 \end_layout
12440
12441 \begin_layout Standard
12442 The easiest way to write a paper is to start with the file 
12443 \emph on
12444 IOP-article.lyx
12445 \emph default
12446  that is available in LyX's examples files folder.
12447  Open this file, save it under a new name, and start writing.
12448  The example file explains how to use the special text environments.
12449  Here are the most important advices:
12450 \end_layout
12451
12452 \begin_layout Itemize
12453 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12454  two options 
12455 \family sans
12456 Use AMS math package
12457 \family default
12458  in the document settings under 
12459 \family sans
12460 Math Options
12461 \family default
12462  are not used!
12463 \end_layout
12464
12465 \begin_layout Itemize
12466
12467 \size normal
12468 The title environment defines the kind of your paper.
12469  So use one of the following environments for the title:
12470 \end_layout
12471
12472 \begin_deeper
12473 \begin_layout Itemize
12474
12475 \family sans
12476 \size normal
12477 Title
12478 \family default
12479  for a Paper
12480 \end_layout
12481
12482 \begin_layout Itemize
12483
12484 \family sans
12485 \size normal
12486 Review
12487 \family default
12488  for a Review
12489 \end_layout
12490
12491 \begin_layout Itemize
12492
12493 \family sans
12494 \size normal
12495 Topical
12496 \family default
12497  for a Topical review
12498 \end_layout
12499
12500 \begin_layout Itemize
12501
12502 \family sans
12503 \size normal
12504 Comment
12505 \family default
12506  for a Comment
12507 \end_layout
12508
12509 \begin_layout Itemize
12510
12511 \family sans
12512 \size normal
12513 Note
12514 \family default
12515  for a Note
12516 \end_layout
12517
12518 \begin_layout Itemize
12519
12520 \family sans
12521 \size normal
12522 Paper
12523 \family default
12524  for a Paper (same as Title)
12525 \end_layout
12526
12527 \begin_layout Itemize
12528
12529 \family sans
12530 \size normal
12531 Prelim
12532 \family default
12533  for a Preliminary communication
12534 \end_layout
12535
12536 \begin_layout Itemize
12537
12538 \family sans
12539 \size normal
12540 Rapid
12541 \family default
12542  for a Rapid communication
12543 \end_layout
12544
12545 \begin_layout Itemize
12546
12547 \family sans
12548 \size normal
12549 Letter
12550 \family default
12551  for a Letter to the editor
12552 \end_layout
12553
12554 \end_deeper
12555 \begin_layout Itemize
12556
12557 \size normal
12558 All title environments except of 
12559 \family sans
12560 Letter
12561 \family default
12562  can have an optional short title.
12563 \end_layout
12564
12565 \begin_layout Itemize
12566 There is a general title environment 
12567 \family sans
12568 Article
12569 \family default
12570  which is not directly supported by the LyX.
12571  This can be used as TeX code when your document doesn't fit into one of
12572  the other title types.
12573 \end_layout
12574
12575 \begin_layout Standard
12576 For more informations like hints for special table and formula formatting,
12577  look at the IOP author guidelines.
12578 \end_layout
12579
12580 \begin_layout Section
12581 Kluwer
12582 \end_layout
12583
12584 \begin_layout Standard
12585 by 
12586 \noun on
12587 Panayotis Papasotiriou
12588 \end_layout
12589
12590 \begin_layout Subsection
12591 Overview
12592 \end_layout
12593
12594 \begin_layout Standard
12595 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12596  that facilitates electronic manuscript submission to the journals they
12597  publish.
12598  Most known of them (at least in my domain of interest) are 
12599 \emph on
12600 Astrophysics and Space Science
12601 \emph default
12602  and 
12603 \emph on
12604 Solar Physics
12605 \emph default
12606 , but there are many others (see a complete list at 
12607 \begin_inset Flex URL
12608 status open
12609
12610 \begin_layout Plain Layout
12611
12612 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12613 \end_layout
12614
12615 \end_inset
12616
12617 ).
12618  The Kluwer package may be downloaded from the site 
12619 \begin_inset Flex URL
12620 status collapsed
12621
12622 \begin_layout Plain Layout
12623
12624 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12625 \end_layout
12626
12627 \end_inset
12628
12629 .
12630  A complete user guide is contained in that package (but it can also be
12631  downloaded separately).
12632 \end_layout
12633
12634 \begin_layout Standard
12635 LyX supports many features of the package but not everything.
12636  However, the TeX code needed is reduced to some 
12637 \begin_inset Quotes eld
12638 \end_inset
12639
12640 peculiar
12641 \begin_inset Quotes erd
12642 \end_inset
12643
12644  commands of the package (see
12645 \begin_inset space ~
12646 \end_inset
12647
12648
12649 \begin_inset CommandInset ref
12650 LatexCommand ref
12651 reference "subsec:kluwer_peculiarities"
12652
12653 \end_inset
12654
12655 ).
12656  I have recently used LyX to write an article submitted to the 
12657 \emph on
12658 Astrophysics and Space Science
12659 \emph default
12660  without any problem.
12661 \end_layout
12662
12663 \begin_layout Subsection
12664 Writing a paper
12665 \end_layout
12666
12667 \begin_layout Standard
12668 The easiest way to write a paper is to start with the Kluwer template file.
12669  Click on 
12670 \family sans
12671 File\SpecialChar \menuseparator
12672 New from
12673 \family default
12674  
12675 \family sans
12676 Template
12677 \family default
12678 , then choose the 
12679 \family typewriter
12680 kluwer.lyx
12681 \family default
12682  template.
12683  This will give an (almost) empty document that includes the most common
12684  fields found in a manuscript and a short description of their use.
12685  As in most templates, simply overwrite the existing text (including the
12686  brackets, 
12687 \family typewriter
12688 <>
12689 \family default
12690 ) with the correct information.
12691 \end_layout
12692
12693 \begin_layout Subsection
12694 Preparing a paper for submission
12695 \end_layout
12696
12697 \begin_layout Standard
12698 As in the AASTeX package, before you submit your paper to a journal you
12699  must 
12700 \begin_inset Quotes eld
12701 \end_inset
12702
12703 postprocess
12704 \begin_inset Quotes erd
12705 \end_inset
12706
12707  it as follows.
12708 \end_layout
12709
12710 \begin_layout Enumerate
12711 Export your paper as a LaTeX file.
12712  To do this, click on 
12713 \family sans
12714 File\SpecialChar \menuseparator
12715 Export\SpecialChar \menuseparator
12716 LaTeX
12717 \family default
12718 .
12719  
12720 \end_layout
12721
12722 \begin_layout Enumerate
12723 Edit the resulting 
12724 \family typewriter
12725 .tex
12726 \family default
12727  file with a text editor and make the following changes
12728 \end_layout
12729
12730 \begin_deeper
12731 \begin_layout Enumerate
12732 remove the comment lines before the 
12733 \family typewriter
12734
12735 \backslash
12736 documentclass
12737 \family default
12738  command,
12739 \end_layout
12740
12741 \begin_layout Enumerate
12742 remove everything between (and including) the 
12743 \family typewriter
12744
12745 \backslash
12746 makeatletter
12747 \family default
12748  and 
12749 \family typewriter
12750
12751 \backslash
12752 makeatother
12753 \family default
12754  commands, except for any commands you specifically put into the LaTeX preamble.
12755 \end_layout
12756
12757 \begin_layout Standard
12758 Save the resulting 
12759 \family typewriter
12760 .tex
12761 \family default
12762  file.
12763 \end_layout
12764
12765 \end_deeper
12766 \begin_layout Enumerate
12767 Run the 
12768 \family typewriter
12769 .tex
12770 \family default
12771  file through LaTeX as many times as necessary (usually up to three).
12772 \end_layout
12773
12774 \begin_layout Enumerate
12775 View the resulting 
12776 \family typewriter
12777 .dvi
12778 \family default
12779  document using, e.
12780 \begin_inset space \thinspace{}
12781 \end_inset
12782
12783 g.
12784 \begin_inset space \space{}
12785 \end_inset
12786
12787
12788 \family sans
12789 xdvi
12790 \family default
12791 , and check if everything is OK (it should, if you didn't make any mistake).
12792 \end_layout
12793
12794 \begin_layout Subsection
12795 \begin_inset Quotes eld
12796 \end_inset
12797
12798 Peculiarities
12799 \begin_inset Quotes erd
12800 \end_inset
12801
12802  of the Kluwer package
12803 \begin_inset CommandInset label
12804 LatexCommand label
12805 name "subsec:kluwer_peculiarities"
12806
12807 \end_inset
12808
12809
12810 \end_layout
12811
12812 \begin_layout Standard
12813 The Kluwer package has the following 
12814 \begin_inset Quotes eld
12815 \end_inset
12816
12817 peculiarities
12818 \begin_inset Quotes erd
12819 \end_inset
12820
12821 .
12822 \end_layout
12823
12824 \begin_layout Enumerate
12825 It is possible to write multiple articles in the same LaTeX file
12826 \begin_inset Foot
12827 status collapsed
12828
12829 \begin_layout Plain Layout
12830 I can't imagine any good reason to do this.
12831 \end_layout
12832
12833 \end_inset
12834
12835 .
12836  Each article must be included in the environment 
12837 \begin_inset Quotes eld
12838 \end_inset
12839
12840 article
12841 \begin_inset Quotes erd
12842 \end_inset
12843
12844 .
12845  Unfortunately, this environment cannot be omitted, even if you write just
12846  one article.
12847  Therefore, each article starts with the command 
12848 \family typewriter
12849
12850 \backslash
12851 begin{article}
12852 \family default
12853  and, obviously, ends with the command 
12854 \family typewriter
12855
12856 \backslash
12857 end{article}
12858 \family default
12859 .
12860  Although this can be implemented in LyX, I didn't included it, since it
12861  looks ugly and can confuse the novice user.
12862  Therefore, you need to enter them directly and mark them as LaTeX code
12863  (the well-known 
12864 \begin_inset Quotes eld
12865 \end_inset
12866
12867 TeX code
12868 \begin_inset Quotes erd
12869 \end_inset
12870
12871 ).
12872 \end_layout
12873
12874 \begin_layout Enumerate
12875 Information given at the beginning of the article (i.
12876 \begin_inset space \thinspace{}
12877 \end_inset
12878
12879 e.
12880 \begin_inset space \space{}
12881 \end_inset
12882
12883 title, subtitle, author, institution, running title, running author, abstract
12884  and keywords) must be included in an environment called 
12885 \begin_inset Quotes eld
12886 \end_inset
12887
12888 opening
12889 \begin_inset Quotes erd
12890 \end_inset
12891
12892 .
12893  This is not implemented in LyX, so you must enter title, subtitle etc.
12894 \begin_inset space ~
12895 \end_inset
12896
12897 between two TeX code lines (
12898 \family typewriter
12899
12900 \backslash
12901 begin{opening}
12902 \family default
12903  and 
12904 \family typewriter
12905
12906 \backslash
12907 end{opening}
12908 \family default
12909 ).
12910 \end_layout
12911
12912 \begin_layout Enumerate
12913 According to the user manual, the label of each bibliography item must be
12914  written as 
12915 \family typewriter
12916
12917 \backslash
12918 protect
12919 \backslash
12920 citeauthoryear{
12921 \family default
12922 \emph on
12923 author(s)
12924 \family typewriter
12925 \emph default
12926 }{
12927 \family default
12928 \emph on
12929 year
12930 \family typewriter
12931 \emph default
12932 }
12933 \family default
12934 .
12935 \end_layout
12936
12937 \begin_layout Standard
12938 The 
12939 \family typewriter
12940 kluwer.lyx
12941 \family default
12942  template takes care of all these 
12943 \begin_inset Quotes eld
12944 \end_inset
12945
12946 peculiarities
12947 \begin_inset Quotes erd
12948 \end_inset
12949
12950 .
12951  If you start a new paper using this template you don't need to do anything
12952  special.
12953  Just 
12954 \end_layout
12955
12956 \begin_layout Enumerate
12957 don't delete the TeX code included in the template, and
12958 \end_layout
12959
12960 \begin_layout Enumerate
12961 copy the example bibliography item included in the template and modify it
12962  as necessary to enter new bibliography items.
12963 \end_layout
12964
12965 \begin_layout Section
12966 Koma-Script
12967 \end_layout
12968
12969 \begin_layout Standard
12970 by 
12971 \noun on
12972 Bernd Rellermeyer
12973 \end_layout
12974
12975 \begin_layout Subsection
12976 Overview
12977 \end_layout
12978
12979 \begin_layout Standard
12980 The LyX document classes 
12981 \emph on
12982 article (koma-script)
12983 \emph default
12984
12985 \emph on
12986 report (koma-script)
12987 \emph default
12988
12989 \emph on
12990 book
12991 \emph default
12992  
12993 \emph on
12994 (koma-script)
12995 \emph default
12996 , and 
12997 \emph on
12998 letter
12999 \emph default
13000  
13001 \emph on
13002 (koma-script)
13003 \emph default
13004  correspond to the LaTeX document classes 
13005 \family typewriter
13006 scrartcl.cls
13007 \family default
13008
13009 \family typewriter
13010 scrreprt.cls
13011 \family default
13012
13013 \family typewriter
13014 scrbook.cls
13015 \family default
13016 , and 
13017 \family typewriter
13018 scrlettr.cls
13019 \family default
13020 , resp.
13021 \begin_inset space ~
13022 \end_inset
13023
13024 of the Koma-Script family.
13025  They are replacements for the standard document classes 
13026 \family typewriter
13027 article.cls
13028 \family default
13029
13030 \family typewriter
13031 report.cls
13032 \family default
13033
13034 \family typewriter
13035 book.cls
13036 \family default
13037  and 
13038 \family typewriter
13039 letter.cls
13040 \family default
13041 , resp., and fit better to European typography conventions in a number of
13042  points.
13043 \end_layout
13044
13045 \begin_layout Itemize
13046 Standard character size is 11pt in 
13047 \emph on
13048 article (koma-script)
13049 \emph default
13050
13051 \emph on
13052 report (koma-script)
13053 \emph default
13054 , and 
13055 \emph on
13056 book (koma-script)
13057 \emph default
13058 , and 12pt in 
13059 \emph on
13060 letter (koma-script)
13061 \emph default
13062 .
13063 \end_layout
13064
13065 \begin_layout Itemize
13066 Headings, labels of the description environment, and a number of elements
13067  of the 
13068 \emph on
13069 letter (koma-script)
13070 \emph default
13071  document class are set in a bold sans serif font.
13072 \begin_inset Foot
13073 status collapsed
13074
13075 \begin_layout Plain Layout
13076 There is a big difference between the bold sans serif old cm fonts and new
13077  ec fonts, especially in the appearance of headings.
13078  In comparison, the ec bold sans serif fonts look a bit thin.
13079  Here the LaTeX package 
13080 \family typewriter
13081 cmsd.sty by
13082 \family default
13083  
13084 \shape smallcaps
13085 Walter Schmidt
13086 \shape default
13087  helps to produce the 
13088 \begin_inset Quotes eld
13089 \end_inset
13090
13091 usual
13092 \begin_inset Quotes erd
13093 \end_inset
13094
13095  appearance when using the ec fonts.
13096 \end_layout
13097
13098 \end_inset
13099
13100  The numbering of chapter headings is made in the same way as the numbering
13101  of section headings, that is without the extra line 
13102 \begin_inset Quotes eld
13103 \end_inset
13104
13105 Chapter\SpecialChar \ldots{}
13106
13107 \begin_inset Quotes erd
13108 \end_inset
13109
13110 .
13111  In addition, the appearance of the headings can be modified by using a
13112  number of options (in LyX to be entered in the field 
13113 \family sans
13114 Extra
13115 \begin_inset space ~
13116 \end_inset
13117
13118 Options
13119 \family default
13120  of the dialog 
13121 \family sans
13122 Layout\SpecialChar \menuseparator
13123 Document
13124 \family default
13125 ).
13126  
13127 \end_layout
13128
13129 \begin_layout Itemize
13130 The main means in the Koma-Script document classes to design the type area
13131  are the options 
13132 \family sans
13133 BCOR
13134 \family default
13135  and 
13136 \family sans
13137 DIV
13138 \family default
13139  (in LyX to be entered in the extra class options field in the dialog 
13140 \family sans
13141 Document\SpecialChar \menuseparator
13142 Settings
13143 \family default
13144 ).
13145  They make a clearer modification of page margins possible as do the options
13146  of the dialog 
13147 \family sans
13148 Document\SpecialChar \menuseparator
13149 Settings
13150 \family default
13151 .
13152  
13153 \end_layout
13154
13155 \begin_layout Itemize
13156 The LaTeX document classes of the Koma-Script family define a number of
13157  additional commands.
13158  Those part of it which makes sense in LyX is implemented in corresponding
13159  paragraph types.
13160 \end_layout
13161
13162 \begin_layout Standard
13163 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13164  can be found in the Koma-Script documentation 
13165 \emph on
13166 scrguide
13167 \emph default
13168  (German) and 
13169 \emph on
13170 scrguien
13171 \emph default
13172  (English).
13173 \end_layout
13174
13175 \begin_layout Subsection
13176 article (koma-script), report (koma-script), and book (koma-script)
13177 \end_layout
13178
13179 \begin_layout Standard
13180 The document classes 
13181 \emph on
13182 article (koma-script)
13183 \emph default
13184
13185 \emph on
13186 report (koma-script)
13187 \emph default
13188 , and 
13189 \emph on
13190 book
13191 \emph default
13192  
13193 \emph on
13194 (koma-script)
13195 \emph default
13196  are implemented in the layout files 
13197 \family typewriter
13198 scrartcl.layout
13199 \family default
13200
13201 \family typewriter
13202 scrreprt.layout
13203 \family default
13204 , and 
13205 \family typewriter
13206 scrbook.layout
13207 \family default
13208 , resp.
13209  They contain all the paragraph types of the corresponding standard document
13210  classes 
13211 \emph on
13212 article
13213 \emph default
13214
13215 \emph on
13216 report
13217 \emph default
13218 , and 
13219 \emph on
13220 book
13221 \emph default
13222 , resp., partly modified, with the exception of the LyX specific 
13223 \family sans
13224 List
13225 \family default
13226 -type, which is replaced by the new 
13227 \family sans
13228 Labeling
13229 \family default
13230 -type having the same functionality.
13231  Beside the 
13232 \family sans
13233 Labeling
13234 \family default
13235 -Type there is a number of new paragraph types added.
13236  They are 
13237 \emph on
13238 not
13239 \emph default
13240  part of 
13241 \emph on
13242 letter (koma-script)
13243 \emph default
13244 .
13245 \end_layout
13246
13247 \begin_layout Itemize
13248
13249 \family sans
13250 Addpart, Addchap
13251 \family default
13252
13253 \family sans
13254 Addsec
13255 \family default
13256 : are equivalents to 
13257 \family sans
13258 Part*, Chapter*
13259 \family default
13260  and 
13261 \family sans
13262 Section*
13263 \family default
13264 , resp., additionally inserting an entry in the table of contents.
13265  
13266 \family sans
13267 Addpart
13268 \family default
13269  and 
13270 \family sans
13271 Addchap
13272 \family default
13273  are not contained in 
13274 \emph on
13275 article (koma-script)
13276 \emph default
13277 .
13278 \end_layout
13279
13280 \begin_layout Itemize
13281
13282 \family sans
13283 Addchap*
13284 \family default
13285
13286 \family sans
13287 Addsec*
13288 \family default
13289 : behave exactly as 
13290 \family sans
13291 Addchap
13292 \family default
13293  and 
13294 \family sans
13295 Addsec
13296 \family default
13297 , resp., additionally clearing running heads.
13298  
13299 \family sans
13300 Addchap*
13301 \family default
13302  is not contained in 
13303 \emph on
13304 article (koma-script)
13305 \emph default
13306 .
13307 \begin_inset Foot
13308 status collapsed
13309
13310 \begin_layout Plain Layout
13311 There is also an 
13312 \family typewriter
13313
13314 \backslash
13315 addpart*
13316 \family default
13317  command in 
13318 \emph on
13319 book (koma-script)
13320 \emph default
13321  and in 
13322 \emph on
13323 report (koma-script)
13324 \emph default
13325 , but since this is identical to 
13326 \family sans
13327 Part*
13328 \family default
13329 , is has not been implemented in LyX.
13330 \end_layout
13331
13332 \end_inset
13333
13334
13335 \end_layout
13336
13337 \begin_layout Itemize
13338
13339 \family sans
13340 Minisec
13341 \family default
13342 : generates a heading directly above the following paragraph in the standard
13343  character size without affecting the structure of the document.
13344 \end_layout
13345
13346 \begin_layout Itemize
13347
13348 \family sans
13349 Captionabove
13350 \family default
13351  and 
13352 \family sans
13353 Captionbelow
13354 \family default
13355  are special captions which respect the different space settings needed
13356  for captions placed above or below an element (if you follow strict typographic
13357  rules, you might want to place table captions always above the table).
13358  You can also use the class option 
13359 \family typewriter
13360 tablecaptionsabove
13361 \family default
13362 , which will switch 
13363 \family sans
13364 caption
13365 \family default
13366  to 
13367 \family sans
13368 captionabove
13369 \family default
13370  for tables and 
13371 \family sans
13372 captionbelow
13373 \family default
13374  for figures.
13375  You need at least Koma-Script version 2.8q to use this.
13376 \end_layout
13377
13378 \begin_layout Itemize
13379
13380 \family sans
13381 Dictum
13382 \family default
13383 : can be used to set a bonmot, e.
13384 \begin_inset space \thinspace{}
13385 \end_inset
13386
13387 g.
13388 \begin_inset space \space{}
13389 \end_inset
13390
13391 at the beginning of a chapter.
13392  If you use the optional argument (
13393 \family sans
13394 Insert\SpecialChar \menuseparator
13395 Short
13396 \begin_inset space ~
13397 \end_inset
13398
13399 Title
13400 \family default
13401 ), you can insert the dictum's author there.
13402  Dictum and author are separated by a line.
13403  You need at least Koma-Script version 2.8q to use this.
13404  
13405 \family sans
13406 Dictum
13407 \family default
13408  is not contained in 
13409 \emph on
13410 article (koma-script)
13411 \emph default
13412 .
13413 \end_layout
13414
13415 \begin_layout Standard
13416 The following types, together with the standard types 
13417 \family sans
13418 Title
13419 \family default
13420
13421 \family sans
13422 Author
13423 \family default
13424 , and 
13425 \family sans
13426 Date
13427 \family default
13428 , form the title area of the document.
13429  They must be entered ahead of the first 
13430 \begin_inset Quotes eld
13431 \end_inset
13432
13433 ordinary
13434 \begin_inset Quotes erd
13435 \end_inset
13436
13437  paragraph.
13438 \begin_inset Foot
13439 status collapsed
13440
13441 \begin_layout Plain Layout
13442 The corresponding LaTeX commands must appear before the 
13443 \family typewriter
13444
13445 \backslash
13446 maketitle
13447 \family default
13448  command.
13449 \end_layout
13450
13451 \end_inset
13452
13453  When such a type is used more than once, the latter usage overwrites the
13454  former one, that means, for every type only the latest usage is valid.
13455  The order of the different types however has, like 
13456 \family sans
13457 Title
13458 \family default
13459
13460 \family sans
13461 Author
13462 \family default
13463 , and 
13464 \family sans
13465 Date
13466 \family default
13467 , no effect on the appearance of the produced document.
13468 \end_layout
13469
13470 \begin_layout Itemize
13471
13472 \family sans
13473 Subject
13474 \family default
13475 : produces a centered paragraph above the ordinary title (
13476 \family sans
13477 Title
13478 \family default
13479
13480 \family sans
13481 Author
13482 \family default
13483
13484 \family sans
13485 Date
13486 \family default
13487 ) for the subject of the document.
13488 \end_layout
13489
13490 \begin_layout Itemize
13491
13492 \family sans
13493 Publishers
13494 \family default
13495 : produces a centered paragraph below the ordinary title (
13496 \family sans
13497 Title
13498 \family default
13499
13500 \family sans
13501 Author
13502 \family default
13503
13504 \family sans
13505 Date
13506 \family default
13507 ) for the publishers' name.
13508 \end_layout
13509
13510 \begin_layout Itemize
13511
13512 \family sans
13513 Dedication
13514 \family default
13515 : in 
13516 \emph on
13517 report (koma-script)
13518 \emph default
13519  and 
13520 \emph on
13521 book (koma-script)
13522 \emph default
13523  produces a centered paragraph on its own page behind the title page, or
13524  in 
13525 \emph on
13526 article (koma-script)
13527 \emph default
13528  produces a centered paragraph below the ordinary title (
13529 \family sans
13530 Title
13531 \family default
13532
13533 \family sans
13534 Author
13535 \family default
13536
13537 \family sans
13538 Date
13539 \family default
13540
13541 \family sans
13542 Publishers
13543 \family default
13544 ) for a dedication.
13545 \end_layout
13546
13547 \begin_layout Itemize
13548
13549 \family sans
13550 Titlehead
13551 \family default
13552 : produces a left aligned paragraph above the ordinary title (
13553 \family sans
13554 Title
13555 \family default
13556
13557 \family sans
13558 Author
13559 \family default
13560
13561 \family sans
13562 Date
13563 \family default
13564
13565 \family sans
13566 Subject
13567 \family default
13568 ) for a document`s head.
13569 \end_layout
13570
13571 \begin_layout Itemize
13572
13573 \family sans
13574 Uppertitleback
13575 \family default
13576 : produces in a double-sided print in 
13577 \emph on
13578 report (koma-script)
13579 \emph default
13580  and 
13581 \emph on
13582 book (koma-script)
13583 \emph default
13584  a left-aligned paragraph at the top of the title page`s back or has no
13585  effect in a single-sided print or in 
13586 \emph on
13587 article (koma-script)
13588 \emph default
13589 .
13590 \end_layout
13591
13592 \begin_layout Itemize
13593
13594 \family sans
13595 Lowertitleback
13596 \family default
13597 : produces in a double-sided print in 
13598 \emph on
13599 report (koma-script)
13600 \emph default
13601  and 
13602 \emph on
13603 book (koma-script)
13604 \emph default
13605  a left-aligned paragraph at the bottom of the title page`s back or has
13606  no effect in a single-sided print or in 
13607 \emph on
13608 article (koma-script)
13609 \emph default
13610 .
13611 \end_layout
13612
13613 \begin_layout Itemize
13614
13615 \family sans
13616 Extratitle
13617 \family default
13618 : produces a special 
13619 \begin_inset Quotes eld
13620 \end_inset
13621
13622 dirty
13623 \begin_inset Quotes erd
13624 \end_inset
13625
13626  page ahead of the actual document containing a paragraph without special
13627  formatting.
13628 \end_layout
13629
13630 \begin_layout Standard
13631 The layout files for the document classes 
13632 \emph on
13633 article (koma-script)
13634 \emph default
13635
13636 \emph on
13637 report (koma-script)
13638 \emph default
13639 , and 
13640 \emph on
13641 book (koma-script)
13642 \emph default
13643  do include the file 
13644 \family typewriter
13645 scrmacros.inc
13646 \family default
13647 .
13648  This is thought of as a place to define your own types.
13649  Copy scrmacros
13650 \family typewriter
13651 .inc
13652 \family default
13653  in your personal layout directory and edit the file!
13654 \end_layout
13655
13656 \begin_layout Subsection
13657 letter (koma-script)
13658 \end_layout
13659
13660 \begin_layout Standard
13661 \noindent
13662 The document class 
13663 \emph on
13664 letter (koma-script)
13665 \emph default
13666  is implemented in the layout file 
13667 \family typewriter
13668 scrlettr.layout
13669 \family default
13670 .
13671  It contains all the paragraph types of the corresponding standard document
13672  class 
13673 \emph on
13674 letter
13675 \emph default
13676 , partly modified, with the exception of the LyX specific types 
13677 \family sans
13678 LyX-Code
13679 \family default
13680  and 
13681 \family sans
13682 Comment
13683 \family default
13684  and the 
13685 \family sans
13686 List
13687 \family default
13688  type, which is replaced by the new 
13689 \family sans
13690 Labeling
13691 \family default
13692  type.
13693  In addition, it contains, in contrast to the standard document class, the
13694  standard types 
13695 \family sans
13696 LaTeX
13697 \family default
13698
13699 \family sans
13700 Quotation
13701 \family default
13702
13703 \family sans
13704 Quote
13705 \family default
13706 , and 
13707 \family sans
13708 Verse
13709 \family default
13710 .
13711  Furthermore, there are a number of new letter specific types.
13712 \end_layout
13713
13714 \begin_layout Standard
13715 The appearance of the letter produced by this document class can be controlled
13716  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13717 \begin_inset Foot
13718 status collapsed
13719
13720 \begin_layout Plain Layout
13721 For example, the standard appearance of the letter`s heading, consisting
13722  of name and address, is quite self-willed.
13723  An 
13724 \begin_inset Quotes eld
13725 \end_inset
13726
13727 ordinary
13728 \begin_inset Quotes erd
13729 \end_inset
13730
13731  heading is produced by the following LaTeX commands in the preamble:
13732 \end_layout
13733
13734 \begin_layout LyX-Code
13735
13736 \backslash
13737 firsthead{
13738 \backslash
13739 parbox[b]{
13740 \backslash
13741 textwidth}
13742 \end_layout
13743
13744 \begin_layout LyX-Code
13745   {
13746 \backslash
13747 ignorespaces 
13748 \backslash
13749 fromname
13750 \backslash
13751
13752 \backslash
13753  
13754 \backslash
13755 ignorespaces 
13756 \backslash
13757 fromaddress}} 
13758 \end_layout
13759
13760 \begin_layout LyX-Code
13761
13762 \backslash
13763 nexthead{
13764 \backslash
13765 parbox[b]{
13766 \backslash
13767 textwidth}
13768 \end_layout
13769
13770 \begin_layout LyX-Code
13771   {
13772 \backslash
13773 ignorespaces 
13774 \backslash
13775 fromname 
13776 \backslash
13777 hfill 
13778 \backslash
13779 ignorespaces 
13780 \backslash
13781 pagename
13782 \backslash
13783  
13784 \backslash
13785 thepage}}
13786 \end_layout
13787
13788 \end_inset
13789
13790  A detailed German description of such LaTeX commands can be found in the
13791  Koma-Script documentation 
13792 \emph on
13793 scrguide
13794 \emph default
13795 .
13796  With it, the letter's author can produce his personal letter layout.
13797 \end_layout
13798
13799 \begin_layout Standard
13800 The types 
13801 \family sans
13802 Letter
13803 \family default
13804  and 
13805 \family sans
13806 Opening
13807 \family default
13808  define the beginning of the letter and must be used in every letter.
13809  To emphasize them in the LyX document class, they are marked with the letter
13810  
13811 \shape italic
13812 L
13813 \shape default
13814  or 
13815 \shape italic
13816 O
13817 \shape default
13818 , resp.
13819 \begin_inset space ~
13820 \end_inset
13821
13822 in the left margin.
13823  It is possible to write any number of letters in one file.
13824  An 
13825 \family sans
13826 Opening
13827 \family default
13828  type produces a new letter using the same addressee and a 
13829 \family sans
13830 Letter
13831 \family default
13832  type produces a new addressee.
13833  The types 
13834 \family sans
13835 Closing
13836 \family default
13837
13838 \family sans
13839 PS
13840 \family default
13841
13842 \family sans
13843 CC
13844 \family default
13845 , and 
13846 \family sans
13847 Encl
13848 \family default
13849  are ordinary paragraph types and can also be used several times in one
13850  and the same letter.
13851 \end_layout
13852
13853 \begin_layout Itemize
13854
13855 \family sans
13856 Letter
13857 \family default
13858 : produces a paragraph for the addressee and implicitly defines the beginning
13859  of the letter.
13860 \end_layout
13861
13862 \begin_layout Itemize
13863
13864 \family sans
13865 Opening
13866 \family default
13867 : produces a paragraph for the form of address and implicitly produces a
13868  new letter.
13869 \end_layout
13870
13871 \begin_layout Itemize
13872
13873 \family sans
13874 Closing
13875 \family default
13876 : produces a paragraph for a close.
13877 \end_layout
13878
13879 \begin_layout Itemize
13880
13881 \family sans
13882 PS
13883 \family default
13884 : produces a paragraph for a postscript.
13885 \end_layout
13886
13887 \begin_layout Itemize
13888
13889 \family sans
13890 CC
13891 \family default
13892 : produces a paragraph for a distribution list.
13893 \end_layout
13894
13895 \begin_layout Itemize
13896
13897 \family sans
13898 Encl
13899 \family default
13900 : produces a paragraph for enclosures.
13901 \end_layout
13902
13903 \begin_layout Standard
13904 The types 
13905 \family sans
13906 Name
13907 \family default
13908
13909 \family sans
13910 Signature
13911 \family default
13912
13913 \family sans
13914 Address
13915 \family default
13916
13917 \family sans
13918 Telephone
13919 \family default
13920
13921 \family sans
13922 Place
13923 \family default
13924
13925 \family sans
13926 Backaddress
13927 \family default
13928
13929 \family sans
13930 Specialmail
13931 \family default
13932
13933 \family sans
13934 Location
13935 \family default
13936
13937 \family sans
13938 Title
13939 \family default
13940 , and 
13941 \family sans
13942 Subject
13943 \family default
13944  are input types provided with a label to enter information, which will
13945  be processed by the document class.
13946 \begin_inset Foot
13947 status open
13948
13949 \begin_layout Plain Layout
13950 It could be seen as a matter of inconsequence, that the types 
13951 \family sans
13952 Letter
13953 \family default
13954  and 
13955 \family sans
13956 Opening
13957 \family default
13958  described above are not such input types as well.
13959  Because of the special meaning of those types, however, I have implemented
13960  them as ordinary paragraph types with a one letter mark in the left margin.
13961  Moreover, it would affect my feeling of symmetry, if the 
13962 \family sans
13963 Opening
13964 \family default
13965  type and the 
13966 \family sans
13967 Closing
13968 \family default
13969  type had such a serious different appearance.
13970 \end_layout
13971
13972 \end_inset
13973
13974  The types must be used ahead of the corresponding 
13975 \family sans
13976 Opening
13977 \family default
13978  type.
13979 \end_layout
13980
13981 \begin_layout Standard
13982 An implementation of these types in a WYSIWYG fashion does not seem to make
13983  sense, because the real appearance of the produced letter does not only
13984  depend on the usage of the particular type, but also on other factors.
13985  For example, a signature entered in the 
13986 \family sans
13987 Signature
13988 \family default
13989  type will in the standard behavior appear in the produced letter only,
13990  when in the same letter also a 
13991 \family sans
13992 Closing
13993 \family default
13994  type is used.
13995  The entered value of the 
13996 \family sans
13997 Telephone
13998 \family default
13999  type will in the standard behavior not appear in the produced letter at
14000  all.
14001  The possibility to design the letter`s heading freely is already indicated
14002  in a footnote above.
14003 \end_layout
14004
14005 \begin_layout Standard
14006 The input types can also be used as empty paragraphs.
14007  This makes sense e.
14008 \begin_inset space \thinspace{}
14009 \end_inset
14010
14011 g.
14012 \begin_inset space \space{}
14013 \end_inset
14014
14015 for the 
14016 \family sans
14017 Signature
14018 \family default
14019  type.
14020  If the 
14021 \family sans
14022 Signature
14023 \family default
14024  type is not used at all, in the standard behavior the value of the 
14025 \family sans
14026 Name
14027 \family default
14028  type is used as signature, whereas if an empty 
14029 \family sans
14030 Signature
14031 \family default
14032  type is used, no signature value is defined.
14033 \end_layout
14034
14035 \begin_layout Standard
14036 By using the input types it is possible to write a letter template, containing
14037  filled input types with your personal dates (name, address, etc.) and empty
14038  input types for other dates you want to enter.
14039 \end_layout
14040
14041 \begin_layout Itemize
14042
14043 \family sans
14044 Name
14045 \family default
14046 : sender's name, in the standard behavior appears as a centered paragraph
14047  in small caps in the letter`s heading.
14048 \end_layout
14049
14050 \begin_layout Itemize
14051
14052 \family sans
14053 Signature
14054 \family default
14055 : sender's signature, in the standard behavior appears below the 
14056 \family sans
14057 Closing
14058 \family default
14059  type.
14060  If no 
14061 \family sans
14062 Signature
14063 \family default
14064  type is used, the value of the 
14065 \family sans
14066 Name
14067 \family default
14068  type appears instead.
14069 \end_layout
14070
14071 \begin_layout Itemize
14072
14073 \family sans
14074 Address
14075 \family default
14076 : sender's address, in the standard behavior appears in a centered paragraph
14077  in the letter`s heading below the sender's name.
14078 \end_layout
14079
14080 \begin_layout Itemize
14081
14082 \family sans
14083 Telephone
14084 \family default
14085 : sender's telephone number, in the standard behavior only sets the LaTeX
14086  variable 
14087 \family typewriter
14088
14089 \backslash
14090 telephonenum
14091 \family default
14092 .
14093 \end_layout
14094
14095 \begin_layout Itemize
14096
14097 \family sans
14098 Place
14099 \family default
14100 : place of the letter`s making.
14101 \end_layout
14102
14103 \begin_layout Itemize
14104
14105 \family sans
14106 Date
14107 \family default
14108 : date of the letter`s making.
14109  
14110 \family sans
14111 Place
14112 \family default
14113  and 
14114 \family sans
14115 Date
14116 \family default
14117 , in the standard behavior, produce the place and the date in a right-aligned
14118  line below the addressee's field.
14119  If an empty 
14120 \family sans
14121 Date
14122 \family default
14123  type is used, neither place nor date appear, independent of the value of
14124  the 
14125 \family sans
14126 Place
14127 \family default
14128  type.
14129  If no 
14130 \family sans
14131 Date
14132 \family default
14133  type is used, the date of the letter `s production is used.
14134 \end_layout
14135
14136 \begin_layout Itemize
14137
14138 \family sans
14139 Backaddress
14140 \family default
14141 : sender`s back address, in the standard behavior appears above the addressee's
14142  field in a small sans serif font.
14143 \end_layout
14144
14145 \begin_layout Itemize
14146
14147 \family sans
14148 Specialmail
14149 \family default
14150 : special mail information, in the standard behavior appears underlined
14151  above the addressee's field below the back address.
14152 \end_layout
14153
14154 \begin_layout Itemize
14155
14156 \family sans
14157 Location
14158 \family default
14159 : additional information, in the standard behavior appears on right side
14160  below the addressee`s field.
14161 \end_layout
14162
14163 \begin_layout Itemize
14164
14165 \family sans
14166 Title
14167 \family default
14168 : the letter's title, in the standard behavior appears in a big, bold, sans
14169  serif font above the subject.
14170 \end_layout
14171
14172 \begin_layout Itemize
14173
14174 \family sans
14175 Subject
14176 \family default
14177 : the letter's subject, in the standard behavior appears in a bold font
14178  above the 
14179 \family sans
14180 Opening
14181 \family default
14182  paragraph.
14183 \end_layout
14184
14185 \begin_layout Standard
14186 The types 
14187 \family sans
14188 Yourref
14189 \family default
14190
14191 \family sans
14192 Yourmail
14193 \family default
14194
14195 \family sans
14196 Myref
14197 \family default
14198
14199 \family sans
14200 Customer
14201 \family default
14202 , and 
14203 \family sans
14204 Invoice
14205 \family default
14206  produce a business letter like line above the 
14207 \family sans
14208 Title
14209 \family default
14210  line containing the fields 
14211 \begin_inset Quotes eld
14212 \end_inset
14213
14214 Your ref.
14215 \begin_inset Quotes erd
14216 \end_inset
14217
14218
14219 \begin_inset Quotes eld
14220 \end_inset
14221
14222 Your letter of
14223 \begin_inset Quotes erd
14224 \end_inset
14225
14226
14227 \begin_inset Quotes eld
14228 \end_inset
14229
14230 Our ref.
14231 \begin_inset Quotes erd
14232 \end_inset
14233
14234
14235 \begin_inset Quotes eld
14236 \end_inset
14237
14238 Customer no.
14239 \begin_inset Quotes erd
14240 \end_inset
14241
14242
14243 \begin_inset Quotes eld
14244 \end_inset
14245
14246 Invoice no.
14247 \begin_inset Quotes erd
14248 \end_inset
14249
14250 , and 
14251 \begin_inset Quotes eld
14252 \end_inset
14253
14254 Date
14255 \begin_inset Quotes erd
14256 \end_inset
14257
14258 .
14259  For the date field, the value of the 
14260 \family sans
14261 Date
14262 \family default
14263  type is used.
14264  If one of these 
14265 \begin_inset Quotes eld
14266 \end_inset
14267
14268 business letter types
14269 \begin_inset Quotes erd
14270 \end_inset
14271
14272  is used, the value of the 
14273 \family sans
14274 Place
14275 \family default
14276  type however does not appear, but only the LaTeX variable 
14277 \family typewriter
14278
14279 \backslash
14280 fromplace
14281 \family default
14282  is set.
14283  The ordinary output of place and date in a right-aligned line below the
14284  addressee`s field is suppressed.
14285  The types are implemented as input types provided with a label and must
14286  be used ahead of the corresponding 
14287 \family sans
14288 Opening
14289 \family default
14290  type.
14291 \end_layout
14292
14293 \begin_layout Itemize
14294
14295 \family sans
14296 Yourref
14297 \family default
14298 : Your ref.
14299 \end_layout
14300
14301 \begin_layout Itemize
14302
14303 \family sans
14304 Yourmail
14305 \family default
14306 : Your letter of.
14307 \end_layout
14308
14309 \begin_layout Itemize
14310
14311 \family sans
14312 Myref
14313 \family default
14314 : Our ref.
14315 \end_layout
14316
14317 \begin_layout Itemize
14318
14319 \family sans
14320 Customer
14321 \family default
14322 : Customer no.
14323 \end_layout
14324
14325 \begin_layout Itemize
14326
14327 \family sans
14328 Invoice
14329 \family default
14330 : Invoice no.
14331 \end_layout
14332
14333 \begin_layout Subsection
14334 The new letter class: letter (koma-script v.2)
14335 \end_layout
14336
14337 \begin_layout Standard
14338 by 
14339 \noun on
14340 Jürgen Spitzmüller
14341 \end_layout
14342
14343 \begin_layout Standard
14344 \begin_inset VSpace medskip
14345 \end_inset
14346
14347
14348 \end_layout
14349
14350 \begin_layout Standard
14351 \noindent
14352 Koma-Script version 2.8 has introduced a new letter class 
14353 \family typewriter
14354 scrlttr2
14355 \family default
14356  which supersedes the now unsupported 
14357 \family typewriter
14358 scrlettr
14359 \family default
14360 .
14361  It has — on the LaTeX side — a completely new interface and is not compatible
14362  with the old class.
14363  Therefore, LyX supports both, though it is recommended you use the new
14364  class.
14365 \end_layout
14366
14367 \begin_layout Standard
14368 This class covers the same functionality as 
14369 \emph on
14370 letter (koma-script),
14371 \emph default
14372  and a few more.
14373  The basic items are 
14374 \family sans
14375 Address
14376 \family default
14377  (receiver's address, same as 
14378 \family sans
14379 Letter
14380 \family default
14381  in the old layout), 
14382 \family sans
14383 Opening
14384 \family default
14385 , and 
14386 \family sans
14387 Closing
14388 \family default
14389 .
14390  
14391 \family sans
14392 NextAddress
14393 \family default
14394  will start a new letter (i.
14395 \begin_inset space \thinspace{}
14396 \end_inset
14397
14398 e.
14399 \begin_inset space \space{}
14400 \end_inset
14401
14402 you can write several letters per document).
14403  New elements are sender's 
14404 \family sans
14405 E-Mail
14406 \family default
14407
14408 \family sans
14409 URL
14410 \family default
14411
14412 \family sans
14413 Fax
14414 \family default
14415
14416 \family sans
14417 Bank
14418 \family default
14419  and the possibility to use a 
14420 \family sans
14421 Logo
14422 \family default
14423  (via 
14424 \family sans
14425 Insert\SpecialChar \menuseparator
14426 Graphics
14427 \family default
14428 ) in the header.
14429 \end_layout
14430
14431 \begin_layout Standard
14432 The biggest improvement is, though, that the letter's layout is configurable
14433  to meet almost any needs.
14434  This can be done via the preamble or with a special style file (Letter
14435  Class Option, extension 
14436 \family typewriter
14437 *.lco
14438 \family default
14439 ), that will be read in as a class option.
14440 \begin_inset Foot
14441 status collapsed
14442
14443 \begin_layout Plain Layout
14444 The KOMA package comes with some default 
14445 \family typewriter
14446 *.lco
14447 \family default
14448  files.
14449  There is, for instance, a 
14450 \family typewriter
14451 DIN.lco
14452 \family default
14453  file that follows german typesetting rules, or a 
14454 \family typewriter
14455 KOMAold.lco
14456 \family default
14457  that provides the default layout of the old 
14458 \family typewriter
14459 scrlettr
14460 \family default
14461  class.
14462  The latter can be loaded with the class option 
14463 \family typewriter
14464 KOMAold
14465 \family default
14466 , inserted via the 
14467 \family sans
14468 \bar under
14469 L
14470 \bar default
14471 ayout\SpecialChar \menuseparator
14472
14473 \bar under
14474 D
14475 \bar default
14476 ocument\SpecialChar \menuseparator
14477 Extra Options
14478 \family default
14479  field.
14480 \end_layout
14481
14482 \end_inset
14483
14484  Have a look at the 
14485 \emph on
14486 koma-letter2
14487 \emph default
14488  template that is included in LyX for examples.
14489  A detailed description is to be found in the Koma-Script documentation
14490  (
14491 \emph on
14492 scrguide
14493 \emph default
14494 ).
14495 \end_layout
14496
14497 \begin_layout Subsection
14498 Problems
14499 \end_layout
14500
14501 \begin_layout Standard
14502 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14503  some problems.
14504 \end_layout
14505
14506 \begin_layout Itemize
14507 The chapter number of a 
14508 \family sans
14509 Chapter
14510 \family default
14511  type appears on a line of its own above the chapter heading instead of
14512  appearing in the same line ahead of it.
14513  The cause for that is the LyX internal behavior for the labeltype 
14514 \family sans
14515 Counter_Chapter
14516 \family default
14517  in the layout file.
14518 \end_layout
14519
14520 \begin_layout Itemize
14521 The headings of the types 
14522 \family sans
14523 Addchap
14524 \family default
14525  and 
14526 \family sans
14527 Addsec
14528 \family default
14529  are only put in the 
14530 \begin_inset Quotes eld
14531 \end_inset
14532
14533 true
14534 \begin_inset Quotes erd
14535 \end_inset
14536
14537  LaTeX table of contents, but not in the LyX table of contents (
14538 \family sans
14539 Document\SpecialChar \menuseparator
14540 Table
14541 \begin_inset space ~
14542 \end_inset
14543
14544 of
14545 \begin_inset space ~
14546 \end_inset
14547
14548 Contents
14549 \family default
14550 ).
14551 \end_layout
14552
14553 \begin_layout Itemize
14554 The paragraphs in a 
14555 \emph on
14556 letter
14557 \emph default
14558  document class appear in a skip separation mode, not indented.
14559  This is the standard behavior, no special LaTeX commands are needed for
14560  that.
14561  But in the 
14562 \family sans
14563 Document\SpecialChar \menuseparator
14564 Settings
14565 \family default
14566  dialog the corresponding radio button indicates 
14567 \family sans
14568 Indent
14569 \family default
14570 .
14571  A 
14572 \family sans
14573 Skip
14574 \family default
14575  value always has the effect that extra LaTeX commands are inserted in the
14576  document to produce the gap, which is not what is wanted in this case.
14577 \end_layout
14578
14579 \begin_layout Section
14580 Memoir
14581 \end_layout
14582
14583 \begin_layout Standard
14584 By 
14585 \noun on
14586 Jürgen Spitzmüller
14587 \end_layout
14588
14589 \begin_layout Subsection
14590 Overview
14591 \end_layout
14592
14593 \begin_layout Standard
14594 Memoir is a very powerful and constantly evolving class.
14595  It has been designed with regard to fictional and non-fictional literature.
14596  Its aim is to let the user have maximum control over the typesetting of
14597  his document.
14598  Memoir is based on the standard book class, but it can also emulate the
14599  article class (see below).
14600 \end_layout
14601
14602 \begin_layout Standard
14603 Peter Wilson, the developer of Memoir, is known as the author of lots of
14604  useful packages in the LaTeX world.
14605  Most of them have been merged with Memoir.
14606  Therefore, it is much easier to layout the table of contents, appendices,
14607  chapter designs and such.
14608  LyX, though, does not support all of these goodies natively.
14609  Some of them might be added to forthcoming releases
14610 \begin_inset Foot
14611 status collapsed
14612
14613 \begin_layout Plain Layout
14614 You are invited to send suggestions to 
14615 \begin_inset Flex URL
14616 status collapsed
14617
14618 \begin_layout Plain Layout
14619
14620 lyx-devel@lists.lyx.org
14621 \end_layout
14622
14623 \end_inset
14624
14625 .
14626 \end_layout
14627
14628 \end_inset
14629
14630 , lots will probably never be supported, due to the limitations of LyX's
14631  framework.
14632  Of course you can still use all features with the help of some native LaTeX
14633  commands (TeX code
14634 \begin_inset Foot
14635 status collapsed
14636
14637 \begin_layout Plain Layout
14638 Cf.
14639 \begin_inset ERT
14640 status collapsed
14641
14642 \begin_layout Plain Layout
14643
14644
14645 \backslash
14646  
14647 \end_layout
14648
14649 \end_inset
14650
14651 section
14652 \begin_inset space ~
14653 \end_inset
14654
14655
14656 \begin_inset CommandInset ref
14657 LatexCommand ref
14658 reference "sec:Inserting-TeX-Code"
14659
14660 \end_inset
14661
14662  for details.
14663 \end_layout
14664
14665 \end_inset
14666
14667 ).
14668  In this section, we can only list those features that are natively supported
14669  by LyX.
14670  For detailed descriptions (and for the rest of features) we recommend you
14671  have a look at the detailed manual of the Memoir class
14672 \begin_inset Foot
14673 status collapsed
14674
14675 \begin_layout Plain Layout
14676 Cf.
14677 \begin_inset ERT
14678 status collapsed
14679
14680 \begin_layout Plain Layout
14681
14682
14683 \backslash
14684  
14685 \end_layout
14686
14687 \end_inset
14688
14689
14690 \begin_inset Flex URL
14691 status collapsed
14692
14693 \begin_layout Plain Layout
14694
14695 CTAN:/macros/latex/memoir/memman.pdf
14696 \end_layout
14697
14698 \end_inset
14699
14700 .
14701 \end_layout
14702
14703 \end_inset
14704
14705 , which is not only a user guide for the class, but also both a comprehensive
14706  description on good typesetting and a superb example for good typesetting
14707  itself.
14708 \end_layout
14709
14710 \begin_layout Subsection
14711 Basic features and restrictions
14712 \end_layout
14713
14714 \begin_layout Standard
14715 Memoir supports basically all features of the standard book classes.
14716  There are, however, some differences, as follows:
14717 \end_layout
14718
14719 \begin_layout Description
14720 Font
14721 \begin_inset space ~
14722 \end_inset
14723
14724 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14725 \end_layout
14726
14727 \begin_layout Description
14728 Page
14729 \begin_inset space ~
14730 \end_inset
14731
14732 style: The fancy page style is not supported, due to a command clash between
14733  Memoir and the fancyhdr package (they both define a command with the same
14734  name, which confuses LaTeX).
14735  Instead, Memoir comes with a number of its own page styles (see 
14736 \family sans
14737 Layout\SpecialChar \menuseparator
14738 Document\SpecialChar \menuseparator
14739 Page
14740 \begin_inset space ~
14741 \end_inset
14742
14743 Style
14744 \family default
14745 ).
14746  If you want to use these for the chapter pages, you have to use the command
14747  
14748 \family typewriter
14749
14750 \backslash
14751 chapterstyle
14752 \family default
14753  in the main text or in preamble (e.
14754 \begin_inset space \thinspace{}
14755 \end_inset
14756
14757 g.
14758 \begin_inset space \space{}
14759 \end_inset
14760
14761
14762 \family typewriter
14763
14764 \backslash
14765 chapterstyle{companion}
14766 \family default
14767 ).
14768 \end_layout
14769
14770 \begin_layout Description
14771 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14772  optional argument in the standard classes.
14773  With this, you can specify an alternative version of the title for the
14774  table of contents and the headers (for instance, if the title is too long).
14775  In LyX, you can do this via 
14776 \family sans
14777 Insert\SpecialChar \menuseparator
14778 Short
14779 \begin_inset space ~
14780 \end_inset
14781
14782 Title
14783 \family default
14784  at the beginning of a chapter/section.
14785  Memoir features a second optional argument and thus separates the table
14786  of contents from the header.
14787  You can define three variants of a title with this: one for the main text,
14788  one for the table of contents, and one for the headers.
14789  Simply insert two optional arguments if you need this feature, the first
14790  one containing the short title for the Table of Contents, the second one
14791  containing an alternative short title for the headers.
14792 \end_layout
14793
14794 \begin_layout Description
14795 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14796  of contents, the list of figures and the list of table start a new page
14797  automatically.
14798  Memoir does not follow this route.
14799  You have to insert a page break yourself, if you want to have one.
14800 \end_layout
14801
14802 \begin_layout Description
14803 Titlepage: For some unknown reason, Memoir uses pagination on the title
14804  page (in the standard classes, title pages are 
14805 \begin_inset Quotes eld
14806 \end_inset
14807
14808 empty
14809 \begin_inset Quotes erd
14810 \end_inset
14811
14812 ).
14813  If you want an empty title page, type 
14814 \family typewriter
14815
14816 \backslash
14817 aliaspagestyle{title}{empty}
14818 \family default
14819  in the preamble.
14820 \end_layout
14821
14822 \begin_layout Description
14823 Article: With the class option 
14824 \emph on
14825 article
14826 \emph default
14827  (to be inserted in 
14828 \family sans
14829 Layout\SpecialChar \menuseparator
14830 Document\SpecialChar \menuseparator
14831 Extra
14832 \begin_inset space ~
14833 \end_inset
14834
14835 Options
14836 \family default
14837 ), you can emulate article style.
14838  That is, counters (footnotes, figures, tables etc.) will not be reset on
14839  new chapters, chapters don't start a new page (but are—in contrary to 
14840 \begin_inset Quotes eld
14841 \end_inset
14842
14843 real
14844 \begin_inset Quotes erd
14845 \end_inset
14846
14847  article classes—still allowed), parts, though, use their own page, as in
14848  book.
14849 \end_layout
14850
14851 \begin_layout Description
14852 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14853  font commands, which have been used in the old LaTeX version 2.09 (e.
14854 \begin_inset space \thinspace{}
14855 \end_inset
14856
14857 g.
14858 \begin_inset space \space{}
14859 \end_inset
14860
14861
14862 \family typewriter
14863
14864 \backslash
14865 rm
14866 \family default
14867
14868 \family typewriter
14869
14870 \backslash
14871 it
14872 \family default
14873 ).
14874  It produces an error and stops LaTeX whenever such a command appears.
14875  The class option 
14876 \emph on
14877 oldfontcommands
14878 \emph default
14879  reallows the commands and spits out warnings instead (which does at least
14880  not stop LaTeX).
14881  Since a lot of packages and particularly BibTeX style files are still using
14882  those commands, we have decided to use this option by default.
14883 \end_layout
14884
14885 \begin_layout Subsection
14886 Extra features
14887 \end_layout
14888
14889 \begin_layout Standard
14890 We will only describe the features supported by LyX (which is not much currently
14891 ).
14892  Please consult the Memoir manual
14893 \begin_inset Foot
14894 status collapsed
14895
14896 \begin_layout Plain Layout
14897 Cf.
14898 \begin_inset ERT
14899 status collapsed
14900
14901 \begin_layout Plain Layout
14902
14903
14904 \backslash
14905  
14906 \end_layout
14907
14908 \end_inset
14909
14910
14911 \begin_inset Flex URL
14912 status collapsed
14913
14914 \begin_layout Plain Layout
14915
14916 CTAN:/macros/latex/memoir/memman.pdf
14917 \end_layout
14918
14919 \end_inset
14920
14921 .
14922 \end_layout
14923
14924 \end_inset
14925
14926  for details.
14927 \end_layout
14928
14929 \begin_layout Description
14930 Abstract: You may wonder why an abstract is an extra feature.
14931  Well, it is in book class.
14932  Usually books don't have abstracts.
14933  Memoir, however, has.
14934  You can use it wherever and how often you like.
14935 \end_layout
14936
14937 \begin_layout Description
14938 Chapterprecis: You may know this older typesetting style: The contents of
14939  a chapter are summarized below the title and also in the table of contents
14940  (e.
14941 \begin_inset space \thinspace{}
14942 \end_inset
14943
14944 g.
14945 \begin_inset space \space{}
14946 \end_inset
14947
14948
14949 \emph on
14950 Our hero arrives in Troia; he loses some friends; he finds others
14951 \emph default
14952 ).
14953  Chapterprecis does exactly this.
14954  It is therefore only sensible below a chapter.
14955 \end_layout
14956
14957 \begin_layout Description
14958 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14959  The epigraph environment provides an elegant way of typesetting such a
14960  motto.
14961  The motto itself (text) and its author (source) are divided by a short
14962  line.
14963  Unfortunately, we have to fool LyX a bit here again, since the environment
14964  needs two arguments (text and source).
14965  In this case, we have to use curly brackets (in TeX mode) between the two
14966  arguments: 
14967 \emph on
14968 <smart slogan>
14969 \emph default
14970  
14971 \family typewriter
14972 }{
14973 \family default
14974  
14975 \emph on
14976 <author of the slogan>.
14977 \end_layout
14978
14979 \begin_layout Description
14980 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14981  complex figurative poems).
14982  LyX can only support a few of them.
14983  One is poemtitle, which is a centered title for poems, which will also
14984  be added to the table of contents (verse is the standard environment for
14985  poems.
14986  Memoir has some enhanced versions of verse, but you need to use TeX code,
14987  because they have to be nested inside regular verse environments, which
14988  is not possible with LyX).
14989 \end_layout
14990
14991 \begin_layout Description
14992 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14993 \end_layout
14994
14995 \begin_layout Section
14996 Article (mwart), book (mwbk) and report (mwrep)
14997 \begin_inset Argument
14998 status collapsed
14999
15000 \begin_layout Plain Layout
15001 The 
15002 \family typewriter
15003 mw
15004 \family default
15005  Classes
15006 \end_layout
15007
15008 \end_inset
15009
15010
15011 \end_layout
15012
15013 \begin_layout Standard
15014 by 
15015 \noun on
15016 Tomasz Luczak
15017 \end_layout
15018
15019 \begin_layout Standard
15020 The LyX document classes 
15021 \emph on
15022 article (mwart)
15023 \emph default
15024
15025 \emph on
15026 report (mwrep)
15027 \emph default
15028  and 
15029 \emph on
15030 book
15031 \emph default
15032  
15033 \emph on
15034 (mwbk)
15035 \emph default
15036  correspond to the LaTeX document classes 
15037 \family typewriter
15038 mwart.cls
15039 \family default
15040
15041 \family typewriter
15042 mwrep.cls
15043 \family default
15044  and 
15045 \family typewriter
15046 mwbk.cls
15047 \family default
15048 , resp.
15049  They are replacements for the standard document classes 
15050 \family typewriter
15051 article.cls
15052 \family default
15053
15054 \family typewriter
15055 report.cls
15056 \family default
15057  and 
15058 \family typewriter
15059 book.cls
15060 \family default
15061 , resp., and fit better to Polish typography conventions in a number of points.
15062  
15063 \end_layout
15064
15065 \begin_layout Standard
15066 Basic differences:
15067 \end_layout
15068
15069 \begin_layout Itemize
15070 Unnumbered titles (with star, e.
15071 \begin_inset space \thinspace{}
15072 \end_inset
15073
15074 g.
15075 \begin_inset space \space{}
15076 \end_inset
15077
15078
15079 \family sans
15080 Section*
15081 \family default
15082 ) are added into table of contents,
15083 \end_layout
15084
15085 \begin_layout Itemize
15086 Additional page styles:
15087 \end_layout
15088
15089 \begin_deeper
15090 \begin_layout Description
15091 uheadings header with separated lines,
15092 \end_layout
15093
15094 \begin_layout Description
15095 myheadings custom header, contents headers via commands: 
15096 \family typewriter
15097
15098 \backslash
15099 markright
15100 \family default
15101  and 
15102 \family typewriter
15103
15104 \backslash
15105 markboth
15106 \family default
15107 ,
15108 \end_layout
15109
15110 \begin_layout Description
15111 myuheadings custom header with separated lines,
15112 \end_layout
15113
15114 \begin_layout Description
15115 outer page number is placed on outer side of page
15116 \end_layout
15117
15118 \end_deeper
15119 \begin_layout Itemize
15120 Options 
15121 \end_layout
15122
15123 \begin_deeper
15124 \begin_layout Description
15125 rmheadings serif titles — default,
15126 \end_layout
15127
15128 \begin_layout Description
15129 sfheadings sansserif titles,
15130 \end_layout
15131
15132 \begin_layout Description
15133 authortitle on title page first placed is author next title — default,
15134 \end_layout
15135
15136 \begin_layout Description
15137 titleauthor on title page first placed is title next author,
15138 \end_layout
15139
15140 \begin_layout Description
15141 withmarginpar reserve place on page for margins.
15142 \end_layout
15143
15144 \end_deeper
15145 \begin_layout Section
15146 Paper
15147 \end_layout
15148
15149 \begin_layout Standard
15150 The document class 
15151 \family sans
15152 paper
15153 \family default
15154  provides an alternative to the standard 
15155 \family sans
15156 article
15157 \family default
15158  class.
15159  It provides similar functionality, but you might prefer this layout with
15160  sans serif sections, headings, and more.
15161 \end_layout
15162
15163 \begin_layout Section
15164 RevTeX4
15165 \end_layout
15166
15167 \begin_layout Standard
15168 by 
15169 \noun on
15170 Amir Karger
15171 \end_layout
15172
15173 \begin_layout Standard
15174 \begin_inset VSpace bigskip
15175 \end_inset
15176
15177
15178 \end_layout
15179
15180 \begin_layout Standard
15181 \noindent
15182 The 
15183 \family sans
15184 Revtex
15185 \begin_inset space ~
15186 \end_inset
15187
15188 4
15189 \family default
15190  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15191 \begin_inset Formula $\beta$
15192 \end_inset
15193
15194  release of May, 1999) class.
15195 \end_layout
15196
15197 \begin_layout Standard
15198 LyX has a 
15199 \family sans
15200 Revtex
15201 \family default
15202  textclass, which works with RevTeX 3.1.
15203  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15204  That means that it doesn't interact very well with LyX, which requires
15205  LaTeX2e, although it has been kludged to work.
15206  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15207  LyX with the 
15208 \family sans
15209 RevTeX
15210 \begin_inset space ~
15211 \end_inset
15212
15213 4
15214 \family default
15215  textclass should also be pretty easy to use.
15216 \end_layout
15217
15218 \begin_layout Standard
15219 These documents are supposed to be used in 
15220 \emph on
15221 addition
15222 \emph default
15223  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15224  macros, and assume you'll know what to put in the preamble if necessary.
15225 \end_layout
15226
15227 \begin_layout Subsection
15228 Installation
15229 \end_layout
15230
15231 \begin_layout Standard
15232 All you need to do is install RevTeX 4, as described in the package's README
15233  file.
15234  The package can be found at The RevTeX 4 Web Site 
15235 \begin_inset Flex URL
15236 status collapsed
15237
15238 \begin_layout Plain Layout
15239
15240 http://publish.aps.org/revtex4/
15241 \end_layout
15242
15243 \end_inset
15244
15245 .
15246  Install it somewhere that LaTeX can see it.
15247  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15248  (i.
15249 \begin_inset space \thinspace{}
15250 \end_inset
15251
15252 e.
15253 \begin_inset space \space{}
15254 \end_inset
15255
15256 not the directory where you installed the class file.) Then, if you reconfigure
15257  LyX, it will find the class file and let you use the RevTeX4 textclass.
15258 \end_layout
15259
15260 \begin_layout Standard
15261 Probably the easiest way to get started is either to import a RevTeX 4 document
15262  using 
15263 \family typewriter
15264 tex2lyx
15265 \family default
15266 , or to use the 
15267 \family sans
15268 Revtex
15269 \begin_inset space ~
15270 \end_inset
15271
15272 4
15273 \family default
15274  template, found in the templates directory.
15275 \end_layout
15276
15277 \begin_layout Subsection
15278 Preamble Matter
15279 \end_layout
15280
15281 \begin_layout Standard
15282 Optional arguments to 
15283 \family typewriter
15284
15285 \backslash
15286 documentclass
15287 \family default
15288 , like 
15289 \begin_inset Quotes eld
15290 \end_inset
15291
15292 preprint
15293 \begin_inset Quotes erd
15294 \end_inset
15295
15296  and 
15297 \begin_inset Quotes eld
15298 \end_inset
15299
15300 aps
15301 \begin_inset Quotes erd
15302 \end_inset
15303
15304 , go in the 
15305 \family sans
15306 E
15307 \bar under
15308 x
15309 \bar default
15310 tra
15311 \begin_inset space ~
15312 \end_inset
15313
15314 Options
15315 \family default
15316  field in the 
15317 \family sans
15318 Document
15319 \begin_inset space ~
15320 \end_inset
15321
15322 Layout
15323 \family default
15324  dialog, as usual.
15325  Remember that in RevTeX, at least one optional argument is required! 
15326 \end_layout
15327
15328 \begin_layout Standard
15329 Other preamble matter, like 
15330 \family typewriter
15331
15332 \backslash
15333 draft
15334 \family default
15335  etc.
15336 \begin_inset space ~
15337 \end_inset
15338
15339 goes in the 
15340 \family sans
15341 LaTeX
15342 \begin_inset space ~
15343 \end_inset
15344
15345 Preamble
15346 \family default
15347  dialog, also as usual.
15348 \end_layout
15349
15350 \begin_layout Subsection
15351 Layouts
15352 \end_layout
15353
15354 \begin_layout Standard
15355 The layouts basically correspond to the commands in RevTeX4.0.
15356  For example, the Email layout corresponds to 
15357 \family typewriter
15358
15359 \backslash
15360 email{}
15361 \family default
15362 .
15363  Note that (at least as of RevTeX 4.0 Beta), the 
15364 \family sans
15365 Address
15366 \family default
15367  and 
15368 \family sans
15369 Affiliation
15370 \family default
15371  layouts are exactly equivalent, so you shouldn't need to use both.
15372 \begin_inset Foot
15373 status collapsed
15374
15375 \begin_layout Plain Layout
15376 In case you're curious, both were included so that 
15377 \family typewriter
15378 tex2lyx
15379 \family default
15380  would be able to translate both 
15381 \family typewriter
15382
15383 \backslash
15384 address
15385 \family default
15386  and 
15387 \family typewriter
15388
15389 \backslash
15390 affiliation
15391 \family default
15392 .
15393 \end_layout
15394
15395 \end_inset
15396
15397
15398 \end_layout
15399
15400 \begin_layout Subsection
15401 Important Notes
15402 \end_layout
15403
15404 \begin_layout Standard
15405 There are a couple of important unique aspects of RevTeX 4 which might cause
15406  bugs that will be even more confusing in LyX.
15407 \end_layout
15408
15409 \begin_layout Standard
15410 In RevTeX, the 
15411 \family typewriter
15412
15413 \backslash
15414 thanks
15415 \family default
15416  command goes 
15417 \emph on
15418 outside
15419 \emph default
15420  the 
15421 \family typewriter
15422
15423 \backslash
15424 author
15425 \family default
15426  command.
15427  The LyX equivalent is that there is a separate Thanks layout.
15428  Do 
15429 \emph on
15430 not
15431 \emph default
15432  write footnotes in the 
15433 \family sans
15434 Author
15435 \family default
15436  layout, or weird things may happen.
15437  See the RevTeX 4 documentation for more details.
15438 \end_layout
15439
15440 \begin_layout Standard
15441 Also, the 
15442 \family sans
15443 Author
15444 \begin_inset space ~
15445 \end_inset
15446
15447 Email
15448 \family default
15449
15450 \family sans
15451 Author
15452 \begin_inset space ~
15453 \end_inset
15454
15455 URL
15456 \family default
15457 , and 
15458 \family sans
15459 Thanks
15460 \family default
15461  layouts must be placed 
15462 \emph on
15463 in between
15464 \emph default
15465  the 
15466 \family sans
15467 Author
15468 \family default
15469  layout and the corresponding 
15470 \family sans
15471 Address
15472 \family default
15473  (or equivalent 
15474 \family sans
15475 Affiliation
15476 \family default
15477 ) layout.
15478  If you put the 
15479 \family sans
15480 Thanks
15481 \family default
15482  after the 
15483 \family sans
15484 Address
15485 \family default
15486 , the LaTeX won't compile.
15487 \end_layout
15488
15489 \begin_layout Subsection
15490 Drawbacks
15491 \end_layout
15492
15493 \begin_layout Standard
15494 The main problem with this layout is that you can't use the optional arguments
15495  to layouts like Email and Title.
15496  (The problem is not unique to this layout; you can't use optional arguments
15497  to the Section layouts either.) This means that after you export that file
15498  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15499  need to edit the LaTeX file with a text editor to add the optional arguments
15500  to set, e.
15501 \begin_inset space \thinspace{}
15502 \end_inset
15503
15504 g.
15505 \begin_inset space \space{}
15506 \end_inset
15507
15508 the running title for the page headers.
15509  Lacking these layouts makes the 
15510 \family typewriter
15511
15512 \backslash
15513 altaffiliation
15514 \family default
15515  (and the equivalent 
15516 \family typewriter
15517
15518 \backslash
15519 altaddress
15520 \family default
15521 ) useless, so the corresponding layouts don't exist, and will have to be
15522  added by hand.
15523 \begin_inset Foot
15524 status collapsed
15525
15526 \begin_layout Plain Layout
15527
15528 \emph on
15529 Note from JMarc:
15530 \emph default
15531  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15532  has not been updated yet to take advantage of it.
15533 \end_layout
15534
15535 \end_inset
15536
15537  
15538 \end_layout
15539
15540 \begin_layout Section
15541 Springer Journals (
15542 \family sans
15543 svjour
15544 \family default
15545 )
15546 \end_layout
15547
15548 \begin_layout Standard
15549 by 
15550 \noun on
15551 Martin Vermeer
15552 \end_layout
15553
15554 \begin_layout Subsection
15555 Description
15556 \end_layout
15557
15558 \begin_layout Standard
15559 These are the layout files for some of the journal formats used by Springer
15560  Verlag and listed on 
15561 \begin_inset Flex URL
15562 status collapsed
15563
15564 \begin_layout Plain Layout
15565
15566 http://www.springer.de/author/tex/help-journals.html
15567 \end_layout
15568
15569 \end_inset
15570
15571 , where you should also go to fetch the class files (yes, these are LaTeX2e
15572  now!).
15573  It is a modular system: the things common to all journals are implemented
15574  in 
15575 \family typewriter
15576 svjour.inc
15577 \family default
15578 , which journal-specific layout files (such as, e.
15579 \begin_inset space \thinspace{}
15580 \end_inset
15581
15582 g.
15583 \begin_inset space \space{}
15584 \end_inset
15585
15586
15587 \family typewriter
15588 svjog.layout
15589 \family default
15590  for Journal of Geodesy) can include.
15591 \end_layout
15592
15593 \begin_layout Standard
15594 This means that implementing support for any other Springer journal on this
15595  list is as simple as writing your own 
15596 \family typewriter
15597 sv
15598 \family default
15599 <myjournal>
15600 \family typewriter
15601 .layout
15602 \family default
15603  file following the outline given in 
15604 \family typewriter
15605 svjog.layout
15606 \family default
15607 .
15608  
15609 \end_layout
15610
15611 \begin_layout Standard
15612 It is reasonably well tested only for the Journal of Geodesy.
15613  
15614 \family typewriter
15615 svjour
15616 \family default
15617  and 
15618 \family typewriter
15619 svjog
15620 \family default
15621  come with the standard LyX distribution.
15622  Install the relevant class file (downloaded from Springer) in a proper
15623  directory, reconfigure LaTeX (in the teTeX case by running 
15624 \family typewriter
15625 texhash
15626 \family default
15627 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15628  and it should work.
15629 \end_layout
15630
15631 \begin_layout Subsection
15632 New styles
15633 \end_layout
15634
15635 \begin_layout Standard
15636 A large number of theorem-like styles — 
15637 \family sans
15638 Claim, Conjecture,
15639 \family default
15640  
15641 \family sans
15642 \SpecialChar \ldots{}
15643 Theorem
15644 \family default
15645 .
15646 \end_layout
15647
15648 \begin_layout Standard
15649
15650 \family sans
15651 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15652  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15653 \family default
15654 .
15655  See the Springer class file documentation for details.
15656 \end_layout
15657
15658 \begin_layout Subsection
15659 Supported journals
15660 \end_layout
15661
15662 \begin_layout Itemize
15663
15664 \emph on
15665 Journal of Geodesy
15666 \emph default
15667
15668 \family typewriter
15669 svjog.layout
15670 \family default
15671  — Martin Vermeer
15672 \end_layout
15673
15674 \begin_layout Itemize
15675
15676 \emph on
15677 Probability Theory and Related Fields
15678 \emph default
15679
15680 \family typewriter
15681 svprobth.layout
15682 \family default
15683  — Jean-Marc Lasgouttes
15684 \end_layout
15685
15686 \begin_layout Standard
15687 Add your own, it isn't so hard!
15688 \end_layout
15689
15690 \begin_layout Subsection
15691 Credits
15692 \end_layout
15693
15694 \begin_layout Standard
15695 These files are partly based on the older 
15696 \family typewriter
15697 ejour2.layout
15698 \family default
15699 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15700  file from Springer.
15701  All this, and the 
15702 \family typewriter
15703 ejour2
15704 \family default
15705  layout, are now defunct.
15706  Jean-Marc Lasgouttes helped out big in making me find my way around the
15707  LyX layout file mechanism.
15708 \end_layout
15709
15710 \begin_layout Subsection
15711 Bugs
15712 \end_layout
15713
15714 \begin_layout Standard
15715 Probably.
15716  But probably less than in the old hacked-LaTeX 
15717 \family typewriter
15718 ejour2
15719 \family default
15720 .
15721 \end_layout
15722
15723 \begin_layout Standard
15724 Limitations e.
15725 \begin_inset space \thinspace{}
15726 \end_inset
15727
15728 g.: does not display the number for theorem-like layouts, just #.
15729 \end_layout
15730
15731 \begin_layout Section
15732 Slides [aka 
15733 \noun on
15734 SliTeX
15735 \noun default
15736 ]
15737 \begin_inset CommandInset label
15738 LatexCommand label
15739 name "sec:slitex"
15740
15741 \end_inset
15742
15743
15744 \end_layout
15745
15746 \begin_layout Standard
15747 by 
15748 \noun on
15749 John Weiss
15750 \noun default
15751  
15752 \end_layout
15753
15754 \begin_layout Subsection
15755 Introduction
15756 \end_layout
15757
15758 \begin_layout Standard
15759 This section describes how to use LyX to make slides for overhead projectors.
15760  There are two document classes that can do this: the default slides class
15761  and the 
15762 \family sans
15763 FoilTeX
15764 \family default
15765  slides class.
15766  This section documents the former.
15767 \end_layout
15768
15769 \begin_layout Standard
15770 I'm going to say this again, nice and clear, so that there's no misunderstanding
15771 :
15772 \end_layout
15773
15774 \begin_layout Standard
15775 \begin_inset VSpace bigskip
15776 \end_inset
15777
15778
15779 \end_layout
15780
15781 \begin_layout Standard
15782 \align center
15783
15784 \size large
15785 This section documents the class 
15786 \begin_inset Quotes eld
15787 \end_inset
15788
15789
15790 \family sans
15791 slides (default)
15792 \family default
15793
15794 \begin_inset Quotes erd
15795 \end_inset
15796
15797  
15798 \emph on
15799 only.
15800 \end_layout
15801
15802 \begin_layout Standard
15803 \begin_inset VSpace bigskip
15804 \end_inset
15805
15806
15807 \end_layout
15808
15809 \begin_layout Standard
15810 If you're looking for the documentation for 
15811 \begin_inset Quotes eld
15812 \end_inset
15813
15814
15815 \family sans
15816 slides (FoilTeX)
15817 \family default
15818
15819 \begin_inset Quotes erd
15820 \end_inset
15821
15822 , check out section
15823 \begin_inset space ~
15824 \end_inset
15825
15826
15827 \begin_inset CommandInset ref
15828 LatexCommand ref
15829 reference "sec:foiltex"
15830
15831 \end_inset
15832
15833 .
15834  The 
15835 \family sans
15836 foils
15837 \family default
15838  class [
15839 \begin_inset Quotes eld
15840 \end_inset
15841
15842
15843 \family sans
15844 slides (FoilTeX)
15845 \family default
15846
15847 \begin_inset Quotes erd
15848 \end_inset
15849
15850 ] is actually somewhat better than the default 
15851 \family sans
15852 slides
15853 \family default
15854  class,
15855 \begin_inset Foot
15856 status collapsed
15857
15858 \begin_layout Plain Layout
15859 \SpecialChar \ldots{}
15860 or so I've been told repeatedly by its advocates.
15861  Having never used it, I have no idea if this claim is true or not.
15862 \end_layout
15863
15864 \end_inset
15865
15866  which this section documents.
15867 \end_layout
15868
15869 \begin_layout Standard
15870 This class is the LaTeX2e improvement of the old 
15871 \noun on
15872 SliTeX
15873 \noun default
15874  package.
15875  Every LaTeX2e distribution includes this class [which I'll just refer to
15876  as 
15877 \begin_inset Quotes eld
15878 \end_inset
15879
15880
15881 \family sans
15882 slides
15883 \family default
15884
15885 \begin_inset Quotes erd
15886 \end_inset
15887
15888  from now on], so you're bound to have it.
15889  As I noted earlier, there are other classes, such as 
15890 \family sans
15891 foils
15892 \family default
15893 , which also produce slides for overhead projectors and do a better job
15894  at it.
15895  However, there are some things which 
15896 \family sans
15897 slides
15898 \family default
15899  can do which the others can't, such as generate overlays.
15900  Read on to learn more!
15901 \end_layout
15902
15903 \begin_layout Subsection
15904 Getting Started
15905 \begin_inset CommandInset label
15906 LatexCommand label
15907 name "sec:slidesetup"
15908
15909 \end_inset
15910
15911
15912 \end_layout
15913
15914 \begin_layout Standard
15915 Obviously, to use this document class, you need to select 
15916 \begin_inset Quotes eld
15917 \end_inset
15918
15919
15920 \family sans
15921 slides (default)
15922 \family default
15923
15924 \begin_inset Quotes erd
15925 \end_inset
15926
15927  from the class list in the 
15928 \family sans
15929 Document\SpecialChar \menuseparator
15930 Settings
15931 \family default
15932  dialog.
15933  There are some other special things you should know about this class:
15934 \end_layout
15935
15936 \begin_layout Itemize
15937 Don't bother changing the options 
15938 \family sans
15939 Sides and Columns
15940 \family default
15941 .
15942  They're not supported by the 
15943 \family sans
15944 slides
15945 \family default
15946  class, anyways.
15947 \end_layout
15948
15949 \begin_layout Itemize
15950 The option 
15951 \family sans
15952 Page
15953 \begin_inset space ~
15954 \end_inset
15955
15956 style
15957 \family default
15958  behaves a bit differently for this class.
15959  The possible choices and what they do are as follows:
15960 \end_layout
15961
15962 \begin_deeper
15963 \begin_layout Description
15964
15965 \family sans
15966 plain
15967 \family default
15968  The final output contains page numbers in the lower right corner.
15969 \end_layout
15970
15971 \begin_layout Description
15972
15973 \family sans
15974 headings
15975 \family default
15976  Like 
15977 \family sans
15978 plain
15979 \family default
15980 , but also prints out any time markers you've put in.
15981  This is the default.
15982 \end_layout
15983
15984 \begin_layout Description
15985
15986 \family sans
15987 empty
15988 \family default
15989  The final output contains no page numbers, time markers, or alignment markers.
15990 \end_layout
15991
15992 \end_deeper
15993 \begin_layout Itemize
15994 The 
15995 \family sans
15996 slides
15997 \family default
15998  class has an extra option: 
15999 \family typewriter
16000 clock
16001 \family default
16002 .
16003  To use it, put 
16004 \begin_inset Quotes eld
16005 \end_inset
16006
16007
16008 \family typewriter
16009 clock
16010 \family default
16011
16012 \begin_inset Quotes erd
16013 \end_inset
16014
16015  in the extra class options.
16016 \end_layout
16017
16018 \begin_deeper
16019 \begin_layout Standard
16020 Using this options allows you to add time markers to 
16021 \family sans
16022 Note
16023 \family default
16024 s.
16025  See section
16026 \begin_inset space ~
16027 \end_inset
16028
16029
16030 \begin_inset CommandInset ref
16031 LatexCommand ref
16032 reference "sec:slideNote"
16033
16034 \end_inset
16035
16036  for more details.
16037 \end_layout
16038
16039 \end_deeper
16040 \begin_layout Standard
16041 You can also use the template file 
16042 \begin_inset Quotes eld
16043 \end_inset
16044
16045
16046 \family typewriter
16047 slides.lyx
16048 \family default
16049
16050 \begin_inset Quotes erd
16051 \end_inset
16052
16053  to automatically set up a document to use the 
16054 \family sans
16055 slides
16056 \family default
16057  class [using 
16058 \family sans
16059 File\SpecialChar \menuseparator
16060 New
16061 \begin_inset space ~
16062 \end_inset
16063
16064 from
16065 \begin_inset space ~
16066 \end_inset
16067
16068 Template
16069 \family default
16070  to open your new document].
16071  The template file also contains some examples of the special paragraph
16072  environments used by this class.
16073  I'll describe those next.
16074 \end_layout
16075
16076 \begin_layout Subsection
16077 Paragraph Environments
16078 \end_layout
16079
16080 \begin_layout Subsubsection
16081 Supported Environments
16082 \end_layout
16083
16084 \begin_layout Standard
16085 The first thing you'll notice when you start up a new 
16086 \family sans
16087 slides
16088 \family default
16089  document is the font size and type: it's the equivalent of the size 
16090 \begin_inset Quotes eld
16091 \end_inset
16092
16093
16094 \family sans
16095 Largest
16096 \family default
16097
16098 \begin_inset Quotes erd
16099 \end_inset
16100
16101  in the 
16102 \family sans
16103 Sans
16104 \begin_inset space ~
16105 \end_inset
16106
16107 Serif
16108 \family default
16109  font.
16110  This is also what's used in the output.
16111  Think of this as a 
16112 \begin_inset Quotes eld
16113 \end_inset
16114
16115 visual cue
16116 \begin_inset Quotes erd
16117 \end_inset
16118
16119  to remind you that this is a slide.
16120  Your final slides will use a larger font; ergo, you'll have less space.
16121  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16122 \end_layout
16123
16124 \begin_layout Standard
16125 The next thing that becomes obvious is the changes to the paragraph environment
16126  pull-down box [at the far-left end of the toolbar].
16127  Most of the paragraph environments you're used to seeing are missing.
16128  There are also five new ones.
16129  That's because the 
16130 \family sans
16131 slides
16132 \family default
16133  class itself only supports certain paragraph environments:
16134 \end_layout
16135
16136 \begin_layout Itemize
16137
16138 \family sans
16139 Standard
16140 \end_layout
16141
16142 \begin_layout Itemize
16143
16144 \family sans
16145 Itemize
16146 \end_layout
16147
16148 \begin_layout Itemize
16149
16150 \family sans
16151 Enumerate
16152 \end_layout
16153
16154 \begin_layout Itemize
16155
16156 \family sans
16157 Description
16158 \end_layout
16159
16160 \begin_layout Itemize
16161
16162 \family sans
16163 List
16164 \end_layout
16165
16166 \begin_layout Itemize
16167
16168 \family sans
16169 Quotation
16170 \end_layout
16171
16172 \begin_layout Itemize
16173
16174 \family sans
16175 Quote
16176 \end_layout
16177
16178 \begin_layout Itemize
16179
16180 \family sans
16181 Verse
16182 \end_layout
16183
16184 \begin_layout Itemize
16185
16186 \family sans
16187 Caption
16188 \end_layout
16189
16190 \begin_layout Itemize
16191
16192 \family sans
16193 LyX-Code
16194 \end_layout
16195
16196 \begin_layout Itemize
16197
16198 \family sans
16199 Comment
16200 \end_layout
16201
16202 \begin_layout Standard
16203 All of the other standard environments, including the section-heading environmen
16204 ts, aren't used in the 
16205 \family sans
16206 slides
16207 \family default
16208  class.
16209 \end_layout
16210
16211 \begin_layout Standard
16212 On the other hand, you'll notice the following new environments:
16213 \end_layout
16214
16215 \begin_layout Itemize
16216
16217 \family sans
16218 Slide
16219 \end_layout
16220
16221 \begin_layout Itemize
16222
16223 \family sans
16224 Overlay
16225 \end_layout
16226
16227 \begin_layout Itemize
16228
16229 \family sans
16230 Note
16231 \end_layout
16232
16233 \begin_layout Itemize
16234
16235 \family sans
16236 InvisibleText
16237 \end_layout
16238
16239 \begin_layout Itemize
16240
16241 \family sans
16242 VisibleText
16243 \end_layout
16244
16245 \begin_layout Standard
16246 These five are kind of quirky, due to a 
16247 \begin_inset Quotes eld
16248 \end_inset
16249
16250 feature
16251 \begin_inset Quotes erd
16252 \end_inset
16253
16254  in LyX.
16255  You see, LyX doesn't permit you to nest any other paragraph environment
16256  into an empty environment.
16257  Now, that's fine and dandy, but it means that you wouldn't be able to start
16258  a slide with anything except plain text.
16259  To deal with this, I've performed a little 
16260 \begin_inset Quotes eld
16261 \end_inset
16262
16263 LaTeX magic.
16264 \begin_inset Quotes erd
16265 \end_inset
16266
16267  
16268 \end_layout
16269
16270 \begin_layout Subsubsection
16271 Quirks of the New Environments
16272 \begin_inset CommandInset label
16273 LatexCommand label
16274 name "sec:slideQuirk"
16275
16276 \end_inset
16277
16278
16279 \end_layout
16280
16281 \begin_layout Standard
16282 All five of the new paragraph environments are somewhat quirky due to inherent
16283  limitiations in the current version of LyX.
16284  As I just mentioned, LyX forbids environments that begin with another environme
16285 nt.
16286  To get around this, the 
16287 \family sans
16288 Slide
16289 \family default
16290  environment isn't a paragraph environment as described in the 
16291 \emph on
16292 User's Guide
16293 \emph default
16294 .
16295  
16296 \end_layout
16297
16298 \begin_layout Standard
16299 You should consider 
16300 \family sans
16301 Slide
16302 \family default
16303
16304 \family sans
16305 Overlay
16306 \family default
16307 , and 
16308 \family sans
16309 Note
16310 \family default
16311  to be 
16312 \begin_inset Quotes eld
16313 \end_inset
16314
16315 pseudo-environments.
16316 \begin_inset Quotes erd
16317 \end_inset
16318
16319  They look like a section heading or a 
16320 \begin_inset Quotes eld
16321 \end_inset
16322
16323
16324 \family sans
16325 Caption
16326 \family default
16327 ,
16328 \begin_inset Quotes erd
16329 \end_inset
16330
16331  but really begin a [and, if necessary, end the previous] paragraph environment.
16332  Likewise, treat 
16333 \family sans
16334 InvisibleText
16335 \family default
16336  and 
16337 \family sans
16338 VisibleText
16339 \family default
16340  as 
16341 \begin_inset Quotes eld
16342 \end_inset
16343
16344 pseudo-commands.
16345 \begin_inset Quotes erd
16346 \end_inset
16347
16348  These two perform some action.
16349 \end_layout
16350
16351 \begin_layout Standard
16352 A common feature of all five environments, 
16353 \family sans
16354 Slide
16355 \family default
16356
16357 \family sans
16358 Overlay
16359 \family default
16360
16361 \family sans
16362 Note
16363 \family default
16364
16365 \family sans
16366 InvisibleText
16367 \family default
16368  and 
16369 \family sans
16370 VisibleText
16371 \family default
16372 , is a rather long-ish label.
16373  The text following this label — ordinarily the contents of the paragraph
16374  environment — is utterly irrelevant for 
16375 \family sans
16376 Slide
16377 \family default
16378
16379 \family sans
16380 Overlay
16381 \family default
16382
16383 \family sans
16384 Note
16385 \family default
16386
16387 \family sans
16388 InvisibleText
16389 \family default
16390  and 
16391 \family sans
16392 VisibleText
16393 \family default
16394 .
16395  LyX completely ignores it.
16396  In fact, you can leave these five environments completely empty.
16397  
16398 \end_layout
16399
16400 \begin_layout Standard
16401 While you don't 
16402 \emph on
16403 have
16404 \emph default
16405  to put any text after the rather long-ish label, you might want to.
16406  This could be a short description of the contents of the 
16407 \family sans
16408 Slide
16409 \family default
16410 , for example.
16411  In that case, enter your descriptive comment and hit 
16412 \family sans
16413 Return
16414 \family default
16415  as you normally would.
16416 \end_layout
16417
16418 \begin_layout Standard
16419 If, on the other hand, you don't want to enter any descriptive text, you'll
16420  hit another LyX quirk.
16421  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16422  environment until you put something in the old one.
16423  So, do this:
16424 \end_layout
16425
16426 \begin_layout Itemize
16427 Start entering the text that will 
16428 \emph on
16429 follow
16430 \emph default
16431  the new 
16432 \family sans
16433 Slide
16434 \family default
16435
16436 \family sans
16437 Overlay
16438 \family default
16439
16440 \family sans
16441 Note
16442 \family default
16443
16444 \family sans
16445 InvisibleText
16446 \family default
16447  or 
16448 \family sans
16449 VisibleText
16450 \family default
16451 .
16452  
16453 \end_layout
16454
16455 \begin_layout Itemize
16456 Now move to the beginning of that paragraph.
16457  
16458 \end_layout
16459
16460 \begin_layout Itemize
16461 Next, hit 
16462 \family sans
16463 Return
16464 \family default
16465 .
16466  
16467 \end_layout
16468
16469 \begin_layout Itemize
16470 Finally, change this new, empty paragraph to a 
16471 \family sans
16472 Slide
16473 \family default
16474
16475 \family sans
16476 Overlay
16477 \family default
16478
16479 \family sans
16480 Note
16481 \family default
16482
16483 \family sans
16484 InvisibleText
16485 \family default
16486  or 
16487 \family sans
16488 VisibleText
16489 \family default
16490 .
16491  
16492 \end_layout
16493
16494 \begin_layout Standard
16495 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16496
16497 \end_layout
16498
16499 \begin_layout Subsection
16500 Making a Presentation with 
16501 \family sans
16502 Slide
16503 \family default
16504
16505 \family sans
16506 Overlay
16507 \family default
16508  and 
16509 \family sans
16510 Note
16511 \end_layout
16512
16513 \begin_layout Subsubsection
16514 Using the 
16515 \family sans
16516 Slide
16517 \family default
16518  Environment
16519 \end_layout
16520
16521 \begin_layout Standard
16522 If you're expecting this section to teach you how to actually make a presentatio
16523 n, you'll be sorely disappointed.
16524  Naturally, I'll describe all of the ways the 
16525 \family sans
16526 slides
16527 \family default
16528  class can assist you in preparing the materials for a presentation.
16529  Filling in the contents, however, is up to you.
16530  [Then again, that 
16531 \emph on
16532 is
16533 \emph default
16534  the LyX philosophy.]
16535 \end_layout
16536
16537 \begin_layout Standard
16538 Choosing the 
16539 \family sans
16540 Slide
16541 \family default
16542  environment [in the manner described in section
16543 \begin_inset space ~
16544 \end_inset
16545
16546
16547 \begin_inset CommandInset ref
16548 LatexCommand ref
16549 reference "sec:slideQuirk"
16550
16551 \end_inset
16552
16553 ] tells LyX to begin a new slide [duh].
16554  The label for this environment/
16555 \begin_inset Quotes erd
16556 \end_inset
16557
16558 pseudo-command
16559 \begin_inset Quotes erd
16560 \end_inset
16561
16562  is an 
16563 \begin_inset Quotes eld
16564 \end_inset
16565
16566 ASCII line,
16567 \begin_inset Quotes erd
16568 \end_inset
16569
16570  in cool blue, followed by the label, 
16571 \begin_inset Quotes eld
16572 \end_inset
16573
16574 NewSlide:
16575 \begin_inset Quotes erd
16576 \end_inset
16577
16578 .
16579  Any text or paragraph environments that follow this one go on the new slide.
16580  It's that simple.
16581 \end_layout
16582
16583 \begin_layout Standard
16584 Slides are probably the only time you'll need to forcibly end pages in LyX
16585  (this can be specified in the 
16586 \family sans
16587 Paragraph Layout
16588 \family default
16589  dialog).
16590  In fact, you'll want to, once you finish entering the contents of one slide.
16591  If you've entered more text than can physically fit on a slide, the extra
16592  overflows onto a new slide.
16593  I don't recommend doing this, however, since the overflow slide won't have
16594  any page number on it.
16595  Furthermore, it may interfere with any 
16596 \family sans
16597 Overlay
16598 \family default
16599  you've made to accompany the oversized 
16600 \family sans
16601 Slide
16602 \family default
16603 .
16604 \end_layout
16605
16606 \begin_layout Standard
16607 The 
16608 \family sans
16609 Overlay
16610 \family default
16611  and 
16612 \family sans
16613 Note
16614 \family default
16615  environments work the same way as the 
16616 \family sans
16617 Slide
16618 \family default
16619  environment.
16620  They both create an 
16621 \begin_inset Quotes eld
16622 \end_inset
16623
16624 ASCII line
16625 \begin_inset Quotes erd
16626 \end_inset
16627
16628  followed by a label [
16629 \begin_inset Quotes eld
16630 \end_inset
16631
16632 NewOverlay:
16633 \begin_inset Quotes erd
16634 \end_inset
16635
16636  and 
16637 \begin_inset Quotes eld
16638 \end_inset
16639
16640 NewNote:
16641 \begin_inset Quotes erd
16642 \end_inset
16643
16644 , respectively].
16645  The color is a stunning magenta instead of blue, and the 
16646 \begin_inset Quotes eld
16647 \end_inset
16648
16649 ASCII line
16650 \begin_inset Quotes erd
16651 \end_inset
16652
16653  will look different, in style and in length.
16654  The label fonts of all three also differ from one another.
16655 \end_layout
16656
16657 \begin_layout Standard
16658 As with a 
16659 \family sans
16660 Slide
16661 \family default
16662 , if the contents of a 
16663 \family sans
16664 Note
16665 \family default
16666  or 
16667 \family sans
16668 Overlay
16669 \family default
16670  exceed the physical size of a slide or sheet of paper, the extra will overflow
16671  onto a new sheet.
16672  Again, you should avoid this.
16673  It defeats the whole purpose of 
16674 \family sans
16675 Note
16676 \family default
16677 s and 
16678 \family sans
16679 Overlay
16680 \family default
16681 s.
16682 \end_layout
16683
16684 \begin_layout Subsubsection
16685 Using 
16686 \family sans
16687 Overlay
16688 \family default
16689  with 
16690 \family sans
16691 Slide
16692 \end_layout
16693
16694 \begin_layout Standard
16695 The idea behind an 
16696 \family sans
16697 Overlay
16698 \family default
16699  is a slide that sits atop another slide.
16700  Perhaps you wish to discuss a figure on the main 
16701 \family sans
16702 Slide
16703 \family default
16704  before displaying the text associated with it.
16705  One way to accomplish this is tape a flap of dark paper over the part of
16706  the 
16707 \family sans
16708 Slide
16709 \family default
16710  you want to display later.
16711  This method fails, however, if you wish to overlap one graph with another,
16712  for example.
16713  You would then have to fumble while speaking to align the two separate,
16714  overlapping 
16715 \family sans
16716 Slide
16717 \family default
16718 s to align the two graphs.
16719  The use of an 
16720 \family sans
16721 Overlay
16722 \family default
16723  environment in both cases makes life much easier.
16724 \end_layout
16725
16726 \begin_layout Standard
16727 Each 
16728 \family sans
16729 Overlay
16730 \family default
16731  receives the page number of its 
16732 \begin_inset Quotes eld
16733 \end_inset
16734
16735 parent
16736 \begin_inset Quotes erd
16737 \end_inset
16738
16739  
16740 \family sans
16741 Slide
16742 \family default
16743 , appended by 
16744 \begin_inset Quotes eld
16745 \end_inset
16746
16747
16748 \family typewriter
16749 -a
16750 \family default
16751
16752 \begin_inset Quotes erd
16753 \end_inset
16754
16755 .
16756 \begin_inset Foot
16757 status collapsed
16758
16759 \begin_layout Plain Layout
16760 Presumably, mutliple 
16761 \family sans
16762 Overlay
16763 \family default
16764 s would have 
16765 \begin_inset Quotes eld
16766 \end_inset
16767
16768
16769 \family typewriter
16770 -a
16771 \family default
16772
16773 \begin_inset Quotes erd
16774 \end_inset
16775
16776
16777 \begin_inset Quotes eld
16778 \end_inset
16779
16780
16781 \family typewriter
16782 -b
16783 \family default
16784
16785 \begin_inset Quotes erd
16786 \end_inset
16787
16788
16789 \begin_inset Quotes eld
16790 \end_inset
16791
16792
16793 \family typewriter
16794 -c
16795 \family default
16796
16797 \begin_inset Quotes erd
16798 \end_inset
16799
16800 , etc.
16801 \begin_inset space ~
16802 \end_inset
16803
16804 appended to the page number of the parent 
16805 \family sans
16806 Slide
16807 \family default
16808 .
16809  
16810 \end_layout
16811
16812 \end_inset
16813
16814  Clearly, you want the contents of both the 
16815 \family sans
16816 Slide
16817 \family default
16818  and the 
16819 \family sans
16820 Overlay
16821 \family default
16822  to each fit on a single physical slide! You should probably consider an
16823  
16824 \family sans
16825 Overlay
16826 \family default
16827  as 
16828 \begin_inset Quotes eld
16829 \end_inset
16830
16831 part of
16832 \begin_inset Quotes erd
16833 \end_inset
16834
16835  a 
16836 \family sans
16837 Slide
16838 \family default
16839 .
16840  Indeed, the LyX 
16841 \family sans
16842 slides
16843 \family default
16844  class provides a visual cue for this: the label at the start of an 
16845 \family sans
16846 Overlay
16847 \family default
16848  is shorter than that at the start of a 
16849 \family sans
16850 Slide
16851 \family default
16852 .
16853  Lastly, when you generate printable output, you'll find alignment markers
16854  in all four corners of both the 
16855 \family sans
16856 Overlay
16857 \family default
16858  page and its parent 
16859 \family sans
16860 Slide
16861 \family default
16862 .
16863  These will assist you in lining up the two physical slides.
16864 \end_layout
16865
16866 \begin_layout Standard
16867 The major problem in overlaying two slides is aligning the contents of the
16868  two transparencies.
16869  How much space should you leave for that graph on the second slide? Worse
16870  still, what if you want a graph and a sentence on second slide, but there
16871  is text on the main transparency that goes in between them? You could try
16872  and insert vertical space of the right size.
16873  The better way is to use 
16874 \family sans
16875 InvisibleText
16876 \family default
16877  and 
16878 \family sans
16879 VisibleText
16880 \family default
16881 .
16882 \end_layout
16883
16884 \begin_layout Standard
16885 As their names imply, 
16886 \family sans
16887 InvisibleText
16888 \family default
16889  and 
16890 \family sans
16891 VisibleText
16892 \family default
16893  are two command-like paragraph environments that make all subsequent text
16894  invisible and visible, respectively.
16895  Note from section
16896 \begin_inset space ~
16897 \end_inset
16898
16899
16900 \begin_inset CommandInset ref
16901 LatexCommand ref
16902 reference "sec:slideQuirk"
16903
16904 \end_inset
16905
16906  that you don't place anything 
16907 \emph on
16908 into
16909 \emph default
16910  these two environments, however.
16911  When you create an 
16912 \family sans
16913 InvisibleText
16914 \family default
16915 , it inserts a centered, sky-blue label into the page reading 
16916 \begin_inset Quotes eld
16917 \end_inset
16918
16919 <Invisible Text Follows>
16920 \begin_inset Quotes erd
16921 \end_inset
16922
16923 .
16924  For paragraphs following this label, the parts of the 
16925 \family sans
16926 Slide
16927 \family default
16928  [or 
16929 \family sans
16930 Overlay
16931 \family default
16932 ; it doesn't matter which] where they would be contain instead blank space.
16933  
16934 \end_layout
16935
16936 \begin_layout Standard
16937 For 
16938 \family sans
16939 VisibleText
16940 \family default
16941 , the corresponding centered label is 
16942 \begin_inset Quotes eld
16943 \end_inset
16944
16945 <Visible Text Follows>
16946 \begin_inset Quotes erd
16947 \end_inset
16948
16949  in blazing green.
16950  Paragraphs following this label behave normally.
16951  Note that the beginning of a new 
16952 \family sans
16953 Slide
16954 \family default
16955
16956 \family sans
16957 Overlay
16958 \family default
16959 , or 
16960 \family sans
16961 Note
16962 \family default
16963  automatically shuts off an 
16964 \family sans
16965 InvisibleText
16966 \family default
16967 .
16968  It's therefore not necessary to use 
16969 \family sans
16970 VisibleText
16971 \family default
16972  at the end of a 
16973 \family sans
16974 Slide
16975 \family default
16976 .
16977 \end_layout
16978
16979 \begin_layout Standard
16980 By now, it should be obvious how to create overlay transparencies using
16981  the proper combination of 
16982 \family sans
16983 InvisibleText
16984 \family default
16985  and 
16986 \family sans
16987 VisibleText
16988 \family default
16989  on a 
16990 \family sans
16991 Slide
16992 \family default
16993  and 
16994 \family sans
16995 Overlay
16996 \family default
16997 :
16998 \end_layout
16999
17000 \begin_layout Enumerate
17001 Create a 
17002 \family sans
17003 Slide
17004 \family default
17005 , including everything that will appear on it, whether on the main slide
17006  or on the 
17007 \family sans
17008 Overlay
17009 \family default
17010 .
17011 \end_layout
17012
17013 \begin_layout Enumerate
17014 Before each figure or paragraph that will appear only on the 
17015 \family sans
17016 Overlay
17017 \family default
17018 , insert an 
17019 \family sans
17020 InvisibleText
17021 \family default
17022  environment.
17023  If necessary, insert a 
17024 \family sans
17025 VisibleText
17026 \family default
17027  environment after the 
17028 \family sans
17029 Overlay
17030 \family default
17031 -only text.
17032 \end_layout
17033
17034 \begin_layout Enumerate
17035 Start an 
17036 \family sans
17037 Overlay
17038 \family default
17039  immediately following the 
17040 \family sans
17041 Slide
17042 \family default
17043 .
17044 \end_layout
17045
17046 \begin_layout Enumerate
17047 Copy the contents of this 
17048 \family sans
17049 Slide
17050 \family default
17051  into the 
17052 \family sans
17053 Overlay
17054 \family default
17055 .
17056 \end_layout
17057
17058 \begin_layout Enumerate
17059 Within the 
17060 \family sans
17061 Overlay
17062 \family default
17063 , change all of the 
17064 \family sans
17065 InvisibleText
17066 \family default
17067  lines to 
17068 \family sans
17069 VisibleText
17070 \family default
17071  and vice-versa.
17072 \end_layout
17073
17074 \begin_layout Standard
17075 That's it.
17076  You've just made an 
17077 \family sans
17078 Overlay
17079 \family default
17080 .
17081 \end_layout
17082
17083 \begin_layout Standard
17084 There's one problem with the way I've designed the LyX 
17085 \family sans
17086 slides
17087 \family default
17088  class: you can't make text in the middle of a paragraph invisible, nor
17089  make text in the middle of an invisible paragraph visible again.
17090  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17091 \begin_inset Foot
17092 status collapsed
17093
17094 \begin_layout Plain Layout
17095 The commands of interest are: 
17096 \end_layout
17097
17098 \begin_layout Itemize
17099
17100 \family typewriter
17101 {
17102 \backslash
17103 invisible \SpecialChar \ldots{}
17104  }
17105 \end_layout
17106
17107 \begin_layout Itemize
17108
17109 \family typewriter
17110 {
17111 \backslash
17112 visible \SpecialChar \ldots{}
17113  }
17114 \end_layout
17115
17116 \begin_layout Plain Layout
17117 \SpecialChar \ldots{}
17118 and need to be marked as TeX.
17119  The text whose 
17120 \begin_inset Quotes eld
17121 \end_inset
17122
17123 visibility
17124 \begin_inset Quotes erd
17125 \end_inset
17126
17127  you wish to change goes in between the brackets [and after the 
17128 \family typewriter
17129
17130 \backslash
17131 invisible
17132 \family default
17133  or 
17134 \family typewriter
17135
17136 \backslash
17137 visible
17138 \family default
17139  command].
17140  If you don't know how to mark text as TeX, see the appropriate section
17141  of the 
17142 \emph on
17143 User's Guide
17144 \emph default
17145 .
17146 \end_layout
17147
17148 \end_inset
17149
17150
17151 \end_layout
17152
17153 \begin_layout Subsubsection
17154 Using 
17155 \family sans
17156 Note
17157 \family default
17158  with 
17159 \family sans
17160 Slide
17161 \family default
17162
17163 \begin_inset CommandInset label
17164 LatexCommand label
17165 name "sec:slideNote"
17166
17167 \end_inset
17168
17169
17170 \end_layout
17171
17172 \begin_layout Standard
17173 Like an 
17174 \family sans
17175 Overlay
17176 \family default
17177 , a 
17178 \family sans
17179 Note
17180 \family default
17181  is associated with a 
17182 \begin_inset Quotes eld
17183 \end_inset
17184
17185 parent
17186 \begin_inset Quotes erd
17187 \end_inset
17188
17189  
17190 \family sans
17191 Slide
17192 \family default
17193 .
17194  Here, too, the LyX 
17195 \family sans
17196 slides
17197 \family default
17198  class provides visual cues.
17199  The label for a 
17200 \family sans
17201 Note
17202 \family default
17203  is shorter than that of a 
17204 \family sans
17205 Slide
17206 \family default
17207  [yet longer than that of an 
17208 \family sans
17209 Overlay
17210 \family default
17211 ] and, like the label of an 
17212 \family sans
17213 Overlay
17214 \family default
17215  is shockingly magenta.
17216  Additionally, the printed 
17217 \family sans
17218 Note
17219 \family default
17220  has the page number of its 
17221 \begin_inset Quotes eld
17222 \end_inset
17223
17224 parent
17225 \begin_inset Quotes erd
17226 \end_inset
17227
17228  
17229 \family sans
17230 Slide
17231 \family default
17232 , appended by 
17233 \begin_inset Quotes eld
17234 \end_inset
17235
17236
17237 \family typewriter
17238 -
17239 \family default
17240 1
17241 \begin_inset Quotes erd
17242 \end_inset
17243
17244
17245 \begin_inset Quotes eld
17246 \end_inset
17247
17248
17249 \family typewriter
17250 -
17251 \family default
17252 2
17253 \begin_inset Quotes erd
17254 \end_inset
17255
17256
17257 \begin_inset Quotes eld
17258 \end_inset
17259
17260
17261 \family typewriter
17262 -
17263 \family default
17264 3
17265 \begin_inset Quotes erd
17266 \end_inset
17267
17268 , etc.
17269  You can have multiple 
17270 \family sans
17271 Note
17272 \family default
17273 s associated with a single 
17274 \family sans
17275 Slide
17276 \family default
17277 , and, as with 
17278 \family sans
17279 Slide
17280 \family default
17281  and 
17282 \family sans
17283 Overlay
17284 \family default
17285 , you'll probably want to break up long 
17286 \family sans
17287 Note
17288 \family default
17289 s so that they fit on a single sheet of paper.
17290 \end_layout
17291
17292 \begin_layout Standard
17293 The purpose of a 
17294 \family sans
17295 Note
17296 \family default
17297  is obvious: it contains anything additional you might want to say about
17298  a 
17299 \family sans
17300 Slide
17301 \family default
17302 .
17303  It could also be used as a sheet of reminders for a particular 
17304 \family sans
17305 Slide
17306 \family default
17307 .
17308  In the case of the latter, you might want to make use of time markers.
17309  Currently, the LyX 
17310 \family sans
17311 slides
17312 \family default
17313  class has no 
17314 \begin_inset Quotes eld
17315 \end_inset
17316
17317 native
17318 \begin_inset Quotes erd
17319 \end_inset
17320
17321  support for time markers, a 
17322 \noun on
17323 SliTeX
17324 \noun default
17325  feature.
17326  So, you'll have to resort to using the LaTeX codes.
17327 \end_layout
17328
17329 \begin_layout Standard
17330 To use time markers, you'll need to specify the extra class option 
17331 \begin_inset Quotes eld
17332 \end_inset
17333
17334
17335 \family typewriter
17336 clock
17337 \family default
17338
17339 \begin_inset Quotes erd
17340 \end_inset
17341
17342  [see section
17343 \begin_inset space ~
17344 \end_inset
17345
17346
17347 \begin_inset CommandInset ref
17348 LatexCommand ref
17349 reference "sec:slidesetup"
17350
17351 \end_inset
17352
17353 ].
17354  This option turns on timing marks, which will appear in the lower-left-hand
17355  corner of every 
17356 \family sans
17357 Note
17358 \family default
17359  you generate.
17360  To set what appears in the time marker, you use the LaTeX commands 
17361 \begin_inset Quotes eld
17362 \end_inset
17363
17364
17365 \family typewriter
17366
17367 \backslash
17368 settime{}
17369 \family default
17370
17371 \begin_inset Quotes erd
17372 \end_inset
17373
17374  and 
17375 \begin_inset Quotes eld
17376 \end_inset
17377
17378
17379 \family typewriter
17380
17381 \backslash
17382 addtime{}
17383 \family default
17384
17385 \begin_inset Quotes erd
17386 \end_inset
17387
17388 .
17389  The arguments of both commands are time measured in seconds.
17390  
17391 \begin_inset Quotes eld
17392 \end_inset
17393
17394
17395 \family typewriter
17396
17397 \backslash
17398 settime{}
17399 \family default
17400
17401 \begin_inset Quotes erd
17402 \end_inset
17403
17404  sets the time marker to a given time.
17405  
17406 \begin_inset Quotes eld
17407 \end_inset
17408
17409
17410 \family typewriter
17411
17412 \backslash
17413 addtime{}
17414 \family default
17415
17416 \begin_inset Quotes erd
17417 \end_inset
17418
17419  increments the time marker by the specified amount.
17420  Using time markers and 
17421 \family sans
17422 Note
17423 \family default
17424 s in this fashion, you can remind yourself how much time to spend on a particula
17425
17426 \family sans
17427 Slide
17428 \family default
17429 .
17430 \end_layout
17431
17432 \begin_layout Standard
17433 There's one last feature to describe.
17434  Clearly, you'd like to print out all of your 
17435 \family sans
17436 Slide
17437 \family default
17438 s and 
17439 \family sans
17440 Overlay
17441 \family default
17442 s on transparencies while printing all of your 
17443 \family sans
17444 Note
17445 \family default
17446 s on plain paper.
17447  However, a 
17448 \family sans
17449 Note
17450 \family default
17451  
17452 \emph on
17453 must
17454 \emph default
17455  follow the 
17456 \family sans
17457 Slide
17458 \family default
17459  with which it is associated.
17460  What's a person to do?
17461 \end_layout
17462
17463 \begin_layout Standard
17464 Luckily, there are two LaTeX commands that allow you to select what to print
17465  out.
17466  Both must be placed into the preamble of your document.
17467  The command 
17468 \begin_inset Quotes eld
17469 \end_inset
17470
17471
17472 \family typewriter
17473
17474 \backslash
17475 onlyslides{
17476 \backslash
17477 slides}
17478 \family default
17479
17480 \begin_inset Quotes erd
17481 \end_inset
17482
17483  will cause the output to contain only the 
17484 \family sans
17485 Slide
17486 \family default
17487 s and 
17488 \family sans
17489 Overlay
17490 \family default
17491 s.
17492  Correspondingly, the command 
17493 \begin_inset Quotes eld
17494 \end_inset
17495
17496
17497 \family typewriter
17498
17499 \backslash
17500 onlynotes{
17501 \backslash
17502 notes}
17503 \family default
17504
17505 \begin_inset Quotes erd
17506 \end_inset
17507
17508  prevents the output of anything but 
17509 \family sans
17510 Note
17511 \family default
17512 s.
17513  I'd advise placing both commands in the preamble and initially comment
17514  both out.
17515  You can then preview your entire presentation as you write.
17516  When you're done writing, you can then uncomment one of the two to select
17517  what you want to print.
17518  I like to uncomment 
17519 \begin_inset Quotes eld
17520 \end_inset
17521
17522
17523 \family typewriter
17524
17525 \backslash
17526 onlyslides{
17527 \backslash
17528 slides}
17529 \family default
17530
17531 \begin_inset Quotes erd
17532 \end_inset
17533
17534  , print to a file with 
17535 \begin_inset Quotes eld
17536 \end_inset
17537
17538
17539 \family typewriter
17540 -slides
17541 \family default
17542
17543 \begin_inset Quotes erd
17544 \end_inset
17545
17546  in its name, comment it back out, then uncomment 
17547 \begin_inset Quotes eld
17548 \end_inset
17549
17550
17551 \family typewriter
17552
17553 \backslash
17554 onlynotes{
17555 \backslash
17556 notes}
17557 \family default
17558
17559 \begin_inset Quotes erd
17560 \end_inset
17561
17562  and print to a 
17563 \begin_inset Quotes eld
17564 \end_inset
17565
17566
17567 \family typewriter
17568 *-notes.ps
17569 \family default
17570
17571 \begin_inset Quotes erd
17572 \end_inset
17573
17574  file.
17575  I can then send either file to a printer, loading transparencies or plain
17576  paper as appropriate.
17577 \end_layout
17578
17579 \begin_layout Standard
17580 You can also provide other arguments to the 
17581 \begin_inset Quotes eld
17582 \end_inset
17583
17584
17585 \family typewriter
17586
17587 \backslash
17588 onlyslides{}
17589 \family default
17590
17591 \begin_inset Quotes erd
17592 \end_inset
17593
17594  and 
17595 \begin_inset Quotes eld
17596 \end_inset
17597
17598
17599 \family typewriter
17600
17601 \backslash
17602 onlynotes{}
17603 \family default
17604
17605 \begin_inset Quotes erd
17606 \end_inset
17607
17608  commands.
17609  See a good LaTeX book for details.
17610 \end_layout
17611
17612 \begin_layout Subsection
17613 The 
17614 \family sans
17615 slides
17616 \family default
17617  Class Template File
17618 \end_layout
17619
17620 \begin_layout Standard
17621 I have also provided a template file, 
17622 \begin_inset Quotes eld
17623 \end_inset
17624
17625
17626 \family typewriter
17627 slides.lyx
17628 \family default
17629
17630 \begin_inset Quotes erd
17631 \end_inset
17632
17633 , with the 
17634 \family sans
17635 slides
17636 \family default
17637  class.
17638  To use it, begin your new presentation with 
17639 \family sans
17640 \bar under
17641 F
17642 \bar default
17643 ile\SpecialChar \menuseparator
17644 New
17645 \begin_inset space ~
17646 \end_inset
17647
17648 from
17649 \begin_inset space ~
17650 \end_inset
17651
17652
17653 \bar under
17654 T
17655 \bar default
17656 emplate
17657 \family default
17658 .
17659  Your new LyX presentation file will contain an example 
17660 \family sans
17661 Slide
17662 \family default
17663  – 
17664 \family sans
17665 Overlay
17666 \family default
17667  – 
17668 \family sans
17669 Note
17670 \family default
17671  triplet.
17672  The 
17673 \family sans
17674 Slide
17675 \family default
17676  and 
17677 \family sans
17678 Overlay
17679 \family default
17680  additionally contain an example of the use of 
17681 \family sans
17682 InvisibleText
17683 \family default
17684  and 
17685 \family sans
17686 VisibleText
17687 \family default
17688 .
17689  Lastly, the preamble will contain:
17690 \end_layout
17691
17692 \begin_layout LyX-Code
17693 % Uncomment to print out only slides and overlays
17694 \end_layout
17695
17696 \begin_layout LyX-Code
17697 %
17698 \end_layout
17699
17700 \begin_layout LyX-Code
17701 %
17702 \backslash
17703 onlyslides{
17704 \backslash
17705 slides}
17706 \begin_inset Newline newline
17707 \end_inset
17708
17709  
17710 \end_layout
17711
17712 \begin_layout LyX-Code
17713 % Uncomment to print out only notes
17714 \end_layout
17715
17716 \begin_layout LyX-Code
17717 %
17718 \end_layout
17719
17720 \begin_layout LyX-Code
17721 %
17722 \backslash
17723 onlynotes{
17724 \backslash
17725 notes}
17726 \end_layout
17727
17728 \begin_layout Standard
17729 One final thing: I created this class to support the LaTeX2e 
17730 \begin_inset Quotes eld
17731 \end_inset
17732
17733
17734 \noun on
17735 SliTeX
17736 \noun default
17737  emulation
17738 \begin_inset Quotes erd
17739 \end_inset
17740
17741  class, one of the built-in LaTeX2e classes.
17742  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17743  built-in slide class.
17744  It's here if you want it or need it.
17745  There exist other LaTeX2e classes for creating presentations, such as the
17746  
17747 \family sans
17748 Foils
17749 \family default
17750  class [see section
17751 \begin_inset space ~
17752 \end_inset
17753
17754
17755 \begin_inset CommandInset ref
17756 LatexCommand ref
17757 reference "sec:foiltex"
17758
17759 \end_inset
17760
17761 ] or the 
17762 \begin_inset Quotes eld
17763 \end_inset
17764
17765
17766 \family typewriter
17767 seminar
17768 \family default
17769
17770 \begin_inset Quotes erd
17771 \end_inset
17772
17773  package [present on some TeX distributions].
17774  The latter is not yet supported under LyX.
17775 \begin_inset Foot
17776 status collapsed
17777
17778 \begin_layout Plain Layout
17779 Perhaps you can take on the task\SpecialChar \ldots{}
17780
17781 \end_layout
17782
17783 \end_inset
17784
17785  I know nothing about these other classes.
17786  Try them out to see what sort of alternative they provide.
17787 \end_layout
17788
17789 \begin_layout Chapter
17790 LyX Features needing Extra Software
17791 \end_layout
17792
17793 \begin_layout Section
17794 Checking TeX
17795 \end_layout
17796
17797 \begin_layout Standard
17798 by 
17799 \noun on
17800 Asger Alstrup
17801 \end_layout
17802
17803 \begin_layout Subsection
17804 Introduction
17805 \end_layout
17806
17807 \begin_layout Standard
17808 If you have the 
17809 \family typewriter
17810 chktex
17811 \family default
17812  program installed
17813 \begin_inset Foot
17814 status collapsed
17815
17816 \begin_layout Plain Layout
17817
17818 \family typewriter
17819 chktex
17820 \family default
17821  is not yet available when you are using the LaTeX distribution MiKTeX.
17822 \end_layout
17823
17824 \end_inset
17825
17826 , you'll find in the 
17827 \family sans
17828 Tools
17829 \family default
17830  menu the entry: 
17831 \family sans
17832 Check
17833 \begin_inset space ~
17834 \end_inset
17835
17836 TeX
17837 \family default
17838 .
17839  You can get 
17840 \family typewriter
17841 chktex
17842 \family default
17843  from CTAN, 
17844 \begin_inset CommandInset href
17845 LatexCommand href
17846 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17847
17848 \end_inset
17849
17850 .
17851 \end_layout
17852
17853 \begin_layout Standard
17854 The 
17855 \family sans
17856 ChkTeX
17857 \family default
17858  package is a program that was written by 
17859 \begin_inset Flex Noun
17860 status collapsed
17861
17862 \begin_layout Plain Layout
17863 Jens T.
17864 \begin_inset space ~
17865 \end_inset
17866
17867 Berger Thielemann
17868 \end_layout
17869
17870 \end_inset
17871
17872  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17873  and easy to forget.
17874  The program runs over your LaTeX file, checks the integrity of the file,
17875  and flags some common errors.
17876  In other technical words, it is 
17877 \family typewriter
17878 lint
17879 \family default
17880  for LaTeX.
17881 \end_layout
17882
17883 \begin_layout Standard
17884 Well, what is a syntax checker doing in LyX which is supposed to produce
17885  correct LaTeX anyways? The answer is simple: Just as 
17886 \family typewriter
17887 Lint
17888 \family default
17889  not only checks the 
17890 \emph on
17891 syntax
17892 \emph default
17893  of C programs, but also does 
17894 \emph on
17895 semantic
17896 \emph default
17897  checks for type-errors, 
17898 \family sans
17899 ChkTeX
17900 \family default
17901  catches some common 
17902 \emph on
17903 typographic
17904 \emph default
17905  errors, in addition to the syntactical ones.
17906  Specifically, 
17907 \family sans
17908 ChkTeX
17909 \family default
17910  is capable of detecting several common errors, such as
17911 \end_layout
17912
17913 \begin_layout Itemize
17914 Ellipsis detection:
17915 \begin_inset Newline newline
17916 \end_inset
17917
17918 Use \SpecialChar \ldots{}
17919  instead of ...
17920 \end_layout
17921
17922 \begin_layout Itemize
17923 No space in front of/after parenthesis:
17924 \begin_inset Newline newline
17925 \end_inset
17926
17927 ( wrong spacing )
17928 \end_layout
17929
17930 \begin_layout Itemize
17931 Enforcement of normal space after common abbreviations:
17932 \begin_inset Newline newline
17933 \end_inset
17934
17935 e.
17936 \begin_inset space \thinspace{}
17937 \end_inset
17938
17939 g.
17940 \begin_inset space \space{}
17941 \end_inset
17942
17943 is too wide spacing.
17944 \end_layout
17945
17946 \begin_layout Itemize
17947 Enforcement of end-of-sentence space when the last sentence ends with a
17948  capital letter:
17949 \begin_inset Newline newline
17950 \end_inset
17951
17952 This is a TEST.
17953  And this is wrong spacing.
17954 \end_layout
17955
17956 \begin_layout Itemize
17957 Space in front of labels and similar commands:
17958 \begin_inset Newline newline
17959 \end_inset
17960
17961 The label should stick right up to the text to avoid falling to a wrong
17962  page.
17963  
17964 \begin_inset CommandInset label
17965 LatexCommand label
17966 name "sec:chktex"
17967
17968 \end_inset
17969
17970  
17971 \begin_inset Foot
17972 status collapsed
17973
17974 \begin_layout Plain Layout
17975 This footnote is in danger of falling off to a wrong page
17976 \end_layout
17977
17978 \end_inset
17979
17980  The label is separated too much.
17981 \end_layout
17982
17983 \begin_layout Itemize
17984 Space in front of references, instead of hard spaces:
17985 \begin_inset Newline newline
17986 \end_inset
17987
17988 If you have bad luck, the text will break right between the referenced text
17989  and reference number, and that's a pity.
17990  See section 
17991 \begin_inset CommandInset ref
17992 LatexCommand ref
17993 reference "sec:chktex"
17994
17995 \end_inset
17996
17997 .
17998 \end_layout
17999
18000 \begin_layout Itemize
18001 Use of 
18002 \begin_inset Quotes eld
18003 \end_inset
18004
18005 x
18006 \begin_inset Quotes erd
18007 \end_inset
18008
18009  instead of 
18010 \begin_inset Formula $\times$
18011 \end_inset
18012
18013  between numbers:
18014 \begin_inset Newline newline
18015 \end_inset
18016
18017 2x2 looks cheap compared to 
18018 \begin_inset Formula $2\times2$
18019 \end_inset
18020
18021 .
18022 \end_layout
18023
18024 \begin_layout Standard
18025 and more \SpecialChar \ldots{}
18026  It is an invaluable tool when you are 
18027 \begin_inset Quotes eld
18028 \end_inset
18029
18030 finishing up
18031 \begin_inset Quotes erd
18032 \end_inset
18033
18034  your document before printing, and you should run it right after the obligatory
18035  spelling check, and before you go fine tuning the typesetting.
18036 \end_layout
18037
18038 \begin_layout Subsection
18039 How to use it
18040 \end_layout
18041
18042 \begin_layout Standard
18043 If you have the program installed, usage is as simple as choosing 
18044 \family sans
18045 Tools\SpecialChar \menuseparator
18046 Check
18047 \begin_inset space ~
18048 \end_inset
18049
18050 TeX
18051 \family default
18052 .
18053  This will make LyX generate a LaTeX file of your document, start 
18054 \family sans
18055 ChkTeX
18056 \family default
18057  to check it, and then make LyX insert 
18058 \begin_inset Quotes eld
18059 \end_inset
18060
18061 error boxes
18062 \begin_inset Quotes erd
18063 \end_inset
18064
18065  with the warnings from 
18066 \family sans
18067 ChkTeX
18068 \family default
18069 , if there were any.
18070  The warnings will be placed close to the point of the mistake, and you
18071  can quickly find them by using the 
18072 \family sans
18073 Navigate\SpecialChar \menuseparator
18074 Error
18075 \family default
18076  menu item, or the shortcut key 
18077 \family sans
18078 C-g
18079 \family default
18080  from the default 
18081 \family typewriter
18082 cua
18083 \family default
18084  bind file.
18085  Open the error boxes by clicking on them with the mouse, or use the shortcut
18086  key 
18087 \family sans
18088 C-i
18089 \family default
18090  from 
18091 \family typewriter
18092 cua
18093 \family default
18094  bindings, or the corresponding 
18095 \family sans
18096 C-o
18097 \family default
18098  for the alternate 
18099 \family typewriter
18100 emacs
18101 \family default
18102  bind file.
18103  Read the warning and correct the mistake, if it is a mistake.
18104  If you have trouble understanding what the warning is about, you can safely
18105  ignore it.
18106  Remember that there is a hidden layer between the document on screen and
18107  the technical details in invoking 
18108 \family sans
18109 ChkTeX
18110 \family default
18111 , and this gap can make some warnings seem arcane or just plain silly.
18112 \end_layout
18113
18114 \begin_layout Standard
18115 This document is an excellent testing bed for the feature, and it should
18116  provide quite a few warnings for you to fiddle with.
18117  Since computers are only so smart, expect most of the warnings to be false
18118  alarms, though.
18119 \end_layout
18120
18121 \begin_layout Subsection
18122 How to fine tune it
18123 \end_layout
18124
18125 \begin_layout Standard
18126 Sometimes, you'll find that 
18127 \family sans
18128 ChkTeX
18129 \family default
18130  makes more noise than suits your mood.
18131  Then you can choose not to use it, wait until your mood changes, or try
18132  to customize 
18133 \family sans
18134 ChkTeX
18135 \family default
18136  to get better along with you.
18137 \end_layout
18138
18139 \begin_layout Standard
18140 Although 
18141 \family sans
18142 ChkTeX
18143 \family default
18144  
18145 \emph on
18146 is
18147 \emph default
18148  very configurable and extensible, you shouldn't expect to solve all problems
18149  with 
18150 \family sans
18151 ChkTeX
18152 \family default
18153  in LyX this way.
18154  Since LyX has to generate a somewhat special LaTeX file to be able to match
18155  the line numbers from the 
18156 \family sans
18157 ChkTeX
18158 \family default
18159  output
18160 \begin_inset Foot
18161 status collapsed
18162
18163 \begin_layout Plain Layout
18164 You can inspect the specific output from 
18165 \family sans
18166 chktex
18167 \family default
18168  by using 
18169 \family sans
18170 Edit\SpecialChar \menuseparator
18171 View
18172 \begin_inset space ~
18173 \end_inset
18174
18175 LaTeX
18176 \begin_inset space ~
18177 \end_inset
18178
18179 Log
18180 \family default
18181  right after a 
18182 \family sans
18183 chktex
18184 \family default
18185  run.
18186 \end_layout
18187
18188 \end_inset
18189
18190  to the internal document structure, some of the warnings will not appear
18191  correctly.
18192  There are two things you can do about this:
18193 \end_layout
18194
18195 \begin_layout Itemize
18196 Fine tune the 
18197 \family sans
18198 ChkTeX
18199 \family default
18200  invocation command line in 
18201 \begin_inset Flex MenuItem
18202 status collapsed
18203
18204 \begin_layout Plain Layout
18205 Tools\SpecialChar \menuseparator
18206 Preferences\SpecialChar \menuseparator
18207 Output\SpecialChar \menuseparator
18208 LaTeX\SpecialChar \menuseparator
18209 CheckTeX command
18210 \end_layout
18211
18212 \end_inset
18213
18214 , or the global 
18215 \family sans
18216 ChkTeX
18217 \family default
18218  installation configuration file (usually with the file 
18219 \family typewriter
18220 chktexrc
18221 \family default
18222 ).
18223  See below to learn what warnings can be enabled and disabled on the command
18224  line.
18225 \end_layout
18226
18227 \begin_layout Itemize
18228 Export your document as a raw LaTeX file using 
18229 \family sans
18230 File\SpecialChar \menuseparator
18231 Export\SpecialChar \menuseparator
18232 LaTeX
18233 \family default
18234  and run 
18235 \family typewriter
18236 chktex
18237 \family default
18238  manually on that.
18239  Invoked in this way, it can be a hassle to find the corresponding place
18240  in the document inside LyX, but with a little patience, you should be able
18241  to do it.
18242 \end_layout
18243
18244 \begin_layout Standard
18245 Here follows the warning messages that can be enabled and disabled in 
18246 \family sans
18247 Preferences
18248 \family default
18249 .
18250  Use 
18251 \family typewriter
18252 -n#
18253 \family default
18254  to disable a warning, and 
18255 \family typewriter
18256 -w#
18257 \family default
18258  to enable a warning.
18259  The emphasized entries are disabled by default, because the default is
18260  "
18261 \family typewriter
18262 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18263 \family default
18264 ".
18265 \end_layout
18266
18267 \begin_layout Standard
18268 Notice that you should only use the options that enable and disable warnings,
18269  because LyX relies on some of the other command line parameters to be set
18270  in a specific way to have a chance to communicate with 
18271 \family typewriter
18272 chktex
18273 \family default
18274 .
18275 \end_layout
18276
18277 \begin_layout Enumerate
18278
18279 \size small
18280 \emph on
18281 Command terminated with space.
18282 \end_layout
18283
18284 \begin_layout Enumerate
18285
18286 \size small
18287 Non-breaking space (
18288 \begin_inset Quotes eld
18289 \end_inset
18290
18291
18292 \family typewriter
18293 ~
18294 \family default
18295
18296 \begin_inset Quotes erd
18297 \end_inset
18298
18299 ) should have been used.
18300 \end_layout
18301
18302 \begin_layout Enumerate
18303
18304 \size small
18305 \emph on
18306 You should enclose the previous parenthesis with 
18307 \begin_inset Quotes eld
18308 \end_inset
18309
18310
18311 \family typewriter
18312 {}
18313 \family default
18314
18315 \begin_inset Quotes erd
18316 \end_inset
18317
18318 .
18319 \end_layout
18320
18321 \begin_layout Enumerate
18322
18323 \size small
18324 Italic correction (
18325 \begin_inset Quotes eld
18326 \end_inset
18327
18328
18329 \family typewriter
18330
18331 \backslash
18332 /
18333 \family default
18334
18335 \begin_inset Quotes erd
18336 \end_inset
18337
18338 ) found in non-italic buffer.
18339 \end_layout
18340
18341 \begin_layout Enumerate
18342
18343 \size small
18344 Italic correction (
18345 \begin_inset Quotes eld
18346 \end_inset
18347
18348
18349 \family typewriter
18350
18351 \backslash
18352 /
18353 \family default
18354
18355 \begin_inset Quotes erd
18356 \end_inset
18357
18358 ) found more than once.
18359 \end_layout
18360
18361 \begin_layout Enumerate
18362
18363 \size small
18364 \emph on
18365 No italic correction (
18366 \begin_inset Quotes eld
18367 \end_inset
18368
18369
18370 \family typewriter
18371
18372 \backslash
18373 /
18374 \family default
18375
18376 \begin_inset Quotes erd
18377 \end_inset
18378
18379 ) found.
18380 \end_layout
18381
18382 \begin_layout Enumerate
18383
18384 \size small
18385 Accent command 
18386 \begin_inset Quotes eld
18387 \end_inset
18388
18389
18390 \family typewriter
18391 cmd
18392 \family default
18393
18394 \begin_inset Quotes erd
18395 \end_inset
18396
18397  needs use of 
18398 \begin_inset Quotes eld
18399 \end_inset
18400
18401
18402 \family typewriter
18403 cmd
18404 \family default
18405
18406 \begin_inset Quotes erd
18407 \end_inset
18408
18409 .
18410 \end_layout
18411
18412 \begin_layout Enumerate
18413
18414 \size small
18415 Wrong length of dash may have been used.
18416 \end_layout
18417
18418 \begin_layout Enumerate
18419
18420 \size small
18421 \emph on
18422 \begin_inset Quotes eld
18423 \end_inset
18424
18425
18426 \family typewriter
18427 %s
18428 \family default
18429
18430 \begin_inset Quotes erd
18431 \end_inset
18432
18433  expected, found 
18434 \begin_inset Quotes eld
18435 \end_inset
18436
18437
18438 \family typewriter
18439 %s
18440 \family default
18441
18442 \begin_inset Quotes erd
18443 \end_inset
18444
18445 .
18446 \end_layout
18447
18448 \begin_layout Enumerate
18449
18450 \size small
18451 Solo 
18452 \begin_inset Quotes eld
18453 \end_inset
18454
18455
18456 \family typewriter
18457 %s
18458 \family default
18459
18460 \begin_inset Quotes erd
18461 \end_inset
18462
18463  found.
18464 \end_layout
18465
18466 \begin_layout Enumerate
18467
18468 \size small
18469 You should use 
18470 \begin_inset Quotes eld
18471 \end_inset
18472
18473
18474 \family typewriter
18475 %s
18476 \family default
18477
18478 \begin_inset Quotes erd
18479 \end_inset
18480
18481  to achieve an ellipsis.
18482 \end_layout
18483
18484 \begin_layout Enumerate
18485
18486 \size small
18487 Inter-word spacing (
18488 \begin_inset Quotes eld
18489 \end_inset
18490
18491
18492 \family typewriter
18493
18494 \backslash
18495
18496 \family default
18497  
18498 \begin_inset Quotes eld
18499 \end_inset
18500
18501 ) should perhaps be used.
18502 \end_layout
18503
18504 \begin_layout Enumerate
18505
18506 \size small
18507 Inter-sentence spacing (
18508 \begin_inset Quotes eld
18509 \end_inset
18510
18511
18512 \family typewriter
18513
18514 \backslash
18515 @
18516 \family default
18517
18518 \begin_inset Quotes erd
18519 \end_inset
18520
18521 ) should perhaps be used.
18522 \end_layout
18523
18524 \begin_layout Enumerate
18525
18526 \size small
18527 Could not find argument for command.
18528 \end_layout
18529
18530 \begin_layout Enumerate
18531
18532 \size small
18533 No match found for 
18534 \begin_inset Quotes eld
18535 \end_inset
18536
18537
18538 \family typewriter
18539 %s
18540 \family default
18541
18542 \begin_inset Quotes erd
18543 \end_inset
18544
18545 .
18546 \end_layout
18547
18548 \begin_layout Enumerate
18549
18550 \size small
18551 Math mode still on at end of LaTeX file.
18552 \end_layout
18553
18554 \begin_layout Enumerate
18555
18556 \size small
18557 Number of 
18558 \begin_inset Quotes eld
18559 \end_inset
18560
18561
18562 \family typewriter
18563 char
18564 \family default
18565
18566 \begin_inset Quotes erd
18567 \end_inset
18568
18569  doesn't match the number of 
18570 \begin_inset Quotes eld
18571 \end_inset
18572
18573
18574 \family typewriter
18575 char
18576 \family default
18577
18578 \begin_inset Quotes erd
18579 \end_inset
18580
18581 .
18582 \end_layout
18583
18584 \begin_layout Enumerate
18585
18586 \size small
18587 You should use either 
18588 \family typewriter
18589
18590 \begin_inset Quotes eld
18591 \end_inset
18592
18593
18594 \family default
18595  or 
18596 \family typewriter
18597
18598 \begin_inset Quotes erd
18599 \end_inset
18600
18601
18602 \family default
18603  as an alternative to 
18604 \begin_inset Quotes eld
18605 \end_inset
18606
18607
18608 \family typewriter
18609 "
18610 \family default
18611
18612 \begin_inset Quotes erd
18613 \end_inset
18614
18615 .
18616 \end_layout
18617
18618 \begin_layout Enumerate
18619
18620 \size small
18621 You should use "
18622 \family typewriter
18623 '
18624 \family default
18625 " (ASCII 39) instead of "
18626 \family typewriter
18627 ´
18628 \family default
18629 " (ASCII 180).
18630 \end_layout
18631
18632 \begin_layout Enumerate
18633
18634 \size small
18635 User-specified pattern found.
18636 \end_layout
18637
18638 \begin_layout Enumerate
18639
18640 \size small
18641 This command might not be intended.
18642 \end_layout
18643
18644 \begin_layout Enumerate
18645
18646 \size small
18647 \emph on
18648 Comment displayed.
18649 \end_layout
18650
18651 \begin_layout Enumerate
18652
18653 \size small
18654 Either 
18655 \family typewriter
18656 ''
18657 \backslash
18658 ,'
18659 \family default
18660  or 
18661 \family typewriter
18662 '
18663 \backslash
18664 ,''
18665 \family default
18666  will look better.
18667 \end_layout
18668
18669 \begin_layout Enumerate
18670
18671 \size small
18672 Delete this space to maintain correct page references.
18673 \end_layout
18674
18675 \begin_layout Enumerate
18676
18677 \size small
18678 \emph on
18679 You might wish to put this between a pair of 
18680 \begin_inset Quotes eld
18681 \end_inset
18682
18683
18684 \family typewriter
18685 {}
18686 \family default
18687
18688 \begin_inset Quotes erd
18689 \end_inset
18690
18691 .
18692 \end_layout
18693
18694 \begin_layout Enumerate
18695
18696 \size small
18697 You ought to remove spaces in front of punctuation.
18698 \end_layout
18699
18700 \begin_layout Enumerate
18701
18702 \size small
18703 Could not execute LaTeX command.
18704 \end_layout
18705
18706 \begin_layout Enumerate
18707
18708 \size small
18709 Don't use 
18710 \family typewriter
18711
18712 \backslash
18713 /
18714 \family default
18715  in front of small punctuation.
18716 \end_layout
18717
18718 \begin_layout Enumerate
18719
18720 \family typewriter
18721 \size small
18722 $
18723 \backslash
18724 times$
18725 \family default
18726  may look prettier here.
18727 \end_layout
18728
18729 \begin_layout Enumerate
18730
18731 \size small
18732 \emph on
18733 Multiple spaces detected in output.
18734 \end_layout
18735
18736 \begin_layout Enumerate
18737
18738 \size small
18739 This text may be ignored.
18740 \end_layout
18741
18742 \begin_layout Enumerate
18743
18744 \size small
18745 Use 
18746 \family typewriter
18747
18748 \begin_inset Quotes eld
18749 \end_inset
18750
18751
18752 \family default
18753  to begin quotation, not 
18754 \family typewriter
18755 '
18756 \family default
18757 .
18758 \end_layout
18759
18760 \begin_layout Enumerate
18761
18762 \size small
18763 Use 
18764 \family typewriter
18765 '
18766 \family default
18767  to end quotation, not 
18768 \family typewriter
18769
18770 \begin_inset Quotes eld
18771 \end_inset
18772
18773
18774 \family default
18775 .
18776 \end_layout
18777
18778 \begin_layout Enumerate
18779
18780 \size small
18781 Don't mix quotes.
18782 \end_layout
18783
18784 \begin_layout Enumerate
18785
18786 \size small
18787 You should perhaps use 
18788 \begin_inset Quotes eld
18789 \end_inset
18790
18791
18792 \family typewriter
18793 cmd
18794 \family default
18795
18796 \begin_inset Quotes erd
18797 \end_inset
18798
18799  instead.
18800 \end_layout
18801
18802 \begin_layout Enumerate
18803
18804 \size small
18805 You should put a space in front of/after parenthesis.
18806 \end_layout
18807
18808 \begin_layout Enumerate
18809
18810 \size small
18811 You should avoid spaces in front of/after parenthesis.
18812 \end_layout
18813
18814 \begin_layout Enumerate
18815
18816 \size small
18817 \emph on
18818 You should not use punctuation in front of/after quotes.
18819 \end_layout
18820
18821 \begin_layout Enumerate
18822
18823 \size small
18824 Double space found.
18825 \end_layout
18826
18827 \begin_layout Enumerate
18828
18829 \size small
18830 You should put punctuation outside inner/inside display math mode.
18831 \end_layout
18832
18833 \begin_layout Enumerate
18834
18835 \size small
18836 You ought to not use primitive TeX in LaTeX code.
18837 \end_layout
18838
18839 \begin_layout Enumerate
18840
18841 \size small
18842 You should remove spaces in front of 
18843 \begin_inset Quotes eld
18844 \end_inset
18845
18846
18847 \family typewriter
18848 %s
18849 \family default
18850
18851 \begin_inset Quotes erd
18852 \end_inset
18853
18854
18855 \end_layout
18856
18857 \begin_layout Enumerate
18858
18859 \size small
18860 \begin_inset Quotes eld
18861 \end_inset
18862
18863
18864 \family typewriter
18865 %s
18866 \family default
18867
18868 \begin_inset Quotes erd
18869 \end_inset
18870
18871  is normally not followed by 
18872 \begin_inset Quotes eld
18873 \end_inset
18874
18875
18876 \family typewriter
18877 %c
18878 \family default
18879
18880 \begin_inset Quotes erd
18881 \end_inset
18882
18883 .
18884 \end_layout
18885
18886 \begin_layout Standard
18887 In later versions of LyX, we hope to provide a more complete interface to
18888  this tool (and it's smaller cousin 
18889 \family typewriter
18890 lacheck
18891 \family default
18892 ) to exploit the full power of it.
18893  But it's not exactly useless as it is now: go try it on one of your existing
18894  documents of a certain length and be surprised.
18895 \end_layout
18896
18897 \begin_layout Section
18898 Version Control in LyX
18899 \end_layout
18900
18901 \begin_layout Standard
18902 by
18903 \noun on
18904  Lars Gullik Bjønnes 
18905 \noun default
18906 and 
18907 \noun on
18908 Pavel Sanda
18909 \end_layout
18910
18911 \begin_layout Subsection
18912 Introduction
18913 \end_layout
18914
18915 \begin_layout Standard
18916 LyX supports some of the most basic RCS/CVS/SVN commands.
18917  If you need something a bit more sophisticated you will have to do that
18918  manually in a terminal.
18919 \end_layout
18920
18921 \begin_layout Standard
18922 Also note that CVS support is not as good as subversion support so we advise
18923  using SVN instead.
18924  A good place to start learning Subversion is SVN Book
18925 \begin_inset Foot
18926 status open
18927
18928 \begin_layout Plain Layout
18929 \begin_inset CommandInset href
18930 LatexCommand href
18931 target "http://svnbook.red-bean.com/"
18932
18933 \end_inset
18934
18935
18936 \end_layout
18937
18938 \end_inset
18939
18940 .
18941  In the case of RCS you should read 
18942 \begin_inset Quotes eld
18943 \end_inset
18944
18945 rcsintro
18946 \begin_inset Quotes erd
18947 \end_inset
18948
18949  (a man file, read it with 
18950 \family typewriter
18951 man rcsintro
18952 \family default
18953 ).
18954  This file describes all the basic features of RCS.
18955  You should especially notice the comment about a RCS directory, and the
18956  notion of a master RCS file (the file ending in 
18957 \family typewriter
18958 ,v
18959 \family default
18960 ).
18961 \end_layout
18962
18963 \begin_layout Standard
18964 Before you begin to use the version control features in LyX, you should
18965  be familiar with RCS/CVS/SVN usage.
18966  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18967  package—no guarantees are made for older versions.
18968  Most of the log messages are not currently displayed after operations —
18969  you can check them in the Messages pane if unsure.
18970  Regular users of version control will appreciate VC toolbar, which can
18971  be enabled via 
18972 \family sans
18973 View\SpecialChar \menuseparator
18974 Toolbars\SpecialChar \menuseparator
18975 Version
18976 \begin_inset space ~
18977 \end_inset
18978
18979 Control
18980 \family default
18981 .
18982 \end_layout
18983
18984 \begin_layout Standard
18985 For introducing your own external commands consult vc-command in the manual
18986  of LyX functions.
18987 \end_layout
18988
18989 \begin_layout Subsection
18990 RCS commands in LyX
18991 \end_layout
18992
18993 \begin_layout Standard
18994 The following sections describe the RCS commands supported by LyX.
18995  You can find them in the 
18996 \family sans
18997 File\SpecialChar \menuseparator
18998 Version
18999 \begin_inset space ~
19000 \end_inset
19001
19002 Control
19003 \family default
19004  submenu.
19005  LyX was tested against RCS 5.7/5.8
19006 \begin_inset Foot
19007 status open
19008
19009 \begin_layout Plain Layout
19010 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19011  in order to work properly with LyX.
19012  In particular time zone (TZ) should be set and more importantly RCSINIT
19013  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19014  expects archive to be found in file.lyx,v within the original document directory.
19015  See also README shipped with Windows RCS binaries.
19016 \end_layout
19017
19018 \end_inset
19019
19020 .
19021 \end_layout
19022
19023 \begin_layout Subsubsection
19024
19025 \family sans
19026 Register
19027 \end_layout
19028
19029 \begin_layout Standard
19030 If your document is not under revision control, this is the only item shown
19031  in the menu.
19032  And if it is under revision control, the 
19033 \family sans
19034 Register
19035 \family default
19036  item is not visible.
19037  
19038 \end_layout
19039
19040 \begin_layout Standard
19041 This command registers your document with RCS (unless you are under the
19042  directory managed by CVS)\SpecialChar \@.
19043  You are asked interactively to supply an initial
19044  description of the document.
19045  The document is now set in Read-Only mode and you have to 
19046 \family sans
19047 Check
19048 \begin_inset space ~
19049 \end_inset
19050
19051 Out
19052 \begin_inset space ~
19053 \end_inset
19054
19055 For
19056 \begin_inset space ~
19057 \end_inset
19058
19059 Edit
19060 \family default
19061 , before making any changes to it.
19062  A document under revision control has a 
19063 \begin_inset Quotes eld
19064 \end_inset
19065
19066 [RCS:<version> <locker>]
19067 \begin_inset Quotes erd
19068 \end_inset
19069
19070  item tagged to the filename in the minibuffer.
19071 \end_layout
19072
19073 \begin_layout Standard
19074 RCS command that is run: 
19075 \family typewriter
19076 ci -q -u -i -t-"<initial description>" <file-name>
19077 \end_layout
19078
19079 \begin_layout Standard
19080 Read 
19081 \family typewriter
19082 man ci
19083 \family default
19084  to understand the switches.
19085  
19086 \end_layout
19087
19088 \begin_layout Subsubsection
19089
19090 \family sans
19091 Check In Changes
19092 \end_layout
19093
19094 \begin_layout Standard
19095 When you are finished editing a file, you check in your changes.
19096  When you do this, you are asked for a description of the changes.
19097  This is stored in the history log.
19098  The version number is bumped, your changes are applied to the master RCS
19099  file, the document is unlocked and set to Read-Only mode.
19100  
19101 \end_layout
19102
19103 \begin_layout Standard
19104 RCS command: 
19105 \family typewriter
19106 ci -q -u -m"<description>" <file-name>
19107 \end_layout
19108
19109 \begin_layout Subsubsection
19110
19111 \family sans
19112 Check Out For Edit
19113 \end_layout
19114
19115 \begin_layout Standard
19116 By doing this you lock the document so that only you can edit it.
19117  This will also make the document Read-Write only for you.
19118  You will usually continue editing for a while and when you are finished
19119  you check in your changes.
19120  The status line is changed to reflect that you have locked the file.
19121  
19122 \end_layout
19123
19124 \begin_layout Standard
19125 RCS command: 
19126 \family typewriter
19127 co -q -l <file-name>
19128 \end_layout
19129
19130 \begin_layout Subsubsection
19131
19132 \family sans
19133 Revert To Repository Version
19134 \end_layout
19135
19136 \begin_layout Standard
19137 This will discard all changes made to the document since the last check
19138  in.
19139  You get a warning before changes are discarded.
19140 \end_layout
19141
19142 \begin_layout Standard
19143 RCS command: 
19144 \family typewriter
19145 co -f -u<version> <file-name>
19146 \end_layout
19147
19148 \begin_layout Subsubsection
19149
19150 \family sans
19151 Undo Last Checkin
19152 \end_layout
19153
19154 \begin_layout Standard
19155 This makes as if the last check in never happened.
19156  No changes are made to the document loaded into LyX, but the last version
19157  is removed from the master RCS file.
19158  
19159 \end_layout
19160
19161 \begin_layout Standard
19162 RCS command: 
19163 \family typewriter
19164 rcs -o<version> <file-name>
19165 \end_layout
19166
19167 \begin_layout Subsubsection
19168
19169 \family sans
19170 Show History
19171 \end_layout
19172
19173 \begin_layout Standard
19174 This shows the complete history of the RCS document.
19175  The output of 
19176 \family typewriter
19177 rlog <file-name>
19178 \family default
19179  is shown in a browser.
19180  See 
19181 \family typewriter
19182 man rlog
19183 \family default
19184  for more info.
19185 \end_layout
19186
19187 \begin_layout Subsubsection
19188 Revision info
19189 \end_layout
19190
19191 \begin_layout Standard
19192 LyX supports RCS version number, author name, date and time of last commit.
19193  All those are extracted from 
19194 \family typewriter
19195 rlog -r <file-name>
19196 \family default
19197 .
19198  For other details see 
19199 \begin_inset CommandInset ref
19200 LatexCommand ref
19201 reference "sub:VCS-Revision-Information"
19202
19203 \end_inset
19204
19205  for details.
19206 \end_layout
19207
19208 \begin_layout Subsection
19209 CVS commands in LyX
19210 \end_layout
19211
19212 \begin_layout Standard
19213 A subset of CVS operations is supported by LyX.
19214  You can find the commands in the 
19215 \family sans
19216 File\SpecialChar \menuseparator
19217 Version
19218 \begin_inset space ~
19219 \end_inset
19220
19221 Control
19222 \family default
19223  submenu.
19224  The version control system SVN is more powerful, so please use it instead
19225  of CVS if possible.
19226 \end_layout
19227
19228 \begin_layout Subsubsection
19229
19230 \family sans
19231 General CVS usage
19232 \end_layout
19233
19234 \begin_layout Standard
19235 If you start from scratch with CVS you have to create your repository and
19236  checkout the working copy with external tools.
19237  If you're using a client-server setup you may need to login before doing
19238  the first repository checkout.
19239 \end_layout
19240
19241 \begin_layout Standard
19242 If your documents are under revision control and others are using the same
19243  repository problems arise when different changes to the same document at
19244  the same location happen.
19245  Standard CVS repositories doesn't operate with a file locking mechanism.
19246  This may be surprising, but conflicts only occur if people disagree on
19247  the proper content of the same part of a document.
19248  So, if co-workers are used to communicate regularly, these conflicts occur
19249  rarely.
19250  If they don't communicate they have a fundamental problem anyway.
19251  Nevertheless some people like to work with so called 
19252 \begin_inset Quotes eld
19253 \end_inset
19254
19255 reserved checkouts
19256 \begin_inset Quotes erd
19257 \end_inset
19258
19259 .
19260  If they do so the working copy of all files is readonly when checked out
19261  first and the user starts editing after using a special command to make
19262  the working copy writable.
19263  When the changes are checked in the working copy returns to readonly state.
19264  With LyX one has to edit the 
19265 \begin_inset Flex Code
19266 status collapsed
19267
19268 \begin_layout Plain Layout
19269 .cvsrc
19270 \end_layout
19271
19272 \end_inset
19273
19274  file and add the line 
19275 \begin_inset Flex Code
19276 status collapsed
19277
19278 \begin_layout Plain Layout
19279 cvs -r
19280 \end_layout
19281
19282 \end_inset
19283
19284  to work with reserved checkouts.
19285  The benefit is the possibility to see who is using a writable copy of some
19286  document.
19287  It's not guaranteed only one user makes a copy writable.
19288 \end_layout
19289
19290 \begin_layout Standard
19291 LyX tries to guess if you're using reserved or non-reserved checkouts.
19292  If your working copy is readonly or it is writable and an additional copy
19293  of your document exists in the CVS/Base sub-directory a reserved otherwise
19294  a non-reserved checkout is assumed.
19295  When a reserved checkout is detected you have to use 
19296 \begin_inset Flex MenuItem
19297 status collapsed
19298
19299 \begin_layout Plain Layout
19300 Check Out
19301 \end_layout
19302
19303 \end_inset
19304
19305  to make your working copy writable if it's readonly.
19306  After doing so the 
19307 \begin_inset Flex MenuItem
19308 status collapsed
19309
19310 \begin_layout Plain Layout
19311 Check In
19312 \end_layout
19313
19314 \end_inset
19315
19316  operation is possible and that makes your working copy readonly again after
19317  transferring your changes to the repository.
19318 \end_layout
19319
19320 \begin_layout Standard
19321 More information about CVS can be found here 
19322 \begin_inset Flex URL
19323 status collapsed
19324
19325 \begin_layout Plain Layout
19326
19327 http://www.nongnu.org/cvs
19328 \end_layout
19329
19330 \end_inset
19331
19332  and here 
19333 \begin_inset Flex URL
19334 status collapsed
19335
19336 \begin_layout Plain Layout
19337
19338 http://ximbiot.com/cvs
19339 \end_layout
19340
19341 \end_inset
19342
19343 .
19344 \end_layout
19345
19346 \begin_layout Standard
19347 Read 
19348 \family typewriter
19349 man cvs
19350 \family default
19351  to understand the sub-commands and the switches mentioned below.
19352 \end_layout
19353
19354 \begin_layout Subsubsection
19355
19356 \family sans
19357 Register
19358 \end_layout
19359
19360 \begin_layout Standard
19361 If your document is not under revision control, this is the only item shown
19362  in the menu.
19363  And if it is under revision control, the 
19364 \family sans
19365 \bar under
19366 R
19367 \bar default
19368 egister
19369 \family default
19370  item is not visible.
19371  
19372 \end_layout
19373
19374 \begin_layout Standard
19375 This command registers in CVS your document 
19376 \begin_inset Flex Strong
19377 status collapsed
19378
19379 \begin_layout Plain Layout
19380
19381 \emph on
19382 only
19383 \end_layout
19384
19385 \end_inset
19386
19387  in the case you have already the documents directory under CVS control
19388  (in particular 
19389 \family typewriter
19390 CVS/Entries
19391 \family default
19392  file exists).
19393  This means you have to create or checkout the archive by yourself using
19394  external tools.
19395  (In case you forget that step LyX registers the document with RCS.)
19396 \end_layout
19397
19398 \begin_layout Standard
19399 Then you are asked interactively to supply an initial description of the
19400  document.
19401  Don't forget that registered file is not yet checked in.
19402 \end_layout
19403
19404 \begin_layout Standard
19405 CVS command that is run: 
19406 \family typewriter
19407 cvs -q add -m"<entered message>" "<file-name>"
19408 \end_layout
19409
19410 \begin_layout Standard
19411 The term 
19412 \family typewriter
19413 "<file-name>"
19414 \family default
19415  above and for all other CVS commands is an abbreviation for 
19416 \begin_inset Quotes eld
19417 \end_inset
19418
19419 change the current working directory to file location and use the file name
19420  without path component as argument
19421 \begin_inset Quotes erd
19422 \end_inset
19423
19424 .
19425 \end_layout
19426
19427 \begin_layout Subsubsection
19428
19429 \family sans
19430 Check In Changes
19431 \end_layout
19432
19433 \begin_layout Standard
19434 When you are finished editing a file, you commit your changes.
19435  When you do this and you had changed the document, you are asked for a
19436  description of the changes.
19437  After that changes are written to the repository.
19438  In case you didn't change the document and a reserved checkout is detected
19439  the reservation made on 
19440 \begin_inset Flex MenuItem
19441 status collapsed
19442
19443 \begin_layout Plain Layout
19444 Check Out
19445 \end_layout
19446
19447 \end_inset
19448
19449  is undone.
19450 \end_layout
19451
19452 \begin_layout Labeling
19453 \labelwidthstring 00.00.0000
19454 CVS
19455 \begin_inset space ~
19456 \end_inset
19457
19458 command: 
19459 \begin_inset space ~
19460 \end_inset
19461
19462
19463 \begin_inset Newline newline
19464 \end_inset
19465
19466
19467 \begin_inset Flex Code
19468 status collapsed
19469
19470 \begin_layout Plain Layout
19471 cvs 
19472 \family typewriter
19473 -q commit -m"<description>" "<file-name>"
19474 \end_layout
19475
19476 \end_inset
19477
19478  or
19479 \begin_inset Newline newline
19480 \end_inset
19481
19482
19483 \begin_inset Flex Code
19484 status collapsed
19485
19486 \begin_layout Plain Layout
19487 cvs -q unedit 
19488 \family typewriter
19489 "<file-name>"
19490 \end_layout
19491
19492 \end_inset
19493
19494
19495 \end_layout
19496
19497 \begin_layout Subsubsection
19498
19499 \family sans
19500 Check Out Changes
19501 \end_layout
19502
19503 \begin_layout Standard
19504 When you are sharing a repository with others, you may have to incorporate
19505  their changes into your working copy.
19506 \end_layout
19507
19508 \begin_layout Standard
19509 CVS command: 
19510 \family typewriter
19511 cvs -q update "<file-name>"
19512 \end_layout
19513
19514 \begin_layout Standard
19515 If a readonly checkout is detected the working copy is made writable and
19516  reserved.
19517 \end_layout
19518
19519 \begin_layout Standard
19520 CVS command: 
19521 \family typewriter
19522 cvs -q edit "<file-name>"
19523 \end_layout
19524
19525 \begin_layout Subsubsection
19526
19527 \family sans
19528 Revert To Repository Version
19529 \end_layout
19530
19531 \begin_layout Standard
19532 This will discard all changes made to the document since the last check
19533  in.
19534  You get a warning before changes are discarded.
19535  Firstly the file is deleted, secondly CVS update command is run.
19536 \end_layout
19537
19538 \begin_layout Standard
19539 CVS command: 
19540 \family typewriter
19541 cvs -q update "<file-name>"
19542 \end_layout
19543
19544 \begin_layout Standard
19545 If a reserved checkout is detected and the working copy has no changes only
19546  the reservation is undone.
19547 \end_layout
19548
19549 \begin_layout Standard
19550 CVS command: 
19551 \family typewriter
19552 cvs -q unedit "<file-name>"
19553 \end_layout
19554
19555 \begin_layout Subsubsection
19556 Update of the local directory checkout from repository
19557 \end_layout
19558
19559 \begin_layout Standard
19560 Once your documents gets more complex, containing sub-documents and pictures,
19561  including external 
19562 \begin_inset Flex Code
19563 status collapsed
19564
19565 \begin_layout Plain Layout
19566 .tex
19567 \end_layout
19568
19569 \end_inset
19570
19571  files and so on using version control becomes more complicated.
19572  LyX supports updating the whole tree in which resides the document.
19573  This become especially useful once you cooperate with people which neither
19574  have detailed knowledge about CVS usage nor they have ambition to commit
19575  additional material to the repository.
19576  You have to organize the files structure so that all external files are
19577  in the same directory or subdirectories of the document.
19578  It's good practice anyway to store multipart documents in an extra directory.
19579 \end_layout
19580
19581 \begin_layout Standard
19582 The 
19583 \begin_inset Flex Code
19584 status collapsed
19585
19586 \begin_layout Plain Layout
19587 Update local directory from repository
19588 \end_layout
19589
19590 \end_inset
19591
19592  command updates the whole directory.
19593  If local changes are detected user is warned before update starts.
19594  In case of merge conflicts both versions of the conflicting document parts
19595  are placed in the final document.
19596  You have to review and correct the result of the merge.
19597  You'll find the conflicts enclosed in pairs of 
19598 \begin_inset Flex Code
19599 status collapsed
19600
19601 \begin_layout Plain Layout
19602 <<<<<<<
19603 \end_layout
19604
19605 \end_inset
19606
19607  and 
19608 \begin_inset Flex Code
19609 status collapsed
19610
19611 \begin_layout Plain Layout
19612 >>>>>>>
19613 \end_layout
19614
19615 \end_inset
19616
19617  separated by 
19618 \begin_inset Flex Code
19619 status collapsed
19620
19621 \begin_layout Plain Layout
19622 =======
19623 \end_layout
19624
19625 \end_inset
19626
19627 .
19628  The first part is your version as before the update operation with the
19629  document name prepended.
19630  The second one is the repository version with the version number after
19631  the sequence of 
19632 \begin_inset Flex Code
19633 status collapsed
19634
19635 \begin_layout Plain Layout
19636 >
19637 \end_layout
19638
19639 \end_inset
19640
19641  signs.
19642 \end_layout
19643
19644 \begin_layout Labeling
19645 \labelwidthstring 00.00.0000
19646 CVS
19647 \begin_inset space ~
19648 \end_inset
19649
19650 commands: 
19651 \begin_inset space ~
19652 \end_inset
19653
19654
19655 \begin_inset Newline newline
19656 \end_inset
19657
19658
19659 \begin_inset Flex Code
19660 status collapsed
19661
19662 \begin_layout Plain Layout
19663 cd $path; cvs diff 
19664 \family typewriter
19665 "."
19666 \end_layout
19667
19668 \end_inset
19669
19670  (Ask if changes are detected.)
19671 \begin_inset Newline newline
19672 \end_inset
19673
19674
19675 \begin_inset Flex Code
19676 status collapsed
19677
19678 \begin_layout Plain Layout
19679 cd $path; cvs -q update 
19680 \family typewriter
19681 "."
19682 \end_layout
19683
19684 \end_inset
19685
19686
19687 \end_layout
19688
19689 \begin_layout Standard
19690 where 
19691 \begin_inset Flex Code
19692 status collapsed
19693
19694 \begin_layout Plain Layout
19695 $path
19696 \end_layout
19697
19698 \end_inset
19699
19700  stands for the path to the document.
19701 \end_layout
19702
19703 \begin_layout Subsubsection
19704
19705 \family sans
19706 Show History
19707 \end_layout
19708
19709 \begin_layout Standard
19710 This shows the complete history of the CVS document.
19711  The output of 
19712 \family typewriter
19713 cvs log "<file-name>"
19714 \family default
19715  is shown in a browser.
19716 \end_layout
19717
19718 \begin_layout Subsection
19719 SVN commands in LyX
19720 \end_layout
19721
19722 \begin_layout Standard
19723 SVN is now partially supported by LyX.
19724  You can find the commands in the 
19725 \family sans
19726 File\SpecialChar \menuseparator
19727 Version
19728 \begin_inset space ~
19729 \end_inset
19730
19731 Control
19732 \family default
19733  submenu.
19734  Please note that if you use password protected access to repository via
19735  ssh, you will be asked in terminal window.
19736  LyX was tested against SVN 1.5 and 1.6
19737 \begin_inset Foot
19738 status open
19739
19740 \begin_layout Plain Layout
19741 Most of the commands will work with 1.4 too, see 
19742 \begin_inset CommandInset ref
19743 LatexCommand ref
19744 reference "sub:SVN-Repo-Update"
19745
19746 \end_inset
19747
19748 .
19749 \end_layout
19750
19751 \end_inset
19752
19753
19754 \end_layout
19755
19756 \begin_layout Subsubsection
19757
19758 \family sans
19759 Register
19760 \end_layout
19761
19762 \begin_layout Standard
19763 If your document is not under revision control, this is the only item shown
19764  in the menu.
19765  And if it is under revision control, the 
19766 \family sans
19767 \bar under
19768 R
19769 \bar default
19770 egister
19771 \family default
19772  item is not visible.
19773  
19774 \end_layout
19775
19776 \begin_layout Standard
19777 This command registers in SVN your document ONLY in case you have already
19778  the documents directory under SVN control (in particular 
19779 \family typewriter
19780 .svn/entries
19781 \family default
19782  file exists).
19783  This means you have to checkout the archive by yourself.
19784  
19785 \end_layout
19786
19787 \begin_layout Standard
19788 Then you are asked interactively to supply an initial description of the
19789  document.
19790  Don't forget that registered file is not yet commited.
19791 \end_layout
19792
19793 \begin_layout Standard
19794 SVN command that is run: 
19795 \family typewriter
19796 svn add -q 
19797 \begin_inset Quotes eld
19798 \end_inset
19799
19800 <file-name>
19801 \begin_inset Quotes erd
19802 \end_inset
19803
19804
19805 \end_layout
19806
19807 \begin_layout Standard
19808 Read 
19809 \family typewriter
19810 man svn
19811 \family default
19812  to understand the switches.
19813  
19814 \end_layout
19815
19816 \begin_layout Subsubsection
19817
19818 \family sans
19819 Check In Changes
19820 \end_layout
19821
19822 \begin_layout Standard
19823 When you are finished editing a file, you commit your changes.
19824  When you do this, you are asked for a description of the changes.
19825  After that changes are commited.
19826 \end_layout
19827
19828 \begin_layout Standard
19829 SVN command:
19830 \begin_inset Foot
19831 status collapsed
19832
19833 \begin_layout Plain Layout
19834 In case locking is not enabled.
19835  See Section 
19836 \begin_inset CommandInset ref
19837 LatexCommand ref
19838 reference "subsec:SVN-File-Locking"
19839
19840 \end_inset
19841
19842 .
19843 \end_layout
19844
19845 \end_inset
19846
19847  
19848 \family typewriter
19849 svn commit -q -m"<description>" <file-name>
19850 \end_layout
19851
19852 \begin_layout Subsubsection
19853
19854 \family sans
19855 Check Out For Edit
19856 \end_layout
19857
19858 \begin_layout Standard
19859 Updates the changes of this file from the repository.
19860  Be sure you understand SVN merging and conflicts resolving before using
19861  this function, because all conflicts has to be resolved manually by you!
19862 \end_layout
19863
19864 \begin_layout Standard
19865 SVN command:
19866 \begin_inset Foot
19867 status collapsed
19868
19869 \begin_layout Plain Layout
19870 Ditto.
19871 \end_layout
19872
19873 \end_inset
19874
19875  
19876 \family typewriter
19877 svn update --non-interactive 
19878 \begin_inset Quotes eld
19879 \end_inset
19880
19881 <file-name>
19882 \begin_inset Quotes erd
19883 \end_inset
19884
19885
19886 \end_layout
19887
19888 \begin_layout Subsubsection
19889
19890 \family sans
19891 Revert To Repository Version
19892 \end_layout
19893
19894 \begin_layout Standard
19895 This will discard all changes made to the document since the last check
19896  in.
19897  You get a warning before changes are discarded.
19898  
19899 \end_layout
19900
19901 \begin_layout Standard
19902 SVN command: 
19903 \family typewriter
19904 svn revert -q 
19905 \begin_inset Quotes eld
19906 \end_inset
19907
19908 <file-name>
19909 \begin_inset Quotes erd
19910 \end_inset
19911
19912
19913 \end_layout
19914
19915 \begin_layout Subsubsection
19916 \begin_inset CommandInset label
19917 LatexCommand label
19918 name "sub:SVN-Repo-Update"
19919
19920 \end_inset
19921
19922 Update of the local directory checkout from repository
19923 \begin_inset Foot
19924 status collapsed
19925
19926 \begin_layout Plain Layout
19927 Note that this command will work only with subversion 
19928 \begin_inset Formula $\geqq1.5$
19929 \end_inset
19930
19931
19932 \end_layout
19933
19934 \end_inset
19935
19936
19937 \end_layout
19938
19939 \begin_layout Standard
19940 All the commands above have one shortcomming - they deal with the current
19941  document only.
19942  Once your document contains pictures, includes external 
19943 \begin_inset Flex Code
19944 status collapsed
19945
19946 \begin_layout Plain Layout
19947 .tex
19948 \end_layout
19949
19950 \end_inset
19951
19952  files and so on administration becomes more complicated.
19953  LyX now supports updating the whole tree in which resides the document
19954 \begin_inset Foot
19955 status collapsed
19956
19957 \begin_layout Plain Layout
19958 One need to organize the files structure so that all external files are
19959  in the same directory or subdirectories of the document.
19960  
19961 \end_layout
19962
19963 \end_inset
19964
19965 .
19966  This become especially useful once you cooperate with people which neither
19967  know about subversion management nor they have ambition to commit additional
19968  material to the repository.
19969  
19970 \end_layout
19971
19972 \begin_layout Standard
19973 \begin_inset Flex Code
19974 status collapsed
19975
19976 \begin_layout Plain Layout
19977 Update local directory from repository
19978 \end_layout
19979
19980 \end_inset
19981
19982  command updates the whole directory and in case of merge conflicts local
19983  version of the files are left, so no unintended data loss occurs.
19984  If local changes are detected user is warned before update starts.
19985 \end_layout
19986
19987 \begin_layout Labeling
19988 \labelwidthstring 00.00.0000
19989 SVN
19990 \begin_inset space ~
19991 \end_inset
19992
19993 commands: 
19994 \begin_inset space ~
19995 \end_inset
19996
19997
19998 \begin_inset Newline newline
19999 \end_inset
20000
20001
20002 \begin_inset Flex Code
20003 status collapsed
20004
20005 \begin_layout Plain Layout
20006 svn diff $path
20007 \end_layout
20008
20009 \end_inset
20010
20011  (Ask if changes are detected.)
20012 \begin_inset Newline newline
20013 \end_inset
20014
20015
20016 \begin_inset Flex Code
20017 status collapsed
20018
20019 \begin_layout Plain Layout
20020 svn update --accept mine-full $path
20021 \end_layout
20022
20023 \end_inset
20024
20025
20026 \end_layout
20027
20028 \begin_layout Standard
20029 where 
20030 \begin_inset Flex Code
20031 status collapsed
20032
20033 \begin_layout Plain Layout
20034 $path
20035 \end_layout
20036
20037 \end_inset
20038
20039  stands for the path to the document.
20040 \end_layout
20041
20042 \begin_layout Subsubsection
20043
20044 \family sans
20045 Show History
20046 \end_layout
20047
20048 \begin_layout Standard
20049 This shows the complete history of the SVN document.
20050  The output of 
20051 \family typewriter
20052 svn log 
20053 \begin_inset Quotes eld
20054 \end_inset
20055
20056 <file-name>
20057 \begin_inset Quotes erd
20058 \end_inset
20059
20060
20061 \family default
20062  is shown in a browser.
20063 \end_layout
20064
20065 \begin_layout Subsubsection
20066 File Locking
20067 \begin_inset CommandInset label
20068 LatexCommand label
20069 name "subsec:SVN-File-Locking"
20070
20071 \end_inset
20072
20073
20074 \end_layout
20075
20076 \begin_layout Standard
20077 The file exchange through various revision control systems brings the problem
20078  of merge conflicts in case two different users try to edit the same (parts
20079  of) document.
20080  When such a conflict happens it needs manual resolving and one reasonable
20081  alternative is to provide some kind of locking mechanism, which guarantees
20082  that only one user is allowed to edit file at the given time.
20083 \end_layout
20084
20085 \begin_layout Standard
20086 SVN has two such mechanisms to provide mutual exclusivity for file access
20087  - locks and automatic setting of write permissions (see sec.
20088  
20089 \begin_inset CommandInset ref
20090 LatexCommand ref
20091 reference "subsec:Automatical-Locking-Property"
20092
20093 \end_inset
20094
20095 ) based on 
20096 \begin_inset Flex Code
20097 status collapsed
20098
20099 \begin_layout Plain Layout
20100 svn:needs-lock
20101 \end_layout
20102
20103 \end_inset
20104
20105  file svn property
20106 \begin_inset Foot
20107 status open
20108
20109 \begin_layout Plain Layout
20110 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20111 \end_layout
20112
20113 \end_inset
20114
20115 .
20116  If this property is detected for a given document LyX starts to use SVN
20117  locks for document editing automatically and the whole check-in/out mechanism
20118  switches to the same regimen as for RCS.
20119  This in particular means there are two different modes of file use in LyX:
20120 \end_layout
20121
20122 \begin_layout Itemize
20123 Unlocked state.
20124  The loaded file is in the read-only mode.
20125  For editing on needs to check-out.
20126  
20127 \emph on
20128 Check-out
20129 \emph default
20130  consists of updating from the repository and gaining write lock.
20131  If the lock is not possible to obtain, we remain in unlocked state.
20132 \end_layout
20133
20134 \begin_layout Itemize
20135 Locked state.
20136  The loaded file is in the 'normal' edit mode.
20137  No other user is allowed to edit the file.
20138  
20139 \emph on
20140 Check-in
20141 \emph default
20142  consists of commiting changes and releasing write-lock.
20143  If no changes have been made to the document, no commit will be produced
20144 \begin_inset Foot
20145 status collapsed
20146
20147 \begin_layout Plain Layout
20148 Don't be puzzled by the fact that you will be asked for commit message anyway.
20149 \end_layout
20150
20151 \end_inset
20152
20153  and only the write-lock will be released.
20154 \end_layout
20155
20156 \begin_layout Standard
20157 SVN commands:
20158 \end_layout
20159
20160 \begin_layout Labeling
20161 \labelwidthstring 00.00.0000
20162 Check-in:
20163 \family typewriter
20164  svn commit -q -m"<description>" "<file-name>"
20165 \begin_inset Newline newline
20166 \end_inset
20167
20168 svn unlock "<file-name>"
20169 \end_layout
20170
20171 \begin_layout Labeling
20172 \labelwidthstring 00.00.0000
20173 Check-out: 
20174 \family typewriter
20175 svn update "<file-name>"
20176 \begin_inset Newline newline
20177 \end_inset
20178
20179 svn lock "<file-name>"
20180 \end_layout
20181
20182 \begin_layout Subsubsection
20183
20184 \family typewriter
20185 \begin_inset CommandInset label
20186 LatexCommand label
20187 name "subsec:Automatical-Locking-Property"
20188
20189 \end_inset
20190
20191
20192 \family default
20193 Automatic Locking Property
20194 \end_layout
20195
20196 \begin_layout Standard
20197 The above mentioned automatic setting of write permissions of the .lyx file
20198  can be set through
20199 \family sans
20200 \bar under
20201  F
20202 \bar default
20203 ile\SpecialChar \menuseparator
20204
20205 \bar under
20206 V
20207 \bar default
20208 ersion
20209 \begin_inset space ~
20210 \end_inset
20211
20212 Control\SpecialChar \menuseparator
20213
20214 \bar under
20215 T
20216 \bar default
20217 oggle locking property
20218 \family default
20219 .
20220  This command is active only when the file is not locked on the svn server
20221  (i.e.
20222  you need to check-out before proceeding).
20223 \end_layout
20224
20225 \begin_layout Labeling
20226 \labelwidthstring 00.00.0000
20227 SVN
20228 \begin_inset space ~
20229 \end_inset
20230
20231 commands:
20232 \end_layout
20233
20234 \begin_layout Labeling
20235 \labelwidthstring 00.00.0000
20236 Set:
20237 \family typewriter
20238  svn propset svn:needs-lock ON "<file-name>"
20239 \end_layout
20240
20241 \begin_layout Labeling
20242 \labelwidthstring 00.00.0000
20243 Unset: 
20244 \family typewriter
20245 svn propdel svn:needs-lock "<file-name>"
20246 \end_layout
20247
20248 \begin_layout Subsubsection
20249 \begin_inset CommandInset label
20250 LatexCommand label
20251 name "sub:VCS-Revision-Information"
20252
20253 \end_inset
20254
20255 Revision Information in Documents
20256 \end_layout
20257
20258 \begin_layout Standard
20259 There are more possibilities how to activate revision information in our
20260  document.
20261 \end_layout
20262
20263 \begin_layout Itemize
20264 LyX supports directly:
20265 \end_layout
20266
20267 \begin_deeper
20268 \begin_layout Itemize
20269 tree revision information (
20270 \begin_inset Flex Code
20271 status collapsed
20272
20273 \begin_layout Plain Layout
20274 vcs-tree-revision
20275 \end_layout
20276
20277 \end_inset
20278
20279 ).
20280  The result is the output of the 
20281 \begin_inset Flex Code
20282 status collapsed
20283
20284 \begin_layout Plain Layout
20285 svnversion
20286 \end_layout
20287
20288 \end_inset
20289
20290  command, the following table gives you an idea, how to read the results.
20291 \end_layout
20292
20293 \begin_layout Standard
20294 \align center
20295 \begin_inset Tabular
20296 <lyxtabular version="3" rows="6" columns="2">
20297 <features rotate="0" tabularvalignment="middle">
20298 <column alignment="center" valignment="top" width="0">
20299 <column alignment="center" valignment="top" width="0">
20300 <row>
20301 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20302 \begin_inset Text
20303
20304 \begin_layout Plain Layout
20305 Output
20306 \end_layout
20307
20308 \end_inset
20309 </cell>
20310 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20311 \begin_inset Text
20312
20313 \begin_layout Plain Layout
20314 Meaning
20315 \end_layout
20316
20317 \end_inset
20318 </cell>
20319 </row>
20320 <row>
20321 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20322 \begin_inset Text
20323
20324 \begin_layout Plain Layout
20325 4123:4168
20326 \end_layout
20327
20328 \end_inset
20329 </cell>
20330 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20331 \begin_inset Text
20332
20333 \begin_layout Plain Layout
20334 mixed revision working copy
20335 \end_layout
20336
20337 \end_inset
20338 </cell>
20339 </row>
20340 <row>
20341 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20342 \begin_inset Text
20343
20344 \begin_layout Plain Layout
20345 4168M
20346 \end_layout
20347
20348 \end_inset
20349 </cell>
20350 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20351 \begin_inset Text
20352
20353 \begin_layout Plain Layout
20354 modified working copy
20355 \end_layout
20356
20357 \end_inset
20358 </cell>
20359 </row>
20360 <row>
20361 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20362 \begin_inset Text
20363
20364 \begin_layout Plain Layout
20365 4123S
20366 \end_layout
20367
20368 \end_inset
20369 </cell>
20370 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20371 \begin_inset Text
20372
20373 \begin_layout Plain Layout
20374 switched working copy
20375 \end_layout
20376
20377 \end_inset
20378 </cell>
20379 </row>
20380 <row>
20381 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20382 \begin_inset Text
20383
20384 \begin_layout Plain Layout
20385 4123P
20386 \end_layout
20387
20388 \end_inset
20389 </cell>
20390 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20391 \begin_inset Text
20392
20393 \begin_layout Plain Layout
20394 partial working copy, from a sparse checkout
20395 \end_layout
20396
20397 \end_inset
20398 </cell>
20399 </row>
20400 <row>
20401 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20402 \begin_inset Text
20403
20404 \begin_layout Plain Layout
20405 4123:4168MS
20406 \end_layout
20407
20408 \end_inset
20409 </cell>
20410 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20411 \begin_inset Text
20412
20413 \begin_layout Plain Layout
20414 mixed revision, modified, switched working copy
20415 \end_layout
20416
20417 \end_inset
20418 </cell>
20419 </row>
20420 </lyxtabular>
20421
20422 \end_inset
20423
20424
20425 \end_layout
20426
20427 \begin_layout Itemize
20428 file revision information.
20429  The result comes from parsing the output of 
20430 \begin_inset Flex Code
20431 status collapsed
20432
20433 \begin_layout Plain Layout
20434 svn
20435 \begin_inset space ~
20436 \end_inset
20437
20438 info
20439 \begin_inset space ~
20440 \end_inset
20441
20442 --xml
20443 \begin_inset space ~
20444 \end_inset
20445
20446 file.lyx
20447 \end_layout
20448
20449 \end_inset
20450
20451 .
20452  Supported flags are:
20453 \end_layout
20454
20455 \begin_deeper
20456 \begin_layout Itemize
20457 version number of the last commit (
20458 \begin_inset Flex Code
20459 status collapsed
20460
20461 \begin_layout Plain Layout
20462 vcs-revision
20463 \end_layout
20464
20465 \end_inset
20466
20467 )
20468 \end_layout
20469
20470 \begin_layout Itemize
20471 author of the last commit (
20472 \begin_inset Flex Code
20473 status collapsed
20474
20475 \begin_layout Plain Layout
20476 vcs-author
20477 \end_layout
20478
20479 \end_inset
20480
20481 )
20482 \end_layout
20483
20484 \begin_layout Itemize
20485 date of the last commit (
20486 \begin_inset Flex Code
20487 status collapsed
20488
20489 \begin_layout Plain Layout
20490 vcs-date
20491 \end_layout
20492
20493 \end_inset
20494
20495 )
20496 \end_layout
20497
20498 \begin_layout Itemize
20499 time of the last commit (
20500 \begin_inset Flex Code
20501 status collapsed
20502
20503 \begin_layout Plain Layout
20504 vcs-time
20505 \end_layout
20506
20507 \end_inset
20508
20509 )
20510 \end_layout
20511
20512 \end_deeper
20513 \begin_layout Standard
20514 You can obtain this info via InsetInfo (e.g.
20515  
20516 \begin_inset Flex Code
20517 status collapsed
20518
20519 \begin_layout Plain Layout
20520 info-insert buffer vcs-date
20521 \end_layout
20522
20523 \end_inset
20524
20525 ).
20526  The information will be available only when you have the file stored under
20527  svn managment (i.e.
20528  the 
20529 \begin_inset Flex Code
20530 status collapsed
20531
20532 \begin_layout Plain Layout
20533 .svn
20534 \end_layout
20535
20536 \end_inset
20537
20538  directory is available with your document).
20539 \end_layout
20540
20541 \end_deeper
20542 \begin_layout Itemize
20543 Another---a hacking one---possibility is to use svn keywords
20544 \begin_inset Foot
20545 status collapsed
20546
20547 \begin_layout Plain Layout
20548 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20549 \end_layout
20550
20551 \end_inset
20552
20553 .
20554  In short -- you set file keywords property (e.g.
20555  
20556 \family sans
20557 svn propset svn:keywords 'Rev' file.lyx
20558 \family default
20559 ) and then paste keyword TeX code
20560 \begin_inset Foot
20561 status collapsed
20562
20563 \begin_layout Plain Layout
20564 This is an easy way how to ensure that LyX won't break the line in the middle
20565  of keyword tag.
20566 \end_layout
20567
20568 \end_inset
20569
20570  tag in your document (e.g.
20571  
20572 \begin_inset ERT
20573 status open
20574
20575 \begin_layout Plain Layout
20576
20577 $Rev$
20578 \end_layout
20579
20580 \end_inset
20581
20582 ).
20583  This way svn client will automatically substitute revision number (e.g.
20584  
20585 \begin_inset ERT
20586 status open
20587
20588 \begin_layout Plain Layout
20589
20590 $Rev: 59 $
20591 \end_layout
20592
20593 \end_inset
20594
20595 ) after each update and commit.
20596  There are more problems with this approach.
20597  Firstly, the '$' character is used in TeX world for math equations, so
20598  any occurence of math formula 
20599 \begin_inset Formula $Rev$
20600 \end_inset
20601
20602  become 
20603 \begin_inset Formula $Rev:59$
20604 \end_inset
20605
20606  in your LyX document.
20607  Similarly for other keywords like Id, Date, Author, etc.
20608  Secondly svn output is dependent on your locales, so its very easy that
20609  svn would produce some problematic strings once Date is used.
20610  Thirdly you get the whole 'Rev: 59' string in your document instead of
20611  the plain number.
20612  Until subversion implements user's custom keywords it will be hard to use
20613  this approach reliably or let LyX to support it directly.
20614 \end_layout
20615
20616 \begin_layout Subsection
20617 SVN and Windows Environment
20618 \end_layout
20619
20620 \begin_layout Quote
20621 My inclination is to say that if the user cannot figure out the command
20622  line operations on their own fairly quickly, they would be well advised
20623  to use TortoiseSVN.
20624  ---P.
20625  A.
20626  Rubin
20627 \end_layout
20628
20629 \begin_layout Subsubsection
20630 Preparation
20631 \end_layout
20632
20633 \begin_layout Standard
20634 In addition to installing LyX, and having access to a Subversion repository,
20635  the user will need to install the Subversion client program.
20636  A Windows installer for the client program is available from 
20637 \begin_inset CommandInset href
20638 LatexCommand href
20639 name "CollabNet"
20640 target "http://www.collab.net/nonav/downloads/subversion/"
20641
20642 \end_inset
20643
20644 .
20645  The user may also want to install 
20646 \begin_inset CommandInset href
20647 LatexCommand href
20648 name "TortoiseSVN"
20649 target "http://tortoisesvn.tigris.org/"
20650
20651 \end_inset
20652
20653 , which integrates Subversion operations into the context (rightclick) menu
20654  of Windows Explorer.
20655  Operations done outside LyX will typically be more convenient using the
20656  Explorer context menu.
20657  Note that TortoiseSVN is not a replacement for the client program, which
20658  is what LyX itself will use.
20659 \end_layout
20660
20661 \begin_layout Subsubsection
20662 Bringing a document under Subversion control
20663 \end_layout
20664
20665 \begin_layout Standard
20666 Before a LyX document can be brought under version control in Subversion,
20667  its parent directory needs to be under version control.
20668  If the document is being added to a project already in the repository,
20669  this is accomplished by checking the project out to the directory where
20670  the new document will be placed.
20671  If the project itself is not yet under version control (for instance, if
20672  this document starts a new project), the directory must be imported into
20673  the repository.
20674  This is done outside LyX.
20675  Both import and checkout are easily accomplished from the Explorer context
20676  menu using TortoiseSVN, or alternatively can be done using the command
20677  line client at a DOS prompt.
20678  The procedure for importing the project using TortoiseSVN is described
20679  below, assuming an existing repository and a new project being started
20680  in 
20681 \family typewriter
20682 C:
20683 \backslash
20684 new project
20685 \family default
20686 .
20687  For information on using the Subversion client program, run 
20688 \family typewriter
20689 svn --help 
20690 \family default
20691 in a DOS shell.
20692 \end_layout
20693
20694 \begin_layout Enumerate
20695 Locate 
20696 \family typewriter
20697 C:
20698 \backslash
20699 new project 
20700 \family default
20701 in Windows Explorer, right click it, and select 
20702 \family typewriter
20703 TortoiseSVN > Repo-browser
20704 \family default
20705 .
20706  If necessary, adjust the URL for the repository, then click OK.
20707 \end_layout
20708
20709 \begin_layout Enumerate
20710 Right click the level of the repository under which you want to place the
20711  new project folder (typically the top level) and click 
20712 \family typewriter
20713 Create folder\SpecialChar \ldots{}
20714
20715 \family default
20716  Supply a name for the project folder and click OK.
20717  Add a message for the log file if desired, then click OK again.
20718  The new project folder should appear in the repository.
20719  Finally, click OK again to exit the repository browser.
20720 \end_layout
20721
20722 \begin_layout Enumerate
20723 Once again right click 
20724 \family typewriter
20725 C:
20726 \backslash
20727 new project
20728 \family default
20729 , this time selecting SVN Checkout\SpecialChar \ldots{}
20730  Select the URL of the project folder
20731  you just created in the repository, and set the checkout directory to 
20732 \family typewriter
20733 C:
20734 \backslash
20735 new project.
20736
20737 \family default
20738  Click OK.
20739  You will be warned about a non-empty folder; click OK to proceed.
20740  You should now have a 
20741 \family typewriter
20742 .svn
20743 \family default
20744  directory under 
20745 \family typewriter
20746 C:
20747 \backslash
20748 new project.
20749 \end_layout
20750
20751 \begin_layout Enumerate
20752 Create or open your document in LyX and click 
20753 \family sans
20754 \bar under
20755 F
20756 \bar default
20757 ile\SpecialChar \menuseparator
20758
20759 \bar under
20760 V
20761 \bar default
20762 ersion
20763 \begin_inset space ~
20764 \end_inset
20765
20766 Control\SpecialChar \menuseparator
20767
20768 \bar under
20769 R
20770 \bar default
20771 egister.
20772  
20773 \family default
20774 Add a log message and click OK to commit the document to version control.
20775 \end_layout
20776
20777 \begin_layout Standard
20778 From this point onward, you should have full functionality in the 
20779 \family sans
20780 \bar under
20781 F
20782 \bar default
20783 ile\SpecialChar \menuseparator
20784
20785 \bar under
20786 V
20787 \bar default
20788 ersion
20789 \begin_inset space ~
20790 \end_inset
20791
20792 Control
20793 \family default
20794  menu.
20795  You also have the option of checking the document in and out, viewing its
20796  history, etc.
20797  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20798  client program from a command prompt.
20799 \end_layout
20800
20801 \begin_layout Subsubsection
20802 SSH tunnel used with SVN under Windows
20803 \end_layout
20804
20805 \begin_layout Standard
20806 Compared with Linux setting up an svn client to communicate over ssh under
20807  Windows is a rather troublesome task.
20808  We will at least offer some hints how to setup the client side but prior
20809  knowledge about ssh and the Windows command line is needed, also be prepared
20810  for a great deal of frustration\SpecialChar \ldots{}
20811
20812 \end_layout
20813
20814 \begin_layout Enumerate
20815 Get an svn client for windows, as described in the previous sections.
20816  When it is a fresh install run some svn command (e.g.
20817  
20818 \begin_inset Flex Code
20819 status collapsed
20820
20821 \begin_layout Plain Layout
20822 svn --version
20823 \end_layout
20824
20825 \end_inset
20826
20827 ) to create config files, which you will need to change later on.
20828 \end_layout
20829
20830 \begin_layout Enumerate
20831 Choose an ssh client for Windows.
20832  There are several possibilities, we will use the one from Putty tools
20833 \begin_inset Foot
20834 status open
20835
20836 \begin_layout Plain Layout
20837 \begin_inset Flex URL
20838 status collapsed
20839
20840 \begin_layout Plain Layout
20841
20842 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20843 \end_layout
20844
20845 \end_inset
20846
20847
20848 \end_layout
20849
20850 \end_inset
20851
20852 .
20853  You will need to set the connection up so that the client doesn't ask for
20854  any password from you.
20855  To keep things easy we will use only keys without any additional password
20856  protection etc.
20857 \end_layout
20858
20859 \begin_deeper
20860 \begin_layout Enumerate
20861 Generate keys by 
20862 \begin_inset Flex Code
20863 status collapsed
20864
20865 \begin_layout Plain Layout
20866 puttygen
20867 \end_layout
20868
20869 \end_inset
20870
20871 .
20872  Save your private .ppk key file and put the public one on the server side.
20873  If the SVN server runs on Linux, note that the format of the public key
20874  is not compatible with Linux openssh and you will need to direcly copy-paste
20875  the key from the “
20876 \emph on
20877 Public key for pasting into OpenSSH authorized_keys file
20878 \emph default
20879 :” edit field into the server's 
20880 \begin_inset Flex Code
20881 status collapsed
20882
20883 \begin_layout Plain Layout
20884 ~/.ssh/authorized_keys
20885 \end_layout
20886
20887 \end_inset
20888
20889  / 
20890 \begin_inset Flex Code
20891 status collapsed
20892
20893 \begin_layout Plain Layout
20894 authorized_keys2
20895 \end_layout
20896
20897 \end_inset
20898
20899  file.
20900 \end_layout
20901
20902 \begin_layout Enumerate
20903 Get the Putty's 
20904 \begin_inset Flex Code
20905 status collapsed
20906
20907 \begin_layout Plain Layout
20908 plink
20909 \end_layout
20910
20911 \end_inset
20912
20913 .
20914  In the SVN config file
20915 \begin_inset Foot
20916 status collapsed
20917
20918 \begin_layout Plain Layout
20919 Exact path depends on Windows version, usually somewhere around 
20920 \begin_inset Flex Code
20921 status collapsed
20922
20923 \begin_layout Plain Layout
20924 c:
20925 \backslash
20926 Documents and Settings
20927 \backslash
20928 user
20929 \backslash
20930 Application Data
20931 \backslash
20932 Subversion
20933 \backslash
20934 config
20935 \end_layout
20936
20937 \end_inset
20938
20939  / 
20940 \begin_inset Flex Code
20941 status collapsed
20942
20943 \begin_layout Plain Layout
20944 AppData
20945 \backslash
20946 Roaming
20947 \backslash
20948 Subversion
20949 \end_layout
20950
20951 \end_inset
20952
20953 .
20954 \end_layout
20955
20956 \end_inset
20957
20958 , section [tunnels], setup ssh command, e.g.
20959  
20960 \begin_inset Flex Code
20961 status collapsed
20962
20963 \begin_layout Plain Layout
20964 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20965 \end_layout
20966
20967 \end_inset
20968
20969 .
20970 \begin_inset Foot
20971 status collapsed
20972
20973 \begin_layout Plain Layout
20974 It will usually take a lot of time to get exact command right and it depends
20975  on many things.
20976  For example do not have some remote server saved as a default session in
20977  Putty etc.
20978  If things fail, try to connect via plink without SVN first.
20979 \end_layout
20980
20981 \end_inset
20982
20983
20984 \end_layout
20985
20986 \end_deeper
20987 \begin_layout Enumerate
20988 Checkout the SVN archive, e.g.
20989  
20990 \begin_inset Flex Code
20991 status collapsed
20992
20993 \begin_layout Plain Layout
20994 svn co svn+ssh://user@server/repository_path
20995 \end_layout
20996
20997 \end_inset
20998
20999 .
21000 \end_layout
21001
21002 \begin_layout Subsubsection
21003 End-of-Line Conversions
21004 \end_layout
21005
21006 \begin_layout Standard
21007 When the collaborators are mixing Linux and Windows environments, LyX will
21008  use different line endings inside the .lyx files.
21009  This is not a problem as far as LyX functionality is concerned, but the
21010  commit diffs will be huge and merge-conflicts prone.
21011  Fortunately SVN itself knows
21012 \begin_inset Foot
21013 status collapsed
21014
21015 \begin_layout Plain Layout
21016 \begin_inset Flex URL
21017 status collapsed
21018
21019 \begin_layout Plain Layout
21020
21021 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21022 \end_layout
21023
21024 \end_inset
21025
21026
21027 \end_layout
21028
21029 \end_inset
21030
21031  how to deal with CR/LF problems when switching .lyx files to the 
21032 \begin_inset Flex Code
21033 status collapsed
21034
21035 \begin_layout Plain Layout
21036 native
21037 \end_layout
21038
21039 \end_inset
21040
21041  mode.
21042 \begin_inset Foot
21043 status collapsed
21044
21045 \begin_layout Plain Layout
21046 For the lazy guys: 
21047 \begin_inset Flex Code
21048 status collapsed
21049
21050 \begin_layout Plain Layout
21051 svn propset svn:eol-style native FILE_NAME
21052 \end_layout
21053
21054 \end_inset
21055
21056
21057 \end_layout
21058
21059 \end_inset
21060
21061
21062 \end_layout
21063
21064 \begin_layout Subsection
21065 Further tuning
21066 \end_layout
21067
21068 \begin_layout Standard
21069 With the recent addition of the vc-command function LyX power users are
21070  allowed to create their own commands for revision control.
21071 \end_layout
21072
21073 \begin_layout Standard
21074 As an example you can see how two TortoiseSVN commands could be integrated
21075  directly:
21076 \end_layout
21077
21078 \begin_layout Description
21079 Commit: 
21080 \begin_inset Flex Code
21081 status collapsed
21082
21083 \begin_layout Plain Layout
21084 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21085 \end_layout
21086
21087 \end_inset
21088
21089
21090 \end_layout
21091
21092 \begin_layout Description
21093 Revert: 
21094 \begin_inset Flex Code
21095 status collapsed
21096
21097 \begin_layout Plain Layout
21098 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21099 \end_layout
21100
21101 \end_inset
21102
21103
21104 \end_layout
21105
21106 \begin_layout Subsection
21107 Version control and Document comparison
21108 \end_layout
21109
21110 \begin_layout Standard
21111 One of the typical uses of version control is to inspect the changes between
21112  revisions, usually by creating 
21113 \begin_inset Flex Code
21114 status collapsed
21115
21116 \begin_layout Plain Layout
21117 diff
21118 \end_layout
21119
21120 \end_inset
21121
21122  dumps.
21123  While this is useful for plain text files, it is much less useful in the
21124  case of LyX files, which have more a complicated structure.
21125  Hence we provide binding to the Document comparison feature.
21126  There are two ways of calling this feature - either by direct call of 
21127 \begin_inset Flex Code
21128 status collapsed
21129
21130 \begin_layout Plain Layout
21131 VC_COMPARE
21132 \end_layout
21133
21134 \end_inset
21135
21136  LyX function (for details see LyX functions manual) or by icon/menu item
21137  
21138 \begin_inset Flex MenuItem
21139 status collapsed
21140
21141 \begin_layout Plain Layout
21142 Compare with older revision...
21143 \end_layout
21144
21145 \end_inset
21146
21147 .
21148  One can either compare two chosen revisions of the document or he can simply
21149  compare the current version of edited text with older revisions (where
21150  '
21151 \begin_inset Flex MenuItem
21152 status collapsed
21153
21154 \begin_layout Plain Layout
21155 0
21156 \end_layout
21157
21158 \end_inset
21159
21160 ' revisions back means comparison of the edited file with last commited
21161  revision).
21162  
21163 \end_layout
21164
21165 \begin_layout Standard
21166 This feature is supported for SVN and RCS though due to the more complicated
21167  versioning scheme of RCS there is a constraint -- when addressing the revisions
21168  in dialog, numbers always point to the last number in RCS revision number,
21169  i.e.
21170  '35' in '1.2.35'.
21171 \end_layout
21172
21173 \begin_layout Section
21174 Literate Programming
21175 \end_layout
21176
21177 \begin_layout Standard
21178 Updated by 
21179 \noun on
21180 Kayvan Sylvan 
21181 \noun default
21182 (kayvan@sylvan.com)
21183 \noun on
21184
21185 \noun default
21186 original documentation written by 
21187 \noun on
21188 Edmar Wienskoski Jr.
21189
21190 \noun default
21191  (edmar-w-jr@technologist.com)
21192 \end_layout
21193
21194 \begin_layout Subsection
21195 Introduction
21196 \end_layout
21197
21198 \begin_layout Standard
21199 The main purpose of this documentation is to show you how to use LyX for
21200  literate programming, where it is assumed that you are familiar with this
21201  programming technique, and know what 
21202 \begin_inset Quotes eld
21203 \end_inset
21204
21205 tangling
21206 \begin_inset Quotes erd
21207 \end_inset
21208
21209  and 
21210 \begin_inset Quotes eld
21211 \end_inset
21212
21213 weaving
21214 \begin_inset Quotes erd
21215 \end_inset
21216
21217  means.
21218  If that is not the case, please follow the web links provided in the following
21219  sections.
21220  There is a lot of good documentation out there covering old development
21221  history to the latest tools tips.
21222 \end_layout
21223
21224 \begin_layout Standard
21225 It is also assumed that you are familiar with LyX itself to a point that
21226  you are comfortable changing your LyX preferences, and X resources file.
21227  If that is not the case please refer to other LyX documentation to cover
21228  your specific needs.
21229 \end_layout
21230
21231 \begin_layout Subsection
21232 Literate Programming
21233 \end_layout
21234
21235 \begin_layout Standard
21236 From the Literate Programming FAQ: 
21237 \end_layout
21238
21239 \begin_layout Quotation
21240 Literate programming is the combination of documentation and source together
21241  in a fashion suited for reading by human beings.
21242  In fact, literate programs should be enjoyable reading, even inviting!
21243  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21244  and documentation in a single file.
21245  Literate programming tools then parse the file to produce either readable
21246  documentation or compilable source.
21247  The WEB style of literate programming was created by D.
21248 \begin_inset space \thinspace{}
21249 \end_inset
21250
21251 E.
21252  Knuth during the development of his TeX typesetting software.
21253  
21254 \end_layout
21255
21256 \begin_layout Standard
21257 Another excerpt says:
21258 \end_layout
21259
21260 \begin_layout Quotation
21261
21262 \emph on
21263 How is literate programming different from verbose commenting?
21264 \end_layout
21265
21266 \begin_layout Quotation
21267 There are three distinguishing characteristics.
21268  In order of importance, they are: 
21269 \end_layout
21270
21271 \begin_deeper
21272 \begin_layout Itemize
21273 flexible order of elaboration 
21274 \end_layout
21275
21276 \begin_layout Itemize
21277 automatic support for browsing 
21278 \end_layout
21279
21280 \begin_layout Itemize
21281 typeset documentation, especially diagrams and mathematics 
21282 \end_layout
21283
21284 \end_deeper
21285 \begin_layout Standard
21286 Now that I sparked your curiosity, take a look in the references.
21287 \end_layout
21288
21289 \begin_layout Subsubsection
21290 References
21291 \end_layout
21292
21293 \begin_layout Standard
21294 The complete Literate Programming FAQ can be found at:
21295 \end_layout
21296
21297 \begin_layout Quote
21298 Literate Programming FAQ 
21299 \begin_inset Flex URL
21300 status collapsed
21301
21302 \begin_layout Plain Layout
21303
21304 http://www.literateprogramming.com/lpfaq.pdf
21305 \end_layout
21306
21307 \end_inset
21308
21309
21310 \end_layout
21311
21312 \begin_layout Standard
21313 The FAQ lists 23 (twenty three!) different literate programming tools.
21314  Where some are specialized or 
21315 \begin_inset Quotes eld
21316 \end_inset
21317
21318 tailored
21319 \begin_inset Quotes erd
21320 \end_inset
21321
21322  for particular programming languages, while other have general scope.
21323  I selected 
21324 \noun on
21325 Noweb
21326 \noun default
21327  for my own use for several reasons:
21328 \end_layout
21329
21330 \begin_layout Itemize
21331 It can generate the documentation either in LaTeX or HTML.
21332 \end_layout
21333
21334 \begin_layout Itemize
21335 It has a open architecture, i.
21336 \begin_inset space \thinspace{}
21337 \end_inset
21338
21339 e.
21340 \begin_inset space \space{}
21341 \end_inset
21342
21343 it is easy to plug in new filters and to perform special processing that
21344  you may need.
21345  
21346 \end_layout
21347
21348 \begin_layout Itemize
21349 There is a good selection of filters available already (the HTML is one
21350  of them).
21351 \end_layout
21352
21353 \begin_layout Itemize
21354 It is free.
21355 \end_layout
21356
21357 \begin_layout Standard
21358 The Noweb web page can be found at: 
21359 \end_layout
21360
21361 \begin_layout Quote
21362 Noweb home page 
21363 \begin_inset Flex URL
21364 status collapsed
21365
21366 \begin_layout Plain Layout
21367
21368 http://www.cs.virginia.edu/~nr/noweb/
21369 \end_layout
21370
21371 \end_inset
21372
21373
21374 \end_layout
21375
21376 \begin_layout Standard
21377 Starting from there you can reach many other interesting links and even
21378  some literate program examples.
21379 \end_layout
21380
21381 \begin_layout Subsection
21382 LyX and Literate Programming
21383 \change_inserted 274215730 1350434640
21384  with Noweb
21385 \change_unchanged
21386
21387 \end_layout
21388
21389 \begin_layout Standard
21390 The LyX support for Literate Programming is provided by using the generic
21391  LyX converters mechanism.
21392  This support is provided in a 
21393 \begin_inset Quotes eld
21394 \end_inset
21395
21396 Noweb independent
21397 \begin_inset Quotes erd
21398 \end_inset
21399
21400  way, i.
21401 \begin_inset space \thinspace{}
21402 \end_inset
21403
21404 e.
21405 \begin_inset space \space{}
21406 \end_inset
21407
21408 you will be able to use this new LyX feature with some other literate programmin
21409 g tool of your choice by just changing your LyX preferences.
21410 \end_layout
21411
21412 \begin_layout Subsubsection
21413 Generating documents and code (weaving and tangling)
21414 \end_layout
21415
21416 \begin_layout Paragraph
21417 Selecting the document class
21418 \end_layout
21419
21420 \begin_layout Standard
21421 If you have installed Noweb and LyX successfully, whenever you open a new
21422  document or try to change the document class of an existing one, you will
21423  find that there are three new document classes available:
21424 \end_layout
21425
21426 \begin_layout Itemize
21427 Article (Noweb)
21428 \end_layout
21429
21430 \begin_layout Itemize
21431 Book (Noweb)
21432 \end_layout
21433
21434 \begin_layout Itemize
21435 Report (Noweb)
21436 \end_layout
21437
21438 \begin_layout Standard
21439 You must select one of them to create your literate documents from.
21440  
21441 \end_layout
21442
21443 \begin_layout Standard
21444 Note that literate documents are not limited to these three classes.
21445  New classes can be generated from other styles like letter or in combination
21446  with other class variations like Article (AMS).
21447  If you have special needs that cannot be covered by one of the existing
21448  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21449  will arrange to insert a new entry, or teach you how to do it.
21450 \begin_inset Foot
21451 status collapsed
21452
21453 \begin_layout Plain Layout
21454 It is very simple, it involves the creation of a file with four lines, and
21455  re-running of the auto configuration.
21456 \end_layout
21457
21458 \end_inset
21459
21460  Moreover, if you use a literate tool other than Noweb you may need to create
21461  a new set of document classes for it.
21462 \end_layout
21463
21464 \begin_layout Paragraph
21465 Typing code in
21466 \end_layout
21467
21468 \begin_layout Standard
21469 LyX enables you to write code with a layout named 
21470 \noun on
21471 Scrap
21472 \noun default
21473 .
21474 \begin_inset Foot
21475 status collapsed
21476
21477 \begin_layout Plain Layout
21478 The equivalent Noweb term is 
21479 \begin_inset Quotes eld
21480 \end_inset
21481
21482 Chunk
21483 \begin_inset Quotes erd
21484 \end_inset
21485
21486 .
21487  For historical reasons, I got used to the term 
21488 \begin_inset Quotes eld
21489 \end_inset
21490
21491 scrap
21492 \begin_inset Quotes erd
21493 \end_inset
21494
21495  introduced by other literate tool named Nuweb, which I used for many years
21496  before rendering myself to Noweb.
21497 \end_layout
21498
21499 \end_inset
21500
21501  Noweb delimits scraps like this:
21502 \end_layout
21503
21504 \begin_layout LyX-Code
21505 <<My scrap>>=
21506 \end_layout
21507
21508 \begin_layout LyX-Code
21509   code
21510 \end_layout
21511
21512 \begin_layout LyX-Code
21513   more code
21514 \end_layout
21515
21516 \begin_layout LyX-Code
21517   even more code
21518 \end_layout
21519
21520 \begin_layout LyX-Code
21521   @
21522 \end_layout
21523
21524 \begin_layout Standard
21525 The problem is that whatever is written in between the << and the 
21526 \family typewriter
21527 @
21528 \family default
21529  must be taken literally, i.
21530 \begin_inset space \thinspace{}
21531 \end_inset
21532
21533 e.
21534 \begin_inset space \space{}
21535 \end_inset
21536
21537 LyX should be prevented from making any special interpretation of what has
21538  been written.
21539  This is handled by a special layout named Scrap, that works like a normal
21540  paragraph but has a free spacing capability.
21541 \end_layout
21542
21543 \begin_layout Standard
21544 The down
21545 \change_deleted 274215730 1350432842
21546  
21547 \change_unchanged
21548 side of the Scrap paragraph layout is that consecutive paragraphs of code
21549  will be spaced with one empty line in the source code and also in the printed
21550  documentation.
21551  The work around is to enter each line of code within a single Scrap, with
21552  a newline (ctrl-return).
21553  The example above will look like this:
21554 \begin_inset Foot
21555 status collapsed
21556
21557 \begin_layout Plain Layout
21558 If you have a printed version of this document you will not see any difference
21559  between the previous example and this one.
21560 \end_layout
21561
21562 \end_inset
21563
21564
21565 \end_layout
21566
21567 \begin_layout LyX-Code
21568 <<My scrap>>=
21569 \begin_inset Newline newline
21570 \end_inset
21571
21572   code
21573 \begin_inset Newline newline
21574 \end_inset
21575
21576   more code
21577 \begin_inset Newline newline
21578 \end_inset
21579
21580   even more code
21581 \begin_inset Newline newline
21582 \end_inset
21583
21584   @
21585 \end_layout
21586
21587 \begin_layout Standard
21588 This layout works fine.
21589  The only real inconvenience is that you have to type ctrl-return instead
21590  of a plain return.
21591 \begin_inset Foot
21592 status collapsed
21593
21594 \begin_layout Plain Layout
21595 It is in my list of 
21596 \begin_inset Quotes eld
21597 \end_inset
21598
21599 improvements
21600 \begin_inset Quotes erd
21601 \end_inset
21602
21603  to fix that.
21604 \end_layout
21605
21606 \end_inset
21607
21608
21609 \end_layout
21610
21611 \begin_layout Standard
21612 As a special note, you can also use the 
21613 \begin_inset Quotes eld
21614 \end_inset
21615
21616 %def
21617 \begin_inset Quotes erd
21618 \end_inset
21619
21620  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21621 rence:
21622 \end_layout
21623
21624 \begin_layout LyX-Code
21625 <<My scrap>>=
21626 \begin_inset Newline newline
21627 \end_inset
21628
21629   def some_function(args):
21630 \begin_inset Newline newline
21631 \end_inset
21632
21633     "This is the doc string for this function."
21634 \begin_inset Newline newline
21635 \end_inset
21636
21637     print "My args: ", args
21638 \end_layout
21639
21640 \begin_layout LyX-Code
21641 @ %def some_function
21642 \end_layout
21643
21644 \begin_layout Standard
21645 For an example of this usage and the resulting cross-reference output, look
21646  at the Literate python program in 
21647 \emph on
21648 LIBDIR/examples/listerrors.lyx
21649 \emph default
21650  which should make this all clear.
21651 \end_layout
21652
21653 \begin_layout Paragraph
21654 Generating the documentation
21655 \end_layout
21656
21657 \begin_layout Standard
21658 At this point you already have a new document file with a proper document
21659  class, and with some code and text on it.
21660  How do I print it? The answer is simple, you select 
21661 \family sans
21662 View\SpecialChar \menuseparator
21663 DVI,
21664 \family default
21665  etc.
21666  Just like you would do for a plain document.
21667  No special procedure is required.
21668 \end_layout
21669
21670 \begin_layout Standard
21671 To help orientate you, I will now explain what happens inside LyX:
21672 \end_layout
21673
21674 \begin_layout Enumerate
21675 When the 
21676 \family sans
21677 Update\SpecialChar \menuseparator
21678 DVI
21679 \family default
21680  menu option is chosen, a LaTeX file is generated.
21681  
21682 \end_layout
21683
21684 \begin_deeper
21685 \begin_layout Standard
21686 If the document is of any literate class the generated file will be named
21687  with an extension name defined by the 
21688 \begin_inset Quotes eld
21689 \end_inset
21690
21691 literate
21692 \begin_inset Quotes erd
21693 \end_inset
21694
21695  format (defined in the Preferences panel), otherwise the file will have
21696  the usual 
21697 \family typewriter
21698 .tex
21699 \family default
21700  extension.
21701 \end_layout
21702
21703 \end_deeper
21704 \begin_layout Enumerate
21705 Note that the only difference so far is in the name of the file, no special
21706  processing is required by LyX.
21707  Given that you formatted the code using the Scrap layout that, by itself,
21708  takes care of the business.
21709 \end_layout
21710
21711 \begin_layout Enumerate
21712 If the document is of any literate class LyX will then use the internal
21713  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21714 \begin_inset Foot
21715 status collapsed
21716
21717 \begin_layout Plain Layout
21718 The converters are defined in the 
21719 \family sans
21720 Tools\SpecialChar \menuseparator
21721 Preferences
21722 \family default
21723  panel, under the 
21724 \begin_inset Quotes eld
21725 \end_inset
21726
21727 Conversion
21728 \begin_inset Quotes erd
21729 \end_inset
21730
21731  tab.
21732  See section 
21733 \emph on
21734 Converters
21735 \emph default
21736  of the 
21737 \emph on
21738 Customization
21739 \emph default
21740  manual for general information about converters.
21741 \end_layout
21742
21743 \end_inset
21744
21745  to generate the LaTeX file.
21746 \end_layout
21747
21748 \begin_deeper
21749 \begin_layout Standard
21750 Otherwise it will just skip this step.
21751 \end_layout
21752
21753 \end_deeper
21754 \begin_layout Enumerate
21755 Finally, LaTeX is invoked and the regular post processing continues as in
21756  a plain document.
21757 \end_layout
21758
21759 \begin_layout Standard
21760 Independence from a particular 
21761 \begin_inset Quotes eld
21762 \end_inset
21763
21764 literate tool
21765 \begin_inset Quotes erd
21766 \end_inset
21767
21768  is easily achieved by changing the commands that are run by the various
21769  converters.
21770 \end_layout
21771
21772 \begin_layout Paragraph
21773 Generating the code
21774 \end_layout
21775
21776 \begin_layout Standard
21777 When the build menu option is chosen or the corresponding button in the
21778  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21779  Next, LyX invokes the 
21780 \family typewriter
21781 Noweb->Program
21782 \family default
21783  converter.
21784  This converter needs to be defined by the user and is not installed by
21785  default, though the Program format is.
21786  This converter (like any other converter) will have two parts:
21787 \end_layout
21788
21789 \begin_layout Enumerate
21790 The converter program itself.
21791  This program performs the conversion from the one format to the other (in
21792  this case, from the Noweb format to the Program pseudo-format).
21793 \end_layout
21794
21795 \begin_layout Enumerate
21796 The error log parser.
21797  This is a program whose sole purpose is to rewrite error messages in a
21798  format that LyX understands.
21799  This makes it possible for LyX to place error boxes in the right places
21800  in the file buffer.
21801 \end_layout
21802
21803 \begin_layout Standard
21804 The first part, the 
21805 \begin_inset Quotes eld
21806 \end_inset
21807
21808 Converter
21809 \begin_inset Quotes erd
21810 \end_inset
21811
21812  setting, should be set to 
21813 \begin_inset Quotes eld
21814 \end_inset
21815
21816
21817 \family typewriter
21818 build-script $$i
21819 \family default
21820  $$r
21821 \begin_inset Quotes erd
21822 \end_inset
21823
21824 .
21825  This basically means that LyX will call 
21826 \begin_inset Quotes eld
21827 \end_inset
21828
21829 build-script
21830 \begin_inset Quotes erd
21831 \end_inset
21832
21833  (a program or script) with the name of the Noweb file (normally a file
21834  in the LyX temp directory) and the directory path of the original LyX file.
21835  
21836 \end_layout
21837
21838 \begin_layout Standard
21839 This is an implementation of 
21840 \begin_inset Quotes eld
21841 \end_inset
21842
21843 build-script
21844 \begin_inset Quotes erd
21845 \end_inset
21846
21847  that you can place in a directory on your path:
21848 \end_layout
21849
21850 \begin_layout LyX-Code
21851 #!/bin/sh
21852 \end_layout
21853
21854 \begin_layout LyX-Code
21855 #
21856 \end_layout
21857
21858 \begin_layout LyX-Code
21859 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
21860 \end_layout
21861
21862 \begin_layout Standard
21863 The next part of the converter setting is the 
21864 \begin_inset Quotes eld
21865 \end_inset
21866
21867 Flags
21868 \begin_inset Quotes erd
21869 \end_inset
21870
21871  which is to be set to 
21872 \begin_inset Quotes eld
21873 \end_inset
21874
21875
21876 \family typewriter
21877 parselog=$$s/scripts/listerrors
21878 \family default
21879
21880 \begin_inset Quotes erd
21881 \end_inset
21882
21883 .
21884  This will run any errors that are generated by the 
21885 \begin_inset Quotes eld
21886 \end_inset
21887
21888 build-script
21889 \begin_inset Quotes erd
21890 \end_inset
21891
21892  process through the 
21893 \begin_inset Quotes eld
21894 \end_inset
21895
21896 listerrors
21897 \begin_inset Quotes erd
21898 \end_inset
21899
21900  program.
21901 \end_layout
21902
21903 \begin_layout Standard
21904 The build will normally take place in LyX's temporary directory, so the
21905  files produced by the conversion will be in that directory.
21906  LyX will copy out what it regards as the `main' file, but the 
21907 \family typewriter
21908 Noweb->Program
21909 \family default
21910  conversion may produce several files, and so most of these would then be
21911  deleted when LyX was closed.
21912  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
21913  the build-script scrap can place the generated files in that location.
21914 \end_layout
21915
21916 \begin_layout Paragraph
21917 Build instructions in the document
21918 \end_layout
21919
21920 \begin_layout Standard
21921 The last piece of the integration between LyX and noweb is the 
21922 \begin_inset Quotes eld
21923 \end_inset
21924
21925 build-script
21926 \begin_inset Quotes erd
21927 \end_inset
21928
21929  scrap.
21930  Generally, the instructions for building your program should be embedded
21931  in a scrap of its own.
21932  The noweb-specific 
21933 \begin_inset Quotes eld
21934 \end_inset
21935
21936 build-script
21937 \begin_inset Quotes erd
21938 \end_inset
21939
21940  above uses the notangle command to look for this scrap (called 
21941 \begin_inset Quotes eld
21942 \end_inset
21943
21944 build-script
21945 \begin_inset Quotes erd
21946 \end_inset
21947
21948 ) and runs its contents through 
21949 \begin_inset Quotes eld
21950 \end_inset
21951
21952 sh
21953 \begin_inset Quotes erd
21954 \end_inset
21955
21956 .
21957 \end_layout
21958
21959 \begin_layout Standard
21960 Typically, such a scrap would look something like this:
21961 \end_layout
21962
21963 \begin_layout LyX-Code
21964 <<build-script>>=
21965 \begin_inset Newline newline
21966 \end_inset
21967
21968 #!/bin/sh
21969 \begin_inset Newline newline
21970 \end_inset
21971
21972
21973 \begin_inset Newline newline
21974 \end_inset
21975
21976 if [ -z "${NOWEB_SOURCE}" ]
21977 \begin_inset Newline newline
21978 \end_inset
21979
21980 then
21981 \begin_inset Newline newline
21982 \end_inset
21983
21984   NOWEB_SOURCE=myfile.nw
21985 \begin_inset Newline newline
21986 \end_inset
21987
21988 fi
21989 \begin_inset Newline newline
21990 \end_inset
21991
21992 [...
21993  code to extract files ...
21994  use NOWEB_OUTPUT_DIR here ...]
21995 \begin_inset Newline newline
21996 \end_inset
21997
21998 [...
21999  code to compile files ...]
22000 \begin_inset Newline newline
22001 \end_inset
22002
22003 @
22004 \end_layout
22005
22006 \begin_layout Standard
22007 Look in 
22008 \emph on
22009 LIBDIR/examples/listerrors.lyx
22010 \emph default
22011  or in 
22012 \emph on
22013 LIBDIR/examples/Literate.lyx
22014 \emph default
22015  which implement two versions of the 
22016 \begin_inset Quotes eld
22017 \end_inset
22018
22019 listerrors
22020 \begin_inset Quotes erd
22021 \end_inset
22022
22023  program for some illustrations of how all of these pieces go together or
22024  in 
22025 \emph on
22026 LIBDIR/examples/noweb2lyx.lyx.
22027
22028 \emph default
22029  Interestingly, these three files show off the language-indepence of the
22030  LyX literate programming support since they are written in Python, C and
22031  Perl respectively.
22032 \end_layout
22033
22034 \begin_layout Subsubsection
22035 Configuring LyX
22036 \end_layout
22037
22038 \begin_layout Standard
22039 All the Literate Programming support is configured by the 
22040 \family sans
22041 Tools\SpecialChar \menuseparator
22042 Preferences
22043 \family default
22044  panel in the 
22045 \begin_inset Quotes eld
22046 \end_inset
22047
22048 File Handling
22049 \begin_inset Quotes erd
22050 \end_inset
22051
22052  tab.
22053  The important parts are:
22054 \end_layout
22055
22056 \begin_layout Description
22057 the
22058 \begin_inset space ~
22059 \end_inset
22060
22061
22062 \begin_inset Quotes eld
22063 \end_inset
22064
22065 NoWeb
22066 \begin_inset Quotes erd
22067 \end_inset
22068
22069
22070 \begin_inset space ~
22071 \end_inset
22072
22073 format Set up via the File Formats tab, this is where the Noweb-specific
22074  pieces are set up.
22075  The 
22076 \family sans
22077 GUI Name
22078 \family default
22079  is set to 
22080 \family typewriter
22081 NoWeb
22082 \family default
22083 , the file extension is set to 
22084 \family typewriter
22085 .nw
22086 \family default
22087 .
22088  This tells LyX to create a file with a 
22089 \family typewriter
22090 .nw
22091 \family default
22092  extension in the first step of the conversion process.
22093 \end_layout
22094
22095 \begin_layout Description
22096 the
22097 \begin_inset space ~
22098 \end_inset
22099
22100
22101 \family sans
22102 Program
22103 \family default
22104
22105 \begin_inset space ~
22106 \end_inset
22107
22108 format This is an empty format whose sole purpose is to be the endpoint
22109  of a conversion (which then allows us to set up a converter for it).
22110 \end_layout
22111
22112 \begin_layout Description
22113
22114 \family sans
22115 NoWeb
22116 \family default
22117 ->
22118 \family sans
22119 LaTeX
22120 \family default
22121  This converter performs the 
22122 \begin_inset Quotes eld
22123 \end_inset
22124
22125 weaving
22126 \begin_inset Quotes erd
22127 \end_inset
22128
22129  of the literate document.
22130  For Noweb, it is set to 
22131 \begin_inset Quotes eld
22132 \end_inset
22133
22134
22135 \family typewriter
22136 noweave -delay -index $$i > $$o
22137 \family default
22138
22139 \begin_inset Quotes erd
22140 \end_inset
22141
22142
22143 \end_layout
22144
22145 \begin_layout Description
22146
22147 \family sans
22148 NoWeb
22149 \family default
22150 ->
22151 \family sans
22152 Program
22153 \family default
22154  This performs the 
22155 \begin_inset Quotes eld
22156 \end_inset
22157
22158 tangling step
22159 \begin_inset Quotes erd
22160 \end_inset
22161
22162 .
22163  As stated above, the Converter is set to 
22164 \begin_inset Quotes eld
22165 \end_inset
22166
22167
22168 \family typewriter
22169 build-script $$i
22170 \family default
22171  $$r
22172 \begin_inset Quotes erd
22173 \end_inset
22174
22175 , with Flags set to 
22176 \begin_inset Quotes eld
22177 \end_inset
22178
22179
22180 \family typewriter
22181 parselog=$$s/scripts/listerrors
22182 \family default
22183
22184 \begin_inset Quotes erd
22185 \end_inset
22186
22187 .
22188 \end_layout
22189
22190 \begin_layout Subsubsection
22191 Debug extensions
22192 \end_layout
22193
22194 \begin_layout Standard
22195 There is also a new function implemented in the LyX server, the 
22196 \begin_inset Quotes eld
22197 \end_inset
22198
22199 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22200  
22201 \end_layout
22202
22203 \begin_layout Standard
22204 When debugging code with ddd/gdb, it is possible to invoke a text editor
22205  at the current execution position with a single key stroke.
22206  The default ddd configuration for that is shift-ctrl-V.
22207  It happens that you can define the editor command line invocation in ddd
22208  by accessing the 
22209 \family sans
22210 Edit\SpecialChar \menuseparator
22211 Preferences\SpecialChar \menuseparator
22212 Helpers
22213 \family default
22214  dialog and changing the "Edit Sources" entry.
22215 \end_layout
22216
22217 \begin_layout Standard
22218 I take advantage of the new
22219 \change_inserted 274215730 1350432999
22220 ly
22221 \change_unchanged
22222  created LyX server function and this ddd feature, and set 
22223 \begin_inset Quotes eld
22224 \end_inset
22225
22226 Edit Sources
22227 \begin_inset Quotes erd
22228 \end_inset
22229
22230  to:
22231 \end_layout
22232
22233 \begin_layout LyX-Code
22234 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22235 \end_layout
22236
22237 \begin_layout Standard
22238 With this, whenever you are using ddd and find a point in the program that
22239  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22240  ddd 
22241 \change_deleted 274215730 1350433047
22242 you
22243 \change_inserted 274215730 1350433047
22244 will
22245 \change_unchanged
22246  forward this information to LyX through the LyX server and then the LyX
22247  window will show the same file with the cursor at the same position ddd
22248  was pointing to.
22249  No more guessing or long scrolling to locate a point in the program back
22250  from debugging !
22251 \end_layout
22252
22253 \begin_layout Standard
22254 Note however that you must enable the LyX server to get this feature working
22255  (it is disabled by default).
22256  You can enable it in 
22257 \family sans
22258 Preferences
22259 \family default
22260  (tabs 
22261 \family sans
22262 Inputs
22263 \family default
22264
22265 \family sans
22266 Paths
22267 \family default
22268 ) by entering in the 
22269 \family sans
22270 LyXserver pipe
22271 \family default
22272  a path like 
22273 \begin_inset Quotes eld
22274 \end_inset
22275
22276
22277 \family typewriter
22278 /home/<your-home-directory>/.lyx/lyxpipe
22279 \family default
22280
22281 \begin_inset Quotes erd
22282 \end_inset
22283
22284
22285 \end_layout
22286
22287 \begin_layout Standard
22288 Read the LyX server documentation in the 
22289 \emph on
22290 Customization Manual
22291 \emph default
22292  for further information.
22293 \end_layout
22294
22295 \begin_layout Subsubsection
22296 Toolbar extensions
22297 \end_layout
22298
22299 \begin_layout Standard
22300 There are six new buttons that can be added to your LyX toolbar.
22301  Five of these buttons are short cuts to layout styles: 
22302 \family sans
22303 Standard
22304 \family default
22305
22306 \family sans
22307 Section
22308 \family default
22309
22310 \family sans
22311 LaTeX
22312 \family default
22313
22314 \family sans
22315 LyX-Code
22316 \family default
22317 , and 
22318 \family sans
22319 Scrap
22320 \family default
22321 .
22322  The last one is a short cut to the 
22323 \begin_inset Quotes eld
22324 \end_inset
22325
22326 Build Program
22327 \begin_inset Quotes erd
22328 \end_inset
22329
22330  File menu entry.
22331  
22332 \end_layout
22333
22334 \begin_layout Standard
22335 LyX has a range of buttons that are available for tool bar customization.
22336  In my toolbar I like to combine the six short cuts above with two more:
22337  One for 
22338 \family sans
22339 View
22340 \family default
22341 \SpecialChar \menuseparator
22342
22343 \family sans
22344 Update
22345 \family default
22346 \SpecialChar \menuseparator
22347
22348 \family sans
22349 DVI
22350 \family default
22351  and the other for 
22352 \family sans
22353 View\SpecialChar \menuseparator
22354 DVI
22355 \family default
22356  File menu entries.
22357  Here is how it looks like:
22358 \end_layout
22359
22360 \begin_layout LyX-Code
22361 Toolbar
22362 \end_layout
22363
22364 \begin_layout LyX-Code
22365   Layouts
22366 \end_layout
22367
22368 \begin_layout LyX-Code
22369   Icon "layout Standard"
22370 \end_layout
22371
22372 \begin_layout LyX-Code
22373   Icon "layout Section"
22374 \end_layout
22375
22376 \begin_layout LyX-Code
22377   Icon "layout LaTeX"
22378 \end_layout
22379
22380 \begin_layout LyX-Code
22381   Icon "layout LyX-Code"
22382 \end_layout
22383
22384 \begin_layout LyX-Code
22385   Icon "layout Scrap"
22386 \end_layout
22387
22388 \begin_layout LyX-Code
22389   Separator
22390 \end_layout
22391
22392 \begin_layout LyX-Code
22393   Icon "buffer-view"
22394 \end_layout
22395
22396 \begin_layout LyX-Code
22397   Icon "buffer-typeset"
22398 \end_layout
22399
22400 \begin_layout LyX-Code
22401   Icon "build-program"
22402 \end_layout
22403
22404 \begin_layout LyX-Code
22405   Separator
22406 \end_layout
22407
22408 \begin_layout LyX-Code
22409 .
22410 \end_layout
22411
22412 \begin_layout LyX-Code
22413 .
22414 \end_layout
22415
22416 \begin_layout LyX-Code
22417 .
22418 \end_layout
22419
22420 \begin_layout LyX-Code
22421 End
22422 \end_layout
22423
22424 \begin_layout Subsubsection
22425 Colors customization
22426 \end_layout
22427
22428 \begin_layout Standard
22429 There are a number of colors in LyX that can be customized in 
22430 \family sans
22431 Preferences
22432 \family default
22433 .
22434  One of the things that bothers people is the LaTeX font color.
22435  The default color is red, since the scraps uses LaTeX font, and there is
22436  a lot of scraps in literate documents, you may get tired of seeing everything
22437  in red.
22438  You can change it by going to the tabs 
22439 \family sans
22440 Look&Feel
22441 \family default
22442
22443 \family sans
22444 Colors.
22445 \end_layout
22446
22447 \begin_layout Standard
22448 The next thing is the visible presence of the newline character in the screen.
22449  You can choose the color of this particular character and make it blend
22450  in the background.
22451  I recommend you choosing a color that is close to the background but not
22452  equal, that way you still can see it is there, but it is not bothering
22453  you anymore.
22454
22455 \change_deleted 274215730 1350434691
22456  
22457 \change_inserted 274215730 1350434708
22458
22459 \end_layout
22460
22461 \begin_layout Subsection
22462
22463 \change_inserted 274215730 1350434732
22464 LyX and knitr/Sweave
22465 \end_layout
22466
22467 \begin_layout Standard
22468
22469 \change_inserted 274215730 1350434777
22470 Support for knitr and Sweave is documented in the knitr.lyx example file
22471  and in the Sweave manual (in the Help > Specific Manuals submenu).
22472 \change_unchanged
22473
22474 \end_layout
22475
22476 \begin_layout Chapter
22477 Special features
22478 \end_layout
22479
22480 \begin_layout Standard
22481 You can do everything with LyX that you can do with LaTeX.
22482  However, LyX cannot support every LaTeX feature directly.
22483  But you can always use TeX Code.
22484  This chapter shows you some more special things you might want to use.
22485  For other special things you can do with figures, tables, floats, boxes
22486  and notes, have a look at the 
22487 \emph on
22488 Embedded
22489 \begin_inset space ~
22490 \end_inset
22491
22492 Objects
22493 \emph default
22494  manual.
22495 \end_layout
22496
22497 \begin_layout Section
22498 Multiple Text Columns
22499 \end_layout
22500
22501 \begin_layout Standard
22502 This feature is independent of the option 
22503 \family sans
22504 Two-column document
22505 \family default
22506  in the document settings under 
22507 \family sans
22508 Text Layout
22509 \family default
22510 .
22511  If you want to have 2
22512 \begin_inset space ~
22513 \end_inset
22514
22515 columns for the whole document, it is recommended to use the 
22516 \family sans
22517 Two-column document
22518 \family default
22519  option.
22520  For all other cases use this feature.
22521 \end_layout
22522
22523 \begin_layout Standard
22524 To use multiple text columns in your document, you have to load the module
22525  
22526 \family sans
22527 Multiple Columns
22528 \family default
22529  (menu 
22530 \family sans
22531 Document\SpecialChar \menuseparator
22532 Settings\SpecialChar \menuseparator
22533 Modules
22534 \family default
22535 ) and must have the LaTeX-package 
22536 \series bold
22537 multicol
22538 \series default
22539
22540 \begin_inset Index idx
22541 status collapsed
22542
22543 \begin_layout Plain Layout
22544 LaTeX-packages ! multicol
22545 \end_layout
22546
22547 \end_inset
22548
22549  installed.
22550 \end_layout
22551
22552 \begin_layout Standard
22553 Footnotes within multiple columns will be placed at the bottom of the page
22554  and not under each column.
22555  Within the different columns you can use everything, with the limitation
22556  that for floats you need to use the float option 
22557 \family sans
22558 Span columns
22559 \family default
22560 .
22561 \end_layout
22562
22563 \begin_layout Subsection
22564 Basics
22565 \end_layout
22566
22567 \begin_layout Standard
22568 If you want to have 2
22569 \begin_inset space ~
22570 \end_inset
22571
22572 columns in your text, use the style 
22573 \family sans
22574 Begin Multiple Columns
22575 \family default
22576  where the columns should start.
22577  The content of the style is the number of the columns, so in this case
22578  use a 
22579 \begin_inset Quotes eld
22580 \end_inset
22581
22582 2
22583 \begin_inset Quotes erd
22584 \end_inset
22585
22586 .
22587  At the point where the columns should end use the style 
22588 \family sans
22589 End Multiple Columns
22590 \family default
22591  and keep it empty.
22592 \end_layout
22593
22594 \begin_layout Standard
22595 Here is an example:
22596 \end_layout
22597
22598 \begin_layout Begin Multiple Columns
22599 2
22600 \end_layout
22601
22602 \begin_layout Standard
22603 \noindent
22604
22605 \series bold
22606 \size small
22607 The Adventure of the Empty House
22608 \series default
22609
22610 \begin_inset Newline newline
22611 \end_inset
22612
22613 by 
22614 \noun on
22615 Sir Arthur Conan Doyle
22616 \end_layout
22617
22618 \begin_layout Standard
22619
22620 \size small
22621 It was in the spring of the year 1894 that all London was interested, and
22622  the fashionable world dismayed, by the murder of the Honourable Ronald
22623  Adair under most unusual and inexplicable circumstances.
22624  The public has already learned those particulars of the crime which came
22625  out in the police investigation, but a good deal was suppressed upon that
22626  occasion, since the case for the prosecution was so overwhelmingly strong
22627  that it was not necessary to bring forward all the facts.
22628  Only now, at the end of nearly ten years, am I allowed to supply those
22629  missing links which make up the whole of that remarkable chain.
22630  The crime was of interest in itself, but that interest was as nothing to
22631  me compared to the inconceivable sequel, which afforded me the greatest
22632  shock and surprise of any event in my adventurous life.
22633  Even now, after this long interval, I find myself thrilling as I think
22634  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22635 ty which utterly submerged my mind.
22636  Let me say to that public, which has shown some interest in those glimpses
22637  which I have occasionally given them of the thoughts and actions of a very
22638  remarkable man, that they are not to blame me if I have not shared my knowledge
22639  with them, for I should have considered it my first duty to do so, had
22640  I not been barred by a positive prohibition from his own lips, which was
22641  only withdrawn upon the third of last month.
22642 \end_layout
22643
22644 \begin_layout End Multiple Columns
22645
22646 \end_layout
22647
22648 \begin_layout Standard
22649 Here is an example with 3
22650 \begin_inset space ~
22651 \end_inset
22652
22653 columns:
22654 \end_layout
22655
22656 \begin_layout Begin Multiple Columns
22657 3
22658 \end_layout
22659
22660 \begin_layout Standard
22661
22662 \size footnotesize
22663 It can be imagined that my close intimacy with Sherlock Holmes had interested
22664  me deeply in crime, and that after his disappearance I never failed to
22665  read with care the various problems which came before the public.
22666  And I even attempted, more than once, for my own private satisfaction,
22667  to employ his methods in their solution, though with indifferent success.
22668  There was none, however, which appealed to me like this tragedy of Ronald
22669  Adair.
22670  As I read the evidence at the inquest, which led up to a verdict of willful
22671  murder against some person or persons unknown, I realized more clearly
22672  than I had ever done the loss which the community had sustained by the
22673  death of Sherlock Holmes.
22674  There were points about this strange business which would, I was sure,
22675  have specially appealed to him, and the efforts of the police would have
22676  been supplemented, or more probably anticipated, by the trained observation
22677  and the alert mind of the first criminal agent in Europe.
22678  All day, as I drove upon my round, I turned over the case in my mind and
22679  found no explanation which appeared to me to be adequate.
22680  At the risk of telling a twice-told tale, I will recapitulate the facts
22681  as they were known to the public at the conclusion of the inquest.
22682 \end_layout
22683
22684 \begin_layout End Multiple Columns
22685
22686 \end_layout
22687
22688 \begin_layout Standard
22689 You can have up to 10
22690 \begin_inset space ~
22691 \end_inset
22692
22693 columns if you want to, but that might not be very pleasant for the readers
22694  of your document.
22695 \end_layout
22696
22697 \begin_layout Standard
22698 \begin_inset Newpage newpage
22699 \end_inset
22700
22701
22702 \end_layout
22703
22704 \begin_layout Subsection
22705 Columns inside Columns
22706 \end_layout
22707
22708 \begin_layout Standard
22709 You can also have columns inside columns:
22710 \end_layout
22711
22712 \begin_layout Begin Multiple Columns
22713 2
22714 \end_layout
22715
22716 \begin_layout Standard
22717
22718 \size footnotesize
22719 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22720  at that time governor of one of the Australian colonies.
22721  Adair's mother had returned from Australia to undergo the operation for
22722  cataract, and she, her son Ronald, and her daughter Hilda were living together
22723  at 427 Park Lane.
22724 \end_layout
22725
22726 \begin_layout Begin Multiple Columns
22727 2
22728 \end_layout
22729
22730 \begin_layout Standard
22731
22732 \size footnotesize
22733 The youth moved in the best society–had, so far as was known, no enemies
22734  and no particular vices.
22735  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22736  had been broken off by mutual consent some months before, and there was
22737  no sign that it had left any very profound feeling behind it.
22738  For the rest {sic} the man's life moved in a narrow and conventional circle,
22739  for his habits were quiet and his nature unemotional.
22740  Yet it was upon this easy-going young aristocrat that death came, in most
22741  strange and unexpected form, between the hours of ten and eleven-twenty
22742  on the night of March 30, 1894.
22743 \end_layout
22744
22745 \begin_layout End Multiple Columns
22746
22747 \end_layout
22748
22749 \begin_layout Standard
22750
22751 \size footnotesize
22752 Ronald Adair was fond of cards–playing continually, but never for such stakes
22753  as would hurt him.
22754  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22755  It was shown that, after dinner on the day of his death, he had played
22756  a rubber of whist at the latter club.
22757  He had also played there in the afternoon.
22758
22759 \size default
22760  
22761 \size footnotesize
22762 The evidence of those who had played with him– Mr.
22763  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22764  and that there was a fairly equal fall of the cards.
22765  Adair might have lost five pounds, but not more.
22766  His fortune was a considerable one, and such a loss could not in any way
22767  affect him.
22768  He had played nearly every day at one club or other, but he was a cautious
22769  player, and usually rose a winner.
22770  It came out in evidence that, in partnership with Colonel Moran, he had
22771  actually won as much as four hundred and twenty pounds in a sitting, some
22772  weeks before, from Godfrey Milner and Lord Balmoral.
22773  So much for his recent history as it came out at the inquest.
22774 \end_layout
22775
22776 \begin_layout End Multiple Columns
22777
22778 \end_layout
22779
22780 \begin_layout Subsection
22781 Advanced Examples
22782 \end_layout
22783
22784 \begin_layout Standard
22785 The examples in this section show some more special features of multiple
22786  columns.
22787 \end_layout
22788
22789 \begin_layout Standard
22790 For more features of multiple columns, have a look at the documentation
22791  of the LaTeX-package 
22792 \series bold
22793 multicol
22794 \series default
22795
22796 \begin_inset Index idx
22797 status collapsed
22798
22799 \begin_layout Plain Layout
22800 LaTeX-packages ! multicol
22801 \end_layout
22802
22803 \end_inset
22804
22805
22806 \begin_inset CommandInset citation
22807 LatexCommand cite
22808 key "multicol"
22809
22810 \end_inset
22811
22812 .
22813 \end_layout
22814
22815 \begin_layout Subsubsection
22816 Preface
22817 \end_layout
22818
22819 \begin_layout Standard
22820 To add a preface text for multiple columns, add the command
22821 \end_layout
22822
22823 \begin_layout Standard
22824
22825 \series bold
22826 }[
22827 \end_layout
22828
22829 \begin_layout Standard
22830 as TeX Code behind the number of columns in the
22831 \family sans
22832  Begin Multiple Columns
22833 \family default
22834  style.
22835  Behind the command follows the preface text.
22836  At the end of the style use the command
22837 \end_layout
22838
22839 \begin_layout Standard
22840
22841 \series bold
22842 ]{
22843 \end_layout
22844
22845 \begin_layout Standard
22846 as TeX Code.
22847  An example with some preface text:
22848 \end_layout
22849
22850 \begin_layout Standard
22851 \begin_inset VSpace bigskip
22852 \end_inset
22853
22854
22855 \end_layout
22856
22857 \begin_layout Begin Multiple Columns
22858 2
22859 \begin_inset ERT
22860 status collapsed
22861
22862 \begin_layout Plain Layout
22863
22864 }[
22865 \end_layout
22866
22867 \end_inset
22868
22869 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22870
22871 \begin_inset ERT
22872 status collapsed
22873
22874 \begin_layout Plain Layout
22875
22876 ]{
22877 \end_layout
22878
22879 \end_inset
22880
22881
22882 \end_layout
22883
22884 \begin_layout Standard
22885
22886 \size small
22887 On the evening of the crime, he returned from the club exactly at ten.
22888  His mother and sister were out spending the evening with a relation.
22889  The servant deposed that she heard him enter the front room on the second
22890  floor, generally used as his sitting-room.
22891  She had lit a fire there, and as it smoked she had opened the window.
22892  No sound was heard from the room until eleven-twenty, the hour of the return
22893  of Lady Maynooth and her daughter.
22894  Desiring to say good-night, she attempted to enter her son's room.
22895  The door was locked on the inside, and no answer could be got to their
22896  cries and knocking.
22897  Help was obtained, and the door forced.
22898  The unfortunate young man was found lying near the table.
22899  His head had been horribly mutilated by an expanding revolver bullet, but
22900  no weapon of any sort was to be found in the room.
22901 \end_layout
22902
22903 \begin_layout End Multiple Columns
22904
22905 \end_layout
22906
22907 \begin_layout Standard
22908 You can also use a section heading as the preface if you use a section command
22909  as TeX Code behind the first TeX Code.
22910  For example the command
22911 \end_layout
22912
22913 \begin_layout Standard
22914
22915 \series bold
22916
22917 \backslash
22918 subsection{subsection title}
22919 \end_layout
22920
22921 \begin_layout Standard
22922 creates a subsection.
22923  In this example the preface is a subsubsection:
22924 \end_layout
22925
22926 \begin_layout Begin Multiple Columns
22927 2
22928 \begin_inset ERT
22929 status collapsed
22930
22931 \begin_layout Plain Layout
22932
22933 }[
22934 \end_layout
22935
22936 \end_inset
22937
22938
22939 \begin_inset ERT
22940 status collapsed
22941
22942 \begin_layout Plain Layout
22943
22944
22945 \backslash
22946 subsubsection{
22947 \end_layout
22948
22949 \end_inset
22950
22951 This is a subsubsection heading as a preface
22952 \begin_inset ERT
22953 status collapsed
22954
22955 \begin_layout Plain Layout
22956
22957 }
22958 \end_layout
22959
22960 \end_inset
22961
22962
22963 \begin_inset ERT
22964 status collapsed
22965
22966 \begin_layout Plain Layout
22967
22968 ]{
22969 \end_layout
22970
22971 \end_inset
22972
22973
22974 \end_layout
22975
22976 \begin_layout Standard
22977
22978 \size small
22979 A minute examination of the circumstances served only to make the case more
22980  complex.
22981  In the first place, no reason could be given why the young man should have
22982  fastened the door upon the inside.
22983  There was the possibility that the murderer had done this, and had afterwards
22984  escaped by the window.
22985  The drop was at least twenty feet, however, and a bed of crocuses in full
22986  bloom lay beneath.
22987  Neither the flowers nor the earth showed any sign of having been disturbed,
22988  nor were there any marks upon the narrow strip of grass which separated
22989  the house from the road.
22990  Apparently, therefore, it was the young man himself who had fastened the
22991  door.
22992  But how did he come by his death? No one could have climbed up to the window
22993  without leaving traces.
22994  Suppose a man had fired through the window, he would indeed be a remarkable
22995  shot who could with a revolver inflict so deadly a wound.
22996  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22997  a hundred yards of the house.
22998  No one had heard a shot.
22999 \end_layout
23000
23001 \begin_layout End Multiple Columns
23002
23003 \end_layout
23004
23005 \begin_layout Standard
23006 If there is less vertical space left on the page at the beginning of the
23007  multiple columns than needed for 6
23008 \begin_inset space ~
23009 \end_inset
23010
23011 text lines, a page break will be inserted before the multiple columns.
23012  Depending on the number of lines of the preface text, you might want to
23013  change this value.
23014  It is determined by inserting the command
23015 \end_layout
23016
23017 \begin_layout Standard
23018
23019 \series bold
23020 ][number
23021 \backslash
23022 baselineskip
23023 \end_layout
23024
23025 \begin_layout Standard
23026 as TeX Code behind the preface definition but before the final 
23027 \series bold
23028 ]{
23029 \series default
23030  command.
23031  
23032 \emph on
23033 number
23034 \emph default
23035  is hereby the number of text lines.
23036  In this example the space is set to 7
23037 \begin_inset space ~
23038 \end_inset
23039
23040 text lines:
23041 \end_layout
23042
23043 \begin_layout Begin Multiple Columns
23044 2
23045 \begin_inset ERT
23046 status collapsed
23047
23048 \begin_layout Plain Layout
23049
23050 }[
23051 \end_layout
23052
23053 \end_inset
23054
23055
23056 \begin_inset ERT
23057 status collapsed
23058
23059 \begin_layout Plain Layout
23060
23061
23062 \backslash
23063 subsubsection{
23064 \end_layout
23065
23066 \end_inset
23067
23068 This is the sectioning command
23069 \begin_inset Newline newline
23070 \end_inset
23071
23072 as a preface and
23073 \begin_inset Newline newline
23074 \end_inset
23075
23076 with multiple text lines
23077 \begin_inset ERT
23078 status collapsed
23079
23080 \begin_layout Plain Layout
23081
23082 }
23083 \end_layout
23084
23085 \end_inset
23086
23087
23088 \begin_inset ERT
23089 status collapsed
23090
23091 \begin_layout Plain Layout
23092
23093 ][7
23094 \backslash
23095 baselineskip
23096 \end_layout
23097
23098 \end_inset
23099
23100
23101 \begin_inset ERT
23102 status collapsed
23103
23104 \begin_layout Plain Layout
23105
23106 ]{
23107 \end_layout
23108
23109 \end_inset
23110
23111
23112 \end_layout
23113
23114 \begin_layout Standard
23115
23116 \size small
23117 On the evening of the crime, he returned from the club exactly at ten.
23118  His mother and sister were out spending the evening with a relation.
23119  The servant deposed that she heard him enter the front room on the second
23120  floor, generally used as his sitting-room.
23121  She had lit a fire there, and as it smoked she had opened the window.
23122  No sound was heard from the room until eleven-twenty, the hour of the return
23123  of Lady Maynooth and her daughter.
23124  Desiring to say good-night, she attempted to enter her son's room.
23125  The door was locked on the inside, and no answer could be got to their
23126  cries and knocking.
23127  Help was obtained, and the door forced.
23128  The unfortunate young man was found lying near the table.
23129  His head had been horribly mutilated by an expanding revolver bullet, but
23130  no weapon of any sort was to be found in the room.
23131 \end_layout
23132
23133 \begin_layout End Multiple Columns
23134
23135 \end_layout
23136
23137 \begin_layout Subsubsection
23138 Surrounding Space
23139 \end_layout
23140
23141 \begin_layout Standard
23142 The amount of space before and after multiple columns can be changed by
23143  changing the length 
23144 \series bold
23145
23146 \backslash
23147 multicolsep
23148 \series default
23149 .
23150  For example the command
23151 \end_layout
23152
23153 \begin_layout Standard
23154
23155 \series bold
23156
23157 \backslash
23158 setlength{
23159 \backslash
23160 multicolsep}{3cm}
23161 \end_layout
23162
23163 \begin_layout Standard
23164 in TeX Code changes its value to 3
23165 \begin_inset space \thinspace{}
23166 \end_inset
23167
23168 cm.
23169  The change must be made before the multiple columns' start.
23170  The predefined value is 13
23171 \begin_inset space \thinspace{}
23172 \end_inset
23173
23174 pt.
23175 \end_layout
23176
23177 \begin_layout Standard
23178 For this example 
23179 \series bold
23180
23181 \backslash
23182 multicolsep
23183 \series default
23184  was set to 2.5
23185 \begin_inset space \thinspace{}
23186 \end_inset
23187
23188 cm:
23189 \end_layout
23190
23191 \begin_layout Standard
23192 \begin_inset ERT
23193 status open
23194
23195 \begin_layout Plain Layout
23196
23197
23198 \backslash
23199 setlength{
23200 \backslash
23201 multicolsep}{2.5cm}
23202 \end_layout
23203
23204 \end_inset
23205
23206
23207 \end_layout
23208
23209 \begin_layout Begin Multiple Columns
23210 2
23211 \end_layout
23212
23213 \begin_layout Standard
23214
23215 \size small
23216 All day I turned these facts over in my mind, endeavouring to hit upon some
23217  theory which could reconcile them all, and to find that line of least resistanc
23218 e which my poor friend had declared to be the starting-point of every investigat
23219 ion.
23220  I confess that I made little progress.
23221  In the evening I strolled across the Park, and found myself about six o'clock
23222  at the Oxford Street end of Park Lane.
23223  A group of loafers upon the pavements, all staring up at a particular window,
23224  directed me to the house which I had come to see.
23225  A tall, thin man with coloured glasses, whom I strongly suspected of being
23226  a plain-clothes detective, was pointing out some theory of his own, while
23227  the others crowded round to listen to what he said.
23228  I got as near him as I could, but his observations seemed to me to be absurd,
23229  so I withdrew again in some disgust.
23230  As I did so I struck against an elderly, deformed man, who had been behind
23231  me, and I knocked down several books which he was carrying.
23232 \end_layout
23233
23234 \begin_layout End Multiple Columns
23235
23236 \end_layout
23237
23238 \begin_layout Standard
23239 \begin_inset Note Greyedout
23240 status open
23241
23242 \begin_layout Plain Layout
23243
23244 \series bold
23245 Note:
23246 \series default
23247  The values you set with 
23248 \series bold
23249
23250 \backslash
23251 setlength
23252 \series default
23253  will be used for all following multiple columns until you change them again.
23254 \end_layout
23255
23256 \end_inset
23257
23258
23259 \end_layout
23260
23261 \begin_layout Standard
23262 \begin_inset ERT
23263 status collapsed
23264
23265 \begin_layout Plain Layout
23266
23267
23268 \backslash
23269 setlength{
23270 \backslash
23271 multicolsep}{13pt}
23272 \end_layout
23273
23274 \end_inset
23275
23276
23277 \begin_inset Note Note
23278 status collapsed
23279
23280 \begin_layout Plain Layout
23281 go back to the default
23282 \end_layout
23283
23284 \end_inset
23285
23286
23287 \end_layout
23288
23289 \begin_layout Standard
23290 \begin_inset Newpage newpage
23291 \end_inset
23292
23293
23294 \end_layout
23295
23296 \begin_layout Subsubsection
23297 Column Separation
23298 \end_layout
23299
23300 \begin_layout Standard
23301 The width of the columns is automatically calculated, but you can modify
23302  the space between the columns.
23303  This is done by changing the length 
23304 \series bold
23305
23306 \backslash
23307 columnsep
23308 \series default
23309 .
23310  Its predefined value is 10
23311 \begin_inset space \thinspace{}
23312 \end_inset
23313
23314 pt.
23315  Here is an example where 
23316 \series bold
23317
23318 \backslash
23319 columnsep
23320 \series default
23321  is set to 3
23322 \begin_inset space \thinspace{}
23323 \end_inset
23324
23325 cm:
23326 \end_layout
23327
23328 \begin_layout Standard
23329 \begin_inset ERT
23330 status open
23331
23332 \begin_layout Plain Layout
23333
23334
23335 \backslash
23336 setlength{
23337 \backslash
23338 columnsep}{3cm}
23339 \end_layout
23340
23341 \end_inset
23342
23343
23344 \end_layout
23345
23346 \begin_layout Begin Multiple Columns
23347 2
23348 \end_layout
23349
23350 \begin_layout Standard
23351
23352 \size small
23353 My observations of No.
23354 \begin_inset space \space{}
23355 \end_inset
23356
23357 427 Park Lane did little to clear up the problem in which I was interested.
23358  The house was separated from the street by a low wall and railing, the
23359  whole not more than five feet high.
23360  It was perfectly easy, therefore, for anyone to get into the garden, but
23361  the window was entirely inaccessible, since there was no water pipe or
23362  anything which could help the most active man to climb it.
23363  More puzzled than ever, I retraced my steps to Kensington.
23364  I had not been in my study five minutes when the maid entered to say that
23365  a person desired to see me.
23366  To my astonishment it was none other than my strange old book collector,
23367  his sharp, wizened face peering out from a frame of white hair, and his
23368  precious volumes, a dozen of them at least, wedged under his right arm.
23369 \end_layout
23370
23371 \begin_layout End Multiple Columns
23372
23373 \end_layout
23374
23375 \begin_layout Standard
23376 \begin_inset ERT
23377 status collapsed
23378
23379 \begin_layout Plain Layout
23380
23381
23382 \backslash
23383 setlength{
23384 \backslash
23385 columnsep}{10pt}
23386 \end_layout
23387
23388 \end_inset
23389
23390
23391 \begin_inset Note Note
23392 status collapsed
23393
23394 \begin_layout Plain Layout
23395 go back to the default
23396 \end_layout
23397
23398 \end_inset
23399
23400
23401 \end_layout
23402
23403 \begin_layout Subsubsection
23404 Vertical Lines
23405 \end_layout
23406
23407 \begin_layout Standard
23408 Between the columns a rule with a width of the length 
23409 \series bold
23410
23411 \backslash
23412 columnseprule
23413 \series default
23414  is placed.
23415  If this rule width is set to 0
23416 \begin_inset space \thinspace{}
23417 \end_inset
23418
23419 pt (this is the default), the rule is suppressed.
23420  In the following example the line is 2
23421 \begin_inset space \thinspace{}
23422 \end_inset
23423
23424 pt wide:
23425 \end_layout
23426
23427 \begin_layout Standard
23428 \begin_inset ERT
23429 status open
23430
23431 \begin_layout Plain Layout
23432
23433
23434 \backslash
23435 setlength{
23436 \backslash
23437 columnseprule}{2pt}
23438 \end_layout
23439
23440 \end_inset
23441
23442
23443 \end_layout
23444
23445 \begin_layout Begin Multiple Columns
23446 2
23447 \end_layout
23448
23449 \begin_layout Standard
23450
23451 \size small
23452 \begin_inset Quotes eld
23453 \end_inset
23454
23455 You're surprised to see me, sir,
23456 \begin_inset Quotes erd
23457 \end_inset
23458
23459  said he, in a strange, croaking voice.
23460 \end_layout
23461
23462 \begin_layout Standard
23463
23464 \size small
23465 I acknowledged that I was.
23466 \end_layout
23467
23468 \begin_layout Standard
23469
23470 \size small
23471 \begin_inset Quotes eld
23472 \end_inset
23473
23474 Well, I've a conscience, sir, and when I chanced to see you go into this
23475  house, as I came hobbling after you, I thought to myself, I'll just step
23476  in and see that kind gentleman, and tell him that if I was a bit gruff
23477  in my manner there was not any harm meant, and that I am much obliged to
23478  him for picking up my books.
23479 \begin_inset Quotes erd
23480 \end_inset
23481
23482
23483 \end_layout
23484
23485 \begin_layout Standard
23486
23487 \size small
23488 \begin_inset Quotes eld
23489 \end_inset
23490
23491 You make too much of a trifle,
23492 \begin_inset Quotes erd
23493 \end_inset
23494
23495  said I.
23496  
23497 \begin_inset Quotes eld
23498 \end_inset
23499
23500 May I ask how you knew who I was?
23501 \begin_inset Quotes erd
23502 \end_inset
23503
23504
23505 \end_layout
23506
23507 \begin_layout Standard
23508
23509 \size small
23510 \begin_inset Quotes eld
23511 \end_inset
23512
23513 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23514  you'll find my little bookshop at the corner of Church Street, and very
23515  happy to see you, I am sure.
23516  Maybe you collect yourself, sir.
23517  Here's 
23518 \noun on
23519 British
23520 \begin_inset space ~
23521 \end_inset
23522
23523 Birds
23524 \noun default
23525 , and 
23526 \noun on
23527 Catullus
23528 \noun default
23529 , and 
23530 \noun on
23531 The Holy War
23532 \noun default
23533 --a bargain, every one of them.
23534  With five volumes you could just fill that gap on that second shelf.
23535  It looks untidy, does it not, sir?
23536 \begin_inset Quotes erd
23537 \end_inset
23538
23539
23540 \end_layout
23541
23542 \begin_layout End Multiple Columns
23543
23544 \end_layout
23545
23546 \begin_layout Standard
23547 \begin_inset ERT
23548 status collapsed
23549
23550 \begin_layout Plain Layout
23551
23552
23553 \backslash
23554 setlength{
23555 \backslash
23556 columnseprule}{0pt}
23557 \end_layout
23558
23559 \end_inset
23560
23561
23562 \begin_inset Note Note
23563 status collapsed
23564
23565 \begin_layout Plain Layout
23566 go back to the default
23567 \end_layout
23568
23569 \end_inset
23570
23571
23572 \end_layout
23573
23574 \begin_layout Standard
23575 \begin_inset Newpage newpage
23576 \end_inset
23577
23578
23579 \end_layout
23580
23581 \begin_layout Section
23582 Non-standard Paragraph Shapes
23583 \end_layout
23584
23585 \begin_layout Standard
23586 \begin_inset ERT
23587 status collapsed
23588
23589 \begin_layout Plain Layout
23590
23591
23592 \backslash
23593 begin{sloppypar}
23594 \end_layout
23595
23596 \end_inset
23597
23598
23599 \end_layout
23600
23601 \begin_layout Standard
23602 \begin_inset ERT
23603 status collapsed
23604
23605 \begin_layout Plain Layout
23606
23607
23608 \backslash
23609 newdimen
23610 \backslash
23611 varunit 
23612 \end_layout
23613
23614 \begin_layout Plain Layout
23615
23616
23617 \backslash
23618 setlength{
23619 \backslash
23620 varunit}{4.5in}
23621 \end_layout
23622
23623 \end_inset
23624
23625
23626 \end_layout
23627
23628 \begin_layout Standard
23629 \noindent
23630 \begin_inset ERT
23631 status collapsed
23632
23633 \begin_layout Plain Layout
23634
23635
23636 \backslash
23637 parshape 19 0.45
23638 \backslash
23639 varunit 0.332
23640 \backslash
23641 varunit
23642 \end_layout
23643
23644 \begin_layout Plain Layout
23645
23646 0.40
23647 \backslash
23648 varunit 0.300
23649 \backslash
23650 varunit
23651 \end_layout
23652
23653 \begin_layout Plain Layout
23654
23655 0.35
23656 \backslash
23657 varunit 0.293
23658 \backslash
23659 varunit
23660 \end_layout
23661
23662 \begin_layout Plain Layout
23663
23664 0.30
23665 \backslash
23666 varunit 0.300
23667 \backslash
23668 varunit
23669 \end_layout
23670
23671 \begin_layout Plain Layout
23672
23673 0.25
23674 \backslash
23675 varunit 0.317
23676 \backslash
23677 varunit
23678 \end_layout
23679
23680 \begin_layout Plain Layout
23681
23682 0.20
23683 \backslash
23684 varunit 0.342
23685 \backslash
23686 varunit
23687 \end_layout
23688
23689 \begin_layout Plain Layout
23690
23691 0.15
23692 \backslash
23693 varunit 0.373
23694 \backslash
23695 varunit
23696 \end_layout
23697
23698 \begin_layout Plain Layout
23699
23700 0.10
23701 \backslash
23702 varunit 0.410
23703 \backslash
23704 varunit
23705 \end_layout
23706
23707 \begin_layout Plain Layout
23708
23709 0.05
23710 \backslash
23711 varunit 0.453
23712 \backslash
23713 varunit
23714 \end_layout
23715
23716 \begin_layout Plain Layout
23717
23718 0.00
23719 \backslash
23720 varunit 0.500
23721 \backslash
23722 varunit
23723 \end_layout
23724
23725 \begin_layout Plain Layout
23726
23727 0.05
23728 \backslash
23729 varunit 0.453
23730 \backslash
23731 varunit
23732 \end_layout
23733
23734 \begin_layout Plain Layout
23735
23736 0.10
23737 \backslash
23738 varunit 0.410
23739 \backslash
23740 varunit
23741 \end_layout
23742
23743 \begin_layout Plain Layout
23744
23745 0.15
23746 \backslash
23747 varunit 0.373
23748 \backslash
23749 varunit
23750 \end_layout
23751
23752 \begin_layout Plain Layout
23753
23754 0.20
23755 \backslash
23756 varunit 0.342
23757 \backslash
23758 varunit
23759 \end_layout
23760
23761 \begin_layout Plain Layout
23762
23763 0.25
23764 \backslash
23765 varunit 0.317
23766 \backslash
23767 varunit
23768 \end_layout
23769
23770 \begin_layout Plain Layout
23771
23772 0.30
23773 \backslash
23774 varunit 0.300
23775 \backslash
23776 varunit
23777 \end_layout
23778
23779 \begin_layout Plain Layout
23780
23781 0.35
23782 \backslash
23783 varunit 0.293
23784 \backslash
23785 varunit
23786 \end_layout
23787
23788 \begin_layout Plain Layout
23789
23790 0.40
23791 \backslash
23792 varunit 0.300
23793 \backslash
23794 varunit
23795 \end_layout
23796
23797 \begin_layout Plain Layout
23798
23799 0.45
23800 \backslash
23801 varunit 0.332
23802 \backslash
23803 varunit
23804 \end_layout
23805
23806 \begin_layout Plain Layout
23807
23808 \end_layout
23809
23810 \end_inset
23811
23812 There are times when the tyranny of rectangular paragraphs must be overthrown.
23813  In such situations, a call to the delightful plain TeX command 
23814 \family typewriter
23815
23816 \backslash
23817 parshape
23818 \family default
23819  is called for.
23820  As you can see, completely arbitrary shapes can be laid out with a suitable
23821  set of line length definitions.
23822  While this parshape may look a bit silly and useless, one could conceive
23823  of situations such as finely tuned dropped capitals, word wrapping around
23824  non-rectangular graphics, etc.
23825  which will benefit from such handcrafting.
23826 \end_layout
23827
23828 \begin_layout Standard
23829 \begin_inset VSpace bigskip
23830 \end_inset
23831
23832
23833 \end_layout
23834
23835 \begin_layout Standard
23836 The syntax is 
23837 \family typewriter
23838
23839 \backslash
23840 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23841  #nindent #nlength
23842 \family default
23843 , where 
23844 \family typewriter
23845 numlines
23846 \family default
23847  is the number of lines of text which define the paragraph.
23848  If there turn out to be fewer lines, the shape is truncated; if there are
23849  more, the excess lines have the same dimensions as the last line of the
23850  definition.
23851  The 
23852 \family typewriter
23853 #nindent
23854 \family default
23855  and 
23856 \family typewriter
23857 #nlength
23858 \family default
23859  entries specify the indentation of the line from the left margin, and the
23860  length of the line as measured from that point.
23861  The shape applies only to the current paragraph; everything is reset to
23862  normal for the next paragraph.
23863 \end_layout
23864
23865 \begin_layout Standard
23866 \begin_inset ERT
23867 status collapsed
23868
23869 \begin_layout Plain Layout
23870
23871
23872 \backslash
23873 end{sloppypar}
23874 \end_layout
23875
23876 \end_inset
23877
23878
23879 \end_layout
23880
23881 \begin_layout Bibliography
23882 \begin_inset CommandInset bibitem
23883 LatexCommand bibitem
23884 key "multicol"
23885
23886 \end_inset
23887
23888 Documentation of the LaTeX-package 
23889 \begin_inset CommandInset href
23890 LatexCommand href
23891 name "multicol"
23892 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23893
23894 \end_inset
23895
23896
23897 \begin_inset Index idx
23898 status collapsed
23899
23900 \begin_layout Plain Layout
23901 LaTeX-packages ! multicol
23902 \end_layout
23903
23904 \end_inset
23905
23906
23907 \end_layout
23908
23909 \end_body
23910 \end_document