]> git.lyx.org Git - features.git/blob - lib/doc/Additional.lyx
Port suggestion to trunk
[features.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 431
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % used for multi-column text
37 \usepackage{multicol}
38
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
41 \end_preamble
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
44 \begin_modules
45 logicalmkup
46 theorems-ams
47 theorems-ams-extended
48 multicol
49 \end_modules
50 \maintain_unincluded_children false
51 \begin_local_layout
52 Format 7
53 InsetLayout CharStyle:MenuItem
54 LyxType               charstyle
55 LabelString           menu
56 LatexType             command
57 LatexName             menuitem
58 Font
59 Family              Sans
60 EndFont
61 Preamble
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
63 EndPreamble
64 End
65 \end_local_layout
66 \language english
67 \language_package default
68 \inputencoding auto
69 \fontencoding global
70 \font_roman default
71 \font_sans default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
75 \font_sc false
76 \font_osf false
77 \font_sf_scale 100
78 \font_tt_scale 100
79
80 \graphics default
81 \default_output_format default
82 \output_sync 1
83 \bibtex_command default
84 \index_command default
85 \paperfontsize 12
86 \spacing single
87 \use_hyperref true
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
92 \pdf_bookmarks true
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
96 \pdf_breaklinks false
97 \pdf_pdfborder false
98 \pdf_colorlinks true
99 \pdf_backref false
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \papersize default
103 \use_geometry false
104 \use_package amsmath 1
105 \use_package amssymb 1
106 \use_package esint 0
107 \use_package mathdots 1
108 \use_package mathtools 0
109 \use_package mhchem 1
110 \use_package undertilde 0
111 \cite_engine basic
112 \cite_engine_type numerical
113 \biblio_style plain
114 \use_bibtopic false
115 \use_indices false
116 \paperorientation portrait
117 \suppress_date false
118 \justification true
119 \use_refstyle 0
120 \notefontcolor #0000ff
121 \index Index
122 \shortcut idx
123 \color #008000
124 \end_index
125 \secnumdepth 3
126 \tocdepth 3
127 \paragraph_separation indent
128 \paragraph_indentation default
129 \quotes_language english
130 \papercolumns 1
131 \papersides 2
132 \paperpagestyle headings
133 \tracking_changes false
134 \output_changes false
135 \html_math_output 0
136 \html_css_as_file 0
137 \html_be_strict true
138 \end_header
139
140 \begin_body
141
142 \begin_layout Title
143 Additional LyX Features
144 \end_layout
145
146 \begin_layout Subtitle
147 Version 2.0.x
148 \end_layout
149
150 \begin_layout Author
151 by the LyX Team
152 \begin_inset Foot
153 status collapsed
154
155 \begin_layout Plain Layout
156 \noindent
157 Principal maintainer of this file is
158 \noun on
159  Richard Heck
160 \noun default
161 .
162  If you have comments or error corrections, please send them to the LyX
163  Documentation mailing list, 
164 \begin_inset Flex Code
165 status collapsed
166
167 \begin_layout Plain Layout
168 \noindent
169 <lyx-docs@lists.lyx.org>
170 \end_layout
171
172 \end_inset
173
174 .
175 \end_layout
176
177 \end_inset
178
179
180 \end_layout
181
182 \begin_layout Standard
183 \begin_inset CommandInset toc
184 LatexCommand tableofcontents
185
186 \end_inset
187
188
189 \end_layout
190
191 \begin_layout Chapter
192 Introduction
193 \end_layout
194
195 \begin_layout Standard
196 This manual is essentially Part II of the 
197 \emph on
198 User's Guide\SpecialChar \@.
199
200 \emph default
201  The reason for separating the two documents is simple: the 
202 \emph on
203 User's Guide
204 \emph default
205  is already quite lengthy, and it contains information on all of the basic
206  features one needs to know in order to prepare most documents.
207  However, the LyX Team has worked to make LyX extensible through various
208  configuration files and external packages.
209  That means that if you want to support the Fizzwizzle LaTeX package, you
210  can create a layout file (or module) for it without having to alter LyX
211  itself.
212  We've already had contributions of several new features this way, and some
213  of them are documented here.
214  There are also some more `advanced' features, such as how to control the
215  presentation of bibliographies and how to work with multi-part documents,
216  that are not covered in the 
217 \emph on
218 User's Guide
219 \emph default
220  and are discussed here.
221 \end_layout
222
223 \begin_layout Standard
224 This manual also documents some special features, like fax support, version
225  control, and SGML support, which require additional software to work properly.
226  There is also a chapter on LyX's support for HTML.
227  And lastly, there's a chapter of LaTeX tools and tips, things you can use
228  to spruce up your documents by directly using the powerful features of
229  LaTeX.
230  After all, LyX 
231 \emph on
232 is
233 \emph default
234  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
235 \end_layout
236
237 \begin_layout Standard
238 If you haven't read the 
239 \emph on
240 Introduction
241 \emph default
242  yet, you are definitely in the wrong manual.
243  The 
244 \emph on
245 Introduction
246 \emph default
247  is the first place to go, since it describes the notation and format of
248  all of the manuals.
249  You should also be thoroughly familiar with the 
250 \emph on
251 User's Guide
252 \emph default
253  and all of the basic features of LyX before attempting to read this one.
254 \end_layout
255
256 \begin_layout Standard
257 Since many of the topics in this manual depend heavily on LyX's interaction
258  with LaTeX, this first chapter covers the inner workings of LyX and how
259  to direct LyX to generate exactly the LaTeX code you want.
260  It is obviously for more seasoned LyX users.
261 \end_layout
262
263 \begin_layout Chapter
264 LyX and LaTeX
265 \end_layout
266
267 \begin_layout Section
268 How LyX Uses LaTeX
269 \end_layout
270
271 \begin_layout Standard
272 This chapter is for both TeX-nicians and the LaTeX-curious.
273  In it, we'll explain how LyX and LaTeX work together to produce printable
274  output.
275  This is the only place in any of the manuals where we assume you know something
276  about LaTeX.
277 \end_layout
278
279 \begin_layout Standard
280 At one time, LyX was called a 
281 \begin_inset Quotes eld
282 \end_inset
283
284 WYSIWYM frontend to LaTeX,
285 \begin_inset Quotes erd
286 \end_inset
287
288  but that's no longer true.
289  There are frontends to LaTeX out there.
290 \begin_inset Foot
291 status collapsed
292
293 \begin_layout Plain Layout
294 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
295  There are also the LaTeX modes for vi and emacs, of course.
296 \end_layout
297
298 \end_inset
299
300  These are basically text editors with the ability to run LaTeX and mark
301  any errors in the file you're editing.
302  Although LyX 
303 \emph on
304 is
305 \emph default
306  an editor, and it 
307 \emph on
308 does
309 \emph default
310  run LaTeX, and it also indicates errors in the file, it also does much,
311  much more.
312  For one thing, you don't need to know LaTeX to use LyX effectively.
313  And LyX has added its own extensions to LaTeX.
314  Try the following sometime: select 
315 \begin_inset Flex MenuItem
316 status collapsed
317
318 \begin_layout Plain Layout
319 Export\SpecialChar \menuseparator
320 LaTeX
321 \end_layout
322
323 \end_inset
324
325  from the 
326 \begin_inset Flex MenuItem
327 status collapsed
328
329 \begin_layout Plain Layout
330 File
331 \end_layout
332
333 \end_inset
334
335  menu (or 
336 \begin_inset Flex MenuItem
337 status collapsed
338
339 \begin_layout Plain Layout
340 View\SpecialChar \menuseparator
341 Source
342 \end_layout
343
344 \end_inset
345
346 ), then look at the preamble of the resulting 
347 \begin_inset Flex Code
348 status collapsed
349
350 \begin_layout Plain Layout
351 .tex
352 \end_layout
353
354 \end_inset
355
356  file.
357  You'll notice a variety of new macros defined specifically by LyX.
358  These macros are defined automatically, according to the features you use
359  in the document.
360 \end_layout
361
362 \begin_layout Standard
363 There are several commands that automatically invoke LaTeX.
364  They are:
365 \end_layout
366
367 \begin_layout Itemize
368 \begin_inset Flex MenuItem
369 status collapsed
370
371 \begin_layout Plain Layout
372 View\SpecialChar \menuseparator
373 View
374 \end_layout
375
376 \end_inset
377
378
379 \end_layout
380
381 \begin_layout Itemize
382 \begin_inset Flex MenuItem
383 status collapsed
384
385 \begin_layout Plain Layout
386 View\SpecialChar \menuseparator
387 Update
388 \end_layout
389
390 \end_inset
391
392
393 \end_layout
394
395 \begin_layout Itemize
396 \begin_inset Flex MenuItem
397 status collapsed
398
399 \begin_layout Plain Layout
400 File\SpecialChar \menuseparator
401 Print
402 \end_layout
403
404 \end_inset
405
406
407 \end_layout
408
409 \begin_layout Itemize
410 \begin_inset Flex MenuItem
411 status collapsed
412
413 \begin_layout Plain Layout
414 File\SpecialChar \menuseparator
415 Fax
416 \end_layout
417
418 \end_inset
419
420
421 \end_layout
422
423 \begin_layout Standard
424 They will only invoke LaTeX if the file has changed since the last time
425  LaTeX was run.
426  
427 \end_layout
428
429 \begin_layout Standard
430 When LyX runs LaTeX on the file you're editing, it performs these steps:
431 \end_layout
432
433 \begin_layout Enumerate
434 Convert the document to LaTeX and save to a file with the extension 
435 \begin_inset Flex Code
436 status collapsed
437
438 \begin_layout Plain Layout
439 .tex
440 \end_layout
441
442 \end_inset
443
444  in place of 
445 \begin_inset Flex Code
446 status collapsed
447
448 \begin_layout Plain Layout
449 .lyx
450 \end_layout
451
452 \end_inset
453
454 .
455 \end_layout
456
457 \begin_layout Enumerate
458 Run LaTeX on the 
459 \begin_inset Flex Code
460 status collapsed
461
462 \begin_layout Plain Layout
463 .tex
464 \end_layout
465
466 \end_inset
467
468  file (maybe several times), and run any other commands (such as 
469 \begin_inset Flex Code
470 status collapsed
471
472 \begin_layout Plain Layout
473 bibtex
474 \end_layout
475
476 \end_inset
477
478  or 
479 \begin_inset Flex Code
480 status collapsed
481
482 \begin_layout Plain Layout
483 makeindex
484 \end_layout
485
486 \end_inset
487
488 ) needed to compile the LaTeX file.
489 \end_layout
490
491 \begin_layout Enumerate
492 If there are any errors, show the error log.
493 \end_layout
494
495 \begin_layout Standard
496 If you have run LaTeX using 
497 \begin_inset Flex MenuItem
498 status collapsed
499
500 \begin_layout Plain Layout
501 View
502 \bar under
503 \SpecialChar \menuseparator
504
505 \bar default
506 DVI
507 \end_layout
508
509 \end_inset
510
511 , LyX then runs a DVI viewer to display the DVI-file.
512  If you have used 
513 \begin_inset Flex MenuItem
514 status collapsed
515
516 \begin_layout Plain Layout
517 View
518 \bar under
519 \SpecialChar \menuseparator
520
521 \bar default
522 PostScript
523 \end_layout
524
525 \end_inset
526
527 , LyX performs further steps:
528 \end_layout
529
530 \begin_layout Itemize
531 Run 
532 \begin_inset Flex Code
533 status collapsed
534
535 \begin_layout Plain Layout
536 dvips
537 \end_layout
538
539 \end_inset
540
541  to convert the DVI file to PostScript.
542 \end_layout
543
544 \begin_layout Itemize
545 Run a PostScript viewer, such as 
546 \begin_inset Flex Code
547 status collapsed
548
549 \begin_layout Plain Layout
550 ghostview
551 \end_layout
552
553 \end_inset
554
555 , to display the PostScript file.
556 \end_layout
557
558 \begin_layout Standard
559 LyX does similar things when viewing, or exporting, other formats.
560 \end_layout
561
562 \begin_layout Section
563 Translating LaTeX files into LyX
564 \end_layout
565
566 \begin_layout Standard
567 You can import a LaTeX file into LyX by using the 
568 \begin_inset Flex MenuItem
569 status collapsed
570
571 \begin_layout Plain Layout
572 File\SpecialChar \menuseparator
573 Import\SpecialChar \menuseparator
574 LaTeX
575 \end_layout
576
577 \end_inset
578
579  command in LyX.
580  This will call a program named 
581 \begin_inset Flex Code
582 status collapsed
583
584 \begin_layout Plain Layout
585 tex2lyx
586 \end_layout
587
588 \end_inset
589
590  which will create a file 
591 \begin_inset Flex Code
592 status collapsed
593
594 \begin_layout Plain Layout
595 foo.lyx
596 \end_layout
597
598 \end_inset
599
600  from the file 
601 \begin_inset Flex Code
602 status collapsed
603
604 \begin_layout Plain Layout
605 foo.tex
606 \end_layout
607
608 \end_inset
609
610 .
611  LyX will then open that file.
612 \begin_inset Foot
613 status collapsed
614
615 \begin_layout Plain Layout
616 \begin_inset Flex Code
617 status collapsed
618
619 \begin_layout Plain Layout
620 tex2lyx
621 \end_layout
622
623 \end_inset
624
625  can also be run from the command line, of course.
626 \end_layout
627
628 \end_inset
629
630
631 \end_layout
632
633 \begin_layout Standard
634 \begin_inset Flex Code
635 status collapsed
636
637 \begin_layout Plain Layout
638 tex2lyx
639 \end_layout
640
641 \end_inset
642
643  will translate most legal LaTeX, but not everything.
644  It will put things it doesn't understand into TeX code, so after translating
645  a file with 
646 \begin_inset Flex Code
647 status collapsed
648
649 \begin_layout Plain Layout
650 tex2lyx
651 \end_layout
652
653 \end_inset
654
655 , you can look for TeX code and hand-edit it until it looks right.
656 \end_layout
657
658 \begin_layout Standard
659 If you don't know what TeX code is, read the next section.
660 \end_layout
661
662 \begin_layout Section
663 \begin_inset CommandInset label
664 LatexCommand label
665 name "sec:Inserting-TeX-Code"
666
667 \end_inset
668
669 Inserting TeX Code into LyX Documents 
670 \end_layout
671
672 \begin_layout Standard
673 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
674  You can always insert TeX code into any LyX document.
675  LyX cannot, and will never be able to, display every possible LaTeX construct.
676  If ever you need to insert LaTeX commands into your LyX document, you can
677  use the 
678 \begin_inset Flex Code
679 status collapsed
680
681 \begin_layout Plain Layout
682 TeX Code
683 \end_layout
684
685 \end_inset
686
687  box, which you can insert into your document with 
688 \begin_inset Flex MenuItem
689 status collapsed
690
691 \begin_layout Plain Layout
692 Insert\SpecialChar \menuseparator
693 TeX Code
694 \end_layout
695
696 \end_inset
697
698  or the keyboard shortcut 
699 \begin_inset Info
700 type  "shortcut"
701 arg   "ert-insert"
702 \end_inset
703
704 .
705 \end_layout
706
707 \begin_layout Standard
708 Here's an example of inserting LaTeX commands in a LyX document.
709  The code looks like this:
710 \end_layout
711
712 \begin_layout LyX-Code
713
714 \backslash
715 begin{tabular}{ll}
716 \begin_inset Newline newline
717 \end_inset
718
719
720 \backslash
721 begin{minipage}{5cm}
722 \begin_inset Newline newline
723 \end_inset
724
725 This is an example of a minipage environment.
726  You 
727 \begin_inset Newline newline
728 \end_inset
729
730 can put nearly everything in it, even (non-floating) 
731 \begin_inset Newline newline
732 \end_inset
733
734 figures and tables.
735  
736 \begin_inset Newline newline
737 \end_inset
738
739
740 \backslash
741 end{minipage}
742 \begin_inset Newline newline
743 \end_inset
744
745 &
746 \begin_inset Newline newline
747 \end_inset
748
749
750 \backslash
751 begin{minipage}{5cm}
752 \begin_inset Newline newline
753 \end_inset
754
755
756 \backslash
757 begin{verbatim}
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 begin{minipage}{5cm}
764 \begin_inset Newline newline
765 \end_inset
766
767 This ...
768  
769 \begin_inset Newline newline
770 \end_inset
771
772
773 \backslash
774 end{minipage}
775 \begin_inset Newline newline
776 \end_inset
777
778
779 \backslash
780 end{verbatim}
781 \begin_inset Newline newline
782 \end_inset
783
784
785 \backslash
786 end{minipage}
787 \begin_inset Newline newline
788 \end_inset
789
790
791 \backslash
792 end{tabular}
793 \end_layout
794
795 \begin_layout LyX-Code
796
797 \end_layout
798
799 \begin_layout Standard
800 The 
801 \begin_inset Flex Code
802 status collapsed
803
804 \begin_layout Plain Layout
805 TeX Code
806 \end_layout
807
808 \end_inset
809
810  box containing this text is directly after this paragraph.
811  Those of you reading the manual in LyX will only see the TeX code inset.
812  Those reading a printed version of the manuals will see the actual results:
813 \begin_inset VSpace bigskip
814 \end_inset
815
816
817 \end_layout
818
819 \begin_layout Standard
820 \begin_inset ERT
821 status open
822
823 \begin_layout Plain Layout
824
825
826 \backslash
827 begin{tabular}{ll}
828 \end_layout
829
830 \begin_layout Plain Layout
831
832
833 \backslash
834 begin{minipage}{5cm}
835 \end_layout
836
837 \begin_layout Plain Layout
838
839 This is an example of a minipage environment.
840  You can put nearly everything in it, even (non-floating) figures and tables.
841  
842 \end_layout
843
844 \begin_layout Plain Layout
845
846
847 \backslash
848 end{minipage}
849 \end_layout
850
851 \begin_layout Plain Layout
852
853 &
854 \end_layout
855
856 \begin_layout Plain Layout
857
858
859 \backslash
860 begin{minipage}{5cm}
861 \end_layout
862
863 \begin_layout Plain Layout
864
865
866 \backslash
867 begin{verbatim}
868 \end_layout
869
870 \begin_layout Plain Layout
871
872
873 \backslash
874 begin{minipage}{5cm}
875 \end_layout
876
877 \begin_layout Plain Layout
878
879 This ...
880  
881 \end_layout
882
883 \begin_layout Plain Layout
884
885
886 \backslash
887 end{minipage}
888 \end_layout
889
890 \begin_layout Plain Layout
891
892
893 \backslash
894 end{verbatim}
895 \end_layout
896
897 \begin_layout Plain Layout
898
899
900 \backslash
901 end{minipage}
902 \end_layout
903
904 \begin_layout Plain Layout
905
906
907 \backslash
908 end{tabular}
909 \end_layout
910
911 \end_inset
912
913
914 \begin_inset VSpace bigskip
915 \end_inset
916
917
918 \end_layout
919
920 \begin_layout Standard
921 In addition to using TeX code, you can also create a separate file containing
922  some complex LaTeX structure and then use 
923 \begin_inset Flex MenuItem
924 status collapsed
925
926 \begin_layout Plain Layout
927 Insert\SpecialChar \menuseparator
928 Child
929 \begin_inset space ~
930 \end_inset
931
932 Document
933 \end_layout
934
935 \end_inset
936
937  to include your file (you should select the type 
938 \begin_inset Flex Code
939 status collapsed
940
941 \begin_layout Plain Layout
942 Input
943 \end_layout
944
945 \end_inset
946
947 ).
948  We recommend that you only do this if you have a 
949 \begin_inset Flex Code
950 status collapsed
951
952 \begin_layout Plain Layout
953 .tex
954 \end_layout
955
956 \end_inset
957
958  file which you 
959 \emph on
960 know
961 \emph default
962  works already.
963  Otherwise, you'll have a big job tracking down LaTeX errors.
964 \end_layout
965
966 \begin_layout Standard
967 There are a few last points to emphasize:
968 \end_layout
969
970 \begin_layout Itemize
971 LyX 
972 \emph on
973 does not
974 \emph default
975  check if your LaTeX code is correct.
976 \end_layout
977
978 \begin_layout Itemize
979 Beware of reinventing the wheel.
980 \end_layout
981
982 \begin_layout Standard
983 On that last point, LyX does have quite a few features tucked into it, and
984  more are coming.
985  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
986  feature before you decide you have to do it by hand.
987  Moreover, there are numerous LaTeX packages out there to do all sorts of
988  things, from labels to envelopes to fancy multipage tables.
989  Check out 
990 \begin_inset CommandInset href
991 LatexCommand href
992 name "CTAN"
993 target "http://www.ctan.org/"
994
995 \end_inset
996
997  for details.
998 \end_layout
999
1000 \begin_layout Standard
1001 If you do need to do some wild and fancy things within your document, be
1002  sure to check out a good LaTeX book for assistance.
1003  There are a number of them listed in the bibliography of the 
1004 \emph on
1005 User's Guide
1006 \emph default
1007 .
1008 \end_layout
1009
1010 \begin_layout Section
1011 LyX and the LaTeX Preamble
1012 \end_layout
1013
1014 \begin_layout Subsection
1015 About the LaTeX Preamble
1016 \end_layout
1017
1018 \begin_layout Standard
1019 If you already know LaTeX, there is no need to explain here what the preamble
1020  is good for.
1021  If you don't, the following will give you some ideas—we recommend again
1022  that you consult a LaTeX book for further information.
1023  In any case, you should read the points below, because they explain what
1024  you can do and what you don't need to do in the LaTeX preamble of a LyX
1025  document.
1026 \end_layout
1027
1028 \begin_layout Standard
1029 The LaTeX preamble comes at the very beginning of a document, 
1030 \emph on
1031 before
1032 \emph default
1033  the text.
1034  It serves to:
1035 \end_layout
1036
1037 \begin_layout Itemize
1038 Declare the document class.
1039  
1040 \begin_inset Newline newline
1041 \end_inset
1042
1043 LyX already does this for you.
1044  If you're a seasoned LaTeX-nician, and you have a custom document class
1045  you want to use, check out the 
1046 \emph on
1047 Customization Manual
1048 \emph default
1049  for information on how to make LyX interface to it.
1050 \end_layout
1051
1052 \begin_layout Itemize
1053 Declare the usage of packages.
1054  
1055 \begin_inset Newline newline
1056 \end_inset
1057
1058 LaTeX packages provide special commands, which are only available within
1059  a document when the package has been declared in the preamble.
1060  In addition to providing special commands, the inclusion of a package can
1061  change the document.
1062  For example, the package 
1063 \begin_inset Flex Code
1064 status collapsed
1065
1066 \begin_layout Plain Layout
1067 indentfirst
1068 \end_layout
1069
1070 \end_inset
1071
1072  forces all paragraphs to be indented.
1073  There are other packages for labels, envelopes, margins, etc.
1074  
1075 \end_layout
1076
1077 \begin_layout Itemize
1078 Set counters, variables, lengths and widths.
1079  
1080 \begin_inset Newline newline
1081 \end_inset
1082
1083 There are several LaTeX counters and variables that 
1084 \emph on
1085 must
1086 \emph default
1087  be set globally from within the preamble in order to have the desired effect.
1088  (There are variables that you can set and reset inside the document, too.)
1089  Margins are a good example of something that must be set in the preamble.
1090  Another example is the label format for lists.
1091  You can actually set these just about anywhere, but it's best to do it
1092  just once, inside the preamble.
1093 \end_layout
1094
1095 \begin_layout Itemize
1096 Declare user defined commands (with 
1097 \begin_inset Flex Code
1098 status collapsed
1099
1100 \begin_layout Plain Layout
1101
1102 \backslash
1103 newcommand
1104 \end_layout
1105
1106 \end_inset
1107
1108  or 
1109 \begin_inset Flex Code
1110 status collapsed
1111
1112 \begin_layout Plain Layout
1113
1114 \backslash
1115 renewcommand
1116 \end_layout
1117
1118 \end_inset
1119
1120 ).
1121 \begin_inset Newline newline
1122 \end_inset
1123
1124 These are abbreviations for LaTeX commands which appear very often inside
1125  a document.
1126  Although the preamble is a good place to declare such commands, they 
1127 \emph on
1128 can
1129 \emph default
1130  be declared anywhere (before they are used for the first time, of course).
1131  This can be useful if there is a lot of raw LaTeX code in your document,
1132  which normally should not be the case.
1133 \end_layout
1134
1135 \begin_layout Standard
1136 LyX adds its own set of definitions to the preamble of the 
1137 \begin_inset Flex Code
1138 status collapsed
1139
1140 \begin_layout Plain Layout
1141 .tex
1142 \end_layout
1143
1144 \end_inset
1145
1146  file it produces.
1147  This makes LaTeX files generated by LyX portable.
1148 \end_layout
1149
1150 \begin_layout Subsection
1151 Changing the Preamble
1152 \end_layout
1153
1154 \begin_layout Standard
1155 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1156  can't change them without patching LyX itself.
1157  You can, however, add your own stuff to the preamble by selecting 
1158 \begin_inset Flex MenuItem
1159 status collapsed
1160
1161 \begin_layout Plain Layout
1162 LaTeX
1163 \begin_inset space ~
1164 \end_inset
1165
1166 Preamble
1167 \end_layout
1168
1169 \end_inset
1170
1171  in the 
1172 \begin_inset Flex MenuItem
1173 status collapsed
1174
1175 \begin_layout Plain Layout
1176 Document\SpecialChar \menuseparator
1177 Settings
1178 \end_layout
1179
1180 \end_inset
1181
1182  dialog.
1183  LyX adds anything in the 
1184 \begin_inset Flex MenuItem
1185 status collapsed
1186
1187 \begin_layout Plain Layout
1188 Preamble
1189 \end_layout
1190
1191 \end_inset
1192
1193  dialog to its own built-in preamble.
1194  Before adding your own declarations in the preamble, you should make sure
1195  that LyX doesn't already support what you want to do.
1196  (Remember what we said about reinventing the wheel?) Also, 
1197 \emph on
1198 make sure your preamble code is correct
1199 \emph default
1200 .
1201  LyX doesn't check it for you.
1202  If there is an error, you're likely to get an error like 
1203 \begin_inset Quotes eld
1204 \end_inset
1205
1206
1207 \begin_inset Flex Code
1208 status collapsed
1209
1210 \begin_layout Plain Layout
1211 Missing 
1212 \backslash
1213 begin{document}
1214 \end_layout
1215
1216 \end_inset
1217
1218
1219 \begin_inset Quotes erd
1220 \end_inset
1221
1222 .
1223  If you see this error, check your preamble.
1224 \end_layout
1225
1226 \begin_layout Subsection
1227 Examples
1228 \end_layout
1229
1230 \begin_layout Standard
1231 Here are some examples of what you can add to a preamble, and what they
1232  do.
1233 \end_layout
1234
1235 \begin_layout Subsubsection
1236 Example #1: Offsets
1237 \end_layout
1238
1239 \begin_layout Standard
1240 There are two variables under LaTeX that control page position: 
1241 \begin_inset Flex Code
1242 status collapsed
1243
1244 \begin_layout Plain Layout
1245
1246 \backslash
1247 hoffset
1248 \end_layout
1249
1250 \end_inset
1251
1252  and 
1253 \begin_inset Flex Code
1254 status collapsed
1255
1256 \begin_layout Plain Layout
1257
1258 \backslash
1259 voffset
1260 \end_layout
1261
1262 \end_inset
1263
1264 .
1265  Their names should be self-explanatory.
1266  These variables are useful if you think for a moment about computer labels.
1267  Sometimes, the size of a print medium and the area of the medium that you
1268  can actually print on aren't the same.
1269  This is where 
1270 \begin_inset Flex Code
1271 status collapsed
1272
1273 \begin_layout Plain Layout
1274
1275 \backslash
1276 hoffset
1277 \end_layout
1278
1279 \end_inset
1280
1281  and 
1282 \begin_inset Flex Code
1283 status collapsed
1284
1285 \begin_layout Plain Layout
1286
1287 \backslash
1288 voffset
1289 \end_layout
1290
1291 \end_inset
1292
1293  come in.
1294 \end_layout
1295
1296 \begin_layout Standard
1297 The default values for 
1298 \begin_inset Flex Code
1299 status collapsed
1300
1301 \begin_layout Plain Layout
1302
1303 \backslash
1304 hoffset
1305 \end_layout
1306
1307 \end_inset
1308
1309  and 
1310 \begin_inset Flex Code
1311 status collapsed
1312
1313 \begin_layout Plain Layout
1314
1315 \backslash
1316 voffset
1317 \end_layout
1318
1319 \end_inset
1320
1321  are both 0
1322 \begin_inset space \thinspace{}
1323 \end_inset
1324
1325 points, i.
1326 \begin_inset space \thinspace{}
1327 \end_inset
1328
1329 e.
1330 \begin_inset space \space{}
1331 \end_inset
1332
1333 the page isn't shifted.
1334  Unfortunately, some DVI drivers always seem to shift the page.
1335  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1336  If you're using LyX on a system that you don't personally maintain, and
1337  your sysadmin is a doofus, 
1338 \begin_inset Flex Code
1339 status collapsed
1340
1341 \begin_layout Plain Layout
1342
1343 \backslash
1344 hoffset
1345 \end_layout
1346
1347 \end_inset
1348
1349  and 
1350 \begin_inset Flex Code
1351 status collapsed
1352
1353 \begin_layout Plain Layout
1354
1355 \backslash
1356 voffset
1357 \end_layout
1358
1359 \end_inset
1360
1361  can save the day.
1362  Suppose your left and top margins are always 0.5
1363 \begin_inset space \thinspace{}
1364 \end_inset
1365
1366 inches too big.
1367  You can add this to the preamble:
1368 \end_layout
1369
1370 \begin_layout LyX-Code
1371
1372 \backslash
1373 setlength{
1374 \backslash
1375 hoffset}{-0.5 in}
1376 \end_layout
1377
1378 \begin_layout LyX-Code
1379
1380 \backslash
1381 setlength{
1382 \backslash
1383 voffset}{-0.5 in}
1384 \end_layout
1385
1386 \begin_layout Standard
1387 and your margins should now be correct.
1388 \end_layout
1389
1390 \begin_layout Subsubsection
1391 Example #2: Labels
1392 \end_layout
1393
1394 \begin_layout Standard
1395 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1396  There's a rather nice package, available at your nearest CTAN archive,
1397  for printing sheets of labels: 
1398 \begin_inset Flex Code
1399 status collapsed
1400
1401 \begin_layout Plain Layout
1402 labels.sty
1403 \end_layout
1404
1405 \end_inset
1406
1407 .
1408  Now, your system may not have this package installed by default.
1409  We leave that up to you to check.
1410  You'll also want to read the documentation for it; we're not going to do
1411  that for you.
1412  Since this is an example, however, we'll give you an example of how you
1413  use this package.
1414 \end_layout
1415
1416 \begin_layout Standard
1417 First, make sure you're using the 
1418 \begin_inset Flex Code
1419 status collapsed
1420
1421 \begin_layout Plain Layout
1422 article
1423 \end_layout
1424
1425 \end_inset
1426
1427  document class.
1428  Next, you need to put the following in your preamble:
1429 \end_layout
1430
1431 \begin_layout LyX-Code
1432
1433 \backslash
1434 usepackage{labels}
1435 \end_layout
1436
1437 \begin_layout LyX-Code
1438
1439 \backslash
1440 LabelCols=3
1441 \end_layout
1442
1443 \begin_layout LyX-Code
1444
1445 \backslash
1446 LabelRows=7
1447 \end_layout
1448
1449 \begin_layout LyX-Code
1450
1451 \backslash
1452 LeftBorder=8mm
1453 \end_layout
1454
1455 \begin_layout LyX-Code
1456
1457 \backslash
1458 RightBorder=8mm
1459 \end_layout
1460
1461 \begin_layout LyX-Code
1462
1463 \backslash
1464 TopBorder=9mm
1465 \end_layout
1466
1467 \begin_layout LyX-Code
1468
1469 \backslash
1470 BottomBorder=2mm
1471 \end_layout
1472
1473 \begin_layout Standard
1474 This sets things up for Avery label sheets, stock #5360.
1475  You're now ready to print labels, but you'll need to insert LaTeX code,
1476  placing the commands 
1477 \begin_inset Flex Code
1478 status collapsed
1479
1480 \begin_layout Plain Layout
1481
1482 \backslash
1483 begin{labels}
1484 \end_layout
1485
1486 \end_inset
1487
1488  and 
1489 \begin_inset Flex Code
1490 status collapsed
1491
1492 \begin_layout Plain Layout
1493
1494 \backslash
1495 end{labels}
1496 \end_layout
1497
1498 \end_inset
1499
1500  around each label text.
1501  This and other special features of 
1502 \begin_inset Flex Code
1503 status collapsed
1504
1505 \begin_layout Plain Layout
1506 labels.sty
1507 \end_layout
1508
1509 \end_inset
1510
1511  are explained in its documentation.
1512 \end_layout
1513
1514 \begin_layout Standard
1515 Someday, someone may write a LyX layout file to support this package directly.
1516  Maybe that someone is you.
1517 \end_layout
1518
1519 \begin_layout Subsubsection
1520 Example #3: Paragraph Indentation
1521 \end_layout
1522
1523 \begin_layout Standard
1524 Americans are trained to indent the first line of 
1525 \emph on
1526 every
1527 \emph default
1528  paragraph.
1529  As with all of their other weird quirks, most Americans will whine and
1530  moan until they can have their way and indent the first line of all paragraphs.
1531  (Yes, we're joking.
1532  (We are?) 
1533 \emph on
1534 Yeah
1535 \emph default
1536 , we are.)
1537 \end_layout
1538
1539 \begin_layout Standard
1540 Of course, this behavior isn't standard typography.
1541  In books, you typically only indent the first line of a paragraph 
1542 \emph on
1543 if
1544 \emph default
1545  it follows another one.
1546  The idea behind indenting the first line of a paragraph is to distinguish
1547  neighboring paragraphs from one another.
1548  If there is no previous paragraph—for example, if it follows a figure or
1549  is the first paragraph in a section—then there is no need for indentation.
1550  
1551 \end_layout
1552
1553 \begin_layout Standard
1554 If you're a typical American (we're still joking!), though, you don't care
1555  about such esoteric things; you want your indentation! Add this to the
1556  preamble:
1557 \end_layout
1558
1559 \begin_layout LyX-Code
1560
1561 \backslash
1562 usepackage{indentfirst}
1563 \end_layout
1564
1565 \begin_layout Standard
1566 If your TeX distribution isn't braindead, you'll have this package, and
1567  all of your paragraphs will get the indentation the Founding Fathers intended
1568  they should have.
1569 \end_layout
1570
1571 \begin_layout Subsubsection
1572 Example #4: This Document
1573 \end_layout
1574
1575 \begin_layout Standard
1576 You can also check out the preamble of this document to get an idea of some
1577  of the advanced things you can do.
1578 \end_layout
1579
1580 \begin_layout Section
1581 LyX and LaTeX Errors
1582 \end_layout
1583
1584 \begin_layout Standard
1585 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1586  going.
1587  It then uses the logfile from the LaTeX run to do a post-mortem.
1588  After analyzing the logfile, LyX displays a dialog listing the errors.
1589  Clicking on any one of them will take you to the position in your LyX file
1590  where the error occurred.
1591 \begin_inset Foot
1592 status collapsed
1593
1594 \begin_layout Plain Layout
1595 Well, usually.
1596  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1597  right line.
1598  There are also cases where LaTeX reports the error on one line, but the
1599  actual error is earlier.
1600  This is not unlike forgetting a closing brace in a program: You'll get
1601  an error, but only later.
1602 \end_layout
1603
1604 \end_inset
1605
1606
1607 \end_layout
1608
1609 \begin_layout Standard
1610 Some folks also like to look at the log file directly: It is available from
1611  
1612 \begin_inset Flex MenuItem
1613 status collapsed
1614
1615 \begin_layout Plain Layout
1616 Document
1617 \bar under
1618 \SpecialChar \menuseparator
1619
1620 \bar default
1621 Latex
1622 \begin_inset space ~
1623 \end_inset
1624
1625 Log
1626 \end_layout
1627
1628 \end_inset
1629
1630 .
1631  There are some fairly common error messages and warnings.
1632  We'll cover those here.
1633  You should look at a good LaTeX book for a complete listing.
1634 \end_layout
1635
1636 \begin_layout Itemize
1637 \begin_inset Flex Code
1638 status collapsed
1639
1640 \begin_layout Plain Layout
1641 LaTeX Warning
1642 \end_layout
1643
1644 \end_inset
1645
1646
1647 \begin_inset Newline newline
1648 \end_inset
1649
1650 Anything beginning with these words is a warning message for the purpose
1651  of 
1652 \begin_inset Quotes eld
1653 \end_inset
1654
1655 debugging
1656 \begin_inset Quotes erd
1657 \end_inset
1658
1659  the LaTeX code itself.
1660  You'll get messages like this if you added or changed cross-references
1661  or bibliography entries, in which case, LaTeX is trying to tell you that
1662  you need to make another run.
1663  You can by-and-large ignore these.
1664 \end_layout
1665
1666 \begin_layout Itemize
1667 \begin_inset Flex Code
1668 status collapsed
1669
1670 \begin_layout Plain Layout
1671 LaTeX Font Warning
1672 \end_layout
1673
1674 \end_inset
1675
1676
1677 \begin_inset Newline newline
1678 \end_inset
1679
1680 Another warning message, this time about fonts which LaTeX couldn't find.
1681  The rest of the message will often say something about a replacement font
1682  that LaTeX used.
1683  You can safely ignore these, too.
1684 \end_layout
1685
1686 \begin_layout Itemize
1687 \begin_inset Flex Code
1688 status collapsed
1689
1690 \begin_layout Plain Layout
1691 Overfull 
1692 \backslash
1693 hbox
1694 \end_layout
1695
1696 \end_inset
1697
1698
1699 \begin_inset Newline newline
1700 \end_inset
1701
1702 LaTeX absolutely 
1703 \emph on
1704 loves
1705 \emph default
1706  to spew these out.
1707  They are warnings about lines that were too long and run past the right
1708  margin.
1709  Almost always, this is unnoticeable in the final output.
1710  (It can be just a point or two.) Or, only one or two characters extend past
1711  the margin.
1712  LaTeX seems to generate at least one of these messages for just about any
1713  document you write.
1714 \begin_inset Newline newline
1715 \end_inset
1716
1717 You can ignore these messages.
1718  Your eyes will tell you if there's a problem with something that's too
1719  wide; just look at the output.
1720 \begin_inset Foot
1721 status collapsed
1722
1723 \begin_layout Plain Layout
1724 You can also enable the `draft' option in 
1725 \begin_inset Flex MenuItem
1726 status collapsed
1727
1728 \begin_layout Plain Layout
1729 Document
1730 \bar under
1731 \SpecialChar \menuseparator
1732
1733 \bar default
1734 Settings
1735 \end_layout
1736
1737 \end_inset
1738
1739 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1740 \end_layout
1741
1742 \end_inset
1743
1744
1745 \end_layout
1746
1747 \begin_layout Itemize
1748 \begin_inset Flex Code
1749 status collapsed
1750
1751 \begin_layout Plain Layout
1752 Underfull 
1753 \backslash
1754 hbox
1755 \end_layout
1756
1757 \end_inset
1758
1759
1760 \begin_inset Newline newline
1761 \end_inset
1762
1763 Not quite as common as its cousin.
1764  LaTeX seems to like to print lines that are a bit too wide as opposed to
1765  ones that are a bit too narrow.
1766  We have no idea why.
1767 \end_layout
1768
1769 \begin_layout Itemize
1770 \begin_inset Flex Code
1771 status collapsed
1772
1773 \begin_layout Plain Layout
1774 Overfull 
1775 \backslash
1776 vbox
1777 \end_layout
1778
1779 \end_inset
1780
1781  and 
1782 \begin_inset Flex Code
1783 status collapsed
1784
1785 \begin_layout Plain Layout
1786 Underfull 
1787 \backslash
1788 vbox
1789 \end_layout
1790
1791 \end_inset
1792
1793
1794 \begin_inset Newline newline
1795 \end_inset
1796
1797 Warnings about troubles breaking the page.
1798  Once again, just look at the output.
1799  Your eyes will tell you where something has gone wrong.
1800 \end_layout
1801
1802 \begin_layout Itemize
1803 \begin_inset Flex Code
1804 status collapsed
1805
1806 \begin_layout Plain Layout
1807 LaTeX Error: File 
1808 \begin_inset Quotes els
1809 \end_inset
1810
1811 Xxxx
1812 \begin_inset Quotes ers
1813 \end_inset
1814
1815  not found
1816 \end_layout
1817
1818 \end_inset
1819
1820
1821 \begin_inset Newline newline
1822 \end_inset
1823
1824 The file 
1825 \begin_inset Quotes eld
1826 \end_inset
1827
1828 Xxxx
1829 \begin_inset Quotes erd
1830 \end_inset
1831
1832  isn't installed on this system.
1833  This usually appears because some package your document needs isn't installed.
1834  If you didn't touch the preamble or didn't use the 
1835 \begin_inset Flex Code
1836 status collapsed
1837
1838 \begin_layout Plain Layout
1839
1840 \backslash
1841 usepackage{}
1842 \end_layout
1843
1844 \end_inset
1845
1846  command, then one of the packages LyX tried to load is missing.
1847  Use 
1848 \begin_inset Flex MenuItem
1849 status collapsed
1850
1851 \begin_layout Plain Layout
1852 Help\SpecialChar \menuseparator
1853 LaTeX Configuration
1854 \end_layout
1855
1856 \end_inset
1857
1858  to get a list of packages that LyX knows about.
1859  This file is updated whenever you reconfigure LyX (using 
1860 \begin_inset Flex MenuItem
1861 status collapsed
1862
1863 \begin_layout Plain Layout
1864 Tools\SpecialChar \menuseparator
1865 Reconfigure
1866 \end_layout
1867
1868 \end_inset
1869
1870 ) and tells you which packages have been detected and what they do.
1871 \begin_inset Newline newline
1872 \end_inset
1873
1874 If you did use the 
1875 \begin_inset Flex Code
1876 status collapsed
1877
1878 \begin_layout Plain Layout
1879
1880 \backslash
1881 usepackage{}
1882 \end_layout
1883
1884 \end_inset
1885
1886  command and the package in question isn't installed, then you'll need to
1887  install it yourself.
1888 \end_layout
1889
1890 \begin_layout Itemize
1891 \begin_inset Flex Code
1892 status collapsed
1893
1894 \begin_layout Plain Layout
1895 LaTeX Error: Unknown option
1896 \end_layout
1897
1898 \end_inset
1899
1900
1901 \begin_inset Newline newline
1902 \end_inset
1903
1904 Error messages beginning with this are trying to tell you that you specified
1905  a bad or undefined option to a package.
1906  Check the package's documentation.
1907 \end_layout
1908
1909 \begin_layout Itemize
1910 \begin_inset Flex Code
1911 status collapsed
1912
1913 \begin_layout Plain Layout
1914 Undefined control sequence
1915 \end_layout
1916
1917 \end_inset
1918
1919
1920 \begin_inset Newline newline
1921 \end_inset
1922
1923 If you've inserted LaTeX code into your document, but made a typo, you'll
1924  get one of these.
1925  You may have forgotten to load a package.
1926  In any case, this error message usually means that you used an undefined
1927  command.
1928  
1929 \end_layout
1930
1931 \begin_layout Standard
1932 There are other error and warning messages.
1933  Some are self-explanatory.
1934  These are usually LaTeX messages.
1935  Others are downright cryptic.
1936  These are usually TeX error messages, and we really have 
1937 \emph on
1938 no clue
1939 \emph default
1940  what they mean or how to decipher them.
1941  No-one does.
1942 \end_layout
1943
1944 \begin_layout Standard
1945 There's a general sequence you should follow if you get error messages:
1946 \end_layout
1947
1948 \begin_layout Enumerate
1949 Look at the LaTeX code you inserted for typos.
1950 \end_layout
1951
1952 \begin_layout Enumerate
1953 If there are no typos, check that you used the command(s) correctly.
1954 \end_layout
1955
1956 \begin_layout Enumerate
1957 If you get a bunch of error boxes piled up at the very top of the document—and
1958  especially if you see a 
1959 \begin_inset Quotes eld
1960 \end_inset
1961
1962
1963 \begin_inset Flex Code
1964 status collapsed
1965
1966 \begin_layout Plain Layout
1967 Missing 
1968 \backslash
1969 begin{document}
1970 \end_layout
1971
1972 \end_inset
1973
1974
1975 \begin_inset Quotes erd
1976 \end_inset
1977
1978  error—it means that there are errors in the preamble.
1979  Start debugging your preamble.
1980 \end_layout
1981
1982 \begin_layout Enumerate
1983 If you didn't add anything to the preamble and didn't add any LaTeX code
1984  to the document, the first suspect is your LaTeX distribution itself.
1985  Check for missing packages and install them.
1986 \end_layout
1987
1988 \begin_layout Enumerate
1989 Okay, so there are no missing packages.
1990  Did you use any of the fine-tuning options in LyX? Specifically, did you
1991  
1992 \emph on
1993 misuse
1994 \emph default
1995  any of them, like trying to manually insert lots of 
1996 \begin_inset Flex Code
1997 status collapsed
1998
1999 \begin_layout Plain Layout
2000 Protected
2001 \begin_inset space ~
2002 \end_inset
2003
2004 Blanks
2005 \end_layout
2006
2007 \end_inset
2008
2009
2010 \begin_inset Flex Code
2011 status collapsed
2012
2013 \begin_layout Plain Layout
2014 Linebreaks
2015 \end_layout
2016
2017 \end_inset
2018
2019 , or 
2020 \begin_inset Flex Code
2021 status collapsed
2022
2023 \begin_layout Plain Layout
2024 Pagebreaks
2025 \end_layout
2026
2027 \end_inset
2028
2029 ? Did you try to kludge something together with these instead of using the
2030  appropriate paragraph environment?
2031 \end_layout
2032
2033 \begin_layout Enumerate
2034 All right, you didn't use any of the fine-tuning options, you played by
2035  the rules.
2036  Did you try to pull a fancy maneuver? Did you do something funky inside
2037  a table or an equation, like inserting a graphic into a table cell?
2038 \end_layout
2039
2040 \begin_layout Enumerate
2041 Do you have long sections of text where LaTeX cannot find a place to break
2042  a line? By default, LaTeX is rather strict about how much extra inter-word
2043  spacing it will add in order to break a line.
2044  Preferably, you should rework the paragraph to avoid the problem.
2045  If this isn't an option, you can wrap your text in 
2046 \begin_inset Flex Code
2047 status collapsed
2048
2049 \begin_layout Plain Layout
2050
2051 \backslash
2052 sloppypar
2053 \end_layout
2054
2055 \end_inset
2056
2057  to make LaTeX's line breaking more, well, sloppy.
2058 \end_layout
2059
2060 \begin_layout Enumerate
2061 Did you go overboard with the nesting? LyX (currently) doesn't check to
2062  make sure you're in the limits for nesting environments.
2063  If you nested a bunch of environments to the 
2064 \begin_inset Formula $17^{\mathrm{th}}$
2065 \end_inset
2066
2067  level, that's the problem.
2068  (The limit in LaTeX is five.)
2069 \end_layout
2070
2071 \begin_layout Enumerate
2072 Okay, you didn't get any error messages, but your output looks awful.
2073  If you have a table or figure that's too wide or long for the page, you
2074  need to:
2075 \end_layout
2076
2077 \begin_deeper
2078 \begin_layout Enumerate
2079 rescale the figure so it fits.
2080 \end_layout
2081
2082 \begin_layout Enumerate
2083 trim down the table so it fits.
2084 \end_layout
2085
2086 \end_deeper
2087 \begin_layout Enumerate
2088 If something else is wrong with the output, and you didn't try to pull anything
2089  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2090 \end_layout
2091
2092 \begin_layout Standard
2093 If all this doesn't help—well, then 
2094 \emph on
2095 perhaps
2096 \emph default
2097  you might have found a bug in LyX\SpecialChar \ldots{}
2098 .
2099 \end_layout
2100
2101 \begin_layout Chapter
2102 Supplemental Tools
2103 \end_layout
2104
2105 \begin_layout Section
2106 Customizing Bibliographies with BibTeX
2107 \end_layout
2108
2109 \begin_layout Standard
2110 The most basic information about how to use BibTeX with LyX is contained
2111  in the section 
2112 \emph on
2113 Bibliography databases (BibTeX)
2114 \emph default
2115  of the 
2116 \emph on
2117 User's Guide
2118 \emph default
2119 .
2120  The following subsections explain special bibliography features supported
2121  by LyX.
2122 \end_layout
2123
2124 \begin_layout Subsection
2125 Alternative Citation Styles
2126 \end_layout
2127
2128 \begin_layout Standard
2129 Standard BibTeX uses numbers (e.
2130 \begin_inset space \thinspace{}
2131 \end_inset
2132
2133 g.
2134 \begin_inset space \space{}
2135 \end_inset
2136
2137
2138 \begin_inset Quotes eld
2139 \end_inset
2140
2141 [12]
2142 \begin_inset Quotes erd
2143 \end_inset
2144
2145 ) to refer to a cited work.
2146  However, in many scientific disciplines, other citation styles are in use.
2147  The most common one is the author-year style (e.
2148 \begin_inset space \thinspace{}
2149 \end_inset
2150
2151 g.
2152 \begin_inset space \space{}
2153 \end_inset
2154
2155
2156 \begin_inset Quotes eld
2157 \end_inset
2158
2159 Knuth 1984a
2160 \begin_inset Quotes erd
2161 \end_inset
2162
2163 ).
2164  LyX supports two packages that provide this style, 
2165 \begin_inset Flex Code
2166 status collapsed
2167
2168 \begin_layout Plain Layout
2169 natbib
2170 \end_layout
2171
2172 \end_inset
2173
2174  and 
2175 \begin_inset Flex Code
2176 status collapsed
2177
2178 \begin_layout Plain Layout
2179 jurabib
2180 \end_layout
2181
2182 \end_inset
2183
2184 .
2185  Both packages have their pros and cons, which cannot be listed in detail.
2186  If you only want to have simple author-year (or author-numerical) style,
2187  or if you want to use one of the countless style files for 
2188 \begin_inset Flex Code
2189 status collapsed
2190
2191 \begin_layout Plain Layout
2192 natbib
2193 \end_layout
2194
2195 \end_inset
2196
2197 , then the established 
2198 \begin_inset Flex Code
2199 status collapsed
2200
2201 \begin_layout Plain Layout
2202 natbib
2203 \end_layout
2204
2205 \end_inset
2206
2207  package is probably your choice.
2208  If you need special features like short title references, ibidem etc., you
2209  might consider the 
2210 \begin_inset Flex Code
2211 status collapsed
2212
2213 \begin_layout Plain Layout
2214 jurabib
2215 \end_layout
2216
2217 \end_inset
2218
2219  package.
2220 \end_layout
2221
2222 \begin_layout Standard
2223 The handling of both packages in LyX is basically the same.
2224  Go to 
2225 \begin_inset Flex MenuItem
2226 status collapsed
2227
2228 \begin_layout Plain Layout
2229 Document\SpecialChar \menuseparator
2230 Settings
2231 \end_layout
2232
2233 \end_inset
2234
2235  and select under 
2236 \begin_inset Flex MenuItem
2237 status collapsed
2238
2239 \begin_layout Plain Layout
2240 Bibliography
2241 \end_layout
2242
2243 \end_inset
2244
2245  the option 
2246 \begin_inset Flex MenuItem
2247 status collapsed
2248
2249 \begin_layout Plain Layout
2250 Natbib
2251 \end_layout
2252
2253 \end_inset
2254
2255  or 
2256 \begin_inset Flex MenuItem
2257 status collapsed
2258
2259 \begin_layout Plain Layout
2260 Jurabib
2261 \end_layout
2262
2263 \end_inset
2264
2265 .
2266  With both packages, you will get some extra features in the citation dialog
2267  and you can select the style of the reference (
2268 \begin_inset Quotes eld
2269 \end_inset
2270
2271 Knuth 1984
2272 \begin_inset Quotes erd
2273 \end_inset
2274
2275
2276 \begin_inset Quotes eld
2277 \end_inset
2278
2279 Knuth (1984)
2280 \begin_inset Quotes erd
2281 \end_inset
2282
2283
2284 \begin_inset Quotes eld
2285 \end_inset
2286
2287 Knuth, 1984
2288 \begin_inset Quotes erd
2289 \end_inset
2290
2291
2292 \begin_inset Quotes eld
2293 \end_inset
2294
2295 1984
2296 \begin_inset Quotes erd
2297 \end_inset
2298
2299  etc.).
2300  Note that both packages need specifically designed style files.
2301  They both ship their own, but there are lots of additional style files,
2302  and there is even an interactive style file builder
2303 \begin_inset Foot
2304 status collapsed
2305
2306 \begin_layout Plain Layout
2307 See 
2308 \begin_inset Flex URL
2309 status open
2310
2311 \begin_layout Plain Layout
2312
2313 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2314 \end_layout
2315
2316 \end_inset
2317
2318
2319 \end_layout
2320
2321 \end_inset
2322
2323  for 
2324 \begin_inset Flex Code
2325 status collapsed
2326
2327 \begin_layout Plain Layout
2328 natbib
2329 \end_layout
2330
2331 \end_inset
2332
2333 .
2334 \end_layout
2335
2336 \begin_layout Subsection
2337 Sectioned Bibliographies
2338 \end_layout
2339
2340 \begin_layout Standard
2341 Sometimes you might need to divide your bibliography into several sections.
2342  If you are for instance a historian, the possibility to separate sources
2343  and scientific works is most likely a 
2344 \begin_inset Quotes eld
2345 \end_inset
2346
2347 must have
2348 \begin_inset Quotes erd
2349 \end_inset
2350
2351 .
2352  Unfortunately, BibTeX itself does not allow you to do this.
2353  But with the help of some LaTeX packages, BibTeX can be extended to fit
2354  your needs.
2355 \end_layout
2356
2357 \begin_layout Standard
2358 LyX provides native support for one of these packages, 
2359 \family typewriter
2360 bibtopic
2361 \family default
2362 .
2363 \begin_inset Foot
2364 status collapsed
2365
2366 \begin_layout Plain Layout
2367 Available from 
2368 \begin_inset Flex URL
2369 status open
2370
2371 \begin_layout Plain Layout
2372
2373 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2374 \end_layout
2375
2376 \end_inset
2377
2378
2379 \end_layout
2380
2381 \end_inset
2382
2383  The advantage of this package (compared to other packages like 
2384 \family typewriter
2385 multibib
2386 \family default
2387 ) is that you don't need to define new citation commands.
2388  Instead, you need to prepare different bibliographic databases which include
2389  the entries for the different sections of the bibliography.
2390  For example: If you want to divide your bibliography into the sections
2391  
2392 \begin_inset Quotes eld
2393 \end_inset
2394
2395 Sources
2396 \begin_inset Quotes erd
2397 \end_inset
2398
2399  and 
2400 \begin_inset Quotes eld
2401 \end_inset
2402
2403 Scientific works
2404 \begin_inset Quotes erd
2405 \end_inset
2406
2407 , you first need to create two bibliographic databases, e.
2408 \begin_inset space \thinspace{}
2409 \end_inset
2410
2411 g.
2412 \begin_inset space \space{}
2413 \end_inset
2414
2415
2416 \begin_inset Flex Code
2417 status collapsed
2418
2419 \begin_layout Plain Layout
2420 sources.bib
2421 \end_layout
2422
2423 \end_inset
2424
2425  and 
2426 \begin_inset Flex Code
2427 status collapsed
2428
2429 \begin_layout Plain Layout
2430 scientific.bib
2431 \end_layout
2432
2433 \end_inset
2434
2435 .
2436  
2437 \end_layout
2438
2439 \begin_layout Standard
2440 Go to 
2441 \begin_inset Flex MenuItem
2442 status collapsed
2443
2444 \begin_layout Plain Layout
2445 Document\SpecialChar \menuseparator
2446 Settings
2447 \end_layout
2448
2449 \end_inset
2450
2451  and check under 
2452 \begin_inset Flex MenuItem
2453 status collapsed
2454
2455 \begin_layout Plain Layout
2456 Bibliography
2457 \end_layout
2458
2459 \end_inset
2460
2461  the option 
2462 \begin_inset Flex MenuItem
2463 status collapsed
2464
2465 \begin_layout Plain Layout
2466 Sectioned bibliography
2467 \end_layout
2468
2469 \end_inset
2470
2471 .
2472  Now you can insert multiple BibTeX bibliographies, one for each section
2473  of your bibliography.
2474  Returning to our example: Insert the BibTeX bibliography 
2475 \begin_inset Flex Code
2476 status collapsed
2477
2478 \begin_layout Plain Layout
2479 sources.bib
2480 \end_layout
2481
2482 \end_inset
2483
2484  and a second one for the database 
2485 \begin_inset Flex Code
2486 status collapsed
2487
2488 \begin_layout Plain Layout
2489 scientific.bib
2490 \end_layout
2491
2492 \end_inset
2493
2494 .
2495  You are free to use the same or different styles for each section.
2496  Additionally, you can choose if the bibliography section should contain
2497  
2498 \begin_inset Quotes eld
2499 \end_inset
2500
2501 all cited references
2502 \begin_inset Quotes erd
2503 \end_inset
2504
2505  of the specified database(s) (which is the default), 
2506 \begin_inset Quotes eld
2507 \end_inset
2508
2509 all uncited references
2510 \begin_inset Quotes erd
2511 \end_inset
2512
2513  or even 
2514 \begin_inset Quotes eld
2515 \end_inset
2516
2517 all references
2518 \begin_inset Quotes erd
2519 \end_inset
2520
2521 .
2522  This might be useful if you would like to separate your bibliography into
2523  three sections: 
2524 \begin_inset Quotes eld
2525 \end_inset
2526
2527 Cited sources
2528 \begin_inset Quotes erd
2529 \end_inset
2530
2531
2532 \begin_inset Quotes eld
2533 \end_inset
2534
2535 Uncited sources
2536 \begin_inset Quotes erd
2537 \end_inset
2538
2539 , and 
2540 \begin_inset Quotes eld
2541 \end_inset
2542
2543 Scientific works
2544 \begin_inset Quotes erd
2545 \end_inset
2546
2547 .
2548  The titles for the sections can be added as ordinary sections or subsections.
2549  Since 
2550 \begin_inset Flex Code
2551 status collapsed
2552
2553 \begin_layout Plain Layout
2554 bibtopic
2555 \end_layout
2556
2557 \end_inset
2558
2559  removes the bibliography title, you have to manually re-add that, too (as
2560  a chapter* or section*, for instance).
2561 \end_layout
2562
2563 \begin_layout Subsection
2564 Multiple Bibliographies
2565 \end_layout
2566
2567 \begin_layout Standard
2568 Multiple bibliographies, e.
2569 \begin_inset space \thinspace{}
2570 \end_inset
2571
2572 g.
2573 \begin_inset space \space{}
2574 \end_inset
2575
2576 a bibliography for each section or chapter of the document, are not supported
2577  by BibTeX itself.
2578  But the 
2579 \begin_inset Flex Code
2580 status collapsed
2581
2582 \begin_layout Plain Layout
2583 bibtopic
2584 \end_layout
2585
2586 \end_inset
2587
2588  package, which is used for the creation of sectioned bibliographies in
2589  LyX (see the previous section), provides an easy way to solve this task,
2590  if you are willing to use some 
2591 \begin_inset Flex MenuItem
2592 status collapsed
2593
2594 \begin_layout Plain Layout
2595 TeX Code
2596 \end_layout
2597
2598 \end_inset
2599
2600  (see section
2601 \begin_inset space ~
2602 \end_inset
2603
2604
2605 \begin_inset CommandInset ref
2606 LatexCommand ref
2607 reference "sec:Inserting-TeX-Code"
2608
2609 \end_inset
2610
2611 ).
2612 \begin_inset Foot
2613 status collapsed
2614
2615 \begin_layout Plain Layout
2616 An alternative approach is to use the 
2617 \begin_inset Flex Code
2618 status collapsed
2619
2620 \begin_layout Plain Layout
2621 chapterbib
2622 \end_layout
2623
2624 \end_inset
2625
2626  or 
2627 \begin_inset Flex Code
2628 status collapsed
2629
2630 \begin_layout Plain Layout
2631 bibunits
2632 \end_layout
2633
2634 \end_inset
2635
2636  package, respectively.
2637 \end_layout
2638
2639 \end_inset
2640
2641
2642 \end_layout
2643
2644 \begin_layout Standard
2645 First go to 
2646 \begin_inset Flex MenuItem
2647 status collapsed
2648
2649 \begin_layout Plain Layout
2650 Document\SpecialChar \menuseparator
2651 Settings
2652 \end_layout
2653
2654 \end_inset
2655
2656  and under 
2657 \begin_inset Flex MenuItem
2658 status collapsed
2659
2660 \begin_layout Plain Layout
2661 Bibliography
2662 \end_layout
2663
2664 \end_inset
2665
2666  check 
2667 \begin_inset Flex MenuItem
2668 status collapsed
2669
2670 \begin_layout Plain Layout
2671 Sectioned bibliography
2672 \end_layout
2673
2674 \end_inset
2675
2676 .
2677  In the document, you have to enclose the sections, which shall contain
2678  their own bibliography (including the BibTeX bibliography itself), between
2679  
2680 \begin_inset Flex Code
2681 status collapsed
2682
2683 \begin_layout Plain Layout
2684
2685 \backslash
2686 begin{btUnit}
2687 \end_layout
2688
2689 \end_inset
2690
2691  and 
2692 \begin_inset Flex Code
2693 status collapsed
2694
2695 \begin_layout Plain Layout
2696
2697 \backslash
2698 end{btUnit}
2699 \end_layout
2700
2701 \end_inset
2702
2703  (those commands have to be inserted as TeX code).
2704  The bibliography will contain all references that have been cited in the
2705  current 
2706 \begin_inset Flex Code
2707 status collapsed
2708
2709 \begin_layout Plain Layout
2710 btUnit
2711 \end_layout
2712
2713 \end_inset
2714
2715 .
2716  
2717 \series bold
2718 Note:
2719 \series default
2720  If you are using this approach, then every citation reference has to be
2721  inside some 
2722 \begin_inset Flex Code
2723 status collapsed
2724
2725 \begin_layout Plain Layout
2726 btUnit
2727 \end_layout
2728
2729 \end_inset
2730
2731 .
2732  Also, the 
2733 \begin_inset Flex Code
2734 status collapsed
2735
2736 \begin_layout Plain Layout
2737 btUnit
2738 \end_layout
2739
2740 \end_inset
2741
2742 s cannot be nested.
2743 \end_layout
2744
2745 \begin_layout Section
2746 Multipart Documents
2747 \end_layout
2748
2749 \begin_layout Subsection
2750 General Operation
2751 \end_layout
2752
2753 \begin_layout Standard
2754 When you are working on a large file with many sections, it is often convenient
2755  to break up the document into several files, or perhaps you have something
2756  where a table may change from time to time, but the preceding text does
2757  not.
2758  In these cases, you should seriously consider using multipart documents.
2759  For example, scientific papers often have five major sections: the introduction
2760 , observations, results, discussion, and conclusion.
2761  Each of these could be its own separate LyX file, with one 
2762 \begin_inset Quotes eld
2763 \end_inset
2764
2765 master
2766 \begin_inset Quotes erd
2767 \end_inset
2768
2769  file which contains the title, authors, abstract, references, etc., plus
2770  the five included files.
2771  It is important to note that each of these files is a full LyX file which
2772  can be formatted and printed on its own, as well as included in a master
2773  file.
2774  Each of these files must have the same document class, however—don't attempt
2775  to mix book classes with article classes.
2776  You may also include LaTeX files; however, these files must not have their
2777  own preamble (i.
2778 \begin_inset space \thinspace{}
2779 \end_inset
2780
2781 e.
2782 \begin_inset space \space{}
2783 \end_inset
2784
2785 everything up to and including the 
2786 \begin_inset Flex Code
2787 status collapsed
2788
2789 \begin_layout Plain Layout
2790
2791 \backslash
2792 begin{document}
2793 \end_layout
2794
2795 \end_inset
2796
2797  line as well as the 
2798 \begin_inset Flex Code
2799 status collapsed
2800
2801 \begin_layout Plain Layout
2802
2803 \backslash
2804 end{document}
2805 \end_layout
2806
2807 \end_inset
2808
2809  line must be deleted) or else errors will be generated when you try to
2810  make a DVI file.
2811 \end_layout
2812
2813 \begin_layout Standard
2814 LyX allows you to include files quite easily with 
2815 \begin_inset Flex MenuItem
2816 status collapsed
2817
2818 \begin_layout Plain Layout
2819 Insert\SpecialChar \menuseparator
2820 ChiId
2821 \begin_inset space ~
2822 \end_inset
2823
2824 Document
2825 \end_layout
2826
2827 \end_inset
2828
2829 .
2830  When you click on this selection a small box is inserted into the file
2831  at the current cursor location.
2832  Clicking on the box raises a dialog which allows you to select the file
2833  to be included, and the method of its inclusion.
2834  
2835 \end_layout
2836
2837 \begin_layout Standard
2838 The file selection box should by now be obvious.
2839  The three inclusion methods are 
2840 \begin_inset Quotes eld
2841 \end_inset
2842
2843 include
2844 \begin_inset Quotes erd
2845 \end_inset
2846
2847
2848 \begin_inset Quotes eld
2849 \end_inset
2850
2851 input
2852 \begin_inset Quotes erd
2853 \end_inset
2854
2855 , and 
2856 \begin_inset Quotes eld
2857 \end_inset
2858
2859 verbatim
2860 \begin_inset Quotes erd
2861 \end_inset
2862
2863 .
2864  The difference between 
2865 \begin_inset Quotes eld
2866 \end_inset
2867
2868 include
2869 \begin_inset Quotes erd
2870 \end_inset
2871
2872  and 
2873 \begin_inset Quotes eld
2874 \end_inset
2875
2876 input
2877 \begin_inset Quotes erd
2878 \end_inset
2879
2880  is really only meaningful to LaTeXperts, but the practical difference is
2881  that files that are 
2882 \begin_inset Quotes eld
2883 \end_inset
2884
2885 included
2886 \begin_inset Quotes erd
2887 \end_inset
2888
2889  are typeset beginning on a new page, while files that are 
2890 \begin_inset Quotes eld
2891 \end_inset
2892
2893 inputted
2894 \begin_inset Quotes erd
2895 \end_inset
2896
2897  are typeset starting on the current page.
2898 \end_layout
2899
2900 \begin_layout Standard
2901 Generally, the master file is converted into a full LaTeX file before typesettin
2902 g, while the included files are converted to LaTeX files that do not have
2903  all the preamble information.
2904 \end_layout
2905
2906 \begin_layout Standard
2907
2908 \begin_inset Quotes eld
2909 \end_inset
2910
2911 verbatim
2912 \begin_inset Quotes erd
2913 \end_inset
2914
2915  included file allows you to include a file typeset exactly as it appears
2916  in the file, i.
2917 \begin_inset space \thinspace{}
2918 \end_inset
2919
2920 e.
2921 \begin_inset space \space{}
2922 \end_inset
2923
2924 in 
2925 \begin_inset Flex Code
2926 status collapsed
2927
2928 \begin_layout Plain Layout
2929 verbatim
2930 \end_layout
2931
2932 \end_inset
2933
2934  mode, with the characters set in a fixed-width typewriter font.
2935  Normally, spaces in this file are invisible, though two consecutive spaces
2936  are conserved, unlike LyX's normal treatment of spaces.
2937  However, setting the 
2938 \begin_inset Flex MenuItem
2939 status collapsed
2940
2941 \begin_layout Plain Layout
2942 Mark
2943 \begin_inset space ~
2944 \end_inset
2945
2946 spaces
2947 \begin_inset space ~
2948 \end_inset
2949
2950 in
2951 \begin_inset space ~
2952 \end_inset
2953
2954 output
2955 \end_layout
2956
2957 \end_inset
2958
2959  checkbox typesets a mark to unambiguously define the presence of a space.
2960  
2961 \end_layout
2962
2963 \begin_layout Subsection
2964 Cross-References Between Files
2965 \end_layout
2966
2967 \begin_layout Standard
2968 \begin_inset Box Shadowbox
2969 position "t"
2970 hor_pos "c"
2971 has_inner_box 1
2972 inner_pos "t"
2973 use_parbox 0
2974 use_makebox 0
2975 width "100col%"
2976 special "none"
2977 height "1in"
2978 height_special "totalheight"
2979 status open
2980
2981 \begin_layout Plain Layout
2982 This section is somewhat out of date.
2983  Need to describe default master documents and how children are opened when
2984  the master is.
2985  [[FIXME]]
2986 \end_layout
2987
2988 \end_inset
2989
2990
2991 \end_layout
2992
2993 \begin_layout Standard
2994 It is possible to set up cross-references between the different files.
2995  First, open all the files in question: let's call them A and B in a two
2996  file example, where B is included in A.
2997  Let's say you insert a label in A, then want to reference it in B.
2998  Open the cross-reference dialog whilst in document B, and you can select
2999  the 
3000 \begin_inset Quotes eld
3001 \end_inset
3002
3003 buffer
3004 \begin_inset Quotes erd
3005 \end_inset
3006
3007  to use.
3008 \end_layout
3009
3010 \begin_layout Subsection
3011 Bibliography Lists in all Subdocuments
3012 \end_layout
3013
3014 \begin_layout Standard
3015 \begin_inset Box Frameless
3016 position "t"
3017 hor_pos "c"
3018 has_inner_box 1
3019 inner_pos "t"
3020 use_parbox 0
3021 use_makebox 0
3022 width "100col%"
3023 special "none"
3024 height "1in"
3025 height_special "totalheight"
3026 status open
3027
3028 \begin_layout Plain Layout
3029 This section also needs updating.
3030  There is now material about this on the wiki, and it could be copied here.
3031 \end_layout
3032
3033 \end_inset
3034
3035
3036 \end_layout
3037
3038 \begin_layout Standard
3039 Copy the bibliography list with all entries to all subdocuments and transform
3040  them to a comment.
3041  This way LyX will find the 
3042 \begin_inset Flex Code
3043 status collapsed
3044
3045 \begin_layout Plain Layout
3046 .bib
3047 \end_layout
3048
3049 \end_inset
3050
3051 -files and you can easily insert references without making the bibliography
3052  list visible.
3053 \end_layout
3054
3055 \begin_layout Standard
3056 As the bibliography list is in a comment, LaTeX won't use use it and the
3057  references will look like this: [?], instead of like this: [1].
3058  One solution is to use the LaTeX-package 
3059 \begin_inset Flex Code
3060 status collapsed
3061
3062 \begin_layout Plain Layout
3063 comment
3064 \end_layout
3065
3066 \end_inset
3067
3068  that will only include comments by processing the files separately.
3069  To do this, add in the LaTeX preamble of every subdocument the following:
3070 \end_layout
3071
3072 \begin_layout LyX-Code
3073
3074 \backslash
3075 usepackage{comment}
3076 \end_layout
3077
3078 \begin_layout LyX-Code
3079
3080 \backslash
3081 includecomment{comment}
3082 \end_layout
3083
3084 \begin_layout Standard
3085 See also 
3086 \begin_inset Flex URL
3087 status collapsed
3088
3089 \begin_layout Plain Layout
3090
3091 http://wiki.lyx.org/FAQ/Unsorted#toc31
3092 \end_layout
3093
3094 \end_inset
3095
3096 .
3097 \end_layout
3098
3099 \begin_layout Section
3100 LyX Archives
3101 \end_layout
3102
3103 \begin_layout Standard
3104 Users sometimes need to be able to 
3105 \begin_inset Quotes eld
3106 \end_inset
3107
3108 bundle
3109 \begin_inset Quotes erd
3110 \end_inset
3111
3112  a LyX file together with all the images (and other files) on which it depends,
3113  either for sending to a publisher or for sharing with a co-author.
3114  LyX 2.0 includes a Python script (
3115 \begin_inset Flex Code
3116 status collapsed
3117
3118 \begin_layout Plain Layout
3119 lyxpak.py
3120 \end_layout
3121
3122 \end_inset
3123
3124 ) that automates this process.
3125  To use it, you must have either the 
3126 \begin_inset Flex Code
3127 status collapsed
3128
3129 \begin_layout Plain Layout
3130 zipfile
3131 \end_layout
3132
3133 \end_inset
3134
3135  or 
3136 \begin_inset Flex Code
3137 status collapsed
3138
3139 \begin_layout Plain Layout
3140 tarfile
3141 \end_layout
3142
3143 \end_inset
3144
3145  python modules installed on your system.
3146  By default, the script prefers the 
3147 \begin_inset Flex Code
3148 status collapsed
3149
3150 \begin_layout Plain Layout
3151 gzip
3152 \end_layout
3153
3154 \end_inset
3155
3156 -compressed 
3157 \begin_inset Flex Code
3158 status collapsed
3159
3160 \begin_layout Plain Layout
3161 tar
3162 \end_layout
3163
3164 \end_inset
3165
3166  format on Unix-like systems and the 
3167 \begin_inset Flex Code
3168 status collapsed
3169
3170 \begin_layout Plain Layout
3171 zip
3172 \end_layout
3173
3174 \end_inset
3175
3176  format on Windows.
3177 \end_layout
3178
3179 \begin_layout Standard
3180 LyX's configuration process will set the script up to export a `LyX Archive',
3181  and this format will then be available under 
3182 \begin_inset Flex Code
3183 status collapsed
3184
3185 \begin_layout Plain Layout
3186 File\SpecialChar \menuseparator
3187 Export
3188 \end_layout
3189
3190 \end_inset
3191
3192 .
3193 \end_layout
3194
3195 \begin_layout Standard
3196 Independently of the platform, the generation of a particular archive format
3197  can be forced by adding either the 
3198 \begin_inset Flex Code
3199 status collapsed
3200
3201 \begin_layout Plain Layout
3202 -t
3203 \end_layout
3204
3205 \end_inset
3206
3207  (for the 
3208 \begin_inset Flex Code
3209 status collapsed
3210
3211 \begin_layout Plain Layout
3212 tar
3213 \end_layout
3214
3215 \end_inset
3216
3217  format) or 
3218 \begin_inset Flex Code
3219 status collapsed
3220
3221 \begin_layout Plain Layout
3222 -z
3223 \end_layout
3224
3225 \end_inset
3226
3227  (for the 
3228 \begin_inset Flex Code
3229 status collapsed
3230
3231 \begin_layout Plain Layout
3232 zip
3233 \end_layout
3234
3235 \end_inset
3236
3237  format) switch to the 
3238 \begin_inset Flex Code
3239 status collapsed
3240
3241 \begin_layout Plain Layout
3242 LyX\SpecialChar \menuseparator
3243 LyX Archive
3244 \end_layout
3245
3246 \end_inset
3247
3248  converter in 
3249 \begin_inset Flex Code
3250 status collapsed
3251
3252 \begin_layout Plain Layout
3253 Tools\SpecialChar \menuseparator
3254 Preferences\SpecialChar \menuseparator
3255 File Handling\SpecialChar \menuseparator
3256 Converters
3257 \end_layout
3258
3259 \end_inset
3260
3261 .
3262  (Make sure you add the switch after the script name, not before it.)
3263 \end_layout
3264
3265 \begin_layout Section
3266 Fancy Headers and Footers
3267 \end_layout
3268
3269 \begin_layout Standard
3270 The default page layout is rather plain; for an 
3271 \begin_inset Flex Code
3272 status collapsed
3273
3274 \begin_layout Plain Layout
3275 article
3276 \end_layout
3277
3278 \end_inset
3279
3280  document class, all you get is a centered page number at the bottom of
3281  the page.
3282  This document uses KOMA-script's book class, so it appears to be a bit
3283  fancier.
3284  But to really put on a show, you need to set the document page style to
3285  
3286 \begin_inset Quotes eld
3287 \end_inset
3288
3289 fancy
3290 \begin_inset Quotes erd
3291 \end_inset
3292
3293 , as mentioned in the 
3294 \emph on
3295 User Guide
3296 \emph default
3297 .
3298  This section describes the LaTeX code you need to insert in your LaTeX
3299  preamble in order to get the desired effects.
3300 \end_layout
3301
3302 \begin_layout Standard
3303 For more information on fancy headers, see the 
3304 \begin_inset Flex Code
3305 status collapsed
3306
3307 \begin_layout Plain Layout
3308 fancyhdr
3309 \end_layout
3310
3311 \end_inset
3312
3313  package documentation.
3314  (
3315 \begin_inset Flex URL
3316 status collapsed
3317
3318 \begin_layout Plain Layout
3319
3320 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3321 \end_layout
3322
3323 \end_inset
3324
3325 )
3326 \end_layout
3327
3328 \begin_layout Standard
3329 The page header is divided into three fields, not surprisingly labeled 
3330 \begin_inset Quotes eld
3331 \end_inset
3332
3333 left
3334 \begin_inset Quotes erd
3335 \end_inset
3336
3337
3338 \begin_inset Quotes eld
3339 \end_inset
3340
3341 center
3342 \begin_inset Quotes erd
3343 \end_inset
3344
3345 , and 
3346 \begin_inset Quotes eld
3347 \end_inset
3348
3349 right
3350 \begin_inset Quotes erd
3351 \end_inset
3352
3353 .
3354  The footer is also divided into these three fields.
3355  The LaTeX commands to set these fields in the simplest manner are 
3356 \begin_inset Flex Code
3357 status collapsed
3358
3359 \begin_layout Plain Layout
3360
3361 \backslash
3362 lhead
3363 \end_layout
3364
3365 \end_inset
3366
3367
3368 \begin_inset Flex Code
3369 status collapsed
3370
3371 \begin_layout Plain Layout
3372
3373 \backslash
3374 chead
3375 \end_layout
3376
3377 \end_inset
3378
3379
3380 \begin_inset Flex Code
3381 status collapsed
3382
3383 \begin_layout Plain Layout
3384
3385 \backslash
3386 rhead
3387 \end_layout
3388
3389 \end_inset
3390
3391
3392 \begin_inset Flex Code
3393 status collapsed
3394
3395 \begin_layout Plain Layout
3396
3397 \backslash
3398 lfoot
3399 \end_layout
3400
3401 \end_inset
3402
3403 , etc.
3404  Suppose you wish to put your name in the upper left hand corner of each
3405  page.
3406  Simply insert the following command in the preamble: 
3407 \end_layout
3408
3409 \begin_layout Standard
3410
3411 \family typewriter
3412
3413 \backslash
3414 lhead{John Q.
3415  DocWriter}
3416 \end_layout
3417
3418 \begin_layout Standard
3419 You will now see your name in the upper left.
3420  If a field has a default entry that you would like to get rid of (often
3421  the page number appears in the central footer) simply include a command
3422  with a blank argument, e.
3423 \begin_inset space \thinspace{}
3424 \end_inset
3425
3426 g.:
3427 \end_layout
3428
3429 \begin_layout Standard
3430
3431 \family typewriter
3432
3433 \backslash
3434 cfoot{}
3435 \end_layout
3436
3437 \begin_layout Standard
3438 Let's get really fancy: lets put the section number with the word 
3439 \begin_inset Quotes eld
3440 \end_inset
3441
3442 Section
3443 \begin_inset Quotes erd
3444 \end_inset
3445
3446  (e.
3447 \begin_inset space \thinspace{}
3448 \end_inset
3449
3450 g.
3451 \begin_inset space \space{}
3452 \end_inset
3453
3454 Section 3) in the upper left, the page number (e.
3455 \begin_inset space \thinspace{}
3456 \end_inset
3457
3458 g.
3459 \begin_inset space \space{}
3460 \end_inset
3461
3462 Page 4) in the upper right, your name in the lower left, and the date in
3463  the lower right.
3464  The following commands should now appear in the preamble:
3465 \end_layout
3466
3467 \begin_layout Standard
3468
3469 \family typewriter
3470
3471 \backslash
3472 lhead{Section 
3473 \backslash
3474 thesection}
3475 \end_layout
3476
3477 \begin_layout Standard
3478
3479 \family typewriter
3480
3481 \backslash
3482 chead{}
3483 \end_layout
3484
3485 \begin_layout Standard
3486
3487 \family typewriter
3488
3489 \backslash
3490 rhead{Page 
3491 \backslash
3492 thepage}
3493 \end_layout
3494
3495 \begin_layout Standard
3496
3497 \family typewriter
3498
3499 \backslash
3500 lfoot{John Q.
3501  DocWriter}
3502 \end_layout
3503
3504 \begin_layout Standard
3505
3506 \family typewriter
3507
3508 \backslash
3509 cfoot{}
3510 \end_layout
3511
3512 \begin_layout Standard
3513
3514 \family typewriter
3515
3516 \backslash
3517 rfoot{
3518 \backslash
3519 today}
3520 \end_layout
3521
3522 \begin_layout Standard
3523 The commands 
3524 \begin_inset Flex Code
3525 status collapsed
3526
3527 \begin_layout Plain Layout
3528
3529 \backslash
3530 thesection
3531 \end_layout
3532
3533 \end_inset
3534
3535  and 
3536 \begin_inset Flex Code
3537 status collapsed
3538
3539 \begin_layout Plain Layout
3540
3541 \backslash
3542 thepage
3543 \end_layout
3544
3545 \end_inset
3546
3547  access LaTeX's section and page counters, and so print out the current
3548  section and page numbers.
3549  
3550 \begin_inset Flex Code
3551 status collapsed
3552
3553 \begin_layout Plain Layout
3554
3555 \backslash
3556 today
3557 \end_layout
3558
3559 \end_inset
3560
3561  simply prints out today's date.
3562 \end_layout
3563
3564 \begin_layout Standard
3565 The thicknesses of the horizontal rules drawn beneath the header and above
3566  the footer can also be modified.
3567  If you don't want one of the rules, set its thickness to 0.
3568  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3569  Use commands
3570 \family typewriter
3571  
3572 \family default
3573 like 
3574 \begin_inset Flex Code
3575 status collapsed
3576
3577 \begin_layout Plain Layout
3578
3579 \backslash
3580 renewcommand{
3581 \backslash
3582 headrulewidth}{0.4pt}
3583 \end_layout
3584
3585 \end_inset
3586
3587  and 
3588 \begin_inset Flex Code
3589 status collapsed
3590
3591 \begin_layout Plain Layout
3592
3593 \backslash
3594 renewcommand{
3595 \backslash
3596 footrulewidth}{0.4pt}
3597 \end_layout
3598
3599 \end_inset
3600
3601  to set the thicknesses.
3602 \end_layout
3603
3604 \begin_layout Standard
3605 You can switch the header/footer settings on and off for individual pages
3606  using commands like 
3607 \begin_inset Flex Code
3608 status collapsed
3609
3610 \begin_layout Plain Layout
3611
3612 \backslash
3613 thispagestyle{empty}
3614 \end_layout
3615
3616 \end_inset
3617
3618
3619 \begin_inset Flex Code
3620 status collapsed
3621
3622 \begin_layout Plain Layout
3623
3624 \backslash
3625 thispagestyle{plain}
3626 \end_layout
3627
3628 \end_inset
3629
3630 , and 
3631 \begin_inset Flex Code
3632 status collapsed
3633
3634 \begin_layout Plain Layout
3635
3636 \backslash
3637 thispagestyle{fancy}
3638 \end_layout
3639
3640 \end_inset
3641
3642 .
3643  Simply insert them in the text on the page you want changed and mark them
3644  as TeX code.
3645  In fact, title pages are marked as plain by default, while following pages
3646  are marked fancy when using the global fancy setting.
3647 \end_layout
3648
3649 \begin_layout Standard
3650 As a final example, it is possible to include an image in the header or
3651  footer.
3652  Suppose you want to put a company logo in the upper lefthand corner.
3653  You might try something like
3654 \end_layout
3655
3656 \begin_layout Standard
3657
3658 \family typewriter
3659
3660 \backslash
3661 lhead{
3662 \backslash
3663 resizebox{1in}{!}{
3664 \backslash
3665 includegraphics{logo.eps}}}
3666 \end_layout
3667
3668 \begin_layout Standard
3669 \noindent
3670 (you may need to preface this with 
3671 \begin_inset Flex Code
3672 status collapsed
3673
3674 \begin_layout Plain Layout
3675 \noindent
3676
3677 \backslash
3678 usepackage{graphics}
3679 \end_layout
3680
3681 \end_inset
3682
3683  if you don't include graphics elsewhere in your document).
3684 \end_layout
3685
3686 \begin_layout Section
3687 Itemize Bullet Selection
3688 \begin_inset CommandInset label
3689 LatexCommand label
3690 name "sec:bullet"
3691
3692 \end_inset
3693
3694
3695 \end_layout
3696
3697 \begin_layout Standard
3698 by
3699 \noun on
3700  Allan Rae
3701 \end_layout
3702
3703 \begin_layout Subsection
3704 Introduction
3705 \end_layout
3706
3707 \begin_layout Standard
3708 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3709  Using this dialog you can easily specify what bullet shape to use at each
3710  level of an itemized list.
3711  These settings are document-wide so you won't be able to specify different
3712  sets of bullets for different paragraphs.
3713 \begin_inset Foot
3714 status collapsed
3715
3716 \begin_layout Plain Layout
3717 Well, actually you can but you'll have to do it by hand.
3718 \end_layout
3719
3720 \end_inset
3721
3722
3723 \end_layout
3724
3725 \begin_layout Subsection
3726 How it looks
3727 \end_layout
3728
3729 \begin_layout Standard
3730 Open the dialog by selecting the 
3731 \begin_inset Flex MenuItem
3732 status collapsed
3733
3734 \begin_layout Plain Layout
3735 Document\SpecialChar \menuseparator
3736 Settings
3737 \end_layout
3738
3739 \end_inset
3740
3741  menu item and then select the 
3742 \begin_inset Flex MenuItem
3743 status collapsed
3744
3745 \begin_layout Plain Layout
3746 Bullets
3747 \end_layout
3748
3749 \end_inset
3750
3751  tab.
3752 \end_layout
3753
3754 \begin_layout Standard
3755 The dialog provides you with a table of bullet shapes.
3756  A column of buttons on the left of the table provides access to the six
3757  different panels of bullet shapes.
3758  The row of buttons across the top is used to select which bullet depth
3759  you are changing.
3760  A text entry under the table shows the currently selected bullet shape's
3761  LaTeX equivalent and this can be edited if desired.
3762  If you do modify the text you will also need to specify any needed packages
3763  in the LaTeX preamble.
3764 \end_layout
3765
3766 \begin_layout Standard
3767 The six panels are divided up by the packages they require.
3768  The following table shows the mappings from button name to LaTeX package.
3769 \end_layout
3770
3771 \begin_layout Standard
3772 \align center
3773 \begin_inset Tabular
3774 <lyxtabular version="3" rows="7" columns="2">
3775 <features rotate="0" tabularvalignment="middle">
3776 <column alignment="center" valignment="top" width="0pt">
3777 <column alignment="center" valignment="top" width="0pt">
3778 <row>
3779 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3780 \begin_inset Text
3781
3782 \begin_layout Plain Layout
3783
3784 \family roman
3785 \series medium
3786 \shape up
3787 \size normal
3788 \emph off
3789 \bar no
3790 \noun off
3791 \color none
3792 Button
3793 \end_layout
3794
3795 \end_inset
3796 </cell>
3797 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3798 \begin_inset Text
3799
3800 \begin_layout Plain Layout
3801
3802 \family roman
3803 \series medium
3804 \shape up
3805 \size normal
3806 \emph off
3807 \bar no
3808 \noun off
3809 \color none
3810 Packages Required
3811 \end_layout
3812
3813 \end_inset
3814 </cell>
3815 </row>
3816 <row>
3817 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3818 \begin_inset Text
3819
3820 \begin_layout Plain Layout
3821
3822 \family sans
3823 \series medium
3824 \shape up
3825 \size normal
3826 \emph off
3827 \bar no
3828 \noun off
3829 \color none
3830 Standard
3831 \end_layout
3832
3833 \end_inset
3834 </cell>
3835 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3836 \begin_inset Text
3837
3838 \begin_layout Plain Layout
3839
3840 \series medium
3841 \shape up
3842 \size normal
3843 \emph off
3844 \bar no
3845 \noun off
3846 \color none
3847 base LaTeX
3848 \end_layout
3849
3850 \end_inset
3851 </cell>
3852 </row>
3853 <row>
3854 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3855 \begin_inset Text
3856
3857 \begin_layout Plain Layout
3858
3859 \family sans
3860 \series medium
3861 \shape up
3862 \size normal
3863 \emph off
3864 \bar no
3865 \noun off
3866 \color none
3867 Maths
3868 \end_layout
3869
3870 \end_inset
3871 </cell>
3872 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3873 \begin_inset Text
3874
3875 \begin_layout Plain Layout
3876
3877 \family typewriter
3878 \series medium
3879 \shape up
3880 \size normal
3881 \emph off
3882 \bar no
3883 \noun off
3884 \color none
3885 amssymb.sty
3886 \end_layout
3887
3888 \end_inset
3889 </cell>
3890 </row>
3891 <row>
3892 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3893 \begin_inset Text
3894
3895 \begin_layout Plain Layout
3896
3897 \family sans
3898 \series medium
3899 \shape up
3900 \size normal
3901 \emph off
3902 \bar no
3903 \noun off
3904 \color none
3905 Ding1
3906 \end_layout
3907
3908 \end_inset
3909 </cell>
3910 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3911 \begin_inset Text
3912
3913 \begin_layout Plain Layout
3914
3915 \family typewriter
3916 \series medium
3917 \shape up
3918 \size normal
3919 \emph off
3920 \bar no
3921 \noun off
3922 \color none
3923 pifont.sty
3924 \end_layout
3925
3926 \end_inset
3927 </cell>
3928 </row>
3929 <row>
3930 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3931 \begin_inset Text
3932
3933 \begin_layout Plain Layout
3934
3935 \family sans
3936 \series medium
3937 \shape up
3938 \size normal
3939 \emph off
3940 \bar no
3941 \noun off
3942 \color none
3943 Ding2
3944 \end_layout
3945
3946 \end_inset
3947 </cell>
3948 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3949 \begin_inset Text
3950
3951 \begin_layout Plain Layout
3952
3953 \family typewriter
3954 \series medium
3955 \shape up
3956 \size normal
3957 \emph off
3958 \bar no
3959 \noun off
3960 \color none
3961 pifont.sty
3962 \end_layout
3963
3964 \end_inset
3965 </cell>
3966 </row>
3967 <row>
3968 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3969 \begin_inset Text
3970
3971 \begin_layout Plain Layout
3972
3973 \family sans
3974 \series medium
3975 \shape up
3976 \size normal
3977 \emph off
3978 \bar no
3979 \noun off
3980 \color none
3981 Ding3
3982 \end_layout
3983
3984 \end_inset
3985 </cell>
3986 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3987 \begin_inset Text
3988
3989 \begin_layout Plain Layout
3990
3991 \family typewriter
3992 \series medium
3993 \shape up
3994 \size normal
3995 \emph off
3996 \bar no
3997 \noun off
3998 \color none
3999 pifont.sty
4000 \end_layout
4001
4002 \end_inset
4003 </cell>
4004 </row>
4005 <row>
4006 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4007 \begin_inset Text
4008
4009 \begin_layout Plain Layout
4010
4011 \family sans
4012 \series medium
4013 \shape up
4014 \size normal
4015 \emph off
4016 \bar no
4017 \noun off
4018 \color none
4019 Ding4
4020 \end_layout
4021
4022 \end_inset
4023 </cell>
4024 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4025 \begin_inset Text
4026
4027 \begin_layout Plain Layout
4028
4029 \family typewriter
4030 \series medium
4031 \shape up
4032 \size normal
4033 \emph off
4034 \bar no
4035 \noun off
4036 \color none
4037 pifont.sty
4038 \end_layout
4039
4040 \end_inset
4041 </cell>
4042 </row>
4043 </lyxtabular>
4044
4045 \end_inset
4046
4047
4048 \end_layout
4049
4050 \begin_layout Standard
4051 LyX doesn't stop you using bullets from packages you don't have.
4052  If you get errors from LaTeX when you try to view or print the file, then
4053  it is likely you are missing a package.
4054 \begin_inset Foot
4055 status collapsed
4056
4057 \begin_layout Plain Layout
4058 LyX doesn't restrict your use since you may be editing locally and exporting
4059  elsewhere.
4060 \end_layout
4061
4062 \end_inset
4063
4064
4065 \end_layout
4066
4067 \begin_layout Subsection
4068 How to use it
4069 \end_layout
4070
4071 \begin_layout Standard
4072 Select which bullet depth you want to change then select the bullet shape
4073  and size.
4074  Any changes will not be visible in LyX, but are visible when viewing the
4075  document.
4076 \end_layout
4077
4078 \begin_layout Standard
4079 You can reset a bullet shape to the default simply by clicking your right
4080  mouse button on the appropriate bullet depth button.
4081 \begin_inset Foot
4082 status collapsed
4083
4084 \begin_layout Plain Layout
4085 If you 
4086 \emph on
4087 really
4088 \emph default
4089  want to have multiple sets of paragraphs with different sets of bullets
4090  in each, then you're going to have to get your hands dirty with TeX code.
4091  The bullet selection dialog can help though because it provides you with
4092  the LaTeX code for a wide range of bullet shapes.
4093  To make your own custom paragraphs you have the following options:
4094 \end_layout
4095
4096 \begin_layout Plain Layout
4097 \begin_inset ERT
4098 status open
4099
4100 \begin_layout Plain Layout
4101
4102
4103 \backslash
4104 let
4105 \backslash
4106 savelabelitemi=
4107 \backslash
4108 labelitemi
4109 \end_layout
4110
4111 \end_inset
4112
4113
4114 \end_layout
4115
4116 \begin_layout Plain Layout
4117 \begin_inset ERT
4118 status open
4119
4120 \begin_layout Plain Layout
4121
4122
4123 \backslash
4124 renewcommand
4125 \backslash
4126 labelitemi[0]{
4127 \backslash
4128 small
4129 \backslash
4130 (
4131 \backslash
4132 sharp
4133 \backslash
4134 )}
4135 \end_layout
4136
4137 \end_inset
4138
4139
4140 \end_layout
4141
4142 \begin_layout Itemize
4143 Use the LaTeX command 
4144 \begin_inset Flex Code
4145 status collapsed
4146
4147 \begin_layout Plain Layout
4148
4149 \backslash
4150 renewcommand{}{}
4151 \end_layout
4152
4153 \end_inset
4154
4155  to specify a new bullet shape for a given depth.
4156  You'll also need to save the current bullet shape so you can restore it
4157  again afterwards.
4158  In this itemized list the following LaTeX code was used to change the bullet
4159  used for the first depth.
4160 \end_layout
4161
4162 \begin_deeper
4163 \begin_layout LyX-Code
4164
4165 \backslash
4166 let
4167 \backslash
4168 savelabelitemi=
4169 \backslash
4170 labelitemi 
4171 \end_layout
4172
4173 \begin_layout LyX-Code
4174
4175 \backslash
4176 renewcommand
4177 \backslash
4178 labelitemi[0]{
4179 \backslash
4180 small
4181 \backslash
4182 (
4183 \backslash
4184 sharp
4185 \backslash
4186 )}
4187 \end_layout
4188
4189 \end_deeper
4190 \begin_layout Itemize
4191 Note that the itemize depth is specified in Roman numerals as part of the
4192  
4193 \family typewriter
4194
4195 \backslash
4196 labelitem
4197 \family default
4198  command.
4199 \end_layout
4200
4201 \begin_layout Itemize
4202 \begin_inset ERT
4203 status open
4204
4205 \begin_layout Plain Layout
4206
4207 [
4208 \backslash
4209 (
4210 \backslash
4211 star
4212 \backslash
4213 )]
4214 \end_layout
4215
4216 \end_inset
4217
4218  Specify each individual entry by starting each item with the bullet shape
4219  enclosed in square brackets and set as 
4220 \begin_inset Flex MenuItem
4221 status collapsed
4222
4223 \begin_layout Plain Layout
4224 TeX Code
4225 \end_layout
4226
4227 \end_inset
4228
4229 .
4230  For example, this item was started with 
4231 \begin_inset Flex Code
4232 status collapsed
4233
4234 \begin_layout Plain Layout
4235 [
4236 \backslash
4237 (
4238 \backslash
4239 star
4240 \backslash
4241 )]
4242 \end_layout
4243
4244 \end_inset
4245
4246 .
4247 \end_layout
4248
4249 \begin_layout Plain Layout
4250 \begin_inset ERT
4251 status open
4252
4253 \begin_layout Plain Layout
4254
4255
4256 \backslash
4257 renewcommand
4258 \backslash
4259 labelitemi[0]{
4260 \backslash
4261 savelabelitemi}
4262 \end_layout
4263
4264 \end_inset
4265
4266
4267 \end_layout
4268
4269 \begin_layout Plain Layout
4270 You'll also need to revert the labelitem back to its previous setting for
4271  the global bullet shape settings to remain in effect.
4272  The way used here was:
4273 \end_layout
4274
4275 \begin_layout LyX-Code
4276
4277 \backslash
4278 renewcommand
4279 \backslash
4280 labelitemi[0]{
4281 \backslash
4282 savelabelitemi}
4283 \end_layout
4284
4285 \end_inset
4286
4287
4288 \end_layout
4289
4290 \begin_layout Chapter
4291 LyX and the World Wide Web
4292 \end_layout
4293
4294 \begin_layout Standard
4295 LyX has long supported the export of documents to various web-friendly formats,
4296  such as HTML.
4297  Before verson 2.0, however, HTML export was always accomplished by the use
4298  of external converters.
4299 \begin_inset Foot
4300 status collapsed
4301
4302 \begin_layout Plain Layout
4303 For details on the use of external converters with LyX, see the 
4304 \emph on
4305 Converters
4306 \emph default
4307  section of the Customization manual.
4308 \end_layout
4309
4310 \end_inset
4311
4312  These fall into two large groups: there are converters that use LaTeX as
4313  an intermediate format, such as 
4314 \begin_inset Flex Code
4315 status collapsed
4316
4317 \begin_layout Plain Layout
4318 htlatex
4319 \end_layout
4320
4321 \end_inset
4322
4323
4324 \begin_inset Flex Code
4325 status collapsed
4326
4327 \begin_layout Plain Layout
4328 html2latex
4329 \end_layout
4330
4331 \end_inset
4332
4333 , and 
4334 \begin_inset Flex Code
4335 status collapsed
4336
4337 \begin_layout Plain Layout
4338 plastex
4339 \end_layout
4340
4341 \end_inset
4342
4343 , relying upon LyX to produce the LaTeX; and there is a converter that works
4344  directly on LyX files, 
4345 \begin_inset Flex Code
4346 status collapsed
4347
4348 \begin_layout Plain Layout
4349 eLyXer
4350 \end_layout
4351
4352 \end_inset
4353
4354 .
4355  All of these have different advantages and disadvantages.
4356  
4357 \end_layout
4358
4359 \begin_layout Standard
4360 The LaTeX-based converters have the advantage that, in principle, they know
4361  everything about the exported document that LaTeX does.
4362  Such converters do not care, for example, if a certain block of code was
4363  produced by LyX or was Evil Red Text.
4364  These converters know about 
4365 \begin_inset Flex Code
4366 status collapsed
4367
4368 \begin_layout Plain Layout
4369 aux
4370 \end_layout
4371
4372 \end_inset
4373
4374  files, counters, and references, and can often make use of the 
4375 \begin_inset Flex Code
4376 status collapsed
4377
4378 \begin_layout Plain Layout
4379 bbl
4380 \end_layout
4381
4382 \end_inset
4383
4384  files generated by BibTeX.
4385  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4386  said that only TeX itself understands TeX---and LaTeX-based converters
4387  will often choke on what seem to be quite simple constructs; complex ones
4388  can throw them completely, and as of this writing, for example, the 
4389 \emph on
4390 Embedded Objects
4391 \emph default
4392  manual will not export with 
4393 \begin_inset Flex Code
4394 status collapsed
4395
4396 \begin_layout Plain Layout
4397 htlatex
4398 \end_layout
4399
4400 \end_inset
4401
4402 , though the others will.
4403  The other issue concerns how math is handled.
4404  These converters typically convert the formulae into little pictures that
4405  are then linked from the HTML document.
4406  Since these are actually generated by LaTeX, they are accurate.
4407  But they do not scale well, and just getting them to look as if they are
4408  actually meant to be in your document---so that the font sizes seem to
4409  be roughly the same---can be a challenge.
4410 \end_layout
4411
4412 \begin_layout Standard
4413 Alex Fernandez's 
4414 \begin_inset Flex Code
4415 status collapsed
4416
4417 \begin_layout Plain Layout
4418 eLyXer
4419 \end_layout
4420
4421 \end_inset
4422
4423  (
4424 \begin_inset CommandInset href
4425 LatexCommand href
4426 name "http://elyxer.nongnu.org/"
4427 target "http://elyxer.nongnu.org/"
4428
4429 \end_inset
4430
4431 ) solves some of these problems.
4432  In particular, the formulae it produces scale perfectly, since it renders
4433  math using a combination of HTML and CSS rather than converting the formulae
4434  to images.
4435  But even moderately complex formula are rendered less well than with 
4436 \begin_inset Flex Code
4437 status collapsed
4438
4439 \begin_layout Plain Layout
4440 htlatex
4441 \end_layout
4442
4443 \end_inset
4444
4445 ; this reflects the limitations of HTML.
4446 \begin_inset Foot
4447 status collapsed
4448
4449 \begin_layout Plain Layout
4450 That said, 
4451 \begin_inset Flex Code
4452 status collapsed
4453
4454 \begin_layout Plain Layout
4455 eLyXer
4456 \end_layout
4457
4458 \end_inset
4459
4460  can also use jsMath and MathJax for equations, but this setting is only
4461  available globally and requires one to have access to a server that runs
4462  the backend.
4463 \end_layout
4464
4465 \end_inset
4466
4467  More importantly (as of version 1.1.1, at least), 
4468 \begin_inset Flex Code
4469 status collapsed
4470
4471 \begin_layout Plain Layout
4472 eLyXer
4473 \end_layout
4474
4475 \end_inset
4476
4477  has limited support for math macros and no support for user-defined paragraph
4478  or character styles.
4479  These limitations make 
4480 \begin_inset Flex Code
4481 status collapsed
4482
4483 \begin_layout Plain Layout
4484 eLyXer
4485 \end_layout
4486
4487 \end_inset
4488
4489  unsuitable for many of the documents LyX users produce.
4490  In principle, of course, these problems could be solved, but the LyX developers
4491  have decided to follow a different path and have made LyX itself capable
4492  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4493  plaintext.
4494 \end_layout
4495
4496 \begin_layout Standard
4497 As of this writing, XHTML output remains under development and should probably
4498  be regarded as 
4499 \begin_inset Quotes eld
4500 \end_inset
4501
4502 experimental
4503 \begin_inset Quotes erd
4504 \end_inset
4505
4506 .
4507 \begin_inset Foot
4508 status collapsed
4509
4510 \begin_layout Plain Layout
4511 The file 
4512 \begin_inset Flex Code
4513 status collapsed
4514
4515 \begin_layout Plain Layout
4516 development/HTML.notes
4517 \end_layout
4518
4519 \end_inset
4520
4521 , which can be found in the LyX source tree or 
4522 \begin_inset CommandInset href
4523 LatexCommand href
4524 name "accessed online"
4525 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4526
4527 \end_inset
4528
4529 , usually contains up-to-date information about the state of XHTML output.
4530  See also the list of XHTML bugs on 
4531 \begin_inset CommandInset href
4532 LatexCommand href
4533 name "the bug tracker"
4534 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4535
4536 \end_inset
4537
4538 .
4539 \end_layout
4540
4541 \end_inset
4542
4543  Still, the developers have chosen this approach because it has several
4544  potential advantages over the other two.
4545 \end_layout
4546
4547 \begin_layout Standard
4548 These advantages are primarily due to the fact that the XHTML output routines,
4549  since they are part of LyX, know everything LyX knows about the document
4550  being exported.
4551 \begin_inset Foot
4552 status collapsed
4553
4554 \begin_layout Plain Layout
4555 Another advantage is that, since these routines are internal to LyX, they
4556  are immune to changes in LyX's file format, or to changes in the semantics
4557  of existing insets.
4558 \end_layout
4559
4560 \end_inset
4561
4562  So they know about the table of contents (as displayed in the outline),
4563  about the counters associated with different paragraph styles, and about
4564  user-defined styles.
4565  The XHTML output routines know what LyX knows about internationalization,
4566  too, so they will output 
4567 \begin_inset Quotes eld
4568 \end_inset
4569
4570 Chapter 1
4571 \begin_inset Quotes erd
4572 \end_inset
4573
4574  or 
4575 \begin_inset Quotes eld
4576 \end_inset
4577
4578
4579 \lang ngerman
4580 Kapitel
4581 \lang english
4582  1
4583 \begin_inset Quotes erd
4584 \end_inset
4585
4586 , depending upon the language in effect at the time.
4587  
4588 \end_layout
4589
4590 \begin_layout Standard
4591 Quite generally, the output routines know what LyX knows about document
4592  layout, that is, about how the document is to be rendered on screen.
4593  We use this information when we output the document as XHTML.
4594  In particular, LyX 
4595 \emph on
4596 automatically
4597 \emph default
4598  generates CSS style information corresponding to the layout information
4599  it uses to render the document on screen: if section headings are supposed
4600  to be sans-serif and bold as seen in LyX, then (by default) they will be
4601  sans-serif and bold when viewed in a web browser, too.
4602  And this is true not just for pre-defined styles, like Section, but for
4603  any style, including user-defined styles.
4604  Indeed, the XHTML output routines make no distinction between user-defined
4605  paragraph and character styles and LyX's own pre-defined styles: in each
4606  case, everything LyX knows about the styles is contained in the layout
4607  files.
4608  And much the same is true as regards pre-defined textual insets, such as
4609  footnotes, and various custom insets.
4610  
4611 \end_layout
4612
4613 \begin_layout Standard
4614 The result is that XHTML output can be customized and extended in exactly
4615  the same way LaTeX output can be customized and extended: through layout
4616  files and modules.
4617  See chapter five of the 
4618 \emph on
4619 Customization 
4620 \emph default
4621 manual for the details.
4622 \end_layout
4623
4624 \begin_layout Standard
4625 The remainder of this chapter contains more detailed information on XHTML
4626  output, its limitations, and ways to work around those limitations.
4627 \end_layout
4628
4629 \begin_layout Section
4630 Math Output in XHTML
4631 \end_layout
4632
4633 \begin_layout Standard
4634 LyX offers four choices for how math is rendered.
4635  These have various advantages and disadvantages:
4636 \end_layout
4637
4638 \begin_layout Itemize
4639 MathML
4640 \begin_inset Newline newline
4641 \end_inset
4642
4643 MathML is a dialect of XML designed specifically for mathematics on the
4644  web, and it typically renders very well in browsers that support it.
4645  The disadvantage is that not all browsers support MathML, and support is
4646  not complete even in the Gecko-based browsers, such as Firefox.
4647 \begin_inset Newline newline
4648 \end_inset
4649
4650 If LyX is unable to render a formula as MathML---for example, if the formula
4651  uses the 
4652 \begin_inset Flex Code
4653 status collapsed
4654
4655 \begin_layout Plain Layout
4656 xymatrix
4657 \end_layout
4658
4659 \end_inset
4660
4661  package or ERT---then it will instead output the formula as an image.
4662  
4663 \end_layout
4664
4665 \begin_layout Itemize
4666 HTML
4667 \begin_inset Newline newline
4668 \end_inset
4669
4670 As mentioned above, 
4671 \begin_inset Flex Code
4672 status collapsed
4673
4674 \begin_layout Plain Layout
4675 elyxer
4676 \end_layout
4677
4678 \end_inset
4679
4680  outputs math as HTML, styled by CSS.
4681 \begin_inset Foot
4682 status collapsed
4683
4684 \begin_layout Plain Layout
4685 LyX has borrowed some of the CSS for its HTML output from 
4686 \begin_inset Flex Code
4687 status collapsed
4688
4689 \begin_layout Plain Layout
4690 elyxer
4691 \end_layout
4692
4693 \end_inset
4694
4695 .
4696 \end_layout
4697
4698 \end_inset
4699
4700  For simple formulae, this can work quite well, though with more complicated
4701  formulae it tends to break down.
4702  Still, this method has the advantage that it is very widely supported and
4703  so it may be appropriate for documents that contain only a little, fairly
4704  simple math.
4705 \begin_inset Newline newline
4706 \end_inset
4707
4708 If Lyx is unable to render a formula as HTML---for example, if the formula
4709  uses the 
4710 \begin_inset Flex Code
4711 status collapsed
4712
4713 \begin_layout Plain Layout
4714 xymatrix
4715 \end_layout
4716
4717 \end_inset
4718
4719  package or ERT---then it will instead output the formula as an image.
4720  
4721 \end_layout
4722
4723 \begin_layout Itemize
4724 Images
4725 \begin_inset Newline newline
4726 \end_inset
4727
4728 Like 
4729 \begin_inset Flex Code
4730 status collapsed
4731
4732 \begin_layout Plain Layout
4733 htlatex
4734 \end_layout
4735
4736 \end_inset
4737
4738 , LyX will output formulae as images, the very same images, in fact, that
4739  are used for instant preview.
4740 \begin_inset Foot
4741 status collapsed
4742
4743 \begin_layout Plain Layout
4744 Instant preview does 
4745 \emph on
4746 not 
4747 \emph default
4748 have to be on for images to be output, however.
4749 \end_layout
4750
4751 \end_inset
4752
4753  The advantage to this method is that the images are simply generated by
4754  LaTeX, so they are very accurate.
4755  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4756  so they do not scale terribly well, and one cannot copy them, etc.
4757  (As of this writing, there are also problems about equation numbering.
4758  See 
4759 \begin_inset CommandInset href
4760 LatexCommand href
4761 name "bug 6894"
4762 target "http://www.lyx.org/trac/ticket/6894"
4763
4764 \end_inset
4765
4766 .)
4767 \begin_inset Newline newline
4768 \end_inset
4769
4770 The size of the images can be controlled by setting the 
4771 \begin_inset Quotes eld
4772 \end_inset
4773
4774 Math Images Scaling
4775 \begin_inset Quotes erd
4776 \end_inset
4777
4778  parameter under 
4779 \begin_inset Flex MenuItem
4780 status collapsed
4781
4782 \begin_layout Plain Layout
4783 Document\SpecialChar \menuseparator
4784 Settings\SpecialChar \menuseparator
4785 Output
4786 \end_layout
4787
4788 \end_inset
4789
4790 .
4791 \begin_inset Foot
4792 status collapsed
4793
4794 \begin_layout Plain Layout
4795 For those who want to know, this controls the resolution of the image in
4796  dots per inch and is based upon a default of 75 dpi.
4797 \end_layout
4798
4799 \end_inset
4800
4801
4802 \begin_inset Newline newline
4803 \end_inset
4804
4805 If LyX for some reason fails to create an image for a formula (e.g., if a
4806  required LaTeX package is not installed), then it will fall back to outputing
4807  the raw LaTeX.
4808 \end_layout
4809
4810 \begin_layout Itemize
4811 LaTeX
4812 \begin_inset Newline newline
4813 \end_inset
4814
4815 Finally, LyX will happily output math as LaTeX.
4816  As well as being the output of last resort, this method can be used with
4817  such tools as 
4818 \begin_inset CommandInset href
4819 LatexCommand href
4820 name "jsMath"
4821 target "http://www.math.union.edu/~dpvc/jsMath/"
4822
4823 \end_inset
4824
4825 , which uses JavaScript to render LaTeX embedded in HTML documents.
4826  LyX wraps the LaTeX in either a 
4827 \begin_inset Flex Code
4828 status collapsed
4829
4830 \begin_layout Plain Layout
4831 span
4832 \end_layout
4833
4834 \end_inset
4835
4836  (for inline formulas) or 
4837 \begin_inset Flex Code
4838 status collapsed
4839
4840 \begin_layout Plain Layout
4841 div
4842 \end_layout
4843
4844 \end_inset
4845
4846  (for displayed formulas) with 
4847 \begin_inset Flex Code
4848 status collapsed
4849
4850 \begin_layout Plain Layout
4851 class='math'
4852 \end_layout
4853
4854 \end_inset
4855
4856 , as is required for jsMath.
4857 \end_layout
4858
4859 \begin_layout Standard
4860 One of these output methods must be selected under 
4861 \begin_inset Flex MenuItem
4862 status collapsed
4863
4864 \begin_layout Plain Layout
4865 Document\SpecialChar \menuseparator
4866 Settings\SpecialChar \menuseparator
4867 Output
4868 \end_layout
4869
4870 \end_inset
4871
4872 .
4873  By default, LyX outputs MathML.
4874  This is a document-wide setting, therefore.
4875 \end_layout
4876
4877 \begin_layout Standard
4878 Eventually, LyX will offer the user the option to select an alternate output
4879  method for a particular inset, say, one that isn't being rendered very
4880  well by MathML.
4881 \begin_inset Foot
4882 status collapsed
4883
4884 \begin_layout Plain Layout
4885 That said, since LyX falls back to images if the inset contains ERT, then
4886  one can force output as an image by putting some harmless ERT into the
4887  math, for example: 
4888 \begin_inset Formula $a=b\relax$
4889 \end_inset
4890
4891 .
4892 \end_layout
4893
4894 \end_inset
4895
4896
4897 \end_layout
4898
4899 \begin_layout Section
4900 Bibliography and Citations
4901 \end_layout
4902
4903 \begin_layout Standard
4904 XHTML output fully supports bibliographies and citations.
4905  
4906 \end_layout
4907
4908 \begin_layout Standard
4909 Citation labels are generated by the same machinery that generates LyX's
4910  on-screen labels, so the labels will look in the output much as they do
4911  in LyX, though better.
4912  If you are using numerical citations, then LyX will output numerical labels,
4913  such as [1] or [17], rather than simply showing the citation key in square
4914  brackets, as it does on-screen.
4915  If you are using author-year citations, then LyX will add lowercase letters
4916  to the years, just as BibTeX does, if it finds more than one citation for
4917  a given author-year combination.
4918  The labels will be printed with the bibliography entries.
4919  Note that there is, at present, no way to customize the appearance of the
4920  labels, for example, to choose between square brackets and parentheses.
4921 \end_layout
4922
4923 \begin_layout Standard
4924 Bibliography output is handled by the same machinery that handles the presentati
4925 on of reference information in the citation dialog, so you will see in the
4926  XHTML output pretty much what you would see if you were to look at a given
4927  entry in the citation dialog.
4928  The formatting can be customized in your layout file or, preferably, in
4929  a module.
4930  See the 
4931 \emph on
4932 Customization
4933 \emph default
4934  manual for the details.
4935 \end_layout
4936
4937 \begin_layout Standard
4938 The main defect at present is that cross-referenced information is printed
4939  with every entry with which it is associated.
4940  So you can see things like this:
4941 \end_layout
4942
4943 \begin_layout Quote
4944 Jason Stanley, 
4945 \begin_inset Quotes eld
4946 \end_inset
4947
4948 Context and Logical Form
4949 \begin_inset Quotes erd
4950 \end_inset
4951
4952 , in 
4953 \emph on
4954 Language in Context: Selected Essays
4955 \emph default
4956  (Oxford: Oxford University Press, 2007), pp.
4957  30--68.
4958 \end_layout
4959
4960 \begin_layout Quote
4961 Jason Stanley, 
4962 \begin_inset Quotes eld
4963 \end_inset
4964
4965 Semantics in Context
4966 \begin_inset Quotes erd
4967 \end_inset
4968
4969 , in 
4970 \emph on
4971 Language in Context: Selected Essays
4972 \emph default
4973  (Oxford: Oxford University Press, 2007), pp.
4974  201--30.
4975 \end_layout
4976
4977 \begin_layout Standard
4978 This should be fixed before long.
4979 \end_layout
4980
4981 \begin_layout Standard
4982 There is no support at present for sectioned bibliographies.
4983  If you have multiple bibliographies, then LyX will print the same bibliography
4984  over and over.
4985 \end_layout
4986
4987 \begin_layout Section
4988 Indexes
4989 \end_layout
4990
4991 \begin_layout Standard
4992 LyX will happily export indexes as XHTML, but with certain limitations at
4993  the moment.
4994 \end_layout
4995
4996 \begin_layout Standard
4997 Index export will be most reliable when you do not attempt to use the fancy
4998  constructs that are described in the section on indexes in the 
4999 \emph on
5000 User's Guide
5001 \emph default
5002 .
5003 \begin_inset Foot
5004 status collapsed
5005
5006 \begin_layout Plain Layout
5007 The main issue here is that LyX itself does not really handle these.
5008  It just lets you enter what you would have to enter in raw LaTeX.
5009 \end_layout
5010
5011 \end_inset
5012
5013  We'll describe how they are handled using the subsection headings from
5014  that section.
5015 \end_layout
5016
5017 \begin_layout Itemize
5018 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5019  these, but the entries must be separated by 
5020 \begin_inset Quotes eld
5021 \end_inset
5022
5023  ! 
5024 \begin_inset Quotes erd
5025 \end_inset
5026
5027 , that is, there must be spaces around the exclamation point.
5028  This is because it is otherwise too difficult to check for escaped exclamation
5029  points, ones in math, and so forth.
5030 \end_layout
5031
5032 \begin_layout Itemize
5033 Page Ranges: There is no support at all for page ranges, since these make
5034  no sense with XHMTL.
5035  Instead, you will just get two index entries, one at either end.
5036 \end_layout
5037
5038 \begin_layout Itemize
5039 Cross-referencing: There is no support for cross-referencing.
5040  If LyX finds an entry containing the 
5041 \begin_inset Quotes eld
5042 \end_inset
5043
5044 |see\SpecialChar \ldots{}
5045
5046 \begin_inset Quotes erd
5047 \end_inset
5048
5049  construct, it is just dropped, and the rest is treated as an ordinary index
5050  entry.
5051 \end_layout
5052
5053 \begin_layout Itemize
5054 Index Entry Order: LyX does support attempts to fix the sorting order.
5055  It will take what is before the first `@' it finds and use that for sorting,
5056  taking what follows the first `@' to be the actual entry.
5057  At present, LyX does not check for escaped `@', so do not try to index
5058  email addresses.
5059 \end_layout
5060
5061 \begin_layout Itemize
5062 Index Entry Layout: You can format entries by using the text style dialog,
5063  or by using any other method available within LyX itself.
5064  There is no support for constructs like: 
5065 \begin_inset Quotes eld
5066 \end_inset
5067
5068 entry|textbf
5069 \begin_inset Quotes erd
5070 \end_inset
5071
5072 .
5073  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5074  and everything that follows it.
5075 \end_layout
5076
5077 \begin_layout Itemize
5078 Multiple Indexes: There is no support for multiple indexes.
5079  Rather, all index entries will be printed as one large index.
5080  To avoid our printing several versions of the index, we print only the
5081  main index, so make sure you have one.
5082 \end_layout
5083
5084 \begin_layout Section
5085 Nomenclature and Glossary
5086 \end_layout
5087
5088 \begin_layout Standard
5089 There is at present no support for glossaries.
5090  Adding it would be fairly trivial, and welcome.
5091 \end_layout
5092
5093 \begin_layout Chapter
5094 The LyX Server
5095 \end_layout
5096
5097 \begin_layout Section
5098 Introduction
5099 \end_layout
5100
5101 \begin_layout Standard
5102 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5103  and retrieve information about the LyX internal state.
5104  This is only intended for advanced users, but they should find it useful.
5105  It is by writing to the LyX server, for example, that bibliography managers,
5106  such as JabRef, are able to 
5107 \begin_inset Quotes eld
5108 \end_inset
5109
5110 push
5111 \begin_inset Quotes erd
5112 \end_inset
5113
5114  citations to LyX.
5115 \end_layout
5116
5117 \begin_layout Section
5118 Starting the LyX Server
5119 \end_layout
5120
5121 \begin_layout Standard
5122 The LyX server works through the use of a pair of named pipes.
5123  These are usually located in 
5124 \begin_inset Flex Code
5125 status collapsed
5126
5127 \begin_layout Plain Layout
5128 UserDir
5129 \end_layout
5130
5131 \end_inset
5132
5133 , (except on Windows, where 
5134 \emph on
5135 local
5136 \emph default
5137  named pipes are special objects located in 
5138 \begin_inset Flex Code
5139 status collapsed
5140
5141 \begin_layout Plain Layout
5142
5143 \backslash
5144
5145 \backslash
5146 .
5147 \backslash
5148 pipe
5149 \end_layout
5150
5151 \end_inset
5152
5153 ) and have the names 
5154 \begin_inset Quotes eld
5155 \end_inset
5156
5157
5158 \begin_inset Flex Code
5159 status collapsed
5160
5161 \begin_layout Plain Layout
5162 lyxpipe.in
5163 \end_layout
5164
5165 \end_inset
5166
5167
5168 \begin_inset Quotes erd
5169 \end_inset
5170
5171  and 
5172 \begin_inset Quotes eld
5173 \end_inset
5174
5175
5176 \begin_inset Flex Code
5177 status collapsed
5178
5179 \begin_layout Plain Layout
5180 lyxpipe.out
5181 \end_layout
5182
5183 \end_inset
5184
5185
5186 \begin_inset Quotes erd
5187 \end_inset
5188
5189 .
5190  External programs write into 
5191 \begin_inset Flex Code
5192 status collapsed
5193
5194 \begin_layout Plain Layout
5195 lyxpipe.in
5196 \end_layout
5197
5198 \end_inset
5199
5200  and read back data from 
5201 \begin_inset Flex Code
5202 status collapsed
5203
5204 \begin_layout Plain Layout
5205 lyxpipe.out
5206 \end_layout
5207
5208 \end_inset
5209
5210 .
5211  The stem of the pipe names can be defined in the 
5212 \begin_inset Flex MenuItem
5213 status collapsed
5214
5215 \begin_layout Plain Layout
5216 Tools\SpecialChar \menuseparator
5217 Preferences
5218 \end_layout
5219
5220 \end_inset
5221
5222  dialog, for example 
5223 \begin_inset Flex Code
5224 status collapsed
5225
5226 \begin_layout Plain Layout
5227 "/home/myhome/lyxpipe"
5228 \end_layout
5229
5230 \end_inset
5231
5232 , or 
5233 \begin_inset Flex Code
5234 status collapsed
5235
5236 \begin_layout Plain Layout
5237 "
5238 \backslash
5239
5240 \backslash
5241 .
5242 \backslash
5243 pipe
5244 \backslash
5245 lyxpipe"
5246 \end_layout
5247
5248 \end_inset
5249
5250  on Windows (but any working path can be used).
5251  You 
5252 \emph on
5253 must
5254 \emph default
5255  configure this manually in order for the server to start.
5256 \end_layout
5257
5258 \begin_layout Standard
5259 LyX will add the '
5260 \begin_inset Flex Code
5261 status collapsed
5262
5263 \begin_layout Plain Layout
5264 .in
5265 \end_layout
5266
5267 \end_inset
5268
5269 ' and '
5270 \begin_inset Flex Code
5271 status collapsed
5272
5273 \begin_layout Plain Layout
5274 .out
5275 \end_layout
5276
5277 \end_inset
5278
5279 ' to create the pipes.
5280  If one of the pipes already exists, LyX will assume that another LyX process
5281  is already running and will not start the server.
5282  On POSIX (Unix like) systems, if for some other reason, an unused 
5283 \begin_inset Quotes eld
5284 \end_inset
5285
5286 stale
5287 \begin_inset Quotes erd
5288 \end_inset
5289
5290  pipe is left in existence when LyX closes, then LyX will try to delete
5291  it.
5292  If this fails for some reason, you will need to delete the pipes manually
5293  and then restart LyX.
5294  On Windows, pipes are deleted by the OS on program termination or crash,
5295  so 
5296 \begin_inset Quotes eld
5297 \end_inset
5298
5299 stale
5300 \begin_inset Quotes erd
5301 \end_inset
5302
5303  pipes should not be possible.
5304 \end_layout
5305
5306 \begin_layout Standard
5307 To have several LyX processes with servers at the same time, you have to
5308  use different configurations, perhaps by using separate user directories,
5309  each with its own 
5310 \begin_inset Flex Code
5311 status collapsed
5312
5313 \begin_layout Plain Layout
5314 preferences
5315 \end_layout
5316
5317 \end_inset
5318
5319  file, for each process.
5320 \end_layout
5321
5322 \begin_layout Standard
5323 If you are developing a client program, you might find it useful to enable
5324  debugging information from the LyX server.
5325  Do this by starting LyX as 
5326 \begin_inset Flex Code
5327 status collapsed
5328
5329 \begin_layout Plain Layout
5330 lyx -dbg lyxserver
5331 \end_layout
5332
5333 \end_inset
5334
5335 .
5336 \end_layout
5337
5338 \begin_layout Standard
5339 You can find a complete example client written in C in the source distribution
5340  as 
5341 \begin_inset Flex Code
5342 status collapsed
5343
5344 \begin_layout Plain Layout
5345 development/lyxserver/server_monitor.c
5346 \end_layout
5347
5348 \end_inset
5349
5350 .
5351 \end_layout
5352
5353 \begin_layout Standard
5354 Another useful tool is the command-line based clientfound in 
5355 \begin_inset Flex Code
5356 status collapsed
5357
5358 \begin_layout Plain Layout
5359 src/client/lyxclient
5360 \end_layout
5361
5362 \end_inset
5363
5364 .
5365 \end_layout
5366
5367 \begin_layout Section
5368 Normal communication
5369 \end_layout
5370
5371 \begin_layout Standard
5372 To issue a LyX call, the client writes a line of ASCII text into the input
5373  pipe.
5374  This line has the following format:
5375 \end_layout
5376
5377 \begin_layout Quote
5378 LYXCMD:
5379 \emph on
5380 clientname
5381 \emph default
5382 :
5383 \emph on
5384 function
5385 \emph default
5386 :
5387 \emph on
5388 argument
5389 \end_layout
5390
5391 \begin_layout Description
5392 clientname is a name that the client can choose arbitrarily.
5393  Its only use is that LyX will echo it if it sends an answer—so a client
5394  can dispatch results from different requesters.
5395 \end_layout
5396
5397 \begin_layout Description
5398 function is the function you want LyX to perform.
5399  It is the same as the commands you'd use in the minibuffer.
5400 \end_layout
5401
5402 \begin_layout Description
5403 argument is an optional argument which is meaningful only to some functions
5404  (for instance, the 
5405 \begin_inset Quotes eld
5406 \end_inset
5407
5408 self-insert
5409 \begin_inset Quotes erd
5410 \end_inset
5411
5412  LFUN will insert the argument as text at the cursor position).
5413 \end_layout
5414
5415 \begin_layout Standard
5416 The answer from LyX will arrive in the output pipe and be of the form
5417 \end_layout
5418
5419 \begin_layout Quote
5420 INFO:
5421 \emph on
5422 clientname
5423 \emph default
5424 :
5425 \emph on
5426 function
5427 \emph default
5428 :
5429 \emph on
5430 data
5431 \end_layout
5432
5433 \begin_layout Standard
5434 where 
5435 \emph on
5436 clientname
5437 \emph default
5438  and 
5439 \emph on
5440 function
5441 \emph default
5442  are just echoed from the command request, while 
5443 \emph on
5444 data
5445 \emph default
5446  is more or less useful information filled according to how the command
5447  execution worked out.
5448  Some commands, such as 
5449 \begin_inset Quotes eld
5450 \end_inset
5451
5452 font-state
5453 \begin_inset Quotes erd
5454 \end_inset
5455
5456 , will return information about the internal state of LyX, while other will
5457  return an empty data-response.
5458  This means that the command execution went fine.
5459 \end_layout
5460
5461 \begin_layout Standard
5462 In case of errors, the response from LyX will have this form
5463 \end_layout
5464
5465 \begin_layout Quote
5466 ERROR:
5467 \emph on
5468 clientname
5469 \emph default
5470 :
5471 \emph on
5472 function
5473 \emph default
5474 :
5475 \emph on
5476 error message
5477 \end_layout
5478
5479 \begin_layout Standard
5480 where the 
5481 \emph on
5482 error message
5483 \emph default
5484  should contain an explanation of why the command failed.
5485 \end_layout
5486
5487 \begin_layout Standard
5488 Examples:
5489 \end_layout
5490
5491 \begin_layout LyX-Code
5492 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5493 \begin_inset Newline newline
5494 \end_inset
5495
5496 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5497 \begin_inset Newline newline
5498 \end_inset
5499
5500 read a <~/.lyxpipe.out
5501 \begin_inset Newline newline
5502 \end_inset
5503
5504 echo $a
5505 \end_layout
5506
5507 \begin_layout Section
5508 Notification
5509 \end_layout
5510
5511 \begin_layout Standard
5512 LyX can notify clients of events going on asynchronously.
5513  Currently it will only do this if the user binds a key sequence with the
5514  function 
5515 \begin_inset Quotes eld
5516 \end_inset
5517
5518 notify
5519 \begin_inset Quotes erd
5520 \end_inset
5521
5522 .
5523  The format of the string LyX sends is as follows:
5524 \end_layout
5525
5526 \begin_layout Quote
5527 \begin_inset Flex Code
5528 status collapsed
5529
5530 \begin_layout Plain Layout
5531 NOTIFY:
5532 \end_layout
5533
5534 \end_inset
5535
5536
5537 \emph on
5538 key-sequence
5539 \end_layout
5540
5541 \begin_layout Standard
5542 where 
5543 \emph on
5544 key-sequence
5545 \emph default
5546  is the printed representation of the key sequence that was actually typed
5547  by the user.
5548 \end_layout
5549
5550 \begin_layout Standard
5551 This mechanism can be used to extend LyX's command set and implement macros.
5552  Bind some key sequence to 
5553 \begin_inset Quotes eld
5554 \end_inset
5555
5556 notify
5557 \begin_inset Quotes erd
5558 \end_inset
5559
5560 .
5561  Then start a client that listens on the output pipe, dispatches the command
5562  according to the sequence, and starts a function that may use LyX calls
5563  and LyX requests to issue a command or a series of commands to LyX.
5564 \end_layout
5565
5566 \begin_layout Section
5567 The simple LyX Server Protocol
5568 \end_layout
5569
5570 \begin_layout Standard
5571 LyX implements a simple protocol that can be used for session management.
5572  All messages are of the form
5573 \end_layout
5574
5575 \begin_layout Quote
5576 LYXSRV:
5577 \emph on
5578 clientname
5579 \emph default
5580 :
5581 \emph on
5582 protocol message
5583 \end_layout
5584
5585 \begin_layout Standard
5586 where 
5587 \emph on
5588 protocol message
5589 \emph default
5590  can be 
5591 \begin_inset Quotes eld
5592 \end_inset
5593
5594 hello
5595 \begin_inset Quotes erd
5596 \end_inset
5597
5598  or 
5599 \begin_inset Quotes eld
5600 \end_inset
5601
5602 bye
5603 \begin_inset Quotes erd
5604 \end_inset
5605
5606 .
5607  If 
5608 \begin_inset Quotes eld
5609 \end_inset
5610
5611 hello
5612 \begin_inset Quotes erd
5613 \end_inset
5614
5615  is received from a client, LyX will report back to inform the client that
5616  it's listening to it's messages, while 
5617 \begin_inset Quotes eld
5618 \end_inset
5619
5620 bye
5621 \begin_inset Quotes erd
5622 \end_inset
5623
5624  sent from LyX will inform clients that LyX is closing.
5625 \end_layout
5626
5627 \begin_layout Section
5628 Reverse DVI/PDF search
5629 \end_layout
5630
5631 \begin_layout Standard
5632 Some DVI/PDF viewers
5633 \begin_inset Foot
5634 status collapsed
5635
5636 \begin_layout Plain Layout
5637 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5638  Skim on Mac OSX and SumatraPDF on Windows.
5639 \end_layout
5640
5641 \end_inset
5642
5643  provide 
5644 \emph on
5645 reverse search
5646 \emph default
5647  facility (also called 
5648 \emph on
5649 inverse search
5650 \emph default
5651 ).
5652  This means that you can tell LyX to put the cursor to a specific line in
5653  the document by clicking at the respective position in the DVI/PDF output.
5654  To achieve this, the viewer must be able to communicate with LyX.
5655  This is done via the LyX server either by using the named pipe (
5656 \emph on
5657 lyxpipe
5658 \emph default
5659 ), or the UNIX domain socket (
5660 \emph on
5661 lyxsocket
5662 \emph default
5663 ) that LyX creates in its temporary directory (this is the way the 
5664 \begin_inset Flex Code
5665 status collapsed
5666
5667 \begin_layout Plain Layout
5668 lyxclient
5669 \end_layout
5670
5671 \end_inset
5672
5673  program communicates with LyX).
5674  In some cases, you need a helper script that mediates between the viewer
5675  and LyX, in others, the viewer can communicate with LyX directly.
5676  This depends on the selected viewer and on your operating system.
5677  The same applies to the way viewers need to be configured and the way the
5678  reverse search is actually performed.
5679  In what follows, we will thus describe how to setup reverse search for
5680  specific viewers.
5681  Before we turn to this, though, we will explain what needs to be done generally
5682  to enable reverse search in the DVI/PDF output.
5683 \end_layout
5684
5685 \begin_layout Subsection
5686 Automatic setup
5687 \begin_inset CommandInset label
5688 LatexCommand label
5689 name "sub:rev-search"
5690
5691 \end_inset
5692
5693
5694 \end_layout
5695
5696 \begin_layout Standard
5697 In most cases LyX will do the work for you by enabling the option 
5698 \begin_inset Flex MenuItem
5699 status collapsed
5700
5701 \begin_layout Plain Layout
5702 Synchronize with Output
5703 \end_layout
5704
5705 \end_inset
5706
5707  in the menu 
5708 \begin_inset Flex MenuItem
5709 status collapsed
5710
5711 \begin_layout Plain Layout
5712 Document\SpecialChar \menuseparator
5713 Settings\SpecialChar \menuseparator
5714 Output
5715 \end_layout
5716
5717 \end_inset
5718
5719 .
5720  In such a case LyX will automatically insert the necessary SyncTeX macro
5721  (for PDF) or load the srcltx package (for DVI) respectively.
5722  This option can be easily reached also on 
5723 \begin_inset Flex Code
5724 status collapsed
5725
5726 \begin_layout Plain Layout
5727 View/Update
5728 \end_layout
5729
5730 \end_inset
5731
5732  Toolbar.
5733 \end_layout
5734
5735 \begin_layout Standard
5736 If you need a different setting, you can select or input a custom macro
5737  from the drop down box just below 
5738 \begin_inset Flex MenuItem
5739 status collapsed
5740
5741 \begin_layout Plain Layout
5742 Document\SpecialChar \menuseparator
5743 Settings\SpecialChar \menuseparator
5744 Output\SpecialChar \menuseparator
5745 Synchronize with Output
5746 \end_layout
5747
5748 \end_inset
5749
5750 .
5751 \end_layout
5752
5753 \begin_layout Standard
5754 Note that the method 
5755 \begin_inset Flex Code
5756 status collapsed
5757
5758 \begin_layout Plain Layout
5759
5760 \backslash
5761 synctex=1
5762 \end_layout
5763
5764 \end_inset
5765
5766  enables gzip compression.
5767  If your viewer does not support it, you should instead use 
5768 \begin_inset Flex Code
5769 status collapsed
5770
5771 \begin_layout Plain Layout
5772
5773 \backslash
5774 synctex=-1
5775 \end_layout
5776
5777 \end_inset
5778
5779 .
5780 \end_layout
5781
5782 \begin_layout Standard
5783 Please aöso note that including the 
5784 \begin_inset Flex Code
5785 status collapsed
5786
5787 \begin_layout Plain Layout
5788 srcltx
5789 \end_layout
5790
5791 \end_inset
5792
5793  package or 
5794 \begin_inset Flex Code
5795 status collapsed
5796
5797 \begin_layout Plain Layout
5798 src-specials
5799 \end_layout
5800
5801 \end_inset
5802
5803  sometimes has an undesired impact on the typesetting.
5804  Thus, you should switch output synchronization off for the final typesetting
5805  if you use the 
5806 \begin_inset Flex Code
5807 status collapsed
5808
5809 \begin_layout Plain Layout
5810 srcltx
5811 \end_layout
5812
5813 \end_inset
5814
5815  package or 
5816 \begin_inset Flex Code
5817 status collapsed
5818
5819 \begin_layout Plain Layout
5820 src-specials
5821 \end_layout
5822
5823 \end_inset
5824
5825 .
5826  
5827 \end_layout
5828
5829 \begin_layout Standard
5830 In case you need some more special settings that are not covered by the
5831  automatic settings, read the next section about how to set up output synchroniz
5832 ation manually.
5833  If the automatic setup suits your needs, you can readily jump to section
5834 \begin_inset space ~
5835 \end_inset
5836
5837
5838 \begin_inset CommandInset ref
5839 LatexCommand ref
5840 reference "sub:configuring-viewers"
5841
5842 \end_inset
5843
5844 , where the necessary configuration steps in your viewer -- needed both
5845  with the automatic and the manual setup -- are described.
5846 \end_layout
5847
5848 \begin_layout Subsection
5849 Manual setup
5850 \end_layout
5851
5852 \begin_layout Standard
5853 LaTeX provides several different methods for reverse search.
5854  Some are built-in in the 
5855 \begin_inset Flex Code
5856 status collapsed
5857
5858 \begin_layout Plain Layout
5859 latex/pdflatex
5860 \end_layout
5861
5862 \end_inset
5863
5864  program, some are provided by external packages.
5865  Your choice depends on whether your LaTeX distribution already provides
5866  a given method (the built-in methods are rather new) and whether your viewer
5867  can cope with it.
5868  The available methods are described in the following.
5869 \end_layout
5870
5871 \begin_layout Subsubsection*
5872 Built-in DVI-search via src-specials (DVI only) 
5873 \end_layout
5874
5875 \begin_layout Standard
5876 This method provides the DVI file with the necessary information for reverse
5877  search.
5878  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5879  distribution should include it), and it works reliably.
5880  To enable it, change the 
5881 \begin_inset Flex MenuItem
5882 status collapsed
5883
5884 \begin_layout Plain Layout
5885 LaT
5886 \begin_inset ERT
5887 status collapsed
5888
5889 \begin_layout Plain Layout
5890
5891 {}
5892 \end_layout
5893
5894 \end_inset
5895
5896 eX (plain)->DVI
5897 \end_layout
5898
5899 \end_inset
5900
5901  or 
5902 \begin_inset Flex MenuItem
5903 status collapsed
5904
5905 \begin_layout Plain Layout
5906 LaT
5907 \begin_inset ERT
5908 status collapsed
5909
5910 \begin_layout Plain Layout
5911
5912 {}
5913 \end_layout
5914
5915 \end_inset
5916
5917 eX (plain)->DraftDVI
5918 \end_layout
5919
5920 \end_inset
5921
5922  converter in 
5923 \begin_inset Flex MenuItem
5924 status collapsed
5925
5926 \begin_layout Plain Layout
5927 Preferences\SpecialChar \menuseparator
5928 File Handling\SpecialChar \menuseparator
5929 Converters
5930 \end_layout
5931
5932 \end_inset
5933
5934  to 
5935 \begin_inset Flex Code
5936 status collapsed
5937
5938 \begin_layout Plain Layout
5939 latex -src-specials $$i
5940 \end_layout
5941
5942 \end_inset
5943
5944 .
5945  If this doesn't work, check if your TeX engine needs different options
5946  (the syntax might differ in some distributions).
5947 \end_layout
5948
5949 \begin_layout Subsubsection*
5950 External Packages (PDFSync and scrltx) 
5951 \end_layout
5952
5953 \begin_layout Standard
5954 The packages 
5955 \emph on
5956 pdfsync
5957 \emph default
5958  and 
5959 \emph on
5960 scrltx
5961 \emph default
5962  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5963  respectively.
5964  In order to enable it, load the packages in the LyX preamble: 
5965 \end_layout
5966
5967 \begin_layout Itemize
5968 \begin_inset Flex Code
5969 status collapsed
5970
5971 \begin_layout Plain Layout
5972
5973 \backslash
5974 usepackage{pdfsync}
5975 \end_layout
5976
5977 \end_inset
5978
5979  for reverse PDF search,
5980 \end_layout
5981
5982 \begin_layout Itemize
5983 \begin_inset Flex Code
5984 status collapsed
5985
5986 \begin_layout Plain Layout
5987
5988 \backslash
5989 usepackage[active]{srcltx}
5990 \end_layout
5991
5992 \end_inset
5993
5994  for reverse DVI search.
5995 \end_layout
5996
5997 \begin_layout Standard
5998 If you want to be able to perform both DVI and PDF reverse searches, you
5999  can also insert in the preamble the following lines
6000 \end_layout
6001
6002 \begin_layout LyX-Code
6003
6004 \backslash
6005 usepackage{ifpdf}
6006 \begin_inset Newline newline
6007 \end_inset
6008
6009
6010 \backslash
6011 ifpdf
6012 \begin_inset Newline newline
6013 \end_inset
6014
6015   
6016 \backslash
6017 usepackage{pdfsync}
6018 \begin_inset Newline newline
6019 \end_inset
6020
6021
6022 \backslash
6023 else
6024 \begin_inset Newline newline
6025 \end_inset
6026
6027   
6028 \backslash
6029 usepackage[active]{srcltx}
6030 \begin_inset Newline newline
6031 \end_inset
6032
6033
6034 \backslash
6035 fi
6036 \end_layout
6037
6038 \begin_layout Standard
6039 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6040  right package will be used.
6041 \end_layout
6042
6043 \begin_layout Standard
6044 Note that PDFSync might affect the output layout of your document.
6045  It is therefore advised to disable PDFsync for final documents.
6046 \end_layout
6047
6048 \begin_layout Subsubsection*
6049 Built-in reverse search via SyncTeX (DVI and PDF) 
6050 \end_layout
6051
6052 \begin_layout Standard
6053 Recent versions of 
6054 \begin_inset Flex Code
6055 status collapsed
6056
6057 \begin_layout Plain Layout
6058 (pdf)latex
6059 \end_layout
6060
6061 \end_inset
6062
6063  have built-in support for both PDF and DVI reverse search.
6064  This so-called 
6065 \emph on
6066 SyncTeX
6067 \emph default
6068  facility is basically the result of the integration of the PDFSync package
6069  to the pdftex program and its merge with the 
6070 \emph on
6071 scr-specials
6072 \emph default
6073  approach.
6074  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6075  to use it.
6076  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6077  already provide SyncTeX support.
6078 \end_layout
6079
6080 \begin_layout Standard
6081 To enable SyncTeX for DVI output, change the 
6082 \begin_inset Flex MenuItem
6083 status collapsed
6084
6085 \begin_layout Plain Layout
6086 LaT
6087 \begin_inset ERT
6088 status collapsed
6089
6090 \begin_layout Plain Layout
6091
6092 {}
6093 \end_layout
6094
6095 \end_inset
6096
6097 eX (plain) -> DVI
6098 \end_layout
6099
6100 \end_inset
6101
6102  or 
6103 \begin_inset Flex MenuItem
6104 status collapsed
6105
6106 \begin_layout Plain Layout
6107 LaT
6108 \begin_inset ERT
6109 status collapsed
6110
6111 \begin_layout Plain Layout
6112
6113 {}
6114 \end_layout
6115
6116 \end_inset
6117
6118 eX (plain) -> DraftDVI
6119 \end_layout
6120
6121 \end_inset
6122
6123  converter in 
6124 \begin_inset Flex MenuItem
6125 status collapsed
6126
6127 \begin_layout Plain Layout
6128 Preferences\SpecialChar \menuseparator
6129 File Handling\SpecialChar \menuseparator
6130 Converters
6131 \end_layout
6132
6133 \end_inset
6134
6135  to 
6136 \begin_inset Flex Code
6137 status collapsed
6138
6139 \begin_layout Plain Layout
6140 latex -synctex=1 $$i
6141 \end_layout
6142
6143 \end_inset
6144
6145 , and for PDF output, change the 
6146 \begin_inset Flex MenuItem
6147 status collapsed
6148
6149 \begin_layout Plain Layout
6150 LaT
6151 \begin_inset ERT
6152 status collapsed
6153
6154 \begin_layout Plain Layout
6155
6156 {}
6157 \end_layout
6158
6159 \end_inset
6160
6161 eX (pdflatex) -> PDF (pdflatex)
6162 \end_layout
6163
6164 \end_inset
6165
6166  or converter to 
6167 \begin_inset Flex Code
6168 status collapsed
6169
6170 \begin_layout Plain Layout
6171 pdflatex -synctex=1 $$i
6172 \end_layout
6173
6174 \end_inset
6175
6176 .
6177  Check the documentation of your viewer whether the viewer needs to be configure
6178 d for the use with SyncTeX.
6179 \begin_inset Foot
6180 status collapsed
6181
6182 \begin_layout Plain Layout
6183 Note that the option 
6184 \begin_inset Flex Code
6185 status collapsed
6186
6187 \begin_layout Plain Layout
6188 -synctex=1
6189 \end_layout
6190
6191 \end_inset
6192
6193  option enables gzip compression.
6194  If your viewer does not support it, you should instead use 
6195 \begin_inset Flex Code
6196 status collapsed
6197
6198 \begin_layout Plain Layout
6199 -synctex=-1
6200 \end_layout
6201
6202 \end_inset
6203
6204 .
6205 \end_layout
6206
6207 \end_inset
6208
6209
6210 \end_layout
6211
6212 \begin_layout Subsection
6213 Configuring and using specific viewers
6214 \begin_inset CommandInset label
6215 LatexCommand label
6216 name "sub:configuring-viewers"
6217
6218 \end_inset
6219
6220
6221 \end_layout
6222
6223 \begin_layout Subsubsection*
6224 Xdvi (all platforms)
6225 \end_layout
6226
6227 \begin_layout Standard
6228 If you use 
6229 \begin_inset Flex Code
6230 status collapsed
6231
6232 \begin_layout Plain Layout
6233 xdvi
6234 \end_layout
6235
6236 \end_inset
6237
6238 , you don't need to do anything else for performing a reverse DVI search,
6239  as LyX already provides the necessary hooks for automatically using the
6240  
6241 \begin_inset Flex Code
6242 status collapsed
6243
6244 \begin_layout Plain Layout
6245 lyxclient
6246 \end_layout
6247
6248 \end_inset
6249
6250  program.
6251  Just setup your document as described above (reverse search is triggered
6252  by Ctrl-click or Alt-click on Mac OSX, respectively).
6253 \end_layout
6254
6255 \begin_layout Standard
6256 However, if for whatever reason you want to use the named pipe instead of
6257  the socket for communicating with LyX, simply change the DVI viewer in
6258  
6259 \begin_inset Flex MenuItem
6260 status collapsed
6261
6262 \begin_layout Plain Layout
6263 Preferences\SpecialChar \menuseparator
6264 File Handling\SpecialChar \menuseparator
6265 File formats
6266 \end_layout
6267
6268 \end_inset
6269
6270  to
6271 \begin_inset Foot
6272 status collapsed
6273
6274 \begin_layout Plain Layout
6275 On Mac OSX you have to use 
6276 \begin_inset Flex Code
6277 status collapsed
6278
6279 \begin_layout Plain Layout
6280 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6281 \end_layout
6282
6283 \end_inset
6284
6285
6286 \end_layout
6287
6288 \end_inset
6289
6290  
6291 \begin_inset Flex Code
6292 status collapsed
6293
6294 \begin_layout Plain Layout
6295 xdvi -editor 'lyxeditor.sh %f %l'
6296 \end_layout
6297
6298 \end_inset
6299
6300 , where 
6301 \begin_inset Flex Code
6302 status collapsed
6303
6304 \begin_layout Plain Layout
6305 lyxeditor.sh
6306 \end_layout
6307
6308 \end_inset
6309
6310  is a suitable script.
6311  For example, a minimal shell script is the following one:
6312 \end_layout
6313
6314 \begin_layout LyX-Code
6315 #!/bin/sh
6316 \begin_inset Newline newline
6317 \end_inset
6318
6319 LYXPIPE="/path/to/lyxpipe"
6320 \begin_inset Newline newline
6321 \end_inset
6322
6323 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6324 \begin_inset Newline newline
6325 \end_inset
6326
6327 echo "$COMMAND" > "${LYXPIPE}".in || exit
6328 \begin_inset Newline newline
6329 \end_inset
6330
6331 read < "${LYXPIPE}".out || exit
6332 \end_layout
6333
6334 \begin_layout Standard
6335 where 
6336 \begin_inset Flex Code
6337 status collapsed
6338
6339 \begin_layout Plain Layout
6340 /path/to/lyxpipe
6341 \end_layout
6342
6343 \end_inset
6344
6345  is the Ly
6346 \begin_inset ERT
6347 status collapsed
6348
6349 \begin_layout Plain Layout
6350
6351 {}
6352 \end_layout
6353
6354 \end_inset
6355
6356 XServer pipe path specified in 
6357 \begin_inset Flex MenuItem
6358 status collapsed
6359
6360 \begin_layout Plain Layout
6361 Preferences\SpecialChar \menuseparator
6362 Paths
6363 \end_layout
6364
6365 \end_inset
6366
6367 .
6368 \begin_inset Foot
6369 status collapsed
6370
6371 \begin_layout Plain Layout
6372 In the 
6373 \begin_inset Flex Code
6374 status collapsed
6375
6376 \begin_layout Plain Layout
6377 development/tools
6378 \end_layout
6379
6380 \end_inset
6381
6382  folder of a source distribution you can find a 
6383 \begin_inset Flex Code
6384 status collapsed
6385
6386 \begin_layout Plain Layout
6387 lyxeditor
6388 \end_layout
6389
6390 \end_inset
6391
6392  script which is able to locate the 
6393 \emph on
6394 lyxpipe
6395 \emph default
6396  based on your preferences.
6397 \end_layout
6398
6399 \end_inset
6400
6401
6402 \end_layout
6403
6404 \begin_layout Subsubsection*
6405 MacDviX (Mac OSX)
6406 \end_layout
6407
6408 \begin_layout Standard
6409 At the end of 
6410 \begin_inset Flex Code
6411 status collapsed
6412
6413 \begin_layout Plain Layout
6414 /Applications/MacDviX_Folder/calleditor.script
6415 \end_layout
6416
6417 \end_inset
6418
6419 , add the following lines:
6420 \end_layout
6421
6422 \begin_layout LyX-Code
6423 /Applications/Ly
6424 \begin_inset ERT
6425 status collapsed
6426
6427 \begin_layout Plain Layout
6428
6429 {}
6430 \end_layout
6431
6432 \end_inset
6433
6434 X.app/Contents/MacOS/lyxeditor "$2" $1
6435 \begin_inset Newline newline
6436 \end_inset
6437
6438 exit 1
6439 \end_layout
6440
6441 \begin_layout Standard
6442 Modify the lines accordingly if you install LyX somewhere else than in the
6443  Applications folder.
6444 \end_layout
6445
6446 \begin_layout Standard
6447 Reverse search is triggered by Alt-click (OPTION-click).
6448 \end_layout
6449
6450 \begin_layout Subsubsection*
6451 Skim (Mac OSX)
6452 \end_layout
6453
6454 \begin_layout Standard
6455 Enter 
6456 \begin_inset Flex Code
6457 status collapsed
6458
6459 \begin_layout Plain Layout
6460 open -a Skim.app $$i
6461 \end_layout
6462
6463 \end_inset
6464
6465  to the viewer setting in 
6466 \begin_inset Flex MenuItem
6467 status collapsed
6468
6469 \begin_layout Plain Layout
6470 Preferences\SpecialChar \menuseparator
6471 File Handling\SpecialChar \menuseparator
6472 File formats\SpecialChar \menuseparator
6473 PDF (pdflatex)
6474 \end_layout
6475
6476 \end_inset
6477
6478 , and then in 
6479 \begin_inset Flex MenuItem
6480 status collapsed
6481
6482 \begin_layout Plain Layout
6483 Skim\SpecialChar \menuseparator
6484 Preferences\SpecialChar \menuseparator
6485 Sync
6486 \end_layout
6487
6488 \end_inset
6489
6490  choose 
6491 \begin_inset Flex MenuItem
6492 status collapsed
6493
6494 \begin_layout Plain Layout
6495 custom
6496 \end_layout
6497
6498 \end_inset
6499
6500  preset and enter command 
6501 \begin_inset Flex MenuItem
6502 status collapsed
6503
6504 \begin_layout Plain Layout
6505 /Applications/LyX.app/Contents/MacOS/lyxeditor
6506 \end_layout
6507
6508 \end_inset
6509
6510 .
6511 \end_layout
6512
6513 \begin_layout Standard
6514 Reverse search is triggered by COMMAND-SHIFT-click
6515 \end_layout
6516
6517 \begin_layout Subsubsection*
6518 Okular (KDE)
6519 \end_layout
6520
6521 \begin_layout Standard
6522 Go to 
6523 \begin_inset Flex MenuItem
6524 status collapsed
6525
6526 \begin_layout Plain Layout
6527 Settings\SpecialChar \menuseparator
6528 Configure Okular\SpecialChar \ldots{}
6529 \SpecialChar \menuseparator
6530 Editor
6531 \end_layout
6532
6533 \end_inset
6534
6535 , select 
6536 \begin_inset Quotes eld
6537 \end_inset
6538
6539 Custom Text Editor
6540 \begin_inset Quotes erd
6541 \end_inset
6542
6543  and add the command 
6544 \begin_inset Flex Code
6545 status collapsed
6546
6547 \begin_layout Plain Layout
6548 lyxclient -g %f %l
6549 \end_layout
6550
6551 \end_inset
6552
6553 .
6554 \end_layout
6555
6556 \begin_layout Standard
6557 Reverse search is triggered by SHIFT-click.
6558 \end_layout
6559
6560 \begin_layout Subsubsection*
6561 YAP (Windows)
6562 \end_layout
6563
6564 \begin_layout Standard
6565 Launch yap, choose its 
6566 \begin_inset Flex MenuItem
6567 status collapsed
6568
6569 \begin_layout Plain Layout
6570 View\SpecialChar \menuseparator
6571 Options
6572 \end_layout
6573
6574 \end_inset
6575
6576  menu and select the 
6577 \begin_inset Quotes eld
6578 \end_inset
6579
6580 Inverse DVI Search
6581 \begin_inset Quotes erd
6582 \end_inset
6583
6584  tab.
6585  Click on the 
6586 \begin_inset Quotes eld
6587 \end_inset
6588
6589 New\SpecialChar \ldots{}
6590
6591 \begin_inset Quotes erd
6592 \end_inset
6593
6594  button and, in the window that opens, enter 
6595 \begin_inset Quotes eld
6596 \end_inset
6597
6598 LyX Editor
6599 \begin_inset Quotes erd
6600 \end_inset
6601
6602  (or any other name you like) in the 
6603 \begin_inset Quotes eld
6604 \end_inset
6605
6606 Name:
6607 \begin_inset Quotes erd
6608 \end_inset
6609
6610  field.
6611  Now click on the button labeled 
6612 \begin_inset Quotes eld
6613 \end_inset
6614
6615 \SpecialChar \ldots{}
6616
6617 \begin_inset Quotes erd
6618 \end_inset
6619
6620  to open a file dialog and navigate to the directory containing the batch
6621  file 
6622 \begin_inset Flex Code
6623 status collapsed
6624
6625 \begin_layout Plain Layout
6626 lyxeditor.bat
6627 \end_layout
6628
6629 \end_inset
6630
6631  (see below).
6632  Select 
6633 \begin_inset Flex Code
6634 status collapsed
6635
6636 \begin_layout Plain Layout
6637 lyxeditor.bat
6638 \end_layout
6639
6640 \end_inset
6641
6642  and then specify the program arguments as 
6643 \begin_inset Flex Code
6644 status collapsed
6645
6646 \begin_layout Plain Layout
6647 %f %l
6648 \end_layout
6649
6650 \end_inset
6651
6652 .
6653  The 
6654 \begin_inset Flex Code
6655 status collapsed
6656
6657 \begin_layout Plain Layout
6658 lyxeditor.bat
6659 \end_layout
6660
6661 \end_inset
6662
6663  wrapper is used for communicating with LyX through the 
6664 \emph on
6665 lyxpipe
6666 \emph default
6667  and is as follows:
6668 \end_layout
6669
6670 \begin_layout LyX-Code
6671 @echo off
6672 \begin_inset Newline newline
6673 \end_inset
6674
6675 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6676 \backslash
6677
6678 \backslash
6679 .
6680 \backslash
6681 pipe
6682 \backslash
6683 lyxpipe.in
6684 \begin_inset Newline newline
6685 \end_inset
6686
6687 type 
6688 \backslash
6689
6690 \backslash
6691 .
6692 \backslash
6693 pipe
6694 \backslash
6695 lyxpipe.out
6696 \end_layout
6697
6698 \begin_layout Standard
6699 Make sure that the LyXServer pipe path you specified in LyX is 
6700 \begin_inset Flex Code
6701 status collapsed
6702
6703 \begin_layout Plain Layout
6704
6705 \backslash
6706
6707 \backslash
6708 .
6709 \backslash
6710 pipe
6711 \backslash
6712 lyxpipe
6713 \end_layout
6714
6715 \end_inset
6716
6717 , otherwise change the 
6718 \begin_inset Flex Code
6719 status collapsed
6720
6721 \begin_layout Plain Layout
6722 lyxeditor.bat
6723 \end_layout
6724
6725 \end_inset
6726
6727  wrapper accordingly.
6728 \end_layout
6729
6730 \begin_layout Standard
6731 In yap, reverse search is triggered by double-click.
6732 \end_layout
6733
6734 \begin_layout Subsubsection*
6735 SumatraPDF (Windows)
6736 \end_layout
6737
6738 \begin_layout Standard
6739 In order to use SumatraPDF for inverse search, enter 
6740 \begin_inset Flex Code
6741 status collapsed
6742
6743 \begin_layout Plain Layout
6744 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6745 \end_layout
6746
6747 \end_inset
6748
6749  in the viewer setting in 
6750 \begin_inset Flex MenuItem
6751 status collapsed
6752
6753 \begin_layout Plain Layout
6754 Preferences\SpecialChar \menuseparator
6755 File Handling\SpecialChar \menuseparator
6756 File formats\SpecialChar \menuseparator
6757 PDF (pdflatex)
6758 \end_layout
6759
6760 \end_inset
6761
6762 , where 
6763 \begin_inset Flex Code
6764 status collapsed
6765
6766 \begin_layout Plain Layout
6767 lyxeditor.bat
6768 \end_layout
6769
6770 \end_inset
6771
6772  is the previous wrapper.
6773  If SumatraPDF.exe is not in your command PATH, use its full file name.
6774 \end_layout
6775
6776 \begin_layout Standard
6777 Reverse search is triggered by double-click.
6778 \end_layout
6779
6780 \begin_layout Subsubsection*
6781 YAP (Cygwin)
6782 \end_layout
6783
6784 \begin_layout Standard
6785 First of all, make sure that yap is your default DVI viewer in the Windows
6786  environment, then launch it, choose its 
6787 \begin_inset Flex MenuItem
6788 status collapsed
6789
6790 \begin_layout Plain Layout
6791 View\SpecialChar \menuseparator
6792 Options
6793 \end_layout
6794
6795 \end_inset
6796
6797  menu and select the 
6798 \begin_inset Quotes eld
6799 \end_inset
6800
6801 Inverse DVI Search
6802 \begin_inset Quotes erd
6803 \end_inset
6804
6805  tab.
6806  Click on the 
6807 \begin_inset Quotes eld
6808 \end_inset
6809
6810 New\SpecialChar \ldots{}
6811
6812 \begin_inset Quotes erd
6813 \end_inset
6814
6815  button and, in the window that opens, enter 
6816 \begin_inset Quotes eld
6817 \end_inset
6818
6819 LyX Editor
6820 \begin_inset Quotes erd
6821 \end_inset
6822
6823  (or any other name you like) in the 
6824 \begin_inset Quotes eld
6825 \end_inset
6826
6827 Name:
6828 \begin_inset Quotes erd
6829 \end_inset
6830
6831  field.
6832  Now click on the button labeled 
6833 \begin_inset Quotes eld
6834 \end_inset
6835
6836 \SpecialChar \ldots{}
6837
6838 \begin_inset Quotes erd
6839 \end_inset
6840
6841  to open a file dialog and navigate to the directory containing the 
6842 \begin_inset Flex Code
6843 status collapsed
6844
6845 \begin_layout Plain Layout
6846 lyxeditor.exe
6847 \end_layout
6848
6849 \end_inset
6850
6851  program (which is installed by default on Cygwin along with the LyX executable).
6852  Select 
6853 \begin_inset Flex Code
6854 status collapsed
6855
6856 \begin_layout Plain Layout
6857 lyxeditor.exe
6858 \end_layout
6859
6860 \end_inset
6861
6862  and then specify the program arguments as 
6863 \begin_inset Flex Code
6864 status collapsed
6865
6866 \begin_layout Plain Layout
6867 -g %f %l
6868 \end_layout
6869
6870 \end_inset
6871
6872 .
6873  In this way, you will be using the 
6874 \emph on
6875 lyxsocket
6876 \emph default
6877  for communicating with LyX.
6878  If, for whatever reason, you want to use the 
6879 \emph on
6880 lyxpipe
6881 \emph default
6882 , omit the 
6883 \begin_inset Flex Code
6884 status collapsed
6885
6886 \begin_layout Plain Layout
6887 -g
6888 \end_layout
6889
6890 \end_inset
6891
6892  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6893 \end_layout
6894
6895 \begin_layout Standard
6896 In yap, reverse search is triggered by double-click.
6897 \end_layout
6898
6899 \begin_layout Subsubsection*
6900 SumatraPDF (Cygwin)
6901 \end_layout
6902
6903 \begin_layout Standard
6904 In order to use SumatraPDF for inverse search, enter 
6905 \begin_inset Flex Code
6906 status collapsed
6907
6908 \begin_layout Plain Layout
6909 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6910 \end_layout
6911
6912 \end_inset
6913
6914  in the viewer setting in 
6915 \begin_inset Flex MenuItem
6916 status collapsed
6917
6918 \begin_layout Plain Layout
6919 Preferences\SpecialChar \menuseparator
6920 File Handling\SpecialChar \menuseparator
6921 File formats\SpecialChar \menuseparator
6922 PDF (pdflatex)
6923 \end_layout
6924
6925 \end_inset
6926
6927 .
6928  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6929  The 
6930 \begin_inset Flex Code
6931 status collapsed
6932
6933 \begin_layout Plain Layout
6934 -g
6935 \end_layout
6936
6937 \end_inset
6938
6939  enables communication via the 
6940 \emph on
6941 lyxsocket
6942 \emph default
6943 .
6944  Again, omit the 
6945 \begin_inset Flex Code
6946 status collapsed
6947
6948 \begin_layout Plain Layout
6949 -g
6950 \end_layout
6951
6952 \end_inset
6953
6954  option if you want to use the 
6955 \emph on
6956 lyxpipe
6957 \emph default
6958 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6959 \end_layout
6960
6961 \begin_layout Standard
6962 Reverse search is triggered by double-click.
6963 \end_layout
6964
6965 \begin_layout Section
6966 Forward search
6967 \end_layout
6968
6969 \begin_layout Standard
6970 Forward search is, as the name implies, in a sense the 
6971 \begin_inset Quotes eld
6972 \end_inset
6973
6974 opposite
6975 \begin_inset Quotes erd
6976 \end_inset
6977
6978  of reverse search.
6979  It allows you to let the viewer jump to a given position from within LyX.
6980  If forward search is set up (as described in what follows), you can put
6981  the cursor anywhere in your LyX document, and hit 
6982 \begin_inset Flex MenuItem
6983 status collapsed
6984
6985 \begin_layout Plain Layout
6986 Navigate\SpecialChar \menuseparator
6987 Forward search
6988 \end_layout
6989
6990 \end_inset
6991
6992  (or select 
6993 \begin_inset Flex MenuItem
6994 status collapsed
6995
6996 \begin_layout Plain Layout
6997 Forward search
6998 \end_layout
6999
7000 \end_inset
7001
7002  in the context menu via right mouse click), and then the viewer will jump
7003  to that position as well.
7004  This implies, of course, that your viewer supports this function.
7005 \end_layout
7006
7007 \begin_layout Standard
7008 To make forward search possible, you first need to provide the generated
7009  output PDF/DVI file with additional information about the TeX sources.
7010  This can be done via the methods described in the section 
7011 \begin_inset CommandInset ref
7012 LatexCommand ref
7013 reference "sub:rev-search"
7014
7015 \end_inset
7016
7017 .
7018 \end_layout
7019
7020 \begin_layout Standard
7021 Additionally, you need to configure LyX for using your viewers in 
7022 \begin_inset Flex MenuItem
7023 status collapsed
7024
7025 \begin_layout Plain Layout
7026 Tools\SpecialChar \menuseparator
7027 Preferences\SpecialChar \menuseparator
7028 Output\SpecialChar \menuseparator
7029 General
7030 \end_layout
7031
7032 \end_inset
7033
7034 .
7035  We provide a range of tested configurations for some viewers, which you
7036  can select from the drop down list.
7037  If none of these configurations suits you, you have to find out and enter
7038  a suitable configuration yourself.
7039  The definition syntax uses the following placeholders:
7040 \end_layout
7041
7042 \begin_layout Itemize
7043 \noindent
7044 \begin_inset Flex Code
7045 status collapsed
7046
7047 \begin_layout Plain Layout
7048 $$n
7049 \end_layout
7050
7051 \end_inset
7052
7053 : row number
7054 \end_layout
7055
7056 \begin_layout Itemize
7057 \noindent
7058 \begin_inset Flex Code
7059 status collapsed
7060
7061 \begin_layout Plain Layout
7062 $$t
7063 \end_layout
7064
7065 \end_inset
7066
7067 : name of the (temporary) exported .tex file
7068 \end_layout
7069
7070 \begin_layout Itemize
7071 \noindent
7072 \begin_inset Flex Code
7073 status collapsed
7074
7075 \begin_layout Plain Layout
7076 $$o
7077 \end_layout
7078
7079 \end_inset
7080
7081 : name of the exported output file (either dvi or pdf, depending on which
7082  one exists in the temporary directory)
7083 \end_layout
7084
7085 \begin_layout Standard
7086 Note that only some of the viewers provide full forward search functionality,
7087  among them yap, xdvi, okular and Sumatra PDF.
7088 \begin_inset Foot
7089 status collapsed
7090
7091 \begin_layout Plain Layout
7092 For Sumatra CMCDDE is needed --- downloadable from 
7093 \begin_inset CommandInset href
7094 LatexCommand href
7095 target "http://www.istri.fr/zip/CMCDDE.zip"
7096
7097 \end_inset
7098
7099
7100 \end_layout
7101
7102 \end_inset
7103
7104  While many of the widespread PDF viewers (most notably Adobe Reader) do
7105  not support forward search at all, some other viewers -- e.
7106 \begin_inset space \thinspace{}
7107 \end_inset
7108
7109 g.
7110  evince and xpdf -- allow at least to reload the document and jump to a
7111  specific page of the file, so you can at least navigate 
7112 \begin_inset Quotes eld
7113 \end_inset
7114
7115 near
7116 \begin_inset Quotes erd
7117 \end_inset
7118
7119 .
7120  This latter functionality is provided by an external call of synctex (see
7121  the predefined example configurations).
7122  
7123 \end_layout
7124
7125 \begin_layout Standard
7126 Forward search works both with DVI and PDF output.
7127  LyX simply checks which preview format you have used before (i.
7128 \begin_inset space \thinspace{}
7129 \end_inset
7130
7131 e., which format is already there in the temporary directory) and chooses
7132  the appropriate configuration for the respective format.
7133 \end_layout
7134
7135 \begin_layout Chapter
7136 Special Document Classes
7137 \end_layout
7138
7139 \begin_layout Section
7140 A&A Paper
7141 \end_layout
7142
7143 \begin_layout Standard
7144 by 
7145 \noun on
7146 Peter Sütterlin
7147 \end_layout
7148
7149 \begin_layout Subsection
7150 Introduction
7151 \end_layout
7152
7153 \begin_layout Standard
7154 This section describes how LyX can be used to write articles for submission
7155  to the scientific journal 
7156 \emph on
7157 Astronomy and Astrophysics
7158 \emph default
7159  (www.edpsciences.fr/aa/ 
7160 \begin_inset Flex URL
7161 status collapsed
7162
7163 \begin_layout Plain Layout
7164
7165 http://www.edpsciences.fr/aa/
7166 \end_layout
7167
7168 \end_inset
7169
7170 ) using Version 5.01 of the document class 
7171 \family typewriter
7172 aa.cls
7173 \family default
7174 .
7175  This package can be downloaded from the ftp site
7176 \end_layout
7177
7178 \begin_layout Standard
7179 \begin_inset VSpace medskip
7180 \end_inset
7181
7182
7183 \end_layout
7184
7185 \begin_layout Standard
7186 \align center
7187 \begin_inset Flex URL
7188 status collapsed
7189
7190 \begin_layout Plain Layout
7191
7192 ftp://ftp.edpsciences.org/pub/aa/readme.html
7193 \end_layout
7194
7195 \end_inset
7196
7197
7198 \end_layout
7199
7200 \begin_layout Standard
7201 \begin_inset VSpace medskip
7202 \end_inset
7203
7204
7205 \end_layout
7206
7207 \begin_layout Standard
7208 A manual comes together with that package, and this text is not meant to
7209  replace the original manual but is merely a short guide in how to realize
7210  the correct form of your paper.
7211  
7212 \end_layout
7213
7214 \begin_layout Standard
7215 Please note that the publisher of the journal was changed from Springer
7216  to EDP Sciences starting January 1, 2001.
7217  That change involved also some slight changes to the style files, namely
7218  the removal of the thesaurus command.
7219  The LyX class aa supports the newest version of these style files, V 5.01.
7220  If you have an older version installed, please upgrade.
7221  For compatibility, the old (version 4) layout has been kept as 
7222 \family sans
7223 article (A&A V4)
7224 \family default
7225 .
7226  Please refer to the comments in 
7227 \family typewriter
7228 LyXDir/layouts/aapaper.layout
7229 \family default
7230 .
7231 \end_layout
7232
7233 \begin_layout Subsection
7234 Getting started
7235 \end_layout
7236
7237 \begin_layout Standard
7238 It is recommended you start from the example template distributed with LyX.
7239  If you are not using a template, note the following settings:
7240 \end_layout
7241
7242 \begin_layout Itemize
7243 Select 
7244 \family sans
7245 article (A&A)
7246 \family default
7247  in the 
7248 \family sans
7249 Document\SpecialChar \menuseparator
7250 Settings
7251 \family default
7252  dialog (OK, that one was obvious).
7253 \end_layout
7254
7255 \begin_layout Itemize
7256 Don't change the option 
7257 \family sans
7258 Page
7259 \begin_inset space ~
7260 \end_inset
7261
7262 style
7263 \family default
7264 : Leave it set to 
7265 \family sans
7266 default
7267 \family default
7268 .
7269  The whole layout is done by the macros, you shouldn't change anything.
7270 \end_layout
7271
7272 \begin_layout Subsection
7273 The header block
7274 \end_layout
7275
7276 \begin_layout Standard
7277 First thing to enter is the header information.
7278  It consists of seven entries, of which some are optional.
7279  They are
7280 \end_layout
7281
7282 \begin_layout Itemize
7283
7284 \family sans
7285 Title
7286 \family default
7287 : [required] 
7288 \end_layout
7289
7290 \begin_layout Itemize
7291
7292 \family sans
7293 Subtitle
7294 \family default
7295 : [optional] 
7296 \end_layout
7297
7298 \begin_layout Itemize
7299
7300 \family sans
7301 Author
7302 \family default
7303 : [required]
7304 \end_layout
7305
7306 \begin_layout Itemize
7307
7308 \family sans
7309 Address
7310 \family default
7311 : [required]
7312 \end_layout
7313
7314 \begin_layout Itemize
7315
7316 \family sans
7317 Offprints
7318 \family default
7319 : [optional] if more than one author: whom to contact for offprint requests.
7320 \end_layout
7321
7322 \begin_layout Itemize
7323
7324 \family sans
7325 Mail
7326 \family default
7327 : [optional] mail address for contacts.
7328 \end_layout
7329
7330 \begin_layout Itemize
7331
7332 \family sans
7333 Date
7334 \family default
7335 : [required].
7336  Suggested format is 
7337 \family typewriter
7338 Received: <date>; Accepted <date> 
7339 \end_layout
7340
7341 \begin_layout Standard
7342 There is no need to issue the 
7343 \family typewriter
7344
7345 \backslash
7346 maketitle
7347 \family default
7348  command, this is done automatically by LyX when the header is finished.
7349  Although the order of the single header entries doesn't matter it is advised
7350  to keep the above sequence, just to get the best optics and meets the layout
7351  of the real document.
7352 \end_layout
7353
7354 \begin_layout Standard
7355 If you want to place footnotes in the header block, e.
7356 \begin_inset space \thinspace{}
7357 \end_inset
7358
7359 g.
7360 \begin_inset space \space{}
7361 \end_inset
7362
7363 to state your present address, just use the standard footnote via the menu
7364  
7365 \family sans
7366 Insert\SpecialChar \menuseparator
7367 Footnote.
7368
7369 \family default
7370  LyX will automagically use the term 
7371 \family typewriter
7372
7373 \backslash
7374 thanks{}
7375 \family default
7376  in that case.
7377 \end_layout
7378
7379 \begin_layout Standard
7380 In addition to these topics, the macros use three additional LaTeX commands
7381  that have no counterpart in LyX:
7382 \end_layout
7383
7384 \begin_layout Itemize
7385
7386 \family typewriter
7387
7388 \backslash
7389 and
7390 \family default
7391  to separate different names for more than one author and institute, respectivel
7392 y.
7393 \end_layout
7394
7395 \begin_layout Itemize
7396
7397 \family typewriter
7398
7399 \backslash
7400 inst{<nr>}
7401 \family default
7402 to mark corresponding author/institute pairs.
7403  The institutes are numbered sequentially as they appear in the 
7404 \family sans
7405 Address
7406 \family default
7407  field, so you have to put a marker to each author.
7408 \end_layout
7409
7410 \begin_layout Itemize
7411
7412 \family typewriter
7413
7414 \backslash
7415 email{address}
7416 \family default
7417  to supply an email address for fast contact.
7418 \end_layout
7419
7420 \begin_layout Standard
7421 In all cases, the appropriate command has to be entered in LyX and marked
7422  as LaTeX code.
7423  See the examples.
7424  
7425 \end_layout
7426
7427 \begin_layout Subsection
7428 The abstract
7429 \end_layout
7430
7431 \begin_layout Standard
7432 The abstract should immediately follow the header block.
7433  With version 5 the abstract environment was changed to a command, and there
7434  is now a resctriction to only one paragraph.
7435  In addition, it should contain an entry with the keywords.
7436  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7437  command 
7438 \family typewriter
7439
7440 \backslash
7441 keywords{}
7442 \family default
7443  by hand and mark it as LaTeX code.
7444  Refer to the example paper.
7445 \end_layout
7446
7447 \begin_layout Subsection
7448 Supported environments
7449 \end_layout
7450
7451 \begin_layout Standard
7452 The A&A paper layout supports the following environments for structuring
7453  your text:
7454 \end_layout
7455
7456 \begin_layout Itemize
7457
7458 \family sans
7459 Standard
7460 \end_layout
7461
7462 \begin_layout Itemize
7463
7464 \family sans
7465 Section
7466 \end_layout
7467
7468 \begin_layout Itemize
7469
7470 \family sans
7471 Subsection
7472 \end_layout
7473
7474 \begin_layout Itemize
7475
7476 \family sans
7477 Subsubsection
7478 \end_layout
7479
7480 \begin_layout Itemize
7481
7482 \family sans
7483 Itemize
7484 \end_layout
7485
7486 \begin_layout Itemize
7487
7488 \family sans
7489 Enumerate
7490 \end_layout
7491
7492 \begin_layout Itemize
7493
7494 \family sans
7495 Description
7496 \end_layout
7497
7498 \begin_layout Itemize
7499
7500 \family sans
7501 Caption
7502 \end_layout
7503
7504 \begin_layout Itemize
7505
7506 \family sans
7507 Abstract
7508 \end_layout
7509
7510 \begin_layout Itemize
7511
7512 \family sans
7513 Acknowledgment
7514 \end_layout
7515
7516 \begin_layout Itemize
7517
7518 \family sans
7519 Bibliography
7520 \end_layout
7521
7522 \begin_layout Itemize
7523
7524 \family sans
7525 LaTeX
7526 \end_layout
7527
7528 \begin_layout Subsection
7529 Commands not supported by LyX
7530 \end_layout
7531
7532 \begin_layout Standard
7533 Some commands are not yet supported by the 
7534 \family sans
7535 paper (A&A)
7536 \family default
7537  layout for LyX.
7538  Some have already been mentioned.
7539  For the sake of completeness, they are listed all together here:
7540 \end_layout
7541
7542 \begin_layout Itemize
7543
7544 \family typewriter
7545
7546 \backslash
7547 and
7548 \end_layout
7549
7550 \begin_layout Itemize
7551
7552 \family typewriter
7553
7554 \backslash
7555 email
7556 \end_layout
7557
7558 \begin_layout Itemize
7559
7560 \family typewriter
7561
7562 \backslash
7563 appendix
7564 \end_layout
7565
7566 \begin_layout Itemize
7567
7568 \family typewriter
7569
7570 \backslash
7571 authorrunning
7572 \end_layout
7573
7574 \begin_layout Itemize
7575
7576 \family typewriter
7577
7578 \backslash
7579 inst{}
7580 \end_layout
7581
7582 \begin_layout Itemize
7583
7584 \family typewriter
7585
7586 \backslash
7587 keywords{}
7588 \end_layout
7589
7590 \begin_layout Itemize
7591
7592 \family typewriter
7593
7594 \backslash
7595 object{}
7596 \end_layout
7597
7598 \begin_layout Itemize
7599
7600 \family typewriter
7601
7602 \backslash
7603 titlerunning{}
7604 \end_layout
7605
7606 \begin_layout Standard
7607 If you want to use any of these commands, you have to enter them yourself.
7608  
7609 \series bold
7610 Do not forget to mark them as LaTeX code!
7611 \end_layout
7612
7613 \begin_layout Subsection
7614 Figure and Table Floats
7615 \end_layout
7616
7617 \begin_layout Standard
7618 LyX provides support for the necessary float environments 
7619 \family sans
7620 figure, figure*, table
7621 \family default
7622  and 
7623 \family sans
7624 table*
7625 \family default
7626 , therefore we won't tell much about it here.
7627  Refer to the 
7628 \emph on
7629 User's
7630 \begin_inset space ~
7631 \end_inset
7632
7633 Guide
7634 \emph default
7635 .
7636  Just remember that tables should be left-aligned.
7637  For that, select the table and change the alignment in 
7638 \family sans
7639 Edit\SpecialChar \menuseparator
7640 Paragraph
7641 \begin_inset space ~
7642 \end_inset
7643
7644 Settings.
7645 \end_layout
7646
7647 \begin_layout Standard
7648 There is only one special thing: the figures with caption besides the figure.
7649  To create such a figure, you have to do the following:
7650 \end_layout
7651
7652 \begin_layout Enumerate
7653 Create a wide figure float: 
7654 \family sans
7655 Insert\SpecialChar \menuseparator
7656 Float\SpecialChar \menuseparator
7657 Figure
7658 \family default
7659 , then right click in the figure and select 
7660 \family sans
7661 \bar under
7662 S
7663 \bar default
7664 pan
7665 \begin_inset space ~
7666 \end_inset
7667
7668 columns
7669 \family default
7670 .
7671 \end_layout
7672
7673 \begin_layout Enumerate
7674 Enter your caption text.
7675 \end_layout
7676
7677 \begin_layout Enumerate
7678 Press 
7679 \family sans
7680 Return
7681 \family default
7682  to move the cursor above the caption.
7683 \end_layout
7684
7685 \begin_layout Enumerate
7686 Insert your figure
7687 \end_layout
7688
7689 \begin_layout Enumerate
7690 Position the cursor behind the figure and insert a horizontal fill: 
7691 \family sans
7692 Insert\SpecialChar \menuseparator
7693 Special
7694 \begin_inset space ~
7695 \end_inset
7696
7697 Character\SpecialChar \menuseparator
7698 Horizontal
7699 \begin_inset space ~
7700 \end_inset
7701
7702 Fill
7703 \family default
7704 .
7705 \end_layout
7706
7707 \begin_layout Enumerate
7708 Switch to LaTeX mode: 
7709 \family sans
7710 M-c
7711 \begin_inset space ~
7712 \end_inset
7713
7714 t
7715 \family default
7716 .
7717 \end_layout
7718
7719 \begin_layout Enumerate
7720 Enter 
7721 \family typewriter
7722
7723 \backslash
7724 parbox[b]{55mm}{
7725 \family default
7726 .
7727  
7728 \series bold
7729 Do not close the brace!
7730 \end_layout
7731
7732 \begin_layout Enumerate
7733 Position the cursor behind the caption text, switch to LaTeX mode and insert
7734  the closing brace: 
7735 \family sans
7736 M-c
7737 \begin_inset space ~
7738 \end_inset
7739
7740 t
7741 \family default
7742  
7743 \family typewriter
7744 }
7745 \family default
7746 .
7747 \end_layout
7748
7749 \begin_layout Standard
7750 Also, refer to the figures in the example paper.
7751 \end_layout
7752
7753 \begin_layout Subsection
7754 Referee layout
7755 \end_layout
7756
7757 \begin_layout Standard
7758 For submission, the paper has to be formated in a special double-spacing
7759  layout.
7760  For this purpose, you have to give the option 
7761 \family typewriter
7762 referee
7763 \family default
7764  to the documentclass.
7765  This must be done using the extra class options field in the 
7766 \family sans
7767 Document\SpecialChar \menuseparator
7768 Settings
7769 \family default
7770  dialog.
7771  Just enter the string 
7772 \family typewriter
7773 referee
7774 \family default
7775  there.
7776 \end_layout
7777
7778 \begin_layout Subsection
7779 The example paper
7780 \end_layout
7781
7782 \begin_layout Standard
7783 The 
7784 \family sans
7785 Examples
7786 \family default
7787  directory contains an example paper written with LyX.
7788  It is the example paper from the original macro package, translated to
7789  LyX.
7790  Use it for inspiration, and compare the original LaTeX code with LyX way
7791  of writing.
7792 \end_layout
7793
7794 \begin_layout Section
7795 AASTeX
7796 \end_layout
7797
7798 \begin_layout Standard
7799 by 
7800 \noun on
7801 Mike Ressler
7802 \end_layout
7803
7804 \begin_layout Subsection
7805 Introduction
7806 \end_layout
7807
7808 \begin_layout Standard
7809 AASTeX is a set of macros produced by the American Astronomical Society
7810  to facilitate electronic manuscript submission to the three journals they
7811  publish: the Astrophysical Journal (including the Letters and Supplement),
7812  the Astronomical Journal, and the Publications of the Astronomical Society
7813  of the Pacific.
7814  LyX has proven to be an excellent tool for generating these documents,
7815  especially given its equation, citation, and figure handling capabilities.
7816  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7817  is the version described here, or higher.
7818  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7819  incompatible with LyX.
7820  The AASTeX package may be downloaded from the AASTeX Web site
7821 \end_layout
7822
7823 \begin_layout Standard
7824 \begin_inset VSpace medskip
7825 \end_inset
7826
7827
7828 \end_layout
7829
7830 \begin_layout Standard
7831 \align center
7832 \begin_inset Flex URL
7833 status collapsed
7834
7835 \begin_layout Plain Layout
7836
7837 http://www.journals.uchicago.edu/AAS/AASTeX
7838 \end_layout
7839
7840 \end_inset
7841
7842
7843 \end_layout
7844
7845 \begin_layout Standard
7846 \begin_inset VSpace medskip
7847 \end_inset
7848
7849
7850 \end_layout
7851
7852 \begin_layout Standard
7853 A complete user guide is contained in that package and you should familiarize
7854  yourself with it thoroughly before embarking on writing a paper in LyX.
7855  LyX will not reduce the need to figure out all the AASTeX commands, it
7856  will only reduce the drudgery of typing everything in.
7857  It is your responsibility to ensure that the final exported LaTeX document
7858  conforms completely to the requirements of the journal to which you are
7859  submitting your paper.
7860 \end_layout
7861
7862 \begin_layout Subsection
7863 Starting a New Paper
7864 \end_layout
7865
7866 \begin_layout Standard
7867 I strongly suggest that you start with the AASTeX template file.
7868  Click on 
7869 \family sans
7870 File\SpecialChar \menuseparator
7871 New from
7872 \family default
7873  
7874 \family sans
7875 Template
7876 \family default
7877 , enter the new file name, then choose the 
7878 \family typewriter
7879 aastex.lyx
7880 \family default
7881  template.
7882  This will show the most common fields found in a manuscript.
7883  Simply overwrite the existing text (including the brackets, 
7884 \family typewriter
7885 <>
7886 \family default
7887 ) with the correct information.
7888  Many of the AASTeX commands and environments can be implemented directly
7889  in LyX, but some cannot: most noticeably 
7890 \family typewriter
7891
7892 \backslash
7893 altaffilmark
7894 \family default
7895  and 
7896 \family typewriter
7897
7898 \backslash
7899 altaffiltext
7900 \family default
7901 , which should stick out like a sore thumb if you actually just opened the
7902  template file.
7903  For commands such as these, the LaTeX code must be entered directly and
7904  marked as such.
7905  Such commands are referred to as TeX code, or Evil Red Text.
7906  I tried to minimize the amount of TeX code needed in an AASTeX document,
7907  but there is still a bit more required than any of us would like.
7908 \end_layout
7909
7910 \begin_layout Subsection
7911 Finishing Your Paper
7912 \end_layout
7913
7914 \begin_layout Standard
7915 When the paper is finished to your satisfaction and previews/prints correctly,
7916  there are a few 
7917 \begin_inset Quotes eld
7918 \end_inset
7919
7920 postprocessing
7921 \begin_inset Quotes erd
7922 \end_inset
7923
7924  actions which need to be done before you submit it to the journals.
7925  
7926 \end_layout
7927
7928 \begin_layout Enumerate
7929 Export your paper as a LaTeX file (
7930 \family sans
7931 File\SpecialChar \menuseparator
7932 Export\SpecialChar \menuseparator
7933 LaTeX
7934 \family default
7935 ).
7936  
7937 \end_layout
7938
7939 \begin_layout Enumerate
7940 Edit the resulting 
7941 \family typewriter
7942 .tex
7943 \family default
7944  file with your favorite text editor
7945 \end_layout
7946
7947 \begin_deeper
7948 \begin_layout Enumerate
7949 remove the comment lines before the 
7950 \family typewriter
7951
7952 \backslash
7953 documentclass
7954 \family default
7955  command
7956 \end_layout
7957
7958 \begin_layout Enumerate
7959 remove the 
7960 \family typewriter
7961
7962 \backslash
7963 usepackage...{fontenc}
7964 \family default
7965  line if it appears (usually just after 
7966 \family typewriter
7967
7968 \backslash
7969 documentclass
7970 \family default
7971 }; also remove the 
7972 \family typewriter
7973
7974 \backslash
7975 secnumdepth
7976 \family default
7977  line if it appears.
7978 \end_layout
7979
7980 \begin_layout Enumerate
7981 remove everything between (and including) the 
7982 \family typewriter
7983
7984 \backslash
7985 makeatletter
7986 \family default
7987  and 
7988 \family typewriter
7989
7990 \backslash
7991 makeatother
7992 \family default
7993  commands, except for any commands you specifically put into the LaTeX preamble
7994  (which should appear immediately after the 
7995 \begin_inset Quotes eld
7996 \end_inset
7997
7998 User specified LaTeX commands
7999 \begin_inset Quotes erd
8000 \end_inset
8001
8002  comment in the 
8003 \family typewriter
8004 .tex
8005 \family default
8006  file).
8007 \end_layout
8008
8009 \end_deeper
8010 \begin_layout Enumerate
8011 Run the resulting file through LaTeX to make sure it still processes correctly.
8012 \end_layout
8013
8014 \begin_layout Enumerate
8015 Reread the journal requirements to make sure your filenames and formats
8016  are correct.
8017 \end_layout
8018
8019 \begin_layout Enumerate
8020 Submit it.
8021 \end_layout
8022
8023 \begin_layout Subsection
8024 Comments On Specific Commands
8025 \end_layout
8026
8027 \begin_layout Standard
8028 I will not describe the detailed usage of the individual AASTeX commands:
8029  the AASTeX User Guide (
8030 \family typewriter
8031 aasguide.tex
8032 \family default
8033 ) gives a good description of each.
8034  Thus it's probably easiest for me to go down the list as found in the guide
8035  and offer comments where necessary.
8036  So let's begin \SpecialChar \ldots{}
8037
8038 \end_layout
8039
8040 \begin_layout Subsubsection
8041 Things that work as expected
8042 \end_layout
8043
8044 \begin_layout Standard
8045 Because they work as you might expect, I simply list them and the section
8046  they are found in: 
8047 \family typewriter
8048
8049 \backslash
8050 documentclass
8051 \family default
8052  (2.1.1), 
8053 \family typewriter
8054
8055 \backslash
8056 begin{document}
8057 \family default
8058  (2.2), 
8059 \family typewriter
8060
8061 \backslash
8062 title
8063 \family default
8064  (2.3), 
8065 \family typewriter
8066
8067 \backslash
8068 author
8069 \family default
8070  (2.3), 
8071 \family typewriter
8072
8073 \backslash
8074 affil
8075 \family default
8076  (2.3), 
8077 \family typewriter
8078
8079 \backslash
8080 abstract
8081 \family default
8082  (2.4), 
8083 \family typewriter
8084
8085 \backslash
8086 keywords
8087 \family default
8088  (2.5), 
8089 \family typewriter
8090
8091 \backslash
8092 section
8093 \family default
8094  (2.7), 
8095 \family typewriter
8096
8097 \backslash
8098 subsection
8099 \family default
8100  (2.7), 
8101 \family typewriter
8102
8103 \backslash
8104 subsubsection
8105 \family default
8106  (2.7), 
8107 \family typewriter
8108
8109 \backslash
8110 paragraph
8111 \family default
8112  (2.7), 
8113 \family typewriter
8114
8115 \backslash
8116 facility
8117 \family default
8118  (2.10), 
8119 \family typewriter
8120
8121 \backslash
8122 begin{displaymath}
8123 \family default
8124  (2.12), 
8125 \family typewriter
8126
8127 \backslash
8128 begin{equation}
8129 \family default
8130  (2.12), 
8131 \family typewriter
8132
8133 \backslash
8134 begin{eqnarray}
8135 \family default
8136  (2.12), 
8137 \family typewriter
8138
8139 \backslash
8140 begin{mathletters}
8141 \family default
8142  (2.12), 
8143 \family typewriter
8144
8145 \backslash
8146 begin{thebibliography}
8147 \family default
8148  (2.13.1), 
8149 \family typewriter
8150
8151 \backslash
8152 bibitem
8153 \family default
8154  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8155  graphicx figure commands (2.14.1), 
8156 \family typewriter
8157
8158 \backslash
8159 begin{table}
8160 \family default
8161  (2.15.4), 
8162 \family typewriter
8163
8164 \backslash
8165 begin{tabular}
8166 \family default
8167  (2.15.4), 
8168 \family typewriter
8169
8170 \backslash
8171 caption
8172 \family default
8173  (2.15.4), 
8174 \family typewriter
8175
8176 \backslash
8177 label
8178 \family default
8179  (2.15.4, amongst other places), 
8180 \family typewriter
8181
8182 \backslash
8183 tablerefs
8184 \family default
8185  (2.15.5), 
8186 \family typewriter
8187
8188 \backslash
8189 tablecomments
8190 \family default
8191  (2.15.5), 
8192 \family typewriter
8193
8194 \backslash
8195 url
8196 \family default
8197  (2.17.4), 
8198 \family typewriter
8199
8200 \backslash
8201 end{document}
8202 \family default
8203  (2.18).
8204 \end_layout
8205
8206 \begin_layout Standard
8207 The following style options also work correctly: 
8208 \family typewriter
8209 longabstract
8210 \family default
8211  (2.4), 
8212 \family typewriter
8213 preprint
8214 \family default
8215  (3.2.1), 
8216 \family typewriter
8217 preprint2
8218 \family default
8219  (3.2.2), 
8220 \family typewriter
8221 eqsecnum
8222 \family default
8223  (3.3), 
8224 \family typewriter
8225 flushrt
8226 \family default
8227  (3.4).
8228  Simply put them in the 
8229 \family sans
8230 Options
8231 \family default
8232  box in 
8233 \family sans
8234 Layout\SpecialChar \menuseparator
8235 Document
8236 \family default
8237 .
8238 \end_layout
8239
8240 \begin_layout Subsubsection
8241 Things that work, but require more comment
8242 \end_layout
8243
8244 \begin_layout Standard
8245 The following items work, but require a little more discussion:
8246 \end_layout
8247
8248 \begin_layout Itemize
8249 These items are reserved for use by the journal editors, but you can put
8250  them into the LaTeX preamble if you feel compelled to do so: 
8251 \family typewriter
8252
8253 \backslash
8254 received
8255 \family default
8256
8257 \family typewriter
8258
8259 \backslash
8260 revised
8261 \family default
8262
8263 \family typewriter
8264
8265 \backslash
8266 accepted
8267 \family default
8268
8269 \family typewriter
8270
8271 \backslash
8272 ccc
8273 \family default
8274
8275 \family typewriter
8276
8277 \backslash
8278 cpright
8279 \family default
8280  (all from 2.1.3)
8281 \end_layout
8282
8283 \begin_layout Itemize
8284 These items may be placed in the LaTeX preamble, and are included as blanks
8285  in the template file: 
8286 \family typewriter
8287
8288 \backslash
8289 slugcomment
8290 \family default
8291  (2.1.4), 
8292 \family typewriter
8293
8294 \backslash
8295 shorttitle
8296 \family default
8297  (2.1.5), 
8298 \family typewriter
8299
8300 \backslash
8301 shortauthors
8302 \family default
8303  (2.1.5)
8304 \end_layout
8305
8306 \begin_layout Itemize
8307
8308 \family typewriter
8309
8310 \backslash
8311 email
8312 \family default
8313  (2.3) – can only be used 
8314 \begin_inset Quotes eld
8315 \end_inset
8316
8317 standalone
8318 \begin_inset Quotes erd
8319 \end_inset
8320
8321 , not in the middle of a paragraph.
8322  Use TeX code if you need to embed it.
8323 \end_layout
8324
8325 \begin_layout Itemize
8326
8327 \family typewriter
8328
8329 \backslash
8330 and
8331 \family default
8332  (2.3) – will have extra {} after it.
8333  This should not cause an error.
8334 \end_layout
8335
8336 \begin_layout Itemize
8337
8338 \family typewriter
8339
8340 \backslash
8341 notetoeditor
8342 \family default
8343  (2.6) – can only be used 
8344 \begin_inset Quotes eld
8345 \end_inset
8346
8347 standalone
8348 \begin_inset Quotes erd
8349 \end_inset
8350
8351 , not in the middle of a paragraph.
8352  Use TeX code if you need to embed it.
8353 \end_layout
8354
8355 \begin_layout Itemize
8356
8357 \family typewriter
8358
8359 \backslash
8360 placetable
8361 \family default
8362  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8363  hand
8364 \end_layout
8365
8366 \begin_layout Itemize
8367
8368 \family typewriter
8369
8370 \backslash
8371 placefigure
8372 \family default
8373  (2.8) – same as for 
8374 \family typewriter
8375
8376 \backslash
8377 placetable
8378 \end_layout
8379
8380 \begin_layout Itemize
8381
8382 \family typewriter
8383
8384 \backslash
8385 acknowledgements
8386 \family default
8387  (2.9) – will have extra {} after it.
8388  This should not cause an error.
8389 \end_layout
8390
8391 \begin_layout Itemize
8392
8393 \family typewriter
8394
8395 \backslash
8396 appendix
8397 \family default
8398  (2.11) – will have extra {} after it.
8399  This should not cause an error.
8400 \end_layout
8401
8402 \begin_layout Itemize
8403
8404 \family typewriter
8405
8406 \backslash
8407 figcaption
8408 \family default
8409  (2.14.2) – you can insert an optional filename argument by placing the cursor
8410  at the beginning of the text and selecting 
8411 \family sans
8412 Insert\SpecialChar \menuseparator
8413 Short Title
8414 \family default
8415 .
8416  
8417 \begin_inset Quotes eld
8418 \end_inset
8419
8420 Short Title
8421 \begin_inset Quotes erd
8422 \end_inset
8423
8424  inserts an optional argument of the type needed by 
8425 \family typewriter
8426
8427 \backslash
8428 figcaption
8429 \family default
8430 .
8431  Hopefully it will be renamed someday.
8432 \end_layout
8433
8434 \begin_layout Itemize
8435
8436 \family typewriter
8437
8438 \backslash
8439 objectname
8440 \family default
8441  (2.17.1) – same as 
8442 \family typewriter
8443
8444 \backslash
8445 figcaption
8446 \family default
8447  for the catalog ID optional parameter
8448 \end_layout
8449
8450 \begin_layout Itemize
8451
8452 \family typewriter
8453
8454 \backslash
8455 dataset
8456 \family default
8457  (2.17.1) – same as 
8458 \family typewriter
8459
8460 \backslash
8461 figcaption
8462 \family default
8463  for the catalog ID optional parameter
8464 \end_layout
8465
8466 \begin_layout Subsubsection
8467 Things not implemented, use TeX code
8468 \end_layout
8469
8470 \begin_layout Standard
8471
8472 \family typewriter
8473
8474 \backslash
8475 altaffilmark
8476 \family default
8477  (2.3), 
8478 \family typewriter
8479
8480 \backslash
8481 altaffiltext
8482 \family default
8483  (2.3), 
8484 \family typewriter
8485
8486 \backslash
8487 eqnum
8488 \family default
8489  (2.12), 
8490 \family typewriter
8491
8492 \backslash
8493 setcounter{equation}
8494 \family default
8495  (2.12), Journal name abbreviations (2.13.4), 
8496 \family typewriter
8497
8498 \backslash
8499 figurenum
8500 \family default
8501  (2.14.1), 
8502 \family typewriter
8503
8504 \backslash
8505 epsscale
8506 \family default
8507  (2.14.1), 
8508 \family typewriter
8509
8510 \backslash
8511 plotone
8512 \family default
8513  (2.14.1), 
8514 \family typewriter
8515
8516 \backslash
8517 plottwo
8518 \family default
8519  (2.14.1), 
8520 \family typewriter
8521
8522 \backslash
8523 tablenum
8524 \family default
8525  (2.15.4), 
8526 \family typewriter
8527
8528 \backslash
8529 tableline
8530 \family default
8531  (2.15.4, insert it as the first element in the lefthand cell after where
8532  you want it.
8533  Don't use any of LyX's rules in the table), 
8534 \family typewriter
8535
8536 \backslash
8537 tablenotemark
8538 \family default
8539  (2.15.5), 
8540 \family typewriter
8541
8542 \backslash
8543 tablenotetext
8544 \family default
8545  (2.15.5), much of Misc (2.17, except 
8546 \family typewriter
8547
8548 \backslash
8549 objectname
8550 \family default
8551
8552 \family typewriter
8553
8554 \backslash
8555 dataset
8556 \family default
8557
8558 \family typewriter
8559
8560 \backslash
8561 url
8562 \family default
8563 , and 
8564 \family typewriter
8565
8566 \backslash
8567 email
8568 \family default
8569 ; see above), 
8570 \family typewriter
8571
8572 \backslash
8573 singlespace
8574 \family default
8575  (3.1), 
8576 \family typewriter
8577
8578 \backslash
8579 doublespace
8580 \family default
8581  (3.1), 
8582 \family typewriter
8583
8584 \backslash
8585 onecolumn
8586 \family default
8587  (3.2), 
8588 \family typewriter
8589
8590 \backslash
8591 twocolumn
8592 \family default
8593  (3.2)
8594 \end_layout
8595
8596 \begin_layout Subsubsection
8597 Things that cannot be implemented
8598 \end_layout
8599
8600 \begin_layout Standard
8601 \SpecialChar \ldots{}
8602  at least in any meaningful sort of way, so I suggest ignoring them.
8603  They are the references environment (2.13.3), and the deluxetable environment
8604  (2.15).
8605  If you really, really need to use deluxetable, I suggest editing it in
8606  a separate file with a text editor, then using 
8607 \family sans
8608 Insert\SpecialChar \menuseparator
8609 Child
8610 \begin_inset space ~
8611 \end_inset
8612
8613 Document
8614 \family default
8615  to include it in your LyX document.
8616  See the 
8617 \family typewriter
8618 aas_sample.lyx
8619 \family default
8620  file to see an example of this.
8621 \end_layout
8622
8623 \begin_layout Subsection
8624 FAQs, Tips, Tricks, and Other Ruminations
8625 \end_layout
8626
8627 \begin_layout Subsubsection
8628 Getting LyX and AASTeX to cooperate
8629 \end_layout
8630
8631 \begin_layout Standard
8632 It can be a bit tricky to get LyX to recognize a new layout and document
8633  class.
8634  When all else fails, do this:
8635 \end_layout
8636
8637 \begin_layout Enumerate
8638 Make certain that LaTeX can find AASTeX.
8639  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8640  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8641 \family typewriter
8642 sample.tex
8643 \family default
8644 .
8645 \end_layout
8646
8647 \begin_layout Enumerate
8648 Make certain that 
8649 \family typewriter
8650 aastex.layout
8651 \family default
8652  appears in LyX's 
8653 \family typewriter
8654 layouts
8655 \family default
8656  folder
8657 \end_layout
8658
8659 \begin_layout Enumerate
8660 Rerun 
8661 \family sans
8662 Tools\SpecialChar \menuseparator
8663 Reconfigure
8664 \family default
8665  in LyX, then restart LyX.
8666 \end_layout
8667
8668 \begin_layout Enumerate
8669 Open a regular new file, not from a template.
8670  Does AASTeX appear in the class list in 
8671 \family sans
8672 Document\SpecialChar \menuseparator
8673 Settings
8674 \family default
8675 ?
8676 \end_layout
8677
8678 \begin_layout Standard
8679 If you get a warning from an existing AASTeX document about not being able
8680  to find the AASTeX layout or a message about 
8681 \begin_inset Quotes eld
8682 \end_inset
8683
8684 You should not mix title layouts with normal ones
8685 \begin_inset Quotes erd
8686 \end_inset
8687
8688 , things haven't been installed correctly.
8689 \end_layout
8690
8691 \begin_layout Subsubsection
8692 LaTeX error processing a table 
8693 \end_layout
8694
8695 \begin_layout Standard
8696 LyX, by default, attempts to center the table caption/title.
8697  This seems to produce a bad interaction in AASTeX so you should click somewhere
8698  in the caption/title, then select 
8699 \family sans
8700 Edit\SpecialChar \menuseparator
8701 Paragraph
8702 \begin_inset space ~
8703 \end_inset
8704
8705 Settings
8706 \family default
8707 , then set the 
8708 \family sans
8709 Alignment
8710 \family default
8711  to 
8712 \family sans
8713 Block
8714 \family default
8715 .
8716  This took care of it for me.
8717 \end_layout
8718
8719 \begin_layout Subsubsection
8720 References
8721 \end_layout
8722
8723 \begin_layout Standard
8724 A couple of things: 1) I have noticed some funny spacing in the reference
8725  entries in the text.
8726  When you enter the bibliography item data, make sure their is 
8727 \emph on
8728 no
8729 \emph default
8730  space between the last author and the parenthesis setting off the year;
8731  
8732 \emph on
8733 e.
8734 \begin_inset space \thinspace{}
8735 \end_inset
8736
8737 g.
8738 \begin_inset space \space{}
8739 \end_inset
8740
8741
8742 \emph default
8743 type 
8744 \family typewriter
8745 Ressler(1992)
8746 \family default
8747 , not 
8748 \family typewriter
8749 Ressler (1992)
8750 \family default
8751 .
8752  2) Entering the references at all is not obvious.
8753  The easiest thing is to start typing your first reference at the end of
8754  the document, then mark it as type 
8755 \family sans
8756 References
8757 \family default
8758 .
8759  That will put a small gray box in front of what you just typed.
8760  Click on the box to fill in the rest of the information.
8761  For new references, go to the end of an existing reference and press return.
8762  That will create a new line with its own box, etc.
8763 \end_layout
8764
8765 \begin_layout Subsubsection
8766 Including EPS files
8767 \end_layout
8768
8769 \begin_layout Standard
8770 Even though AASTeX provides its own figure commands (
8771 \family typewriter
8772
8773 \backslash
8774 plotone
8775 \family default
8776 , for example), I much prefer LaTeX's standard figure commands (with the
8777  default graphicx).
8778  You can insert the 
8779 \family typewriter
8780
8781 \backslash
8782 plotone
8783 \family default
8784 , etc.
8785 \begin_inset space ~
8786 \end_inset
8787
8788 commands as TeX code into a Figure Float box if you desire, but I never
8789  have much luck getting the layout right.
8790  With the standard graphics, LyX will insert a 
8791 \family typewriter
8792
8793 \backslash
8794 usepackage{graphicx}
8795 \family default
8796  command into the LaTeX preamble and handle the figures in the standard
8797  LaTeX2e way, interspersing the figures in the text.
8798  I believe ApJ accepts figures exactly this way now; AJ might still use
8799  the 
8800 \begin_inset Quotes eld
8801 \end_inset
8802
8803 stack everything at the end
8804 \begin_inset Quotes erd
8805 \end_inset
8806
8807  technique.
8808 \end_layout
8809
8810 \begin_layout Subsubsection
8811 Things I could have done, but didn't
8812 \end_layout
8813
8814 \begin_layout Standard
8815 There are a few 
8816 \begin_inset Quotes eld
8817 \end_inset
8818
8819 pretty
8820 \begin_inset Quotes erd
8821 \end_inset
8822
8823  things I could have implemented, but chose not to.
8824  For instance, I saw no point in double-spacing the text in the LyX window,
8825  even though it is double-spaced in the paper manuscript.
8826  Also, I chose not to make separate layouts for the preprint and preprint2
8827  styles.
8828  Since I assume you will spend most of your time in the plain manuscript
8829  mode anyway, I decided not to chew up more disk space with this.
8830  
8831 \end_layout
8832
8833 \begin_layout Subsection
8834 Final Caveat
8835 \end_layout
8836
8837 \begin_layout Standard
8838 Your mileage may vary.
8839  I've now had papers published by both ApJ and AJ that have had 98% of the
8840  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8841  cleanups.
8842  I have had no trouble with the submission process, and I'm sure the journals
8843  were never aware that there might be a difference.
8844  So, go forth and publish!
8845 \end_layout
8846
8847 \begin_layout Section
8848 AMS LaTeX
8849 \end_layout
8850
8851 \begin_layout Standard
8852 by 
8853 \noun on
8854 David Johnson
8855 \noun default
8856 ; updated by 
8857 \noun on
8858 Richard Heck
8859 \end_layout
8860
8861 \begin_layout Standard
8862 \begin_inset VSpace bigskip
8863 \end_inset
8864
8865
8866 \end_layout
8867
8868 \begin_layout Standard
8869 \noindent
8870 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8871  papers to be submitted to American Mathematical Society publications.
8872  The layouts are not tailored to a specific journal, but easily can be.
8873  You should refer to the AMS documentation for specific instructions for
8874  each journal (usually it will entail only changing a single line in the
8875  TeX output).
8876  That documentation is available on the Web at 
8877 \begin_inset Flex URL
8878 status open
8879
8880 \begin_layout Plain Layout
8881
8882 http://www.ams.org
8883 \end_layout
8884
8885 \end_inset
8886
8887  or by ftp at 
8888 \begin_inset Flex URL
8889 status open
8890
8891 \begin_layout Plain Layout
8892
8893 ftp://ftp.ams.org/pub/tex/amslatex/
8894 \end_layout
8895
8896 \end_inset
8897
8898 .
8899  These layouts are appropriate, and useful, for any mathematical writing.
8900  
8901 \end_layout
8902
8903 \begin_layout Standard
8904 There are two basic AMS LaTeX layouts: 
8905 \end_layout
8906
8907 \begin_layout Itemize
8908 amsart: The standard AMS article format.
8909 \end_layout
8910
8911 \begin_layout Itemize
8912 amsbook: the standard AMS book (really, monograph) format.
8913  
8914 \end_layout
8915
8916 \begin_layout Standard
8917 The layouts themselves contain only the minimum necessary to use the AMS
8918  classes.
8919  They do not, in particular, contain any of the `theorem' environments used
8920  for setting theorems, lemmas, and the like.
8921  These are contained, instead, in the 
8922 \begin_inset Flex Code
8923 status collapsed
8924
8925 \begin_layout Plain Layout
8926 Theorems (AMS)
8927 \end_layout
8928
8929 \end_inset
8930
8931  module, which is loaded by default when when you select one of the AMS
8932  classes.
8933  (It can also be used with other classes and can be removed, if you would
8934  rather use something else.) Less commonly used environments are in the 
8935 \begin_inset Flex Code
8936 status collapsed
8937
8938 \begin_layout Plain Layout
8939 Theorems (AMS-Extended)
8940 \end_layout
8941
8942 \end_inset
8943
8944  module, which must be loaded manually.
8945 \end_layout
8946
8947 \begin_layout Standard
8948 By default, theorems and the like are numbered consecutively throughout
8949  the document, but this may be modified by loading the module 
8950 \begin_inset Flex Code
8951 status collapsed
8952
8953 \begin_layout Plain Layout
8954 Theorems (Order by Section)
8955 \end_layout
8956
8957 \end_inset
8958
8959  or, if you are using 
8960 \begin_inset Flex Code
8961 status collapsed
8962
8963 \begin_layout Plain Layout
8964 book (AMS)
8965 \end_layout
8966
8967 \end_inset
8968
8969 , the module 
8970 \begin_inset Flex Code
8971 status collapsed
8972
8973 \begin_layout Plain Layout
8974 Theorems (Order by Chapter)
8975 \end_layout
8976
8977 \end_inset
8978
8979 .
8980  These will number the results as 
8981 \begin_inset Formula $n.m$
8982 \end_inset
8983
8984 , where the first number refers to the section (or chapter) and the second
8985  refers to the total number of results so far in that section (or chapter).
8986  Many environments are also available unnumbered.
8987  These are indicated by an asterisk at the end.
8988  If you happen to want 
8989 \emph on
8990 only
8991 \emph default
8992  unnumbered results, the module 
8993 \begin_inset Flex Code
8994 status collapsed
8995
8996 \begin_layout Plain Layout
8997 Theorems (Starred)
8998 \end_layout
8999
9000 \end_inset
9001
9002  provides that option.
9003 \end_layout
9004
9005 \begin_layout Standard
9006 Note that these modules do not 
9007 \emph on
9008 have
9009 \emph default
9010  to be used with the AMS classes.
9011  It is perfectly possible to use the 
9012 \begin_inset Flex Code
9013 status collapsed
9014
9015 \begin_layout Plain Layout
9016 Theorems (AMS)
9017 \end_layout
9018
9019 \end_inset
9020
9021  module, and the others mentioned, with other classes, such as 
9022 \begin_inset Flex Code
9023 status collapsed
9024
9025 \begin_layout Plain Layout
9026 article
9027 \end_layout
9028
9029 \end_inset
9030
9031
9032 \begin_inset Flex Code
9033 status collapsed
9034
9035 \begin_layout Plain Layout
9036 report
9037 \end_layout
9038
9039 \end_inset
9040
9041
9042 \begin_inset Flex Code
9043 status collapsed
9044
9045 \begin_layout Plain Layout
9046 book (KOMA-script)
9047 \end_layout
9048
9049 \end_inset
9050
9051 , and so forth.
9052 \end_layout
9053
9054 \begin_layout Subsection
9055 What these layouts provide
9056 \end_layout
9057
9058 \begin_layout Standard
9059 There is a long list of included environments provided by these layouts.
9060  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9061  variety of `theorem' environments.
9062  However, the AMS recommends the environments that are available in LyX.
9063  
9064 \end_layout
9065
9066 \begin_layout Standard
9067 The following environments—as well as the standard environments, such as
9068  
9069 \begin_inset Flex Noun
9070 status collapsed
9071
9072 \begin_layout Plain Layout
9073 section
9074 \end_layout
9075
9076 \end_inset
9077
9078
9079 \begin_inset Flex Noun
9080 status collapsed
9081
9082 \begin_layout Plain Layout
9083 bibliography
9084 \end_layout
9085
9086 \end_inset
9087
9088
9089 \begin_inset Flex Noun
9090 status collapsed
9091
9092 \begin_layout Plain Layout
9093 title
9094 \end_layout
9095
9096 \end_inset
9097
9098
9099 \begin_inset Flex Noun
9100 status collapsed
9101
9102 \begin_layout Plain Layout
9103 author
9104 \end_layout
9105
9106 \end_inset
9107
9108 , and 
9109 \begin_inset Flex Noun
9110 status collapsed
9111
9112 \begin_layout Plain Layout
9113 date
9114 \end_layout
9115
9116 \end_inset
9117
9118 —are provided by 
9119 \begin_inset Flex Code
9120 status collapsed
9121
9122 \begin_layout Plain Layout
9123 article (AMS)
9124 \end_layout
9125
9126 \end_inset
9127
9128  and 
9129 \begin_inset Flex Code
9130 status collapsed
9131
9132 \begin_layout Plain Layout
9133 book (AMS)
9134 \end_layout
9135
9136 \end_inset
9137
9138 :
9139 \end_layout
9140
9141 \begin_layout Description
9142 Address This should be the author's permanent address.
9143 \end_layout
9144
9145 \begin_layout Description
9146 Current
9147 \begin_inset space ~
9148 \end_inset
9149
9150 Address This should be the author's temporary address at the time of submission,
9151  if different from the Address.
9152 \end_layout
9153
9154 \begin_layout Description
9155 Email Author's e-mail address
9156 \end_layout
9157
9158 \begin_layout Description
9159 URL Author's Web address, if desired.
9160 \end_layout
9161
9162 \begin_layout Description
9163 Keywords Key words or phrases used to identify specific topics discussed
9164  in the paper.
9165 \end_layout
9166
9167 \begin_layout Description
9168 Subjectclass These refer to the AMS Subject Classifications, published and
9169  described in 
9170 \emph on
9171 Mathematical Reviews
9172 \emph default
9173 .
9174  These are also available online at the AMS cites listed above.
9175 \end_layout
9176
9177 \begin_layout Description
9178 Thanks
9179 \end_layout
9180
9181 \begin_layout Description
9182 Dedicatory
9183 \end_layout
9184
9185 \begin_layout Description
9186 Translator
9187 \end_layout
9188
9189 \begin_layout Standard
9190 The following environments are provided by both the 
9191 \begin_inset Flex Code
9192 status collapsed
9193
9194 \begin_layout Plain Layout
9195 Theorems
9196 \end_layout
9197
9198 \end_inset
9199
9200  and 
9201 \begin_inset Flex Code
9202 status collapsed
9203
9204 \begin_layout Plain Layout
9205 Theorems (AMS)
9206 \end_layout
9207
9208 \end_inset
9209
9210  modules, in the latter case in both starred (unnumbered) and unstarred
9211  (numbered) versions.
9212  These same environments are provided only in the starred versions by the
9213  
9214 \begin_inset Flex Code
9215 status collapsed
9216
9217 \begin_layout Plain Layout
9218 Theorems (Starred)
9219 \end_layout
9220
9221 \end_inset
9222
9223  module:
9224 \end_layout
9225
9226 \begin_layout Theorem
9227 This is typically used for the statements of major results.
9228  
9229 \end_layout
9230
9231 \begin_layout Corollary*
9232 This is used for statements which follow fairly directly from previous statement
9233 s.
9234  Again, these can be major results.
9235  
9236 \end_layout
9237
9238 \begin_layout Lemma
9239 These are smaller results needed to prove other statements.
9240 \end_layout
9241
9242 \begin_layout Proposition
9243 These are less major results which (hopefully) add to the general theory
9244  being discussed.
9245 \end_layout
9246
9247 \begin_layout Conjecture
9248 These are statements provided without justification, which the author does
9249  not know how to prove, but which seem to be true (to the author, at least).
9250 \end_layout
9251
9252 \begin_layout Definition*
9253 Guess what this is for.
9254  The font is different for this environment than for the previous ones.
9255  
9256 \end_layout
9257
9258 \begin_layout Example*
9259 Used for examples illustrating proven results.
9260 \end_layout
9261
9262 \begin_layout Problem
9263 It's not really known what this is for.
9264  You should figure it out.
9265 \end_layout
9266
9267 \begin_layout Exercise*
9268 Write a description for this one.
9269 \end_layout
9270
9271 \begin_layout Remark
9272 This environment is also a type of theorem, usually a lesser sort of observation.
9273 \end_layout
9274
9275 \begin_layout Claim*
9276 Often used in the course of giving a proof of a larger result.
9277 \end_layout
9278
9279 \begin_layout Case
9280 Generally, these are used to break up long arguments, using specific instances
9281  of some condition.
9282  
9283 \end_layout
9284
9285 \begin_layout Case
9286 The numbering scheme for cases is on its own, not together with other numbered
9287  statements.
9288  
9289 \end_layout
9290
9291 \begin_layout Proof
9292 At the end of this environment, a QED symbol (usually a square, but it can
9293  vary with different styles) is placed.
9294  If you want to have other environments within this one—for example, Case
9295  environments—and have the QED symbol appear only after them, then the other
9296  environments need to be nested within the proof environment.
9297  See the section 
9298 \emph on
9299 Nesting Environments
9300 \emph default
9301  of the 
9302 \emph on
9303 User's Guide
9304 \emph default
9305  for information on nesting.
9306 \end_layout
9307
9308 \begin_layout Standard
9309 And these environments are provided by 
9310 \begin_inset Flex Code
9311 status collapsed
9312
9313 \begin_layout Plain Layout
9314 Theorems (AMS-Extended)
9315 \end_layout
9316
9317 \end_inset
9318
9319 :
9320 \end_layout
9321
9322 \begin_layout Criterion*
9323 A required condition.
9324 \end_layout
9325
9326 \begin_layout Algorithm*
9327 A general procedure to be used.
9328 \end_layout
9329
9330 \begin_layout Axiom*
9331 This is a property or statement taken as true within the system being discussed.
9332 \end_layout
9333
9334 \begin_layout Condition*
9335 Sometimes used to state a condition assumed within the present context of
9336  discussion.
9337 \end_layout
9338
9339 \begin_layout Note*
9340 Similar to a Remark.
9341 \end_layout
9342
9343 \begin_layout Notation*
9344 Used for the explanation of, yes, notation.
9345 \end_layout
9346
9347 \begin_layout Summary
9348 Do we really need to tell you? 
9349 \end_layout
9350
9351 \begin_layout Acknowledgement*
9352 Acknowledgement.
9353 \end_layout
9354
9355 \begin_layout Conclusion*
9356 Sometimes used at the end of a long train of argument.
9357 \end_layout
9358
9359 \begin_layout Fact
9360 Used in a way similar to Proposition, though perhaps lower on the scale.
9361 \end_layout
9362
9363 \begin_layout Standard
9364 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9365  fonts packages.
9366  They need to be available on your system in order to use these environments.
9367 \end_layout
9368
9369 \begin_layout Section
9370 AGU journals (
9371 \family sans
9372 aguplus
9373 \family default
9374 )
9375 \end_layout
9376
9377 \begin_layout Standard
9378 by 
9379 \shape smallcaps
9380 Martin Vermeer
9381 \end_layout
9382
9383 \begin_layout Subsection
9384 Description
9385 \end_layout
9386
9387 \begin_layout Standard
9388 These are the layout files for some of the journals of the American Geophysical
9389  Society.
9390  It is assumed that you have both the AGU's own class files and AGUplus
9391  installed (everything to be found at
9392 \begin_inset Flex URL
9393 status collapsed
9394
9395 \begin_layout Plain Layout
9396
9397 ftp://ftp.agu.org/journals/latex/journals
9398 \end_layout
9399
9400 \end_inset
9401
9402 ).
9403 \end_layout
9404
9405 \begin_layout Subsection
9406 New styles
9407 \end_layout
9408
9409 \begin_layout Standard
9410 Redefined are 
9411 \family sans
9412 Paragraph
9413 \family default
9414
9415 \family sans
9416 Paragraph*
9417 \family default
9418 .
9419  They are still called this in the LyX GUI, though their LaTeX equivalents
9420  in the AGU classes are 
9421 \family sans
9422 Subsubsubsection
9423 \family default
9424  and 
9425 \family sans
9426 Subsubsubsection*
9427 \family default
9428 .
9429 \end_layout
9430
9431 \begin_layout Standard
9432 Newly defined styles are 
9433 \family sans
9434 Left_Header
9435 \family default
9436
9437 \family sans
9438 Right_Header
9439 \family default
9440
9441 \family sans
9442 Received
9443 \family default
9444
9445 \family sans
9446 Revised
9447 \family default
9448
9449 \family sans
9450 Accepted
9451 \family default
9452
9453 \family sans
9454 CCC
9455 \family default
9456
9457 \family sans
9458 PaperId
9459 \family default
9460
9461 \family sans
9462 AuthorAddr
9463 \family default
9464
9465 \family sans
9466 SlugComment
9467 \family default
9468 .
9469  These are mostly manuscript attributes and defined in the AGU class documentati
9470 on.
9471 \end_layout
9472
9473 \begin_layout Standard
9474 I suspect this is still badly incomplete.
9475 \end_layout
9476
9477 \begin_layout Subsection
9478 New floats
9479 \end_layout
9480
9481 \begin_layout Standard
9482
9483 \family sans
9484 Planotable
9485 \family default
9486  and 
9487 \family sans
9488 Plate
9489 \family default
9490 .
9491  We also have a new 
9492 \family sans
9493 Table_Caption
9494 \family default
9495 .
9496 \end_layout
9497
9498 \begin_layout Subsection
9499 Supported journals
9500 \end_layout
9501
9502 \begin_layout Itemize
9503
9504 \emph on
9505 Journal of Geophysical Research
9506 \emph default
9507
9508 \family typewriter
9509 jgrga.layout
9510 \family default
9511  — Martin Vermeer
9512 \end_layout
9513
9514 \begin_layout Standard
9515 Add your own, it isn't so hard! Look at the 
9516 \family typewriter
9517 jgrga.layout
9518 \family default
9519  example and 
9520 \family typewriter
9521 aguplus.inc
9522 \family default
9523 .
9524 \end_layout
9525
9526 \begin_layout Subsection
9527 Bugs and things to remember
9528 \end_layout
9529
9530 \begin_layout Standard
9531 In order to use the new layouts, you must remember to do the following for
9532  a new document:
9533 \end_layout
9534
9535 \begin_layout Enumerate
9536
9537 \emph on
9538 Turn off babel
9539 \emph default
9540 .
9541  This can be done in the 
9542 \family sans
9543 Layout\SpecialChar \menuseparator
9544 Document
9545 \family default
9546  or 
9547 \family sans
9548 Document\SpecialChar \menuseparator
9549 Settings
9550 \family default
9551  menu item.
9552  (AGU articles are always in English, right? So 
9553 \emph on
9554 don't
9555 \emph default
9556  choose a language.)
9557 \end_layout
9558
9559 \begin_layout Enumerate
9560 Enter 
9561 \family typewriter
9562 jgrga
9563 \family default
9564  into the document's 
9565 \family sans
9566 Extra Options
9567 \family default
9568  field.
9569  (Yes, this is a bug.)
9570 \end_layout
9571
9572 \begin_layout Enumerate
9573 Make sure you use the 
9574 \family typewriter
9575 agu.bst
9576 \family default
9577  bibliography style, by entering 
9578 \family sans
9579 agu
9580 \family default
9581  into the second field of the BibTeX inset.
9582  None of the standard styles will do.
9583 \end_layout
9584
9585 \begin_layout Section
9586 Broadway
9587 \end_layout
9588
9589 \begin_layout Standard
9590 by 
9591 \shape smallcaps
9592 Garst Reese
9593 \end_layout
9594
9595 \begin_layout Subsection
9596 Introduction
9597 \end_layout
9598
9599 \begin_layout Standard
9600 Broadway is for writing plays.
9601  The format is more decorative than Hollywood, and much less standardized.
9602  This format should be suitable for workshops.
9603 \end_layout
9604
9605 \begin_layout Subsection
9606 Special problems
9607 \end_layout
9608
9609 \begin_layout Standard
9610 The same as in Hollywood.
9611 \end_layout
9612
9613 \begin_layout Subsection
9614 Special features
9615 \end_layout
9616
9617 \begin_layout Standard
9618 Insert the 
9619 \family sans
9620 Speaker
9621 \family default
9622  names as labels then cross-reference the label to insert the name.
9623  The cross-reference dialog will show the current cast of characters.
9624 \end_layout
9625
9626 \begin_layout Subsection
9627 Paper size and Margins
9628 \end_layout
9629
9630 \begin_layout Standard
9631 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9632 \end_layout
9633
9634 \begin_layout Subsection
9635 Environments
9636 \end_layout
9637
9638 \begin_layout Standard
9639 The following environments are available.
9640  You can use broadway.bind to get the bind keys shown at the right.
9641 \end_layout
9642
9643 \begin_layout Itemize
9644
9645 \family sans
9646 Standard
9647 \begin_inset Newline newline
9648 \end_inset
9649
9650
9651 \family default
9652 You should not have to use this, but it is here for anything that does not
9653  fit otherwise.
9654 \end_layout
9655
9656 \begin_layout Itemize
9657
9658 \family sans
9659 Narrative
9660 \begin_inset space \hfill{}
9661 \end_inset
9662
9663 M-z n
9664 \begin_inset Newline newline
9665 \end_inset
9666
9667
9668 \family default
9669 Used to describe stage setting and the action.
9670  First use of speaker names in all CAPs.
9671 \end_layout
9672
9673 \begin_layout Itemize
9674
9675 \family sans
9676 ACT
9677 \begin_inset space \hfill{}
9678 \end_inset
9679
9680 M-z a
9681 \begin_inset Newline newline
9682 \end_inset
9683
9684
9685 \family default
9686 Automatically numbered.
9687  On screen it will be arabic, but will print as Roman.
9688 \end_layout
9689
9690 \begin_layout Itemize
9691
9692 \family sans
9693 ACT*
9694 \begin_inset space \hfill{}
9695 \end_inset
9696
9697 M-z S at
9698 \begin_inset Newline newline
9699 \end_inset
9700
9701
9702 \family default
9703 Subtitle for 
9704 \family sans
9705 ACT.
9706
9707 \family default
9708  It is just centered text.
9709 \end_layout
9710
9711 \begin_layout Itemize
9712
9713 \family sans
9714 SCENE
9715 \begin_inset space \hfill{}
9716 \end_inset
9717
9718 M-z S-S
9719 \begin_inset Newline newline
9720 \end_inset
9721
9722
9723 \family default
9724 Not automatically numbered.
9725  You supply the number.
9726  This is because I couldn't figure out how.
9727 \end_layout
9728
9729 \begin_layout Itemize
9730
9731 \family sans
9732 AT_RISE:
9733 \begin_inset space \hfill{}
9734 \end_inset
9735
9736 M-z S-R
9737 \begin_inset Newline newline
9738 \end_inset
9739
9740
9741 \family default
9742 A special case of Narrative to describe the setting and action as the curtain
9743  rises.
9744 \end_layout
9745
9746 \begin_layout Itemize
9747
9748 \family sans
9749 Speaker
9750 \begin_inset space \hfill{}
9751 \end_inset
9752
9753 M-z s
9754 \begin_inset Newline newline
9755 \end_inset
9756
9757
9758 \family default
9759 The speaker's (actor's) title, centered in all CAPS.
9760 \end_layout
9761
9762 \begin_layout Itemize
9763
9764 \family sans
9765 Parenthetical
9766 \begin_inset space \hfill{}
9767 \end_inset
9768
9769 M-z p
9770 \begin_inset Newline newline
9771 \end_inset
9772
9773
9774 \family default
9775 Instructions to the speaker.
9776  The parentheses are automatically inserted.
9777  The ( will appear on screen, but both will be in the printed play.
9778  This environment is only used within 
9779 \family sans
9780 Dialogue
9781 \family default
9782 .
9783 \end_layout
9784
9785 \begin_layout Itemize
9786
9787 \family sans
9788 Dialogue
9789 \begin_inset space \hfill{}
9790 \end_inset
9791
9792 M-z d
9793 \begin_inset Newline newline
9794 \end_inset
9795
9796
9797 \family default
9798 What the Speaker says.
9799 \end_layout
9800
9801 \begin_layout Itemize
9802
9803 \family sans
9804 CURTAIN
9805 \begin_inset space \hfill{}
9806 \end_inset
9807
9808 M-z S-C
9809 \begin_inset Newline newline
9810 \end_inset
9811
9812
9813 \family default
9814 The curtain comes down.
9815 \end_layout
9816
9817 \begin_layout Itemize
9818
9819 \family sans
9820 Title
9821 \begin_inset space \hfill{}
9822 \end_inset
9823
9824 M-z S-T
9825 \end_layout
9826
9827 \begin_layout Itemize
9828
9829 \family sans
9830 Author
9831 \begin_inset space \hfill{}
9832 \end_inset
9833
9834 M-z S-A
9835 \end_layout
9836
9837 \begin_layout Itemize
9838
9839 \family sans
9840 Right_Address
9841 \begin_inset space \hfill{}
9842 \end_inset
9843
9844 M-z r
9845 \end_layout
9846
9847 \begin_layout Standard
9848 Hello there.
9849 \end_layout
9850
9851 \begin_layout Section
9852 Dinbrief
9853 \end_layout
9854
9855 \begin_layout Standard
9856 The document class 
9857 \family sans
9858 dinbrief
9859 \family default
9860  can be used to type letters according to German conventions.
9861  A template file is included in 
9862 \family typewriter
9863 .../lyx/share/templates
9864 \family default
9865  for you to use as a starting point.
9866 \end_layout
9867
9868 \begin_layout Section
9869 EGS journals (
9870 \family sans
9871 egs
9872 \family default
9873 )
9874 \end_layout
9875
9876 \begin_layout Standard
9877 by 
9878 \shape smallcaps
9879 Martin Vermeer
9880 \end_layout
9881
9882 \begin_layout Subsection
9883 Description
9884 \end_layout
9885
9886 \begin_layout Standard
9887 This is the layout file for the European Geophysical Society journals.
9888  The needed 
9889 \family typewriter
9890 egs.cls
9891 \family default
9892  can be downloaded from the web site of the EGS under 
9893 \begin_inset Flex URL
9894 status collapsed
9895
9896 \begin_layout Plain Layout
9897
9898 www.copernicus.org
9899 \end_layout
9900
9901 \end_inset
9902
9903 .
9904 \end_layout
9905
9906 \begin_layout Subsection
9907 New styles
9908 \end_layout
9909
9910 \begin_layout Standard
9911
9912 \family sans
9913 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9914  Accepted
9915 \family default
9916
9917 \family sans
9918 Offsets
9919 \family default
9920 .
9921  The current layout file is unfortunately very unmodular and would benefit
9922  from using the various 
9923 \family typewriter
9924 std*.inc
9925 \family default
9926  file inclusions.
9927 \end_layout
9928
9929 \begin_layout Section
9930 Elsevier Journals
9931 \end_layout
9932
9933 \begin_layout Standard
9934 See the LyX template file 
9935 \family typewriter
9936 elsarticle.lyx
9937 \family default
9938 .
9939  It contains all infos you need.
9940 \end_layout
9941
9942 \begin_layout Section
9943 Foils [aka 
9944 \family sans
9945 FoilTeX
9946 \family default
9947 ]
9948 \begin_inset CommandInset label
9949 LatexCommand label
9950 name "sec:foiltex"
9951
9952 \end_inset
9953
9954
9955 \end_layout
9956
9957 \begin_layout Standard
9958 by 
9959 \noun on
9960 Allan Rae
9961 \end_layout
9962
9963 \begin_layout Subsection
9964 Introduction
9965 \end_layout
9966
9967 \begin_layout Standard
9968 This section describes how to use LyX to make slides for overhead projectors.
9969  There are two document classes that can do this: the default slides class
9970  and the 
9971 \family sans
9972 FoilTeX
9973 \family default
9974  slides class.
9975  This section documents the latter.
9976 \end_layout
9977
9978 \begin_layout Standard
9979 I'm going to say this again, nice and clear, so that there's no misunderstanding
9980 :
9981 \end_layout
9982
9983 \begin_layout Standard
9984 \begin_inset VSpace bigskip
9985 \end_inset
9986
9987
9988 \end_layout
9989
9990 \begin_layout Standard
9991 \align center
9992
9993 \size large
9994 This section documents the class 
9995 \begin_inset Quotes eld
9996 \end_inset
9997
9998
9999 \family sans
10000 slides (FoilTeX)
10001 \family default
10002
10003 \begin_inset Quotes erd
10004 \end_inset
10005
10006  
10007 \emph on
10008 only.
10009 \end_layout
10010
10011 \begin_layout Standard
10012 \begin_inset VSpace bigskip
10013 \end_inset
10014
10015
10016 \end_layout
10017
10018 \begin_layout Standard
10019 If you're looking for the documentation for 
10020 \begin_inset Quotes eld
10021 \end_inset
10022
10023
10024 \family sans
10025 slides (default)
10026 \family default
10027
10028 \begin_inset Quotes erd
10029 \end_inset
10030
10031 , check out section
10032 \begin_inset space ~
10033 \end_inset
10034
10035
10036 \begin_inset CommandInset ref
10037 LatexCommand ref
10038 reference "sec:slitex"
10039
10040 \end_inset
10041
10042 .
10043  If your machine doesn't have the 
10044 \family sans
10045 foils
10046 \family default
10047  class [
10048 \begin_inset Quotes eld
10049 \end_inset
10050
10051
10052 \family sans
10053 slides (FoilTeX)
10054 \family default
10055
10056 \begin_inset Quotes erd
10057 \end_inset
10058
10059 ] installed, you'll probably have to use the default 
10060 \family sans
10061 slides
10062 \family default
10063  class, which isn't quite as good as 
10064 \family sans
10065 foils.
10066 \end_layout
10067
10068 \begin_layout Standard
10069 The 
10070 \family sans
10071 foils
10072 \family default
10073  class is designed for use with version 2.1 of the 
10074 \family sans
10075 foils.cls
10076 \family default
10077  LaTeX class file which is now an integral part of LaTeX2e.
10078 \end_layout
10079
10080 \begin_layout Subsection
10081 Getting Started
10082 \end_layout
10083
10084 \begin_layout Standard
10085 Obviously, to use this document class, you need to select 
10086 \begin_inset Quotes eld
10087 \end_inset
10088
10089
10090 \family sans
10091 slides (FoilTeX)
10092 \family default
10093
10094 \begin_inset Quotes erd
10095 \end_inset
10096
10097  from the 
10098 \family sans
10099 Class
10100 \family default
10101  entry in the 
10102 \family sans
10103 Document
10104 \begin_inset space ~
10105 \end_inset
10106
10107 Layout
10108 \family default
10109  dialog.
10110  There are some settings in the 
10111 \family sans
10112 Document
10113 \begin_inset space ~
10114 \end_inset
10115
10116 Layout
10117 \family default
10118  dialog that you should know about that are specific to this class:
10119 \end_layout
10120
10121 \begin_layout Itemize
10122 Don't change the options 
10123 \family sans
10124 Sides
10125 \family default
10126  and 
10127 \family sans
10128 Columns
10129 \family default
10130  on the 
10131 \family sans
10132 Document
10133 \begin_inset space ~
10134 \end_inset
10135
10136 Layout
10137 \family default
10138  dialog.
10139  They're ignored by the 
10140 \family sans
10141 foils
10142 \family default
10143  class.
10144 \end_layout
10145
10146 \begin_layout Itemize
10147 The default font size is 20
10148 \begin_inset space \thinspace{}
10149 \end_inset
10150
10151 pt with the other options being 17
10152 \begin_inset space \thinspace{}
10153 \end_inset
10154
10155 pt, 25
10156 \begin_inset space \thinspace{}
10157 \end_inset
10158
10159 pt and 30
10160 \begin_inset space \thinspace{}
10161 \end_inset
10162
10163 pt.
10164 \end_layout
10165
10166 \begin_layout Itemize
10167 The default font is 
10168 \family sans
10169 sans
10170 \family default
10171  
10172 \family sans
10173 serif
10174 \family default
10175  but all math equations are still typeset in the usual roman font.
10176 \end_layout
10177
10178 \begin_layout Itemize
10179
10180 \family sans
10181 FoilTeX
10182 \family default
10183  supports A4 and Letter paper sizes as well as a special size for working
10184  with 35
10185 \begin_inset space \thinspace{}
10186 \end_inset
10187
10188 mm slides.
10189  It doesn't support A5, B5, legal or executive paper sizes.
10190 \end_layout
10191
10192 \begin_layout Itemize
10193 Don't bother changing the 
10194 \family sans
10195 Float Placement
10196 \family default
10197  settings because they are ignored anyway.
10198  All floats appear where they are defined in the text.
10199 \end_layout
10200
10201 \begin_layout Itemize
10202 The 
10203 \family sans
10204 Pagestyle
10205 \family default
10206  setting behaves a bit differently for this class.
10207  
10208 \family sans
10209 FoilTeX
10210 \family default
10211  provides extensive footer and header capabilities including a user-defined
10212  logo.
10213  See section
10214 \begin_inset space ~
10215 \end_inset
10216
10217
10218 \begin_inset CommandInset ref
10219 LatexCommand ref
10220 reference "sec:foilfoot"
10221
10222 \end_inset
10223
10224  for more details.
10225  The title page is treated differently to all other pages in the document
10226  and is 
10227 \emph on
10228 always
10229 \emph default
10230  unnumbered and 
10231 \emph on
10232 always
10233 \emph default
10234  has the logo centered at the bottom of the page (if one is defined).
10235  The possible page style choices and what they do are as follows:
10236 \end_layout
10237
10238 \begin_deeper
10239 \begin_layout Labeling
10240 \labelwidthstring MMMMMMM
10241
10242 \family sans
10243 \series bold
10244 empty
10245 \family default
10246 \series default
10247  The final output contains no page numbers, or other headers or footers
10248  (except footnotes of course).
10249  
10250 \end_layout
10251
10252 \begin_layout Labeling
10253 \labelwidthstring MMMMMMM
10254
10255 \family sans
10256 \series bold
10257 plain
10258 \family default
10259 \series default
10260  The final output contains page numbers centered at the bottom of the page.
10261  No other headings or footers (other than footnotes).
10262 \end_layout
10263
10264 \begin_layout Labeling
10265 \labelwidthstring MMMMMMM
10266
10267 \series bold
10268 foilheadings
10269 \series default
10270  Page numbers in lower right corner.
10271  Additional headers and footers are also shown.
10272  This is also the default.
10273 \end_layout
10274
10275 \begin_layout Labeling
10276 \labelwidthstring MMMMMMM
10277
10278 \series bold
10279 fancy
10280 \series default
10281  Gives you access to the 
10282 \family sans
10283 fancyheadings
10284 \family default
10285  package although its use with 
10286 \family sans
10287 FoilTeX
10288 \family default
10289  is discouraged by the writer of the 
10290 \family sans
10291 FoilTeX
10292 \family default
10293  package because of some potential page layout clashes.
10294 \end_layout
10295
10296 \end_deeper
10297 \begin_layout Subsubsection
10298 Extra Options
10299 \end_layout
10300
10301 \begin_layout Standard
10302 The following options may be used in the extra class options in the 
10303 \family sans
10304 Document\SpecialChar \menuseparator
10305 Settings
10306 \family default
10307  dialog.
10308 \end_layout
10309
10310 \begin_layout Labeling
10311 \labelwidthstring MMMMMMx
10312
10313 \series bold
10314 35mmSlide
10315 \series default
10316  This sets up the page layout for 7.33
10317 \begin_inset space \thinspace{}
10318 \end_inset
10319
10320 in by 11
10321 \begin_inset space \thinspace{}
10322 \end_inset
10323
10324 in paper, which is about the same aspect ratio as a 35
10325 \begin_inset space \thinspace{}
10326 \end_inset
10327
10328 mm slide, making it a bit easier to work with this medium.
10329 \end_layout
10330
10331 \begin_layout Labeling
10332 \labelwidthstring MMMMMMx
10333
10334 \series bold
10335 headrule
10336 \series default
10337  Places a rule across the page below the header on every page except the
10338  title page.
10339 \end_layout
10340
10341 \begin_layout Labeling
10342 \labelwidthstring MMMMMMx
10343
10344 \series bold
10345 footrule
10346 \series default
10347  Places a rule across the page above the footer on every page except the
10348  title page.
10349 \end_layout
10350
10351 \begin_layout Labeling
10352 \labelwidthstring MMMMMMx
10353
10354 \series bold
10355 dvips
10356 \series default
10357  This is automatically set each time you create a new 
10358 \family sans
10359 foils
10360 \family default
10361  document.
10362  This option tells 
10363 \family sans
10364 FoilTeX
10365 \family default
10366  to use the dvips driver to rotate those pages that are set as landscape
10367  foils.
10368 \end_layout
10369
10370 \begin_layout Labeling
10371 \labelwidthstring MMMMMMx
10372
10373 \series bold
10374 landscape
10375 \series default
10376  Simply changes the page dimensions to those of a landscape page but doesn't
10377  do any rotation.
10378  Thus if you use this option you need to use an external program to rotate
10379  each page or feed your paper through your printer as landscape.
10380  Note that this option effectively reverses the roles of the 
10381 \family sans
10382 Foilhead
10383 \family default
10384  and 
10385 \family sans
10386 Rotatefoilhead
10387 \family default
10388  environments (don't worry these are described in the next section).
10389 \end_layout
10390
10391 \begin_layout Labeling
10392 \labelwidthstring MMMMMMx
10393
10394 \series bold
10395 leqno
10396 \series default
10397  Equation numbers on the left.
10398 \end_layout
10399
10400 \begin_layout Labeling
10401 \labelwidthstring MMMMMMx
10402
10403 \series bold
10404 fleqn
10405 \series default
10406  Flush-left equations.
10407 \end_layout
10408
10409 \begin_layout Subsection
10410 Supported Environments
10411 \end_layout
10412
10413 \begin_layout Standard
10414 Most of the environments commonly supported in other classes are also supported
10415  by the 
10416 \family sans
10417 foils
10418 \family default
10419  class.
10420  There are several additional environments provided by 
10421 \family sans
10422 FoilTeX
10423 \family default
10424  as well as a couple added by LyX.
10425  The following environments are shared with other classes:
10426 \end_layout
10427
10428 \begin_layout Standard
10429 \begin_inset ERT
10430 status open
10431
10432 \begin_layout Plain Layout
10433
10434
10435 \backslash
10436 begin{multicols}{2}
10437 \end_layout
10438
10439 \end_inset
10440
10441
10442 \end_layout
10443
10444 \begin_layout Itemize
10445
10446 \family sans
10447 Standard
10448 \end_layout
10449
10450 \begin_layout Itemize
10451
10452 \family sans
10453 Itemize
10454 \end_layout
10455
10456 \begin_layout Itemize
10457
10458 \family sans
10459 Enumerate
10460 \end_layout
10461
10462 \begin_layout Itemize
10463
10464 \family sans
10465 Description
10466 \end_layout
10467
10468 \begin_layout Itemize
10469
10470 \family sans
10471 List
10472 \end_layout
10473
10474 \begin_layout Itemize
10475
10476 \family sans
10477 LyX-Code
10478 \end_layout
10479
10480 \begin_layout Itemize
10481
10482 \family sans
10483 Verse
10484 \end_layout
10485
10486 \begin_layout Itemize
10487
10488 \family sans
10489 Quote
10490 \end_layout
10491
10492 \begin_layout Itemize
10493
10494 \family sans
10495 Quotation
10496 \end_layout
10497
10498 \begin_layout Itemize
10499
10500 \family sans
10501 Title
10502 \end_layout
10503
10504 \begin_layout Itemize
10505
10506 \family sans
10507 Author
10508 \end_layout
10509
10510 \begin_layout Itemize
10511
10512 \family sans
10513 Date
10514 \end_layout
10515
10516 \begin_layout Itemize
10517
10518 \family sans
10519 Abstract
10520 \end_layout
10521
10522 \begin_layout Itemize
10523
10524 \family sans
10525 Bibliography
10526 \end_layout
10527
10528 \begin_layout Itemize
10529
10530 \family sans
10531 Address
10532 \end_layout
10533
10534 \begin_layout Itemize
10535
10536 \family sans
10537 RightAddress
10538 \end_layout
10539
10540 \begin_layout Itemize
10541
10542 \family sans
10543 Caption
10544 \end_layout
10545
10546 \begin_layout Itemize
10547
10548 \family sans
10549 Comment
10550 \end_layout
10551
10552 \begin_layout Standard
10553 \begin_inset ERT
10554 status open
10555
10556 \begin_layout Plain Layout
10557
10558
10559 \backslash
10560 end{multicols}
10561 \end_layout
10562
10563 \end_inset
10564
10565
10566 \end_layout
10567
10568 \begin_layout Standard
10569 That is, all the major environments apart from the sectioning environments.
10570  Since foils are essentially self-contained sections, with a title and body,
10571  
10572 \family sans
10573 FoilTeX
10574 \family default
10575  provides specific commands for starting new foils and these are:
10576 \end_layout
10577
10578 \begin_layout Itemize
10579
10580 \family sans
10581 Foilhead
10582 \end_layout
10583
10584 \begin_layout Itemize
10585
10586 \family sans
10587 Rotatefoilhead
10588 \end_layout
10589
10590 \begin_layout Standard
10591 LyX also provides slightly modified versions of these two environments called:
10592 \end_layout
10593
10594 \begin_layout Itemize
10595
10596 \family sans
10597 ShortFoilhead
10598 \end_layout
10599
10600 \begin_layout Itemize
10601
10602 \family sans
10603 ShortRotatefoilhead
10604 \end_layout
10605
10606 \begin_layout Standard
10607 and the differences will be explained in the next section.
10608 \end_layout
10609
10610 \begin_layout Standard
10611 Since foils are often used in presenting ideas or new theorems and such
10612  
10613 \family sans
10614 FoilTeX
10615 \family default
10616  also provides a comprehensive box of goodies for presenting them:
10617 \end_layout
10618
10619 \begin_layout Standard
10620 \begin_inset ERT
10621 status open
10622
10623 \begin_layout Plain Layout
10624
10625
10626 \backslash
10627 begin{multicols}{2}
10628 \end_layout
10629
10630 \end_inset
10631
10632
10633 \end_layout
10634
10635 \begin_layout Itemize
10636
10637 \family sans
10638 Theorem
10639 \end_layout
10640
10641 \begin_layout Itemize
10642
10643 \family sans
10644 Lemma
10645 \end_layout
10646
10647 \begin_layout Itemize
10648
10649 \family sans
10650 Corollary
10651 \end_layout
10652
10653 \begin_layout Itemize
10654
10655 \family sans
10656 Proposition
10657 \end_layout
10658
10659 \begin_layout Itemize
10660
10661 \family sans
10662 Definition
10663 \end_layout
10664
10665 \begin_layout Itemize
10666
10667 \family sans
10668 Proof
10669 \end_layout
10670
10671 \begin_layout Itemize
10672
10673 \family sans
10674 Theorem*
10675 \end_layout
10676
10677 \begin_layout Itemize
10678
10679 \family sans
10680 Lemma*
10681 \end_layout
10682
10683 \begin_layout Itemize
10684
10685 \family sans
10686 Corollary*
10687 \end_layout
10688
10689 \begin_layout Itemize
10690
10691 \family sans
10692 Proposition*
10693 \end_layout
10694
10695 \begin_layout Itemize
10696
10697 \family sans
10698 Definition*
10699 \end_layout
10700
10701 \begin_layout Standard
10702 \begin_inset ERT
10703 status open
10704
10705 \begin_layout Plain Layout
10706
10707
10708 \backslash
10709 end{multicols}
10710 \end_layout
10711
10712 \end_inset
10713
10714
10715 \end_layout
10716
10717 \begin_layout Standard
10718 The starred versions are unnumbered while the unstarred versions are numbered.
10719  There are also two list environments added by LyX and these are:
10720 \end_layout
10721
10722 \begin_layout Itemize
10723
10724 \family sans
10725 TickList
10726 \end_layout
10727
10728 \begin_layout Itemize
10729
10730 \family sans
10731 CrossList
10732 \end_layout
10733
10734 \begin_layout Standard
10735
10736 \family sans
10737 FoilTeX
10738 \family default
10739  provides some powerful header and footer capabilities that are best set
10740  in the preamble although they may be set at any point in a document.
10741  If you want to change these settings in your document the best place to
10742  do so is at the very top of a foil, i.
10743 \begin_inset space \thinspace{}
10744 \end_inset
10745
10746 e.
10747 \emph on
10748
10749 \begin_inset space \space{}
10750 \end_inset
10751
10752
10753 \emph default
10754 straight after the foilhead.
10755 \end_layout
10756
10757 \begin_layout Standard
10758 For this purpose, the following command styles are provided [
10759 \shape smallcaps
10760 Martin Vermeer
10761 \shape default
10762 ]:
10763 \end_layout
10764
10765 \begin_layout Standard
10766 \begin_inset ERT
10767 status open
10768
10769 \begin_layout Plain Layout
10770
10771
10772 \backslash
10773 begin{multicols}{2}
10774 \end_layout
10775
10776 \end_inset
10777
10778
10779 \end_layout
10780
10781 \begin_layout Itemize
10782
10783 \family sans
10784 My
10785 \begin_inset space ~
10786 \end_inset
10787
10788 Logo
10789 \end_layout
10790
10791 \begin_layout Itemize
10792
10793 \family sans
10794 Restriction
10795 \end_layout
10796
10797 \begin_layout Itemize
10798
10799 \family sans
10800 Right
10801 \begin_inset space ~
10802 \end_inset
10803
10804 Footer
10805 \end_layout
10806
10807 \begin_layout Itemize
10808
10809 \family sans
10810 Right
10811 \begin_inset space ~
10812 \end_inset
10813
10814 Header
10815 \end_layout
10816
10817 \begin_layout Itemize
10818
10819 \family sans
10820 Left
10821 \begin_inset space ~
10822 \end_inset
10823
10824 Header
10825 \end_layout
10826
10827 \begin_deeper
10828 \begin_layout Standard
10829 \begin_inset space ~
10830 \end_inset
10831
10832
10833 \end_layout
10834
10835 \end_deeper
10836 \begin_layout Standard
10837 \begin_inset ERT
10838 status open
10839
10840 \begin_layout Plain Layout
10841
10842
10843 \backslash
10844 end{multicols}
10845 \end_layout
10846
10847 \end_inset
10848
10849
10850 \end_layout
10851
10852 \begin_layout Standard
10853 There are also a few commands provided by 
10854 \family sans
10855 FoilTeX
10856 \family default
10857  that aren't directly supported by LyX but I'll tell you what they do and
10858  how to use them in section
10859 \begin_inset space ~
10860 \end_inset
10861
10862
10863 \begin_inset CommandInset ref
10864 LatexCommand ref
10865 reference "sec:unsuppfoils"
10866
10867 \end_inset
10868
10869 .
10870 \end_layout
10871
10872 \begin_layout Subsection
10873 Building a Set of Foils
10874 \end_layout
10875
10876 \begin_layout Standard
10877 This section will give a simple introduction to using the different environments
10878  to build a set of foils.
10879  If you want to see an example set of foils, take a look at the 
10880 \family typewriter
10881 Foils.lyx
10882 \family default
10883  file you find in LyX's 
10884 \family typewriter
10885 examples
10886 \family default
10887  folder.
10888 \end_layout
10889
10890 \begin_layout Subsubsection
10891 Give It a Title Page
10892 \end_layout
10893
10894 \begin_layout Standard
10895 Unlike other classes that provide 
10896 \family sans
10897 Title
10898 \family default
10899
10900 \family sans
10901 Author
10902 \family default
10903
10904 \family sans
10905 Date
10906 \family default
10907  and 
10908 \family sans
10909 Abstract
10910 \family default
10911  environments, 
10912 \family sans
10913 foils
10914 \family default
10915  creates the title on a page of its own.
10916  If you leave out the 
10917 \family sans
10918 Date
10919 \family default
10920  environment LaTeX will substitute the current date (every time you regenerate
10921  the output).
10922 \end_layout
10923
10924 \begin_layout Subsubsection
10925 Start a New Foil
10926 \end_layout
10927
10928 \begin_layout Standard
10929 As I mentioned earlier, there are four ways of starting a new foil.
10930  For portrait foils you should use 
10931 \family sans
10932 Foilhead
10933 \family default
10934  or 
10935 \family sans
10936 ShortFoilhead.
10937
10938 \family default
10939  The difference between these two environments is the amount of space between
10940  the title of the foil (the foilhead) and the body of the foil.
10941 \end_layout
10942
10943 \begin_layout Standard
10944 Landscape foils are generated using the 
10945 \family sans
10946 Rotatefoilhead
10947 \family default
10948  and 
10949 \family sans
10950 ShortRotatefoilhead
10951 \family default
10952  environments.
10953  Again the only difference is the spacing between foilhead and body.
10954  Both of the short versions have 0.5 inches less separation between the foilhead
10955  and the body.
10956  
10957 \end_layout
10958
10959 \begin_layout Standard
10960 One problem with the support for landscape foils is the requirement that
10961  you have to use the 
10962 \family typewriter
10963 dvips
10964 \family default
10965  driver to generate the PostScript output otherwise the foils won't be rotated.
10966  It is possible to get landscape foils even if you haven't got the 
10967 \family typewriter
10968 dvips
10969 \family default
10970  driver provided you can feed your foils sideways through your printer ;-)
10971 \end_layout
10972
10973 \begin_layout Subsubsection
10974 Theorems, Lemmas, Proofs and more
10975 \end_layout
10976
10977 \begin_layout Standard
10978 Due to a small bug in LyX you can't have two of the same type of these environme
10979 nts directly following each other.
10980  They must be separated by something.
10981  If you try, you will just be extending the previous environment as if you
10982  had merged the two environments together.
10983  So, how do you get around this problem? The simplest option is to insert
10984  some text between the two environments or add a 
10985 \family sans
10986 LaTeX
10987 \family default
10988  environment between the two with just a 
10989 \begin_inset Quotes eld
10990 \end_inset
10991
10992
10993 \family typewriter
10994 %
10995 \family default
10996
10997 \begin_inset Quotes erd
10998 \end_inset
10999
11000  in it.
11001  This will force LyX to produce two separate environments and hence the
11002  correct LaTeX output.
11003  An example is provided in the example file included with the LyX distribution.
11004  Remember, this problem only occurs if you are trying to place two of the
11005  same type of theorem-like environments one directly after the other.
11006 \end_layout
11007
11008 \begin_layout Subsubsection
11009 Lists
11010 \end_layout
11011
11012 \begin_layout Standard
11013 You get all the commonly supported list styles found in other classes as
11014  well as two new ones.
11015  I'll only describe the new ones here.
11016  If you want to find out more about the other list environments check out
11017  the 
11018 \emph on
11019 User's Guide.
11020
11021 \emph default
11022  If you intend to use itemized lists you might also want to read about the
11023  
11024 \family sans
11025 Itemize
11026 \begin_inset space ~
11027 \end_inset
11028
11029 Bullet
11030 \begin_inset space ~
11031 \end_inset
11032
11033 Selection
11034 \family default
11035  dialog described above in section
11036 \begin_inset space ~
11037 \end_inset
11038
11039
11040 \begin_inset CommandInset ref
11041 LatexCommand ref
11042 reference "sec:bullet"
11043
11044 \end_inset
11045
11046 .
11047 \end_layout
11048
11049 \begin_layout Standard
11050 The two new list styles, 
11051 \family sans
11052 TickList
11053 \family default
11054  and 
11055 \family sans
11056 CrossList
11057 \family default
11058 , are designed to make it easier for you to create lists of do's and don'ts
11059  or right and wrong by providing dedicated environments that use a tick
11060  or a cross as the label of the list.
11061  These lists are in fact dedicated variants of the 
11062 \family sans
11063 Itemize
11064 \family default
11065  environment.
11066  They do however require that you have the 
11067 \family typewriter
11068 psnfss
11069 \family default
11070  packages installed.
11071 \end_layout
11072
11073 \begin_layout Subsubsection
11074 Figures and Tables
11075 \end_layout
11076
11077 \begin_layout Standard
11078
11079 \family sans
11080 FoilTeX
11081 \family default
11082  redefines the floating tables and figures so that they appear exactly where
11083  they are in the text rather than pushing them to the top of the page or
11084  to some user specified location.
11085  In fact if you change the float placement settings they are simply ignored.
11086 \end_layout
11087
11088 \begin_layout Subsubsection
11089 Page Headers and Footers
11090 \begin_inset CommandInset label
11091 LatexCommand label
11092 name "sec:foilfoot"
11093
11094 \end_inset
11095
11096
11097 \end_layout
11098
11099 \begin_layout Standard
11100
11101 \family sans
11102 My
11103 \begin_inset space ~
11104 \end_inset
11105
11106 Logo
11107 \family default
11108  and 
11109 \family sans
11110 Restriction
11111 \family default
11112  are two commands used to control the left-footer text string.
11113  The first is meant to allow you to include a graphic logo on your foils
11114  and defaults to 
11115 \begin_inset Quotes eld
11116 \end_inset
11117
11118 -Typeset by 
11119 \family sans
11120 FoilTeX
11121 \family default
11122 -
11123 \begin_inset Quotes erd
11124 \end_inset
11125
11126 .
11127  While the second is meant to provide a classification for the audience,
11128  
11129 \emph on
11130 e.
11131 \begin_inset space \thinspace{}
11132 \end_inset
11133
11134 g.
11135 \emph default
11136
11137 \begin_inset space \space{}
11138 \end_inset
11139
11140 Confidential.
11141  It is empty by default.
11142 \end_layout
11143
11144 \begin_layout Standard
11145 The remaining page corners can be filled by 
11146 \family sans
11147 Right
11148 \begin_inset space ~
11149 \end_inset
11150
11151 Footer
11152 \family default
11153  (which defaults to page numbers), 
11154 \family sans
11155 Right
11156 \begin_inset space ~
11157 \end_inset
11158
11159 Header
11160 \family default
11161  (top right) and 
11162 \family sans
11163 Left
11164 \begin_inset space ~
11165 \end_inset
11166
11167 Header
11168 \family default
11169  (top left).
11170 \end_layout
11171
11172 \begin_layout Subsection
11173 Unsupported 
11174 \family sans
11175 FoilTeX
11176 \family default
11177  Goodies
11178 \begin_inset CommandInset label
11179 LatexCommand label
11180 name "sec:unsuppfoils"
11181
11182 \end_inset
11183
11184
11185 \end_layout
11186
11187 \begin_layout Standard
11188 All the commands mentioned below need to be set in a 
11189 \family sans
11190 LaTeX
11191 \family default
11192  environment or as 
11193 \family sans
11194 TeX
11195 \family default
11196  within another environment.
11197 \end_layout
11198
11199 \begin_layout Subsubsection
11200 Lengths
11201 \end_layout
11202
11203 \begin_layout Standard
11204 All lengths are adjusted using the 
11205 \family typewriter
11206
11207 \backslash
11208 setlength{
11209 \family default
11210 \emph on
11211 lengthname
11212 \family typewriter
11213 \emph default
11214 }{
11215 \family default
11216 \emph on
11217 newlength
11218 \family typewriter
11219 \emph default
11220 }
11221 \family default
11222  command.
11223  Where 
11224 \emph on
11225 lengthname
11226 \emph default
11227  should be replaced by the name given to the length you want to change and
11228  
11229 \emph on
11230 newlength
11231 \emph default
11232  is the length value.
11233  All lengths should be specified in units of length such as inches (
11234 \family typewriter
11235 in
11236 \family default
11237 ), millimeters (
11238 \family typewriter
11239 mm
11240 \family default
11241 ) or points (
11242 \family typewriter
11243 pt
11244 \family default
11245 ) or relative to some document or font-based length such as 
11246 \family typewriter
11247
11248 \backslash
11249 textwidth
11250 \family default
11251 .
11252  
11253 \end_layout
11254
11255 \begin_layout Standard
11256 It's possible to change the spacing between a foilhead and the body of the
11257  foil by adjusting the length specified by 
11258 \family typewriter
11259
11260 \backslash
11261 foilheadskip
11262 \family default
11263 .
11264  For example, to make 
11265 \emph on
11266 all
11267 \emph default
11268  foilheads 0.5
11269 \begin_inset space \space{}
11270 \end_inset
11271
11272 in closer to their bodies put the following in the preamble: 
11273 \family typewriter
11274
11275 \backslash
11276 setlength{
11277 \backslash
11278 foilheadskip}{-0.5in}
11279 \end_layout
11280
11281 \begin_layout Standard
11282 The spacings around floats can be adjusted by setting these lengths:
11283 \end_layout
11284
11285 \begin_layout Labeling
11286 \labelwidthstring MMMMMMMMMMM
11287
11288 \family typewriter
11289
11290 \backslash
11291 abovefloatskip
11292 \family default
11293  Separation between the text and the top of the float
11294 \end_layout
11295
11296 \begin_layout Labeling
11297 \labelwidthstring MMMMMMMMMMM
11298
11299 \family typewriter
11300
11301 \backslash
11302 abovecaptionskip
11303 \family default
11304  Separation between the float and the caption
11305 \end_layout
11306
11307 \begin_layout Labeling
11308 \labelwidthstring MMMMMMMMMMM
11309
11310 \family typewriter
11311
11312 \backslash
11313 belowcaptionskip
11314 \family default
11315  Separation between the caption and the following text
11316 \end_layout
11317
11318 \begin_layout Labeling
11319 \labelwidthstring MMMMMMMMMMM
11320
11321 \family typewriter
11322
11323 \backslash
11324 captionwidth
11325 \family default
11326  You can make the captions narrower than the surrounding text by adjusting
11327  this length.
11328  Best done relative to 
11329 \family typewriter
11330
11331 \backslash
11332 textwidth
11333 \family default
11334 .
11335 \end_layout
11336
11337 \begin_layout Standard
11338 There are also several title page related lengths that you may find useful
11339  if you have a long title or several authors:
11340 \end_layout
11341
11342 \begin_layout Labeling
11343 \labelwidthstring MMMMMMMMMMM
11344
11345 \family typewriter
11346
11347 \backslash
11348 abovetitleskip
11349 \family default
11350  Separation from headers to 
11351 \family sans
11352 Title
11353 \end_layout
11354
11355 \begin_layout Labeling
11356 \labelwidthstring MMMMMMMMMMM
11357
11358 \family typewriter
11359
11360 \backslash
11361 titleauthorskip
11362 \family default
11363  between 
11364 \family sans
11365 Title
11366 \family default
11367  and 
11368 \family sans
11369 Author
11370 \family default
11371  environments
11372 \end_layout
11373
11374 \begin_layout Labeling
11375 \labelwidthstring MMMMMMMMMMM
11376
11377 \family typewriter
11378
11379 \backslash
11380 authorauthorskip
11381 \family default
11382  between multiple 
11383 \family sans
11384 Author
11385 \family default
11386  lines
11387 \end_layout
11388
11389 \begin_layout Labeling
11390 \labelwidthstring MMMMMMMMMMM
11391
11392 \family typewriter
11393
11394 \backslash
11395 authordateskip
11396 \family default
11397  between the 
11398 \family sans
11399 Author
11400 \family default
11401  and the 
11402 \family sans
11403 Date
11404 \end_layout
11405
11406 \begin_layout Labeling
11407 \labelwidthstring MMMMMMMMMMM
11408
11409 \family typewriter
11410
11411 \backslash
11412 dateabstractskip
11413 \family default
11414  between the 
11415 \family sans
11416 Date
11417 \family default
11418  and the 
11419 \family sans
11420 Abstract
11421 \end_layout
11422
11423 \begin_layout Standard
11424 The last length related command affects all the list environments.
11425  If you place 
11426 \family typewriter
11427
11428 \backslash
11429 zerolistvertdimens
11430 \family default
11431  
11432 \emph on
11433 inside
11434 \emph default
11435  a list environment then all the vertical spacing between the list items
11436  is removed.
11437  Note that this is a command not a length so it doesn't require 
11438 \family typewriter
11439
11440 \backslash
11441 setlength
11442 \family default
11443  like the stuff mentioned above.
11444 \end_layout
11445
11446 \begin_layout Subsubsection
11447 Headers and Footers
11448 \end_layout
11449
11450 \begin_layout Standard
11451 The 
11452 \family typewriter
11453
11454 \backslash
11455 LogoOn
11456 \family default
11457  and 
11458 \family typewriter
11459
11460 \backslash
11461 LogoOff
11462 \family default
11463  commands control whether the logo in the 
11464 \family sans
11465 MyLogo
11466 \family default
11467  definition appear on a given page.
11468  If you put 
11469 \family typewriter
11470
11471 \backslash
11472 LogoOff
11473 \family default
11474  in the preamble then none of the foils will have the logo on them.
11475  If you don't want the logo on a particular page place the 
11476 \family typewriter
11477
11478 \backslash
11479 LogoOff
11480 \family default
11481  directly after the foilhead of that page and the 
11482 \family typewriter
11483
11484 \backslash
11485 LogoOn
11486 \family default
11487  directly after the next foilhead.
11488 \end_layout
11489
11490 \begin_layout Standard
11491 If you decide to use the 
11492 \family sans
11493 fancy
11494 \family default
11495  page style setting in the 
11496 \family sans
11497 Document
11498 \begin_inset space ~
11499 \end_inset
11500
11501 Layout
11502 \family default
11503  dialog you should probably add 
11504 \family typewriter
11505
11506 \backslash
11507 let
11508 \backslash
11509 headwidth
11510 \backslash
11511 textwidth
11512 \family default
11513  to your preamble so headers and footers on landscape pages are correctly
11514  placed when rotated.
11515  This is due to some clashes between the page layouts provided by the 
11516 \family sans
11517 fancyheadings
11518 \family default
11519  package and the 
11520 \family sans
11521 foils
11522 \family default
11523  class.
11524 \end_layout
11525
11526 \begin_layout Section
11527 Hollywood (Hollywood spec scripts)
11528 \end_layout
11529
11530 \begin_layout Standard
11531 by 
11532 \shape smallcaps
11533 Garst Reese
11534 \end_layout
11535
11536 \begin_layout Subsection
11537 Introduction
11538 \end_layout
11539
11540 \begin_layout Standard
11541 Getting the format of a Hollywood script right is a 
11542 \begin_inset Quotes eld
11543 \end_inset
11544
11545 rite of passage.
11546 \begin_inset Quotes erd
11547 \end_inset
11548
11549  It is designed to make the readers focus on content and to be easy and
11550  familiar for the actors to read.
11551  Each page of a script should be one minute of film.
11552  Nothing goes in a script that you cannot see or hear on screen.
11553  The courier 12 pt font should be used throughout.
11554  No italics.
11555 \end_layout
11556
11557 \begin_layout Subsection
11558 Special problems
11559 \end_layout
11560
11561 \begin_layout Standard
11562 Speakers' lines should NEVER break in mid-sentence.
11563  If a speaker's lines continue over a page break, repeat the 
11564 \family sans
11565 Speaker
11566 \family default
11567  title followed by (Cont'd).
11568 \end_layout
11569
11570 \begin_layout Subsection
11571 Special features
11572 \end_layout
11573
11574 \begin_layout Standard
11575 Insert the 
11576 \family sans
11577 Speaker
11578 \family default
11579  names as labels then cross-reference the label to insert the name.
11580  The cross-reference dialog will show the current cast of characters.
11581  You can use this to insert the speaker name in narratives also.
11582 \end_layout
11583
11584 \begin_layout Subsection
11585 Paper size and Margins
11586 \end_layout
11587
11588 \begin_layout Standard
11589 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11590 \end_layout
11591
11592 \begin_layout Subsection
11593 Environments
11594 \end_layout
11595
11596 \begin_layout Standard
11597 The following environments are available.
11598  You can use hollywood.bind to get the bind keys shown at the right.
11599 \end_layout
11600
11601 \begin_layout Itemize
11602
11603 \family sans
11604 Standard
11605 \begin_inset Newline newline
11606 \end_inset
11607
11608
11609 \family default
11610 Used where nothing else works.
11611  Try to avoid it.
11612 \end_layout
11613
11614 \begin_layout Itemize
11615
11616 \family sans
11617 FADE_IN
11618 \family default
11619 :
11620 \begin_inset space \hfill{}
11621 \end_inset
11622
11623
11624 \family sans
11625 M-z S-I
11626 \family default
11627
11628 \begin_inset Newline newline
11629 \end_inset
11630
11631 Usually followed by something like 
11632 \begin_inset Quotes eld
11633 \end_inset
11634
11635 on Sally waking up.
11636 \begin_inset Quotes erd
11637 \end_inset
11638
11639
11640 \end_layout
11641
11642 \begin_layout Itemize
11643
11644 \family sans
11645 INT:
11646 \begin_inset space \hfill{}
11647 \end_inset
11648
11649 M-z i
11650 \begin_inset Newline newline
11651 \end_inset
11652
11653
11654 \family default
11655 Introduces a new INTERIOR camera set-up.
11656  Always followed by DAY or NIGHT, or something similar to define the lighting
11657  required.
11658  Everthing on this line in CAPS.
11659 \end_layout
11660
11661 \begin_layout Itemize
11662
11663 \family sans
11664 EXT:
11665 \begin_inset space \hfill{}
11666 \end_inset
11667
11668 M-z e
11669 \begin_inset Newline newline
11670 \end_inset
11671
11672
11673 \family default
11674 Introduces a new EXTERIOR camera set-up.
11675  Everthing on this line in CAPS.
11676 \end_layout
11677
11678 \begin_layout Itemize
11679
11680 \family sans
11681 Speaker
11682 \begin_inset space \hfill{}
11683 \end_inset
11684
11685 M-z s
11686 \begin_inset Newline newline
11687 \end_inset
11688
11689
11690 \family default
11691 The character speaking.
11692 \end_layout
11693
11694 \begin_layout Itemize
11695
11696 \family sans
11697 Parenthetical
11698 \begin_inset space \hfill{}
11699 \end_inset
11700
11701 M-z p
11702 \begin_inset Newline newline
11703 \end_inset
11704
11705
11706 \family default
11707 Instructions to the speaker.
11708  The () are automatically inserted, but only the ( will show in LyX.
11709  Both will be printed.
11710 \end_layout
11711
11712 \begin_layout Itemize
11713
11714 \family sans
11715 Dialogue
11716 \begin_inset space \hfill{}
11717 \end_inset
11718
11719 M-z d
11720 \begin_inset Newline newline
11721 \end_inset
11722
11723
11724 \family default
11725 What the 
11726 \family sans
11727 Speaker
11728 \family default
11729  says.
11730 \end_layout
11731
11732 \begin_layout Itemize
11733
11734 \family sans
11735 Transition
11736 \begin_inset space \hfill{}
11737 \end_inset
11738
11739 M-z t
11740 \begin_inset Newline newline
11741 \end_inset
11742
11743
11744 \family default
11745 Camera movement instruction.
11746  e.
11747 \begin_inset space \thinspace{}
11748 \end_inset
11749
11750 g.
11751 \begin_inset space \space{}
11752 \end_inset
11753
11754 CUT TO:
11755 \end_layout
11756
11757 \begin_layout Itemize
11758
11759 \family sans
11760 FADE OUT:
11761 \begin_inset space \hfill{}
11762 \end_inset
11763
11764 M-z S-I
11765 \end_layout
11766
11767 \begin_layout Itemize
11768
11769 \family sans
11770 Author
11771 \begin_inset space \hfill{}
11772 \end_inset
11773
11774 M-z S-A
11775 \end_layout
11776
11777 \begin_layout Itemize
11778
11779 \family sans
11780 Title
11781 \begin_inset space \hfill{}
11782 \end_inset
11783
11784 M-z S-T
11785 \end_layout
11786
11787 \begin_layout Itemize
11788
11789 \family sans
11790 Right_Address
11791 \begin_inset space \hfill{}
11792 \end_inset
11793
11794 M-z r
11795 \end_layout
11796
11797 \begin_layout Subsection
11798 Script jargon
11799 \end_layout
11800
11801 \begin_layout Itemize
11802 (O.S) — off screen
11803 \end_layout
11804
11805 \begin_layout Itemize
11806 (V.0) — voice over
11807 \end_layout
11808
11809 \begin_layout Itemize
11810 b.
11811 \begin_inset space \thinspace{}
11812 \end_inset
11813
11814 g.
11815  — background
11816 \end_layout
11817
11818 \begin_layout Itemize
11819 C.U.
11820  — close-up
11821 \end_layout
11822
11823 \begin_layout Itemize
11824 PAN — camera movement
11825 \end_layout
11826
11827 \begin_layout Itemize
11828 INSERT — cut to close-up of
11829 \end_layout
11830
11831 \begin_layout Section
11832 ijmpc and ijmpd
11833 \end_layout
11834
11835 \begin_layout Standard
11836 by 
11837 \noun on
11838 Panayotis Papasotiriou
11839 \end_layout
11840
11841 \begin_layout Subsection
11842 Overview
11843 \end_layout
11844
11845 \begin_layout Standard
11846 The ijmpc package is a set of macros that facilitates electronic manuscript
11847  submission to the 
11848 \emph on
11849 International Journal of Modern Physics C
11850 \emph default
11851 .
11852  Similarly, the ijmpd package is for creating manuscripts to be submitted
11853  to the 
11854 \emph on
11855 International Journal of Modern Physics D
11856 \emph default
11857 .
11858  Both journals are published by World Scientific.
11859  The corresponding document classes are named 
11860 \family typewriter
11861 ws-ijmpc.cls
11862 \family default
11863  and 
11864 \family typewriter
11865 ws-ijmpd.cls
11866 \family default
11867 , respectively.
11868  These files, together with instructions for the authors, can be downloaded
11869  from the sites 
11870 \begin_inset Flex URL
11871 status collapsed
11872
11873 \begin_layout Plain Layout
11874
11875 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11876 \end_layout
11877
11878 \end_inset
11879
11880  and 
11881 \begin_inset Flex URL
11882 status collapsed
11883
11884 \begin_layout Plain Layout
11885
11886 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11887 \end_layout
11888
11889 \end_inset
11890
11891 .
11892  Both packages are modified versions of the standard 
11893 \begin_inset Quotes eld
11894 \end_inset
11895
11896 article
11897 \begin_inset Quotes erd
11898 \end_inset
11899
11900  package, and they are almost (but not exactly) identical.
11901  Most of their features are supported by LyX.
11902  I have used LyX successfully to write articles submitted to both journals
11903  without any problem.
11904 \end_layout
11905
11906 \begin_layout Subsection
11907 Writing a paper
11908 \end_layout
11909
11910 \begin_layout Standard
11911 As usual, the easiest way to write a paper is to start with a template.
11912  Click on 
11913 \family sans
11914 File\SpecialChar \menuseparator
11915 New from
11916 \family default
11917  
11918 \family sans
11919 \bar under
11920 T
11921 \bar default
11922 emplate
11923 \family default
11924 , then choose the 
11925 \family typewriter
11926 ijmpc.lyx
11927 \family default
11928  or 
11929 \family typewriter
11930 ijmpd.lyx
11931 \family default
11932  template.
11933  This will give an (almost) empty document that includes the most common
11934  fields found in a manuscript.
11935  Simply overwrite the existing text (including the brackets, 
11936 \family typewriter
11937 <>
11938 \family default
11939 ) with your text.
11940  You should keep in mind the following remarks.
11941 \end_layout
11942
11943 \begin_layout Enumerate
11944 LyX won't let you change the font size and the page style of the document,
11945  because such modifications are not allowed by both packages.
11946 \end_layout
11947
11948 \begin_layout Enumerate
11949 The language of the document should not be changed.
11950  Before previewing your paper, be sure that the babel package is not used.
11951  To do this, click on 
11952 \family sans
11953 Tools\SpecialChar \menuseparator
11954 Preferences
11955 \family default
11956 , select the 
11957 \family sans
11958 Lang Opts
11959 \family default
11960  tab, deselect the 
11961 \family sans
11962 Use babel
11963 \family default
11964  checkbox in the language settings, and click on 
11965 \family sans
11966 Apply
11967 \family default
11968  (or 
11969 \family sans
11970 Save
11971 \family default
11972 , if you wish to make this change permanent).
11973 \end_layout
11974
11975 \begin_layout Enumerate
11976 The 
11977 \begin_inset Quotes eld
11978 \end_inset
11979
11980 Keywords
11981 \begin_inset Quotes erd
11982 \end_inset
11983
11984  style must be used to define keywords.
11985 \end_layout
11986
11987 \begin_layout Enumerate
11988 The ijmpc package provides a style named 
11989 \begin_inset Quotes eld
11990 \end_inset
11991
11992 Classification Codes
11993 \begin_inset Quotes erd
11994 \end_inset
11995
11996 , which can be used to define classification codes, such as PACS numbers.
11997  Note that this facility is not supported by the ijmpd package.
11998 \end_layout
11999
12000 \begin_layout Enumerate
12001 Several new environments are available: 
12002 \begin_inset Quotes eld
12003 \end_inset
12004
12005 Definition
12006 \begin_inset Quotes erd
12007 \end_inset
12008
12009
12010 \begin_inset Quotes eld
12011 \end_inset
12012
12013 Step
12014 \begin_inset Quotes erd
12015 \end_inset
12016
12017
12018 \begin_inset Quotes eld
12019 \end_inset
12020
12021 Example
12022 \begin_inset Quotes erd
12023 \end_inset
12024
12025
12026 \begin_inset Quotes eld
12027 \end_inset
12028
12029 Remark
12030 \begin_inset Quotes erd
12031 \end_inset
12032
12033
12034 \begin_inset Quotes eld
12035 \end_inset
12036
12037 Notation
12038 \begin_inset Quotes erd
12039 \end_inset
12040
12041
12042 \begin_inset Quotes eld
12043 \end_inset
12044
12045 Theorem
12046 \begin_inset Quotes erd
12047 \end_inset
12048
12049
12050 \begin_inset Quotes eld
12051 \end_inset
12052
12053 Proof
12054 \begin_inset Quotes erd
12055 \end_inset
12056
12057
12058 \begin_inset Quotes eld
12059 \end_inset
12060
12061 Corollary
12062 \begin_inset Quotes erd
12063 \end_inset
12064
12065
12066 \begin_inset Quotes eld
12067 \end_inset
12068
12069 Lemma
12070 \begin_inset Quotes erd
12071 \end_inset
12072
12073
12074 \begin_inset Quotes eld
12075 \end_inset
12076
12077 Proposition
12078 \begin_inset Quotes erd
12079 \end_inset
12080
12081
12082 \begin_inset Quotes eld
12083 \end_inset
12084
12085 Prop
12086 \begin_inset Quotes erd
12087 \end_inset
12088
12089
12090 \begin_inset Quotes eld
12091 \end_inset
12092
12093 Question
12094 \begin_inset Quotes erd
12095 \end_inset
12096
12097
12098 \begin_inset Quotes eld
12099 \end_inset
12100
12101 Claim
12102 \begin_inset Quotes erd
12103 \end_inset
12104
12105 , and 
12106 \begin_inset Quotes eld
12107 \end_inset
12108
12109 Conjecture
12110 \begin_inset Quotes erd
12111 \end_inset
12112
12113 .
12114  Their use is more or less obvious.
12115  LyX supports all these environments; it will use the proper label, text
12116  style, and numbering scheme for each of them.
12117 \end_layout
12118
12119 \begin_layout Enumerate
12120 Both packages use basic citations; the natbib package should not be used.
12121  In LyX, citation references are shown as usual; in the output, citations
12122  are shown as superscripts.
12123  If you want to use a citation as normal text, you should use the 
12124 \family typewriter
12125 refcite
12126 \family default
12127  command, e.
12128 \begin_inset space \thinspace{}
12129 \end_inset
12130
12131 g.
12132 \begin_inset space \space{}
12133 \end_inset
12134
12135
12136 \begin_inset Quotes eld
12137 \end_inset
12138
12139 See Ref.
12140 \begin_inset space \space{}
12141 \end_inset
12142
12143
12144 \family typewriter
12145
12146 \backslash
12147 refcite{key}
12148 \family default
12149
12150 \begin_inset Quotes erd
12151 \end_inset
12152
12153 .
12154 \end_layout
12155
12156 \begin_layout Enumerate
12157 There is no 
12158 \begin_inset Quotes eld
12159 \end_inset
12160
12161 Acknowledgments
12162 \begin_inset Quotes erd
12163 \end_inset
12164
12165  section in both packages.
12166  To put acknowledgments, just use the 
12167 \begin_inset Quotes eld
12168 \end_inset
12169
12170 Section*
12171 \begin_inset Quotes erd
12172 \end_inset
12173
12174  environment.
12175 \end_layout
12176
12177 \begin_layout Enumerate
12178 Appendices may be added to the paper, 
12179 \emph on
12180 after
12181 \emph default
12182  the Acknowledgments and 
12183 \shape italic
12184 before
12185 \shape default
12186  the References.
12187  LyX provides a special environment, called 
12188 \begin_inset Quotes eld
12189 \end_inset
12190
12191 Appendices Section
12192 \begin_inset Quotes erd
12193 \end_inset
12194
12195  which marks the beginning of the appendices.
12196  This environment should be left blank; it just sends a LaTeX command, but
12197  nothing is really printed.
12198  In LyX, the word 
12199 \begin_inset Quotes eld
12200 \end_inset
12201
12202 Appendix
12203 \begin_inset Quotes erd
12204 \end_inset
12205
12206  is printed with blue letters, as a signal that all sections after that
12207  point are appendices.
12208  To write an appendix, use the 
12209 \begin_inset Quotes eld
12210 \end_inset
12211
12212 Appendix
12213 \begin_inset Quotes erd
12214 \end_inset
12215
12216  environment.
12217  LyX will number each appendix with capital letters, as required by both
12218  journals.
12219  Note that 
12220 \begin_inset Quotes eld
12221 \end_inset
12222
12223 Appendices Section
12224 \begin_inset Quotes erd
12225 \end_inset
12226
12227  
12228 \emph on
12229 must
12230 \emph default
12231  be present before the first appendix; if not, all appendices will be numbered
12232  as normal sections in the output.
12233 \end_layout
12234
12235 \begin_layout Enumerate
12236 The ijmpc and the ijmpd packages use the 
12237 \family typewriter
12238 tbl
12239 \family default
12240  command to implement table captions.
12241  As a result, a table created by LyX is printed correctly, but its caption
12242  is ignored.
12243  However, you can use some TeX code to overcome this problem, so that captions
12244  are printed as expected.
12245  To do so, create a float table as usual, remove the caption, and replace
12246  it with the TeX code 
12247 \family typewriter
12248
12249 \backslash
12250 tbl{
12251 \emph on
12252 your table caption
12253 \emph default
12254 }{
12255 \family default
12256  (sic); you must also the TeX code 
12257 \family typewriter
12258 }
12259 \family default
12260  immediately after the tabular material.
12261  Study the example table included in the template files to see how this
12262  trick is implemented.
12263  Alternatively, If you need table captions, you should implement the whole
12264  table float in a 
12265 \family typewriter
12266 .tex
12267 \family default
12268  file, then include this file to the LyX document (
12269 \family sans
12270 Insert\SpecialChar \menuseparator
12271 File\SpecialChar \menuseparator
12272 Child
12273 \begin_inset space ~
12274 \end_inset
12275
12276 Document
12277 \family default
12278 ).
12279  Details on how to create a table float can be found in the files 
12280 \family typewriter
12281 ws-ijmpc.tex
12282 \family default
12283  and 
12284 \family typewriter
12285 ws-ijmpd.tex
12286 \family default
12287 , included in the corresponding packages.
12288 \end_layout
12289
12290 \begin_layout Subsection
12291 Preparing a paper for submission
12292 \end_layout
12293
12294 \begin_layout Standard
12295 Before you submit your paper you must export the LyX document as a LaTeX
12296  file (
12297 \family sans
12298 File\SpecialChar \menuseparator
12299 Export\SpecialChar \menuseparator
12300 LaTeX
12301 \family default
12302 )
12303 \begin_inset Foot
12304 status open
12305
12306 \begin_layout Plain Layout
12307 Actually you have the choice between LaTeX (plain) and pdflatex.
12308  If you intend to use pdflatex to prepare the paper, you should use the
12309  pdflatex option so that included graphics are converted to PDF format,
12310  ready for use by pdflatex.
12311 \end_layout
12312
12313 \end_inset
12314
12315 , then make the following changes to the resulting 
12316 \family typewriter
12317 .tex
12318 \family default
12319  file.
12320 \end_layout
12321
12322 \begin_layout Enumerate
12323 Remove the comment lines before the 
12324 \family typewriter
12325
12326 \backslash
12327 documentclass
12328 \family default
12329  command.
12330 \end_layout
12331
12332 \begin_layout Enumerate
12333 Remove everything between (and including) the 
12334 \family typewriter
12335
12336 \backslash
12337 makeatletter
12338 \family default
12339  and 
12340 \family typewriter
12341
12342 \backslash
12343 makeatother
12344 \family default
12345  commands, except for any commands you specifically put into the LaTeX preamble.
12346 \end_layout
12347
12348 \begin_layout Standard
12349 The modified 
12350 \family typewriter
12351 .tex
12352 \family default
12353  file should be saved and processed through LaTeX as many times as necessary.
12354  You may also want to check the resulting 
12355 \family typewriter
12356 .dvi
12357 \family default
12358  document.
12359 \end_layout
12360
12361 \begin_layout Subsection
12362 Use of TeX code
12363 \end_layout
12364
12365 \begin_layout Standard
12366 The use of TeX code is reduced to two commands, which must be placed at
12367  the top of the document.
12368  If you started writing your paper by using the 
12369 \family typewriter
12370 ijmpc.lyx
12371 \family default
12372  or the 
12373 \family typewriter
12374 ijmpd.lyx
12375 \family default
12376  template, the TeX code needed is already in its place; you usually don't
12377  need to delete it.
12378  You may only modify the first TeX code to specify the information printed
12379  to the top of odd and even pages (authors' names and short paper's title,
12380  respectively).
12381  This TeX code must have the form 
12382 \family typewriter
12383
12384 \backslash
12385 markboth{Authors' Names}{Short Paper's Title}
12386 \family default
12387 .
12388 \end_layout
12389
12390 \begin_layout Section
12391 iopart
12392 \end_layout
12393
12394 \begin_layout Standard
12395 by 
12396 \noun on
12397 Uwe Stöhr
12398 \end_layout
12399
12400 \begin_layout Subsection
12401 Overview
12402 \end_layout
12403
12404 \begin_layout Standard
12405 The iopart package provides a document class to create electronic manuscript
12406  submission to the journals published by the Institute of Physics.
12407  Instructions for the authors how to create a paper using the iopart class
12408  can be downloaded together with the iopart package from the site 
12409 \begin_inset Flex URL
12410 status collapsed
12411
12412 \begin_layout Plain Layout
12413
12414 ftp://ftp.iop.org/pub/journals/latex2e
12415 \end_layout
12416
12417 \end_inset
12418
12419 .
12420 \end_layout
12421
12422 \begin_layout Subsection
12423 Writing a paper
12424 \end_layout
12425
12426 \begin_layout Standard
12427 The easiest way to write a paper is to start with the file 
12428 \emph on
12429 IOP-article.lyx
12430 \emph default
12431  that is available in LyX's examples files folder.
12432  Open this file, save it under a new name, and start writing.
12433  The example file explains how to use the special text environments.
12434  Here are the most important advices:
12435 \end_layout
12436
12437 \begin_layout Itemize
12438 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12439  two options 
12440 \family sans
12441 Use AMS math package
12442 \family default
12443  in the document settings under 
12444 \family sans
12445 Math Options
12446 \family default
12447  are not used!
12448 \end_layout
12449
12450 \begin_layout Itemize
12451
12452 \size normal
12453 The title environment defines the kind of your paper.
12454  So use one of the following environments for the title:
12455 \end_layout
12456
12457 \begin_deeper
12458 \begin_layout Itemize
12459
12460 \family sans
12461 \size normal
12462 Title
12463 \family default
12464  for a Paper
12465 \end_layout
12466
12467 \begin_layout Itemize
12468
12469 \family sans
12470 \size normal
12471 Review
12472 \family default
12473  for a Review
12474 \end_layout
12475
12476 \begin_layout Itemize
12477
12478 \family sans
12479 \size normal
12480 Topical
12481 \family default
12482  for a Topical review
12483 \end_layout
12484
12485 \begin_layout Itemize
12486
12487 \family sans
12488 \size normal
12489 Comment
12490 \family default
12491  for a Comment
12492 \end_layout
12493
12494 \begin_layout Itemize
12495
12496 \family sans
12497 \size normal
12498 Note
12499 \family default
12500  for a Note
12501 \end_layout
12502
12503 \begin_layout Itemize
12504
12505 \family sans
12506 \size normal
12507 Paper
12508 \family default
12509  for a Paper (same as Title)
12510 \end_layout
12511
12512 \begin_layout Itemize
12513
12514 \family sans
12515 \size normal
12516 Prelim
12517 \family default
12518  for a Preliminary communication
12519 \end_layout
12520
12521 \begin_layout Itemize
12522
12523 \family sans
12524 \size normal
12525 Rapid
12526 \family default
12527  for a Rapid communication
12528 \end_layout
12529
12530 \begin_layout Itemize
12531
12532 \family sans
12533 \size normal
12534 Letter
12535 \family default
12536  for a Letter to the editor
12537 \end_layout
12538
12539 \end_deeper
12540 \begin_layout Itemize
12541
12542 \size normal
12543 All title environments except of 
12544 \family sans
12545 Letter
12546 \family default
12547  can have an optional short title.
12548 \end_layout
12549
12550 \begin_layout Itemize
12551 There is a general title environment 
12552 \family sans
12553 Article
12554 \family default
12555  which is not directly supported by the LyX.
12556  This can be used as TeX code when your document doesn't fit into one of
12557  the other title types.
12558 \end_layout
12559
12560 \begin_layout Standard
12561 For more informations like hints for special table and formula formatting,
12562  look at the IOP author guidelines.
12563 \end_layout
12564
12565 \begin_layout Section
12566 Kluwer
12567 \end_layout
12568
12569 \begin_layout Standard
12570 by 
12571 \noun on
12572 Panayotis Papasotiriou
12573 \end_layout
12574
12575 \begin_layout Subsection
12576 Overview
12577 \end_layout
12578
12579 \begin_layout Standard
12580 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12581  that facilitates electronic manuscript submission to the journals they
12582  publish.
12583  Most known of them (at least in my domain of interest) are 
12584 \emph on
12585 Astrophysics and Space Science
12586 \emph default
12587  and 
12588 \emph on
12589 Solar Physics
12590 \emph default
12591 , but there are many others (see a complete list at 
12592 \begin_inset Flex URL
12593 status open
12594
12595 \begin_layout Plain Layout
12596
12597 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12598 \end_layout
12599
12600 \end_inset
12601
12602 ).
12603  The Kluwer package may be downloaded from the site 
12604 \begin_inset Flex URL
12605 status collapsed
12606
12607 \begin_layout Plain Layout
12608
12609 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12610 \end_layout
12611
12612 \end_inset
12613
12614 .
12615  A complete user guide is contained in that package (but it can also be
12616  downloaded separately).
12617 \end_layout
12618
12619 \begin_layout Standard
12620 LyX supports many features of the package but not everything.
12621  However, the TeX code needed is reduced to some 
12622 \begin_inset Quotes eld
12623 \end_inset
12624
12625 peculiar
12626 \begin_inset Quotes erd
12627 \end_inset
12628
12629  commands of the package (see
12630 \begin_inset space ~
12631 \end_inset
12632
12633
12634 \begin_inset CommandInset ref
12635 LatexCommand ref
12636 reference "subsec:kluwer_peculiarities"
12637
12638 \end_inset
12639
12640 ).
12641  I have recently used LyX to write an article submitted to the 
12642 \emph on
12643 Astrophysics and Space Science
12644 \emph default
12645  without any problem.
12646 \end_layout
12647
12648 \begin_layout Subsection
12649 Writing a paper
12650 \end_layout
12651
12652 \begin_layout Standard
12653 The easiest way to write a paper is to start with the Kluwer template file.
12654  Click on 
12655 \family sans
12656 File\SpecialChar \menuseparator
12657 New from
12658 \family default
12659  
12660 \family sans
12661 Template
12662 \family default
12663 , then choose the 
12664 \family typewriter
12665 kluwer.lyx
12666 \family default
12667  template.
12668  This will give an (almost) empty document that includes the most common
12669  fields found in a manuscript and a short description of their use.
12670  As in most templates, simply overwrite the existing text (including the
12671  brackets, 
12672 \family typewriter
12673 <>
12674 \family default
12675 ) with the correct information.
12676 \end_layout
12677
12678 \begin_layout Subsection
12679 Preparing a paper for submission
12680 \end_layout
12681
12682 \begin_layout Standard
12683 As in the AASTeX package, before you submit your paper to a journal you
12684  must 
12685 \begin_inset Quotes eld
12686 \end_inset
12687
12688 postprocess
12689 \begin_inset Quotes erd
12690 \end_inset
12691
12692  it as follows.
12693 \end_layout
12694
12695 \begin_layout Enumerate
12696 Export your paper as a LaTeX file.
12697  To do this, click on 
12698 \family sans
12699 File\SpecialChar \menuseparator
12700 Export\SpecialChar \menuseparator
12701 LaTeX
12702 \family default
12703 .
12704  
12705 \end_layout
12706
12707 \begin_layout Enumerate
12708 Edit the resulting 
12709 \family typewriter
12710 .tex
12711 \family default
12712  file with a text editor and make the following changes
12713 \end_layout
12714
12715 \begin_deeper
12716 \begin_layout Enumerate
12717 remove the comment lines before the 
12718 \family typewriter
12719
12720 \backslash
12721 documentclass
12722 \family default
12723  command,
12724 \end_layout
12725
12726 \begin_layout Enumerate
12727 remove everything between (and including) the 
12728 \family typewriter
12729
12730 \backslash
12731 makeatletter
12732 \family default
12733  and 
12734 \family typewriter
12735
12736 \backslash
12737 makeatother
12738 \family default
12739  commands, except for any commands you specifically put into the LaTeX preamble.
12740 \end_layout
12741
12742 \begin_layout Standard
12743 Save the resulting 
12744 \family typewriter
12745 .tex
12746 \family default
12747  file.
12748 \end_layout
12749
12750 \end_deeper
12751 \begin_layout Enumerate
12752 Run the 
12753 \family typewriter
12754 .tex
12755 \family default
12756  file through LaTeX as many times as necessary (usually up to three).
12757 \end_layout
12758
12759 \begin_layout Enumerate
12760 View the resulting 
12761 \family typewriter
12762 .dvi
12763 \family default
12764  document using, e.
12765 \begin_inset space \thinspace{}
12766 \end_inset
12767
12768 g.
12769 \begin_inset space \space{}
12770 \end_inset
12771
12772
12773 \family sans
12774 xdvi
12775 \family default
12776 , and check if everything is OK (it should, if you didn't make any mistake).
12777 \end_layout
12778
12779 \begin_layout Subsection
12780 \begin_inset Quotes eld
12781 \end_inset
12782
12783 Peculiarities
12784 \begin_inset Quotes erd
12785 \end_inset
12786
12787  of the Kluwer package
12788 \begin_inset CommandInset label
12789 LatexCommand label
12790 name "subsec:kluwer_peculiarities"
12791
12792 \end_inset
12793
12794
12795 \end_layout
12796
12797 \begin_layout Standard
12798 The Kluwer package has the following 
12799 \begin_inset Quotes eld
12800 \end_inset
12801
12802 peculiarities
12803 \begin_inset Quotes erd
12804 \end_inset
12805
12806 .
12807 \end_layout
12808
12809 \begin_layout Enumerate
12810 It is possible to write multiple articles in the same LaTeX file
12811 \begin_inset Foot
12812 status collapsed
12813
12814 \begin_layout Plain Layout
12815 I can't imagine any good reason to do this.
12816 \end_layout
12817
12818 \end_inset
12819
12820 .
12821  Each article must be included in the environment 
12822 \begin_inset Quotes eld
12823 \end_inset
12824
12825 article
12826 \begin_inset Quotes erd
12827 \end_inset
12828
12829 .
12830  Unfortunately, this environment cannot be omitted, even if you write just
12831  one article.
12832  Therefore, each article starts with the command 
12833 \family typewriter
12834
12835 \backslash
12836 begin{article}
12837 \family default
12838  and, obviously, ends with the command 
12839 \family typewriter
12840
12841 \backslash
12842 end{article}
12843 \family default
12844 .
12845  Although this can be implemented in LyX, I didn't included it, since it
12846  looks ugly and can confuse the novice user.
12847  Therefore, you need to enter them directly and mark them as LaTeX code
12848  (the well-known 
12849 \begin_inset Quotes eld
12850 \end_inset
12851
12852 TeX code
12853 \begin_inset Quotes erd
12854 \end_inset
12855
12856 ).
12857 \end_layout
12858
12859 \begin_layout Enumerate
12860 Information given at the beginning of the article (i.
12861 \begin_inset space \thinspace{}
12862 \end_inset
12863
12864 e.
12865 \begin_inset space \space{}
12866 \end_inset
12867
12868 title, subtitle, author, institution, running title, running author, abstract
12869  and keywords) must be included in an environment called 
12870 \begin_inset Quotes eld
12871 \end_inset
12872
12873 opening
12874 \begin_inset Quotes erd
12875 \end_inset
12876
12877 .
12878  This is not implemented in LyX, so you must enter title, subtitle etc.
12879 \begin_inset space ~
12880 \end_inset
12881
12882 between two TeX code lines (
12883 \family typewriter
12884
12885 \backslash
12886 begin{opening}
12887 \family default
12888  and 
12889 \family typewriter
12890
12891 \backslash
12892 end{opening}
12893 \family default
12894 ).
12895 \end_layout
12896
12897 \begin_layout Enumerate
12898 According to the user manual, the label of each bibliography item must be
12899  written as 
12900 \family typewriter
12901
12902 \backslash
12903 protect
12904 \backslash
12905 citeauthoryear{
12906 \family default
12907 \emph on
12908 author(s)
12909 \family typewriter
12910 \emph default
12911 }{
12912 \family default
12913 \emph on
12914 year
12915 \family typewriter
12916 \emph default
12917 }
12918 \family default
12919 .
12920 \end_layout
12921
12922 \begin_layout Standard
12923 The 
12924 \family typewriter
12925 kluwer.lyx
12926 \family default
12927  template takes care of all these 
12928 \begin_inset Quotes eld
12929 \end_inset
12930
12931 peculiarities
12932 \begin_inset Quotes erd
12933 \end_inset
12934
12935 .
12936  If you start a new paper using this template you don't need to do anything
12937  special.
12938  Just 
12939 \end_layout
12940
12941 \begin_layout Enumerate
12942 don't delete the TeX code included in the template, and
12943 \end_layout
12944
12945 \begin_layout Enumerate
12946 copy the example bibliography item included in the template and modify it
12947  as necessary to enter new bibliography items.
12948 \end_layout
12949
12950 \begin_layout Section
12951 Koma-Script
12952 \end_layout
12953
12954 \begin_layout Standard
12955 by 
12956 \noun on
12957 Bernd Rellermeyer
12958 \end_layout
12959
12960 \begin_layout Subsection
12961 Overview
12962 \end_layout
12963
12964 \begin_layout Standard
12965 The LyX document classes 
12966 \emph on
12967 article (koma-script)
12968 \emph default
12969
12970 \emph on
12971 report (koma-script)
12972 \emph default
12973
12974 \emph on
12975 book
12976 \emph default
12977  
12978 \emph on
12979 (koma-script)
12980 \emph default
12981 , and 
12982 \emph on
12983 letter
12984 \emph default
12985  
12986 \emph on
12987 (koma-script)
12988 \emph default
12989  correspond to the LaTeX document classes 
12990 \family typewriter
12991 scrartcl.cls
12992 \family default
12993
12994 \family typewriter
12995 scrreprt.cls
12996 \family default
12997
12998 \family typewriter
12999 scrbook.cls
13000 \family default
13001 , and 
13002 \family typewriter
13003 scrlettr.cls
13004 \family default
13005 , resp.
13006 \begin_inset space ~
13007 \end_inset
13008
13009 of the Koma-Script family.
13010  They are replacements for the standard document classes 
13011 \family typewriter
13012 article.cls
13013 \family default
13014
13015 \family typewriter
13016 report.cls
13017 \family default
13018
13019 \family typewriter
13020 book.cls
13021 \family default
13022  and 
13023 \family typewriter
13024 letter.cls
13025 \family default
13026 , resp., and fit better to European typography conventions in a number of
13027  points.
13028 \end_layout
13029
13030 \begin_layout Itemize
13031 Standard character size is 11pt in 
13032 \emph on
13033 article (koma-script)
13034 \emph default
13035
13036 \emph on
13037 report (koma-script)
13038 \emph default
13039 , and 
13040 \emph on
13041 book (koma-script)
13042 \emph default
13043 , and 12pt in 
13044 \emph on
13045 letter (koma-script)
13046 \emph default
13047 .
13048 \end_layout
13049
13050 \begin_layout Itemize
13051 Headings, labels of the description environment, and a number of elements
13052  of the 
13053 \emph on
13054 letter (koma-script)
13055 \emph default
13056  document class are set in a bold sans serif font.
13057 \begin_inset Foot
13058 status collapsed
13059
13060 \begin_layout Plain Layout
13061 There is a big difference between the bold sans serif old cm fonts and new
13062  ec fonts, especially in the appearance of headings.
13063  In comparison, the ec bold sans serif fonts look a bit thin.
13064  Here the LaTeX package 
13065 \family typewriter
13066 cmsd.sty by
13067 \family default
13068  
13069 \shape smallcaps
13070 Walter Schmidt
13071 \shape default
13072  helps to produce the 
13073 \begin_inset Quotes eld
13074 \end_inset
13075
13076 usual
13077 \begin_inset Quotes erd
13078 \end_inset
13079
13080  appearance when using the ec fonts.
13081 \end_layout
13082
13083 \end_inset
13084
13085  The numbering of chapter headings is made in the same way as the numbering
13086  of section headings, that is without the extra line 
13087 \begin_inset Quotes eld
13088 \end_inset
13089
13090 Chapter\SpecialChar \ldots{}
13091
13092 \begin_inset Quotes erd
13093 \end_inset
13094
13095 .
13096  In addition, the appearance of the headings can be modified by using a
13097  number of options (in LyX to be entered in the field 
13098 \family sans
13099 Extra
13100 \begin_inset space ~
13101 \end_inset
13102
13103 Options
13104 \family default
13105  of the dialog 
13106 \family sans
13107 Layout\SpecialChar \menuseparator
13108 Document
13109 \family default
13110 ).
13111  
13112 \end_layout
13113
13114 \begin_layout Itemize
13115 The main means in the Koma-Script document classes to design the type area
13116  are the options 
13117 \family sans
13118 BCOR
13119 \family default
13120  and 
13121 \family sans
13122 DIV
13123 \family default
13124  (in LyX to be entered in the extra class options field in the dialog 
13125 \family sans
13126 Document\SpecialChar \menuseparator
13127 Settings
13128 \family default
13129 ).
13130  They make a clearer modification of page margins possible as do the options
13131  of the dialog 
13132 \family sans
13133 Document\SpecialChar \menuseparator
13134 Settings
13135 \family default
13136 .
13137  
13138 \end_layout
13139
13140 \begin_layout Itemize
13141 The LaTeX document classes of the Koma-Script family define a number of
13142  additional commands.
13143  Those part of it which makes sense in LyX is implemented in corresponding
13144  paragraph types.
13145 \end_layout
13146
13147 \begin_layout Standard
13148 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13149  can be found in the Koma-Script documentation 
13150 \emph on
13151 scrguide
13152 \emph default
13153  (German) and 
13154 \emph on
13155 scrguien
13156 \emph default
13157  (English).
13158 \end_layout
13159
13160 \begin_layout Subsection
13161 article (koma-script), report (koma-script), and book (koma-script)
13162 \end_layout
13163
13164 \begin_layout Standard
13165 The document classes 
13166 \emph on
13167 article (koma-script)
13168 \emph default
13169
13170 \emph on
13171 report (koma-script)
13172 \emph default
13173 , and 
13174 \emph on
13175 book
13176 \emph default
13177  
13178 \emph on
13179 (koma-script)
13180 \emph default
13181  are implemented in the layout files 
13182 \family typewriter
13183 scrartcl.layout
13184 \family default
13185
13186 \family typewriter
13187 scrreprt.layout
13188 \family default
13189 , and 
13190 \family typewriter
13191 scrbook.layout
13192 \family default
13193 , resp.
13194  They contain all the paragraph types of the corresponding standard document
13195  classes 
13196 \emph on
13197 article
13198 \emph default
13199
13200 \emph on
13201 report
13202 \emph default
13203 , and 
13204 \emph on
13205 book
13206 \emph default
13207 , resp., partly modified, with the exception of the LyX specific 
13208 \family sans
13209 List
13210 \family default
13211 -type, which is replaced by the new 
13212 \family sans
13213 Labeling
13214 \family default
13215 -type having the same functionality.
13216  Beside the 
13217 \family sans
13218 Labeling
13219 \family default
13220 -Type there is a number of new paragraph types added.
13221  They are 
13222 \emph on
13223 not
13224 \emph default
13225  part of 
13226 \emph on
13227 letter (koma-script)
13228 \emph default
13229 .
13230 \end_layout
13231
13232 \begin_layout Itemize
13233
13234 \family sans
13235 Addpart, Addchap
13236 \family default
13237
13238 \family sans
13239 Addsec
13240 \family default
13241 : are equivalents to 
13242 \family sans
13243 Part*, Chapter*
13244 \family default
13245  and 
13246 \family sans
13247 Section*
13248 \family default
13249 , resp., additionally inserting an entry in the table of contents.
13250  
13251 \family sans
13252 Addpart
13253 \family default
13254  and 
13255 \family sans
13256 Addchap
13257 \family default
13258  are not contained in 
13259 \emph on
13260 article (koma-script)
13261 \emph default
13262 .
13263 \end_layout
13264
13265 \begin_layout Itemize
13266
13267 \family sans
13268 Addchap*
13269 \family default
13270
13271 \family sans
13272 Addsec*
13273 \family default
13274 : behave exactly as 
13275 \family sans
13276 Addchap
13277 \family default
13278  and 
13279 \family sans
13280 Addsec
13281 \family default
13282 , resp., additionally clearing running heads.
13283  
13284 \family sans
13285 Addchap*
13286 \family default
13287  is not contained in 
13288 \emph on
13289 article (koma-script)
13290 \emph default
13291 .
13292 \begin_inset Foot
13293 status collapsed
13294
13295 \begin_layout Plain Layout
13296 There is also an 
13297 \family typewriter
13298
13299 \backslash
13300 addpart*
13301 \family default
13302  command in 
13303 \emph on
13304 book (koma-script)
13305 \emph default
13306  and in 
13307 \emph on
13308 report (koma-script)
13309 \emph default
13310 , but since this is identical to 
13311 \family sans
13312 Part*
13313 \family default
13314 , is has not been implemented in LyX.
13315 \end_layout
13316
13317 \end_inset
13318
13319
13320 \end_layout
13321
13322 \begin_layout Itemize
13323
13324 \family sans
13325 Minisec
13326 \family default
13327 : generates a heading directly above the following paragraph in the standard
13328  character size without affecting the structure of the document.
13329 \end_layout
13330
13331 \begin_layout Itemize
13332
13333 \family sans
13334 Captionabove
13335 \family default
13336  and 
13337 \family sans
13338 Captionbelow
13339 \family default
13340  are special captions which respect the different space settings needed
13341  for captions placed above or below an element (if you follow strict typographic
13342  rules, you might want to place table captions always above the table).
13343  You can also use the class option 
13344 \family typewriter
13345 tablecaptionsabove
13346 \family default
13347 , which will switch 
13348 \family sans
13349 caption
13350 \family default
13351  to 
13352 \family sans
13353 captionabove
13354 \family default
13355  for tables and 
13356 \family sans
13357 captionbelow
13358 \family default
13359  for figures.
13360  You need at least Koma-Script version 2.8q to use this.
13361 \end_layout
13362
13363 \begin_layout Itemize
13364
13365 \family sans
13366 Dictum
13367 \family default
13368 : can be used to set a bonmot, e.
13369 \begin_inset space \thinspace{}
13370 \end_inset
13371
13372 g.
13373 \begin_inset space \space{}
13374 \end_inset
13375
13376 at the beginning of a chapter.
13377  If you use the optional argument (
13378 \family sans
13379 Insert\SpecialChar \menuseparator
13380 Short
13381 \begin_inset space ~
13382 \end_inset
13383
13384 Title
13385 \family default
13386 ), you can insert the dictum's author there.
13387  Dictum and author are separated by a line.
13388  You need at least Koma-Script version 2.8q to use this.
13389  
13390 \family sans
13391 Dictum
13392 \family default
13393  is not contained in 
13394 \emph on
13395 article (koma-script)
13396 \emph default
13397 .
13398 \end_layout
13399
13400 \begin_layout Standard
13401 The following types, together with the standard types 
13402 \family sans
13403 Title
13404 \family default
13405
13406 \family sans
13407 Author
13408 \family default
13409 , and 
13410 \family sans
13411 Date
13412 \family default
13413 , form the title area of the document.
13414  They must be entered ahead of the first 
13415 \begin_inset Quotes eld
13416 \end_inset
13417
13418 ordinary
13419 \begin_inset Quotes erd
13420 \end_inset
13421
13422  paragraph.
13423 \begin_inset Foot
13424 status collapsed
13425
13426 \begin_layout Plain Layout
13427 The corresponding LaTeX commands must appear before the 
13428 \family typewriter
13429
13430 \backslash
13431 maketitle
13432 \family default
13433  command.
13434 \end_layout
13435
13436 \end_inset
13437
13438  When such a type is used more than once, the latter usage overwrites the
13439  former one, that means, for every type only the latest usage is valid.
13440  The order of the different types however has, like 
13441 \family sans
13442 Title
13443 \family default
13444
13445 \family sans
13446 Author
13447 \family default
13448 , and 
13449 \family sans
13450 Date
13451 \family default
13452 , no effect on the appearance of the produced document.
13453 \end_layout
13454
13455 \begin_layout Itemize
13456
13457 \family sans
13458 Subject
13459 \family default
13460 : produces a centered paragraph above the ordinary title (
13461 \family sans
13462 Title
13463 \family default
13464
13465 \family sans
13466 Author
13467 \family default
13468
13469 \family sans
13470 Date
13471 \family default
13472 ) for the subject of the document.
13473 \end_layout
13474
13475 \begin_layout Itemize
13476
13477 \family sans
13478 Publishers
13479 \family default
13480 : produces a centered paragraph below the ordinary title (
13481 \family sans
13482 Title
13483 \family default
13484
13485 \family sans
13486 Author
13487 \family default
13488
13489 \family sans
13490 Date
13491 \family default
13492 ) for the publishers' name.
13493 \end_layout
13494
13495 \begin_layout Itemize
13496
13497 \family sans
13498 Dedication
13499 \family default
13500 : in 
13501 \emph on
13502 report (koma-script)
13503 \emph default
13504  and 
13505 \emph on
13506 book (koma-script)
13507 \emph default
13508  produces a centered paragraph on its own page behind the title page, or
13509  in 
13510 \emph on
13511 article (koma-script)
13512 \emph default
13513  produces a centered paragraph below the ordinary title (
13514 \family sans
13515 Title
13516 \family default
13517
13518 \family sans
13519 Author
13520 \family default
13521
13522 \family sans
13523 Date
13524 \family default
13525
13526 \family sans
13527 Publishers
13528 \family default
13529 ) for a dedication.
13530 \end_layout
13531
13532 \begin_layout Itemize
13533
13534 \family sans
13535 Titlehead
13536 \family default
13537 : produces a left aligned paragraph above the ordinary title (
13538 \family sans
13539 Title
13540 \family default
13541
13542 \family sans
13543 Author
13544 \family default
13545
13546 \family sans
13547 Date
13548 \family default
13549
13550 \family sans
13551 Subject
13552 \family default
13553 ) for a document`s head.
13554 \end_layout
13555
13556 \begin_layout Itemize
13557
13558 \family sans
13559 Uppertitleback
13560 \family default
13561 : produces in a double-sided print in 
13562 \emph on
13563 report (koma-script)
13564 \emph default
13565  and 
13566 \emph on
13567 book (koma-script)
13568 \emph default
13569  a left-aligned paragraph at the top of the title page`s back or has no
13570  effect in a single-sided print or in 
13571 \emph on
13572 article (koma-script)
13573 \emph default
13574 .
13575 \end_layout
13576
13577 \begin_layout Itemize
13578
13579 \family sans
13580 Lowertitleback
13581 \family default
13582 : produces in a double-sided print in 
13583 \emph on
13584 report (koma-script)
13585 \emph default
13586  and 
13587 \emph on
13588 book (koma-script)
13589 \emph default
13590  a left-aligned paragraph at the bottom of the title page`s back or has
13591  no effect in a single-sided print or in 
13592 \emph on
13593 article (koma-script)
13594 \emph default
13595 .
13596 \end_layout
13597
13598 \begin_layout Itemize
13599
13600 \family sans
13601 Extratitle
13602 \family default
13603 : produces a special 
13604 \begin_inset Quotes eld
13605 \end_inset
13606
13607 dirty
13608 \begin_inset Quotes erd
13609 \end_inset
13610
13611  page ahead of the actual document containing a paragraph without special
13612  formatting.
13613 \end_layout
13614
13615 \begin_layout Standard
13616 The layout files for the document classes 
13617 \emph on
13618 article (koma-script)
13619 \emph default
13620
13621 \emph on
13622 report (koma-script)
13623 \emph default
13624 , and 
13625 \emph on
13626 book (koma-script)
13627 \emph default
13628  do include the file 
13629 \family typewriter
13630 scrmacros.inc
13631 \family default
13632 .
13633  This is thought of as a place to define your own types.
13634  Copy scrmacros
13635 \family typewriter
13636 .inc
13637 \family default
13638  in your personal layout directory and edit the file!
13639 \end_layout
13640
13641 \begin_layout Subsection
13642 letter (koma-script)
13643 \end_layout
13644
13645 \begin_layout Standard
13646 \noindent
13647 The document class 
13648 \emph on
13649 letter (koma-script)
13650 \emph default
13651  is implemented in the layout file 
13652 \family typewriter
13653 scrlettr.layout
13654 \family default
13655 .
13656  It contains all the paragraph types of the corresponding standard document
13657  class 
13658 \emph on
13659 letter
13660 \emph default
13661 , partly modified, with the exception of the LyX specific types 
13662 \family sans
13663 LyX-Code
13664 \family default
13665  and 
13666 \family sans
13667 Comment
13668 \family default
13669  and the 
13670 \family sans
13671 List
13672 \family default
13673  type, which is replaced by the new 
13674 \family sans
13675 Labeling
13676 \family default
13677  type.
13678  In addition, it contains, in contrast to the standard document class, the
13679  standard types 
13680 \family sans
13681 LaTeX
13682 \family default
13683
13684 \family sans
13685 Quotation
13686 \family default
13687
13688 \family sans
13689 Quote
13690 \family default
13691 , and 
13692 \family sans
13693 Verse
13694 \family default
13695 .
13696  Furthermore, there are a number of new letter specific types.
13697 \end_layout
13698
13699 \begin_layout Standard
13700 The appearance of the letter produced by this document class can be controlled
13701  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13702 \begin_inset Foot
13703 status collapsed
13704
13705 \begin_layout Plain Layout
13706 For example, the standard appearance of the letter`s heading, consisting
13707  of name and address, is quite self-willed.
13708  An 
13709 \begin_inset Quotes eld
13710 \end_inset
13711
13712 ordinary
13713 \begin_inset Quotes erd
13714 \end_inset
13715
13716  heading is produced by the following LaTeX commands in the preamble:
13717 \end_layout
13718
13719 \begin_layout LyX-Code
13720
13721 \backslash
13722 firsthead{
13723 \backslash
13724 parbox[b]{
13725 \backslash
13726 textwidth}
13727 \end_layout
13728
13729 \begin_layout LyX-Code
13730   {
13731 \backslash
13732 ignorespaces 
13733 \backslash
13734 fromname
13735 \backslash
13736
13737 \backslash
13738  
13739 \backslash
13740 ignorespaces 
13741 \backslash
13742 fromaddress}} 
13743 \end_layout
13744
13745 \begin_layout LyX-Code
13746
13747 \backslash
13748 nexthead{
13749 \backslash
13750 parbox[b]{
13751 \backslash
13752 textwidth}
13753 \end_layout
13754
13755 \begin_layout LyX-Code
13756   {
13757 \backslash
13758 ignorespaces 
13759 \backslash
13760 fromname 
13761 \backslash
13762 hfill 
13763 \backslash
13764 ignorespaces 
13765 \backslash
13766 pagename
13767 \backslash
13768  
13769 \backslash
13770 thepage}}
13771 \end_layout
13772
13773 \end_inset
13774
13775  A detailed German description of such LaTeX commands can be found in the
13776  Koma-Script documentation 
13777 \emph on
13778 scrguide
13779 \emph default
13780 .
13781  With it, the letter's author can produce his personal letter layout.
13782 \end_layout
13783
13784 \begin_layout Standard
13785 The types 
13786 \family sans
13787 Letter
13788 \family default
13789  and 
13790 \family sans
13791 Opening
13792 \family default
13793  define the beginning of the letter and must be used in every letter.
13794  To emphasize them in the LyX document class, they are marked with the letter
13795  
13796 \shape italic
13797 L
13798 \shape default
13799  or 
13800 \shape italic
13801 O
13802 \shape default
13803 , resp.
13804 \begin_inset space ~
13805 \end_inset
13806
13807 in the left margin.
13808  It is possible to write any number of letters in one file.
13809  An 
13810 \family sans
13811 Opening
13812 \family default
13813  type produces a new letter using the same addressee and a 
13814 \family sans
13815 Letter
13816 \family default
13817  type produces a new addressee.
13818  The types 
13819 \family sans
13820 Closing
13821 \family default
13822
13823 \family sans
13824 PS
13825 \family default
13826
13827 \family sans
13828 CC
13829 \family default
13830 , and 
13831 \family sans
13832 Encl
13833 \family default
13834  are ordinary paragraph types and can also be used several times in one
13835  and the same letter.
13836 \end_layout
13837
13838 \begin_layout Itemize
13839
13840 \family sans
13841 Letter
13842 \family default
13843 : produces a paragraph for the addressee and implicitly defines the beginning
13844  of the letter.
13845 \end_layout
13846
13847 \begin_layout Itemize
13848
13849 \family sans
13850 Opening
13851 \family default
13852 : produces a paragraph for the form of address and implicitly produces a
13853  new letter.
13854 \end_layout
13855
13856 \begin_layout Itemize
13857
13858 \family sans
13859 Closing
13860 \family default
13861 : produces a paragraph for a close.
13862 \end_layout
13863
13864 \begin_layout Itemize
13865
13866 \family sans
13867 PS
13868 \family default
13869 : produces a paragraph for a postscript.
13870 \end_layout
13871
13872 \begin_layout Itemize
13873
13874 \family sans
13875 CC
13876 \family default
13877 : produces a paragraph for a distribution list.
13878 \end_layout
13879
13880 \begin_layout Itemize
13881
13882 \family sans
13883 Encl
13884 \family default
13885 : produces a paragraph for enclosures.
13886 \end_layout
13887
13888 \begin_layout Standard
13889 The types 
13890 \family sans
13891 Name
13892 \family default
13893
13894 \family sans
13895 Signature
13896 \family default
13897
13898 \family sans
13899 Address
13900 \family default
13901
13902 \family sans
13903 Telephone
13904 \family default
13905
13906 \family sans
13907 Place
13908 \family default
13909
13910 \family sans
13911 Backaddress
13912 \family default
13913
13914 \family sans
13915 Specialmail
13916 \family default
13917
13918 \family sans
13919 Location
13920 \family default
13921
13922 \family sans
13923 Title
13924 \family default
13925 , and 
13926 \family sans
13927 Subject
13928 \family default
13929  are input types provided with a label to enter information, which will
13930  be processed by the document class.
13931 \begin_inset Foot
13932 status open
13933
13934 \begin_layout Plain Layout
13935 It could be seen as a matter of inconsequence, that the types 
13936 \family sans
13937 Letter
13938 \family default
13939  and 
13940 \family sans
13941 Opening
13942 \family default
13943  described above are not such input types as well.
13944  Because of the special meaning of those types, however, I have implemented
13945  them as ordinary paragraph types with a one letter mark in the left margin.
13946  Moreover, it would affect my feeling of symmetry, if the 
13947 \family sans
13948 Opening
13949 \family default
13950  type and the 
13951 \family sans
13952 Closing
13953 \family default
13954  type had such a serious different appearance.
13955 \end_layout
13956
13957 \end_inset
13958
13959  The types must be used ahead of the corresponding 
13960 \family sans
13961 Opening
13962 \family default
13963  type.
13964 \end_layout
13965
13966 \begin_layout Standard
13967 An implementation of these types in a WYSIWYG fashion does not seem to make
13968  sense, because the real appearance of the produced letter does not only
13969  depend on the usage of the particular type, but also on other factors.
13970  For example, a signature entered in the 
13971 \family sans
13972 Signature
13973 \family default
13974  type will in the standard behavior appear in the produced letter only,
13975  when in the same letter also a 
13976 \family sans
13977 Closing
13978 \family default
13979  type is used.
13980  The entered value of the 
13981 \family sans
13982 Telephone
13983 \family default
13984  type will in the standard behavior not appear in the produced letter at
13985  all.
13986  The possibility to design the letter`s heading freely is already indicated
13987  in a footnote above.
13988 \end_layout
13989
13990 \begin_layout Standard
13991 The input types can also be used as empty paragraphs.
13992  This makes sense e.
13993 \begin_inset space \thinspace{}
13994 \end_inset
13995
13996 g.
13997 \begin_inset space \space{}
13998 \end_inset
13999
14000 for the 
14001 \family sans
14002 Signature
14003 \family default
14004  type.
14005  If the 
14006 \family sans
14007 Signature
14008 \family default
14009  type is not used at all, in the standard behavior the value of the 
14010 \family sans
14011 Name
14012 \family default
14013  type is used as signature, whereas if an empty 
14014 \family sans
14015 Signature
14016 \family default
14017  type is used, no signature value is defined.
14018 \end_layout
14019
14020 \begin_layout Standard
14021 By using the input types it is possible to write a letter template, containing
14022  filled input types with your personal dates (name, address, etc.) and empty
14023  input types for other dates you want to enter.
14024 \end_layout
14025
14026 \begin_layout Itemize
14027
14028 \family sans
14029 Name
14030 \family default
14031 : sender's name, in the standard behavior appears as a centered paragraph
14032  in small caps in the letter`s heading.
14033 \end_layout
14034
14035 \begin_layout Itemize
14036
14037 \family sans
14038 Signature
14039 \family default
14040 : sender's signature, in the standard behavior appears below the 
14041 \family sans
14042 Closing
14043 \family default
14044  type.
14045  If no 
14046 \family sans
14047 Signature
14048 \family default
14049  type is used, the value of the 
14050 \family sans
14051 Name
14052 \family default
14053  type appears instead.
14054 \end_layout
14055
14056 \begin_layout Itemize
14057
14058 \family sans
14059 Address
14060 \family default
14061 : sender's address, in the standard behavior appears in a centered paragraph
14062  in the letter`s heading below the sender's name.
14063 \end_layout
14064
14065 \begin_layout Itemize
14066
14067 \family sans
14068 Telephone
14069 \family default
14070 : sender's telephone number, in the standard behavior only sets the LaTeX
14071  variable 
14072 \family typewriter
14073
14074 \backslash
14075 telephonenum
14076 \family default
14077 .
14078 \end_layout
14079
14080 \begin_layout Itemize
14081
14082 \family sans
14083 Place
14084 \family default
14085 : place of the letter`s making.
14086 \end_layout
14087
14088 \begin_layout Itemize
14089
14090 \family sans
14091 Date
14092 \family default
14093 : date of the letter`s making.
14094  
14095 \family sans
14096 Place
14097 \family default
14098  and 
14099 \family sans
14100 Date
14101 \family default
14102 , in the standard behavior, produce the place and the date in a right-aligned
14103  line below the addressee's field.
14104  If an empty 
14105 \family sans
14106 Date
14107 \family default
14108  type is used, neither place nor date appear, independent of the value of
14109  the 
14110 \family sans
14111 Place
14112 \family default
14113  type.
14114  If no 
14115 \family sans
14116 Date
14117 \family default
14118  type is used, the date of the letter `s production is used.
14119 \end_layout
14120
14121 \begin_layout Itemize
14122
14123 \family sans
14124 Backaddress
14125 \family default
14126 : sender`s back address, in the standard behavior appears above the addressee's
14127  field in a small sans serif font.
14128 \end_layout
14129
14130 \begin_layout Itemize
14131
14132 \family sans
14133 Specialmail
14134 \family default
14135 : special mail information, in the standard behavior appears underlined
14136  above the addressee's field below the back address.
14137 \end_layout
14138
14139 \begin_layout Itemize
14140
14141 \family sans
14142 Location
14143 \family default
14144 : additional information, in the standard behavior appears on right side
14145  below the addressee`s field.
14146 \end_layout
14147
14148 \begin_layout Itemize
14149
14150 \family sans
14151 Title
14152 \family default
14153 : the letter's title, in the standard behavior appears in a big, bold, sans
14154  serif font above the subject.
14155 \end_layout
14156
14157 \begin_layout Itemize
14158
14159 \family sans
14160 Subject
14161 \family default
14162 : the letter's subject, in the standard behavior appears in a bold font
14163  above the 
14164 \family sans
14165 Opening
14166 \family default
14167  paragraph.
14168 \end_layout
14169
14170 \begin_layout Standard
14171 The types 
14172 \family sans
14173 Yourref
14174 \family default
14175
14176 \family sans
14177 Yourmail
14178 \family default
14179
14180 \family sans
14181 Myref
14182 \family default
14183
14184 \family sans
14185 Customer
14186 \family default
14187 , and 
14188 \family sans
14189 Invoice
14190 \family default
14191  produce a business letter like line above the 
14192 \family sans
14193 Title
14194 \family default
14195  line containing the fields 
14196 \begin_inset Quotes eld
14197 \end_inset
14198
14199 Your ref.
14200 \begin_inset Quotes erd
14201 \end_inset
14202
14203
14204 \begin_inset Quotes eld
14205 \end_inset
14206
14207 Your letter of
14208 \begin_inset Quotes erd
14209 \end_inset
14210
14211
14212 \begin_inset Quotes eld
14213 \end_inset
14214
14215 Our ref.
14216 \begin_inset Quotes erd
14217 \end_inset
14218
14219
14220 \begin_inset Quotes eld
14221 \end_inset
14222
14223 Customer no.
14224 \begin_inset Quotes erd
14225 \end_inset
14226
14227
14228 \begin_inset Quotes eld
14229 \end_inset
14230
14231 Invoice no.
14232 \begin_inset Quotes erd
14233 \end_inset
14234
14235 , and 
14236 \begin_inset Quotes eld
14237 \end_inset
14238
14239 Date
14240 \begin_inset Quotes erd
14241 \end_inset
14242
14243 .
14244  For the date field, the value of the 
14245 \family sans
14246 Date
14247 \family default
14248  type is used.
14249  If one of these 
14250 \begin_inset Quotes eld
14251 \end_inset
14252
14253 business letter types
14254 \begin_inset Quotes erd
14255 \end_inset
14256
14257  is used, the value of the 
14258 \family sans
14259 Place
14260 \family default
14261  type however does not appear, but only the LaTeX variable 
14262 \family typewriter
14263
14264 \backslash
14265 fromplace
14266 \family default
14267  is set.
14268  The ordinary output of place and date in a right-aligned line below the
14269  addressee`s field is suppressed.
14270  The types are implemented as input types provided with a label and must
14271  be used ahead of the corresponding 
14272 \family sans
14273 Opening
14274 \family default
14275  type.
14276 \end_layout
14277
14278 \begin_layout Itemize
14279
14280 \family sans
14281 Yourref
14282 \family default
14283 : Your ref.
14284 \end_layout
14285
14286 \begin_layout Itemize
14287
14288 \family sans
14289 Yourmail
14290 \family default
14291 : Your letter of.
14292 \end_layout
14293
14294 \begin_layout Itemize
14295
14296 \family sans
14297 Myref
14298 \family default
14299 : Our ref.
14300 \end_layout
14301
14302 \begin_layout Itemize
14303
14304 \family sans
14305 Customer
14306 \family default
14307 : Customer no.
14308 \end_layout
14309
14310 \begin_layout Itemize
14311
14312 \family sans
14313 Invoice
14314 \family default
14315 : Invoice no.
14316 \end_layout
14317
14318 \begin_layout Subsection
14319 The new letter class: letter (koma-script v.2)
14320 \end_layout
14321
14322 \begin_layout Standard
14323 by 
14324 \noun on
14325 Jürgen Spitzmüller
14326 \end_layout
14327
14328 \begin_layout Standard
14329 \begin_inset VSpace medskip
14330 \end_inset
14331
14332
14333 \end_layout
14334
14335 \begin_layout Standard
14336 \noindent
14337 Koma-Script version 2.8 has introduced a new letter class 
14338 \family typewriter
14339 scrlttr2
14340 \family default
14341  which supersedes the now unsupported 
14342 \family typewriter
14343 scrlettr
14344 \family default
14345 .
14346  It has — on the LaTeX side — a completely new interface and is not compatible
14347  with the old class.
14348  Therefore, LyX supports both, though it is recommended you use the new
14349  class.
14350 \end_layout
14351
14352 \begin_layout Standard
14353 This class covers the same functionality as 
14354 \emph on
14355 letter (koma-script),
14356 \emph default
14357  and a few more.
14358  The basic items are 
14359 \family sans
14360 Address
14361 \family default
14362  (receiver's address, same as 
14363 \family sans
14364 Letter
14365 \family default
14366  in the old layout), 
14367 \family sans
14368 Opening
14369 \family default
14370 , and 
14371 \family sans
14372 Closing
14373 \family default
14374 .
14375  
14376 \family sans
14377 NextAddress
14378 \family default
14379  will start a new letter (i.
14380 \begin_inset space \thinspace{}
14381 \end_inset
14382
14383 e.
14384 \begin_inset space \space{}
14385 \end_inset
14386
14387 you can write several letters per document).
14388  New elements are sender's 
14389 \family sans
14390 E-Mail
14391 \family default
14392
14393 \family sans
14394 URL
14395 \family default
14396
14397 \family sans
14398 Fax
14399 \family default
14400
14401 \family sans
14402 Bank
14403 \family default
14404  and the possibility to use a 
14405 \family sans
14406 Logo
14407 \family default
14408  (via 
14409 \family sans
14410 Insert\SpecialChar \menuseparator
14411 Graphics
14412 \family default
14413 ) in the header.
14414 \end_layout
14415
14416 \begin_layout Standard
14417 The biggest improvement is, though, that the letter's layout is configurable
14418  to meet almost any needs.
14419  This can be done via the preamble or with a special style file (Letter
14420  Class Option, extension 
14421 \family typewriter
14422 *.lco
14423 \family default
14424 ), that will be read in as a class option.
14425 \begin_inset Foot
14426 status collapsed
14427
14428 \begin_layout Plain Layout
14429 The KOMA package comes with some default 
14430 \family typewriter
14431 *.lco
14432 \family default
14433  files.
14434  There is, for instance, a 
14435 \family typewriter
14436 DIN.lco
14437 \family default
14438  file that follows german typesetting rules, or a 
14439 \family typewriter
14440 KOMAold.lco
14441 \family default
14442  that provides the default layout of the old 
14443 \family typewriter
14444 scrlettr
14445 \family default
14446  class.
14447  The latter can be loaded with the class option 
14448 \family typewriter
14449 KOMAold
14450 \family default
14451 , inserted via the 
14452 \family sans
14453 \bar under
14454 L
14455 \bar default
14456 ayout\SpecialChar \menuseparator
14457
14458 \bar under
14459 D
14460 \bar default
14461 ocument\SpecialChar \menuseparator
14462 Extra Options
14463 \family default
14464  field.
14465 \end_layout
14466
14467 \end_inset
14468
14469  Have a look at the 
14470 \emph on
14471 koma-letter2
14472 \emph default
14473  template that is included in LyX for examples.
14474  A detailed description is to be found in the Koma-Script documentation
14475  (
14476 \emph on
14477 scrguide
14478 \emph default
14479 ).
14480 \end_layout
14481
14482 \begin_layout Subsection
14483 Problems
14484 \end_layout
14485
14486 \begin_layout Standard
14487 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14488  some problems.
14489 \end_layout
14490
14491 \begin_layout Itemize
14492 The chapter number of a 
14493 \family sans
14494 Chapter
14495 \family default
14496  type appears on a line of its own above the chapter heading instead of
14497  appearing in the same line ahead of it.
14498  The cause for that is the LyX internal behavior for the labeltype 
14499 \family sans
14500 Counter_Chapter
14501 \family default
14502  in the layout file.
14503 \end_layout
14504
14505 \begin_layout Itemize
14506 The headings of the types 
14507 \family sans
14508 Addchap
14509 \family default
14510  and 
14511 \family sans
14512 Addsec
14513 \family default
14514  are only put in the 
14515 \begin_inset Quotes eld
14516 \end_inset
14517
14518 true
14519 \begin_inset Quotes erd
14520 \end_inset
14521
14522  LaTeX table of contents, but not in the LyX table of contents (
14523 \family sans
14524 Document\SpecialChar \menuseparator
14525 Table
14526 \begin_inset space ~
14527 \end_inset
14528
14529 of
14530 \begin_inset space ~
14531 \end_inset
14532
14533 Contents
14534 \family default
14535 ).
14536 \end_layout
14537
14538 \begin_layout Itemize
14539 The paragraphs in a 
14540 \emph on
14541 letter
14542 \emph default
14543  document class appear in a skip separation mode, not indented.
14544  This is the standard behavior, no special LaTeX commands are needed for
14545  that.
14546  But in the 
14547 \family sans
14548 Document\SpecialChar \menuseparator
14549 Settings
14550 \family default
14551  dialog the corresponding radio button indicates 
14552 \family sans
14553 Indent
14554 \family default
14555 .
14556  A 
14557 \family sans
14558 Skip
14559 \family default
14560  value always has the effect that extra LaTeX commands are inserted in the
14561  document to produce the gap, which is not what is wanted in this case.
14562 \end_layout
14563
14564 \begin_layout Section
14565 Memoir
14566 \end_layout
14567
14568 \begin_layout Standard
14569 By 
14570 \noun on
14571 Jürgen Spitzmüller
14572 \end_layout
14573
14574 \begin_layout Subsection
14575 Overview
14576 \end_layout
14577
14578 \begin_layout Standard
14579 Memoir is a very powerful and constantly evolving class.
14580  It has been designed with regard to fictional and non-fictional literature.
14581  Its aim is to let the user have maximum control over the typesetting of
14582  his document.
14583  Memoir is based on the standard book class, but it can also emulate the
14584  article class (see below).
14585 \end_layout
14586
14587 \begin_layout Standard
14588 Peter Wilson, the developer of Memoir, is known as the author of lots of
14589  useful packages in the LaTeX world.
14590  Most of them have been merged with Memoir.
14591  Therefore, it is much easier to layout the table of contents, appendices,
14592  chapter designs and such.
14593  LyX, though, does not support all of these goodies natively.
14594  Some of them might be added to forthcoming releases
14595 \begin_inset Foot
14596 status collapsed
14597
14598 \begin_layout Plain Layout
14599 You are invited to send suggestions to 
14600 \begin_inset Flex URL
14601 status collapsed
14602
14603 \begin_layout Plain Layout
14604
14605 lyx-devel@lists.lyx.org
14606 \end_layout
14607
14608 \end_inset
14609
14610 .
14611 \end_layout
14612
14613 \end_inset
14614
14615 , lots will probably never be supported, due to the limitations of LyX's
14616  framework.
14617  Of course you can still use all features with the help of some native LaTeX
14618  commands (TeX code
14619 \begin_inset Foot
14620 status collapsed
14621
14622 \begin_layout Plain Layout
14623 Cf.
14624 \begin_inset ERT
14625 status collapsed
14626
14627 \begin_layout Plain Layout
14628
14629
14630 \backslash
14631  
14632 \end_layout
14633
14634 \end_inset
14635
14636 section
14637 \begin_inset space ~
14638 \end_inset
14639
14640
14641 \begin_inset CommandInset ref
14642 LatexCommand ref
14643 reference "sec:Inserting-TeX-Code"
14644
14645 \end_inset
14646
14647  for details.
14648 \end_layout
14649
14650 \end_inset
14651
14652 ).
14653  In this section, we can only list those features that are natively supported
14654  by LyX.
14655  For detailed descriptions (and for the rest of features) we recommend you
14656  have a look at the detailed manual of the Memoir class
14657 \begin_inset Foot
14658 status collapsed
14659
14660 \begin_layout Plain Layout
14661 Cf.
14662 \begin_inset ERT
14663 status collapsed
14664
14665 \begin_layout Plain Layout
14666
14667
14668 \backslash
14669  
14670 \end_layout
14671
14672 \end_inset
14673
14674
14675 \begin_inset Flex URL
14676 status collapsed
14677
14678 \begin_layout Plain Layout
14679
14680 CTAN:/macros/latex/memoir/memman.pdf
14681 \end_layout
14682
14683 \end_inset
14684
14685 .
14686 \end_layout
14687
14688 \end_inset
14689
14690 , which is not only a user guide for the class, but also both a comprehensive
14691  description on good typesetting and a superb example for good typesetting
14692  itself.
14693 \end_layout
14694
14695 \begin_layout Subsection
14696 Basic features and restrictions
14697 \end_layout
14698
14699 \begin_layout Standard
14700 Memoir supports basically all features of the standard book classes.
14701  There are, however, some differences, as follows:
14702 \end_layout
14703
14704 \begin_layout Description
14705 Font
14706 \begin_inset space ~
14707 \end_inset
14708
14709 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14710 \end_layout
14711
14712 \begin_layout Description
14713 Page
14714 \begin_inset space ~
14715 \end_inset
14716
14717 style: The fancy page style is not supported, due to a command clash between
14718  Memoir and the fancyhdr package (they both define a command with the same
14719  name, which confuses LaTeX).
14720  Instead, Memoir comes with a number of its own page styles (see 
14721 \family sans
14722 Layout\SpecialChar \menuseparator
14723 Document\SpecialChar \menuseparator
14724 Page
14725 \begin_inset space ~
14726 \end_inset
14727
14728 Style
14729 \family default
14730 ).
14731  If you want to use these for the chapter pages, you have to use the command
14732  
14733 \family typewriter
14734
14735 \backslash
14736 chapterstyle
14737 \family default
14738  in the main text or in preamble (e.
14739 \begin_inset space \thinspace{}
14740 \end_inset
14741
14742 g.
14743 \begin_inset space \space{}
14744 \end_inset
14745
14746
14747 \family typewriter
14748
14749 \backslash
14750 chapterstyle{companion}
14751 \family default
14752 ).
14753 \end_layout
14754
14755 \begin_layout Description
14756 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14757  optional argument in the standard classes.
14758  With this, you can specify an alternative version of the title for the
14759  table of contents and the headers (for instance, if the title is too long).
14760  In LyX, you can do this via 
14761 \family sans
14762 Insert\SpecialChar \menuseparator
14763 Short
14764 \begin_inset space ~
14765 \end_inset
14766
14767 Title
14768 \family default
14769  at the beginning of a chapter/section.
14770  Memoir features a second optional argument and thus separates the table
14771  of contents from the header.
14772  You can define three variants of a title with this: one for the main text,
14773  one for the table of contents, and one for the headers.
14774  Simply insert two optional arguments if you need this feature, the first
14775  one containing the short title for the Table of Contents, the second one
14776  containing an alternative short title for the headers.
14777 \end_layout
14778
14779 \begin_layout Description
14780 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14781  of contents, the list of figures and the list of table start a new page
14782  automatically.
14783  Memoir does not follow this route.
14784  You have to insert a page break yourself, if you want to have one.
14785 \end_layout
14786
14787 \begin_layout Description
14788 Titlepage: For some unknown reason, Memoir uses pagination on the title
14789  page (in the standard classes, title pages are 
14790 \begin_inset Quotes eld
14791 \end_inset
14792
14793 empty
14794 \begin_inset Quotes erd
14795 \end_inset
14796
14797 ).
14798  If you want an empty title page, type 
14799 \family typewriter
14800
14801 \backslash
14802 aliaspagestyle{title}{empty}
14803 \family default
14804  in the preamble.
14805 \end_layout
14806
14807 \begin_layout Description
14808 Article: With the class option 
14809 \emph on
14810 article
14811 \emph default
14812  (to be inserted in 
14813 \family sans
14814 Layout\SpecialChar \menuseparator
14815 Document\SpecialChar \menuseparator
14816 Extra
14817 \begin_inset space ~
14818 \end_inset
14819
14820 Options
14821 \family default
14822 ), you can emulate article style.
14823  That is, counters (footnotes, figures, tables etc.) will not be reset on
14824  new chapters, chapters don't start a new page (but are—in contrary to 
14825 \begin_inset Quotes eld
14826 \end_inset
14827
14828 real
14829 \begin_inset Quotes erd
14830 \end_inset
14831
14832  article classes—still allowed), parts, though, use their own page, as in
14833  book.
14834 \end_layout
14835
14836 \begin_layout Description
14837 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14838  font commands, which have been used in the old LaTeX version 2.09 (e.
14839 \begin_inset space \thinspace{}
14840 \end_inset
14841
14842 g.
14843 \begin_inset space \space{}
14844 \end_inset
14845
14846
14847 \family typewriter
14848
14849 \backslash
14850 rm
14851 \family default
14852
14853 \family typewriter
14854
14855 \backslash
14856 it
14857 \family default
14858 ).
14859  It produces an error and stops LaTeX whenever such a command appears.
14860  The class option 
14861 \emph on
14862 oldfontcommands
14863 \emph default
14864  reallows the commands and spits out warnings instead (which does at least
14865  not stop LaTeX).
14866  Since a lot of packages and particularly BibTeX style files are still using
14867  those commands, we have decided to use this option by default.
14868 \end_layout
14869
14870 \begin_layout Subsection
14871 Extra features
14872 \end_layout
14873
14874 \begin_layout Standard
14875 We will only describe the features supported by LyX (which is not much currently
14876 ).
14877  Please consult the Memoir manual
14878 \begin_inset Foot
14879 status collapsed
14880
14881 \begin_layout Plain Layout
14882 Cf.
14883 \begin_inset ERT
14884 status collapsed
14885
14886 \begin_layout Plain Layout
14887
14888
14889 \backslash
14890  
14891 \end_layout
14892
14893 \end_inset
14894
14895
14896 \begin_inset Flex URL
14897 status collapsed
14898
14899 \begin_layout Plain Layout
14900
14901 CTAN:/macros/latex/memoir/memman.pdf
14902 \end_layout
14903
14904 \end_inset
14905
14906 .
14907 \end_layout
14908
14909 \end_inset
14910
14911  for details.
14912 \end_layout
14913
14914 \begin_layout Description
14915 Abstract: You may wonder why an abstract is an extra feature.
14916  Well, it is in book class.
14917  Usually books don't have abstracts.
14918  Memoir, however, has.
14919  You can use it wherever and how often you like.
14920 \end_layout
14921
14922 \begin_layout Description
14923 Chapterprecis: You may know this older typesetting style: The contents of
14924  a chapter are summarized below the title and also in the table of contents
14925  (e.
14926 \begin_inset space \thinspace{}
14927 \end_inset
14928
14929 g.
14930 \begin_inset space \space{}
14931 \end_inset
14932
14933
14934 \emph on
14935 Our hero arrives in Troia; he loses some friends; he finds others
14936 \emph default
14937 ).
14938  Chapterprecis does exactly this.
14939  It is therefore only sensible below a chapter.
14940 \end_layout
14941
14942 \begin_layout Description
14943 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14944  The epigraph environment provides an elegant way of typesetting such a
14945  motto.
14946  The motto itself (text) and its author (source) are divided by a short
14947  line.
14948  Unfortunately, we have to fool LyX a bit here again, since the environment
14949  needs two arguments (text and source).
14950  In this case, we have to use curly brackets (in TeX mode) between the two
14951  arguments: 
14952 \emph on
14953 <smart slogan>
14954 \emph default
14955  
14956 \family typewriter
14957 }{
14958 \family default
14959  
14960 \emph on
14961 <author of the slogan>.
14962 \end_layout
14963
14964 \begin_layout Description
14965 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14966  complex figurative poems).
14967  LyX can only support a few of them.
14968  One is poemtitle, which is a centered title for poems, which will also
14969  be added to the table of contents (verse is the standard environment for
14970  poems.
14971  Memoir has some enhanced versions of verse, but you need to use TeX code,
14972  because they have to be nested inside regular verse environments, which
14973  is not possible with LyX).
14974 \end_layout
14975
14976 \begin_layout Description
14977 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14978 \end_layout
14979
14980 \begin_layout Section
14981 Article (mwart), book (mwbk) and report (mwrep)
14982 \begin_inset Argument
14983 status collapsed
14984
14985 \begin_layout Plain Layout
14986 The 
14987 \family typewriter
14988 mw
14989 \family default
14990  Classes
14991 \end_layout
14992
14993 \end_inset
14994
14995
14996 \end_layout
14997
14998 \begin_layout Standard
14999 by 
15000 \noun on
15001 Tomasz Luczak
15002 \end_layout
15003
15004 \begin_layout Standard
15005 The LyX document classes 
15006 \emph on
15007 article (mwart)
15008 \emph default
15009
15010 \emph on
15011 report (mwrep)
15012 \emph default
15013  and 
15014 \emph on
15015 book
15016 \emph default
15017  
15018 \emph on
15019 (mwbk)
15020 \emph default
15021  correspond to the LaTeX document classes 
15022 \family typewriter
15023 mwart.cls
15024 \family default
15025
15026 \family typewriter
15027 mwrep.cls
15028 \family default
15029  and 
15030 \family typewriter
15031 mwbk.cls
15032 \family default
15033 , resp.
15034  They are replacements for the standard document classes 
15035 \family typewriter
15036 article.cls
15037 \family default
15038
15039 \family typewriter
15040 report.cls
15041 \family default
15042  and 
15043 \family typewriter
15044 book.cls
15045 \family default
15046 , resp., and fit better to Polish typography conventions in a number of points.
15047  
15048 \end_layout
15049
15050 \begin_layout Standard
15051 Basic differences:
15052 \end_layout
15053
15054 \begin_layout Itemize
15055 Unnumbered titles (with star, e.
15056 \begin_inset space \thinspace{}
15057 \end_inset
15058
15059 g.
15060 \begin_inset space \space{}
15061 \end_inset
15062
15063
15064 \family sans
15065 Section*
15066 \family default
15067 ) are added into table of contents,
15068 \end_layout
15069
15070 \begin_layout Itemize
15071 Additional page styles:
15072 \end_layout
15073
15074 \begin_deeper
15075 \begin_layout Description
15076 uheadings header with separated lines,
15077 \end_layout
15078
15079 \begin_layout Description
15080 myheadings custom header, contents headers via commands: 
15081 \family typewriter
15082
15083 \backslash
15084 markright
15085 \family default
15086  and 
15087 \family typewriter
15088
15089 \backslash
15090 markboth
15091 \family default
15092 ,
15093 \end_layout
15094
15095 \begin_layout Description
15096 myuheadings custom header with separated lines,
15097 \end_layout
15098
15099 \begin_layout Description
15100 outer page number is placed on outer side of page
15101 \end_layout
15102
15103 \end_deeper
15104 \begin_layout Itemize
15105 Options 
15106 \end_layout
15107
15108 \begin_deeper
15109 \begin_layout Description
15110 rmheadings serif titles — default,
15111 \end_layout
15112
15113 \begin_layout Description
15114 sfheadings sansserif titles,
15115 \end_layout
15116
15117 \begin_layout Description
15118 authortitle on title page first placed is author next title — default,
15119 \end_layout
15120
15121 \begin_layout Description
15122 titleauthor on title page first placed is title next author,
15123 \end_layout
15124
15125 \begin_layout Description
15126 withmarginpar reserve place on page for margins.
15127 \end_layout
15128
15129 \end_deeper
15130 \begin_layout Section
15131 Paper
15132 \end_layout
15133
15134 \begin_layout Standard
15135 The document class 
15136 \family sans
15137 paper
15138 \family default
15139  provides an alternative to the standard 
15140 \family sans
15141 article
15142 \family default
15143  class.
15144  It provides similar functionality, but you might prefer this layout with
15145  sans serif sections, headings, and more.
15146 \end_layout
15147
15148 \begin_layout Section
15149 RevTeX4
15150 \end_layout
15151
15152 \begin_layout Standard
15153 by 
15154 \noun on
15155 Amir Karger
15156 \end_layout
15157
15158 \begin_layout Standard
15159 \begin_inset VSpace bigskip
15160 \end_inset
15161
15162
15163 \end_layout
15164
15165 \begin_layout Standard
15166 \noindent
15167 The 
15168 \family sans
15169 Revtex
15170 \begin_inset space ~
15171 \end_inset
15172
15173 4
15174 \family default
15175  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15176 \begin_inset Formula $\beta$
15177 \end_inset
15178
15179  release of May, 1999) class.
15180 \end_layout
15181
15182 \begin_layout Standard
15183 LyX has a 
15184 \family sans
15185 Revtex
15186 \family default
15187  textclass, which works with RevTeX 3.1.
15188  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15189  That means that it doesn't interact very well with LyX, which requires
15190  LaTeX2e, although it has been kludged to work.
15191  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15192  LyX with the 
15193 \family sans
15194 RevTeX
15195 \begin_inset space ~
15196 \end_inset
15197
15198 4
15199 \family default
15200  textclass should also be pretty easy to use.
15201 \end_layout
15202
15203 \begin_layout Standard
15204 These documents are supposed to be used in 
15205 \emph on
15206 addition
15207 \emph default
15208  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15209  macros, and assume you'll know what to put in the preamble if necessary.
15210 \end_layout
15211
15212 \begin_layout Subsection
15213 Installation
15214 \end_layout
15215
15216 \begin_layout Standard
15217 All you need to do is install RevTeX 4, as described in the package's README
15218  file.
15219  The package can be found at The RevTeX 4 Web Site 
15220 \begin_inset Flex URL
15221 status collapsed
15222
15223 \begin_layout Plain Layout
15224
15225 http://publish.aps.org/revtex4/
15226 \end_layout
15227
15228 \end_inset
15229
15230 .
15231  Install it somewhere that LaTeX can see it.
15232  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15233  (i.
15234 \begin_inset space \thinspace{}
15235 \end_inset
15236
15237 e.
15238 \begin_inset space \space{}
15239 \end_inset
15240
15241 not the directory where you installed the class file.) Then, if you reconfigure
15242  LyX, it will find the class file and let you use the RevTeX4 textclass.
15243 \end_layout
15244
15245 \begin_layout Standard
15246 Probably the easiest way to get started is either to import a RevTeX 4 document
15247  using 
15248 \family typewriter
15249 tex2lyx
15250 \family default
15251 , or to use the 
15252 \family sans
15253 Revtex
15254 \begin_inset space ~
15255 \end_inset
15256
15257 4
15258 \family default
15259  template, found in the templates directory.
15260 \end_layout
15261
15262 \begin_layout Subsection
15263 Preamble Matter
15264 \end_layout
15265
15266 \begin_layout Standard
15267 Optional arguments to 
15268 \family typewriter
15269
15270 \backslash
15271 documentclass
15272 \family default
15273 , like 
15274 \begin_inset Quotes eld
15275 \end_inset
15276
15277 preprint
15278 \begin_inset Quotes erd
15279 \end_inset
15280
15281  and 
15282 \begin_inset Quotes eld
15283 \end_inset
15284
15285 aps
15286 \begin_inset Quotes erd
15287 \end_inset
15288
15289 , go in the 
15290 \family sans
15291 E
15292 \bar under
15293 x
15294 \bar default
15295 tra
15296 \begin_inset space ~
15297 \end_inset
15298
15299 Options
15300 \family default
15301  field in the 
15302 \family sans
15303 Document
15304 \begin_inset space ~
15305 \end_inset
15306
15307 Layout
15308 \family default
15309  dialog, as usual.
15310  Remember that in RevTeX, at least one optional argument is required! 
15311 \end_layout
15312
15313 \begin_layout Standard
15314 Other preamble matter, like 
15315 \family typewriter
15316
15317 \backslash
15318 draft
15319 \family default
15320  etc.
15321 \begin_inset space ~
15322 \end_inset
15323
15324 goes in the 
15325 \family sans
15326 LaTeX
15327 \begin_inset space ~
15328 \end_inset
15329
15330 Preamble
15331 \family default
15332  dialog, also as usual.
15333 \end_layout
15334
15335 \begin_layout Subsection
15336 Layouts
15337 \end_layout
15338
15339 \begin_layout Standard
15340 The layouts basically correspond to the commands in RevTeX4.0.
15341  For example, the Email layout corresponds to 
15342 \family typewriter
15343
15344 \backslash
15345 email{}
15346 \family default
15347 .
15348  Note that (at least as of RevTeX 4.0 Beta), the 
15349 \family sans
15350 Address
15351 \family default
15352  and 
15353 \family sans
15354 Affiliation
15355 \family default
15356  layouts are exactly equivalent, so you shouldn't need to use both.
15357 \begin_inset Foot
15358 status collapsed
15359
15360 \begin_layout Plain Layout
15361 In case you're curious, both were included so that 
15362 \family typewriter
15363 tex2lyx
15364 \family default
15365  would be able to translate both 
15366 \family typewriter
15367
15368 \backslash
15369 address
15370 \family default
15371  and 
15372 \family typewriter
15373
15374 \backslash
15375 affiliation
15376 \family default
15377 .
15378 \end_layout
15379
15380 \end_inset
15381
15382
15383 \end_layout
15384
15385 \begin_layout Subsection
15386 Important Notes
15387 \end_layout
15388
15389 \begin_layout Standard
15390 There are a couple of important unique aspects of RevTeX 4 which might cause
15391  bugs that will be even more confusing in LyX.
15392 \end_layout
15393
15394 \begin_layout Standard
15395 In RevTeX, the 
15396 \family typewriter
15397
15398 \backslash
15399 thanks
15400 \family default
15401  command goes 
15402 \emph on
15403 outside
15404 \emph default
15405  the 
15406 \family typewriter
15407
15408 \backslash
15409 author
15410 \family default
15411  command.
15412  The LyX equivalent is that there is a separate Thanks layout.
15413  Do 
15414 \emph on
15415 not
15416 \emph default
15417  write footnotes in the 
15418 \family sans
15419 Author
15420 \family default
15421  layout, or weird things may happen.
15422  See the RevTeX 4 documentation for more details.
15423 \end_layout
15424
15425 \begin_layout Standard
15426 Also, the 
15427 \family sans
15428 Author
15429 \begin_inset space ~
15430 \end_inset
15431
15432 Email
15433 \family default
15434
15435 \family sans
15436 Author
15437 \begin_inset space ~
15438 \end_inset
15439
15440 URL
15441 \family default
15442 , and 
15443 \family sans
15444 Thanks
15445 \family default
15446  layouts must be placed 
15447 \emph on
15448 in between
15449 \emph default
15450  the 
15451 \family sans
15452 Author
15453 \family default
15454  layout and the corresponding 
15455 \family sans
15456 Address
15457 \family default
15458  (or equivalent 
15459 \family sans
15460 Affiliation
15461 \family default
15462 ) layout.
15463  If you put the 
15464 \family sans
15465 Thanks
15466 \family default
15467  after the 
15468 \family sans
15469 Address
15470 \family default
15471 , the LaTeX won't compile.
15472 \end_layout
15473
15474 \begin_layout Subsection
15475 Drawbacks
15476 \end_layout
15477
15478 \begin_layout Standard
15479 The main problem with this layout is that you can't use the optional arguments
15480  to layouts like Email and Title.
15481  (The problem is not unique to this layout; you can't use optional arguments
15482  to the Section layouts either.) This means that after you export that file
15483  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15484  need to edit the LaTeX file with a text editor to add the optional arguments
15485  to set, e.
15486 \begin_inset space \thinspace{}
15487 \end_inset
15488
15489 g.
15490 \begin_inset space \space{}
15491 \end_inset
15492
15493 the running title for the page headers.
15494  Lacking these layouts makes the 
15495 \family typewriter
15496
15497 \backslash
15498 altaffiliation
15499 \family default
15500  (and the equivalent 
15501 \family typewriter
15502
15503 \backslash
15504 altaddress
15505 \family default
15506 ) useless, so the corresponding layouts don't exist, and will have to be
15507  added by hand.
15508 \begin_inset Foot
15509 status collapsed
15510
15511 \begin_layout Plain Layout
15512
15513 \emph on
15514 Note from JMarc:
15515 \emph default
15516  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15517  has not been updated yet to take advantage of it.
15518 \end_layout
15519
15520 \end_inset
15521
15522  
15523 \end_layout
15524
15525 \begin_layout Section
15526 Springer Journals (
15527 \family sans
15528 svjour
15529 \family default
15530 )
15531 \end_layout
15532
15533 \begin_layout Standard
15534 by 
15535 \noun on
15536 Martin Vermeer
15537 \end_layout
15538
15539 \begin_layout Subsection
15540 Description
15541 \end_layout
15542
15543 \begin_layout Standard
15544 These are the layout files for some of the journal formats used by Springer
15545  Verlag and listed on 
15546 \begin_inset Flex URL
15547 status collapsed
15548
15549 \begin_layout Plain Layout
15550
15551 http://www.springer.de/author/tex/help-journals.html
15552 \end_layout
15553
15554 \end_inset
15555
15556 , where you should also go to fetch the class files (yes, these are LaTeX2e
15557  now!).
15558  It is a modular system: the things common to all journals are implemented
15559  in 
15560 \family typewriter
15561 svjour.inc
15562 \family default
15563 , which journal-specific layout files (such as, e.
15564 \begin_inset space \thinspace{}
15565 \end_inset
15566
15567 g.
15568 \begin_inset space \space{}
15569 \end_inset
15570
15571
15572 \family typewriter
15573 svjog.layout
15574 \family default
15575  for Journal of Geodesy) can include.
15576 \end_layout
15577
15578 \begin_layout Standard
15579 This means that implementing support for any other Springer journal on this
15580  list is as simple as writing your own 
15581 \family typewriter
15582 sv
15583 \family default
15584 <myjournal>
15585 \family typewriter
15586 .layout
15587 \family default
15588  file following the outline given in 
15589 \family typewriter
15590 svjog.layout
15591 \family default
15592 .
15593  
15594 \end_layout
15595
15596 \begin_layout Standard
15597 It is reasonably well tested only for the Journal of Geodesy.
15598  
15599 \family typewriter
15600 svjour
15601 \family default
15602  and 
15603 \family typewriter
15604 svjog
15605 \family default
15606  come with the standard LyX distribution.
15607  Install the relevant class file (downloaded from Springer) in a proper
15608  directory, reconfigure LaTeX (in the teTeX case by running 
15609 \family typewriter
15610 texhash
15611 \family default
15612 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15613  and it should work.
15614 \end_layout
15615
15616 \begin_layout Subsection
15617 New styles
15618 \end_layout
15619
15620 \begin_layout Standard
15621 A large number of theorem-like styles — 
15622 \family sans
15623 Claim, Conjecture,
15624 \family default
15625  
15626 \family sans
15627 \SpecialChar \ldots{}
15628 Theorem
15629 \family default
15630 .
15631 \end_layout
15632
15633 \begin_layout Standard
15634
15635 \family sans
15636 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15637  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15638 \family default
15639 .
15640  See the Springer class file documentation for details.
15641 \end_layout
15642
15643 \begin_layout Subsection
15644 Supported journals
15645 \end_layout
15646
15647 \begin_layout Itemize
15648
15649 \emph on
15650 Journal of Geodesy
15651 \emph default
15652
15653 \family typewriter
15654 svjog.layout
15655 \family default
15656  — Martin Vermeer
15657 \end_layout
15658
15659 \begin_layout Itemize
15660
15661 \emph on
15662 Probability Theory and Related Fields
15663 \emph default
15664
15665 \family typewriter
15666 svprobth.layout
15667 \family default
15668  — Jean-Marc Lasgouttes
15669 \end_layout
15670
15671 \begin_layout Standard
15672 Add your own, it isn't so hard!
15673 \end_layout
15674
15675 \begin_layout Subsection
15676 Credits
15677 \end_layout
15678
15679 \begin_layout Standard
15680 These files are partly based on the older 
15681 \family typewriter
15682 ejour2.layout
15683 \family default
15684 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15685  file from Springer.
15686  All this, and the 
15687 \family typewriter
15688 ejour2
15689 \family default
15690  layout, are now defunct.
15691  Jean-Marc Lasgouttes helped out big in making me find my way around the
15692  LyX layout file mechanism.
15693 \end_layout
15694
15695 \begin_layout Subsection
15696 Bugs
15697 \end_layout
15698
15699 \begin_layout Standard
15700 Probably.
15701  But probably less than in the old hacked-LaTeX 
15702 \family typewriter
15703 ejour2
15704 \family default
15705 .
15706 \end_layout
15707
15708 \begin_layout Standard
15709 Limitations e.
15710 \begin_inset space \thinspace{}
15711 \end_inset
15712
15713 g.: does not display the number for theorem-like layouts, just #.
15714 \end_layout
15715
15716 \begin_layout Section
15717 Slides [aka 
15718 \noun on
15719 SliTeX
15720 \noun default
15721 ]
15722 \begin_inset CommandInset label
15723 LatexCommand label
15724 name "sec:slitex"
15725
15726 \end_inset
15727
15728
15729 \end_layout
15730
15731 \begin_layout Standard
15732 by 
15733 \noun on
15734 John Weiss
15735 \noun default
15736  
15737 \end_layout
15738
15739 \begin_layout Subsection
15740 Introduction
15741 \end_layout
15742
15743 \begin_layout Standard
15744 This section describes how to use LyX to make slides for overhead projectors.
15745  There are two document classes that can do this: the default slides class
15746  and the 
15747 \family sans
15748 FoilTeX
15749 \family default
15750  slides class.
15751  This section documents the former.
15752 \end_layout
15753
15754 \begin_layout Standard
15755 I'm going to say this again, nice and clear, so that there's no misunderstanding
15756 :
15757 \end_layout
15758
15759 \begin_layout Standard
15760 \begin_inset VSpace bigskip
15761 \end_inset
15762
15763
15764 \end_layout
15765
15766 \begin_layout Standard
15767 \align center
15768
15769 \size large
15770 This section documents the class 
15771 \begin_inset Quotes eld
15772 \end_inset
15773
15774
15775 \family sans
15776 slides (default)
15777 \family default
15778
15779 \begin_inset Quotes erd
15780 \end_inset
15781
15782  
15783 \emph on
15784 only.
15785 \end_layout
15786
15787 \begin_layout Standard
15788 \begin_inset VSpace bigskip
15789 \end_inset
15790
15791
15792 \end_layout
15793
15794 \begin_layout Standard
15795 If you're looking for the documentation for 
15796 \begin_inset Quotes eld
15797 \end_inset
15798
15799
15800 \family sans
15801 slides (FoilTeX)
15802 \family default
15803
15804 \begin_inset Quotes erd
15805 \end_inset
15806
15807 , check out section
15808 \begin_inset space ~
15809 \end_inset
15810
15811
15812 \begin_inset CommandInset ref
15813 LatexCommand ref
15814 reference "sec:foiltex"
15815
15816 \end_inset
15817
15818 .
15819  The 
15820 \family sans
15821 foils
15822 \family default
15823  class [
15824 \begin_inset Quotes eld
15825 \end_inset
15826
15827
15828 \family sans
15829 slides (FoilTeX)
15830 \family default
15831
15832 \begin_inset Quotes erd
15833 \end_inset
15834
15835 ] is actually somewhat better than the default 
15836 \family sans
15837 slides
15838 \family default
15839  class,
15840 \begin_inset Foot
15841 status collapsed
15842
15843 \begin_layout Plain Layout
15844 \SpecialChar \ldots{}
15845 or so I've been told repeatedly by its advocates.
15846  Having never used it, I have no idea if this claim is true or not.
15847 \end_layout
15848
15849 \end_inset
15850
15851  which this section documents.
15852 \end_layout
15853
15854 \begin_layout Standard
15855 This class is the LaTeX2e improvement of the old 
15856 \noun on
15857 SliTeX
15858 \noun default
15859  package.
15860  Every LaTeX2e distribution includes this class [which I'll just refer to
15861  as 
15862 \begin_inset Quotes eld
15863 \end_inset
15864
15865
15866 \family sans
15867 slides
15868 \family default
15869
15870 \begin_inset Quotes erd
15871 \end_inset
15872
15873  from now on], so you're bound to have it.
15874  As I noted earlier, there are other classes, such as 
15875 \family sans
15876 foils
15877 \family default
15878 , which also produce slides for overhead projectors and do a better job
15879  at it.
15880  However, there are some things which 
15881 \family sans
15882 slides
15883 \family default
15884  can do which the others can't, such as generate overlays.
15885  Read on to learn more!
15886 \end_layout
15887
15888 \begin_layout Subsection
15889 Getting Started
15890 \begin_inset CommandInset label
15891 LatexCommand label
15892 name "sec:slidesetup"
15893
15894 \end_inset
15895
15896
15897 \end_layout
15898
15899 \begin_layout Standard
15900 Obviously, to use this document class, you need to select 
15901 \begin_inset Quotes eld
15902 \end_inset
15903
15904
15905 \family sans
15906 slides (default)
15907 \family default
15908
15909 \begin_inset Quotes erd
15910 \end_inset
15911
15912  from the class list in the 
15913 \family sans
15914 Document\SpecialChar \menuseparator
15915 Settings
15916 \family default
15917  dialog.
15918  There are some other special things you should know about this class:
15919 \end_layout
15920
15921 \begin_layout Itemize
15922 Don't bother changing the options 
15923 \family sans
15924 Sides and Columns
15925 \family default
15926 .
15927  They're not supported by the 
15928 \family sans
15929 slides
15930 \family default
15931  class, anyways.
15932 \end_layout
15933
15934 \begin_layout Itemize
15935 The option 
15936 \family sans
15937 Page
15938 \begin_inset space ~
15939 \end_inset
15940
15941 style
15942 \family default
15943  behaves a bit differently for this class.
15944  The possible choices and what they do are as follows:
15945 \end_layout
15946
15947 \begin_deeper
15948 \begin_layout Description
15949
15950 \family sans
15951 plain
15952 \family default
15953  The final output contains page numbers in the lower right corner.
15954 \end_layout
15955
15956 \begin_layout Description
15957
15958 \family sans
15959 headings
15960 \family default
15961  Like 
15962 \family sans
15963 plain
15964 \family default
15965 , but also prints out any time markers you've put in.
15966  This is the default.
15967 \end_layout
15968
15969 \begin_layout Description
15970
15971 \family sans
15972 empty
15973 \family default
15974  The final output contains no page numbers, time markers, or alignment markers.
15975 \end_layout
15976
15977 \end_deeper
15978 \begin_layout Itemize
15979 The 
15980 \family sans
15981 slides
15982 \family default
15983  class has an extra option: 
15984 \family typewriter
15985 clock
15986 \family default
15987 .
15988  To use it, put 
15989 \begin_inset Quotes eld
15990 \end_inset
15991
15992
15993 \family typewriter
15994 clock
15995 \family default
15996
15997 \begin_inset Quotes erd
15998 \end_inset
15999
16000  in the extra class options.
16001 \end_layout
16002
16003 \begin_deeper
16004 \begin_layout Standard
16005 Using this options allows you to add time markers to 
16006 \family sans
16007 Note
16008 \family default
16009 s.
16010  See section
16011 \begin_inset space ~
16012 \end_inset
16013
16014
16015 \begin_inset CommandInset ref
16016 LatexCommand ref
16017 reference "sec:slideNote"
16018
16019 \end_inset
16020
16021  for more details.
16022 \end_layout
16023
16024 \end_deeper
16025 \begin_layout Standard
16026 You can also use the template file 
16027 \begin_inset Quotes eld
16028 \end_inset
16029
16030
16031 \family typewriter
16032 slides.lyx
16033 \family default
16034
16035 \begin_inset Quotes erd
16036 \end_inset
16037
16038  to automatically set up a document to use the 
16039 \family sans
16040 slides
16041 \family default
16042  class [using 
16043 \family sans
16044 File\SpecialChar \menuseparator
16045 New
16046 \begin_inset space ~
16047 \end_inset
16048
16049 from
16050 \begin_inset space ~
16051 \end_inset
16052
16053 Template
16054 \family default
16055  to open your new document].
16056  The template file also contains some examples of the special paragraph
16057  environments used by this class.
16058  I'll describe those next.
16059 \end_layout
16060
16061 \begin_layout Subsection
16062 Paragraph Environments
16063 \end_layout
16064
16065 \begin_layout Subsubsection
16066 Supported Environments
16067 \end_layout
16068
16069 \begin_layout Standard
16070 The first thing you'll notice when you start up a new 
16071 \family sans
16072 slides
16073 \family default
16074  document is the font size and type: it's the equivalent of the size 
16075 \begin_inset Quotes eld
16076 \end_inset
16077
16078
16079 \family sans
16080 Largest
16081 \family default
16082
16083 \begin_inset Quotes erd
16084 \end_inset
16085
16086  in the 
16087 \family sans
16088 Sans
16089 \begin_inset space ~
16090 \end_inset
16091
16092 Serif
16093 \family default
16094  font.
16095  This is also what's used in the output.
16096  Think of this as a 
16097 \begin_inset Quotes eld
16098 \end_inset
16099
16100 visual cue
16101 \begin_inset Quotes erd
16102 \end_inset
16103
16104  to remind you that this is a slide.
16105  Your final slides will use a larger font; ergo, you'll have less space.
16106  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16107 \end_layout
16108
16109 \begin_layout Standard
16110 The next thing that becomes obvious is the changes to the paragraph environment
16111  pull-down box [at the far-left end of the toolbar].
16112  Most of the paragraph environments you're used to seeing are missing.
16113  There are also five new ones.
16114  That's because the 
16115 \family sans
16116 slides
16117 \family default
16118  class itself only supports certain paragraph environments:
16119 \end_layout
16120
16121 \begin_layout Itemize
16122
16123 \family sans
16124 Standard
16125 \end_layout
16126
16127 \begin_layout Itemize
16128
16129 \family sans
16130 Itemize
16131 \end_layout
16132
16133 \begin_layout Itemize
16134
16135 \family sans
16136 Enumerate
16137 \end_layout
16138
16139 \begin_layout Itemize
16140
16141 \family sans
16142 Description
16143 \end_layout
16144
16145 \begin_layout Itemize
16146
16147 \family sans
16148 List
16149 \end_layout
16150
16151 \begin_layout Itemize
16152
16153 \family sans
16154 Quotation
16155 \end_layout
16156
16157 \begin_layout Itemize
16158
16159 \family sans
16160 Quote
16161 \end_layout
16162
16163 \begin_layout Itemize
16164
16165 \family sans
16166 Verse
16167 \end_layout
16168
16169 \begin_layout Itemize
16170
16171 \family sans
16172 Caption
16173 \end_layout
16174
16175 \begin_layout Itemize
16176
16177 \family sans
16178 LyX-Code
16179 \end_layout
16180
16181 \begin_layout Itemize
16182
16183 \family sans
16184 Comment
16185 \end_layout
16186
16187 \begin_layout Standard
16188 All of the other standard environments, including the section-heading environmen
16189 ts, aren't used in the 
16190 \family sans
16191 slides
16192 \family default
16193  class.
16194 \end_layout
16195
16196 \begin_layout Standard
16197 On the other hand, you'll notice the following new environments:
16198 \end_layout
16199
16200 \begin_layout Itemize
16201
16202 \family sans
16203 Slide
16204 \end_layout
16205
16206 \begin_layout Itemize
16207
16208 \family sans
16209 Overlay
16210 \end_layout
16211
16212 \begin_layout Itemize
16213
16214 \family sans
16215 Note
16216 \end_layout
16217
16218 \begin_layout Itemize
16219
16220 \family sans
16221 InvisibleText
16222 \end_layout
16223
16224 \begin_layout Itemize
16225
16226 \family sans
16227 VisibleText
16228 \end_layout
16229
16230 \begin_layout Standard
16231 These five are kind of quirky, due to a 
16232 \begin_inset Quotes eld
16233 \end_inset
16234
16235 feature
16236 \begin_inset Quotes erd
16237 \end_inset
16238
16239  in LyX.
16240  You see, LyX doesn't permit you to nest any other paragraph environment
16241  into an empty environment.
16242  Now, that's fine and dandy, but it means that you wouldn't be able to start
16243  a slide with anything except plain text.
16244  To deal with this, I've performed a little 
16245 \begin_inset Quotes eld
16246 \end_inset
16247
16248 LaTeX magic.
16249 \begin_inset Quotes erd
16250 \end_inset
16251
16252  
16253 \end_layout
16254
16255 \begin_layout Subsubsection
16256 Quirks of the New Environments
16257 \begin_inset CommandInset label
16258 LatexCommand label
16259 name "sec:slideQuirk"
16260
16261 \end_inset
16262
16263
16264 \end_layout
16265
16266 \begin_layout Standard
16267 All five of the new paragraph environments are somewhat quirky due to inherent
16268  limitiations in the current version of LyX.
16269  As I just mentioned, LyX forbids environments that begin with another environme
16270 nt.
16271  To get around this, the 
16272 \family sans
16273 Slide
16274 \family default
16275  environment isn't a paragraph environment as described in the 
16276 \emph on
16277 User's Guide
16278 \emph default
16279 .
16280  
16281 \end_layout
16282
16283 \begin_layout Standard
16284 You should consider 
16285 \family sans
16286 Slide
16287 \family default
16288
16289 \family sans
16290 Overlay
16291 \family default
16292 , and 
16293 \family sans
16294 Note
16295 \family default
16296  to be 
16297 \begin_inset Quotes eld
16298 \end_inset
16299
16300 pseudo-environments.
16301 \begin_inset Quotes erd
16302 \end_inset
16303
16304  They look like a section heading or a 
16305 \begin_inset Quotes eld
16306 \end_inset
16307
16308
16309 \family sans
16310 Caption
16311 \family default
16312 ,
16313 \begin_inset Quotes erd
16314 \end_inset
16315
16316  but really begin a [and, if necessary, end the previous] paragraph environment.
16317  Likewise, treat 
16318 \family sans
16319 InvisibleText
16320 \family default
16321  and 
16322 \family sans
16323 VisibleText
16324 \family default
16325  as 
16326 \begin_inset Quotes eld
16327 \end_inset
16328
16329 pseudo-commands.
16330 \begin_inset Quotes erd
16331 \end_inset
16332
16333  These two perform some action.
16334 \end_layout
16335
16336 \begin_layout Standard
16337 A common feature of all five environments, 
16338 \family sans
16339 Slide
16340 \family default
16341
16342 \family sans
16343 Overlay
16344 \family default
16345
16346 \family sans
16347 Note
16348 \family default
16349
16350 \family sans
16351 InvisibleText
16352 \family default
16353  and 
16354 \family sans
16355 VisibleText
16356 \family default
16357 , is a rather long-ish label.
16358  The text following this label — ordinarily the contents of the paragraph
16359  environment — is utterly irrelevant for 
16360 \family sans
16361 Slide
16362 \family default
16363
16364 \family sans
16365 Overlay
16366 \family default
16367
16368 \family sans
16369 Note
16370 \family default
16371
16372 \family sans
16373 InvisibleText
16374 \family default
16375  and 
16376 \family sans
16377 VisibleText
16378 \family default
16379 .
16380  LyX completely ignores it.
16381  In fact, you can leave these five environments completely empty.
16382  
16383 \end_layout
16384
16385 \begin_layout Standard
16386 While you don't 
16387 \emph on
16388 have
16389 \emph default
16390  to put any text after the rather long-ish label, you might want to.
16391  This could be a short description of the contents of the 
16392 \family sans
16393 Slide
16394 \family default
16395 , for example.
16396  In that case, enter your descriptive comment and hit 
16397 \family sans
16398 Return
16399 \family default
16400  as you normally would.
16401 \end_layout
16402
16403 \begin_layout Standard
16404 If, on the other hand, you don't want to enter any descriptive text, you'll
16405  hit another LyX quirk.
16406  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16407  environment until you put something in the old one.
16408  So, do this:
16409 \end_layout
16410
16411 \begin_layout Itemize
16412 Start entering the text that will 
16413 \emph on
16414 follow
16415 \emph default
16416  the new 
16417 \family sans
16418 Slide
16419 \family default
16420
16421 \family sans
16422 Overlay
16423 \family default
16424
16425 \family sans
16426 Note
16427 \family default
16428
16429 \family sans
16430 InvisibleText
16431 \family default
16432  or 
16433 \family sans
16434 VisibleText
16435 \family default
16436 .
16437  
16438 \end_layout
16439
16440 \begin_layout Itemize
16441 Now move to the beginning of that paragraph.
16442  
16443 \end_layout
16444
16445 \begin_layout Itemize
16446 Next, hit 
16447 \family sans
16448 Return
16449 \family default
16450 .
16451  
16452 \end_layout
16453
16454 \begin_layout Itemize
16455 Finally, change this new, empty paragraph to a 
16456 \family sans
16457 Slide
16458 \family default
16459
16460 \family sans
16461 Overlay
16462 \family default
16463
16464 \family sans
16465 Note
16466 \family default
16467
16468 \family sans
16469 InvisibleText
16470 \family default
16471  or 
16472 \family sans
16473 VisibleText
16474 \family default
16475 .
16476  
16477 \end_layout
16478
16479 \begin_layout Standard
16480 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16481
16482 \end_layout
16483
16484 \begin_layout Subsection
16485 Making a Presentation with 
16486 \family sans
16487 Slide
16488 \family default
16489
16490 \family sans
16491 Overlay
16492 \family default
16493  and 
16494 \family sans
16495 Note
16496 \end_layout
16497
16498 \begin_layout Subsubsection
16499 Using the 
16500 \family sans
16501 Slide
16502 \family default
16503  Environment
16504 \end_layout
16505
16506 \begin_layout Standard
16507 If you're expecting this section to teach you how to actually make a presentatio
16508 n, you'll be sorely disappointed.
16509  Naturally, I'll describe all of the ways the 
16510 \family sans
16511 slides
16512 \family default
16513  class can assist you in preparing the materials for a presentation.
16514  Filling in the contents, however, is up to you.
16515  [Then again, that 
16516 \emph on
16517 is
16518 \emph default
16519  the LyX philosophy.]
16520 \end_layout
16521
16522 \begin_layout Standard
16523 Choosing the 
16524 \family sans
16525 Slide
16526 \family default
16527  environment [in the manner described in section
16528 \begin_inset space ~
16529 \end_inset
16530
16531
16532 \begin_inset CommandInset ref
16533 LatexCommand ref
16534 reference "sec:slideQuirk"
16535
16536 \end_inset
16537
16538 ] tells LyX to begin a new slide [duh].
16539  The label for this environment/
16540 \begin_inset Quotes erd
16541 \end_inset
16542
16543 pseudo-command
16544 \begin_inset Quotes erd
16545 \end_inset
16546
16547  is an 
16548 \begin_inset Quotes eld
16549 \end_inset
16550
16551 ASCII line,
16552 \begin_inset Quotes erd
16553 \end_inset
16554
16555  in cool blue, followed by the label, 
16556 \begin_inset Quotes eld
16557 \end_inset
16558
16559 NewSlide:
16560 \begin_inset Quotes erd
16561 \end_inset
16562
16563 .
16564  Any text or paragraph environments that follow this one go on the new slide.
16565  It's that simple.
16566 \end_layout
16567
16568 \begin_layout Standard
16569 Slides are probably the only time you'll need to forcibly end pages in LyX
16570  (this can be specified in the 
16571 \family sans
16572 Paragraph Layout
16573 \family default
16574  dialog).
16575  In fact, you'll want to, once you finish entering the contents of one slide.
16576  If you've entered more text than can physically fit on a slide, the extra
16577  overflows onto a new slide.
16578  I don't recommend doing this, however, since the overflow slide won't have
16579  any page number on it.
16580  Furthermore, it may interfere with any 
16581 \family sans
16582 Overlay
16583 \family default
16584  you've made to accompany the oversized 
16585 \family sans
16586 Slide
16587 \family default
16588 .
16589 \end_layout
16590
16591 \begin_layout Standard
16592 The 
16593 \family sans
16594 Overlay
16595 \family default
16596  and 
16597 \family sans
16598 Note
16599 \family default
16600  environments work the same way as the 
16601 \family sans
16602 Slide
16603 \family default
16604  environment.
16605  They both create an 
16606 \begin_inset Quotes eld
16607 \end_inset
16608
16609 ASCII line
16610 \begin_inset Quotes erd
16611 \end_inset
16612
16613  followed by a label [
16614 \begin_inset Quotes eld
16615 \end_inset
16616
16617 NewOverlay:
16618 \begin_inset Quotes erd
16619 \end_inset
16620
16621  and 
16622 \begin_inset Quotes eld
16623 \end_inset
16624
16625 NewNote:
16626 \begin_inset Quotes erd
16627 \end_inset
16628
16629 , respectively].
16630  The color is a stunning magenta instead of blue, and the 
16631 \begin_inset Quotes eld
16632 \end_inset
16633
16634 ASCII line
16635 \begin_inset Quotes erd
16636 \end_inset
16637
16638  will look different, in style and in length.
16639  The label fonts of all three also differ from one another.
16640 \end_layout
16641
16642 \begin_layout Standard
16643 As with a 
16644 \family sans
16645 Slide
16646 \family default
16647 , if the contents of a 
16648 \family sans
16649 Note
16650 \family default
16651  or 
16652 \family sans
16653 Overlay
16654 \family default
16655  exceed the physical size of a slide or sheet of paper, the extra will overflow
16656  onto a new sheet.
16657  Again, you should avoid this.
16658  It defeats the whole purpose of 
16659 \family sans
16660 Note
16661 \family default
16662 s and 
16663 \family sans
16664 Overlay
16665 \family default
16666 s.
16667 \end_layout
16668
16669 \begin_layout Subsubsection
16670 Using 
16671 \family sans
16672 Overlay
16673 \family default
16674  with 
16675 \family sans
16676 Slide
16677 \end_layout
16678
16679 \begin_layout Standard
16680 The idea behind an 
16681 \family sans
16682 Overlay
16683 \family default
16684  is a slide that sits atop another slide.
16685  Perhaps you wish to discuss a figure on the main 
16686 \family sans
16687 Slide
16688 \family default
16689  before displaying the text associated with it.
16690  One way to accomplish this is tape a flap of dark paper over the part of
16691  the 
16692 \family sans
16693 Slide
16694 \family default
16695  you want to display later.
16696  This method fails, however, if you wish to overlap one graph with another,
16697  for example.
16698  You would then have to fumble while speaking to align the two separate,
16699  overlapping 
16700 \family sans
16701 Slide
16702 \family default
16703 s to align the two graphs.
16704  The use of an 
16705 \family sans
16706 Overlay
16707 \family default
16708  environment in both cases makes life much easier.
16709 \end_layout
16710
16711 \begin_layout Standard
16712 Each 
16713 \family sans
16714 Overlay
16715 \family default
16716  receives the page number of its 
16717 \begin_inset Quotes eld
16718 \end_inset
16719
16720 parent
16721 \begin_inset Quotes erd
16722 \end_inset
16723
16724  
16725 \family sans
16726 Slide
16727 \family default
16728 , appended by 
16729 \begin_inset Quotes eld
16730 \end_inset
16731
16732
16733 \family typewriter
16734 -a
16735 \family default
16736
16737 \begin_inset Quotes erd
16738 \end_inset
16739
16740 .
16741 \begin_inset Foot
16742 status collapsed
16743
16744 \begin_layout Plain Layout
16745 Presumably, mutliple 
16746 \family sans
16747 Overlay
16748 \family default
16749 s would have 
16750 \begin_inset Quotes eld
16751 \end_inset
16752
16753
16754 \family typewriter
16755 -a
16756 \family default
16757
16758 \begin_inset Quotes erd
16759 \end_inset
16760
16761
16762 \begin_inset Quotes eld
16763 \end_inset
16764
16765
16766 \family typewriter
16767 -b
16768 \family default
16769
16770 \begin_inset Quotes erd
16771 \end_inset
16772
16773
16774 \begin_inset Quotes eld
16775 \end_inset
16776
16777
16778 \family typewriter
16779 -c
16780 \family default
16781
16782 \begin_inset Quotes erd
16783 \end_inset
16784
16785 , etc.
16786 \begin_inset space ~
16787 \end_inset
16788
16789 appended to the page number of the parent 
16790 \family sans
16791 Slide
16792 \family default
16793 .
16794  
16795 \end_layout
16796
16797 \end_inset
16798
16799  Clearly, you want the contents of both the 
16800 \family sans
16801 Slide
16802 \family default
16803  and the 
16804 \family sans
16805 Overlay
16806 \family default
16807  to each fit on a single physical slide! You should probably consider an
16808  
16809 \family sans
16810 Overlay
16811 \family default
16812  as 
16813 \begin_inset Quotes eld
16814 \end_inset
16815
16816 part of
16817 \begin_inset Quotes erd
16818 \end_inset
16819
16820  a 
16821 \family sans
16822 Slide
16823 \family default
16824 .
16825  Indeed, the LyX 
16826 \family sans
16827 slides
16828 \family default
16829  class provides a visual cue for this: the label at the start of an 
16830 \family sans
16831 Overlay
16832 \family default
16833  is shorter than that at the start of a 
16834 \family sans
16835 Slide
16836 \family default
16837 .
16838  Lastly, when you generate printable output, you'll find alignment markers
16839  in all four corners of both the 
16840 \family sans
16841 Overlay
16842 \family default
16843  page and its parent 
16844 \family sans
16845 Slide
16846 \family default
16847 .
16848  These will assist you in lining up the two physical slides.
16849 \end_layout
16850
16851 \begin_layout Standard
16852 The major problem in overlaying two slides is aligning the contents of the
16853  two transparencies.
16854  How much space should you leave for that graph on the second slide? Worse
16855  still, what if you want a graph and a sentence on second slide, but there
16856  is text on the main transparency that goes in between them? You could try
16857  and insert vertical space of the right size.
16858  The better way is to use 
16859 \family sans
16860 InvisibleText
16861 \family default
16862  and 
16863 \family sans
16864 VisibleText
16865 \family default
16866 .
16867 \end_layout
16868
16869 \begin_layout Standard
16870 As their names imply, 
16871 \family sans
16872 InvisibleText
16873 \family default
16874  and 
16875 \family sans
16876 VisibleText
16877 \family default
16878  are two command-like paragraph environments that make all subsequent text
16879  invisible and visible, respectively.
16880  Note from section
16881 \begin_inset space ~
16882 \end_inset
16883
16884
16885 \begin_inset CommandInset ref
16886 LatexCommand ref
16887 reference "sec:slideQuirk"
16888
16889 \end_inset
16890
16891  that you don't place anything 
16892 \emph on
16893 into
16894 \emph default
16895  these two environments, however.
16896  When you create an 
16897 \family sans
16898 InvisibleText
16899 \family default
16900 , it inserts a centered, sky-blue label into the page reading 
16901 \begin_inset Quotes eld
16902 \end_inset
16903
16904 <Invisible Text Follows>
16905 \begin_inset Quotes erd
16906 \end_inset
16907
16908 .
16909  For paragraphs following this label, the parts of the 
16910 \family sans
16911 Slide
16912 \family default
16913  [or 
16914 \family sans
16915 Overlay
16916 \family default
16917 ; it doesn't matter which] where they would be contain instead blank space.
16918  
16919 \end_layout
16920
16921 \begin_layout Standard
16922 For 
16923 \family sans
16924 VisibleText
16925 \family default
16926 , the corresponding centered label is 
16927 \begin_inset Quotes eld
16928 \end_inset
16929
16930 <Visible Text Follows>
16931 \begin_inset Quotes erd
16932 \end_inset
16933
16934  in blazing green.
16935  Paragraphs following this label behave normally.
16936  Note that the beginning of a new 
16937 \family sans
16938 Slide
16939 \family default
16940
16941 \family sans
16942 Overlay
16943 \family default
16944 , or 
16945 \family sans
16946 Note
16947 \family default
16948  automatically shuts off an 
16949 \family sans
16950 InvisibleText
16951 \family default
16952 .
16953  It's therefore not necessary to use 
16954 \family sans
16955 VisibleText
16956 \family default
16957  at the end of a 
16958 \family sans
16959 Slide
16960 \family default
16961 .
16962 \end_layout
16963
16964 \begin_layout Standard
16965 By now, it should be obvious how to create overlay transparencies using
16966  the proper combination of 
16967 \family sans
16968 InvisibleText
16969 \family default
16970  and 
16971 \family sans
16972 VisibleText
16973 \family default
16974  on a 
16975 \family sans
16976 Slide
16977 \family default
16978  and 
16979 \family sans
16980 Overlay
16981 \family default
16982 :
16983 \end_layout
16984
16985 \begin_layout Enumerate
16986 Create a 
16987 \family sans
16988 Slide
16989 \family default
16990 , including everything that will appear on it, whether on the main slide
16991  or on the 
16992 \family sans
16993 Overlay
16994 \family default
16995 .
16996 \end_layout
16997
16998 \begin_layout Enumerate
16999 Before each figure or paragraph that will appear only on the 
17000 \family sans
17001 Overlay
17002 \family default
17003 , insert an 
17004 \family sans
17005 InvisibleText
17006 \family default
17007  environment.
17008  If necessary, insert a 
17009 \family sans
17010 VisibleText
17011 \family default
17012  environment after the 
17013 \family sans
17014 Overlay
17015 \family default
17016 -only text.
17017 \end_layout
17018
17019 \begin_layout Enumerate
17020 Start an 
17021 \family sans
17022 Overlay
17023 \family default
17024  immediately following the 
17025 \family sans
17026 Slide
17027 \family default
17028 .
17029 \end_layout
17030
17031 \begin_layout Enumerate
17032 Copy the contents of this 
17033 \family sans
17034 Slide
17035 \family default
17036  into the 
17037 \family sans
17038 Overlay
17039 \family default
17040 .
17041 \end_layout
17042
17043 \begin_layout Enumerate
17044 Within the 
17045 \family sans
17046 Overlay
17047 \family default
17048 , change all of the 
17049 \family sans
17050 InvisibleText
17051 \family default
17052  lines to 
17053 \family sans
17054 VisibleText
17055 \family default
17056  and vice-versa.
17057 \end_layout
17058
17059 \begin_layout Standard
17060 That's it.
17061  You've just made an 
17062 \family sans
17063 Overlay
17064 \family default
17065 .
17066 \end_layout
17067
17068 \begin_layout Standard
17069 There's one problem with the way I've designed the LyX 
17070 \family sans
17071 slides
17072 \family default
17073  class: you can't make text in the middle of a paragraph invisible, nor
17074  make text in the middle of an invisible paragraph visible again.
17075  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17076 \begin_inset Foot
17077 status collapsed
17078
17079 \begin_layout Plain Layout
17080 The commands of interest are: 
17081 \end_layout
17082
17083 \begin_layout Itemize
17084
17085 \family typewriter
17086 {
17087 \backslash
17088 invisible \SpecialChar \ldots{}
17089  }
17090 \end_layout
17091
17092 \begin_layout Itemize
17093
17094 \family typewriter
17095 {
17096 \backslash
17097 visible \SpecialChar \ldots{}
17098  }
17099 \end_layout
17100
17101 \begin_layout Plain Layout
17102 \SpecialChar \ldots{}
17103 and need to be marked as TeX.
17104  The text whose 
17105 \begin_inset Quotes eld
17106 \end_inset
17107
17108 visibility
17109 \begin_inset Quotes erd
17110 \end_inset
17111
17112  you wish to change goes in between the brackets [and after the 
17113 \family typewriter
17114
17115 \backslash
17116 invisible
17117 \family default
17118  or 
17119 \family typewriter
17120
17121 \backslash
17122 visible
17123 \family default
17124  command].
17125  If you don't know how to mark text as TeX, see the appropriate section
17126  of the 
17127 \emph on
17128 User's Guide
17129 \emph default
17130 .
17131 \end_layout
17132
17133 \end_inset
17134
17135
17136 \end_layout
17137
17138 \begin_layout Subsubsection
17139 Using 
17140 \family sans
17141 Note
17142 \family default
17143  with 
17144 \family sans
17145 Slide
17146 \family default
17147
17148 \begin_inset CommandInset label
17149 LatexCommand label
17150 name "sec:slideNote"
17151
17152 \end_inset
17153
17154
17155 \end_layout
17156
17157 \begin_layout Standard
17158 Like an 
17159 \family sans
17160 Overlay
17161 \family default
17162 , a 
17163 \family sans
17164 Note
17165 \family default
17166  is associated with a 
17167 \begin_inset Quotes eld
17168 \end_inset
17169
17170 parent
17171 \begin_inset Quotes erd
17172 \end_inset
17173
17174  
17175 \family sans
17176 Slide
17177 \family default
17178 .
17179  Here, too, the LyX 
17180 \family sans
17181 slides
17182 \family default
17183  class provides visual cues.
17184  The label for a 
17185 \family sans
17186 Note
17187 \family default
17188  is shorter than that of a 
17189 \family sans
17190 Slide
17191 \family default
17192  [yet longer than that of an 
17193 \family sans
17194 Overlay
17195 \family default
17196 ] and, like the label of an 
17197 \family sans
17198 Overlay
17199 \family default
17200  is shockingly magenta.
17201  Additionally, the printed 
17202 \family sans
17203 Note
17204 \family default
17205  has the page number of its 
17206 \begin_inset Quotes eld
17207 \end_inset
17208
17209 parent
17210 \begin_inset Quotes erd
17211 \end_inset
17212
17213  
17214 \family sans
17215 Slide
17216 \family default
17217 , appended by 
17218 \begin_inset Quotes eld
17219 \end_inset
17220
17221
17222 \family typewriter
17223 -
17224 \family default
17225 1
17226 \begin_inset Quotes erd
17227 \end_inset
17228
17229
17230 \begin_inset Quotes eld
17231 \end_inset
17232
17233
17234 \family typewriter
17235 -
17236 \family default
17237 2
17238 \begin_inset Quotes erd
17239 \end_inset
17240
17241
17242 \begin_inset Quotes eld
17243 \end_inset
17244
17245
17246 \family typewriter
17247 -
17248 \family default
17249 3
17250 \begin_inset Quotes erd
17251 \end_inset
17252
17253 , etc.
17254  You can have multiple 
17255 \family sans
17256 Note
17257 \family default
17258 s associated with a single 
17259 \family sans
17260 Slide
17261 \family default
17262 , and, as with 
17263 \family sans
17264 Slide
17265 \family default
17266  and 
17267 \family sans
17268 Overlay
17269 \family default
17270 , you'll probably want to break up long 
17271 \family sans
17272 Note
17273 \family default
17274 s so that they fit on a single sheet of paper.
17275 \end_layout
17276
17277 \begin_layout Standard
17278 The purpose of a 
17279 \family sans
17280 Note
17281 \family default
17282  is obvious: it contains anything additional you might want to say about
17283  a 
17284 \family sans
17285 Slide
17286 \family default
17287 .
17288  It could also be used as a sheet of reminders for a particular 
17289 \family sans
17290 Slide
17291 \family default
17292 .
17293  In the case of the latter, you might want to make use of time markers.
17294  Currently, the LyX 
17295 \family sans
17296 slides
17297 \family default
17298  class has no 
17299 \begin_inset Quotes eld
17300 \end_inset
17301
17302 native
17303 \begin_inset Quotes erd
17304 \end_inset
17305
17306  support for time markers, a 
17307 \noun on
17308 SliTeX
17309 \noun default
17310  feature.
17311  So, you'll have to resort to using the LaTeX codes.
17312 \end_layout
17313
17314 \begin_layout Standard
17315 To use time markers, you'll need to specify the extra class option 
17316 \begin_inset Quotes eld
17317 \end_inset
17318
17319
17320 \family typewriter
17321 clock
17322 \family default
17323
17324 \begin_inset Quotes erd
17325 \end_inset
17326
17327  [see section
17328 \begin_inset space ~
17329 \end_inset
17330
17331
17332 \begin_inset CommandInset ref
17333 LatexCommand ref
17334 reference "sec:slidesetup"
17335
17336 \end_inset
17337
17338 ].
17339  This option turns on timing marks, which will appear in the lower-left-hand
17340  corner of every 
17341 \family sans
17342 Note
17343 \family default
17344  you generate.
17345  To set what appears in the time marker, you use the LaTeX commands 
17346 \begin_inset Quotes eld
17347 \end_inset
17348
17349
17350 \family typewriter
17351
17352 \backslash
17353 settime{}
17354 \family default
17355
17356 \begin_inset Quotes erd
17357 \end_inset
17358
17359  and 
17360 \begin_inset Quotes eld
17361 \end_inset
17362
17363
17364 \family typewriter
17365
17366 \backslash
17367 addtime{}
17368 \family default
17369
17370 \begin_inset Quotes erd
17371 \end_inset
17372
17373 .
17374  The arguments of both commands are time measured in seconds.
17375  
17376 \begin_inset Quotes eld
17377 \end_inset
17378
17379
17380 \family typewriter
17381
17382 \backslash
17383 settime{}
17384 \family default
17385
17386 \begin_inset Quotes erd
17387 \end_inset
17388
17389  sets the time marker to a given time.
17390  
17391 \begin_inset Quotes eld
17392 \end_inset
17393
17394
17395 \family typewriter
17396
17397 \backslash
17398 addtime{}
17399 \family default
17400
17401 \begin_inset Quotes erd
17402 \end_inset
17403
17404  increments the time marker by the specified amount.
17405  Using time markers and 
17406 \family sans
17407 Note
17408 \family default
17409 s in this fashion, you can remind yourself how much time to spend on a particula
17410
17411 \family sans
17412 Slide
17413 \family default
17414 .
17415 \end_layout
17416
17417 \begin_layout Standard
17418 There's one last feature to describe.
17419  Clearly, you'd like to print out all of your 
17420 \family sans
17421 Slide
17422 \family default
17423 s and 
17424 \family sans
17425 Overlay
17426 \family default
17427 s on transparencies while printing all of your 
17428 \family sans
17429 Note
17430 \family default
17431 s on plain paper.
17432  However, a 
17433 \family sans
17434 Note
17435 \family default
17436  
17437 \emph on
17438 must
17439 \emph default
17440  follow the 
17441 \family sans
17442 Slide
17443 \family default
17444  with which it is associated.
17445  What's a person to do?
17446 \end_layout
17447
17448 \begin_layout Standard
17449 Luckily, there are two LaTeX commands that allow you to select what to print
17450  out.
17451  Both must be placed into the preamble of your document.
17452  The command 
17453 \begin_inset Quotes eld
17454 \end_inset
17455
17456
17457 \family typewriter
17458
17459 \backslash
17460 onlyslides{
17461 \backslash
17462 slides}
17463 \family default
17464
17465 \begin_inset Quotes erd
17466 \end_inset
17467
17468  will cause the output to contain only the 
17469 \family sans
17470 Slide
17471 \family default
17472 s and 
17473 \family sans
17474 Overlay
17475 \family default
17476 s.
17477  Correspondingly, the command 
17478 \begin_inset Quotes eld
17479 \end_inset
17480
17481
17482 \family typewriter
17483
17484 \backslash
17485 onlynotes{
17486 \backslash
17487 notes}
17488 \family default
17489
17490 \begin_inset Quotes erd
17491 \end_inset
17492
17493  prevents the output of anything but 
17494 \family sans
17495 Note
17496 \family default
17497 s.
17498  I'd advise placing both commands in the preamble and initially comment
17499  both out.
17500  You can then preview your entire presentation as you write.
17501  When you're done writing, you can then uncomment one of the two to select
17502  what you want to print.
17503  I like to uncomment 
17504 \begin_inset Quotes eld
17505 \end_inset
17506
17507
17508 \family typewriter
17509
17510 \backslash
17511 onlyslides{
17512 \backslash
17513 slides}
17514 \family default
17515
17516 \begin_inset Quotes erd
17517 \end_inset
17518
17519  , print to a file with 
17520 \begin_inset Quotes eld
17521 \end_inset
17522
17523
17524 \family typewriter
17525 -slides
17526 \family default
17527
17528 \begin_inset Quotes erd
17529 \end_inset
17530
17531  in its name, comment it back out, then uncomment 
17532 \begin_inset Quotes eld
17533 \end_inset
17534
17535
17536 \family typewriter
17537
17538 \backslash
17539 onlynotes{
17540 \backslash
17541 notes}
17542 \family default
17543
17544 \begin_inset Quotes erd
17545 \end_inset
17546
17547  and print to a 
17548 \begin_inset Quotes eld
17549 \end_inset
17550
17551
17552 \family typewriter
17553 *-notes.ps
17554 \family default
17555
17556 \begin_inset Quotes erd
17557 \end_inset
17558
17559  file.
17560  I can then send either file to a printer, loading transparencies or plain
17561  paper as appropriate.
17562 \end_layout
17563
17564 \begin_layout Standard
17565 You can also provide other arguments to the 
17566 \begin_inset Quotes eld
17567 \end_inset
17568
17569
17570 \family typewriter
17571
17572 \backslash
17573 onlyslides{}
17574 \family default
17575
17576 \begin_inset Quotes erd
17577 \end_inset
17578
17579  and 
17580 \begin_inset Quotes eld
17581 \end_inset
17582
17583
17584 \family typewriter
17585
17586 \backslash
17587 onlynotes{}
17588 \family default
17589
17590 \begin_inset Quotes erd
17591 \end_inset
17592
17593  commands.
17594  See a good LaTeX book for details.
17595 \end_layout
17596
17597 \begin_layout Subsection
17598 The 
17599 \family sans
17600 slides
17601 \family default
17602  Class Template File
17603 \end_layout
17604
17605 \begin_layout Standard
17606 I have also provided a template file, 
17607 \begin_inset Quotes eld
17608 \end_inset
17609
17610
17611 \family typewriter
17612 slides.lyx
17613 \family default
17614
17615 \begin_inset Quotes erd
17616 \end_inset
17617
17618 , with the 
17619 \family sans
17620 slides
17621 \family default
17622  class.
17623  To use it, begin your new presentation with 
17624 \family sans
17625 \bar under
17626 F
17627 \bar default
17628 ile\SpecialChar \menuseparator
17629 New
17630 \begin_inset space ~
17631 \end_inset
17632
17633 from
17634 \begin_inset space ~
17635 \end_inset
17636
17637
17638 \bar under
17639 T
17640 \bar default
17641 emplate
17642 \family default
17643 .
17644  Your new LyX presentation file will contain an example 
17645 \family sans
17646 Slide
17647 \family default
17648  – 
17649 \family sans
17650 Overlay
17651 \family default
17652  – 
17653 \family sans
17654 Note
17655 \family default
17656  triplet.
17657  The 
17658 \family sans
17659 Slide
17660 \family default
17661  and 
17662 \family sans
17663 Overlay
17664 \family default
17665  additionally contain an example of the use of 
17666 \family sans
17667 InvisibleText
17668 \family default
17669  and 
17670 \family sans
17671 VisibleText
17672 \family default
17673 .
17674  Lastly, the preamble will contain:
17675 \end_layout
17676
17677 \begin_layout LyX-Code
17678 % Uncomment to print out only slides and overlays
17679 \end_layout
17680
17681 \begin_layout LyX-Code
17682 %
17683 \end_layout
17684
17685 \begin_layout LyX-Code
17686 %
17687 \backslash
17688 onlyslides{
17689 \backslash
17690 slides}
17691 \begin_inset Newline newline
17692 \end_inset
17693
17694  
17695 \end_layout
17696
17697 \begin_layout LyX-Code
17698 % Uncomment to print out only notes
17699 \end_layout
17700
17701 \begin_layout LyX-Code
17702 %
17703 \end_layout
17704
17705 \begin_layout LyX-Code
17706 %
17707 \backslash
17708 onlynotes{
17709 \backslash
17710 notes}
17711 \end_layout
17712
17713 \begin_layout Standard
17714 One final thing: I created this class to support the LaTeX2e 
17715 \begin_inset Quotes eld
17716 \end_inset
17717
17718
17719 \noun on
17720 SliTeX
17721 \noun default
17722  emulation
17723 \begin_inset Quotes erd
17724 \end_inset
17725
17726  class, one of the built-in LaTeX2e classes.
17727  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17728  built-in slide class.
17729  It's here if you want it or need it.
17730  There exist other LaTeX2e classes for creating presentations, such as the
17731  
17732 \family sans
17733 Foils
17734 \family default
17735  class [see section
17736 \begin_inset space ~
17737 \end_inset
17738
17739
17740 \begin_inset CommandInset ref
17741 LatexCommand ref
17742 reference "sec:foiltex"
17743
17744 \end_inset
17745
17746 ] or the 
17747 \begin_inset Quotes eld
17748 \end_inset
17749
17750
17751 \family typewriter
17752 seminar
17753 \family default
17754
17755 \begin_inset Quotes erd
17756 \end_inset
17757
17758  package [present on some TeX distributions].
17759  The latter is not yet supported under LyX.
17760 \begin_inset Foot
17761 status collapsed
17762
17763 \begin_layout Plain Layout
17764 Perhaps you can take on the task\SpecialChar \ldots{}
17765
17766 \end_layout
17767
17768 \end_inset
17769
17770  I know nothing about these other classes.
17771  Try them out to see what sort of alternative they provide.
17772 \end_layout
17773
17774 \begin_layout Chapter
17775 LyX Features needing Extra Software
17776 \end_layout
17777
17778 \begin_layout Section
17779 Checking TeX
17780 \end_layout
17781
17782 \begin_layout Standard
17783 by 
17784 \noun on
17785 Asger Alstrup
17786 \end_layout
17787
17788 \begin_layout Subsection
17789 Introduction
17790 \end_layout
17791
17792 \begin_layout Standard
17793 If you have the 
17794 \family typewriter
17795 chktex
17796 \family default
17797  program installed
17798 \begin_inset Foot
17799 status collapsed
17800
17801 \begin_layout Plain Layout
17802
17803 \family typewriter
17804 chktex
17805 \family default
17806  is not yet available when you are using the LaTeX distribution MiKTeX.
17807 \end_layout
17808
17809 \end_inset
17810
17811 , you'll find in the 
17812 \family sans
17813 Tools
17814 \family default
17815  menu the entry: 
17816 \family sans
17817 Check
17818 \begin_inset space ~
17819 \end_inset
17820
17821 TeX
17822 \family default
17823 .
17824  You can get 
17825 \family typewriter
17826 chktex
17827 \family default
17828  from CTAN, 
17829 \begin_inset CommandInset href
17830 LatexCommand href
17831 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17832
17833 \end_inset
17834
17835 .
17836 \end_layout
17837
17838 \begin_layout Standard
17839 The 
17840 \family sans
17841 ChkTeX
17842 \family default
17843  package is a program that was written by 
17844 \begin_inset Flex Noun
17845 status collapsed
17846
17847 \begin_layout Plain Layout
17848 Jens T.
17849 \begin_inset space ~
17850 \end_inset
17851
17852 Berger Thielemann
17853 \end_layout
17854
17855 \end_inset
17856
17857  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17858  and easy to forget.
17859  The program runs over your LaTeX file, checks the integrity of the file,
17860  and flags some common errors.
17861  In other technical words, it is 
17862 \family typewriter
17863 lint
17864 \family default
17865  for LaTeX.
17866 \end_layout
17867
17868 \begin_layout Standard
17869 Well, what is a syntax checker doing in LyX which is supposed to produce
17870  correct LaTeX anyways? The answer is simple: Just as 
17871 \family typewriter
17872 Lint
17873 \family default
17874  not only checks the 
17875 \emph on
17876 syntax
17877 \emph default
17878  of C programs, but also does 
17879 \emph on
17880 semantic
17881 \emph default
17882  checks for type-errors, 
17883 \family sans
17884 ChkTeX
17885 \family default
17886  catches some common 
17887 \emph on
17888 typographic
17889 \emph default
17890  errors, in addition to the syntactical ones.
17891  Specifically, 
17892 \family sans
17893 ChkTeX
17894 \family default
17895  is capable of detecting several common errors, such as
17896 \end_layout
17897
17898 \begin_layout Itemize
17899 Ellipsis detection:
17900 \begin_inset Newline newline
17901 \end_inset
17902
17903 Use \SpecialChar \ldots{}
17904  instead of ...
17905 \end_layout
17906
17907 \begin_layout Itemize
17908 No space in front of/after parenthesis:
17909 \begin_inset Newline newline
17910 \end_inset
17911
17912 ( wrong spacing )
17913 \end_layout
17914
17915 \begin_layout Itemize
17916 Enforcement of normal space after common abbreviations:
17917 \begin_inset Newline newline
17918 \end_inset
17919
17920 e.
17921 \begin_inset space \thinspace{}
17922 \end_inset
17923
17924 g.
17925 \begin_inset space \space{}
17926 \end_inset
17927
17928 is too wide spacing.
17929 \end_layout
17930
17931 \begin_layout Itemize
17932 Enforcement of end-of-sentence space when the last sentence ends with a
17933  capital letter:
17934 \begin_inset Newline newline
17935 \end_inset
17936
17937 This is a TEST.
17938  And this is wrong spacing.
17939 \end_layout
17940
17941 \begin_layout Itemize
17942 Space in front of labels and similar commands:
17943 \begin_inset Newline newline
17944 \end_inset
17945
17946 The label should stick right up to the text to avoid falling to a wrong
17947  page.
17948  
17949 \begin_inset CommandInset label
17950 LatexCommand label
17951 name "sec:chktex"
17952
17953 \end_inset
17954
17955  
17956 \begin_inset Foot
17957 status collapsed
17958
17959 \begin_layout Plain Layout
17960 This footnote is in danger of falling off to a wrong page
17961 \end_layout
17962
17963 \end_inset
17964
17965  The label is separated too much.
17966 \end_layout
17967
17968 \begin_layout Itemize
17969 Space in front of references, instead of hard spaces:
17970 \begin_inset Newline newline
17971 \end_inset
17972
17973 If you have bad luck, the text will break right between the referenced text
17974  and reference number, and that's a pity.
17975  See section 
17976 \begin_inset CommandInset ref
17977 LatexCommand ref
17978 reference "sec:chktex"
17979
17980 \end_inset
17981
17982 .
17983 \end_layout
17984
17985 \begin_layout Itemize
17986 Use of 
17987 \begin_inset Quotes eld
17988 \end_inset
17989
17990 x
17991 \begin_inset Quotes erd
17992 \end_inset
17993
17994  instead of 
17995 \begin_inset Formula $\times$
17996 \end_inset
17997
17998  between numbers:
17999 \begin_inset Newline newline
18000 \end_inset
18001
18002 2x2 looks cheap compared to 
18003 \begin_inset Formula $2\times2$
18004 \end_inset
18005
18006 .
18007 \end_layout
18008
18009 \begin_layout Standard
18010 and more \SpecialChar \ldots{}
18011  It is an invaluable tool when you are 
18012 \begin_inset Quotes eld
18013 \end_inset
18014
18015 finishing up
18016 \begin_inset Quotes erd
18017 \end_inset
18018
18019  your document before printing, and you should run it right after the obligatory
18020  spelling check, and before you go fine tuning the typesetting.
18021 \end_layout
18022
18023 \begin_layout Subsection
18024 How to use it
18025 \end_layout
18026
18027 \begin_layout Standard
18028 If you have the program installed, usage is as simple as choosing 
18029 \family sans
18030 Tools\SpecialChar \menuseparator
18031 Check
18032 \begin_inset space ~
18033 \end_inset
18034
18035 TeX
18036 \family default
18037 .
18038  This will make LyX generate a LaTeX file of your document, start 
18039 \family sans
18040 ChkTeX
18041 \family default
18042  to check it, and then make LyX insert 
18043 \begin_inset Quotes eld
18044 \end_inset
18045
18046 error boxes
18047 \begin_inset Quotes erd
18048 \end_inset
18049
18050  with the warnings from 
18051 \family sans
18052 ChkTeX
18053 \family default
18054 , if there were any.
18055  The warnings will be placed close to the point of the mistake, and you
18056  can quickly find them by using the 
18057 \family sans
18058 Navigate\SpecialChar \menuseparator
18059 Error
18060 \family default
18061  menu item, or the shortcut key 
18062 \family sans
18063 C-g
18064 \family default
18065  from the default 
18066 \family typewriter
18067 cua
18068 \family default
18069  bind file.
18070  Open the error boxes by clicking on them with the mouse, or use the shortcut
18071  key 
18072 \family sans
18073 C-i
18074 \family default
18075  from 
18076 \family typewriter
18077 cua
18078 \family default
18079  bindings, or the corresponding 
18080 \family sans
18081 C-o
18082 \family default
18083  for the alternate 
18084 \family typewriter
18085 emacs
18086 \family default
18087  bind file.
18088  Read the warning and correct the mistake, if it is a mistake.
18089  If you have trouble understanding what the warning is about, you can safely
18090  ignore it.
18091  Remember that there is a hidden layer between the document on screen and
18092  the technical details in invoking 
18093 \family sans
18094 ChkTeX
18095 \family default
18096 , and this gap can make some warnings seem arcane or just plain silly.
18097 \end_layout
18098
18099 \begin_layout Standard
18100 This document is an excellent testing bed for the feature, and it should
18101  provide quite a few warnings for you to fiddle with.
18102  Since computers are only so smart, expect most of the warnings to be false
18103  alarms, though.
18104 \end_layout
18105
18106 \begin_layout Subsection
18107 How to fine tune it
18108 \end_layout
18109
18110 \begin_layout Standard
18111 Sometimes, you'll find that 
18112 \family sans
18113 ChkTeX
18114 \family default
18115  makes more noise than suits your mood.
18116  Then you can choose not to use it, wait until your mood changes, or try
18117  to customize 
18118 \family sans
18119 ChkTeX
18120 \family default
18121  to get better along with you.
18122 \end_layout
18123
18124 \begin_layout Standard
18125 Although 
18126 \family sans
18127 ChkTeX
18128 \family default
18129  
18130 \emph on
18131 is
18132 \emph default
18133  very configurable and extensible, you shouldn't expect to solve all problems
18134  with 
18135 \family sans
18136 ChkTeX
18137 \family default
18138  in LyX this way.
18139  Since LyX has to generate a somewhat special LaTeX file to be able to match
18140  the line numbers from the 
18141 \family sans
18142 ChkTeX
18143 \family default
18144  output
18145 \begin_inset Foot
18146 status collapsed
18147
18148 \begin_layout Plain Layout
18149 You can inspect the specific output from 
18150 \family sans
18151 chktex
18152 \family default
18153  by using 
18154 \family sans
18155 Edit\SpecialChar \menuseparator
18156 View
18157 \begin_inset space ~
18158 \end_inset
18159
18160 LaTeX
18161 \begin_inset space ~
18162 \end_inset
18163
18164 Log
18165 \family default
18166  right after a 
18167 \family sans
18168 chktex
18169 \family default
18170  run.
18171 \end_layout
18172
18173 \end_inset
18174
18175  to the internal document structure, some of the warnings will not appear
18176  correctly.
18177  There are two things you can do about this:
18178 \end_layout
18179
18180 \begin_layout Itemize
18181 Fine tune the 
18182 \family sans
18183 ChkTeX
18184 \family default
18185  invocation command line in 
18186 \begin_inset Flex MenuItem
18187 status collapsed
18188
18189 \begin_layout Plain Layout
18190 Tools\SpecialChar \menuseparator
18191 Preferences\SpecialChar \menuseparator
18192 Output\SpecialChar \menuseparator
18193 LaTeX\SpecialChar \menuseparator
18194 CheckTeX command
18195 \end_layout
18196
18197 \end_inset
18198
18199 , or the global 
18200 \family sans
18201 ChkTeX
18202 \family default
18203  installation configuration file (usually with the file 
18204 \family typewriter
18205 chktexrc
18206 \family default
18207 ).
18208  See below to learn what warnings can be enabled and disabled on the command
18209  line.
18210 \end_layout
18211
18212 \begin_layout Itemize
18213 Export your document as a raw LaTeX file using 
18214 \family sans
18215 File\SpecialChar \menuseparator
18216 Export\SpecialChar \menuseparator
18217 LaTeX
18218 \family default
18219  and run 
18220 \family typewriter
18221 chktex
18222 \family default
18223  manually on that.
18224  Invoked in this way, it can be a hassle to find the corresponding place
18225  in the document inside LyX, but with a little patience, you should be able
18226  to do it.
18227 \end_layout
18228
18229 \begin_layout Standard
18230 Here follows the warning messages that can be enabled and disabled in 
18231 \family sans
18232 Preferences
18233 \family default
18234 .
18235  Use 
18236 \family typewriter
18237 -n#
18238 \family default
18239  to disable a warning, and 
18240 \family typewriter
18241 -w#
18242 \family default
18243  to enable a warning.
18244  The emphasized entries are disabled by default, because the default is
18245  "
18246 \family typewriter
18247 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18248 \family default
18249 ".
18250 \end_layout
18251
18252 \begin_layout Standard
18253 Notice that you should only use the options that enable and disable warnings,
18254  because LyX relies on some of the other command line parameters to be set
18255  in a specific way to have a chance to communicate with 
18256 \family typewriter
18257 chktex
18258 \family default
18259 .
18260 \end_layout
18261
18262 \begin_layout Enumerate
18263
18264 \size small
18265 \emph on
18266 Command terminated with space.
18267 \end_layout
18268
18269 \begin_layout Enumerate
18270
18271 \size small
18272 Non-breaking space (
18273 \begin_inset Quotes eld
18274 \end_inset
18275
18276
18277 \family typewriter
18278 ~
18279 \family default
18280
18281 \begin_inset Quotes erd
18282 \end_inset
18283
18284 ) should have been used.
18285 \end_layout
18286
18287 \begin_layout Enumerate
18288
18289 \size small
18290 \emph on
18291 You should enclose the previous parenthesis with 
18292 \begin_inset Quotes eld
18293 \end_inset
18294
18295
18296 \family typewriter
18297 {}
18298 \family default
18299
18300 \begin_inset Quotes erd
18301 \end_inset
18302
18303 .
18304 \end_layout
18305
18306 \begin_layout Enumerate
18307
18308 \size small
18309 Italic correction (
18310 \begin_inset Quotes eld
18311 \end_inset
18312
18313
18314 \family typewriter
18315
18316 \backslash
18317 /
18318 \family default
18319
18320 \begin_inset Quotes erd
18321 \end_inset
18322
18323 ) found in non-italic buffer.
18324 \end_layout
18325
18326 \begin_layout Enumerate
18327
18328 \size small
18329 Italic correction (
18330 \begin_inset Quotes eld
18331 \end_inset
18332
18333
18334 \family typewriter
18335
18336 \backslash
18337 /
18338 \family default
18339
18340 \begin_inset Quotes erd
18341 \end_inset
18342
18343 ) found more than once.
18344 \end_layout
18345
18346 \begin_layout Enumerate
18347
18348 \size small
18349 \emph on
18350 No italic correction (
18351 \begin_inset Quotes eld
18352 \end_inset
18353
18354
18355 \family typewriter
18356
18357 \backslash
18358 /
18359 \family default
18360
18361 \begin_inset Quotes erd
18362 \end_inset
18363
18364 ) found.
18365 \end_layout
18366
18367 \begin_layout Enumerate
18368
18369 \size small
18370 Accent command 
18371 \begin_inset Quotes eld
18372 \end_inset
18373
18374
18375 \family typewriter
18376 cmd
18377 \family default
18378
18379 \begin_inset Quotes erd
18380 \end_inset
18381
18382  needs use of 
18383 \begin_inset Quotes eld
18384 \end_inset
18385
18386
18387 \family typewriter
18388 cmd
18389 \family default
18390
18391 \begin_inset Quotes erd
18392 \end_inset
18393
18394 .
18395 \end_layout
18396
18397 \begin_layout Enumerate
18398
18399 \size small
18400 Wrong length of dash may have been used.
18401 \end_layout
18402
18403 \begin_layout Enumerate
18404
18405 \size small
18406 \emph on
18407 \begin_inset Quotes eld
18408 \end_inset
18409
18410
18411 \family typewriter
18412 %s
18413 \family default
18414
18415 \begin_inset Quotes erd
18416 \end_inset
18417
18418  expected, found 
18419 \begin_inset Quotes eld
18420 \end_inset
18421
18422
18423 \family typewriter
18424 %s
18425 \family default
18426
18427 \begin_inset Quotes erd
18428 \end_inset
18429
18430 .
18431 \end_layout
18432
18433 \begin_layout Enumerate
18434
18435 \size small
18436 Solo 
18437 \begin_inset Quotes eld
18438 \end_inset
18439
18440
18441 \family typewriter
18442 %s
18443 \family default
18444
18445 \begin_inset Quotes erd
18446 \end_inset
18447
18448  found.
18449 \end_layout
18450
18451 \begin_layout Enumerate
18452
18453 \size small
18454 You should use 
18455 \begin_inset Quotes eld
18456 \end_inset
18457
18458
18459 \family typewriter
18460 %s
18461 \family default
18462
18463 \begin_inset Quotes erd
18464 \end_inset
18465
18466  to achieve an ellipsis.
18467 \end_layout
18468
18469 \begin_layout Enumerate
18470
18471 \size small
18472 Inter-word spacing (
18473 \begin_inset Quotes eld
18474 \end_inset
18475
18476
18477 \family typewriter
18478
18479 \backslash
18480
18481 \family default
18482  
18483 \begin_inset Quotes eld
18484 \end_inset
18485
18486 ) should perhaps be used.
18487 \end_layout
18488
18489 \begin_layout Enumerate
18490
18491 \size small
18492 Inter-sentence spacing (
18493 \begin_inset Quotes eld
18494 \end_inset
18495
18496
18497 \family typewriter
18498
18499 \backslash
18500 @
18501 \family default
18502
18503 \begin_inset Quotes erd
18504 \end_inset
18505
18506 ) should perhaps be used.
18507 \end_layout
18508
18509 \begin_layout Enumerate
18510
18511 \size small
18512 Could not find argument for command.
18513 \end_layout
18514
18515 \begin_layout Enumerate
18516
18517 \size small
18518 No match found for 
18519 \begin_inset Quotes eld
18520 \end_inset
18521
18522
18523 \family typewriter
18524 %s
18525 \family default
18526
18527 \begin_inset Quotes erd
18528 \end_inset
18529
18530 .
18531 \end_layout
18532
18533 \begin_layout Enumerate
18534
18535 \size small
18536 Math mode still on at end of LaTeX file.
18537 \end_layout
18538
18539 \begin_layout Enumerate
18540
18541 \size small
18542 Number of 
18543 \begin_inset Quotes eld
18544 \end_inset
18545
18546
18547 \family typewriter
18548 char
18549 \family default
18550
18551 \begin_inset Quotes erd
18552 \end_inset
18553
18554  doesn't match the number of 
18555 \begin_inset Quotes eld
18556 \end_inset
18557
18558
18559 \family typewriter
18560 char
18561 \family default
18562
18563 \begin_inset Quotes erd
18564 \end_inset
18565
18566 .
18567 \end_layout
18568
18569 \begin_layout Enumerate
18570
18571 \size small
18572 You should use either 
18573 \family typewriter
18574
18575 \begin_inset Quotes eld
18576 \end_inset
18577
18578
18579 \family default
18580  or 
18581 \family typewriter
18582
18583 \begin_inset Quotes erd
18584 \end_inset
18585
18586
18587 \family default
18588  as an alternative to 
18589 \begin_inset Quotes eld
18590 \end_inset
18591
18592
18593 \family typewriter
18594 "
18595 \family default
18596
18597 \begin_inset Quotes erd
18598 \end_inset
18599
18600 .
18601 \end_layout
18602
18603 \begin_layout Enumerate
18604
18605 \size small
18606 You should use "
18607 \family typewriter
18608 '
18609 \family default
18610 " (ASCII 39) instead of "
18611 \family typewriter
18612 ´
18613 \family default
18614 " (ASCII 180).
18615 \end_layout
18616
18617 \begin_layout Enumerate
18618
18619 \size small
18620 User-specified pattern found.
18621 \end_layout
18622
18623 \begin_layout Enumerate
18624
18625 \size small
18626 This command might not be intended.
18627 \end_layout
18628
18629 \begin_layout Enumerate
18630
18631 \size small
18632 \emph on
18633 Comment displayed.
18634 \end_layout
18635
18636 \begin_layout Enumerate
18637
18638 \size small
18639 Either 
18640 \family typewriter
18641 ''
18642 \backslash
18643 ,'
18644 \family default
18645  or 
18646 \family typewriter
18647 '
18648 \backslash
18649 ,''
18650 \family default
18651  will look better.
18652 \end_layout
18653
18654 \begin_layout Enumerate
18655
18656 \size small
18657 Delete this space to maintain correct page references.
18658 \end_layout
18659
18660 \begin_layout Enumerate
18661
18662 \size small
18663 \emph on
18664 You might wish to put this between a pair of 
18665 \begin_inset Quotes eld
18666 \end_inset
18667
18668
18669 \family typewriter
18670 {}
18671 \family default
18672
18673 \begin_inset Quotes erd
18674 \end_inset
18675
18676 .
18677 \end_layout
18678
18679 \begin_layout Enumerate
18680
18681 \size small
18682 You ought to remove spaces in front of punctuation.
18683 \end_layout
18684
18685 \begin_layout Enumerate
18686
18687 \size small
18688 Could not execute LaTeX command.
18689 \end_layout
18690
18691 \begin_layout Enumerate
18692
18693 \size small
18694 Don't use 
18695 \family typewriter
18696
18697 \backslash
18698 /
18699 \family default
18700  in front of small punctuation.
18701 \end_layout
18702
18703 \begin_layout Enumerate
18704
18705 \family typewriter
18706 \size small
18707 $
18708 \backslash
18709 times$
18710 \family default
18711  may look prettier here.
18712 \end_layout
18713
18714 \begin_layout Enumerate
18715
18716 \size small
18717 \emph on
18718 Multiple spaces detected in output.
18719 \end_layout
18720
18721 \begin_layout Enumerate
18722
18723 \size small
18724 This text may be ignored.
18725 \end_layout
18726
18727 \begin_layout Enumerate
18728
18729 \size small
18730 Use 
18731 \family typewriter
18732
18733 \begin_inset Quotes eld
18734 \end_inset
18735
18736
18737 \family default
18738  to begin quotation, not 
18739 \family typewriter
18740 '
18741 \family default
18742 .
18743 \end_layout
18744
18745 \begin_layout Enumerate
18746
18747 \size small
18748 Use 
18749 \family typewriter
18750 '
18751 \family default
18752  to end quotation, not 
18753 \family typewriter
18754
18755 \begin_inset Quotes eld
18756 \end_inset
18757
18758
18759 \family default
18760 .
18761 \end_layout
18762
18763 \begin_layout Enumerate
18764
18765 \size small
18766 Don't mix quotes.
18767 \end_layout
18768
18769 \begin_layout Enumerate
18770
18771 \size small
18772 You should perhaps use 
18773 \begin_inset Quotes eld
18774 \end_inset
18775
18776
18777 \family typewriter
18778 cmd
18779 \family default
18780
18781 \begin_inset Quotes erd
18782 \end_inset
18783
18784  instead.
18785 \end_layout
18786
18787 \begin_layout Enumerate
18788
18789 \size small
18790 You should put a space in front of/after parenthesis.
18791 \end_layout
18792
18793 \begin_layout Enumerate
18794
18795 \size small
18796 You should avoid spaces in front of/after parenthesis.
18797 \end_layout
18798
18799 \begin_layout Enumerate
18800
18801 \size small
18802 \emph on
18803 You should not use punctuation in front of/after quotes.
18804 \end_layout
18805
18806 \begin_layout Enumerate
18807
18808 \size small
18809 Double space found.
18810 \end_layout
18811
18812 \begin_layout Enumerate
18813
18814 \size small
18815 You should put punctuation outside inner/inside display math mode.
18816 \end_layout
18817
18818 \begin_layout Enumerate
18819
18820 \size small
18821 You ought to not use primitive TeX in LaTeX code.
18822 \end_layout
18823
18824 \begin_layout Enumerate
18825
18826 \size small
18827 You should remove spaces in front of 
18828 \begin_inset Quotes eld
18829 \end_inset
18830
18831
18832 \family typewriter
18833 %s
18834 \family default
18835
18836 \begin_inset Quotes erd
18837 \end_inset
18838
18839
18840 \end_layout
18841
18842 \begin_layout Enumerate
18843
18844 \size small
18845 \begin_inset Quotes eld
18846 \end_inset
18847
18848
18849 \family typewriter
18850 %s
18851 \family default
18852
18853 \begin_inset Quotes erd
18854 \end_inset
18855
18856  is normally not followed by 
18857 \begin_inset Quotes eld
18858 \end_inset
18859
18860
18861 \family typewriter
18862 %c
18863 \family default
18864
18865 \begin_inset Quotes erd
18866 \end_inset
18867
18868 .
18869 \end_layout
18870
18871 \begin_layout Standard
18872 In later versions of LyX, we hope to provide a more complete interface to
18873  this tool (and it's smaller cousin 
18874 \family typewriter
18875 lacheck
18876 \family default
18877 ) to exploit the full power of it.
18878  But it's not exactly useless as it is now: go try it on one of your existing
18879  documents of a certain length and be surprised.
18880 \end_layout
18881
18882 \begin_layout Section
18883 Version Control in LyX
18884 \end_layout
18885
18886 \begin_layout Standard
18887 by
18888 \noun on
18889  Lars Gullik Bjønnes 
18890 \noun default
18891 and 
18892 \noun on
18893 Pavel Sanda
18894 \end_layout
18895
18896 \begin_layout Subsection
18897 Introduction
18898 \end_layout
18899
18900 \begin_layout Standard
18901 LyX supports some of the most basic RCS/CVS/SVN commands.
18902  If you need something a bit more sophisticated you will have to do that
18903  manually in a terminal.
18904 \end_layout
18905
18906 \begin_layout Standard
18907 Also note that CVS support is not as good as subversion support so we advise
18908  using SVN instead.
18909  A good place to start learning Subversion is SVN Book
18910 \begin_inset Foot
18911 status open
18912
18913 \begin_layout Plain Layout
18914 \begin_inset CommandInset href
18915 LatexCommand href
18916 target "http://svnbook.red-bean.com/"
18917
18918 \end_inset
18919
18920
18921 \end_layout
18922
18923 \end_inset
18924
18925 .
18926  In the case of RCS you should read 
18927 \begin_inset Quotes eld
18928 \end_inset
18929
18930 rcsintro
18931 \begin_inset Quotes erd
18932 \end_inset
18933
18934  (a man file, read it with 
18935 \family typewriter
18936 man rcsintro
18937 \family default
18938 ).
18939  This file describes all the basic features of RCS.
18940  You should especially notice the comment about a RCS directory, and the
18941  notion of a master RCS file (the file ending in 
18942 \family typewriter
18943 ,v
18944 \family default
18945 ).
18946 \end_layout
18947
18948 \begin_layout Standard
18949 Before you begin to use the version control features in LyX, you should
18950  be familiar with RCS/CVS/SVN usage.
18951  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18952  package—no guarantees are made for older versions.
18953  Most of the log messages are not currently displayed after operations —
18954  you can check them in the Messages pane if unsure.
18955  Regular users of version control will appreciate VC toolbar, which can
18956  be enabled via 
18957 \family sans
18958 View\SpecialChar \menuseparator
18959 Toolbars\SpecialChar \menuseparator
18960 Version
18961 \begin_inset space ~
18962 \end_inset
18963
18964 Control
18965 \family default
18966 .
18967 \end_layout
18968
18969 \begin_layout Standard
18970 For introducing your own external commands consult vc-command in the manual
18971  of LyX functions.
18972 \end_layout
18973
18974 \begin_layout Subsection
18975 RCS commands in LyX
18976 \end_layout
18977
18978 \begin_layout Standard
18979 The following sections describe the RCS commands supported by LyX.
18980  You can find them in the 
18981 \family sans
18982 File\SpecialChar \menuseparator
18983 Version
18984 \begin_inset space ~
18985 \end_inset
18986
18987 Control
18988 \family default
18989  submenu.
18990  LyX was tested against RCS 5.7/5.8
18991 \begin_inset Foot
18992 status open
18993
18994 \begin_layout Plain Layout
18995 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
18996  in order to work properly with LyX.
18997  In particular time zone (TZ) should be set and more importantly RCSINIT
18998  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
18999  expects archive to be found in file.lyx,v within the original document directory.
19000  See also README shipped with Windows RCS binaries.
19001 \end_layout
19002
19003 \end_inset
19004
19005 .
19006 \end_layout
19007
19008 \begin_layout Subsubsection
19009
19010 \family sans
19011 Register
19012 \end_layout
19013
19014 \begin_layout Standard
19015 If your document is not under revision control, this is the only item shown
19016  in the menu.
19017  And if it is under revision control, the 
19018 \family sans
19019 Register
19020 \family default
19021  item is not visible.
19022  
19023 \end_layout
19024
19025 \begin_layout Standard
19026 This command registers your document with RCS (unless you are under the
19027  directory managed by CVS)\SpecialChar \@.
19028  You are asked interactively to supply an initial
19029  description of the document.
19030  The document is now set in Read-Only mode and you have to 
19031 \family sans
19032 Check
19033 \begin_inset space ~
19034 \end_inset
19035
19036 Out
19037 \begin_inset space ~
19038 \end_inset
19039
19040 For
19041 \begin_inset space ~
19042 \end_inset
19043
19044 Edit
19045 \family default
19046 , before making any changes to it.
19047  A document under revision control has a 
19048 \begin_inset Quotes eld
19049 \end_inset
19050
19051 [RCS:<version> <locker>]
19052 \begin_inset Quotes erd
19053 \end_inset
19054
19055  item tagged to the filename in the minibuffer.
19056 \end_layout
19057
19058 \begin_layout Standard
19059 RCS command that is run: 
19060 \family typewriter
19061 ci -q -u -i -t-"<initial description>" <file-name>
19062 \end_layout
19063
19064 \begin_layout Standard
19065 Read 
19066 \family typewriter
19067 man ci
19068 \family default
19069  to understand the switches.
19070  
19071 \end_layout
19072
19073 \begin_layout Subsubsection
19074
19075 \family sans
19076 Check In Changes
19077 \end_layout
19078
19079 \begin_layout Standard
19080 When you are finished editing a file, you check in your changes.
19081  When you do this, you are asked for a description of the changes.
19082  This is stored in the history log.
19083  The version number is bumped, your changes are applied to the master RCS
19084  file, the document is unlocked and set to Read-Only mode.
19085  
19086 \end_layout
19087
19088 \begin_layout Standard
19089 RCS command: 
19090 \family typewriter
19091 ci -q -u -m"<description>" <file-name>
19092 \end_layout
19093
19094 \begin_layout Subsubsection
19095
19096 \family sans
19097 Check Out For Edit
19098 \end_layout
19099
19100 \begin_layout Standard
19101 By doing this you lock the document so that only you can edit it.
19102  This will also make the document Read-Write only for you.
19103  You will usually continue editing for a while and when you are finished
19104  you check in your changes.
19105  The status line is changed to reflect that you have locked the file.
19106  
19107 \end_layout
19108
19109 \begin_layout Standard
19110 RCS command: 
19111 \family typewriter
19112 co -q -l <file-name>
19113 \end_layout
19114
19115 \begin_layout Subsubsection
19116
19117 \family sans
19118 Revert To Repository Version
19119 \end_layout
19120
19121 \begin_layout Standard
19122 This will discard all changes made to the document since the last check
19123  in.
19124  You get a warning before changes are discarded.
19125 \end_layout
19126
19127 \begin_layout Standard
19128 RCS command: 
19129 \family typewriter
19130 co -f -u<version> <file-name>
19131 \end_layout
19132
19133 \begin_layout Subsubsection
19134
19135 \family sans
19136 Undo Last Checkin
19137 \end_layout
19138
19139 \begin_layout Standard
19140 This makes as if the last check in never happened.
19141  No changes are made to the document loaded into LyX, but the last version
19142  is removed from the master RCS file.
19143  
19144 \end_layout
19145
19146 \begin_layout Standard
19147 RCS command: 
19148 \family typewriter
19149 rcs -o<version> <file-name>
19150 \end_layout
19151
19152 \begin_layout Subsubsection
19153
19154 \family sans
19155 Show History
19156 \end_layout
19157
19158 \begin_layout Standard
19159 This shows the complete history of the RCS document.
19160  The output of 
19161 \family typewriter
19162 rlog <file-name>
19163 \family default
19164  is shown in a browser.
19165  See 
19166 \family typewriter
19167 man rlog
19168 \family default
19169  for more info.
19170 \end_layout
19171
19172 \begin_layout Subsubsection
19173 Revision info
19174 \end_layout
19175
19176 \begin_layout Standard
19177 LyX supports RCS version number, author name, date and time of last commit.
19178  All those are extracted from 
19179 \family typewriter
19180 rlog -r <file-name>
19181 \family default
19182 .
19183  For other details see 
19184 \begin_inset CommandInset ref
19185 LatexCommand ref
19186 reference "sub:VCS-Revision-Information"
19187
19188 \end_inset
19189
19190  for details.
19191 \end_layout
19192
19193 \begin_layout Subsection
19194 CVS commands in LyX
19195 \end_layout
19196
19197 \begin_layout Standard
19198 A subset of CVS operations is supported by LyX.
19199  You can find the commands in the 
19200 \family sans
19201 File\SpecialChar \menuseparator
19202 Version
19203 \begin_inset space ~
19204 \end_inset
19205
19206 Control
19207 \family default
19208  submenu.
19209  The version control system SVN is more powerful, so please use it instead
19210  of CVS if possible.
19211 \end_layout
19212
19213 \begin_layout Subsubsection
19214
19215 \family sans
19216 General CVS usage
19217 \end_layout
19218
19219 \begin_layout Standard
19220 If you start from scratch with CVS you have to create your repository and
19221  checkout the working copy with external tools.
19222  If you're using a client-server setup you may need to login before doing
19223  the first repository checkout.
19224 \end_layout
19225
19226 \begin_layout Standard
19227 If your documents are under revision control and others are using the same
19228  repository problems arise when different changes to the same document at
19229  the same location happen.
19230  Standard CVS repositories doesn't operate with a file locking mechanism.
19231  This may be surprising, but conflicts only occur if people disagree on
19232  the proper content of the same part of a document.
19233  So, if co-workers are used to communicate regularly, these conflicts occur
19234  rarely.
19235  If they don't communicate they have a fundamental problem anyway.
19236  Nevertheless some people like to work with so called 
19237 \begin_inset Quotes eld
19238 \end_inset
19239
19240 reserved checkouts
19241 \begin_inset Quotes erd
19242 \end_inset
19243
19244 .
19245  If they do so the working copy of all files is readonly when checked out
19246  first and the user starts editing after using a special command to make
19247  the working copy writable.
19248  When the changes are checked in the working copy returns to readonly state.
19249  With LyX one has to edit the 
19250 \begin_inset Flex Code
19251 status collapsed
19252
19253 \begin_layout Plain Layout
19254 .cvsrc
19255 \end_layout
19256
19257 \end_inset
19258
19259  file and add the line 
19260 \begin_inset Flex Code
19261 status collapsed
19262
19263 \begin_layout Plain Layout
19264 cvs -r
19265 \end_layout
19266
19267 \end_inset
19268
19269  to work with reserved checkouts.
19270  The benefit is the possibility to see who is using a writable copy of some
19271  document.
19272  It's not guaranteed only one user makes a copy writable.
19273 \end_layout
19274
19275 \begin_layout Standard
19276 LyX tries to guess if you're using reserved or non-reserved checkouts.
19277  If your working copy is readonly or it is writable and an additional copy
19278  of your document exists in the CVS/Base sub-directory a reserved otherwise
19279  a non-reserved checkout is assumed.
19280  When a reserved checkout is detected you have to use 
19281 \begin_inset Flex MenuItem
19282 status collapsed
19283
19284 \begin_layout Plain Layout
19285 Check Out
19286 \end_layout
19287
19288 \end_inset
19289
19290  to make your working copy writable if it's readonly.
19291  After doing so the 
19292 \begin_inset Flex MenuItem
19293 status collapsed
19294
19295 \begin_layout Plain Layout
19296 Check In
19297 \end_layout
19298
19299 \end_inset
19300
19301  operation is possible and that makes your working copy readonly again after
19302  transferring your changes to the repository.
19303 \end_layout
19304
19305 \begin_layout Standard
19306 More information about CVS can be found here 
19307 \begin_inset Flex URL
19308 status collapsed
19309
19310 \begin_layout Plain Layout
19311
19312 http://www.nongnu.org/cvs
19313 \end_layout
19314
19315 \end_inset
19316
19317  and here 
19318 \begin_inset Flex URL
19319 status collapsed
19320
19321 \begin_layout Plain Layout
19322
19323 http://ximbiot.com/cvs
19324 \end_layout
19325
19326 \end_inset
19327
19328 .
19329 \end_layout
19330
19331 \begin_layout Standard
19332 Read 
19333 \family typewriter
19334 man cvs
19335 \family default
19336  to understand the sub-commands and the switches mentioned below.
19337 \end_layout
19338
19339 \begin_layout Subsubsection
19340
19341 \family sans
19342 Register
19343 \end_layout
19344
19345 \begin_layout Standard
19346 If your document is not under revision control, this is the only item shown
19347  in the menu.
19348  And if it is under revision control, the 
19349 \family sans
19350 \bar under
19351 R
19352 \bar default
19353 egister
19354 \family default
19355  item is not visible.
19356  
19357 \end_layout
19358
19359 \begin_layout Standard
19360 This command registers in CVS your document 
19361 \begin_inset Flex Strong
19362 status collapsed
19363
19364 \begin_layout Plain Layout
19365
19366 \emph on
19367 only
19368 \end_layout
19369
19370 \end_inset
19371
19372  in the case you have already the documents directory under CVS control
19373  (in particular 
19374 \family typewriter
19375 CVS/Entries
19376 \family default
19377  file exists).
19378  This means you have to create or checkout the archive by yourself using
19379  external tools.
19380  (In case you forget that step LyX registers the document with RCS.)
19381 \end_layout
19382
19383 \begin_layout Standard
19384 Then you are asked interactively to supply an initial description of the
19385  document.
19386  Don't forget that registered file is not yet checked in.
19387 \end_layout
19388
19389 \begin_layout Standard
19390 CVS command that is run: 
19391 \family typewriter
19392 cvs -q add -m"<entered message>" "<file-name>"
19393 \end_layout
19394
19395 \begin_layout Standard
19396 The term 
19397 \family typewriter
19398 "<file-name>"
19399 \family default
19400  above and for all other CVS commands is an abbreviation for 
19401 \begin_inset Quotes eld
19402 \end_inset
19403
19404 change the current working directory to file location and use the file name
19405  without path component as argument
19406 \begin_inset Quotes erd
19407 \end_inset
19408
19409 .
19410 \end_layout
19411
19412 \begin_layout Subsubsection
19413
19414 \family sans
19415 Check In Changes
19416 \end_layout
19417
19418 \begin_layout Standard
19419 When you are finished editing a file, you commit your changes.
19420  When you do this and you had changed the document, you are asked for a
19421  description of the changes.
19422  After that changes are written to the repository.
19423  In case you didn't change the document and a reserved checkout is detected
19424  the reservation made on 
19425 \begin_inset Flex MenuItem
19426 status collapsed
19427
19428 \begin_layout Plain Layout
19429 Check Out
19430 \end_layout
19431
19432 \end_inset
19433
19434  is undone.
19435 \end_layout
19436
19437 \begin_layout Labeling
19438 \labelwidthstring 00.00.0000
19439 CVS
19440 \begin_inset space ~
19441 \end_inset
19442
19443 command: 
19444 \begin_inset space ~
19445 \end_inset
19446
19447
19448 \begin_inset Newline newline
19449 \end_inset
19450
19451
19452 \begin_inset Flex Code
19453 status collapsed
19454
19455 \begin_layout Plain Layout
19456 cvs 
19457 \family typewriter
19458 -q commit -m"<description>" "<file-name>"
19459 \end_layout
19460
19461 \end_inset
19462
19463  or
19464 \begin_inset Newline newline
19465 \end_inset
19466
19467
19468 \begin_inset Flex Code
19469 status collapsed
19470
19471 \begin_layout Plain Layout
19472 cvs -q unedit 
19473 \family typewriter
19474 "<file-name>"
19475 \end_layout
19476
19477 \end_inset
19478
19479
19480 \end_layout
19481
19482 \begin_layout Subsubsection
19483
19484 \family sans
19485 Check Out Changes
19486 \end_layout
19487
19488 \begin_layout Standard
19489 When you are sharing a repository with others, you may have to incorporate
19490  their changes into your working copy.
19491 \end_layout
19492
19493 \begin_layout Standard
19494 CVS command: 
19495 \family typewriter
19496 cvs -q update "<file-name>"
19497 \end_layout
19498
19499 \begin_layout Standard
19500 If a readonly checkout is detected the working copy is made writable and
19501  reserved.
19502 \end_layout
19503
19504 \begin_layout Standard
19505 CVS command: 
19506 \family typewriter
19507 cvs -q edit "<file-name>"
19508 \end_layout
19509
19510 \begin_layout Subsubsection
19511
19512 \family sans
19513 Revert To Repository Version
19514 \end_layout
19515
19516 \begin_layout Standard
19517 This will discard all changes made to the document since the last check
19518  in.
19519  You get a warning before changes are discarded.
19520  Firstly the file is deleted, secondly CVS update command is run.
19521 \end_layout
19522
19523 \begin_layout Standard
19524 CVS command: 
19525 \family typewriter
19526 cvs -q update "<file-name>"
19527 \end_layout
19528
19529 \begin_layout Standard
19530 If a reserved checkout is detected and the working copy has no changes only
19531  the reservation is undone.
19532 \end_layout
19533
19534 \begin_layout Standard
19535 CVS command: 
19536 \family typewriter
19537 cvs -q unedit "<file-name>"
19538 \end_layout
19539
19540 \begin_layout Subsubsection
19541 Update of the local directory checkout from repository
19542 \end_layout
19543
19544 \begin_layout Standard
19545 Once your documents gets more complex, containing sub-documents and pictures,
19546  including external 
19547 \begin_inset Flex Code
19548 status collapsed
19549
19550 \begin_layout Plain Layout
19551 .tex
19552 \end_layout
19553
19554 \end_inset
19555
19556  files and so on using version control becomes more complicated.
19557  LyX supports updating the whole tree in which resides the document.
19558  This become especially useful once you cooperate with people which neither
19559  have detailed knowledge about CVS usage nor they have ambition to commit
19560  additional material to the repository.
19561  You have to organize the files structure so that all external files are
19562  in the same directory or subdirectories of the document.
19563  It's good practice anyway to store multipart documents in an extra directory.
19564 \end_layout
19565
19566 \begin_layout Standard
19567 The 
19568 \begin_inset Flex Code
19569 status collapsed
19570
19571 \begin_layout Plain Layout
19572 Update local directory from repository
19573 \end_layout
19574
19575 \end_inset
19576
19577  command updates the whole directory.
19578  If local changes are detected user is warned before update starts.
19579  In case of merge conflicts both versions of the conflicting document parts
19580  are placed in the final document.
19581  You have to review and correct the result of the merge.
19582  You'll find the conflicts enclosed in pairs of 
19583 \begin_inset Flex Code
19584 status collapsed
19585
19586 \begin_layout Plain Layout
19587 <<<<<<<
19588 \end_layout
19589
19590 \end_inset
19591
19592  and 
19593 \begin_inset Flex Code
19594 status collapsed
19595
19596 \begin_layout Plain Layout
19597 >>>>>>>
19598 \end_layout
19599
19600 \end_inset
19601
19602  separated by 
19603 \begin_inset Flex Code
19604 status collapsed
19605
19606 \begin_layout Plain Layout
19607 =======
19608 \end_layout
19609
19610 \end_inset
19611
19612 .
19613  The first part is your version as before the update operation with the
19614  document name prepended.
19615  The second one is the repository version with the version number after
19616  the sequence of 
19617 \begin_inset Flex Code
19618 status collapsed
19619
19620 \begin_layout Plain Layout
19621 >
19622 \end_layout
19623
19624 \end_inset
19625
19626  signs.
19627 \end_layout
19628
19629 \begin_layout Labeling
19630 \labelwidthstring 00.00.0000
19631 CVS
19632 \begin_inset space ~
19633 \end_inset
19634
19635 commands: 
19636 \begin_inset space ~
19637 \end_inset
19638
19639
19640 \begin_inset Newline newline
19641 \end_inset
19642
19643
19644 \begin_inset Flex Code
19645 status collapsed
19646
19647 \begin_layout Plain Layout
19648 cd $path; cvs diff 
19649 \family typewriter
19650 "."
19651 \end_layout
19652
19653 \end_inset
19654
19655  (Ask if changes are detected.)
19656 \begin_inset Newline newline
19657 \end_inset
19658
19659
19660 \begin_inset Flex Code
19661 status collapsed
19662
19663 \begin_layout Plain Layout
19664 cd $path; cvs -q update 
19665 \family typewriter
19666 "."
19667 \end_layout
19668
19669 \end_inset
19670
19671
19672 \end_layout
19673
19674 \begin_layout Standard
19675 where 
19676 \begin_inset Flex Code
19677 status collapsed
19678
19679 \begin_layout Plain Layout
19680 $path
19681 \end_layout
19682
19683 \end_inset
19684
19685  stands for the path to the document.
19686 \end_layout
19687
19688 \begin_layout Subsubsection
19689
19690 \family sans
19691 Show History
19692 \end_layout
19693
19694 \begin_layout Standard
19695 This shows the complete history of the CVS document.
19696  The output of 
19697 \family typewriter
19698 cvs log "<file-name>"
19699 \family default
19700  is shown in a browser.
19701 \end_layout
19702
19703 \begin_layout Subsection
19704 SVN commands in LyX
19705 \end_layout
19706
19707 \begin_layout Standard
19708 SVN is now partially supported by LyX.
19709  You can find the commands in the 
19710 \family sans
19711 File\SpecialChar \menuseparator
19712 Version
19713 \begin_inset space ~
19714 \end_inset
19715
19716 Control
19717 \family default
19718  submenu.
19719  Please note that if you use password protected access to repository via
19720  ssh, you will be asked in terminal window.
19721  LyX was tested against SVN 1.5 and 1.6
19722 \begin_inset Foot
19723 status open
19724
19725 \begin_layout Plain Layout
19726 Most of the commands will work with 1.4 too, see 
19727 \begin_inset CommandInset ref
19728 LatexCommand ref
19729 reference "sub:SVN-Repo-Update"
19730
19731 \end_inset
19732
19733 .
19734 \end_layout
19735
19736 \end_inset
19737
19738
19739 \end_layout
19740
19741 \begin_layout Subsubsection
19742
19743 \family sans
19744 Register
19745 \end_layout
19746
19747 \begin_layout Standard
19748 If your document is not under revision control, this is the only item shown
19749  in the menu.
19750  And if it is under revision control, the 
19751 \family sans
19752 \bar under
19753 R
19754 \bar default
19755 egister
19756 \family default
19757  item is not visible.
19758  
19759 \end_layout
19760
19761 \begin_layout Standard
19762 This command registers in SVN your document ONLY in case you have already
19763  the documents directory under SVN control (in particular 
19764 \family typewriter
19765 .svn/entries
19766 \family default
19767  file exists).
19768  This means you have to checkout the archive by yourself.
19769  
19770 \end_layout
19771
19772 \begin_layout Standard
19773 Then you are asked interactively to supply an initial description of the
19774  document.
19775  Don't forget that registered file is not yet commited.
19776 \end_layout
19777
19778 \begin_layout Standard
19779 SVN command that is run: 
19780 \family typewriter
19781 svn add -q 
19782 \begin_inset Quotes eld
19783 \end_inset
19784
19785 <file-name>
19786 \begin_inset Quotes erd
19787 \end_inset
19788
19789
19790 \end_layout
19791
19792 \begin_layout Standard
19793 Read 
19794 \family typewriter
19795 man svn
19796 \family default
19797  to understand the switches.
19798  
19799 \end_layout
19800
19801 \begin_layout Subsubsection
19802
19803 \family sans
19804 Check In Changes
19805 \end_layout
19806
19807 \begin_layout Standard
19808 When you are finished editing a file, you commit your changes.
19809  When you do this, you are asked for a description of the changes.
19810  After that changes are commited.
19811 \end_layout
19812
19813 \begin_layout Standard
19814 SVN command:
19815 \begin_inset Foot
19816 status collapsed
19817
19818 \begin_layout Plain Layout
19819 In case locking is not enabled.
19820  See Section 
19821 \begin_inset CommandInset ref
19822 LatexCommand ref
19823 reference "subsec:SVN-File-Locking"
19824
19825 \end_inset
19826
19827 .
19828 \end_layout
19829
19830 \end_inset
19831
19832  
19833 \family typewriter
19834 svn commit -q -m"<description>" <file-name>
19835 \end_layout
19836
19837 \begin_layout Subsubsection
19838
19839 \family sans
19840 Check Out For Edit
19841 \end_layout
19842
19843 \begin_layout Standard
19844 Updates the changes of this file from the repository.
19845  Be sure you understand SVN merging and conflicts resolving before using
19846  this function, because all conflicts has to be resolved manually by you!
19847 \end_layout
19848
19849 \begin_layout Standard
19850 SVN command:
19851 \begin_inset Foot
19852 status collapsed
19853
19854 \begin_layout Plain Layout
19855 Ditto.
19856 \end_layout
19857
19858 \end_inset
19859
19860  
19861 \family typewriter
19862 svn update --non-interactive 
19863 \begin_inset Quotes eld
19864 \end_inset
19865
19866 <file-name>
19867 \begin_inset Quotes erd
19868 \end_inset
19869
19870
19871 \end_layout
19872
19873 \begin_layout Subsubsection
19874
19875 \family sans
19876 Revert To Repository Version
19877 \end_layout
19878
19879 \begin_layout Standard
19880 This will discard all changes made to the document since the last check
19881  in.
19882  You get a warning before changes are discarded.
19883  
19884 \end_layout
19885
19886 \begin_layout Standard
19887 SVN command: 
19888 \family typewriter
19889 svn revert -q 
19890 \begin_inset Quotes eld
19891 \end_inset
19892
19893 <file-name>
19894 \begin_inset Quotes erd
19895 \end_inset
19896
19897
19898 \end_layout
19899
19900 \begin_layout Subsubsection
19901 \begin_inset CommandInset label
19902 LatexCommand label
19903 name "sub:SVN-Repo-Update"
19904
19905 \end_inset
19906
19907 Update of the local directory checkout from repository
19908 \begin_inset Foot
19909 status collapsed
19910
19911 \begin_layout Plain Layout
19912 Note that this command will work only with subversion 
19913 \begin_inset Formula $\geqq1.5$
19914 \end_inset
19915
19916
19917 \end_layout
19918
19919 \end_inset
19920
19921
19922 \end_layout
19923
19924 \begin_layout Standard
19925 All the commands above have one shortcomming - they deal with the current
19926  document only.
19927  Once your document contains pictures, includes external 
19928 \begin_inset Flex Code
19929 status collapsed
19930
19931 \begin_layout Plain Layout
19932 .tex
19933 \end_layout
19934
19935 \end_inset
19936
19937  files and so on administration becomes more complicated.
19938  LyX now supports updating the whole tree in which resides the document
19939 \begin_inset Foot
19940 status collapsed
19941
19942 \begin_layout Plain Layout
19943 One need to organize the files structure so that all external files are
19944  in the same directory or subdirectories of the document.
19945  
19946 \end_layout
19947
19948 \end_inset
19949
19950 .
19951  This become especially useful once you cooperate with people which neither
19952  know about subversion management nor they have ambition to commit additional
19953  material to the repository.
19954  
19955 \end_layout
19956
19957 \begin_layout Standard
19958 \begin_inset Flex Code
19959 status collapsed
19960
19961 \begin_layout Plain Layout
19962 Update local directory from repository
19963 \end_layout
19964
19965 \end_inset
19966
19967  command updates the whole directory and in case of merge conflicts local
19968  version of the files are left, so no unintended data loss occurs.
19969  If local changes are detected user is warned before update starts.
19970 \end_layout
19971
19972 \begin_layout Labeling
19973 \labelwidthstring 00.00.0000
19974 SVN
19975 \begin_inset space ~
19976 \end_inset
19977
19978 commands: 
19979 \begin_inset space ~
19980 \end_inset
19981
19982
19983 \begin_inset Newline newline
19984 \end_inset
19985
19986
19987 \begin_inset Flex Code
19988 status collapsed
19989
19990 \begin_layout Plain Layout
19991 svn diff $path
19992 \end_layout
19993
19994 \end_inset
19995
19996  (Ask if changes are detected.)
19997 \begin_inset Newline newline
19998 \end_inset
19999
20000
20001 \begin_inset Flex Code
20002 status collapsed
20003
20004 \begin_layout Plain Layout
20005 svn update --accept mine-full $path
20006 \end_layout
20007
20008 \end_inset
20009
20010
20011 \end_layout
20012
20013 \begin_layout Standard
20014 where 
20015 \begin_inset Flex Code
20016 status collapsed
20017
20018 \begin_layout Plain Layout
20019 $path
20020 \end_layout
20021
20022 \end_inset
20023
20024  stands for the path to the document.
20025 \end_layout
20026
20027 \begin_layout Subsubsection
20028
20029 \family sans
20030 Show History
20031 \end_layout
20032
20033 \begin_layout Standard
20034 This shows the complete history of the SVN document.
20035  The output of 
20036 \family typewriter
20037 svn log 
20038 \begin_inset Quotes eld
20039 \end_inset
20040
20041 <file-name>
20042 \begin_inset Quotes erd
20043 \end_inset
20044
20045
20046 \family default
20047  is shown in a browser.
20048 \end_layout
20049
20050 \begin_layout Subsubsection
20051 File Locking
20052 \begin_inset CommandInset label
20053 LatexCommand label
20054 name "subsec:SVN-File-Locking"
20055
20056 \end_inset
20057
20058
20059 \end_layout
20060
20061 \begin_layout Standard
20062 The file exchange through various revision control systems brings the problem
20063  of merge conflicts in case two different users try to edit the same (parts
20064  of) document.
20065  When such a conflict happens it needs manual resolving and one reasonable
20066  alternative is to provide some kind of locking mechanism, which guarantees
20067  that only one user is allowed to edit file at the given time.
20068 \end_layout
20069
20070 \begin_layout Standard
20071 SVN has two such mechanisms to provide mutual exclusivity for file access
20072  - locks and automatic setting of write permissions (see sec.
20073  
20074 \begin_inset CommandInset ref
20075 LatexCommand ref
20076 reference "subsec:Automatical-Locking-Property"
20077
20078 \end_inset
20079
20080 ) based on 
20081 \begin_inset Flex Code
20082 status collapsed
20083
20084 \begin_layout Plain Layout
20085 svn:needs-lock
20086 \end_layout
20087
20088 \end_inset
20089
20090  file svn property
20091 \begin_inset Foot
20092 status open
20093
20094 \begin_layout Plain Layout
20095 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20096 \end_layout
20097
20098 \end_inset
20099
20100 .
20101  If this property is detected for a given document LyX starts to use SVN
20102  locks for document editing automatically and the whole check-in/out mechanism
20103  switches to the same regimen as for RCS.
20104  This in particular means there are two different modes of file use in LyX:
20105 \end_layout
20106
20107 \begin_layout Itemize
20108 Unlocked state.
20109  The loaded file is in the read-only mode.
20110  For editing on needs to check-out.
20111  
20112 \emph on
20113 Check-out
20114 \emph default
20115  consists of updating from the repository and gaining write lock.
20116  If the lock is not possible to obtain, we remain in unlocked state.
20117 \end_layout
20118
20119 \begin_layout Itemize
20120 Locked state.
20121  The loaded file is in the 'normal' edit mode.
20122  No other user is allowed to edit the file.
20123  
20124 \emph on
20125 Check-in
20126 \emph default
20127  consists of commiting changes and releasing write-lock.
20128  If no changes have been made to the document, no commit will be produced
20129 \begin_inset Foot
20130 status collapsed
20131
20132 \begin_layout Plain Layout
20133 Don't be puzzled by the fact that you will be asked for commit message anyway.
20134 \end_layout
20135
20136 \end_inset
20137
20138  and only the write-lock will be released.
20139 \end_layout
20140
20141 \begin_layout Standard
20142 SVN commands:
20143 \end_layout
20144
20145 \begin_layout Labeling
20146 \labelwidthstring 00.00.0000
20147 Check-in:
20148 \family typewriter
20149  svn commit -q -m"<description>" "<file-name>"
20150 \begin_inset Newline newline
20151 \end_inset
20152
20153 svn unlock "<file-name>"
20154 \end_layout
20155
20156 \begin_layout Labeling
20157 \labelwidthstring 00.00.0000
20158 Check-out: 
20159 \family typewriter
20160 svn update "<file-name>"
20161 \begin_inset Newline newline
20162 \end_inset
20163
20164 svn lock "<file-name>"
20165 \end_layout
20166
20167 \begin_layout Subsubsection
20168
20169 \family typewriter
20170 \begin_inset CommandInset label
20171 LatexCommand label
20172 name "subsec:Automatical-Locking-Property"
20173
20174 \end_inset
20175
20176
20177 \family default
20178 Automatic Locking Property
20179 \end_layout
20180
20181 \begin_layout Standard
20182 The above mentioned automatic setting of write permissions of the .lyx file
20183  can be set through
20184 \family sans
20185 \bar under
20186  F
20187 \bar default
20188 ile\SpecialChar \menuseparator
20189
20190 \bar under
20191 V
20192 \bar default
20193 ersion
20194 \begin_inset space ~
20195 \end_inset
20196
20197 Control\SpecialChar \menuseparator
20198
20199 \bar under
20200 T
20201 \bar default
20202 oggle locking property
20203 \family default
20204 .
20205  This command is active only when the file is not locked on the svn server
20206  (i.e.
20207  you need to check-out before proceeding).
20208 \end_layout
20209
20210 \begin_layout Labeling
20211 \labelwidthstring 00.00.0000
20212 SVN
20213 \begin_inset space ~
20214 \end_inset
20215
20216 commands:
20217 \end_layout
20218
20219 \begin_layout Labeling
20220 \labelwidthstring 00.00.0000
20221 Set:
20222 \family typewriter
20223  svn propset svn:needs-lock ON "<file-name>"
20224 \end_layout
20225
20226 \begin_layout Labeling
20227 \labelwidthstring 00.00.0000
20228 Unset: 
20229 \family typewriter
20230 svn propdel svn:needs-lock "<file-name>"
20231 \end_layout
20232
20233 \begin_layout Subsubsection
20234 \begin_inset CommandInset label
20235 LatexCommand label
20236 name "sub:VCS-Revision-Information"
20237
20238 \end_inset
20239
20240 Revision Information in Documents
20241 \end_layout
20242
20243 \begin_layout Standard
20244 There are more possibilities how to activate revision information in our
20245  document.
20246 \end_layout
20247
20248 \begin_layout Itemize
20249 LyX supports directly:
20250 \end_layout
20251
20252 \begin_deeper
20253 \begin_layout Itemize
20254 tree revision information (
20255 \begin_inset Flex Code
20256 status collapsed
20257
20258 \begin_layout Plain Layout
20259 vcs-tree-revision
20260 \end_layout
20261
20262 \end_inset
20263
20264 ).
20265  The result is the output of the 
20266 \begin_inset Flex Code
20267 status collapsed
20268
20269 \begin_layout Plain Layout
20270 svnversion
20271 \end_layout
20272
20273 \end_inset
20274
20275  command, the following table gives you an idea, how to read the results.
20276 \end_layout
20277
20278 \begin_layout Standard
20279 \align center
20280 \begin_inset Tabular
20281 <lyxtabular version="3" rows="6" columns="2">
20282 <features rotate="0" tabularvalignment="middle">
20283 <column alignment="center" valignment="top" width="0">
20284 <column alignment="center" valignment="top" width="0">
20285 <row>
20286 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20287 \begin_inset Text
20288
20289 \begin_layout Plain Layout
20290 Output
20291 \end_layout
20292
20293 \end_inset
20294 </cell>
20295 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20296 \begin_inset Text
20297
20298 \begin_layout Plain Layout
20299 Meaning
20300 \end_layout
20301
20302 \end_inset
20303 </cell>
20304 </row>
20305 <row>
20306 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20307 \begin_inset Text
20308
20309 \begin_layout Plain Layout
20310 4123:4168
20311 \end_layout
20312
20313 \end_inset
20314 </cell>
20315 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20316 \begin_inset Text
20317
20318 \begin_layout Plain Layout
20319 mixed revision working copy
20320 \end_layout
20321
20322 \end_inset
20323 </cell>
20324 </row>
20325 <row>
20326 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20327 \begin_inset Text
20328
20329 \begin_layout Plain Layout
20330 4168M
20331 \end_layout
20332
20333 \end_inset
20334 </cell>
20335 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20336 \begin_inset Text
20337
20338 \begin_layout Plain Layout
20339 modified working copy
20340 \end_layout
20341
20342 \end_inset
20343 </cell>
20344 </row>
20345 <row>
20346 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20347 \begin_inset Text
20348
20349 \begin_layout Plain Layout
20350 4123S
20351 \end_layout
20352
20353 \end_inset
20354 </cell>
20355 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20356 \begin_inset Text
20357
20358 \begin_layout Plain Layout
20359 switched working copy
20360 \end_layout
20361
20362 \end_inset
20363 </cell>
20364 </row>
20365 <row>
20366 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20367 \begin_inset Text
20368
20369 \begin_layout Plain Layout
20370 4123P
20371 \end_layout
20372
20373 \end_inset
20374 </cell>
20375 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20376 \begin_inset Text
20377
20378 \begin_layout Plain Layout
20379 partial working copy, from a sparse checkout
20380 \end_layout
20381
20382 \end_inset
20383 </cell>
20384 </row>
20385 <row>
20386 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20387 \begin_inset Text
20388
20389 \begin_layout Plain Layout
20390 4123:4168MS
20391 \end_layout
20392
20393 \end_inset
20394 </cell>
20395 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20396 \begin_inset Text
20397
20398 \begin_layout Plain Layout
20399 mixed revision, modified, switched working copy
20400 \end_layout
20401
20402 \end_inset
20403 </cell>
20404 </row>
20405 </lyxtabular>
20406
20407 \end_inset
20408
20409
20410 \end_layout
20411
20412 \begin_layout Itemize
20413 file revision information.
20414  The result comes from parsing the output of 
20415 \begin_inset Flex Code
20416 status collapsed
20417
20418 \begin_layout Plain Layout
20419 svn
20420 \begin_inset space ~
20421 \end_inset
20422
20423 info
20424 \begin_inset space ~
20425 \end_inset
20426
20427 --xml
20428 \begin_inset space ~
20429 \end_inset
20430
20431 file.lyx
20432 \end_layout
20433
20434 \end_inset
20435
20436 .
20437  Supported flags are:
20438 \end_layout
20439
20440 \begin_deeper
20441 \begin_layout Itemize
20442 version number of the last commit (
20443 \begin_inset Flex Code
20444 status collapsed
20445
20446 \begin_layout Plain Layout
20447 vcs-revision
20448 \end_layout
20449
20450 \end_inset
20451
20452 )
20453 \end_layout
20454
20455 \begin_layout Itemize
20456 author of the last commit (
20457 \begin_inset Flex Code
20458 status collapsed
20459
20460 \begin_layout Plain Layout
20461 vcs-author
20462 \end_layout
20463
20464 \end_inset
20465
20466 )
20467 \end_layout
20468
20469 \begin_layout Itemize
20470 date of the last commit (
20471 \begin_inset Flex Code
20472 status collapsed
20473
20474 \begin_layout Plain Layout
20475 vcs-date
20476 \end_layout
20477
20478 \end_inset
20479
20480 )
20481 \end_layout
20482
20483 \begin_layout Itemize
20484 time of the last commit (
20485 \begin_inset Flex Code
20486 status collapsed
20487
20488 \begin_layout Plain Layout
20489 vcs-time
20490 \end_layout
20491
20492 \end_inset
20493
20494 )
20495 \end_layout
20496
20497 \end_deeper
20498 \begin_layout Standard
20499 You can obtain this info via InsetInfo (e.g.
20500  
20501 \begin_inset Flex Code
20502 status collapsed
20503
20504 \begin_layout Plain Layout
20505 info-insert buffer vcs-date
20506 \end_layout
20507
20508 \end_inset
20509
20510 ).
20511  The information will be available only when you have the file stored under
20512  svn managment (i.e.
20513  the 
20514 \begin_inset Flex Code
20515 status collapsed
20516
20517 \begin_layout Plain Layout
20518 .svn
20519 \end_layout
20520
20521 \end_inset
20522
20523  directory is available with your document).
20524 \end_layout
20525
20526 \end_deeper
20527 \begin_layout Itemize
20528 Another---a hacking one---possibility is to use svn keywords
20529 \begin_inset Foot
20530 status collapsed
20531
20532 \begin_layout Plain Layout
20533 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20534 \end_layout
20535
20536 \end_inset
20537
20538 .
20539  In short -- you set file keywords property (e.g.
20540  
20541 \family sans
20542 svn propset svn:keywords 'Rev' file.lyx
20543 \family default
20544 ) and then paste keyword TeX code
20545 \begin_inset Foot
20546 status collapsed
20547
20548 \begin_layout Plain Layout
20549 This is an easy way how to ensure that LyX won't break the line in the middle
20550  of keyword tag.
20551 \end_layout
20552
20553 \end_inset
20554
20555  tag in your document (e.g.
20556  
20557 \begin_inset ERT
20558 status open
20559
20560 \begin_layout Plain Layout
20561
20562 $Rev$
20563 \end_layout
20564
20565 \end_inset
20566
20567 ).
20568  This way svn client will automatically substitute revision number (e.g.
20569  
20570 \begin_inset ERT
20571 status open
20572
20573 \begin_layout Plain Layout
20574
20575 $Rev: 59 $
20576 \end_layout
20577
20578 \end_inset
20579
20580 ) after each update and commit.
20581  There are more problems with this approach.
20582  Firstly, the '$' character is used in TeX world for math equations, so
20583  any occurence of math formula 
20584 \begin_inset Formula $Rev$
20585 \end_inset
20586
20587  become 
20588 \begin_inset Formula $Rev:59$
20589 \end_inset
20590
20591  in your LyX document.
20592  Similarly for other keywords like Id, Date, Author, etc.
20593  Secondly svn output is dependent on your locales, so its very easy that
20594  svn would produce some problematic strings once Date is used.
20595  Thirdly you get the whole 'Rev: 59' string in your document instead of
20596  the plain number.
20597  Until subversion implements user's custom keywords it will be hard to use
20598  this approach reliably or let LyX to support it directly.
20599 \end_layout
20600
20601 \begin_layout Subsection
20602 SVN and Windows Environment
20603 \end_layout
20604
20605 \begin_layout Quote
20606 My inclination is to say that if the user cannot figure out the command
20607  line operations on their own fairly quickly, they would be well advised
20608  to use TortoiseSVN.
20609  ---P.
20610  A.
20611  Rubin
20612 \end_layout
20613
20614 \begin_layout Subsubsection
20615 Preparation
20616 \end_layout
20617
20618 \begin_layout Standard
20619 In addition to installing LyX, and having access to a Subversion repository,
20620  the user will need to install the Subversion client program.
20621  A Windows installer for the client program is available from 
20622 \begin_inset CommandInset href
20623 LatexCommand href
20624 name "CollabNet"
20625 target "http://www.collab.net/nonav/downloads/subversion/"
20626
20627 \end_inset
20628
20629 .
20630  The user may also want to install 
20631 \begin_inset CommandInset href
20632 LatexCommand href
20633 name "TortoiseSVN"
20634 target "http://tortoisesvn.tigris.org/"
20635
20636 \end_inset
20637
20638 , which integrates Subversion operations into the context (rightclick) menu
20639  of Windows Explorer.
20640  Operations done outside LyX will typically be more convenient using the
20641  Explorer context menu.
20642  Note that TortoiseSVN is not a replacement for the client program, which
20643  is what LyX itself will use.
20644 \end_layout
20645
20646 \begin_layout Subsubsection
20647 Bringing a document under Subversion control
20648 \end_layout
20649
20650 \begin_layout Standard
20651 Before a LyX document can be brought under version control in Subversion,
20652  its parent directory needs to be under version control.
20653  If the document is being added to a project already in the repository,
20654  this is accomplished by checking the project out to the directory where
20655  the new document will be placed.
20656  If the project itself is not yet under version control (for instance, if
20657  this document starts a new project), the directory must be imported into
20658  the repository.
20659  This is done outside LyX.
20660  Both import and checkout are easily accomplished from the Explorer context
20661  menu using TortoiseSVN, or alternatively can be done using the command
20662  line client at a DOS prompt.
20663  The procedure for importing the project using TortoiseSVN is described
20664  below, assuming an existing repository and a new project being started
20665  in 
20666 \family typewriter
20667 C:
20668 \backslash
20669 new project
20670 \family default
20671 .
20672  For information on using the Subversion client program, run 
20673 \family typewriter
20674 svn --help 
20675 \family default
20676 in a DOS shell.
20677 \end_layout
20678
20679 \begin_layout Enumerate
20680 Locate 
20681 \family typewriter
20682 C:
20683 \backslash
20684 new project 
20685 \family default
20686 in Windows Explorer, right click it, and select 
20687 \family typewriter
20688 TortoiseSVN > Repo-browser
20689 \family default
20690 .
20691  If necessary, adjust the URL for the repository, then click OK.
20692 \end_layout
20693
20694 \begin_layout Enumerate
20695 Right click the level of the repository under which you want to place the
20696  new project folder (typically the top level) and click 
20697 \family typewriter
20698 Create folder\SpecialChar \ldots{}
20699
20700 \family default
20701  Supply a name for the project folder and click OK.
20702  Add a message for the log file if desired, then click OK again.
20703  The new project folder should appear in the repository.
20704  Finally, click OK again to exit the repository browser.
20705 \end_layout
20706
20707 \begin_layout Enumerate
20708 Once again right click 
20709 \family typewriter
20710 C:
20711 \backslash
20712 new project
20713 \family default
20714 , this time selecting SVN Checkout\SpecialChar \ldots{}
20715  Select the URL of the project folder
20716  you just created in the repository, and set the checkout directory to 
20717 \family typewriter
20718 C:
20719 \backslash
20720 new project.
20721
20722 \family default
20723  Click OK.
20724  You will be warned about a non-empty folder; click OK to proceed.
20725  You should now have a 
20726 \family typewriter
20727 .svn
20728 \family default
20729  directory under 
20730 \family typewriter
20731 C:
20732 \backslash
20733 new project.
20734 \end_layout
20735
20736 \begin_layout Enumerate
20737 Create or open your document in LyX and click 
20738 \family sans
20739 \bar under
20740 F
20741 \bar default
20742 ile\SpecialChar \menuseparator
20743
20744 \bar under
20745 V
20746 \bar default
20747 ersion
20748 \begin_inset space ~
20749 \end_inset
20750
20751 Control\SpecialChar \menuseparator
20752
20753 \bar under
20754 R
20755 \bar default
20756 egister.
20757  
20758 \family default
20759 Add a log message and click OK to commit the document to version control.
20760 \end_layout
20761
20762 \begin_layout Standard
20763 From this point onward, you should have full functionality in the 
20764 \family sans
20765 \bar under
20766 F
20767 \bar default
20768 ile\SpecialChar \menuseparator
20769
20770 \bar under
20771 V
20772 \bar default
20773 ersion
20774 \begin_inset space ~
20775 \end_inset
20776
20777 Control
20778 \family default
20779  menu.
20780  You also have the option of checking the document in and out, viewing its
20781  history, etc.
20782  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20783  client program from a command prompt.
20784 \end_layout
20785
20786 \begin_layout Subsubsection
20787 SSH tunnel used with SVN under Windows
20788 \end_layout
20789
20790 \begin_layout Standard
20791 Compared with Linux setting up an svn client to communicate over ssh under
20792  Windows is a rather troublesome task.
20793  We will at least offer some hints how to setup the client side but prior
20794  knowledge about ssh and the Windows command line is needed, also be prepared
20795  for a great deal of frustration\SpecialChar \ldots{}
20796
20797 \end_layout
20798
20799 \begin_layout Enumerate
20800 Get an svn client for windows, as described in the previous sections.
20801  When it is a fresh install run some svn command (e.g.
20802  
20803 \begin_inset Flex Code
20804 status collapsed
20805
20806 \begin_layout Plain Layout
20807 svn --version
20808 \end_layout
20809
20810 \end_inset
20811
20812 ) to create config files, which you will need to change later on.
20813 \end_layout
20814
20815 \begin_layout Enumerate
20816 Choose an ssh client for Windows.
20817  There are several possibilities, we will use the one from Putty tools
20818 \begin_inset Foot
20819 status open
20820
20821 \begin_layout Plain Layout
20822 \begin_inset Flex URL
20823 status collapsed
20824
20825 \begin_layout Plain Layout
20826
20827 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20828 \end_layout
20829
20830 \end_inset
20831
20832
20833 \end_layout
20834
20835 \end_inset
20836
20837 .
20838  You will need to set the connection up so that the client doesn't ask for
20839  any password from you.
20840  To keep things easy we will use only keys without any additional password
20841  protection etc.
20842 \end_layout
20843
20844 \begin_deeper
20845 \begin_layout Enumerate
20846 Generate keys by 
20847 \begin_inset Flex Code
20848 status collapsed
20849
20850 \begin_layout Plain Layout
20851 puttygen
20852 \end_layout
20853
20854 \end_inset
20855
20856 .
20857  Save your private .ppk key file and put the public one on the server side.
20858  If the SVN server runs on Linux, note that the format of the public key
20859  is not compatible with Linux openssh and you will need to direcly copy-paste
20860  the key from the “
20861 \emph on
20862 Public key for pasting into OpenSSH authorized_keys file
20863 \emph default
20864 :” edit field into the server's 
20865 \begin_inset Flex Code
20866 status collapsed
20867
20868 \begin_layout Plain Layout
20869 ~/.ssh/authorized_keys
20870 \end_layout
20871
20872 \end_inset
20873
20874  / 
20875 \begin_inset Flex Code
20876 status collapsed
20877
20878 \begin_layout Plain Layout
20879 authorized_keys2
20880 \end_layout
20881
20882 \end_inset
20883
20884  file.
20885 \end_layout
20886
20887 \begin_layout Enumerate
20888 Get the Putty's 
20889 \begin_inset Flex Code
20890 status collapsed
20891
20892 \begin_layout Plain Layout
20893 plink
20894 \end_layout
20895
20896 \end_inset
20897
20898 .
20899  In the SVN config file
20900 \begin_inset Foot
20901 status collapsed
20902
20903 \begin_layout Plain Layout
20904 Exact path depends on Windows version, usually somewhere around 
20905 \begin_inset Flex Code
20906 status collapsed
20907
20908 \begin_layout Plain Layout
20909 c:
20910 \backslash
20911 Documents and Settings
20912 \backslash
20913 user
20914 \backslash
20915 Application Data
20916 \backslash
20917 Subversion
20918 \backslash
20919 config
20920 \end_layout
20921
20922 \end_inset
20923
20924  / 
20925 \begin_inset Flex Code
20926 status collapsed
20927
20928 \begin_layout Plain Layout
20929 AppData
20930 \backslash
20931 Roaming
20932 \backslash
20933 Subversion
20934 \end_layout
20935
20936 \end_inset
20937
20938 .
20939 \end_layout
20940
20941 \end_inset
20942
20943 , section [tunnels], setup ssh command, e.g.
20944  
20945 \begin_inset Flex Code
20946 status collapsed
20947
20948 \begin_layout Plain Layout
20949 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20950 \end_layout
20951
20952 \end_inset
20953
20954 .
20955 \begin_inset Foot
20956 status collapsed
20957
20958 \begin_layout Plain Layout
20959 It will usually take a lot of time to get exact command right and it depends
20960  on many things.
20961  For example do not have some remote server saved as a default session in
20962  Putty etc.
20963  If things fail, try to connect via plink without SVN first.
20964 \end_layout
20965
20966 \end_inset
20967
20968
20969 \end_layout
20970
20971 \end_deeper
20972 \begin_layout Enumerate
20973 Checkout the SVN archive, e.g.
20974  
20975 \begin_inset Flex Code
20976 status collapsed
20977
20978 \begin_layout Plain Layout
20979 svn co svn+ssh://user@server/repository_path
20980 \end_layout
20981
20982 \end_inset
20983
20984 .
20985 \end_layout
20986
20987 \begin_layout Subsubsection
20988 End-of-Line Conversions
20989 \end_layout
20990
20991 \begin_layout Standard
20992 When the collaborators are mixing Linux and Windows environments, LyX will
20993  use different line endings inside the .lyx files.
20994  This is not a problem as far as LyX functionality is concerned, but the
20995  commit diffs will be huge and merge-conflicts prone.
20996  Fortunately SVN itself knows
20997 \begin_inset Foot
20998 status collapsed
20999
21000 \begin_layout Plain Layout
21001 \begin_inset Flex URL
21002 status collapsed
21003
21004 \begin_layout Plain Layout
21005
21006 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21007 \end_layout
21008
21009 \end_inset
21010
21011
21012 \end_layout
21013
21014 \end_inset
21015
21016  how to deal with CR/LF problems when switching .lyx files to the 
21017 \begin_inset Flex Code
21018 status collapsed
21019
21020 \begin_layout Plain Layout
21021 native
21022 \end_layout
21023
21024 \end_inset
21025
21026  mode.
21027 \begin_inset Foot
21028 status collapsed
21029
21030 \begin_layout Plain Layout
21031 For the lazy guys: 
21032 \begin_inset Flex Code
21033 status collapsed
21034
21035 \begin_layout Plain Layout
21036 svn propset svn:eol-style native FILE_NAME
21037 \end_layout
21038
21039 \end_inset
21040
21041
21042 \end_layout
21043
21044 \end_inset
21045
21046
21047 \end_layout
21048
21049 \begin_layout Subsection
21050 Further tuning
21051 \end_layout
21052
21053 \begin_layout Standard
21054 With the recent addition of the vc-command function LyX power users are
21055  allowed to create their own commands for revision control.
21056 \end_layout
21057
21058 \begin_layout Standard
21059 As an example you can see how two TortoiseSVN commands could be integrated
21060  directly:
21061 \end_layout
21062
21063 \begin_layout Description
21064 Commit: 
21065 \begin_inset Flex Code
21066 status collapsed
21067
21068 \begin_layout Plain Layout
21069 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21070 \end_layout
21071
21072 \end_inset
21073
21074
21075 \end_layout
21076
21077 \begin_layout Description
21078 Revert: 
21079 \begin_inset Flex Code
21080 status collapsed
21081
21082 \begin_layout Plain Layout
21083 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21084 \end_layout
21085
21086 \end_inset
21087
21088
21089 \end_layout
21090
21091 \begin_layout Subsection
21092 Version control and Document comparison
21093 \end_layout
21094
21095 \begin_layout Standard
21096 One of the typical uses of version control is to inspect the changes between
21097  revisions, usually by creating 
21098 \begin_inset Flex Code
21099 status collapsed
21100
21101 \begin_layout Plain Layout
21102 diff
21103 \end_layout
21104
21105 \end_inset
21106
21107  dumps.
21108  While this is useful for plain text files, it is much less useful in the
21109  case of LyX files, which have more a complicated structure.
21110  Hence we provide binding to the Document comparison feature.
21111  There are two ways of calling this feature - either by direct call of 
21112 \begin_inset Flex Code
21113 status collapsed
21114
21115 \begin_layout Plain Layout
21116 VC_COMPARE
21117 \end_layout
21118
21119 \end_inset
21120
21121  LyX function (for details see LyX functions manual) or by icon/menu item
21122  
21123 \begin_inset Flex MenuItem
21124 status collapsed
21125
21126 \begin_layout Plain Layout
21127 Compare with older revision...
21128 \end_layout
21129
21130 \end_inset
21131
21132 .
21133  One can either compare two chosen revisions of the document or he can simply
21134  compare the current version of edited text with older revisions (where
21135  '
21136 \begin_inset Flex MenuItem
21137 status collapsed
21138
21139 \begin_layout Plain Layout
21140 0
21141 \end_layout
21142
21143 \end_inset
21144
21145 ' revisions back means comparison of the edited file with last commited
21146  revision).
21147  
21148 \end_layout
21149
21150 \begin_layout Standard
21151 This feature is supported for SVN and RCS though due to the more complicated
21152  versioning scheme of RCS there is a constraint -- when addressing the revisions
21153  in dialog, numbers always point to the last number in RCS revision number,
21154  i.e.
21155  '35' in '1.2.35'.
21156 \end_layout
21157
21158 \begin_layout Section
21159 Literate Programming
21160 \end_layout
21161
21162 \begin_layout Standard
21163 Updated by 
21164 \noun on
21165 Kayvan Sylvan 
21166 \noun default
21167 (kayvan@sylvan.com)
21168 \noun on
21169
21170 \noun default
21171 original documentation written by 
21172 \noun on
21173 Edmar Wienskoski Jr.
21174
21175 \noun default
21176  (edmar-w-jr@technologist.com)
21177 \end_layout
21178
21179 \begin_layout Subsection
21180 Introduction
21181 \end_layout
21182
21183 \begin_layout Standard
21184 The main purpose of this documentation is to show you how to use LyX for
21185  literate programming, where it is assumed that you are familiar with this
21186  programming technique, and know what 
21187 \begin_inset Quotes eld
21188 \end_inset
21189
21190 tangling
21191 \begin_inset Quotes erd
21192 \end_inset
21193
21194  and 
21195 \begin_inset Quotes eld
21196 \end_inset
21197
21198 weaving
21199 \begin_inset Quotes erd
21200 \end_inset
21201
21202  means.
21203  If that is not the case, please follow the web links provided in the following
21204  sections.
21205  There is a lot of good documentation out there covering old development
21206  history to the latest tools tips.
21207 \end_layout
21208
21209 \begin_layout Standard
21210 It is also assumed that you are familiar with LyX itself to a point that
21211  you are comfortable changing your LyX preferences, and X resources file.
21212  If that is not the case please refer to other LyX documentation to cover
21213  your specific needs.
21214 \end_layout
21215
21216 \begin_layout Subsection
21217 Literate Programming
21218 \end_layout
21219
21220 \begin_layout Standard
21221 From the Literate Programming FAQ: 
21222 \end_layout
21223
21224 \begin_layout Quotation
21225 Literate programming is the combination of documentation and source together
21226  in a fashion suited for reading by human beings.
21227  In fact, literate programs should be enjoyable reading, even inviting!
21228  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21229  and documentation in a single file.
21230  Literate programming tools then parse the file to produce either readable
21231  documentation or compilable source.
21232  The WEB style of literate programming was created by D.
21233 \begin_inset space \thinspace{}
21234 \end_inset
21235
21236 E.
21237  Knuth during the development of his TeX typesetting software.
21238  
21239 \end_layout
21240
21241 \begin_layout Standard
21242 Another excerpt says:
21243 \end_layout
21244
21245 \begin_layout Quotation
21246
21247 \emph on
21248 How is literate programming different from verbose commenting?
21249 \end_layout
21250
21251 \begin_layout Quotation
21252 There are three distinguishing characteristics.
21253  In order of importance, they are: 
21254 \end_layout
21255
21256 \begin_deeper
21257 \begin_layout Itemize
21258 flexible order of elaboration 
21259 \end_layout
21260
21261 \begin_layout Itemize
21262 automatic support for browsing 
21263 \end_layout
21264
21265 \begin_layout Itemize
21266 typeset documentation, especially diagrams and mathematics 
21267 \end_layout
21268
21269 \end_deeper
21270 \begin_layout Standard
21271 Now that I sparked your curiosity, take a look in the references.
21272 \end_layout
21273
21274 \begin_layout Subsubsection
21275 References
21276 \end_layout
21277
21278 \begin_layout Standard
21279 The complete Literate Programming FAQ can be found at:
21280 \end_layout
21281
21282 \begin_layout Quote
21283 Literate Programming FAQ 
21284 \begin_inset Flex URL
21285 status collapsed
21286
21287 \begin_layout Plain Layout
21288
21289 http://www.literateprogramming.com/lpfaq.pdf
21290 \end_layout
21291
21292 \end_inset
21293
21294
21295 \end_layout
21296
21297 \begin_layout Standard
21298 The FAQ lists 23 (twenty three!) different literate programming tools.
21299  Where some are specialized or 
21300 \begin_inset Quotes eld
21301 \end_inset
21302
21303 tailored
21304 \begin_inset Quotes erd
21305 \end_inset
21306
21307  for particular programming languages, while other have general scope.
21308  I selected 
21309 \noun on
21310 Noweb
21311 \noun default
21312  for my own use for several reasons:
21313 \end_layout
21314
21315 \begin_layout Itemize
21316 It can generate the documentation either in LaTeX or HTML.
21317 \end_layout
21318
21319 \begin_layout Itemize
21320 It has a open architecture, i.
21321 \begin_inset space \thinspace{}
21322 \end_inset
21323
21324 e.
21325 \begin_inset space \space{}
21326 \end_inset
21327
21328 it is easy to plug in new filters and to perform special processing that
21329  you may need.
21330  
21331 \end_layout
21332
21333 \begin_layout Itemize
21334 There is a good selection of filters available already (the HTML is one
21335  of them).
21336 \end_layout
21337
21338 \begin_layout Itemize
21339 It is free.
21340 \end_layout
21341
21342 \begin_layout Standard
21343 The Noweb web page can be found at: 
21344 \end_layout
21345
21346 \begin_layout Quote
21347 Noweb home page 
21348 \begin_inset Flex URL
21349 status collapsed
21350
21351 \begin_layout Plain Layout
21352
21353 http://www.cs.virginia.edu/~nr/noweb/
21354 \end_layout
21355
21356 \end_inset
21357
21358
21359 \end_layout
21360
21361 \begin_layout Standard
21362 Starting from there you can reach many other interesting links and even
21363  some literate program examples.
21364 \end_layout
21365
21366 \begin_layout Subsection
21367 LyX and Literate Programming
21368 \end_layout
21369
21370 \begin_layout Standard
21371 The LyX support for Literate Programming is provided by using the generic
21372  LyX converters mechanism.
21373  This support is provided in a 
21374 \begin_inset Quotes eld
21375 \end_inset
21376
21377 Noweb independent
21378 \begin_inset Quotes erd
21379 \end_inset
21380
21381  way, i.
21382 \begin_inset space \thinspace{}
21383 \end_inset
21384
21385 e.
21386 \begin_inset space \space{}
21387 \end_inset
21388
21389 you will be able to use this new LyX feature with some other literate programmin
21390 g tool of your choice by just changing your LyX preferences.
21391 \end_layout
21392
21393 \begin_layout Subsubsection
21394 Generating documents and code (weaving and tangling)
21395 \end_layout
21396
21397 \begin_layout Paragraph
21398 Selecting the document class
21399 \end_layout
21400
21401 \begin_layout Standard
21402 If you have installed Noweb and LyX successfully, whenever you open a new
21403  document or try to change the document class of an existing one, you will
21404  find that there are three new document classes available:
21405 \end_layout
21406
21407 \begin_layout Itemize
21408 Article (Noweb)
21409 \end_layout
21410
21411 \begin_layout Itemize
21412 Book (Noweb)
21413 \end_layout
21414
21415 \begin_layout Itemize
21416 Report (Noweb)
21417 \end_layout
21418
21419 \begin_layout Standard
21420 You must select one of them to create your literate documents from.
21421  
21422 \end_layout
21423
21424 \begin_layout Standard
21425 Note that literate documents are not limited to these three classes.
21426  New classes can be generated from other styles like letter or in combination
21427  with other class variations like Article (AMS).
21428  If you have special needs that cannot be covered by one of the existing
21429  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21430  will arrange to insert a new entry, or teach you how to do it.
21431 \begin_inset Foot
21432 status collapsed
21433
21434 \begin_layout Plain Layout
21435 It is very simple, it involves the creation of a file with four lines, and
21436  re-running of the auto configuration.
21437 \end_layout
21438
21439 \end_inset
21440
21441  Moreover, if you use a literate tool other than Noweb you may need to create
21442  a new set of document classes for it.
21443 \end_layout
21444
21445 \begin_layout Paragraph
21446 Typing code in
21447 \end_layout
21448
21449 \begin_layout Standard
21450 LyX enables you to write code with a layout named 
21451 \noun on
21452 Scrap
21453 \noun default
21454 .
21455 \begin_inset Foot
21456 status collapsed
21457
21458 \begin_layout Plain Layout
21459 The equivalent Noweb term is 
21460 \begin_inset Quotes eld
21461 \end_inset
21462
21463 Chunk
21464 \begin_inset Quotes erd
21465 \end_inset
21466
21467 .
21468  For historical reasons, I got used to the term 
21469 \begin_inset Quotes eld
21470 \end_inset
21471
21472 scrap
21473 \begin_inset Quotes erd
21474 \end_inset
21475
21476  introduced by other literate tool named Nuweb, which I used for many years
21477  before rendering myself to Noweb.
21478 \end_layout
21479
21480 \end_inset
21481
21482  Noweb delimits scraps like this:
21483 \end_layout
21484
21485 \begin_layout LyX-Code
21486 <<My scrap>>=
21487 \end_layout
21488
21489 \begin_layout LyX-Code
21490   code
21491 \end_layout
21492
21493 \begin_layout LyX-Code
21494   more code
21495 \end_layout
21496
21497 \begin_layout LyX-Code
21498   even more code
21499 \end_layout
21500
21501 \begin_layout LyX-Code
21502   @
21503 \end_layout
21504
21505 \begin_layout Standard
21506 The problem is that whatever is written in between the << and the 
21507 \family typewriter
21508 @
21509 \family default
21510  must be taken literally, i.
21511 \begin_inset space \thinspace{}
21512 \end_inset
21513
21514 e.
21515 \begin_inset space \space{}
21516 \end_inset
21517
21518 LyX should be prevented from making any special interpretation of what has
21519  been written.
21520  This is handled by a special layout named Scrap, that works like a normal
21521  paragraph but has a free spacing capability.
21522 \end_layout
21523
21524 \begin_layout Standard
21525 The down side of the Scrap paragraph layout is that consecutive paragraphs
21526  of code will be spaced with one empty line in the source code and also
21527  in the printed documentation.
21528  The work around is to enter each line of code within a single Scrap, with
21529  a newline (ctrl-return).
21530  The example above will look like this:
21531 \begin_inset Foot
21532 status collapsed
21533
21534 \begin_layout Plain Layout
21535 If you have a printed version of this document you will not see any difference
21536  between the previous example and this one.
21537 \end_layout
21538
21539 \end_inset
21540
21541
21542 \end_layout
21543
21544 \begin_layout LyX-Code
21545 <<My scrap>>=
21546 \begin_inset Newline newline
21547 \end_inset
21548
21549   code
21550 \begin_inset Newline newline
21551 \end_inset
21552
21553   more code
21554 \begin_inset Newline newline
21555 \end_inset
21556
21557   even more code
21558 \begin_inset Newline newline
21559 \end_inset
21560
21561   @
21562 \end_layout
21563
21564 \begin_layout Standard
21565 This layout works fine.
21566  The only real inconvenience is that you have to type ctrl-return instead
21567  of a plain return.
21568 \begin_inset Foot
21569 status collapsed
21570
21571 \begin_layout Plain Layout
21572 It is in my list of 
21573 \begin_inset Quotes eld
21574 \end_inset
21575
21576 improvements
21577 \begin_inset Quotes erd
21578 \end_inset
21579
21580  to fix that.
21581 \end_layout
21582
21583 \end_inset
21584
21585
21586 \end_layout
21587
21588 \begin_layout Standard
21589 As a special note, you can also use the 
21590 \begin_inset Quotes eld
21591 \end_inset
21592
21593 %def
21594 \begin_inset Quotes erd
21595 \end_inset
21596
21597  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21598 rence:
21599 \end_layout
21600
21601 \begin_layout LyX-Code
21602 <<My scrap>>=
21603 \begin_inset Newline newline
21604 \end_inset
21605
21606   def some_function(args):
21607 \begin_inset Newline newline
21608 \end_inset
21609
21610     "This is the doc string for this function."
21611 \begin_inset Newline newline
21612 \end_inset
21613
21614     print "My args: ", args
21615 \end_layout
21616
21617 \begin_layout LyX-Code
21618 @ %def some_function
21619 \end_layout
21620
21621 \begin_layout Standard
21622 For an example of this usage and the resulting cross-reference output, look
21623  at the Literate python program in 
21624 \emph on
21625 LIBDIR/examples/listerrors.lyx
21626 \emph default
21627  which should make this all clear.
21628 \end_layout
21629
21630 \begin_layout Paragraph
21631 Generating the documentation
21632 \end_layout
21633
21634 \begin_layout Standard
21635 At this point you already have a new document file with a proper document
21636  class, and with some code and text on it.
21637  How do I print it? The answer is simple, you select 
21638 \family sans
21639 View\SpecialChar \menuseparator
21640 DVI,
21641 \family default
21642  etc.
21643  Just like you would do for a plain document.
21644  No special procedure is required.
21645 \end_layout
21646
21647 \begin_layout Standard
21648 To help orientate you, I will now explain what happens inside LyX:
21649 \end_layout
21650
21651 \begin_layout Enumerate
21652 When the 
21653 \family sans
21654 Update\SpecialChar \menuseparator
21655 DVI
21656 \family default
21657  menu option is chosen, a LaTeX file is generated.
21658  
21659 \end_layout
21660
21661 \begin_deeper
21662 \begin_layout Standard
21663 If the document is of any literate class the generated file will be named
21664  with an extension name defined by the 
21665 \begin_inset Quotes eld
21666 \end_inset
21667
21668 literate
21669 \begin_inset Quotes erd
21670 \end_inset
21671
21672  format (defined in the Preferences panel), otherwise the file will have
21673  the usual 
21674 \family typewriter
21675 .tex
21676 \family default
21677  extension.
21678 \end_layout
21679
21680 \end_deeper
21681 \begin_layout Enumerate
21682 Note that the only difference so far is in the name of the file, no special
21683  processing is required by LyX.
21684  Given that you formatted the code using the Scrap layout that, by itself,
21685  takes care of the business.
21686 \end_layout
21687
21688 \begin_layout Enumerate
21689 If the document is of any literate class LyX will then use the internal
21690  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21691 \begin_inset Foot
21692 status collapsed
21693
21694 \begin_layout Plain Layout
21695 The converters are defined in the 
21696 \family sans
21697 Tools\SpecialChar \menuseparator
21698 Preferences
21699 \family default
21700  panel, under the 
21701 \begin_inset Quotes eld
21702 \end_inset
21703
21704 Conversion
21705 \begin_inset Quotes erd
21706 \end_inset
21707
21708  tab.
21709  See section 
21710 \emph on
21711 Converters
21712 \emph default
21713  of the 
21714 \emph on
21715 Customization
21716 \emph default
21717  manual for general information about converters.
21718 \end_layout
21719
21720 \end_inset
21721
21722  to generate the LaTeX file.
21723 \end_layout
21724
21725 \begin_deeper
21726 \begin_layout Standard
21727 Otherwise it will just skip this step.
21728 \end_layout
21729
21730 \end_deeper
21731 \begin_layout Enumerate
21732 Finally, LaTeX is invoked and the regular post processing continues as in
21733  a plain document.
21734 \end_layout
21735
21736 \begin_layout Standard
21737 Independence from a particular 
21738 \begin_inset Quotes eld
21739 \end_inset
21740
21741 literate tool
21742 \begin_inset Quotes erd
21743 \end_inset
21744
21745  is easily achieved by changing the commands that are run by the various
21746  converters.
21747 \end_layout
21748
21749 \begin_layout Paragraph
21750 Generating the code
21751 \end_layout
21752
21753 \begin_layout Standard
21754 When the build menu option is chosen or the corresponding button in the
21755  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21756  Next, LyX invokes the 
21757 \family typewriter
21758 Noweb->Program
21759 \family default
21760  converter.
21761  This converter needs to be defined by the user and is not installed by
21762  default, though the Program format is.
21763  This converter (like any other converter) will have two parts:
21764 \end_layout
21765
21766 \begin_layout Enumerate
21767 The converter program itself.
21768  This program performs the conversion from the one format to the other (in
21769  this case, from the Noweb format to the Program pseudo-format).
21770 \end_layout
21771
21772 \begin_layout Enumerate
21773 The error log parser.
21774  This is a program whose sole purpose is to rewrite error messages in a
21775  format that LyX understands.
21776  This makes it possible for LyX to place error boxes in the right places
21777  in the file buffer.
21778 \end_layout
21779
21780 \begin_layout Standard
21781 The first part, the 
21782 \begin_inset Quotes eld
21783 \end_inset
21784
21785 Converter
21786 \begin_inset Quotes erd
21787 \end_inset
21788
21789  setting, should be set to 
21790 \begin_inset Quotes eld
21791 \end_inset
21792
21793
21794 \family typewriter
21795 build-script $$i
21796 \family default
21797
21798 \begin_inset Quotes erd
21799 \end_inset
21800
21801 .
21802  This basically means that LyX will call 
21803 \begin_inset Quotes eld
21804 \end_inset
21805
21806 build-script
21807 \begin_inset Quotes erd
21808 \end_inset
21809
21810  (a program or script) with the name of the Noweb file (normally a file
21811  in the LyX temp directory).
21812  
21813 \end_layout
21814
21815 \begin_layout Standard
21816 This is an implementation of 
21817 \begin_inset Quotes eld
21818 \end_inset
21819
21820 build-script
21821 \begin_inset Quotes erd
21822 \end_inset
21823
21824  that you can place in a directory on your path:
21825 \end_layout
21826
21827 \begin_layout LyX-Code
21828 #!/bin/sh
21829 \end_layout
21830
21831 \begin_layout LyX-Code
21832 #
21833 \end_layout
21834
21835 \begin_layout LyX-Code
21836 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21837 \end_layout
21838
21839 \begin_layout Standard
21840 The next part of the converter setting is the 
21841 \begin_inset Quotes eld
21842 \end_inset
21843
21844 Flags
21845 \begin_inset Quotes erd
21846 \end_inset
21847
21848  which is to be set to 
21849 \begin_inset Quotes eld
21850 \end_inset
21851
21852
21853 \family typewriter
21854 parselog=listerrors
21855 \family default
21856
21857 \begin_inset Quotes erd
21858 \end_inset
21859
21860 .
21861  This will run any errors that are generated by the 
21862 \begin_inset Quotes eld
21863 \end_inset
21864
21865 build-script
21866 \begin_inset Quotes erd
21867 \end_inset
21868
21869  process through the 
21870 \begin_inset Quotes eld
21871 \end_inset
21872
21873 listerrors
21874 \begin_inset Quotes erd
21875 \end_inset
21876
21877  program.
21878 \end_layout
21879
21880 \begin_layout Standard
21881 The converter code looks in 
21882 \emph on
21883 MYLYXDIR/scripts
21884 \emph default
21885  first, then in 
21886 \emph on
21887 LIBDIR/scripts
21888 \emph default
21889  then on the path for the 
21890 \begin_inset Quotes eld
21891 \end_inset
21892
21893 listerrors
21894 \begin_inset Quotes erd
21895 \end_inset
21896
21897  program.
21898 \end_layout
21899
21900 \begin_layout Standard
21901 The build will normally take place in LyX's temporary directory, so the
21902  files produced by the conversion will be in that directory.
21903  LyX will copy out what it regards as the `main' file, but the 
21904 \family typewriter
21905 Noweb->Program
21906 \family default
21907  conversion may produce several files, and so most of these would then be
21908  deleted when LyX was closed.
21909  The present solution is to use a `copier',
21910 \begin_inset Foot
21911 status collapsed
21912
21913 \begin_layout Plain Layout
21914 See section 
21915 \emph on
21916 Copiers
21917 \emph default
21918  of the 
21919 \emph on
21920 Customization
21921 \emph default
21922  manual for information on these.
21923 \end_layout
21924
21925 \end_inset
21926
21927  in this case, the 
21928 \family typewriter
21929 ext_copy.py
21930 \family default
21931  script in its default mode, so that the entire contents of the temporary
21932  directory is copied.
21933  More will get copied than is needed, to be sure, but nothing will be lost.
21934  If, however, you know what extensions the generated files will have, this
21935  can be improved by using the 
21936 \family typewriter
21937 -e
21938 \family default
21939  option to 
21940 \family typewriter
21941 ext_copy
21942 \family default
21943 .
21944  This option takes a comma-separated list of extensions to copy.
21945  So, for example, if the conversion will generate only files with the extensions
21946  
21947 \family typewriter
21948 .c
21949 \family default
21950  and 
21951 \family typewriter
21952 .h
21953 \family default
21954 , then the correct definition would be:
21955 \end_layout
21956
21957 \begin_layout LyX-Code
21958 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21959 \end_layout
21960
21961 \begin_layout Standard
21962 The result will be that only files with these two extensions will be copied
21963  out.
21964 \end_layout
21965
21966 \begin_layout Paragraph
21967 Build instructions in the document
21968 \end_layout
21969
21970 \begin_layout Standard
21971 The last piece of the integration between LyX and noweb is the 
21972 \begin_inset Quotes eld
21973 \end_inset
21974
21975 build-script
21976 \begin_inset Quotes erd
21977 \end_inset
21978
21979  scrap.
21980  Generally, the instructions for building your program should be embedded
21981  in a scrap of its own.
21982  The noweb-specific 
21983 \begin_inset Quotes eld
21984 \end_inset
21985
21986 build-script
21987 \begin_inset Quotes erd
21988 \end_inset
21989
21990  above uses the notangle command to look for this scrap (called 
21991 \begin_inset Quotes eld
21992 \end_inset
21993
21994 build-script
21995 \begin_inset Quotes erd
21996 \end_inset
21997
21998 ) and runs its contents through 
21999 \begin_inset Quotes eld
22000 \end_inset
22001
22002 sh
22003 \begin_inset Quotes erd
22004 \end_inset
22005
22006 .
22007 \end_layout
22008
22009 \begin_layout Standard
22010 Typically, such a scrap would look something like this:
22011 \end_layout
22012
22013 \begin_layout LyX-Code
22014 <<build-script>>=
22015 \begin_inset Newline newline
22016 \end_inset
22017
22018 #!/bin/sh
22019 \begin_inset Newline newline
22020 \end_inset
22021
22022
22023 \begin_inset Newline newline
22024 \end_inset
22025
22026 if [ -z "${NOWEB_SOURCE}" ]
22027 \begin_inset Newline newline
22028 \end_inset
22029
22030 then
22031 \begin_inset Newline newline
22032 \end_inset
22033
22034   NOWEB_SOURCE=myfile.nw
22035 \begin_inset Newline newline
22036 \end_inset
22037
22038 fi
22039 \begin_inset Newline newline
22040 \end_inset
22041
22042 [...
22043  code to extract files ...]
22044 \begin_inset Newline newline
22045 \end_inset
22046
22047 [...
22048  code to compile files ...]
22049 \begin_inset Newline newline
22050 \end_inset
22051
22052 @
22053 \end_layout
22054
22055 \begin_layout Standard
22056 Look in 
22057 \emph on
22058 LIBDIR/examples/listerrors.lyx
22059 \emph default
22060  or in 
22061 \emph on
22062 LIBDIR/examples/Literate.lyx
22063 \emph default
22064  which implement two versions of the 
22065 \begin_inset Quotes eld
22066 \end_inset
22067
22068 listerrors
22069 \begin_inset Quotes erd
22070 \end_inset
22071
22072  program for some illustrations of how all of these pieces go together or
22073  in 
22074 \emph on
22075 LIBDIR/examples/noweb2lyx.lyx.
22076
22077 \emph default
22078  Interestingly, these three files show off the language-indepence of the
22079  LyX literate programming support since they are written in Python, C and
22080  Perl respectively.
22081 \end_layout
22082
22083 \begin_layout Subsubsection
22084 Configuring LyX
22085 \end_layout
22086
22087 \begin_layout Standard
22088 All the Literate Programming support is configured by the 
22089 \family sans
22090 Tools\SpecialChar \menuseparator
22091 Preferences
22092 \family default
22093  panel in the 
22094 \begin_inset Quotes eld
22095 \end_inset
22096
22097 Conversion
22098 \begin_inset Quotes erd
22099 \end_inset
22100
22101  tab.
22102  The important parts are:
22103 \end_layout
22104
22105 \begin_layout Description
22106 the
22107 \begin_inset space ~
22108 \end_inset
22109
22110
22111 \begin_inset Quotes eld
22112 \end_inset
22113
22114 literate
22115 \begin_inset Quotes erd
22116 \end_inset
22117
22118
22119 \begin_inset space ~
22120 \end_inset
22121
22122 format Set up via the Formats tab, this is where the Noweb-specific pieces
22123  are set up.
22124  The 
22125 \family sans
22126 GUI Name
22127 \family default
22128  is set to 
22129 \family typewriter
22130 NoWeb
22131 \family default
22132 , the file extension is set to 
22133 \family typewriter
22134 .nw
22135 \family default
22136 .
22137  This tells LyX to create a file with a 
22138 \family typewriter
22139 .nw
22140 \family default
22141  extension in the first step of the conversion process.
22142 \end_layout
22143
22144 \begin_layout Description
22145 the
22146 \begin_inset space ~
22147 \end_inset
22148
22149
22150 \family sans
22151 Program
22152 \family default
22153
22154 \begin_inset space ~
22155 \end_inset
22156
22157 format This is an empty format whose sole purpose is to be the endpoint
22158  of a conversion (which then allows us to set up a converter for it).
22159 \end_layout
22160
22161 \begin_layout Description
22162
22163 \family sans
22164 NoWeb
22165 \family default
22166 ->
22167 \family sans
22168 LaTeX
22169 \family default
22170  This converter performs the 
22171 \begin_inset Quotes eld
22172 \end_inset
22173
22174 weaving
22175 \begin_inset Quotes erd
22176 \end_inset
22177
22178  of the literate document.
22179  For Noweb, it is set to 
22180 \begin_inset Quotes eld
22181 \end_inset
22182
22183
22184 \family typewriter
22185 noweave -delay -index $$i > $$o
22186 \family default
22187
22188 \begin_inset Quotes erd
22189 \end_inset
22190
22191
22192 \end_layout
22193
22194 \begin_layout Description
22195
22196 \family sans
22197 NoWeb
22198 \family default
22199 ->
22200 \family sans
22201 Program
22202 \family default
22203  This performs the 
22204 \begin_inset Quotes eld
22205 \end_inset
22206
22207 tangling step
22208 \begin_inset Quotes erd
22209 \end_inset
22210
22211 .
22212  As stated above, the Converter is set to 
22213 \begin_inset Quotes eld
22214 \end_inset
22215
22216
22217 \family typewriter
22218 build-script $$i
22219 \family default
22220
22221 \begin_inset Quotes erd
22222 \end_inset
22223
22224 , with Flags set to 
22225 \begin_inset Quotes eld
22226 \end_inset
22227
22228
22229 \family typewriter
22230 originaldir,parselog=listerrors
22231 \family default
22232
22233 \begin_inset Quotes erd
22234 \end_inset
22235
22236 .
22237 \end_layout
22238
22239 \begin_layout Subsubsection
22240 Debug extensions
22241 \end_layout
22242
22243 \begin_layout Standard
22244 There is also a new function implemented in the LyX server, the 
22245 \begin_inset Quotes eld
22246 \end_inset
22247
22248 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22249  
22250 \end_layout
22251
22252 \begin_layout Standard
22253 When debugging code with ddd/gdb, it is possible to invoke a text editor
22254  at the current execution position with a single key stroke.
22255  The default ddd configuration for that is shift-ctrl-V.
22256  It happens that you can define the editor command line invocation in ddd
22257  by accessing the 
22258 \family sans
22259 Edit\SpecialChar \menuseparator
22260 Preferences\SpecialChar \menuseparator
22261 Helpers
22262 \family default
22263  dialog and changing the "Edit Sources" entry.
22264 \end_layout
22265
22266 \begin_layout Standard
22267 I take advantage of the new created LyX server function and this ddd feature,
22268  and set 
22269 \begin_inset Quotes eld
22270 \end_inset
22271
22272 Edit Sources
22273 \begin_inset Quotes erd
22274 \end_inset
22275
22276  to:
22277 \end_layout
22278
22279 \begin_layout LyX-Code
22280 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22281 \end_layout
22282
22283 \begin_layout Standard
22284 With this, whenever you are using ddd and find a point in the program that
22285  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22286  ddd you forward this information to LyX through the LyX server and then
22287  the LyX window will show the same file with the cursor at the same position
22288  ddd was pointing to.
22289  No more guessing or long scrolling to locate a point in the program back
22290  from debugging !
22291 \end_layout
22292
22293 \begin_layout Standard
22294 Note however that you must enable the LyX server to get this feature working
22295  (it is disabled by default).
22296  You can enable it in 
22297 \family sans
22298 Preferences
22299 \family default
22300  (tabs 
22301 \family sans
22302 Inputs
22303 \family default
22304
22305 \family sans
22306 Paths
22307 \family default
22308 ) by entering in the 
22309 \family sans
22310 LyXserver pipe
22311 \family default
22312  a path like 
22313 \begin_inset Quotes eld
22314 \end_inset
22315
22316
22317 \family typewriter
22318 /home/<your-home-directory>/.lyx/lyxpipe
22319 \family default
22320
22321 \begin_inset Quotes erd
22322 \end_inset
22323
22324
22325 \end_layout
22326
22327 \begin_layout Standard
22328 Read the LyX server documentation in the 
22329 \emph on
22330 Customization Manual
22331 \emph default
22332  for further information.
22333 \end_layout
22334
22335 \begin_layout Subsubsection
22336 Toolbar extensions
22337 \end_layout
22338
22339 \begin_layout Standard
22340 There are six new buttons that can be added to your LyX toolbar.
22341  Five of these buttons are short cuts to layout styles: 
22342 \family sans
22343 Standard
22344 \family default
22345
22346 \family sans
22347 Section
22348 \family default
22349
22350 \family sans
22351 LaTeX
22352 \family default
22353
22354 \family sans
22355 LyX-Code
22356 \family default
22357 , and 
22358 \family sans
22359 Scrap
22360 \family default
22361 .
22362  The last one is a short cut to the 
22363 \begin_inset Quotes eld
22364 \end_inset
22365
22366 Build Program
22367 \begin_inset Quotes erd
22368 \end_inset
22369
22370  File menu entry.
22371  
22372 \end_layout
22373
22374 \begin_layout Standard
22375 LyX has a range of buttons that are available for tool bar customization.
22376  In my toolbar I like to combine the six short cuts above with two more:
22377  One for 
22378 \family sans
22379 View
22380 \family default
22381 \SpecialChar \menuseparator
22382
22383 \family sans
22384 Update
22385 \family default
22386 \SpecialChar \menuseparator
22387
22388 \family sans
22389 DVI
22390 \family default
22391  and the other for 
22392 \family sans
22393 View\SpecialChar \menuseparator
22394 DVI
22395 \family default
22396  File menu entries.
22397  Here is how it looks like:
22398 \end_layout
22399
22400 \begin_layout LyX-Code
22401 Toolbar
22402 \end_layout
22403
22404 \begin_layout LyX-Code
22405   Layouts
22406 \end_layout
22407
22408 \begin_layout LyX-Code
22409   Icon "layout Standard"
22410 \end_layout
22411
22412 \begin_layout LyX-Code
22413   Icon "layout Section"
22414 \end_layout
22415
22416 \begin_layout LyX-Code
22417   Icon "layout LaTeX"
22418 \end_layout
22419
22420 \begin_layout LyX-Code
22421   Icon "layout LyX-Code"
22422 \end_layout
22423
22424 \begin_layout LyX-Code
22425   Icon "layout Scrap"
22426 \end_layout
22427
22428 \begin_layout LyX-Code
22429   Separator
22430 \end_layout
22431
22432 \begin_layout LyX-Code
22433   Icon "buffer-view"
22434 \end_layout
22435
22436 \begin_layout LyX-Code
22437   Icon "buffer-typeset"
22438 \end_layout
22439
22440 \begin_layout LyX-Code
22441   Icon "build-program"
22442 \end_layout
22443
22444 \begin_layout LyX-Code
22445   Separator
22446 \end_layout
22447
22448 \begin_layout LyX-Code
22449 .
22450 \end_layout
22451
22452 \begin_layout LyX-Code
22453 .
22454 \end_layout
22455
22456 \begin_layout LyX-Code
22457 .
22458 \end_layout
22459
22460 \begin_layout LyX-Code
22461 End
22462 \end_layout
22463
22464 \begin_layout Subsubsection
22465 Colors customization
22466 \end_layout
22467
22468 \begin_layout Standard
22469 There are a number of colors in LyX that can be customized in 
22470 \family sans
22471 Preferences
22472 \family default
22473 .
22474  One of the things that bothers people is the LaTeX font color.
22475  The default color is red, since the scraps uses LaTeX font, and there is
22476  a lot of scraps in literate documents, you may get tired of seeing everything
22477  in red.
22478  You can change it by going to the tabs 
22479 \family sans
22480 Look&Feel
22481 \family default
22482
22483 \family sans
22484 Colors.
22485 \end_layout
22486
22487 \begin_layout Standard
22488 The next thing is the visible presence of the newline character in the screen.
22489  You can choose the color of this particular character and make it blend
22490  in the background.
22491  I recommend you choosing a color that is close to the background but not
22492  equal, that way you still can see it is there, but it is not bothering
22493  you anymore.
22494  
22495 \end_layout
22496
22497 \begin_layout Chapter
22498 Special features
22499 \end_layout
22500
22501 \begin_layout Standard
22502 You can do everything with LyX that you can do with LaTeX.
22503  However, LyX cannot support every LaTeX feature directly.
22504  But you can always use TeX Code.
22505  This chapter shows you some more special things you might want to use.
22506  For other special things you can do with figures, tables, floats, boxes
22507  and notes, have a look at the 
22508 \emph on
22509 Embedded
22510 \begin_inset space ~
22511 \end_inset
22512
22513 Objects
22514 \emph default
22515  manual.
22516 \end_layout
22517
22518 \begin_layout Section
22519 Multiple Text Columns
22520 \end_layout
22521
22522 \begin_layout Standard
22523 This feature is independent of the option 
22524 \family sans
22525 Two-column document
22526 \family default
22527  in the document settings under 
22528 \family sans
22529 Text Layout
22530 \family default
22531 .
22532  If you want to have 2
22533 \begin_inset space ~
22534 \end_inset
22535
22536 columns for the whole document, it is recommended to use the 
22537 \family sans
22538 Two-column document
22539 \family default
22540  option.
22541  For all other cases use this feature.
22542 \end_layout
22543
22544 \begin_layout Standard
22545 To use multiple text columns in your document, you have to load the module
22546  
22547 \family sans
22548 Multiple Columns
22549 \family default
22550  (menu 
22551 \family sans
22552 Document\SpecialChar \menuseparator
22553 Settings\SpecialChar \menuseparator
22554 Modules
22555 \family default
22556 ) and must have the LaTeX-package 
22557 \series bold
22558 multicol
22559 \series default
22560
22561 \begin_inset Index idx
22562 status collapsed
22563
22564 \begin_layout Plain Layout
22565 LaTeX-packages ! multicol
22566 \end_layout
22567
22568 \end_inset
22569
22570  installed.
22571 \end_layout
22572
22573 \begin_layout Standard
22574 Footnotes within multiple columns will be placed at the bottom of the page
22575  and not under each column.
22576  Within the different columns you can use everything, with the limitation
22577  that for floats you need to use the float option 
22578 \family sans
22579 Span columns
22580 \family default
22581 .
22582 \end_layout
22583
22584 \begin_layout Subsection
22585 Basics
22586 \end_layout
22587
22588 \begin_layout Standard
22589 If you want to have 2
22590 \begin_inset space ~
22591 \end_inset
22592
22593 columns in your text, use the style 
22594 \family sans
22595 Begin Multiple Columns
22596 \family default
22597  where the columns should start.
22598  The content of the style is the number of the columns, so in this case
22599  use a 
22600 \begin_inset Quotes eld
22601 \end_inset
22602
22603 2
22604 \begin_inset Quotes erd
22605 \end_inset
22606
22607 .
22608  At the point where the columns should end use the style 
22609 \family sans
22610 End Multiple Columns
22611 \family default
22612  and keep it empty.
22613 \end_layout
22614
22615 \begin_layout Standard
22616 Here is an example:
22617 \end_layout
22618
22619 \begin_layout Begin Multiple Columns
22620 2
22621 \end_layout
22622
22623 \begin_layout Standard
22624 \noindent
22625
22626 \series bold
22627 \size small
22628 The Adventure of the Empty House
22629 \series default
22630
22631 \begin_inset Newline newline
22632 \end_inset
22633
22634 by 
22635 \noun on
22636 Sir Arthur Conan Doyle
22637 \end_layout
22638
22639 \begin_layout Standard
22640
22641 \size small
22642 It was in the spring of the year 1894 that all London was interested, and
22643  the fashionable world dismayed, by the murder of the Honourable Ronald
22644  Adair under most unusual and inexplicable circumstances.
22645  The public has already learned those particulars of the crime which came
22646  out in the police investigation, but a good deal was suppressed upon that
22647  occasion, since the case for the prosecution was so overwhelmingly strong
22648  that it was not necessary to bring forward all the facts.
22649  Only now, at the end of nearly ten years, am I allowed to supply those
22650  missing links which make up the whole of that remarkable chain.
22651  The crime was of interest in itself, but that interest was as nothing to
22652  me compared to the inconceivable sequel, which afforded me the greatest
22653  shock and surprise of any event in my adventurous life.
22654  Even now, after this long interval, I find myself thrilling as I think
22655  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22656 ty which utterly submerged my mind.
22657  Let me say to that public, which has shown some interest in those glimpses
22658  which I have occasionally given them of the thoughts and actions of a very
22659  remarkable man, that they are not to blame me if I have not shared my knowledge
22660  with them, for I should have considered it my first duty to do so, had
22661  I not been barred by a positive prohibition from his own lips, which was
22662  only withdrawn upon the third of last month.
22663 \end_layout
22664
22665 \begin_layout End Multiple Columns
22666
22667 \end_layout
22668
22669 \begin_layout Standard
22670 Here is an example with 3
22671 \begin_inset space ~
22672 \end_inset
22673
22674 columns:
22675 \end_layout
22676
22677 \begin_layout Begin Multiple Columns
22678 3
22679 \end_layout
22680
22681 \begin_layout Standard
22682
22683 \size footnotesize
22684 It can be imagined that my close intimacy with Sherlock Holmes had interested
22685  me deeply in crime, and that after his disappearance I never failed to
22686  read with care the various problems which came before the public.
22687  And I even attempted, more than once, for my own private satisfaction,
22688  to employ his methods in their solution, though with indifferent success.
22689  There was none, however, which appealed to me like this tragedy of Ronald
22690  Adair.
22691  As I read the evidence at the inquest, which led up to a verdict of willful
22692  murder against some person or persons unknown, I realized more clearly
22693  than I had ever done the loss which the community had sustained by the
22694  death of Sherlock Holmes.
22695  There were points about this strange business which would, I was sure,
22696  have specially appealed to him, and the efforts of the police would have
22697  been supplemented, or more probably anticipated, by the trained observation
22698  and the alert mind of the first criminal agent in Europe.
22699  All day, as I drove upon my round, I turned over the case in my mind and
22700  found no explanation which appeared to me to be adequate.
22701  At the risk of telling a twice-told tale, I will recapitulate the facts
22702  as they were known to the public at the conclusion of the inquest.
22703 \end_layout
22704
22705 \begin_layout End Multiple Columns
22706
22707 \end_layout
22708
22709 \begin_layout Standard
22710 You can have up to 10
22711 \begin_inset space ~
22712 \end_inset
22713
22714 columns if you want to, but that might not be very pleasant for the readers
22715  of your document.
22716 \end_layout
22717
22718 \begin_layout Standard
22719 \begin_inset Newpage newpage
22720 \end_inset
22721
22722
22723 \end_layout
22724
22725 \begin_layout Subsection
22726 Columns inside Columns
22727 \end_layout
22728
22729 \begin_layout Standard
22730 You can also have columns inside columns:
22731 \end_layout
22732
22733 \begin_layout Begin Multiple Columns
22734 2
22735 \end_layout
22736
22737 \begin_layout Standard
22738
22739 \size footnotesize
22740 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22741  at that time governor of one of the Australian colonies.
22742  Adair's mother had returned from Australia to undergo the operation for
22743  cataract, and she, her son Ronald, and her daughter Hilda were living together
22744  at 427 Park Lane.
22745 \end_layout
22746
22747 \begin_layout Begin Multiple Columns
22748 2
22749 \end_layout
22750
22751 \begin_layout Standard
22752
22753 \size footnotesize
22754 The youth moved in the best society–had, so far as was known, no enemies
22755  and no particular vices.
22756  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22757  had been broken off by mutual consent some months before, and there was
22758  no sign that it had left any very profound feeling behind it.
22759  For the rest {sic} the man's life moved in a narrow and conventional circle,
22760  for his habits were quiet and his nature unemotional.
22761  Yet it was upon this easy-going young aristocrat that death came, in most
22762  strange and unexpected form, between the hours of ten and eleven-twenty
22763  on the night of March 30, 1894.
22764 \end_layout
22765
22766 \begin_layout End Multiple Columns
22767
22768 \end_layout
22769
22770 \begin_layout Standard
22771
22772 \size footnotesize
22773 Ronald Adair was fond of cards–playing continually, but never for such stakes
22774  as would hurt him.
22775  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22776  It was shown that, after dinner on the day of his death, he had played
22777  a rubber of whist at the latter club.
22778  He had also played there in the afternoon.
22779
22780 \size default
22781  
22782 \size footnotesize
22783 The evidence of those who had played with him– Mr.
22784  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22785  and that there was a fairly equal fall of the cards.
22786  Adair might have lost five pounds, but not more.
22787  His fortune was a considerable one, and such a loss could not in any way
22788  affect him.
22789  He had played nearly every day at one club or other, but he was a cautious
22790  player, and usually rose a winner.
22791  It came out in evidence that, in partnership with Colonel Moran, he had
22792  actually won as much as four hundred and twenty pounds in a sitting, some
22793  weeks before, from Godfrey Milner and Lord Balmoral.
22794  So much for his recent history as it came out at the inquest.
22795 \end_layout
22796
22797 \begin_layout End Multiple Columns
22798
22799 \end_layout
22800
22801 \begin_layout Subsection
22802 Advanced Examples
22803 \end_layout
22804
22805 \begin_layout Standard
22806 The examples in this section show some more special features of multiple
22807  columns.
22808 \end_layout
22809
22810 \begin_layout Standard
22811 For more features of multiple columns, have a look at the documentation
22812  of the LaTeX-package 
22813 \series bold
22814 multicol
22815 \series default
22816
22817 \begin_inset Index idx
22818 status collapsed
22819
22820 \begin_layout Plain Layout
22821 LaTeX-packages ! multicol
22822 \end_layout
22823
22824 \end_inset
22825
22826
22827 \begin_inset CommandInset citation
22828 LatexCommand cite
22829 key "multicol"
22830
22831 \end_inset
22832
22833 .
22834 \end_layout
22835
22836 \begin_layout Subsubsection
22837 Preface
22838 \end_layout
22839
22840 \begin_layout Standard
22841 To add a preface text for multiple columns, add the command
22842 \end_layout
22843
22844 \begin_layout Standard
22845
22846 \series bold
22847 }[
22848 \end_layout
22849
22850 \begin_layout Standard
22851 as TeX Code behind the number of columns in the
22852 \family sans
22853  Begin Multiple Columns
22854 \family default
22855  style.
22856  Behind the command follows the preface text.
22857  At the end of the style use the command
22858 \end_layout
22859
22860 \begin_layout Standard
22861
22862 \series bold
22863 ]{
22864 \end_layout
22865
22866 \begin_layout Standard
22867 as TeX Code.
22868  An example with some preface text:
22869 \end_layout
22870
22871 \begin_layout Standard
22872 \begin_inset VSpace bigskip
22873 \end_inset
22874
22875
22876 \end_layout
22877
22878 \begin_layout Begin Multiple Columns
22879 2
22880 \begin_inset ERT
22881 status collapsed
22882
22883 \begin_layout Plain Layout
22884
22885 }[
22886 \end_layout
22887
22888 \end_inset
22889
22890 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22891
22892 \begin_inset ERT
22893 status collapsed
22894
22895 \begin_layout Plain Layout
22896
22897 ]{
22898 \end_layout
22899
22900 \end_inset
22901
22902
22903 \end_layout
22904
22905 \begin_layout Standard
22906
22907 \size small
22908 On the evening of the crime, he returned from the club exactly at ten.
22909  His mother and sister were out spending the evening with a relation.
22910  The servant deposed that she heard him enter the front room on the second
22911  floor, generally used as his sitting-room.
22912  She had lit a fire there, and as it smoked she had opened the window.
22913  No sound was heard from the room until eleven-twenty, the hour of the return
22914  of Lady Maynooth and her daughter.
22915  Desiring to say good-night, she attempted to enter her son's room.
22916  The door was locked on the inside, and no answer could be got to their
22917  cries and knocking.
22918  Help was obtained, and the door forced.
22919  The unfortunate young man was found lying near the table.
22920  His head had been horribly mutilated by an expanding revolver bullet, but
22921  no weapon of any sort was to be found in the room.
22922 \end_layout
22923
22924 \begin_layout End Multiple Columns
22925
22926 \end_layout
22927
22928 \begin_layout Standard
22929 You can also use a section heading as the preface if you use a section command
22930  as TeX Code behind the first TeX Code.
22931  For example the command
22932 \end_layout
22933
22934 \begin_layout Standard
22935
22936 \series bold
22937
22938 \backslash
22939 subsection{subsection title}
22940 \end_layout
22941
22942 \begin_layout Standard
22943 creates a subsection.
22944  In this example the preface is a subsubsection:
22945 \end_layout
22946
22947 \begin_layout Begin Multiple Columns
22948 2
22949 \begin_inset ERT
22950 status collapsed
22951
22952 \begin_layout Plain Layout
22953
22954 }[
22955 \end_layout
22956
22957 \end_inset
22958
22959
22960 \begin_inset ERT
22961 status collapsed
22962
22963 \begin_layout Plain Layout
22964
22965
22966 \backslash
22967 subsubsection{
22968 \end_layout
22969
22970 \end_inset
22971
22972 This is a subsubsection heading as a preface
22973 \begin_inset ERT
22974 status collapsed
22975
22976 \begin_layout Plain Layout
22977
22978 }
22979 \end_layout
22980
22981 \end_inset
22982
22983
22984 \begin_inset ERT
22985 status collapsed
22986
22987 \begin_layout Plain Layout
22988
22989 ]{
22990 \end_layout
22991
22992 \end_inset
22993
22994
22995 \end_layout
22996
22997 \begin_layout Standard
22998
22999 \size small
23000 A minute examination of the circumstances served only to make the case more
23001  complex.
23002  In the first place, no reason could be given why the young man should have
23003  fastened the door upon the inside.
23004  There was the possibility that the murderer had done this, and had afterwards
23005  escaped by the window.
23006  The drop was at least twenty feet, however, and a bed of crocuses in full
23007  bloom lay beneath.
23008  Neither the flowers nor the earth showed any sign of having been disturbed,
23009  nor were there any marks upon the narrow strip of grass which separated
23010  the house from the road.
23011  Apparently, therefore, it was the young man himself who had fastened the
23012  door.
23013  But how did he come by his death? No one could have climbed up to the window
23014  without leaving traces.
23015  Suppose a man had fired through the window, he would indeed be a remarkable
23016  shot who could with a revolver inflict so deadly a wound.
23017  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23018  a hundred yards of the house.
23019  No one had heard a shot.
23020 \end_layout
23021
23022 \begin_layout End Multiple Columns
23023
23024 \end_layout
23025
23026 \begin_layout Standard
23027 If there is less vertical space left on the page at the beginning of the
23028  multiple columns than needed for 6
23029 \begin_inset space ~
23030 \end_inset
23031
23032 text lines, a page break will be inserted before the multiple columns.
23033  Depending on the number of lines of the preface text, you might want to
23034  change this value.
23035  It is determined by inserting the command
23036 \end_layout
23037
23038 \begin_layout Standard
23039
23040 \series bold
23041 ][number
23042 \backslash
23043 baselineskip
23044 \end_layout
23045
23046 \begin_layout Standard
23047 as TeX Code behind the preface definition but before the final 
23048 \series bold
23049 ]{
23050 \series default
23051  command.
23052  
23053 \emph on
23054 number
23055 \emph default
23056  is hereby the number of text lines.
23057  In this example the space is set to 7
23058 \begin_inset space ~
23059 \end_inset
23060
23061 text lines:
23062 \end_layout
23063
23064 \begin_layout Begin Multiple Columns
23065 2
23066 \begin_inset ERT
23067 status collapsed
23068
23069 \begin_layout Plain Layout
23070
23071 }[
23072 \end_layout
23073
23074 \end_inset
23075
23076
23077 \begin_inset ERT
23078 status collapsed
23079
23080 \begin_layout Plain Layout
23081
23082
23083 \backslash
23084 subsubsection{
23085 \end_layout
23086
23087 \end_inset
23088
23089 This is the sectioning command
23090 \begin_inset Newline newline
23091 \end_inset
23092
23093 as a preface and
23094 \begin_inset Newline newline
23095 \end_inset
23096
23097 with multiple text lines
23098 \begin_inset ERT
23099 status collapsed
23100
23101 \begin_layout Plain Layout
23102
23103 }
23104 \end_layout
23105
23106 \end_inset
23107
23108
23109 \begin_inset ERT
23110 status collapsed
23111
23112 \begin_layout Plain Layout
23113
23114 ][7
23115 \backslash
23116 baselineskip
23117 \end_layout
23118
23119 \end_inset
23120
23121
23122 \begin_inset ERT
23123 status collapsed
23124
23125 \begin_layout Plain Layout
23126
23127 ]{
23128 \end_layout
23129
23130 \end_inset
23131
23132
23133 \end_layout
23134
23135 \begin_layout Standard
23136
23137 \size small
23138 On the evening of the crime, he returned from the club exactly at ten.
23139  His mother and sister were out spending the evening with a relation.
23140  The servant deposed that she heard him enter the front room on the second
23141  floor, generally used as his sitting-room.
23142  She had lit a fire there, and as it smoked she had opened the window.
23143  No sound was heard from the room until eleven-twenty, the hour of the return
23144  of Lady Maynooth and her daughter.
23145  Desiring to say good-night, she attempted to enter her son's room.
23146  The door was locked on the inside, and no answer could be got to their
23147  cries and knocking.
23148  Help was obtained, and the door forced.
23149  The unfortunate young man was found lying near the table.
23150  His head had been horribly mutilated by an expanding revolver bullet, but
23151  no weapon of any sort was to be found in the room.
23152 \end_layout
23153
23154 \begin_layout End Multiple Columns
23155
23156 \end_layout
23157
23158 \begin_layout Subsubsection
23159 Surrounding Space
23160 \end_layout
23161
23162 \begin_layout Standard
23163 The amount of space before and after multiple columns can be changed by
23164  changing the length 
23165 \series bold
23166
23167 \backslash
23168 multicolsep
23169 \series default
23170 .
23171  For example the command
23172 \end_layout
23173
23174 \begin_layout Standard
23175
23176 \series bold
23177
23178 \backslash
23179 setlength{
23180 \backslash
23181 multicolsep}{3cm}
23182 \end_layout
23183
23184 \begin_layout Standard
23185 in TeX Code changes its value to 3
23186 \begin_inset space \thinspace{}
23187 \end_inset
23188
23189 cm.
23190  The change must be made before the multiple columns' start.
23191  The predefined value is 13
23192 \begin_inset space \thinspace{}
23193 \end_inset
23194
23195 pt.
23196 \end_layout
23197
23198 \begin_layout Standard
23199 For this example 
23200 \series bold
23201
23202 \backslash
23203 multicolsep
23204 \series default
23205  was set to 2.5
23206 \begin_inset space \thinspace{}
23207 \end_inset
23208
23209 cm:
23210 \end_layout
23211
23212 \begin_layout Standard
23213 \begin_inset ERT
23214 status open
23215
23216 \begin_layout Plain Layout
23217
23218
23219 \backslash
23220 setlength{
23221 \backslash
23222 multicolsep}{2.5cm}
23223 \end_layout
23224
23225 \end_inset
23226
23227
23228 \end_layout
23229
23230 \begin_layout Begin Multiple Columns
23231 2
23232 \end_layout
23233
23234 \begin_layout Standard
23235
23236 \size small
23237 All day I turned these facts over in my mind, endeavouring to hit upon some
23238  theory which could reconcile them all, and to find that line of least resistanc
23239 e which my poor friend had declared to be the starting-point of every investigat
23240 ion.
23241  I confess that I made little progress.
23242  In the evening I strolled across the Park, and found myself about six o'clock
23243  at the Oxford Street end of Park Lane.
23244  A group of loafers upon the pavements, all staring up at a particular window,
23245  directed me to the house which I had come to see.
23246  A tall, thin man with coloured glasses, whom I strongly suspected of being
23247  a plain-clothes detective, was pointing out some theory of his own, while
23248  the others crowded round to listen to what he said.
23249  I got as near him as I could, but his observations seemed to me to be absurd,
23250  so I withdrew again in some disgust.
23251  As I did so I struck against an elderly, deformed man, who had been behind
23252  me, and I knocked down several books which he was carrying.
23253 \end_layout
23254
23255 \begin_layout End Multiple Columns
23256
23257 \end_layout
23258
23259 \begin_layout Standard
23260 \begin_inset Note Greyedout
23261 status open
23262
23263 \begin_layout Plain Layout
23264
23265 \series bold
23266 Note:
23267 \series default
23268  The values you set with 
23269 \series bold
23270
23271 \backslash
23272 setlength
23273 \series default
23274  will be used for all following multiple columns until you change them again.
23275 \end_layout
23276
23277 \end_inset
23278
23279
23280 \end_layout
23281
23282 \begin_layout Standard
23283 \begin_inset ERT
23284 status collapsed
23285
23286 \begin_layout Plain Layout
23287
23288
23289 \backslash
23290 setlength{
23291 \backslash
23292 multicolsep}{13pt}
23293 \end_layout
23294
23295 \end_inset
23296
23297
23298 \begin_inset Note Note
23299 status collapsed
23300
23301 \begin_layout Plain Layout
23302 go back to the default
23303 \end_layout
23304
23305 \end_inset
23306
23307
23308 \end_layout
23309
23310 \begin_layout Standard
23311 \begin_inset Newpage newpage
23312 \end_inset
23313
23314
23315 \end_layout
23316
23317 \begin_layout Subsubsection
23318 Column Separation
23319 \end_layout
23320
23321 \begin_layout Standard
23322 The width of the columns is automatically calculated, but you can modify
23323  the space between the columns.
23324  This is done by changing the length 
23325 \series bold
23326
23327 \backslash
23328 columnsep
23329 \series default
23330 .
23331  Its predefined value is 10
23332 \begin_inset space \thinspace{}
23333 \end_inset
23334
23335 pt.
23336  Here is an example where 
23337 \series bold
23338
23339 \backslash
23340 columnsep
23341 \series default
23342  is set to 3
23343 \begin_inset space \thinspace{}
23344 \end_inset
23345
23346 cm:
23347 \end_layout
23348
23349 \begin_layout Standard
23350 \begin_inset ERT
23351 status open
23352
23353 \begin_layout Plain Layout
23354
23355
23356 \backslash
23357 setlength{
23358 \backslash
23359 columnsep}{3cm}
23360 \end_layout
23361
23362 \end_inset
23363
23364
23365 \end_layout
23366
23367 \begin_layout Begin Multiple Columns
23368 2
23369 \end_layout
23370
23371 \begin_layout Standard
23372
23373 \size small
23374 My observations of No.
23375 \begin_inset space \space{}
23376 \end_inset
23377
23378 427 Park Lane did little to clear up the problem in which I was interested.
23379  The house was separated from the street by a low wall and railing, the
23380  whole not more than five feet high.
23381  It was perfectly easy, therefore, for anyone to get into the garden, but
23382  the window was entirely inaccessible, since there was no water pipe or
23383  anything which could help the most active man to climb it.
23384  More puzzled than ever, I retraced my steps to Kensington.
23385  I had not been in my study five minutes when the maid entered to say that
23386  a person desired to see me.
23387  To my astonishment it was none other than my strange old book collector,
23388  his sharp, wizened face peering out from a frame of white hair, and his
23389  precious volumes, a dozen of them at least, wedged under his right arm.
23390 \end_layout
23391
23392 \begin_layout End Multiple Columns
23393
23394 \end_layout
23395
23396 \begin_layout Standard
23397 \begin_inset ERT
23398 status collapsed
23399
23400 \begin_layout Plain Layout
23401
23402
23403 \backslash
23404 setlength{
23405 \backslash
23406 columnsep}{10pt}
23407 \end_layout
23408
23409 \end_inset
23410
23411
23412 \begin_inset Note Note
23413 status collapsed
23414
23415 \begin_layout Plain Layout
23416 go back to the default
23417 \end_layout
23418
23419 \end_inset
23420
23421
23422 \end_layout
23423
23424 \begin_layout Subsubsection
23425 Vertical Lines
23426 \end_layout
23427
23428 \begin_layout Standard
23429 Between the columns a rule with a width of the length 
23430 \series bold
23431
23432 \backslash
23433 columnseprule
23434 \series default
23435  is placed.
23436  If this rule width is set to 0
23437 \begin_inset space \thinspace{}
23438 \end_inset
23439
23440 pt (this is the default), the rule is suppressed.
23441  In the following example the line is 2
23442 \begin_inset space \thinspace{}
23443 \end_inset
23444
23445 pt wide:
23446 \end_layout
23447
23448 \begin_layout Standard
23449 \begin_inset ERT
23450 status open
23451
23452 \begin_layout Plain Layout
23453
23454
23455 \backslash
23456 setlength{
23457 \backslash
23458 columnseprule}{2pt}
23459 \end_layout
23460
23461 \end_inset
23462
23463
23464 \end_layout
23465
23466 \begin_layout Begin Multiple Columns
23467 2
23468 \end_layout
23469
23470 \begin_layout Standard
23471
23472 \size small
23473 \begin_inset Quotes eld
23474 \end_inset
23475
23476 You're surprised to see me, sir,
23477 \begin_inset Quotes erd
23478 \end_inset
23479
23480  said he, in a strange, croaking voice.
23481 \end_layout
23482
23483 \begin_layout Standard
23484
23485 \size small
23486 I acknowledged that I was.
23487 \end_layout
23488
23489 \begin_layout Standard
23490
23491 \size small
23492 \begin_inset Quotes eld
23493 \end_inset
23494
23495 Well, I've a conscience, sir, and when I chanced to see you go into this
23496  house, as I came hobbling after you, I thought to myself, I'll just step
23497  in and see that kind gentleman, and tell him that if I was a bit gruff
23498  in my manner there was not any harm meant, and that I am much obliged to
23499  him for picking up my books.
23500 \begin_inset Quotes erd
23501 \end_inset
23502
23503
23504 \end_layout
23505
23506 \begin_layout Standard
23507
23508 \size small
23509 \begin_inset Quotes eld
23510 \end_inset
23511
23512 You make too much of a trifle,
23513 \begin_inset Quotes erd
23514 \end_inset
23515
23516  said I.
23517  
23518 \begin_inset Quotes eld
23519 \end_inset
23520
23521 May I ask how you knew who I was?
23522 \begin_inset Quotes erd
23523 \end_inset
23524
23525
23526 \end_layout
23527
23528 \begin_layout Standard
23529
23530 \size small
23531 \begin_inset Quotes eld
23532 \end_inset
23533
23534 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23535  you'll find my little bookshop at the corner of Church Street, and very
23536  happy to see you, I am sure.
23537  Maybe you collect yourself, sir.
23538  Here's 
23539 \noun on
23540 British
23541 \begin_inset space ~
23542 \end_inset
23543
23544 Birds
23545 \noun default
23546 , and 
23547 \noun on
23548 Catullus
23549 \noun default
23550 , and 
23551 \noun on
23552 The Holy War
23553 \noun default
23554 --a bargain, every one of them.
23555  With five volumes you could just fill that gap on that second shelf.
23556  It looks untidy, does it not, sir?
23557 \begin_inset Quotes erd
23558 \end_inset
23559
23560
23561 \end_layout
23562
23563 \begin_layout End Multiple Columns
23564
23565 \end_layout
23566
23567 \begin_layout Standard
23568 \begin_inset ERT
23569 status collapsed
23570
23571 \begin_layout Plain Layout
23572
23573
23574 \backslash
23575 setlength{
23576 \backslash
23577 columnseprule}{0pt}
23578 \end_layout
23579
23580 \end_inset
23581
23582
23583 \begin_inset Note Note
23584 status collapsed
23585
23586 \begin_layout Plain Layout
23587 go back to the default
23588 \end_layout
23589
23590 \end_inset
23591
23592
23593 \end_layout
23594
23595 \begin_layout Standard
23596 \begin_inset Newpage newpage
23597 \end_inset
23598
23599
23600 \end_layout
23601
23602 \begin_layout Section
23603 Non-standard Paragraph Shapes
23604 \end_layout
23605
23606 \begin_layout Standard
23607 \begin_inset ERT
23608 status collapsed
23609
23610 \begin_layout Plain Layout
23611
23612
23613 \backslash
23614 begin{sloppypar}
23615 \end_layout
23616
23617 \end_inset
23618
23619
23620 \end_layout
23621
23622 \begin_layout Standard
23623 \begin_inset ERT
23624 status collapsed
23625
23626 \begin_layout Plain Layout
23627
23628
23629 \backslash
23630 newdimen
23631 \backslash
23632 varunit 
23633 \end_layout
23634
23635 \begin_layout Plain Layout
23636
23637
23638 \backslash
23639 setlength{
23640 \backslash
23641 varunit}{4.5in}
23642 \end_layout
23643
23644 \end_inset
23645
23646
23647 \end_layout
23648
23649 \begin_layout Standard
23650 \noindent
23651 \begin_inset ERT
23652 status collapsed
23653
23654 \begin_layout Plain Layout
23655
23656
23657 \backslash
23658 parshape 19 0.45
23659 \backslash
23660 varunit 0.332
23661 \backslash
23662 varunit
23663 \end_layout
23664
23665 \begin_layout Plain Layout
23666
23667 0.40
23668 \backslash
23669 varunit 0.300
23670 \backslash
23671 varunit
23672 \end_layout
23673
23674 \begin_layout Plain Layout
23675
23676 0.35
23677 \backslash
23678 varunit 0.293
23679 \backslash
23680 varunit
23681 \end_layout
23682
23683 \begin_layout Plain Layout
23684
23685 0.30
23686 \backslash
23687 varunit 0.300
23688 \backslash
23689 varunit
23690 \end_layout
23691
23692 \begin_layout Plain Layout
23693
23694 0.25
23695 \backslash
23696 varunit 0.317
23697 \backslash
23698 varunit
23699 \end_layout
23700
23701 \begin_layout Plain Layout
23702
23703 0.20
23704 \backslash
23705 varunit 0.342
23706 \backslash
23707 varunit
23708 \end_layout
23709
23710 \begin_layout Plain Layout
23711
23712 0.15
23713 \backslash
23714 varunit 0.373
23715 \backslash
23716 varunit
23717 \end_layout
23718
23719 \begin_layout Plain Layout
23720
23721 0.10
23722 \backslash
23723 varunit 0.410
23724 \backslash
23725 varunit
23726 \end_layout
23727
23728 \begin_layout Plain Layout
23729
23730 0.05
23731 \backslash
23732 varunit 0.453
23733 \backslash
23734 varunit
23735 \end_layout
23736
23737 \begin_layout Plain Layout
23738
23739 0.00
23740 \backslash
23741 varunit 0.500
23742 \backslash
23743 varunit
23744 \end_layout
23745
23746 \begin_layout Plain Layout
23747
23748 0.05
23749 \backslash
23750 varunit 0.453
23751 \backslash
23752 varunit
23753 \end_layout
23754
23755 \begin_layout Plain Layout
23756
23757 0.10
23758 \backslash
23759 varunit 0.410
23760 \backslash
23761 varunit
23762 \end_layout
23763
23764 \begin_layout Plain Layout
23765
23766 0.15
23767 \backslash
23768 varunit 0.373
23769 \backslash
23770 varunit
23771 \end_layout
23772
23773 \begin_layout Plain Layout
23774
23775 0.20
23776 \backslash
23777 varunit 0.342
23778 \backslash
23779 varunit
23780 \end_layout
23781
23782 \begin_layout Plain Layout
23783
23784 0.25
23785 \backslash
23786 varunit 0.317
23787 \backslash
23788 varunit
23789 \end_layout
23790
23791 \begin_layout Plain Layout
23792
23793 0.30
23794 \backslash
23795 varunit 0.300
23796 \backslash
23797 varunit
23798 \end_layout
23799
23800 \begin_layout Plain Layout
23801
23802 0.35
23803 \backslash
23804 varunit 0.293
23805 \backslash
23806 varunit
23807 \end_layout
23808
23809 \begin_layout Plain Layout
23810
23811 0.40
23812 \backslash
23813 varunit 0.300
23814 \backslash
23815 varunit
23816 \end_layout
23817
23818 \begin_layout Plain Layout
23819
23820 0.45
23821 \backslash
23822 varunit 0.332
23823 \backslash
23824 varunit
23825 \end_layout
23826
23827 \begin_layout Plain Layout
23828
23829 \end_layout
23830
23831 \end_inset
23832
23833 There are times when the tyranny of rectangular paragraphs must be overthrown.
23834  In such situations, a call to the delightful plain TeX command 
23835 \family typewriter
23836
23837 \backslash
23838 parshape
23839 \family default
23840  is called for.
23841  As you can see, completely arbitrary shapes can be laid out with a suitable
23842  set of line length definitions.
23843  While this parshape may look a bit silly and useless, one could conceive
23844  of situations such as finely tuned dropped capitals, word wrapping around
23845  non-rectangular graphics, etc.
23846  which will benefit from such handcrafting.
23847 \end_layout
23848
23849 \begin_layout Standard
23850 \begin_inset VSpace bigskip
23851 \end_inset
23852
23853
23854 \end_layout
23855
23856 \begin_layout Standard
23857 The syntax is 
23858 \family typewriter
23859
23860 \backslash
23861 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23862  #nindent #nlength
23863 \family default
23864 , where 
23865 \family typewriter
23866 numlines
23867 \family default
23868  is the number of lines of text which define the paragraph.
23869  If there turn out to be fewer lines, the shape is truncated; if there are
23870  more, the excess lines have the same dimensions as the last line of the
23871  definition.
23872  The 
23873 \family typewriter
23874 #nindent
23875 \family default
23876  and 
23877 \family typewriter
23878 #nlength
23879 \family default
23880  entries specify the indentation of the line from the left margin, and the
23881  length of the line as measured from that point.
23882  The shape applies only to the current paragraph; everything is reset to
23883  normal for the next paragraph.
23884 \end_layout
23885
23886 \begin_layout Standard
23887 \begin_inset ERT
23888 status collapsed
23889
23890 \begin_layout Plain Layout
23891
23892
23893 \backslash
23894 end{sloppypar}
23895 \end_layout
23896
23897 \end_inset
23898
23899
23900 \end_layout
23901
23902 \begin_layout Bibliography
23903 \begin_inset CommandInset bibitem
23904 LatexCommand bibitem
23905 key "multicol"
23906
23907 \end_inset
23908
23909 Documentation of the LaTeX-package 
23910 \begin_inset CommandInset href
23911 LatexCommand href
23912 name "multicol"
23913 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23914
23915 \end_inset
23916
23917
23918 \begin_inset Index idx
23919 status collapsed
23920
23921 \begin_layout Plain Layout
23922 LaTeX-packages ! multicol
23923 \end_layout
23924
23925 \end_inset
23926
23927
23928 \end_layout
23929
23930 \end_body
23931 \end_document